查看: 2564|回复: 1

[已经解决] 行动顺序

[复制链接]
梦石
0
星屑
319
在线时间
209 小时
注册时间
2007-6-23
回帖
33
发表于 2014-8-18 13:21:40 | 显示全部楼层 |阅读模式

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

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

×
#--------------------------------------------------------------------------
  # ● 生成行动顺序
  #--------------------------------------------------------------------------
  def self.make_action_orders
    @action_battlers = []
    @action_battlers += $game_party.members unless @surprise
    @action_battlers += $game_troop.members unless @preemptive
    @action_battlers.each {|battler| battler.make_speed }
    @action_battlers.sort! {|a,b| b.speed - a.speed }
  end
我将@action_battlers.sort! {|a,b| b.speed - a.speed }改成@action_battlers.sort! {|a,b| a.speed - b.speed }
行动顺序就逆转了,如何设计某条件达成行动顺序就逆转(tp 永远为 0)例如条件分支

…あたしは天

梦石
0
星屑
2308
在线时间
4033 小时
注册时间
2010-10-4
回帖
10548

开拓者贵宾

发表于 2014-8-18 13:27:59 | 显示全部楼层
  1.   def self.make_action_orders
  2.     @action_battlers = []
  3.     @action_battlers += $game_party.members unless @surprise
  4.     @action_battlers += $game_troop.members unless @preemptive
  5.     @action_battlers.each {|battler| battler.make_speed }
  6.     @action_battlers.sort! {|a,b| b.speed - a.speed }
  7.     @action_battlers.reverse! if 某条件
  8.   end
复制代码

评分

参与人数 1梦石 +1 收起 理由
VIPArcher + 1 认可答案

查看全部评分

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

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

在本版发帖返回顶部