#===============================================================================
#
# Shanghai Simple Script - Heal After Battle
# Last Date Updated: 2010.06.03
# Level: Normal
#
# This causes the party to be healed after battle by a percentage. Options are
# adjustable in the module.
#===============================================================================
# Instructions
# -----------------------------------------------------------------------------
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials but above ▼ Main. Remember to save.
#
# This script occurs automatically.
#===============================================================================
$imported = {} if $imported == nil
$imported["HealAfterBattle"] = true
module SSS
# Change these constants to adjust what percentage of HP or MP is healed
# after battle and whether or not states will be cleared, too.
AFTER_BATTLE_HEAL_HP = 25
AFTER_BATTLE_HEAL_MP = 25
AFTER_BATTLE_RECOVER = true
end
#==============================================================================
# ** Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Heal After Battle
#--------------------------------------------------------------------------
def heal_after_battle
if SSS::AFTER_BATTLE_RECOVER
for state in states do remove_state(state.id) end
end
return if dead?
self.hp += maxhp * SSS::AFTER_BATTLE_HEAL_HP / 100
self.mp += maxmp * SSS::AFTER_BATTLE_HEAL_MP / 100
end
end
#==============================================================================
# ** Scene_Battle
#==============================================================================
class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# * End Battle
#--------------------------------------------------------------------------
alias battle_end_sss_heal_after_battle battle_end unless $@
def battle_end(result)
battle_end_sss_heal_after_battle(result)
if result != 2
for member in $game_party.members
member.heal_after_battle
end
end
end
end
#===============================================================================
#
# END OF FILE
#
#===============================================================================