#--------------------------------------------------------------------------
# ● 显示战斗动画 [判別,ID,对象,反转,等待,二刀标志]
#--------------------------------------------------------------------------
def battle_anime
# 取消敌人的二刀标志动画处理
return if @active_action[5] && [email protected]?
# 不是二刀的角色,取消二刀标志动画处
return if @active_action[5] && @battler.weapons[1] == nil
# 如果二刀为右手(上面设置过)无武器
if @battler.actor?
return if !@active_action[5] && @battler.weapons[0] == nil && @battler.weapons[1] != nil
end
anime_id = @active_action[1]
mirror = @active_action[3]
# 偷袭时动画画像被反转
if $back_attack
mirror = true if @active_action[3] == false
mirror = false if @active_action[3]
end
# 武器和技能动画时
if anime_id < 0
# 用行动的种类分歧动画处
if @battler.action.skill? && anime_id == -1
anime_id = @battler.action.skill.animation_id
elsif @battler.action.item? && anime_id == -1
anime_id = @battler.action.item.animation_id
elsif @battler.actor?
weapon_id = @battler.weapon_id
anime_id = $data_weapons[weapon_id].animation_id if weapon_id != 0
# 二刀动画时
anime_id = @battler.atk_animation_id2 if @active_action[5]
else
weapon_id = @battler.weapon
anime_id = $data_weapons[weapon_id].animation_id if weapon_id != 0
anime_id = N01::NO_WEAPON
end
# 等待设定
@Wait = $data_animations[anime_id].frame_max * 4 if $data_animations[anime_id] != nil && @active_action[4]
waitflug = true
# 显示伤害动画时、为了先计算出伤害計
damage_action = [anime_id, mirror, true]
return @battler.play = ["对象动画",damage_action] if @battler.active
end
# 实行动画
if @active_action[2] == 0 && $data_animations[anime_id] != nil
@battler.animation_id = anime_id
@battler.animation_mirror = mirror
elsif $data_animations[anime_id] != nil
for target in @target_battler
target.animation_id = anime_id
target.animation_mirror = mirror
end
end
# 等待设定
@wait = $data_animations[anime_id].frame_max * 4 if $data_animations[anime_id] != nil && @active_action[4] && !waitflug
end
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |