class Game_Actor
alias apply_guard_without_state apply_guard
def apply_guard(value)
value = apply_guard_without_state(value)
if state?(50) && value > 0
v = $game_variables
if v[30] >= value
$Hurt_Shield = value
$Magic_Shield = "have"
v[30] -= value
0
else
value -= v[30]
$Hurt_Shield = value
$Magic_Shield = "have"
v[30] = 0
$game_party.members.each {|actor| actor.remove_state(50) }
value
end
else
$Magic_Shield = ""
value
end
end
end
class Game_ActionResult
#--------------------------------------------------------------------------
# ● 获取 HP 伤害的文字
#--------------------------------------------------------------------------
def hp_damage_text
if @hp_drain > 0
fmt = @battler.actor? ? Vocab::ActorDrain : Vocab::EnemyDrain
sprintf(fmt, @battler.name, Vocab::hp, @hp_drain)
elsif @hp_damage > 0
fmt = @battler.actor? ? Vocab::ActorDamage : Vocab::EnemyDamage
sprintf(fmt, @battler.name, @hp_damage)
elsif @hp_damage < 0
fmt = @battler.actor? ? Vocab::ActorRecovery : Vocab::EnemyRecovery
sprintf(fmt, @battler.name, Vocab::hp, -hp_damage)
elsif $Magic_Shield == "have"
fmt = "魔法之盾抵消了%s点伤害"
sprintf(fmt,$Hurt_Shield.to_i)
else
fmt = @battler.actor? ? Vocab::ActorNoDamage : Vocab::EnemyNoDamage
sprintf(fmt, @battler.name)
end
end
end