Project1
标题:
如何在战斗中显示攻击的帮助
[打印本页]
作者:
美丽晨露
时间:
2012-12-23 13:31
标题:
如何在战斗中显示攻击的帮助
本帖最后由 美丽晨露 于 2012-12-23 21:05 编辑
就是角色敌人发动攻击时
会在上方弹出帮助框
“使用者发动攻击”的帮助
像使用特技一样的那个帮助
作者:
Wind2010
时间:
2012-12-23 17:43
class Scene_Battle
def make_basic_action_result
if @active_battler.current_action.basic == 0
@animation1_id = @active_battler.animation1_id
@animation2_id = @active_battler.animation2_id
if @active_battler.is_a?(Game_Enemy)
if @active_battler.restriction == 3
target = $game_troop.random_target_enemy
elsif @active_battler.restriction == 2
target = $game_party.random_target_actor
else
index = @active_battler.current_action.target_index
target = $game_party.smooth_target_actor(index)
end
end
if @active_battler.is_a?(Game_Actor)
if @active_battler.restriction == 3
target = $game_party.random_target_actor
elsif @active_battler.restriction == 2
target = $game_troop.random_target_enemy
else
index = @active_battler.current_action.target_index
target = $game_troop.smooth_target_enemy(index)
end
end
@help_window.set_text(@active_battler.name + "发动攻击", 1) #只加了这句
@target_battlers = [target]
for target in @target_battlers
target.attack_effect(@active_battler)
end
return
end
if @active_battler.current_action.basic == 1
@help_window.set_text($data_system.words.guard, 1)
return
end
if @active_battler.is_a?(Game_Enemy) and
@active_battler.current_action.basic == 2
@help_window.set_text("逃跑", 1)
@active_battler.escape
return
end
if @active_battler.current_action.basic == 3
$game_temp.forcing_battler = nil
@phase4_step = 1
return
end
end
end
复制代码
作者:
美丽晨露
时间:
2012-12-23 21:04
Wind2010 发表于 2012-12-23 17:43
非常感谢啊
我已经琢磨了很久了
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1