标题: 请问:怎么做回合制战斗? [打印本页] 作者: cmzjbczzf 时间: 2008-8-18 19:07 标题: 请问:怎么做回合制战斗? 就是我方轮流出招,然后才允许敌人出招,而不是根据速度来决定 [LINE]1,#dddddd[/LINE]版务信息:本贴由楼主自主结贴~作者: dbshy 时间: 2008-8-18 19:20
def make_action_orders
# 初始化序列 @action_battlers
@action_battlers = []
# 添加敌人到 @action_battlers 序列
for enemy in $game_troop.enemies
@action_battlers.push(enemy)
end
# 添加角色到 @action_battlers 序列
for actor in $game_party.actors
@action_battlers.push(actor)
end
# 确定全体的行动速度
for battler in @action_battlers
battler.make_action_speed
end
# 按照行动速度从大到小排列
@action_battlers.sort! {|a,b|
b.current_action.speed - a.current_action.speed }
end
把排序的删了作者: ybb520520520 时间: 2008-8-18 19:21
提示: 作者被禁止或删除 内容自动屏蔽作者: dbshy 时间: 2008-8-18 19:39
def make_action_orders
# 初始化序列 @action_battlers
@action_battlers = []
for actor in $game_party.actors
@action_battlers.push(actor)
end
for enemy in $game_troop.enemies
@action_battlers.push(enemy)
end
end
def make_action_orders
# 初始化序列 @action_battlers
@action_battlers = []
for actor in $game_party.actors
@action_battlers.push(actor)
end
for enemy in $game_troop.enemies
@action_battlers.push(enemy)
end
end