Xp 二段攻击的状态
状态说明1。状态编号
脚本11行 if attacker.states.include?(17)
17表示的是编号为17的状态是 二段攻击。。如果大家用的是别的编号的话,请自行改正
如果有 多个状态都是二段攻击 比如 1号 和2号都是
if attacker.states.include?(1)|| attacker.states.include?(2)
这样就可以了,以此类推。。
2。用法。。技能加状态,新建状态这些基本的我就不说了,脚本贴在Main前面就可以了,至于状态持续几回合那个是在数据库中自己定义的
3。说明,看名字就知道是二段攻击。也就是有这个状态的队员会对敌人打击两次。但是该队员使用技能的话不会出现二段技能的情况。
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 附上我在 数据库 中设置技能的图片
只设置了 状态 和 技能两个栏目 感谢发布啊 谢谢 哦吼吼吼吼,只不过是LS有想法,我来实现而已,然后再发布出来给大家分享
页:
[1]