本帖最后由 铅笔描绘的思念 于 2012-10-26 11:20 编辑
- #encoding:utf-8
- #==============================================================================
- # ■ Game_BattlerBase
- #------------------------------------------------------------------------------
- # 管理战斗者的类。主要含有能力值计算的方法。Game_Battler 类的父类。
- #==============================================================================
- $counter_attack_skill_id = 1
- class Game_BattlerBase
- #--------------------------------------------------------------------------
- # ● 获取反击攻击的技能 ID
- #--------------------------------------------------------------------------
- def counter_attack_skill_id
- return $counter_attack_skill_id
- end
- end
- #encoding:utf-8
- #==============================================================================
- # ■ Scene_Battle
- #------------------------------------------------------------------------------
- # 战斗画面
- #==============================================================================
- class Scene_Battle < Scene_Base
- #--------------------------------------------------------------------------
- # ● 发动反击
- #--------------------------------------------------------------------------
- def invoke_counter_attack(target, item)
- @log_window.display_counter(target, item)
- attack_skill = $data_skills[target.counter_attack_skill_id]
- @subject.item_apply(target, attack_skill)
-
- @log_window.display_use_item(target, attack_skill)
-
- refresh_status
- @log_window.display_action_results(@subject, attack_skill)
- end
- end
复制代码 事件脚本里+ $counter_attack_skill_id = x 反击时使用x号技能。。
升级版。。。。。。。
#encoding:utf-8 #============================================================================== # ■ Game_BattlerBase #------------------------------------------------------------------------------ # 管理战斗者的类。主要含有能力值计算的方法。Game_Battler 类的父类。 #============================================================================== class Game_BattlerBase attr_accessor :counter_attack_skill_id alias old_initialize initialize #-------------------------------------------------------------------------- # ● 初始化对象 #-------------------------------------------------------------------------- def initialize old_initialize @counter_attack_skill_id = 1 end end #encoding:utf-8 #============================================================================== # ■ Scene_Battle #------------------------------------------------------------------------------ # 战斗画面 #============================================================================== class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # ● 发动反击 #-------------------------------------------------------------------------- def invoke_counter_attack(target, item) @log_window.display_counter(target, item) attack_skill = $data_skills[target.counter_attack_skill_id] @subject.item_apply(target, attack_skill) @log_window.display_use_item(target, attack_skill) refresh_status @log_window.display_action_results(@subject, attack_skill) end end
#encoding:utf-8
#==============================================================================
# ■ Game_BattlerBase
#------------------------------------------------------------------------------
# 管理战斗者的类。主要含有能力值计算的方法。Game_Battler 类的父类。
#==============================================================================
class Game_BattlerBase
attr_accessor :counter_attack_skill_id
alias old_initialize initialize
#--------------------------------------------------------------------------
# ● 初始化对象
#--------------------------------------------------------------------------
def initialize
old_initialize
@counter_attack_skill_id = 1
end
end
#encoding:utf-8
#==============================================================================
# ■ Scene_Battle
#------------------------------------------------------------------------------
# 战斗画面
#==============================================================================
class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# ● 发动反击
#--------------------------------------------------------------------------
def invoke_counter_attack(target, item)
@log_window.display_counter(target, item)
attack_skill = $data_skills[target.counter_attack_skill_id]
@subject.item_apply(target, attack_skill)
@log_window.display_use_item(target, attack_skill)
refresh_status
@log_window.display_action_results(@subject, attack_skill)
end
end
@kittyblain插Main前 事件应该是做不到。。。 |