本帖最后由 howhow1314 于 2016-4-5 11:43 编辑
module Pyjiaoyi Pigu = 1 #拳師職業id Bangbang = [11,12,13] #拳,腳,沖撞技能id end class Game_Action alias pyjiaoyi05042016_set_attack set_attack def set_attack return set_skill(Pyjiaoyi::Bangbang.sample) if subject.class == $data_classes[Pyjiaoyi::Pigu] pyjiaoyi05042016_set_attack end alias pyjiaoyi05042016_attack? attack? def attack? return Pyjiaoyi::Bangbang.map {|id| $data_skills[id]}.include?(item) if subject.class == $data_classes[Pyjiaoyi::Pigu] pyjiaoyi05042016_attack? end end class Scene_Battle def invoke_counter_attack(target, item) @log_window.display_counter(target, item) attack_skill = $data_skills[target.attack_skill_id] attack_skill = $data_skills[Pyjiaoyi::Bangbang.sample] if target.class == $data_classes[Pyjiaoyi::Pigu] @subject.item_apply(target, attack_skill) refresh_status @log_window.display_action_results(@subject, attack_skill) end end
module Pyjiaoyi
Pigu = 1 #拳師職業id
Bangbang = [11,12,13] #拳,腳,沖撞技能id
end
class Game_Action
alias pyjiaoyi05042016_set_attack set_attack
def set_attack
return set_skill(Pyjiaoyi::Bangbang.sample) if subject.class == $data_classes[Pyjiaoyi::Pigu]
pyjiaoyi05042016_set_attack
end
alias pyjiaoyi05042016_attack? attack?
def attack?
return Pyjiaoyi::Bangbang.map {|id| $data_skills[id]}.include?(item) if subject.class == $data_classes[Pyjiaoyi::Pigu]
pyjiaoyi05042016_attack?
end
end
class Scene_Battle
def invoke_counter_attack(target, item)
@log_window.display_counter(target, item)
attack_skill = $data_skills[target.attack_skill_id]
attack_skill = $data_skills[Pyjiaoyi::Bangbang.sample] if target.class == $data_classes[Pyjiaoyi::Pigu]
@subject.item_apply(target, attack_skill)
refresh_status
@log_window.display_action_results(@subject, attack_skill)
end
end
話說Game_Battler的attack_apply那邊也跟普通攻擊有關而我沒動到…因為全局搜索根本沒有用到attack_apply的地方…有誰知道是幹嘛用的
|