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