很感谢星辰的答案。让我实现了多次攻击效果的应用.但普攻后再特攻,却不知如何实现.
def execute_action
case @active_battler.action.kind
when 0 # 基本
case @active_battler.action.basic
when 0 # 攻击
execute_action_attack
if @active_battler.id==1
p "攻击后使用特技"
#在这里加入特技的使用ID,摸索良久还是不会,继续在这里求教.
execute_action_skill
end
if @active_battler.id==2
p "攻击四次"
execute_action_attack
execute_action_attack
execute_action_attack
end
#--------------------------------------------------------------------------
# ● 执行战斗行动
#--------------------------------------------------------------------------
def execute_action
case @active_battler.action.kind
when 0 # 基本
case @active_battler.action.basic
when 0 # 攻击
execute_action_attack
if @active_battler.id==1 # and 角色持有某物是如何表达?
p "攻击后使用特技"
@active_battler.action.set_skill(61)
execute_action_skill
end
if @active_battler.id==1
p "攻击四次"
execute_action_attack
execute_action_attack
execute_action_attack
end
when 1 # 防御
execute_action_guard
when 2 # 逃走
execute_action_escape
when 3 # 待机
execute_action_wait
end
when 1 # 特技
execute_action_skill
when 2 # 物品
execute_action_item
end
end