查看: 1976|回复: 0

[已经过期] GTBS+VX+v1.5.1.4允许队友伤害关闭后出错

  [复制链接]
梦石
0
星屑
60
在线时间
58 小时
注册时间
2008-5-1
回帖
30
发表于 2011-8-28 11:08:26 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
GTBS VX v1.5.1.4.zip (1.09 MB, 下载次数: 134)
将GTBS_Engine_Settings第84行的  ATTACK_ALLIES = true改为false后,到了敌人行动的回合就会报错
1.jpg
这时候光标跳到GTBS_v1.5.1 Battle_Scene第6545行
  1.   def get_possible_targets(type = 'attack')
  2.     targets = []
  3.     if !GTBS::ATTACK_ALLIES
  4.       case @active_battler.is_a?
  5.       when Game_Actor
  6.         if @active_battler.state?(GTBS::CONFUSE_ID) or type == 'help' #if confused or help skill
  7.           targets = actors + neutral
  8.         else
  9.           targets = enemies
  10.         end
  11.       when Game_Enemy
  12.         if !@active_battler.state?(GTBS::CONFUSE_ID) or type == 'help' #if confused
  13.           targets = enemies
  14.         else
  15.           targets = actors + neutral
  16.         end
  17.       end
  18.     else
  19.       targets = actors + neutral + enemies
  20.     end
  21.     return targets
  22.   end  
复制代码
这段脚本按我的理解是AI获取攻击目标的逻辑。问题可能出在case @active_battler.is_a?这句,但是我试着修改了一下,虽然不会报错了,但是AI也不会攻击了。
开了ATTACK_ALLIES是正常运行的,但是我又不想有队友伤害,请问应该怎么办啊

点评

把case>when判定的语句删掉后暂时解决问题了,不过这样怪似乎用恢复类技能的时候就无法判定目标为己方了。。  发表于 2011-8-28 11:38
这游戏太难了
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部