赞 | 274 |
VIP | 0 |
好人卡 | 0 |
积分 | 158 |
经验 | 515 |
最后登录 | 2024-11-8 |
在线时间 | 2106 小时 |
Lv4.逐梦者
- 梦石
- 1
- 星屑
- 14790
- 在线时间
- 2106 小时
- 注册时间
- 2017-9-28
- 帖子
- 662
|
- #===============================================================================
- # )----------------------------------------------------------------------------(
- # )-- 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
-
- # )--------------------------------------------------------------------------(
- # )-- 每步回复多少HP. --(
- # )-- 0.01 = 1%, 0.50 = 50% --(
- # )--------------------------------------------------------------------------(
- HEAL_PER_STEP = 0.01 # 0.01 = 每步回复1%的hp
- 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
复制代码 |
|