Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ╔══════════════════════════════════════════════════════╤═══════╤════════════╗
- # ║ Spellspring Add-On for YF Skill Cost Manager │ v1.00 │ (11/22/14) ║
- # ╠══════════════════════════════════════════════════════╧═══════╧════════════╣
- # ║ Author : William Couillard ║
- # ║ Thanks : TheoAllen ║
- # ║ E-Mail : cooliebk18@yahoo.com ║
- # ║ Website : http://ffdiscovery.wikia.com ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ ABOUT ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ This script allows the user to set a state to enable Spellspring on that ║
- # ║ Actor. Spellspring reduces any skill cost for skills that cost MP ║
- # ║ to a value you set (commonly, 1), regardless of MCR. Players of Final ║
- # ║ Fantasy VI will recognize this as the effect of the Economizer/Celestriad ║
- # ║ Relic. Skills costing 0 MP are unaffected. ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ TERMS OF USE ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ ► Do not edit the script's header or comments. ║
- # ║ ► Free to use in commercial projects as long as proper credit is given to ║
- # ║ ALL the names in the above header. ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ CHANGE LOG ║
- # ╠═════════════════════════════════════════════════════════════════╤═════════╣
- # ║ ■ November 22, 2014 : Initial release. │ (v1.00) ║
- # ╠═════════════════════════════════════════════════════════════════╧═════════╣
- # ║ ALIASED METHODS ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ This script aliases one method in Yanfly's Skill Cost Manager script. ║
- # ╟───────────────────────────────────────────────────────────────────────────╢
- # ║ ■ class Game_BattlerBase ║
- # ║ ► def skill_mp_cost ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ INSTRUCTIONS ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ Paste this script directly UNDERNEATH Yanfly's Skill Cost Manager 1.03. ║
- # ╠═══════════════════════════════════════════════════════════════════════════╣
- # ║ IMPORT SETTING ║
- # ╚═══════════════════════════════════════════════════════════════════════════╝
- $imported = {} if $imported.nil? # Do not edit
- $imported["WC_Spellspring_YEA"] = true # Do not edit
- # ╔═══════════════════════════════════════════════════════════════════════════╗
- # ║ CUSTOMIZATION MODULE ║
- # ╚═══════════════════════════════════════════════════════════════════════════╝
- module COOLIE
- module SPELLSPRING
- # ╔═════════════════════════════════════════════════════════════════════════╗
- # ║ SPELLSPRING SETTINGS ║
- # ╚═════════════════════════════════════════════════════════════════════════╝
- SPELLSPRING_STATE = 86 # ID of the state that enables Spellspring
- SPELLSPRING_COST = 1 # The MP cost of all skills when Spellspring is
- # enabled (only applies to skills costing MP)
- end # SPELLSPRING
- end # COOLIE
- class Game_BattlerBase
- #--------------------------------------------------------------------------
- # alias method: skill_mp_cost
- #--------------------------------------------------------------------------
- alias coolie_spellspring_skill_mp_cost skill_mp_cost
- def skill_mp_cost(skill)
- coolie_spellspring_skill_mp_cost(skill)
- actor = $game_actors[id] if !enemy?
- n = 0
- n = coolie_spellspring_skill_mp_cost(skill)
- if n >= 1 && !enemy? && actor.state?(COOLIE::SPELLSPRING::SPELLSPRING_STATE)
- n = COOLIE::SPELLSPRING::SPELLSPRING_COST
- else
- n += skill.mp_cost_percent * mmp * mcr
- n = [n.to_i, skill.mp_cost_max].min unless skill.mp_cost_max.nil?
- n = [n.to_i, skill.mp_cost_min].max unless skill.mp_cost_min.nil?
- end # if...
- return n.to_i
- end # skill_mp_cost
- end # Game_BattlerBase
- # ╔═══════════════════════════════════════════════════════════════════════════╗
- # ║ END OF SCRIPT ║
- # ╚═══════════════════════════════════════════════════════════════════════════╝
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement