其中班尼特有神圣之井技能...
神圣之井.rar
(577.47 KB, 下载次数: 62)
#============================================================================== # ★ 神圣之井技能设计 #------------------------------------------------------------------------------ # 本脚本来自rpg.blue # 作者:正太君(聪仔) #------------------------------------------------------------------------------ # 使用时请保留版权信息,谢谢... #============================================================================== # 请设置神圣之井状态的ID: SSZJ_STA = 21 # 请设置恢复动画的ID: SSZJ_ANI = 39 # 请设置恢复最大HP的比例: SSZJ_REC = 0.2 #============================================================================== class Game_Party < Game_Unit def sszj_recover member = shenshengzhijing return if member.nil? member.animation_id = SSZJ_ANI add_hp = (member.maxhp * SSZJ_REC).round member.damage_num(-add_hp) end def shenshengzhijing members = [] self.members.each{|i| members.push(i) if i.hp > 0 and i.state?(SSZJ_STA)} members.sort!{|a, b| a.hp * 1.0 / a.maxhp <=> b.hp * 1.0 / b.maxhp} return members[0] end end class Scene_Battle alias :new_turn_end :turn_end unless method_defined? :new_turn_end def turn_end $game_party.sszj_recover new_turn_end end end
#==============================================================================
# ★ 神圣之井技能设计
#------------------------------------------------------------------------------
# 本脚本来自rpg.blue
# 作者:正太君(聪仔)
#------------------------------------------------------------------------------
# 使用时请保留版权信息,谢谢...
#==============================================================================
# 请设置神圣之井状态的ID:
SSZJ_STA = 21
# 请设置恢复动画的ID:
SSZJ_ANI = 39
# 请设置恢复最大HP的比例:
SSZJ_REC = 0.2
#==============================================================================
class Game_Party < Game_Unit
def sszj_recover
member = shenshengzhijing
return if member.nil?
member.animation_id = SSZJ_ANI
add_hp = (member.maxhp * SSZJ_REC).round
member.damage_num(-add_hp)
end
def shenshengzhijing
members = []
self.members.each{|i| members.push(i) if i.hp > 0 and i.state?(SSZJ_STA)}
members.sort!{|a, b| a.hp * 1.0 / a.maxhp <=> b.hp * 1.0 / b.maxhp}
return members[0]
end
end
class Scene_Battle
alias :new_turn_end :turn_end unless method_defined? :new_turn_end
def turn_end
$game_party.sszj_recover
new_turn_end
end
end
|