#==============================================================================
# ★ RGSS3_メタルボディ Ver1.0
#==============================================================================
=begin
作者:tomoaky
webサイト:ひきも記は閉鎖しました。 (http://hikimoki.sakura.ne.jp/)
2013.06.06 Ver1.0
公開
在buff中备注↓
<最大受伤 5>受到的单段伤害不高于5
<最大受伤 self.mhp/10>单段伤害不高于角色hp的10%
=end
#==============================================================================
# ■ Game_Battler
#==============================================================================
class Game_Battler < Game_BattlerBase
def metal_body
feature_objects.each do |object|
if /<最大受伤\s*(.+)\s*>/ =~ object.note
formula = $1
return eval(formula).to_i
end
end
nil
end
#--------------------------------------------------------------------------
# ● 防御修正の適用
#--------------------------------------------------------------------------
alias tmmetalbody_game_battler_apply_guard apply_guard
def apply_guard(damage)
result = tmmetalbody_game_battler_apply_guard(damage)
return (result > 0 && metal_body ? [result, metal_body].min : result)
end
end