Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
State Immunity Message
#1
State Immunity Message
by mudgolem

Jun 5 2006

This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.


Shows "Immune" instead of "Miss" if someone is trying to add states to a target that resists them fully. Only appears if the attack does no damage and has no other effect.

Helps tell your player he's just wasting his time

Dump this script under the default scripts, above main:

Code:
#=============================================================================
# ** SG State Immunity Message
#=============================================================================
# sandgolem
# Version 3
# 4.06.06
#=============================================================================
#
# To use this script, copy it and insert it in a new section above "Main",
# but under the default scripts and the SDK if you're using it.
#
#=============================================================================

#--------------------------------------------------------------------------
# * SDK Log Script
#--------------------------------------------------------------------------
begin
  SDK.log("SG State Immunity Message", "sandgolem", 3, "4.06.06")
  if SDK.state("SG State Immunity Message") != true
    @sg_immunemsg_disabled = true
  end
rescue
end

#--------------------------------------------------------------------------
# * Begin SDK Enable Test
#--------------------------------------------------------------------------
if !@sg_immunemsg_disabled

  module RPG
    class Sprite < ::Sprite
      if !method_defined?('sandgolem_immunemsg_sprite_dam')
        alias sandgolem_immunemsg_sprite_dam damage
      end
      def damage(value, critical)
        if @battler.sg_skill_immune == true
          if value == 'Miss'
            value = 'Immune'
          end
        end
        sandgolem_immunemsg_sprite_dam(value, critical)
        @battler.sg_skill_immune = nil
      end
    end
  end

  class Game_Battler
    attr_accessor :sg_skill_immune

    def sg_state_immune_check(statecheck)
      @sg_skill_immune = nil
      for i in statecheck
        if $data_states[i].nonresistance
          return
        end
        if self.state_ranks[i] != 0 && self.state_ranks[i] != 6
          return
        end
      end
      @sg_skill_immune = true
    end

    alias sandgolem_immunemsg_gamebat_statesplus states_plus
    def states_plus(plus_state_set)
      if plus_state_set != []
        sg_state_immune_check(plus_state_set)
      end
      sandgolem_immunemsg_gamebat_statesplus(plus_state_set)
    end
  end

#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
end
}


Possibly Related Threads…
Thread Author Replies Views Last Post
  Auto Skipping Message Sonokawa 0 1,969 09-02-2006, 01:00 PM
Last Post: Sonokawa
  Show a Message in any Scene Tsunokiette 1 2,956 08-17-2006, 01:15 PM
Last Post: GoldenShadow
  Slipknot Advance Message System Sheol 0 2,269 01-02-2006, 01:00 PM
Last Post: Sheol
  My own Message System Sheol 0 2,259 11-22-2005, 01:00 PM
Last Post: Sheol
  Animated Message Script dragonslayer 0 2,136 05-04-2005, 01:00 PM
Last Post: dragonslayer
  Custom message window dragonslayer 0 2,121 03-25-2005, 01:00 PM
Last Post: dragonslayer



Users browsing this thread: