| 赞 | 0 |
| VIP | |
| 好人卡 | |
| 积分 | 1 |
| 经验 | |
| 最后登录 | 2015-5-7 |
| 在线时间 | 75 小时 |
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 75 小时
- 注册时间
- 2010-10-11
- 回帖
- 247
|
楼主 |
发表于 2010-10-19 15:34:28
|
显示全部楼层
本帖最后由 miracl 于 2010-10-19 15:47 编辑
回复 九夜神尊 的帖子- #--------------------------------------------------------------------------
- # ● 随机目标 (角色用)
- #--------------------------------------------------------------------------
- def decide_random_target_for_actor
- # 效果范围的分支
- if for_one_friend_hp0?
- battler = $game_party.random_target_actor_hp0
- elsif for_one_friend?
- if rand(100)<50 #敌我均一半的受攻击率
- battler = $game_party.random_target_actor
- else
- battler = $game_troop.random_target_enemy
- end
- # 对像存在的话取得索引、
- # 对像不存在的场合下清除行动
- if battler != nil
- @target_index = battler.index
- else
- clear
- end
- end
复制代码 我是这么修改的,但是会报错,- # 设置对应生成随机数的当前行动
- for action in available_actions
- if action.rating > rating_max - 3
- if value < action.rating - (rating_max - 3)
- self.current_action.kind = action.kind
- self.current_action.basic = action.basic
- self.current_action.skill_id = action.skill_id
- self.current_action.decide_random_target_for_enemy #这句报错
复制代码 |
|