#===============================================================================#Script: Limit Break 7#Author: Selchar#-------------------------------------------------------------------------------=beginThis is a rather basic implementation of the Limit Break system from FF7. Touse it, start with the settings below. You create a skill category much likethe default Skill/Magic, and place it's number in TYPE_ID. Then you createskills in said category and have your actors learn them. They don't need tohave the "Limit" category under features as the command will appear on it's ownwhen the conditions have been met(Full Limit Points). Any skills in the Limit category automatically reduce your Limit Points to 0 #-------------------------------------------------------------------------------# Actor/Class/Equip/State Notetag#-------------------------------------------------------------------------------<use_limit_break_7>Allows an actor to use your chosen Skill Type(Limit Command) when the conditionof full Limit Points is met. <lcr: x>Limit Point equivilant of tcr for TP. x is a Float Number, a positive numberwill increase the amount of Limit Points actions and damage give you. By defaultyou have 1.0, if you have a state that has <lcr: 1.0>, then it becomes 2.0,while -0.5 would turn it to 0.5 #-------------------------------------------------------------------------------# Skill/Item Notetag#-------------------------------------------------------------------------------<lmt gain: x>Limit Point equivilant of an item/skill's Tp Gain. x is a Float number, andby default for all skills is 0. =end#===============================================================================module Selchar module Limit_Break_7 #Allows you to change Max Limit Point value Max_Limit_Points = '100.0' #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 endend#===============================================================================#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 hasnot been detected, Exiting") Exitend module Selchar::ASCE Battle_ID << Selchar::Limit_Break_7::Type_IDend 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.lmt_p == @actor.max_lmt_p 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) endend#===============================================================================# Regex#===============================================================================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 endend#===============================================================================# Add new Limit Points: lmt_p that works like TP when it's preserved.#===============================================================================class Game_Battler < Game_BattlerBase #----------------------------------------------------------------------------- # Add instance variable and initialize #----------------------------------------------------------------------------- attr_reader :lmt_p alias :sel_lb7x_init :initialize def initialize sel_lb7x_init @lmt_p = 0.0 end def lmt_p=(lmt_p) @lmt_p = [[lmt_p, max_lmt_p].min, 0].max refresh end #----------------------------------------------------------------------------- # Limit Charge Rate similar to Tp Charge Rate #----------------------------------------------------------------------------- def lcr base = 1.0 feature_objects.each do |i| base += i.lcr end base = 0.0 if base < 0.0 return base end #----------------------------------------------------------------------------- # Max Limit Points #----------------------------------------------------------------------------- def max_lmt_p return eval(Selchar::Limit_Break_7::Max_Limit_Points) end #----------------------------------------------------------------------------- # Current/Max #----------------------------------------------------------------------------- def lmt_p_rate @lmt_p.to_f / self.max_lmt_p end #----------------------------------------------------------------------------- # Set Limit Points to Zero when a Limit skill is used #----------------------------------------------------------------------------- alias :sel_lb7x_psc

ay_skill_cost def pay_skill_cost(skill) sel_lb7x_psc(skill) self.lmt_p = 0.0 if skill.stype_id == Selchar::Limit_Break_7::Type_ID end #----------------------------------------------------------------------------- # Increase lmt_p on skill use #----------------------------------------------------------------------------- alias :sel_lb7x_iue :item_user_effect def item_user_effect(user, item) sel_lb7x_iue(user, item) user.lmt_p += item.lmt_gain * user.lcr end #----------------------------------------------------------------------------- # Increase lmt_p when hit #----------------------------------------------------------------------------- alias :sel_lb7x_ctpbd :charge_tp_by_damage def charge_tp_by_damage(damage_rate) sel_lb7x_ctpbd(damage_rate) self.lmt_p += (self.max_lmt_p/2) * damage_rate * lcr end #-----------------------------------------------------------------------------end#===============================================================================# Regex#===============================================================================class RPG::BaseItem def lcr @note =~ /<lcr:\s*(.*)\s*>/i ? @lcr = $1.to_f : @lcr = 0.0 if @lcr.nil? @lcr endendclass RPG::UsableItem def lmt_gain @note =~ /<lmt[-_ ]?gain:\s*(.*)\s*>/i ? @lmt_gain = $1.to_f : @lmt_gain = 0.0 if @lmt_gain.nil? @lmt_gain endend#===============================================================================# End of File#===============================================================================