恨思归 发表于 2012-2-7 20:43:14

这个二段攻击脚本有问题么?

class Game_Battler
attr_accessor :double_atk # 二段攻击标志
alias secondsen_initialize initialize
def initialize
@double_atk = false
secondsen_initialize
end
alias secondsen_atk_ef attack_effect
def attack_effect(attacker)
# 判断二段攻击
if attacker.states.include?(17)
attacker.double_atk = true
end
secondsen_atk_ef(attacker)
end
end

class Scene_Battle
#--------------------------------------------------------------------------
# ● 刷新画面 (主回合步骤 6 : 刷新)
#--------------------------------------------------------------------------
def update_phase4_step6
if @active_battler.double_atk
for target in @target_battlers
target.attack_effect(@active_battler)
end
@active_battler.double_atk = false
@phase4_step = 3
else
# 清除强制行动对像的战斗者
$game_temp.forcing_battler = nil
# 公共事件 ID 有效的情况下
if @common_event_id > 0
# 设置事件
common_event = $data_common_events[@common_event_id]
$game_system.battle_interpreter.setup(common_event.list, 0)
end
# 移至步骤 1
@phase4_step = 1
end
end
end

二段攻击的脚本,用了之后剑神之类的公共事件法术居然会重复发生

林间御风 发表于 2012-2-7 20:57:46

32行往下看。你就明白怎么改了

恨思归 发表于 2012-2-7 21:22:59

回复 2# 林间御风


    哈~解决了 谢谢{:4_94:}
页: [1]
查看完整版本: 这个二段攻击脚本有问题么?