Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ==============================================================================
- # Z30 : Gil Toss Zetu Engine X
- # ------------------------------------------------------------------------------
- # Gil Toss is a skill that sacrifices a set amount of currency to deal damage
- # based on the amount thrown.
- # ------------------------------------------------------------------------------
- # NOTE::This Script is parcially Evented. For instructions on setting up the
- # common event, goto http://www.rpgmakervx.net/index.php?showtopic=48238
- # ==============================================================================
- # =========================================================================
- # Syntax: <gil toss> #In Skill Note
- #==========================================================================
- module Z30
- REGEXP = /<gil toss>/i
- DAMAGE_FORMULA = 'gold**0.3'
- #gold = Gold Spent
- #actor = Using Actor
- COMMON_EVENT_ID = 1 #See Instructions Above
- end
- class RPG::Skill < RPG::UsableItem
- def z30?
- self.note.scan(Z30::REGEXP){
- return true}
- return false
- end
- end
- class Scene_Battle < Scene_Base
- alias z30_eas execute_action_skill unless $@
- def execute_action_skill
- start_gil_selection if @skill.z30?
- z30_eas
- end
- def start_gil_selection
- $game_troop.interpreter.setup($data_common_events[Z30::COMMON_EVENT_ID].list)
- gold = $gold
- actor = @active_battler
- p gold
- $z30 = eval(Z30::DAMAGE_FORMULA)
- end
- end
- class Game_Interpreter
- def force_common_event(common_event_id)
- common_event = $data_common_events[common_event_id]
- if common_event != nil
- @child_interpreter = Game_Interpreter.new(@depth + 1)
- @child_interpreter.setup(common_event.list, @event_id)
- end
- end
- end
- class Game_Battler
- alias z30_modv make_obj_damage_value unless $@
- def make_obj_damage_value(*params)
- obj.base_damage = $z30 if obj.z30? if @obj.is_a?(RPG::Skill)
- z30_modv(*params)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement