06-05-2006, 01:00 PM
(This post was last modified: 07-27-2017, 04:23 AM by DerVVulfman.)
State Immunity Message
by mudgolem
Jun 5 2006
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:
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.
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