Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #===============================================================================
- # )----------------------------------------------------------------------------(
- # )-- AUTHOR: Mr Trivel --(
- # )-- NAME: Heal on Move --(
- # )-- CREATED: 2014-09-19 --(
- # )-- VERSION: 1.1 --(
- #===============================================================================
- # )----------------------------------------------------------------------------(
- # )-- VERSION HISTORY --(
- # )-- 1.0 - Initial script. --(
- #===============================================================================
- # )----------------------------------------------------------------------------(
- # )-- DESCRIPTION --(
- # )-- Actors heal on movement. --(
- #===============================================================================
- # )----------------------------------------------------------------------------(
- # )-- INSTRUCTIONS --(
- # )-- Define how many % per step do you want your actors to heal in module. --(
- #===============================================================================
- # )----------------------------------------------------------------------------(
- # )-- LICENSE INFO --(
- # )-- Free for non-commercial & commercial games if credit was given to --(
- # )-- Mr Trivel. --(
- # )----------------------------------------------------------------------------(
- #===============================================================================
- # )=======---------------------------------------------------------------------(
- # )-- Module: MovementHeal --(
- # )---------------------------------------------------------------------=======(
- module MovementHeal
- # )--------------------------------------------------------------------------(
- # )-- How many % HP per step your actors will heal. --(
- # )-- 0.01 = 1%, 0.50 = 50% --(
- # )--------------------------------------------------------------------------(
- HEAL_PER_STEP = 0.01 # 0.01 = 1% per step
- end
- # )=======---------------------------------------------------------------------(
- # )-- class: Game_Actor --(
- # )---------------------------------------------------------------------=======(
- class Game_Actor < Game_Battler
- alias :mrts_movement_heal_on_player_walk :on_player_walk
- # )--------------------------------------------------------------------------(
- # )-- Alias: on_player_walk --(
- # )--------------------------------------------------------------------------(
- def on_player_walk
- if $game_player.normal_walk?
- self.hp += [(self.mhp * MovementHeal::HEAL_PER_STEP).to_i, 1].max
- end
- mrts_movement_heal_on_player_walk
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment