Project1
标题:
求走路回血脚本
[打印本页]
作者:
cn_cine
时间:
2018-4-26 09:24
标题:
求走路回血脚本
作者:
Nil2018
时间:
2018-4-26 09:24
#===============================================================================
# )----------------------------------------------------------------------------(
# )-- 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
复制代码
作者:
defisym
时间:
2018-4-26 09:35
给角色加一个每回合自动回血的状态就能走路回血
可以选择在战斗处理前移除并在战斗结束后重新添加
作者:
giligilieye
时间:
2018-5-6 18:58
触发战斗前做一个状态除移,战斗结束后再添加上去,不过每个战斗事件都弄有点麻烦。
作者:
giligilieye
时间:
2018-5-11 23:09
giligilieye 发表于 2018-5-6 18:58
触发战斗前做一个状态除移,战斗结束后再添加上去,不过每个战斗事件都弄有点麻烦。 ...
说的有道理,做一个公共事件就行了。
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1