Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- =begin #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-# begin=
- #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
- Final Fantasy VI Colosseum
- Author of script to Credit: FenixFyreX
- Special Thanks and some credits go to:
- IceDragon
- Without him, this script might not have been created.
- He helped with the regular expressions, and threw the idea of the wondrous $
- at me. He also provided the knowledge of how to put a single enemy into a fake
- troop to battle.
- So, if you use this script, credit me (FenixFyreX) and IceDragon.
- Also, crediting Nintendo for Final Fantasy VI wouldn't be a bad idea either.
- TO USE THIS SCRIPT:
- Call the script by using
- call_colosseum
- with the Advanced...Script command.
- To create a Colosseum Item.
- You put <COLOSSEUM> in its notebox followed by <TROOP_MON enemy_id> where
- enemy_id is the id of the monster you wish to fight.
- <COLOSSEUM>
- <TROOP_MON enemy_id>
- #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
- =end #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-# end=
- module COLOSSEUM
- #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
- # TECHNICAL SETUP
- #
- # This is the main config for the colosseum script.
- #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
- module TECHNIKALZ
- # This is the title of the scene when you open the scene in-game.
- NAME_OF_SCENE = "Colosseum"
- # These define what the confirm box shows when you are confirming your
- # item selection in the Colosseum.
- CONFIRM_CHOICE_1 = "Yes"
- CONFIRM_CHOICE_2 = "No"
- # What the message you wish to read at the end of the battle. The first
- # %s is the name of the actor battling. the second %s is the item you
- # recieved.
- GET_ITEM_MSG = "For winning, %s's party recieved %s."
- # What the help window reads in Scene_Colosseum when the item you select
- # cannot be wagered.
- BUZZER_MSG = "Can't wager that item."
- # Defines what the help window reads as you choose which actor to fight
- # in the colosseum. This is only if ONE_ON_ONE is true.
- CHOOSE_ACTOR_TEXT = "Choose Your Actor"
- # This is what the help window reads as you confirm the item you wish to
- # wager.
- CONFIRM_MESSAGE = "Are you sure?"
- # This is what shows in the item window when selecting your actor.
- WHAT_TO_GET_TXT = "You will get one " #make sure there is a space at the e
- nd.
- # This is what shows in the item window when the selected actor is dead.
- DEAD_ACTOR_MSG = "That character is dead!"
- # This defines the message in a colosseum battle when an enemy tries to
- # escape. %s is the enemy's name.
- NO_ESCAPE_MSG = "%s tried to escape!"
- # This is the message when you have no items in your party. This
- # sentence can only have one period in it o.0
- NO_ITEMS_o_0 = "Come back when you have an item."
- # Do you want the player to lose the selected item, as in a fee for
- # participating in-game?
- LOSE_ORIG_ITEM = true
- # What battle system are you using? As of right now, this only includes
- # the default battle system and tankentai, but melody should be supported
- # soon.
- BATTLE_SYSTEM = "default" # Must be "default", "tankentai", or "melody"
- # Do you wish to have your actor auto-battle? If so, set this to true.
- AUTO_BATTLE = true
- # Do you wish to have one-on-one battles in the colosseum? This means that
- # the player would select one party member to battle in the colosseum.
- ONE_ON_ONE = false
- # Which direction should the character face in the actor selection window?
- CHAR_DIRECTION = 0
- # Which direction should the character face in the area below the colosseum
- # windows?
- CHAR_POSE = 1
- # Should the player gain experience and gold at the end of the colosseum
- # battle?
- GAIN_EXP_AND_GOLD = false
- # Do you want the actor participating in the colosseum to have their HP, MP,
- # and states restored / restored / removed before the battle?
- B4_HP_FULL = true
- # Do you want the actor participating in the colosseum to have their HP, MP,
- # and states restored / restored / removed after the battle?
- RESTORE_HEALTH = true
- # This is the message the player gets when all of the members of the party
- # are dead, and the colosseum is called.
- CANT_CALL_SCNE = "None of you are fit to battle."
- # This defines whether you want large battlers to be shrank by half when
- # a colosseum battle ensues.
- SHRINK_L_BAT = true
- # This 'lil option defines whether you want to up the FPS when in a
- # colosseum battle. Trust me, these battles get a bit draggy, unless
- # you don't use AUTO_BATTLE.
- USE_FPS_CHANGE = true
- FPS_CHANGE_SPD = 100
- end # module TECHNIKALZ
- #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
- # REGULAR EXPRESSIONS SETUP
- #
- # You prpbably shouldn't touch this if you don't know what you are doing.
- #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
- module REGEXP
- # These define what to look for in the note tag of each item.
- COLOSSEUM_USE = /<(?:COLOSSEUM)>/i # Item can be used for Colosseum?
- TROOP_MON = /<(?:TROOP_MONtroop mon)[ ]*(\d+)>/i # Monster to add to troop
- ITEM_TYPE = /<(?:ITEM_TYPEitem type)[ ]*(\w+)>/i # Item to get's type
- ITEM_GET = /<(?:ITEM_GETitem get)[ ]*(\d+)>/i # Item to get
- end
- end
- ################################################################################
- # ##############################################################################
- # #
- # # END CONFIGURATION
- # #
- # # PLEASE DO NOT TOUCH BELOW
- # #
- # ##############################################################################
- ################################################################################
- $colosseum_battle = false
- $colosseum_item = nil
- $colosseum_troop_monster_id = nil
- $colosseum_item_get_type = nil
- $colosseum_item_get = nil
- $imported = {} if $imported == nil
- $imported["FxFyXColosseum"] = true
- class Scene_Base
- include COLOSSEUM
- end
- class Window_Base
- include COLOSSEUM
- end
- class Game_Troop < Game_Unit
- include COLOSSEUM
- end
- ################################################################################
- # ##############################################################################
- # #
- # # END BEGINNING
- # #
- # # SCRIPT STARTS BELOW
- # #
- # ##############################################################################
- ################################################################################
- class Scene_Colosseum < Scene_Base
- #--------------------------------------------------------------------------
- # * Start processing
- #--------------------------------------------------------------------------
- def start
- super
- @viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
- @help_window = Window_Help.new
- @help_window.viewport = @viewport
- @help_window.y = 56
- @name_window = Window_Help.new
- @name_window.viewport = @viewport
- @name_window.set_text(TECHNIKALZ::NAME_OF_SCENE, 1)
- @item_window = Window_Item.new(0, 112, Graphics.width, Graphics.height - 112
- )
- @item_window.viewport = @viewport
- @item_window.help_window = @help_window
- @item_window.active = true
- @actor_window = Window_SelectActor.new(0, (@help_window.x + (@help_window.he
- ight * 2)))
- @actor_window.viewport = @viewport
- @actor_window.visible = false
- @actor_window.active = false
- @help_window2 = Window_Help.new
- @help_window2.viewport = @viewport
- @help_window2.width = Graphics.width - @actor_window.width
- @help_window2.height = @actor_window.height
- @help_window2.x = @actor_window.width
- @help_window2.y = @actor_window.y
- @help_window2.visible = false
- @bkgd_window = Window_ColosseumPic.new(-11, -11)
- @bkgd_window.viewport = @viewport
- @bkgd_window.visible = false
- @bkgd_window.active = false
- create_command_window
- end
- #--------------------------------------------------------------------------
- # * Create Confirm Window
- #--------------------------------------------------------------------------
- def create_command_window
- s1 = TECHNIKALZ::CONFIRM_CHOICE_1
- s2 = TECHNIKALZ::CONFIRM_CHOICE_2
- @command_window = Window_Command.new(128, [s1, s2])
- @command_window.openness = 0
- @command_window.active = false
- @command_window.x = (Graphics.width / 2) - (@command_window.width / 2)
- @command_window.y = (Graphics.height / 2) - (@command_window.height / 2)
- end
- #--------------------------------------------------------------------------
- # * Termination Processing
- #--------------------------------------------------------------------------
- def terminate
- super
- @viewport.dispose
- @help_window.dispose
- @help_window2.dispose
- @name_window.dispose
- @item_window.dispose
- @actor_window.dispose
- @bkgd_window.dispose
- @command_window.dispose
- end
- #--------------------------------------------------------------------------
- # * Return to Original Screen
- #--------------------------------------------------------------------------
- def return_scene
- $scene = Scene_Map.new
- end
- #--------------------------------------------------------------------------
- # * Update Frame
- #--------------------------------------------------------------------------
- def update
- super
- @help_window.update
- if not @actor_window.active
- @item_window.update
- end
- @command_window.update
- @actor_window.update
- if @item_window.active
- update_item_selection
- elsif @command_window.active
- update_command_selection
- elsif @actor_window.active
- update_actor_selection
- end
- end
- #--------------------------------------------------------------------------
- # * Update Item Selection
- #--------------------------------------------------------------------------
- def update_item_selection
- if Input.trigger?(Input::B)
- Sound.play_cancel
- return_scene
- elsif Input.trigger?(Input::C)
- @item = $game_temp.lose_item = @item_window.item
- $game_temp.item_type = @item.col_i_type
- if @item != nil and @item.colosseum_use?
- $game_temp.colosseum_item_id = @item.id
- $colosseum_item_get_type = @item.colosseum_item_get_type
- $colosseum_item_get = @item.colosseum_item_get
- Sound.play_decision
- open_command_window
- else
- @name_window.set_text(TECHNIKALZ::BUZZER_MSG, 1)
- Sound.play_buzzer
- Graphics.wait(40)
- @name_window.set_text(TECHNIKALZ::NAME_OF_SCENE, 1)
- end
- end
- end
- #--------------------------------------------------------------------------
- # * Update Yes/No Selection
- #--------------------------------------------------------------------------
- def update_command_selection
- @command_window.update
- if Input.trigger?(Input::UP)
- Sound.play_cursor
- if @command_window.index == 1
- @command_window.index = 0
- elsif @command_window.index == 0
- @command_window.index = 1
- end
- elsif Input.trigger?(Input::DOWN)
- Sound.play_cursor
- if @command_window.index == 0
- @command_window.index = 1
- elsif @command_window.index == 1
- @command_window.index = 0
- end
- elsif Input.trigger?(Input::B)
- Sound.play_cancel
- hide_command_window
- elsif Input.trigger?(Input::C)
- case @command_window.index
- when 0
- Sound.play_decision
- setup_col_item
- setup_actor_selection
- when 1
- Sound.play_cancel
- hide_command_window
- end
- end
- end
- def setup_col_item
- case $game_temp.item_type
- when 0
- $colosseum_item = $data_items[$game_temp.colosseum_item_id]
- when 1
- $colosseum_item = $data_weapons[$game_temp.colosseum_item_id]
- when 2
- $colosseum_item = $data_armors[$game_temp.colosseum_item_id]
- end
- end
- def update_actor_selection
- if Input.trigger?(Input::B)
- Sound.play_cancel
- $game_system.clear_colosseum
- return_scene
- end
- if Input.trigger?(Input::C)
- if TECHNIKALZ::ONE_ON_ONE
- if $game_party.members[@actor_window.index].dead?
- Sound.play_buzzer
- @help_window.set_text(TECHNIKALZ::DEAD_ACTOR_MSG, 1)
- Graphics.wait(35)
- @help_window.set_text(TECHNIKALZ::CHOOSE_ACTOR_TEXT, 1)
- else
- Sound.play_decision
- call_battle
- end
- else
- Sound.play_decision
- call_battle
- end
- end
- if TECHNIKALZ::ONE_ON_ONE
- if Input.repeat?(Input::RIGHT)
- @bkgd_window.update
- Sound.play_cursor
- if @actor_window.index != $game_party.members.size - 1
- @actor_window.index += 1
- $game_temp.colosseum_actor_index += 1
- else
- @actor_window.index = 0
- $game_temp.colosseum_actor_index = 0
- end
- end
- if Input.repeat?(Input::LEFT)
- Sound.play_cursor
- @bkgd_window.update
- if @actor_window.index != 0
- @actor_window.index -= 1
- $game_temp.colosseum_actor_index -= 1
- else
- @actor_window.index = $game_party.members.size - 1
- $game_temp.colosseum_actor_index = $game_party.members.size - 1
- end
- end
- end
- end
- #--------------------------------------------------------------------------
- # * Open Command Window
- #--------------------------------------------------------------------------
- def open_command_window
- @item_window.active = false
- @command_window.open
- @command_window.active = true
- @help_window.set_text(TECHNIKALZ::CONFIRM_MESSAGE, 1)
- end
- #--------------------------------------------------------------------------
- # * Hide Command Window
- #--------------------------------------------------------------------------
- def hide_command_window
- @command_window.close
- @item_window.active = true
- @command_window.active = false
- @command_window.update
- end
- #--------------------------------------------------------------------------
- # * Setup Actor Selection
- #--------------------------------------------------------------------------
- def setup_actor_selection
- Graphics.fadeout(10)
- @item_window.active = false
- @item_window.openness = 0
- @command_window.active = false
- @command_window.openness = 0
- @help_window.set_text(TECHNIKALZ::CHOOSE_ACTOR_TEXT, 1)
- @actor_window.active = true
- @actor_window.index = 0
- $game_temp.colosseum_actor_index = @actor_window.index
- @bkgd_window.visible = true
- @bkgd_window.update
- @help_window2.visible = true
- set_help_window2_text
- @actor_window.visible = true
- Graphics.fadein(10)
- end
- #--------------------------------------------------------------------------
- # * Setup Actor Selection
- #--------------------------------------------------------------------------
- def set_help_window2_text
- if $colosseum_item_get_type == "item" # change
- item = $data_items[$colosseum_item_get].name.to_s
- @help_window2.set_text(TECHNIKALZ::WHAT_TO_GET_TXT + item + ".", 1)
- elsif $colosseum_item_get_type == "weapon"
- item = $data_weapons[$colosseum_item_get].name.to_s
- @help_window2.set_text(TECHNIKALZ::WHAT_TO_GET_TXT + item + ".", 1)
- elsif $colosseum_item_get_type == "armor"
- item = $data_armors[$colosseum_item_get].name.to_s
- @help_window2.set_text(TECHNIKALZ::WHAT_TO_GET_TXT + item + ".", 1)
- end
- end
- #--------------------------------------------------------------------------
- # * Call Colosseum Battle
- #--------------------------------------------------------------------------
- def call_battle
- if TECHNIKALZ::LOSE_ORIG_ITEM then $game_party.lose_item(@item, 1) end
- $colosseum_battle = true
- if $colosseum_battle == true and $colosseum_item != nil
- if TECHNIKALZ::AUTO_BATTLE
- if TECHNIKALZ::ONE_ON_ONE
- $game_temp.orig_auto_battle = $data_actors[$game_party.members[@actor_
- window.index].id].auto_battle
- kept_member = $game_party.members[@actor_window.index].id
- $game_temp.kept_member = kept_member
- $data_actors[kept_member].auto_battle = true
- memberz = $game_party.members
- $game_temp.old_party = []
- for actor in memberz
- $game_temp.old_party.push actor.id
- end
- old_party = $game_temp.old_party
- $game_party.remove_actor(old_party[0]) unless old_party.size < 1
- $game_party.remove_actor(old_party[1]) unless old_party.size < 2
- $game_party.remove_actor(old_party[2]) unless old_party.size < 3
- $game_party.remove_actor(old_party[3]) unless old_party.size < 4
- $game_party.add_actor(kept_member)
- else
- for actor in $game_party.members
- actor_auto = $data_actors[actor.id].auto_battle
- $game_temp.orig_auto_battle = []
- $game_temp.orig_auto_battle.push actor_auto
- $data_actors[actor.id].auto_battle = true
- end
- end
- end
- if TECHNIKALZ::B4_HP_FULL
- for member in $game_party.members
- member.recover_all
- end
- end
- $game_troop.setup_colosseum_troop($colosseum_item)
- $game_troop.can_escape = false
- $game_troop.can_lose = true
- $game_temp.map_bgm = RPG::BGM.last
- $game_temp.map_bgs = RPG::BGS.last
- RPG::BGM.stop
- RPG::BGS.stop
- Sound.play_battle_start
- $game_system.battle_bgm.play
- $game_temp.next_scene = nil
- $game_temp.battle_proc = nil
- $scene = Scene_Battle.new
- if TECHNIKALZ::USE_FPS_CHANGE
- Graphics.frame_rate = TECHNIKALZ::FPS_CHANGE_SPD
- end
- end
- end
- end
- class Window_SelectActor < Window_Selectable
- #--------------------------------------------------------------------------
- # * Object Initialization
- # x : window X coordinate
- # y : window Y coordinate
- #--------------------------------------------------------------------------
- def initialize(x, y)
- super(x, y, 224, 72)
- refresh
- self.active = false
- self.index = -1
- end
- #--------------------------------------------------------------------------
- # * Refresh
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- if TECHNIKALZ::ONE_ON_ONE
- @index = $game_party.members.size
- for actor in $game_party.members
- if not actor.dead?
- draw_actor_graphic(actor, (actor.index * 48) + 24, 34, dir = TECHNIKAL
- Z::CHAR_DIRECTION)
- else
- draw_actor_graphic(actor, (actor.index * 48) + 24, 34, dir = 4)
- end
- end
- else
- @index = 0
- for actor in $game_party.members
- if not actor.dead?
- draw_actor_graphic(actor, (actor.index * 48) + 24, 34, dir = TECHNIKAL
- Z::CHAR_DIRECTION)
- else
- draw_actor_graphic(actor, (actor.index * 48) + 24, 34, dir = 4)
- end
- end
- end
- end
- #--------------------------------------------------------------------------
- # * Update cursor
- #--------------------------------------------------------------------------
- if not COLOSSEUM::TECHNIKALZ::ONE_ON_ONE
- def update_cursor
- if @index < 0 and TECHNIKALZ::ONE_ON_ONE # No cursor
- self.cursor_rect.empty
- elsif @index < @item_max
- if TECHNIKALZ::ONE_ON_ONE
- self.cursor_rect.set(@index * 48, -4, 48, 48)
- else
- self.cursor_rect.set(-4, -4, 200, 48)
- end
- elsif @index >= 100 and TECHNIKALZ::ONE_ON_ONE # Self
- self.cursor_rect.set(@index * 48, -4, 48, 48)
- else # All
- self.cursor_rect.set(-4, -4, 200, 48)
- end
- end
- else
- def update_cursor
- if @index < 0 # No cursor
- self.cursor_rect.empty
- elsif @index < @item_max # Normal
- self.cursor_rect.set(@index * 48, -4, 48, 48)
- elsif @index >= 100 # Self
- self.cursor_rect.set(@index * 48, -4, 48, 48)
- else # All
- self.cursor_rect.set(@index * 48, -4, 48, 48)
- end
- end
- end
- end
- class Window_ColosseumPic < Window_Selectable
- #--------------------------------------------------------------------------
- # * Object Initialization
- # x : window X coordinate
- # y : window Y coordinate
- #--------------------------------------------------------------------------
- def initialize(x, y)
- super(x, y, Graphics.width + 128, Graphics.height + 128)
- self.active = false
- self.index = -1
- self.opacity = 0
- self.z = -1
- draw_picture
- refresh_stuffz
- end
- #--------------------------------------------------------------------------
- # * Draw Picture
- #--------------------------------------------------------------------------
- def draw_picture
- bitmap = Cache.picture("Colosseum_Bkgd")
- rect = Rect.new(0, 0, 0, 0)
- rect.x = 0
- rect.y = 0
- rect.width = Graphics.width + 64
- rect.height = Graphics.height + 64
- self.contents.blt(x, y, bitmap, rect)
- bitmap.dispose
- end
- #--------------------------------------------------------------------------
- # * Draw Actor Details
- #--------------------------------------------------------------------------
- def draw_actor_details
- x = 390
- y = 362
- if TECHNIKALZ::ONE_ON_ONE
- return unless $game_temp.colosseum_actor_index != nil
- actor = $data_actors[$game_party.members[$game_temp.colosseum_actor_index]
- .id]
- if $game_party.members[$game_temp.colosseum_actor_index].dead?
- text = sprintf("%s Can't Battle!", actor.name)
- cx = contents.text_size(text).width
- self.contents.draw_text(x - (cx / 2), y - 10, cx, WLH + 20, text, 1)
- end
- if !$game_party.members[$game_temp.colosseum_actor_index].dead?
- draw_actor_graphic(actor, x, y, dir = TECHNIKALZ::CHAR_POSE)
- else
- draw_actor_graphic(actor, x, y, dir = 3)
- end
- else
- for actor in $game_party.members
- cy = y - (actor.index * 40) - 10
- if actor.dead?
- text = sprintf("%s Can't Battle!", actor.name)
- cx = contents.text_size(text).width
- dx = x + 26
- draw_actor_graphic(actor, x, cy + 10, dir = 2)
- self.contents.draw_text(dx, cy - 10, cx, WLH + 20, text, 1)
- else
- draw_actor_graphic(actor, x, cy + 10, dir = TECHNIKALZ::CHAR_POSE)
- end
- end
- end
- end
- def draw_monster_details
- for monster in $colosseum_item.colosseum_troop
- i = $data_enemies[monster]
- bitmap = Cache.battler(i.battler_name, i.battler_hue)
- rect = Rect.new(0, 0, 0, 0)
- rect.x = -100
- rect.y = -300
- rect.width = Graphics.width
- rect.height = Graphics.height
- self.contents.blt(x, y, bitmap, rect)
- bitmap.dispose
- text = i.name.to_s
- cx = contents.text_size(text).width
- self.contents.draw_text(-(rect.x), -(rect.y) - 50, cx, WLH + 20, text, 1)
- end
- end
- alias updt update unless $@
- def update
- refresh_stuffz
- updt
- end
- #--------------------------------------------------------------------------
- # * Refresh
- #--------------------------------------------------------------------------
- def refresh_stuffz
- self.contents.clear
- draw_picture
- if $colosseum_item != nil
- draw_monster_details
- end
- draw_actor_details
- end
- end
- class Window_Item
- def enable?(item)
- if $scene.is_a?(Scene_Colosseum)
- return item.colosseum_use?
- else
- return $game_party.item_can_use?(item)
- end
- end
- end
- class Game_Temp
- attr_accessor :colosseum_item_id
- attr_accessor :colosseum_actor_index
- attr_accessor :orig_auto_battle
- attr_accessor :old_party
- attr_accessor :kept_member
- attr_accessor :item_type
- attr_accessor :lose_item
- alias colosseum_scene_init initialize unless $@
- def initialize
- colosseum_scene_init
- @colosseum_item_id = nil
- @colosseum_actor_index = nil
- @orig_auto_battle = nil
- @old_party = nil
- @kept_member = nil
- @item_type = nil
- @lose_item = nil
- end
- end
- class Game_Enemy
- def escape
- if !$colosseum_battle
- @hidden = true
- @action.clear
- end
- end
- end
- class Scene_Battle < Scene_Base
- alias no_exc_act_escape execute_action_escape unless $@
- def execute_action_escape
- if not $colosseum_battle
- no_exc_act_escape
- else
- text = sprintf(TECHNIKALZ::NO_ESCAPE_MSG, @active_battler.name)
- @message_window.add_instant_text(text)
- Sound.play_miss
- wait(45)
- end
- end
- alias colosseum_process_victory process_victory unless $@
- def process_victory
- if $colosseum_battle == true
- @info_viewport.visible = false
- @message_window.visible = true
- RPG::BGM.stop
- $game_system.battle_end_me.play
- display_colosseum_drop_items
- if TECHNIKALZ::GAIN_EXP_AND_GOLD
- display_exp_and_gold
- display_level_up
- end
- unless $BTEST
- $game_temp.map_bgm.play
- $game_temp.map_bgs.play
- end
- battle_end(0)
- else
- colosseum_process_victory
- end
- end
- if not TECHNIKALZ::LOSE_ORIG_ITEM
- alias colosseum_procs_dft process_defeat unless $@
- def process_defeat
- $game_party.lose_item($game_temp.lose_item, 1)
- colosseum_procs_dft
- end
- end
- def display_colosseum_drop_items
- if $colosseum_item_get != nil or $colosseum_item_get_type != nil
- party = $game_party.name
- if $colosseum_item_get_type == "item"
- item = $data_items[$colosseum_item_get]
- $game_party.gain_item(item, 1)
- text = sprintf(TECHNIKALZ::GET_ITEM_MSG, party, item.name)
- $game_message.texts.push(text)
- elsif $colosseum_item_get_type == "weapon"
- item = $data_weapons[$colosseum_item_get]
- $game_party.gain_item(item, 1)
- text = sprintf(TECHNIKALZ::GET_ITEM_MSG, party, item.name)
- $game_message.texts.push(text)
- elsif $colosseum_item_get_type == "armor"
- item = $data_armors[$colosseum_item_get]
- $game_party.gain_item(item, 1)
- text = sprintf(TECHNIKALZ::GET_ITEM_MSG, party, item.name)
- $game_message.texts.push(text)
- end
- wait_for_message
- end
- end
- alias colosseum_battle_end battle_end unless $@
- def battle_end(*args)
- colosseum_battle_end(*args)
- if $colosseum_battle
- if TECHNIKALZ::AUTO_BATTLE
- if TECHNIKALZ::ONE_ON_ONE
- if TECHNIKALZ::RESTORE_HEALTH
- $game_party.members[0].recover_all
- end
- kept_member = $game_temp.kept_member
- $data_actors[$game_temp.kept_member].auto_battle = $game_temp.orig_aut
- o_battle
- $game_party.remove_actor(kept_member)
- $game_party.add_actor($game_temp.old_party[0]) unless $game_temp.old_p
- arty.size < 1
- $game_party.add_actor($game_temp.old_party[1]) unless $game_temp.old_p
- arty.size < 2
- $game_party.add_actor($game_temp.old_party[2]) unless $game_temp.old_p
- arty.size < 3
- $game_party.add_actor($game_temp.old_party[3]) unless $game_temp.old_p
- arty.size < 4
- else
- for actor in $game_party.members
- $data_actors[actor.id].auto_battle = $game_temp.orig_auto_battle[act
- or.index]
- end
- end
- end
- $game_system.clear_colosseum
- if TECHNIKALZ::USE_FPS_CHANGE
- Graphics.frame_rate = 60
- end
- end
- end
- end
- class Game_System
- def clear_colosseum
- $game_temp.old_party = nil
- $game_temp.kept_member = nil
- $game_temp.colosseum_item_id = nil
- $game_temp.orig_auto_battle = nil
- $game_temp.colosseum_actor_index = nil
- $game_temp.lose_item = nil
- $game_temp.item_type = nil
- $colosseum_battle = false
- $colosseum_item = nil
- $colosseum_troop_monster_id = nil
- $colosseum_item_get_type = nil
- $colosseum_item_get = nil
- end
- end
- if not $imported["FxFyX_CALL_IN"]
- class Game_Battler
- def recover_all(hp = true, mp = true, s = true)
- if hp
- if state?(1)
- remove_state(1)
- end
- @hp = maxhp
- end
- @mp = maxmp if mp
- if s
- for i in @states.clone do remove_state(i) end
- end
- end
- end
- end
- class Game_Troop < Game_Unit
- def setup_colosseum_troop(item)
- clear
- @enemies = []
- item_enemy_ids = item.colosseum_troop
- for eny_id in item_enemy_ids
- next if $data_enemies[eny_id] == nil
- enemy = Game_Enemy.new(@enemies.size, eny_id)
- if TECHNIKALZ::BATTLE_SYSTEM == "default"
- enemy.screen_x = (Graphics.width / 2)
- enemy.screen_y = (Graphics.height / 2)
- elsif TECHNIKALZ::BATTLE_SYSTEM == "tankentai"
- enemy.screen_x = (Graphics.width / 3).round
- enemy.screen_y = (Graphics.height / 2)
- elsif TECHNIKALZ::BATTLE_SYSTEM == "melody"
- case $game_variables[YEM::BATTLE_ENGINE::VIEW_TYPE_VARIABLE]
- when 0
- enemy.screen_x = (Graphics.width / 2)
- enemy.screen_y = (Graphics.height / 2)
- when 1
- enemy.screen_x = (Graphics.width / 2)
- enemy.screen_y = (Graphics.height / 2)
- when 2
- enemy.screen_x = (Graphics.width / 3).round
- enemy.screen_y = (Graphics.height / 2)
- when 3
- enemy.screen_x = (Graphics.width / 3).round
- enemy.screen_y = (Graphics.height / 3).round
- end
- end
- @enemies.push(enemy)
- end
- make_unique_names
- end
- alias colosseum_incr_turn increase_turn unless $@
- def increase_turn
- return if @troop_id == nil
- colosseum_incr_turn
- end
- alias colosseum_setup_bat_event setup_battle_event unless $@
- def setup_battle_event
- return if @troop_id == nil
- colosseum_setup_bat_event
- end
- end
- class RPG::BaseItem
- alias icy_col_basit_initialize initialize unless $@
- def initialize(*args)
- icy_col_basit_initialize(*args)
- @col_cache_ready = false
- icy_col_basit_cache
- end
- def icy_col_basit_cache
- @colosseum = false
- @troop_mons = []
- self.note.split(/[\r\n]+/).each { line
- case line
- when COLOSSEUM::REGEXP::COLOSSEUM_USE
- @colosseum = true
- when COLOSSEUM::REGEXP::TROOP_MON
- $colosseum_troop_monster_id = $1.to_i
- @troop_mons.push($colosseum_troop_monster_id)
- when COLOSSEUM::REGEXP::ITEM_TYPE
- @colosseum_item_get_type = $1.to_s
- when COLOSSEUM::REGEXP::ITEM_GET
- @colosseum_item_get = $1.to_i
- end
- } # End each
- @col_cache_ready = true
- end
- def colosseum_use?
- icy_col_basit_cache unless @col_cache_ready
- return @colosseum
- end
- def colosseum_troop
- icy_col_basit_cache unless @col_cache_ready
- return @troop_mons
- end
- def colosseum_item_get_type
- icy_col_basit_cache unless @col_cache_ready
- return @colosseum_item_get_type
- end
- def colosseum_item_get
- icy_col_basit_cache unless @col_cache_ready
- return @colosseum_item_get
- end
- def col_i_type
- if self.is_a?(RPG::Item)
- return 0
- elsif self.is_a?(RPG::Weapon)
- return 1
- elsif self.is_a?(RPG::Armor)
- return 2
- end
- end
- end
- class Game_Party < Game_Unit
- def party_hp
- party_hp = 0
- for member in $game_party.members
- party_hp = party_hp + member.hp
- end
- return party_hp
- end
- end
- if COLOSSEUM::TECHNIKALZ::SHRINK_L_BAT
- class Sprite_Battler
- alias colosseum_bat_shrink update_battler_bitmap unless $@
- def update_battler_bitmap
- colosseum_bat_shrink
- if ($scene.is_a?(Scene_Battle) and $colosseum_battle)
- onethd = (self.width > Graphics.width / 3) and (self.height > Graphics.hei
- ght / 3)
- onehlf = (self.width > Graphics.width / 2) and (self.height > Graphics.hei
- ght / 2)
- if onethd
- self.zoom_x = 0.75
- self.zoom_y = 0.75
- elsif onehlf
- self.zoom_x = 0.5
- self.zoom_y = 0.5
- else
- self.zoom_x = 1
- self.zoom_y = 1
- end
- else
- self.zoom_x = 1
- self.zoom_y = 1
- end
- end
- end
- end
- class Game_Interpreter
- def call_colosseum(bypass = false)
- if not bypass
- if $game_party.items.size < 1
- if $game_party.party_hp < 1
- text = COLOSSEUM::TECHNIKALZ::NO_ITEMS_o_0
- text.gsub(/\./) {$1.to_s}
- text2 = "and " + COLOSSEUM::TECHNIKALZ::CANT_CALL_SCNE.downcase
- $game_message.texts.push(text + "\." + "." + "\." + "." + "\." + "." +
- "\.")
- $game_message.texts.push(text2)
- else
- text = COLOSSEUM::TECHNIKALZ::NO_ITEMS_o_0
- $game_message.texts.push(text)
- end
- elsif $game_party.party_hp < 1
- text = COLOSSEUM::TECHNIKALZ::CANT_CALL_SCNE
- $game_message.texts.push(text)
- else
- $scene = Scene_Colosseum.new
- end
- else
- $scene = Scene_Colosseum.new
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment