Project1
标题:
如何把所有攻击类型反弹给对方队伍的随机一个成员
[打印本页]
作者:
幻耶
时间:
2011-11-24 10:06
标题:
如何把所有攻击类型反弹给对方队伍的随机一个成员
当战斗者为20号状态,把当前受到的所有攻击类型(包括普通、魔法和物理特技)反弹给对方队伍的随机一个成员,如果只在 Game_Battler 3 和 Scene_Battle 4 修改,应该怎么改? dsu_plus_rewardpost_czw
作者:
叶子
时间:
2011-12-6 07:49
Scene_Battle 4中有很多地方都可以下手,set_target_battlers应该是比较好的选择
作者:
幻耶
时间:
2011-12-7 09:18
本帖最后由 幻耶 于 2011-12-7 09:30 编辑
改成这样?对方攻击会出错啊:undefined method 'states?' for []:Array
def set_target_battlers(scope)
# 行动方的战斗者是敌人的情况下
if @active_battler.is_a?(Game_Enemy)
# 效果范围分支
case scope
when 1 # 敌单体
if @target_battlers.states.include?(20)
index = @active_battler.current_action.target_index
@target_battlers.push($game_troop.smooth_target_enemy(index))
else
index = @active_battler.current_action.target_index
@target_battlers.push($game_party.smooth_target_actor(index))
end
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1