本帖最后由 taroxd 于 2014-6-21 07:23 编辑
a000b1745 发表于 2014-6-11 01:47
我把衝突腳本解決哩 :)
目前是="我方HP最低者"
請問還能增加
未测试,但应该没有什么大问题。同样的,别把这个技能给自己人使用
另外,如果需要增加怪物AI的话,应该有人写过脚本来着……
class Game_Action alias targets_for_friends_20140611 targets_for_friends def targets_for_friends if item.note.include?('<指定同隊HP最低者>') [friends_unit.alive_members.min_by(&:hp_rate)] elsif item.note.include?('<指定同隊HP最高者>') [friends_unit.alive_members.max_by(&:hp_rate)] else targets_for_friends_20140611 end end alias targets_for_opponents_20140611 targets_for_opponents def targets_for_opponents if item.note.include?('<指定敵隊HP最低者>') [opponents_unit.alive_members.min_by(&:hp_rate)] elsif item.note.include?('<指定敵隊HP最高者>') [opponents_unit.alive_members.max_by(&:hp_rate)] else targets_for_opponents_20140611 end end end
class Game_Action
alias targets_for_friends_20140611 targets_for_friends
def targets_for_friends
if item.note.include?('<指定同隊HP最低者>')
[friends_unit.alive_members.min_by(&:hp_rate)]
elsif item.note.include?('<指定同隊HP最高者>')
[friends_unit.alive_members.max_by(&:hp_rate)]
else
targets_for_friends_20140611
end
end
alias targets_for_opponents_20140611 targets_for_opponents
def targets_for_opponents
if item.note.include?('<指定敵隊HP最低者>')
[opponents_unit.alive_members.min_by(&:hp_rate)]
elsif item.note.include?('<指定敵隊HP最高者>')
[opponents_unit.alive_members.max_by(&:hp_rate)]
else
targets_for_opponents_20140611
end
end
end
@Sion 发帖20天了,结贴吧~ |