Project1
标题:
如何设置死亡之后不消失的和死亡时自动附加的状态
[打印本页]
作者:
午睡的风铃
时间:
2014-9-23 08:42
标题:
如何设置死亡之后不消失的和死亡时自动附加的状态
目测前一问通过修改预设脚本就可以实现,在下脚本盲……请问应该如何修改。
关于死亡时自动附加的状态,1号状态除外再多附加一个。
谢谢
作者:
上贺茂润
时间:
2014-9-23 09:24
def hp=(hp)
@hp = [[hp, maxhp].min, 0].max
if @hp == 0 and not state?(1) and not @immortal
add_state(1)
add_state(2)
add_state(3)
add_state(4)
add_state(5)
add_state(6)
add_state(7)
作者:
VIPArcher
时间:
2014-9-23 09:34
module VIPArcher
Death_State = 26 #死亡自动附加
Death_Add_State = 27 #死亡也不消失的状态
end
class Game_BattlerBase
alias vip_20140923_clear_states clear_states
def clear_states
flag = @states && state?(VIPArcher::Death_Add_State)
vip_20140923_clear_states
@states.push(VIPArcher::Death_Add_State) if flag
end
end
class Game_Battler < Game_BattlerBase
alias vip_20140923_die die
def die
vip_20140923_die
@states.push(VIPArcher::Death_State)
end
end
复制代码
未测试
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1