#============================================================================== # ■ Game_Battler #------------------------------------------------------------------------------ #  バトラーを扱うクラスです。このクラスは Game_Actor クラスと Game_Enemy クラ # スのスーパークラスとして使用されます。 #============================================================================== class Game_Battler #-------------------------------------------------------------------------- # ● スリップダメージの効果適用 #-------------------------------------------------------------------------- def slip_damage_effect # ダメージを設定 self.damage = self.maxhp / 10 # 分散 if self.damage.abs > 0 amp = [self.damage.abs * 15 / 100, 1].max self.damage += rand(amp+1) + rand(amp+1) - amp end # 効果値が大きすぎる場合、補正 if self.damage > 500 and self.damage < 2500 self.damage = self.damage * (100 - (self.damage / 250 - 2) * 10) / 100 elsif self.damage >= 2500 self.damage = self.damage * 2 / 10 end # メソッド終了 return true end #-------------------------------------------------------------------------- # ● リジェネレーションの効果適用 #-------------------------------------------------------------------------- def regeneration_effect # 回復値を設定 unless self.slip_damage? self.damage = 0 end damage = self.maxhp / 10 # 分散 if damage.abs > 0 amp = [damage.abs * 15 / 100, 1].max damage += rand(amp+1) + rand(amp+1) - amp end # 効果値が大きすぎる場合、補正 if damage > 500 and damage < 2500 damage = damage * (100 - (damage / 250 - 2) * 10) / 100 elsif damage >= 2500 damage = damage * 2 / 10 end # 符号を逆転 damage *= -1 # self.damageに加算 self.damage += damage # メソッド終了 return true end end