Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #===============================================================================
- #Script: Limit Break 7
- #Author: Selchar
- #-------------------------------------------------------------------------------
- =begin
- This is a rather basic implementation of the Limit Break system from FF7. To
- use it, start with the settings below. You create a skill category much like
- the default Skill/Magic, and place it's number in TYPE_ID. Then you create
- skills in said category and have your actors learn them. They don't need to
- have the "Limit" category under features as the command will appear on it's own
- when the conditions have been met(Full TP gauge).
- Also of note, any skills placed in your "Limit" category will automatically have
- it's TP cost equal your current TP, or max TP since you need it at max to
- access the command.
- Finally, the Limit command will only appear to actors/classes who have the
- notetag <use_limit_break_7>, or are equipped with an item/state that has it.
- =end
- #===============================================================================
- module Selchar
- module Limit_Break_7
- #Allows you to change Max TP.
- Max_TP = 100
- #Use this to designate a skill category to be used for Limit Breaks.
- Type_ID = 3
- #Choose whether your "Limit" command will either replace, or appear above
- #the Attack command.
- Replace_Attack = false
- end
- end
- #===============================================================================
- #Don't edit below this line unless you know what you are doing.
- #===============================================================================
- $imported = {} if $imported.nil?
- $imported[:Limit_Break_7] = true
- unless $imported[:Selchar_ASCE]
- msgbox("'Selchar's Add Skill Command Exceptions has
- not been detected, Exiting")
- Exit
- end
- module Selchar::ASCE
- Battle_ID << Selchar::Limit_Break_7::Type_ID
- end
- class Window_ActorCommand < Window_Command
- #--------------------------------------------------------------------------
- # * Alias: Add Attack Command to List
- #--------------------------------------------------------------------------
- alias :sel_limit_break_7_add_attack_command :add_attack_command
- def add_attack_command
- if @actor.tp == @actor.max_tp
- limit_check = false
- @actor.feature_objects.each do |obj|
- limit_check = true if obj.use_limit_break_7
- end
- if limit_check
- add_limit_7_command
- return if Selchar::Limit_Break_7::Replace_Attack
- end
- end
- sel_limit_break_7_add_attack_command
- end
- #--------------------------------------------------------------------------
- # * New Method: Add Limit Command to List
- #--------------------------------------------------------------------------
- def add_limit_7_command
- name = $data_system.skill_types[Selchar::Limit_Break_7::Type_ID]
- add_command(name, :skill, true, Selchar::Limit_Break_7::Type_ID)
- end
- end
- class Game_BattlerBase
- def tp_rate
- @tp.to_f / max_tp
- end
- def max_tp
- return Selchar::Limit_Break_7::Max_TP
- end
- alias :sel_limit_break_7_tp_cost :skill_tp_cost
- def skill_tp_cost(skill)
- if skill.stype_id == Selchar::Limit_Break_7::Type_ID
- return @tp.to_i
- else
- sel_limit_break_7_tp_cost(skill)
- end
- end
- end
- class RPG::BaseItem
- def use_limit_break_7
- @note =~ /<use_limit_break_7>/i ? @use_limit_break_7 = true : @use_limit_break_7 = false if @limit_break_7.nil?
- @use_limit_break_7
- end
- end
RAW Paste Data