简化脚本。
for target in @target_battlers
#################攻击反弹#########################
if target.state?(X) #X为反击状态ID
#如果攻击方是普通攻击,并且对象方伤害不为MISS
if @active_battler.current_action.kind == 0 and target.damage != "Miss"
target.animation_id = XX #设置反击动画ID
@active_battler.animation_id = XX #设置被反击者动画ID
@active_battler.hp -= @active_battler.damage.to_i #伤害=反击者所受伤害
#被反击者追加的状态,true为一定附加,false为一定几率附加。
@active_battler.add_state(X, true)
@active_battler.damage_pop = true
end
end
####################################################
if target.damage != nil
target.damage_pop = true
end
end
在Scene_Battle 4里找到步骤5显示伤害部分,添加
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |