Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Z04 #Executable Actions Extention (EXACTExt)
- CMDS = [
- :attack,
- :exact,
- :skill,
- :guard,
- :skillid, 5,
- :item
- ]
- EXACTEXTSKILLS = {
- #ID OF SKILL => ID OF SWITCH TO DEACTIVATE SKILL (Set to 0 to always allow)
- 3 => 0,
- 4 => 0,
- 5 => 1
- }
- end
- class Window_ActorCommand < Window_Command
- attr_reader :skillsincmd
- def make_command_list
- return unless @actor
- index=0
- while index<Z04::CMDS.size
- case Z04::CMDS[index]
- when :attack; add_attack_command
- when :skill; add_skill_commands
- when :guard; add_guard_command
- when :item; add_item_command
- when :skillid; add_skill_command_by_id(Z04::CMDS[index+1])
- when :exact; add_noninclusive_skill_commands
- end
- index+=1
- end
- end
- def add_noninclusive_skill_commands
- for skill in @actor.skills
- add_skill_exact(skill) unless Z04::CMDS.include?(skill.id)
- end
- end
- def add_skill_command_by_id(id)
- add_skill_exact($data_skills[id])
- end
- def add_skill_exact(skill)
- return unless Z04::EXACTEXTSKILLS.key?(skill.id)
- return unless $game_switches[Z04::EXACTEXTSKILLS[skill.id]] unless 0==Z04::EXACTEXTSKILLS[skill.id]
- add_command(skill.name, :exactskill, @actor.skill_conditions_met?(skill), skill.id)
- print "Added Command: #{skill.name}\n"
- end
- end
- class Scene_Battle < Scene_Base
- def skill_exact
- print 1; print "\n"
- @skill = $data_skills[@actor_command_window.current_ext]
- print @actor_command_window.current_ext
- BattleManager.actor.input.set_skill(@skill.id)
- BattleManager.actor.last_skill.object = @skill
- if !@skill.need_selection?
- next_command
- elsif @skill.for_opponent?
- select_enemy_selection
- else
- select_actor_selection
- end
- end
- alias z04cacw create_actor_command_window unless $@
- def create_actor_command_window
- z04cacw
- @actor_command_window.set_handler(:exactskill, method(:skill_exact))
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement