#==============================================================================
# ** Game_Battler
#------------------------------------------------------------------------------
# A battler class with methods for sprites and actions added. This class
# is used as a super class of the Game_Actor class and Game_Enemy class.
#==============================================================================
class Game_Battler < Game_BattlerBase
#--------------------------------------------------------------------------
# * New Method: YEA HP Damage
#--------------------------------------------------------------------------
def damage_hp(value)
value = value.round.to_i
perform_damage_effect
text = sprintf(YEA::BATTLE::POPUP_SETTINGS[:hp_dmg], value.group)
create_popup(text, "HP_DMG")
self.hp = [self.hp - value, 0].max
end
#--------------------------------------------------------------------------
# * New Method: YEA MP Damage
#--------------------------------------------------------------------------
def damage_mp(value)
value = value.round.to_i
text = sprintf(YEA::BATTLE::POPUP_SETTINGS[:mp_dmg], value.group)
create_popup(text, "MP_DMG")
self.mp = [self.mp - value, 0].max
end
#--------------------------------------------------------------------------
# * New Method: YEA TP Damage
#--------------------------------------------------------------------------
def damage_tp(value)
value = value.round.to_i
text = sprintf(YEA::BATTLE::POPUP_SETTINGS[:tp_dmg], value.group)
create_popup(text, "TP_DMG")
self.tp = [self.tp - value, 0].max
end
#--------------------------------------------------------------------------
# * New Method: YEA HP Heal
#--------------------------------------------------------------------------
def heal_hp(value)
value = value.round.to_i
Sound.play_recovery
text = sprintf(YEA::BATTLE::POPUP_SETTINGS[:hp_heal], value.group)
create_popup(text, "HP_HEAL")
self.hp = [self.hp + value, self.mhp].min
end
#--------------------------------------------------------------------------
# * New Method: YEA MP Heal
#--------------------------------------------------------------------------
def heal_mp(value)
value = value.round.to_i
Sound.play_recovery
text = sprintf(YEA::BATTLE::POPUP_SETTINGS[:mp_heal], value.group)
create_popup(text, "MP_HEAL")
self.mp = [self.mp + value, self.mmp].min
end
#--------------------------------------------------------------------------
# * New Method: YEA TP Heal
#--------------------------------------------------------------------------
def heal_tp(value)
value = value.round.to_i
Sound.play_recovery
text = sprintf(YEA::BATTLE::POPUP_SETTINGS[:tp_heal], value.group)
create_popup(text, "TP_HEAL")
self.tp = [self.tp + value, self.max_tp].min
end
end