Sign in to follow this  
Followers 0
Dragon Call

Subir HP y SP despues de batalla

1 post in this topic

Este scrpit funciona para que cuando se acabe la batalla, te suba un % de tu HP y SP y si estas muerto te regenere con 1 de HP

[SPOILER]
CODE
module After_Battle
 HP_RE = true
 HP_RE_PER = 5
 SP_RE = true
 SP_RE_PER = 5
 CORPSE_RE = true
end
#-------------------------------------------------------------------------------
class Scene_Battle
 include After_Battle
 alias start_phase5_rec start_phase5
 def start_phase5
   for actor in $game_party.actors
     if HP_RE and !actor.dead?
       actor.hp += (actor.maxhp * HP_RE_PER / 100).truncate
       actor.damage_pop = true
       actor.damage = (-1*(actor.maxhp * HP_RE_PER / 100).truncate)
     end
     if SP_RE and !actor.dead?
       actor.sp += (actor.maxsp * SP_RE_PER / 100).truncate
     end
     if CORPSE_RE and actor.dead?
       actor.hp = 1
     end
   end
   start_phase5_rec
   @status_window.refresh
 end
end
[/SPOILER]

Creditos
Claimh

CODE
HP_RE = true

Ponerlo false si no quieres que te recupere HP despues de la batalla

CODE
HP_RE_PER = 5

Cambiar el 5 por el % de Hp que quiere que se regenere despues de la batalla(cambia eso si tiene el HP_RE=true)

CODE
SP_RE = true

Ponerlo false si no quieres que te recupere SP despues de la batalla

CODE
SP_RE_PER = 5

Cambiar el 5 por el % de SP que quiere que se regenere despues de la batalla(cambia eso si tiene el SP_RE=true)

CODE
CORPSE_RE = true

Pon false si no quieres que se revivan los personajes muertos despues de la batalla Edited by Dragon Call
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0