class Game_System
attr_accessor :terrains
alias init_nathmatt_later initialize
def initialize
init_nathmatt_later
@terrains1 = [ 9, 8, 5, 2, 2, 0]
@terrains2 = [ 8, 8, 5, 2, 2, 0]
@terrains3 = [ 7, 8, 5, 2, 2, 0]
@terrains4 = [ 2, 8, 5, 2, 2, 0]
@terrains5 = [ 2, 8, 5, 2, 2, 0]
@terrains6 = [ 2, 8, 5, 2, 2, 0]
@terrains7 = [ 2, 8, 5, 2, 2, 0]
end
end
class Scene_Map
def call_battle
$game_temp.battle_calling = false
$game_temp.menu_calling = false
$game_temp.menu_beep = false
$game_player.make_encounter_count
$game_temp.map_bgm = $game_system.playing_bgm
$game_system.bgm_stop
$game_system.se_play($data_system.battle_start_se)
$game_system.bgm_play($game_system.battle_bgm)
$game_player.straighten
$game_temp.in_battle = true
$game_temp.forcing_battler = nil
@troop_id = $game_temp.battle_troop_id
$game_troop.setup(@troop_id)
@map_id = $game_map.map_id
@player_x = $game_player.x
@player_y = $game_player.y
$game_variables [1] = rand(@teleport[4]) + @teleport[5] # 1st enemy
$game_variables [2] = rand(@teleport[4]) + @teleport[5] # 2nd Enemy
$game_variables [3] = rand(@teleport[4]) + @teleport[5] # 3rd enemy
$game_system.menu_disabled = true
$game_system.caterpillar = true
@phase = 1
end
alias map_update update
def update
map_update
@check_terrain
@update_phase1
@update_phase2
@update_phase3
@update_phase4
if @wait_count == nil
@wait_count = 0
elsif @wait_count > 0
@wait_count -= 1
return
end
end
def check_terrain
case $game_player.terrain_tag
when 1 then @teleport = $game_system.terrains1
when 2 then @teleport = $game_system.terrains2
when 3 then @teleport = $game_system.terrains3
when 4 then @teleport = $game_system.terrains4
when 5 then @teleport = $game_system.terrains5
when 6 then @teleport = $game_system.terrains6
when 7 then @teleport = $game_system.terrains7
end
end
def update_phase1
$game_temp.player_transferring = true
$game_temp.player_new_map_id = @teleport[0]
$game_temp.player_new_x = @teleport[1]
$game_temp.player_new_y = @teleport[2]
$game_temp.player_new_direction = @teleport[3]
@phase = 2
end
def update_phase2
if @phase == 2
if $game_map.map_id != @map_id
@wait_count = 40
end
if @wait_count > 0
enemy1
enemy2
enemy3
@phase = 3
end
end
end
def update_phase3
if @phase == 3
if $game_variables [4] == 3
$game_system.me_play($game_system.battle_end_me)
$game_system.hud = false
$window = Window_Result.new
@wait_count = 40
end
if @wait_count == 0
$window.dispose
exp = $total1
gold = $total2
treasures = $total3
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
if actor.cant_get_exp? == false
last_level = actor.level
actor.exp += exp
if actor.level > last_level
@status_window.level_up(i)
end
end
end
$game_party.gain_gold(gold)
for item in treasures
case item
when RPG::Item
$game_party.gain_item(item.id, 1)
when RPG::Weapon
$game_party.gain_weapon(item.id, 1)
when RPG::Armor
$game_party.gain_armor(item.id, 1)
end
end
$total1 = 0
$total2 = 0
$total3 = 0
$game_variables [4] = 0
@phase = 4
end
end
end
def update_phase4
if @phase == 4
$game_temp.player_transferring = true
$game_temp.player_new_map_id = @map_id
$game_temp.player_new_x = @player_x
$game_temp.player_new_y = @player_y
$game_temp.player_new_direction = 2
$game_system.bgm_play($game_temp.map_bgm)
$game_system.hud = true
$game_system.menu_disabled = false
if $game_switches [1] == true
$game_system.caterpillar = false
$game_temp.in_battle = false
end
end
end
endclass Scene_Map
def enemy1
case$game_variables [1]
when 0 then enemy1 = $game_map.rename_event(01, '\e[1]')
when 1 then enemy1 = $game_map.rename_event(01, '\e[2]')
when 2 then enemy1 = $game_map.rename_event(01, '\e[3]')
when 3 then enemy1 = $game_map.rename_event(01, '\e[4]')
when 4 then enemy1 = $game_map.rename_event(01, '\e[5]')
when 5 then enemy1 = $game_map.rename_event(01, '\e[6]')
when 6 then enemy1 = $game_map.rename_event(01, '\e[7]')
when 7 then enemy1 = $game_map.rename_event(01, '\e[8]')
when 8 then enemy1 = $game_map.rename_event(01, '\e[9]')
when 9 then enemy1 = $game_map.rename_event(01, '\e[10]')
when 10 then enemy1 = $game_map.rename_event(01, '\e[11]')
when 11 then enemy1 = $game_map.rename_event(01, '\e[12]')
when 12 then enemy1 = $game_map.rename_event(01, '\e[13]')
when 13 then enemy1 = $game_map.rename_event(01, '\e[12]')
when 14 then enemy1 = $game_map.rename_event(01, '\e[13]')
when 15 then enemy1 = $game_map.rename_event(01, '\e[14]')
when 16 then enemy1 = $game_map.rename_event(01, '\e[15]')
when 17 then enemy1 = $game_map.rename_event(01, '\e[16]')
when 16 then enemy1 = $game_map.rename_event(01, '\e[15]')
when 17 then enemy1 = $game_map.rename_event(01, '\e[18]')
when 18 then enemy1 = $game_map.rename_event(01, '\e[19]')
when 19 then enemy1 = $game_map.rename_event(01, '\e[20]')
when 20 then enemy1 = $game_map.rename_event(01, '\e[21]')
when 21 then enemy1 = $game_map.rename_event(01, '\e[22]')
when 22 then enemy1 = $game_map.rename_event(01, '\e[23]')
when 23 then enemy1 = $game_map.rename_event(01, '\e[24]')
when 24 then enemy1 = $game_map.rename_event(01, '\e[25]')
when 25 then enemy1 = $game_map.rename_event(01, '\e[26]')
when 26 then enemy1 = $game_map.rename_event(01, '\e[27]')
when 27 then enemy1 = $game_map.rename_event(01, '\e[28]')
when 28 then enemy1 = $game_map.rename_event(01, '\e[29]')
when 29 then enemy1 = $game_map.rename_event(01, '\e[30]')
when 30 then enemy1 = $game_map.rename_event(01, '\e[31]')
when 31 then enemy1 = $game_map.rename_event(01, '\e[32]')
when 32 then enemy1 = $game_map.rename_event(01, '\e[33]')
when 33 then enemy1 = $game_map.rename_event(01, '\e[34]')
when 34 then enemy1 = $game_map.rename_event(01, '\e[35]')
when 35 then enemy1 = $game_map.rename_event(01, '\e[36]')
when 36 then enemy1 = $game_map.rename_event(01, '\e[37]')
when 37 then enemy1 = $game_map.rename_event(01, '\e[38]')
when 38 then enemy1 = $game_map.rename_event(01, '\e[39]')
when 39 then enemy1 = $game_map.rename_event(01, '\e[40]')
when 40 then enemy1 = $game_map.rename_event(01, '\e[41]')
when 41 then enemy1 = $game_map.rename_event(01, '\e[42]')
when 42 then enemy1 = $game_map.rename_event(01, '\e[43]')
when 43 then enemy1 = $game_map.rename_event(01, '\e[44]')
when 44 then enemy1 = $game_map.rename_event(01, '\e[45]')
when 45 then enemy1 = $game_map.rename_event(01, '\e[46]')
when 46 then enemy1 = $game_map.rename_event(01, '\e[47]')
when 47 then enemy1 = $game_map.rename_event(01, '\e[48]')
when 48 then enemy1 = $game_map.rename_event(01, '\e[49]')
when 49 then enemy1 = $game_map.rename_event(01, '\e[50]')
end
def enemy2
case $game_variables [2]
when 0 then enemy2 = $game_map.rename_event(02, '\e[1]')
when 1 then enemy2 = $game_map.rename_event(02, '\e[2]')
when 2 then enemy2 = $game_map.rename_event(02, '\e[3]')
when 3 then enemy2 = $game_map.rename_event(02, '\e[4]')
when 4 then enemy2 = $game_map.rename_event(02, '\e[5]')
when 5 then enemy2 = $game_map.rename_event(02, '\e[6]')
when 6 then enemy2 = $game_map.rename_event(02, '\e[7]')
when 7 then enemy2 = $game_map.rename_event(02, '\e[8]')
when 8 then enemy2 = $game_map.rename_event(02, '\e[9]')
when 9 then enemy2 = $game_map.rename_event(02, '\e[10]')
when 10 then enemy2 = $game_map.rename_event(02, '\e[11]')
when 11 then enemy2 = $game_map.rename_event(02, '\e[12]')
when 12 then enemy2 = $game_map.rename_event(02, '\e[13]')
when 13 then enemy2 = $game_map.rename_event(02, '\e[12]')
when 14 then enemy2 = $game_map.rename_event(02, '\e[13]')
when 15 then enemy2 = $game_map.rename_event(02, '\e[14]')
when 16 then enemy2 = $game_map.rename_event(02, '\e[15]')
when 17 then enemy2 = $game_map.rename_event(02, '\e[16]')
when 16 then enemy2 = $game_map.rename_event(02, '\e[15]')
when 17 then enemy2 = $game_map.rename_event(02, '\e[18]')
when 18 then enemy2 = $game_map.rename_event(02, '\e[19]')
when 19 then enemy2 = $game_map.rename_event(02, '\e[20]')
when 20 then enemy2 = $game_map.rename_event(02, '\e[21]')
when 21 then enemy2 = $game_map.rename_event(02, '\e[22]')
when 22 then enemy2 = $game_map.rename_event(02, '\e[23]')
when 23 then enemy2 = $game_map.rename_event(02, '\e[24]')
when 24 then enemy2 = $game_map.rename_event(02, '\e[25]')
when 25 then enemy2 = $game_map.rename_event(02, '\e[26]')
when 26 then enemy2 = $game_map.rename_event(02, '\e[27]')
when 27 then enemy2 = $game_map.rename_event(02, '\e[28]')
when 28 then enemy2 = $game_map.rename_event(02, '\e[29]')
when 29 then enemy2 = $game_map.rename_event(02, '\e[30]')
when 30 then enemy2 = $game_map.rename_event(02, '\e[31]')
when 31 then enemy2 = $game_map.rename_event(02, '\e[32]')
when 32 then enemy2 = $game_map.rename_event(02, '\e[33]')
when 33 then enemy2 = $game_map.rename_event(02, '\e[34]')
when 34 then enemy2 = $game_map.rename_event(02, '\e[35]')
when 35 then enemy2 = $game_map.rename_event(02, '\e[36]')
when 36 then enemy2 = $game_map.rename_event(02, '\e[37]')
when 37 then enemy2 = $game_map.rename_event(02, '\e[38]')
when 38 then enemy2 = $game_map.rename_event(02, '\e[39]')
when 39 then enemy2 = $game_map.rename_event(02, '\e[40]')
when 40 then enemy2 = $game_map.rename_event(02, '\e[41]')
when 41 then enemy2 = $game_map.rename_event(02, '\e[42]')
when 42 then enemy2 = $game_map.rename_event(02, '\e[43]')
when 43 then enemy2 = $game_map.rename_event(02, '\e[44]')
when 44 then enemy2 = $game_map.rename_event(02, '\e[45]')
when 45 then enemy2 = $game_map.rename_event(02, '\e[46]')
when 46 then enemy2 = $game_map.rename_event(02, '\e[47]')
when 47 then enemy2 = $game_map.rename_event(02, '\e[48]')
when 48 then enemy2 = $game_map.rename_event(02, '\e[49]')
when 49 then enemy2 = $game_map.rename_event(02, '\e[50]')
end
def enemy3
case $game_variables [3]
when 0 then enemy3 = $game_map.rename_event(03, '\e[1]')
when 1 then enemy3 = $game_map.rename_event(03, '\e[2]')
when 2 then enemy3 = $game_map.rename_event(03, '\e[3]')
when 3 then enemy3 = $game_map.rename_event(03, '\e[4]')
when 4 then enemy3 = $game_map.rename_event(03, '\e[5]')
when 5 then enemy3 = $game_map.rename_event(03, '\e[6]')
when 6 then enemy3 = $game_map.rename_event(03, '\e[7]')
when 7 then enemy3 = $game_map.rename_event(03, '\e[8]')
when 8 then enemy3 = $game_map.rename_event(03, '\e[9]')
when 9 then enemy3 = $game_map.rename_event(03, '\e[10]')
when 10 then enemy3 = $game_map.rename_event(03, '\e[11]')
when 11 then enemy3 = $game_map.rename_event(03, '\e[12]')
when 12 then enemy3 = $game_map.rename_event(03, '\e[13]')
when 13 then enemy3 = $game_map.rename_event(03, '\e[12]')
when 14 then enemy3 = $game_map.rename_event(03, '\e[13]')
when 15 then enemy3 = $game_map.rename_event(03, '\e[14]')
when 16 then enemy3 = $game_map.rename_event(03, '\e[15]')
when 17 then enemy3 = $game_map.rename_event(03, '\e[16]')
when 16 then enemy3 = $game_map.rename_event(03, '\e[15]')
when 17 then enemy3 = $game_map.rename_event(03, '\e[18]')
when 18 then enemy3 = $game_map.rename_event(03, '\e[19]')
when 19 then enemy3 = $game_map.rename_event(03, '\e[20]')
when 20 then enemy3 = $game_map.rename_event(03, '\e[21]')
when 21 then enemy3 = $game_map.rename_event(03, '\e[22]')
when 22 then enemy3 = $game_map.rename_event(03, '\e[23]')
when 23 then enemy3 = $game_map.rename_event(03, '\e[24]')
when 24 then enemy3 = $game_map.rename_event(03, '\e[25]')
when 25 then enemy3 = $game_map.rename_event(03, '\e[26]')
when 26 then enemy3 = $game_map.rename_event(03, '\e[27]')
when 27 then enemy3 = $game_map.rename_event(03, '\e[28]')
when 28 then enemy3 = $game_map.rename_event(03, '\e[29]')
when 29 then enemy3 = $game_map.rename_event(03, '\e[30]')
when 30 then enemy3 = $game_map.rename_event(03, '\e[31]')
when 31 then enemy3 = $game_map.rename_event(03, '\e[32]')
when 32 then enemy3 = $game_map.rename_event(03, '\e[33]')
when 33 then enemy3 = $game_map.rename_event(03, '\e[34]')
when 34 then enemy3 = $game_map.rename_event(03, '\e[35]')
when 35 then enemy3 = $game_map.rename_event(03, '\e[36]')
when 36 then enemy3 = $game_map.rename_event(03, '\e[37]')
when 37 then enemy3 = $game_map.rename_event(03, '\e[38]')
when 38 then enemy3 = $game_map.rename_event(03, '\e[39]')
when 39 then enemy3 = $game_map.rename_event(03, '\e[40]')
when 40 then enemy3 = $game_map.rename_event(03, '\e[41]')
when 41 then enemy3 = $game_map.rename_event(03, '\e[42]')
when 42 then enemy3 = $game_map.rename_event(03, '\e[43]')
when 43 then enemy3 = $game_map.rename_event(03, '\e[44]')
when 44 then enemy3 = $game_map.rename_event(03, '\e[45]')
when 45 then enemy3 = $game_map.rename_event(03, '\e[46]')
when 46 then enemy3 = $game_map.rename_event(03, '\e[47]')
when 47 then enemy3 = $game_map.rename_event(03, '\e[48]')
when 48 then enemy3 = $game_map.rename_event(03, '\e[49]')
when 49 then enemy3 = $game_map.rename_event(03, '\e[50]')
end
end
end
end
end def enemy(id)
$game_map.rename_event(id, "\e[#{$game_variables[id]}]")
end def enemy(event_id, id)
$game_map.rename_event(event_id, "\e[#{id}]")
endclass Hud < Sprite
alias nathmatt_hud_update draw_basic
def draw_basic
if Nathmatt::Battle_skills == false
nathmatt_hud_update
end
# fill with grey rectangle
self.bitmap.fill_rect(0, 0, self.bitmap.width, self.bitmap.height,
Color.new(0, 0, 0, 128))
# determine color depending on HUD style
color = case BlizzABS::Config::HUD_TYPE
when 0 then Color.new(255, 255, 255, 192)
when 1 then Color.new(0, 0, 0, 0)
end
# if color exists
if color.is_a?(Color)
# draw outline in color
self.bitmap.fill_rect(@hp_x+32, @hp_y+3, 116, 14, color)
# draw outline in color
self.bitmap.fill_rect(@sp_x+32, @sp_y+3, 116, 14, color)
end
# set font color
self.bitmap.font.color = system_color
# draw "LV"
self.bitmap.draw_text_full(@level_x, @level_y, 20, 20, 'LV')
# if direct hotkey option is turned off
unless BlizzABS::Config::DIRECT_HOTKEYS
# draw "Skill:"
self.bitmap.draw_text_full(@hot_x, @hot_y, 48, 20, 'Skill:')
self.bitmap.draw_text_full(@hot_x+76, @hot_y, 48, 20, 'Skill2:')
end
# draw "HP"
self.bitmap.draw_text_full(@hp_x, @hp_y, 32, 20, $data_system.words.hp)
# draw "SP"
self.bitmap.draw_text_full(@sp_x, @sp_y, 32, 20, $data_system.words.sp)
end
end def enemy(event_id, variable_id)
$game_map.rename_event(event_id, "\e[#{$game_variables[variable_id]}]")
end module Nathmatt
#WILL OVERRIDE THE PRE_MENU####
#&WILL RE WRITE THE DIRRCT HOTKEYS##
#LEAVING ONLY 2 SKILLS 4 EASY USE###
Battle_skills = true
end
class Game_System
attr_accessor :terrains1
attr_accessor :terrains2
attr_accessor :terrains3
attr_accessor :terrains4
attr_accessor :terrains5
attr_accessor :terrains6
attr_accessor :terrains7
alias init_nathmatt_later initialize
def initialize
init_nathmatt_later
@terrains1 = [ 9, 8, 5, 2, 2, 0]
@terrains2 = [ 8, 8, 5, 2, 2, 0]
@terrains3 = [ 7, 8, 5, 2, 2, 0]
@terrains4 = [ 2, 8, 5, 2, 2, 0]
@terrains5 = [ 2, 8, 5, 2, 2, 0]
@terrains6 = [ 2, 8, 5, 2, 2, 0]
@terrains7 = [ 2, 8, 5, 2, 2, 0]
end
end
class Scene_Map
def call_battle
$game_temp.battle_calling = false
$game_temp.menu_calling = false
$game_temp.menu_beep = false
$game_player.make_encounter_count
$game_temp.map_bgm = $game_system.playing_bgm
$game_system.bgm_stop
$game_system.se_play($data_system.battle_start_se)
$game_system.bgm_play($game_system.battle_bgm)
$game_player.straighten
$game_temp.in_battle = true
$game_temp.forcing_battler = nil
@troop_id = $game_temp.battle_troop_id
$game_troop.setup(@troop_id)
@map_id = $game_map.map_id
@player_x = $game_player.x
@player_y = $game_player.y
$game_variables [1] = rand(@teleport[4]) + @teleport[5] # 1st enemy
$game_variables [2] = rand(@teleport[4]) + @teleport[5] # 2nd Enemy
$game_variables [3] = rand(@teleport[4]) + @teleport[5] # 3rd enemy
$game_system.menu_disabled = true
$game_system.caterpillar = true
@phase = 1
end
def enemy(event_id, variable_id)
$game_map.rename_event(event_id, "\e[#{$game_variables[variable_id]}]")
end
alias map_update update
def update
map_update
if @check == nil
$game_system.caterpillar = true
$total1 = 0
$total2 = 0
@enemies = 0
@wait_count = 0
@check = 0
end
if @wait_count > 0
@wait_count -= 1
end
case $game_player.terrain_tag
when 1 then @teleport = $game_system.terrains1
when 2 then @teleport = $game_system.terrains2
when 3 then @teleport = $game_system.terrains3
when 4 then @teleport = $game_system.terrains4
when 5 then @teleport = $game_system.terrains5
when 6 then @teleport = $game_system.terrains6
when 7 then @teleport = $game_system.terrains7
end
if @phase == 1
$game_temp.player_transferring = true
$game_temp.player_new_map_id = @teleport[0]
$game_temp.player_new_x = @teleport[1]
$game_temp.player_new_y = @teleport[2]
$game_temp.player_new_direction = @teleport[3]
@phase = 2
end
if @phase == 2
if $game_map.map_id != @map_id && @enemies == 0..99
enemy(1, 1)
enemy(2, 2)
enemy(3, 3)
@enemies +=1
end
if @enemies > 0 && $game_map.battlers.size == 0 && @enemies == 99
$game_system.me_play($game_system.battle_end_me)
$game_system.hud = false
exp = $total1
gold = $total2
treasures = $total3
$game_party.gain_exp(exp)
$game_party.gain_gold(gold)
$total1 = 0
$total2 = 0
$total3 = 0
@phase = 0
@enemies = 0
$game_temp.player_transferring = true
$game_temp.player_new_map_id = @map_id
$game_temp.player_new_x = @player_x
$game_temp.player_new_y = @player_y
$game_temp.player_new_direction = 2
$game_system.bgm_play($game_temp.map_bgm)
$game_system.hud = true
$game_system.menu_disabled = false
end
end
end
end
class Game_Party
attr_reader :exp
alias init_nathmatt_later initialize
def initialize
init_nathmatt_later
@exp = 0
end
def gain_exp(n)
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
if actor.cant_get_exp? == false
actor.exp += n
end
end
end
end if Nathmatt::Battle_skills == false
nathmatt_hud_update
end if Nathmatt::Battle_skills == false
nathmatt_hud_update
return
end alias nathmatt_name_check check_event_name
def check_event_name(event_id)
nathmatt_name_check
if event.name.clone.gsub!(/\\[Mm]\[(\d+)\]/) {"#[$1]"}
# get enemy pick setting
$game_system.pick = $1.to_i
folow = true
end
if folow == true
$distances[event_id] = Math.hypot($game_map.events[event_id].x, $game_map.events[event_id].y - $game_player.x, $game_player.y)
end
end
Quote from: nathmatt on April 25, 2009, 07:36:22 am
ok im trying to skip hot hotkeys to put skills directly in the HUD
Quote from: nathmatt on April 25, 2009, 07:36:22 am
also the other thing im trying to make it where is there a way to make that where when the enemies hear or see u that ran at u but dont att u so they can call my battle so ppl can see there enemies that what i was trying to do with the event name thing
Nathmatt_Hotkeys_mainclass BlizzABS::Cache
if Nathmatt::Battle_skills == true
HotkeyRange = 1..2
end
end
module Config
if Nathmatt::Battle_skills == true
DIRECT_HOTKEYS = true
end
end
class Scene_Hotkeys
alias Nathmatt_Hotkeys_main main
def main
if Nathmatt::Battle_skills == false
Nathmatt_Hotkeys_main
return
end
# create spriteset
@spriteset = Spriteset_Map.new
# create viewport
@view = Viewport.new(0, 0, 640, 480)
# set tone to current screen tone
@view.tone = @tone.clone
# create HUD if HUD is turned on and HUD active
@hud = Hud.new if BlizzABS::Config::HUD_ENABLED && $game_system.hud
# if ASSIGNMENT is turned
if BlizzABS::Config::HOTKEYS
# create assignment display
@hotkeys = Hotkey_Assignment.new
# set z position
@hotkeys.z = 5000
end
# if MINIMAP is turned on and minimap active
if BlizzABS::Config::MINIMAP && $game_system.minimap > 0
# create HUD
@minimap = Minimap.new
end
# create sprite
@choice = Sprite.new
# create bitmap
@choice.bitmap = $BlizzABS.cache.image('menu_arrow')
# set x, y and z positions
@choice.x, @choice.y, @choice.z, @choice.opacity = 160, 40, 500, 128
# set x position offset
@choice.ox = -8
# set active flag
@active = true
# set index
@index = 0
# set up mode flag
@up_mode = true
# create modified skill window
@skill_window = Window_Skill_Hotkey.new($game_player.battler)
@skill_window.y = 100
# create modified item window
@item_window = Window_Item_Hotkey.new
@item_window.y = 100
# set last active
@last_active = true
# transtition
Graphics.transition
# loop
loop do
# update game screen
Graphics.update
# update input
Input.update
# frame update
update
# stop if chosen an option
break if $scene != self
end
# freeze screen
Graphics.freeze
# delet spriteset
@spriteset.dispose
# delete HUD elements that exist
[@hud, @hotkeys, @minimap].each {|s| s.dispose if s != nil}
# delete choice sprite
@choice.dispose
# delete skill window
@skill_window.dispose
# delete item window
@item_window.dispose
# delete viewport
@view.dispose
end
alias Nathmatt_Hotkeys_update update_choice
def update_choice
if Nathmatt::Battle_skills == false
Nathmatt_Hotkeys_update
return
end
# set x position
@choice.x, @choice.y = 0 + @index * 32, 80
# if pressed B
if Input.trigger?(Input::B)
# play cancel sound
$game_system.se_play($data_system.cancel_se)
# create map scene
$scene = Scene_Map.new
# if C is pressed
elsif Input.trigger?(Input::C)
# play sound
$game_system.se_play($data_system.decision_se)
# not active
@active = false
# the one that was active the last time is now active
@skill_window.active = @last_active
@item_window.active = (!@last_active)
# if RIGHT is being pressed
elsif Input.repeat?(Input::RIGHT)
# if RIGHT is pressed or index is less than 9
if Input.trigger?(Input::RIGHT) || @index < 9
if @index == 1
@index = -1
end
# play sound
$game_system.se_play($data_system.cursor_se)
# set new index
@index = (@index + 1) % 10
end
# if LEFT is being pressed
elsif Input.repeat?(Input::LEFT)
# if LEFT is pressed or index is equal or greater than 1
if Input.trigger?(Input::LEFT) || @index >= 1
# play sound
$game_system.se_play($data_system.cursor_se)
# set new index
@index = (@index + 9) % 10
end
end
end
enddef enemy(event_id)
event = $game_map.map.events[event_id]
event.name.gsub!(/\\[Ee]\[(\d+)\]/) {"#$game_variables[event_id]"}
end#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Battle Dome by Nathmatt
# Version: 1.02
# Type: Add On
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# PART 1
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This work is protected by the following license:
# #----------------------------------------------------------------------------
# #
# # Creative Commons - Attribution-NonCommercial-ShareAlike 3.0 Unported
# # ( http://creativecommons.org/licenses/by-nc-sa/3.0/ )
# #
# # You are free:
# #
# # to Share - to copy, distribute and transmit the work
# # to Remix - to adapt the work
# #
# # Under the following conditions:
# #
# # Attribution. You must attribute the work in the manner specified by the
# # author or licensor (but not in any way that suggests that they endorse you
# # or your use of the work).
# #
# # Noncommercial. You may not use this work for commercial purposes.
# #
# # Share alike. If you alter, transform, or build upon this work, you may
# # distribute the resulting work only under the same or similar license to
# # this one.
# #
# # - For any reuse or distribution, you must make clear to others the license
# # terms of this work. The best way to do this is with a link to this web
# # page.
# #
# # - Any of the above conditions can be waived if you get permission from the
# # copyright holder.
# #
# # - Nothing in this license impairs or restricts the author's moral rights.
# #
# #-----------------------------------------------------------------------------
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Set up:
# Start by creating a map you will use as a battle map.
# After that creat 3 events using game variables as conditions start adding
# a page for every enemy you want for this map then give them graphics.
# Then setup the terrain tags below
#
#------------------------------------------------------------------------------
# If you find any bugs, please report them here:
# http://forum.chaos-project.com/index.php?topic=3183.0
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
module Battle_Dome
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This controls all ur terrain_Tags :
#
# Terrain tags are located to the right of the tileset editor.
# This script uses them to tell the script where to take you when a battle
# eccours.
# You can change any of these via script call with
# $game_system.Terrain_Tag_ID_CL (Id is the id of the trerrain_tag).
# (CL is the configuration letter.
# (M) is the map (X) is the X co-ordances (Y) is the Y co-ordances (R) is the
# random number described below (E) is the added number described below
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
module Terrain_tags
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
# Use this to set up (terain tag 1)
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
Ter_Tag1 = true # Turn this on If you use this terrain tag
Map1 = nil # The map you go too
X1 = nil # The X co-ordances you go too
Y1 = nil # The Y co-ordances you go too
D1 = nil # The Direction you face (8) IS UP (6) IS RIGHT (2) IS DOWN
# (4) IS LEFT
R1 = nil # The range of the enemie selection (example 5 is enemies 0-5)
E1 = nil # This is used to add a number to the random number
# (example if u want enemies 10 - 15 then you put 10 so it
# adds 10 to the random number)
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Use this to set up (terain tag 2)
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
Ter_Tag2 = false # Same as above
Map2 = nil # Same as above
X2 = nil # Same as above
Y2 = nil # Same as above
D2 = nil # Same as above
R2 = nil # Same as above
E2 = nil # Same as above
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
# Use this to set up (terain tag 3)
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
Ter_Tag3 = false # Same as above
Map3 = nil # Same as above
X3 = nil # Same as above
Y3 = nil # Same as above
D3 = nil # Same as above
R3 = nil # Same as above
E3 = nil # Same as above
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
# Use this to set up (terain tag 4)
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
Ter_Tag4 = false # Same as above
Map4 = nil # Same as above
X4 = nil # Same as above
Y4 = nil # Same as above
D4 = nil # Same as above
R4 = nil # Same as above
E4 = nil # Same as above
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
# Use this to set up (terain tag 5)
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
Ter_Tag5 = false # Same as above
Map5 = nil # Same as above
X5 = nil # Same as above
Y5 = nil # Same as above
D5 = nil # Same as above
R5 = nil # Same as above
E5 = nil # Same as above
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
# Use this to set up (terain tag 6)
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
Ter_Tag6 = false # Same as above
Map6 = nil # Same as above
X6 = nil # Same as above
Y6 = nil # Same as above
D6 = nil # Same as above
R6 = nil # Same as above
E6 = nil # Same as above
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
# Use this to set up (terain tag 7)
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
Ter_Tag7 = false # Same as above
Map7 = nil # Same as above
X7 = nil # Same as above
Y7 = nil # Same as above
D7 = nil # Same as above
R7 = nil # Same as above
E7 = nil # Same as above
end
end
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Battle Dome by Nathmatt
# Version: 1.02
# Type: Add On
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# PART 1
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This work is protected by the following license:
# #----------------------------------------------------------------------------
# #
# # Creative Commons - Attribution-NonCommercial-ShareAlike 3.0 Unported
# # ( http://creativecommons.org/licenses/by-nc-sa/3.0/ )
# #
# # You are free:
# #
# # to Share - to copy, distribute and transmit the work
# # to Remix - to adapt the work
# #
# # Under the following conditions:
# #
# # Attribution. You must attribute the work in the manner specified by the
# # author or licensor (but not in any way that suggests that they endorse you
# # or your use of the work).
# #
# # Noncommercial. You may not use this work for commercial purposes.
# #
# # Share alike. If you alter, transform, or build upon this work, you may
# # distribute the resulting work only under the same or similar license to
# # this one.
# #
# # - For any reuse or distribution, you must make clear to others the license
# # terms of this work. The best way to do this is with a link to this web
# # page.
# #
# # - Any of the above conditions can be waived if you get permission from the
# # copyright holder.
# #
# # - Nothing in this license impairs or restricts the author's moral rights.
# #
# #-----------------------------------------------------------------------------
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Set up:
# Start by creating a map you will use as a battle map.
# After that creat 3 events using game variables as conditions start adding
# a page for every enemy you want for this map then give them graphics.
# Then setup the config and terrain tags below
#
#------------------------------------------------------------------------------
# If you find any bugs, please report them here:
# http://forum.chaos-project.com/index.php?topic=3183.0
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
class Battle
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This controls the terrain :
#
# To use these you use the call script $scene = Battle.Terrain_ID (ID) is
# what terrain you want it to call.
# You only need to add this once until you want to change it.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
# Copy this before the last end to add more terrains change the (ID) to the
# number you want to call to use that terrain
#
# def self.Terrain_ID
#
# @Teleport = [
#
# M, # Replace the (M) with the map id you want to go to
#
# X, # Replace the (X) with the X co-ordances you want go to
#
# Y, # Replace the (Y) with the Y co-ordances you go to
#
# D, # Replace the (D) with the direction youwant to face
# # (8) IS UP (6) IS RIGHT (2) IS DOWN (4) IS LEFT
# R, # Replace the (R) with the range of the enemie selection
# # (example 5 is enemies 0-5)
#
# E # Replace the (R) with the number you want to add to the random
# ] # number (example if u want enemies 10 - 15 then you put 10 so it
# # adds 10 to the random number)
# end
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
def self.Terrain_1
$Bteleport = [
2, # Replace the (M) with the map id you want to go to
9, # Replace the (X) with the X co-ordances you want go to
8, # Replace the (Y) with the Y co-ordances you go to
2, # Replace the (D) with the direction youwant to face
# (8) IS UP (6) IS RIGHT (2) IS DOWN (4) IS LEFT
2, # Replace the (R) with the range of the enemie selection
# (example 5 is enemies 0-5)
0 # Replace the (R) with the number you want to add to the random
] # number (example if u want enemies 10 - 15 then you put 10 so it
# adds 10 to the random number)
end
end
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Battle Dome by Nathmatt
# Version: 1.02
# Type: Add On
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# PART 2
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This work is protected by the following license:
# #----------------------------------------------------------------------------
# #
# # Creative Commons - Attribution-NonCommercial-ShareAlike 3.0 Unported
# # ( http://creativecommons.org/licenses/by-nc-sa/3.0/ )
# #
# # You are free:
# #
# # to Share - to copy, distribute and transmit the work
# # to Remix - to adapt the work
# #
# # Under the following conditions:
# #
# # Attribution. You must attribute the work in the manner specified by the
# # author or licensor (but not in any way that suggests that they endorse you
# # or your use of the work).
# #
# # Noncommercial. You may not use this work for commercial purposes.
# #
# # Share alike. If you alter, transform, or build upon this work, you may
# # distribute the resulting work only under the same or similar license to
# # this one.
# #
# # - For any reuse or distribution, you must make clear to others the license
# # terms of this work. The best way to do this is with a link to this web
# # page.
# #
# # - Any of the above conditions can be waived if you get permission from the
# # copyright holder.
# #
# # - Nothing in this license impairs or restricts the author's moral rights.
# #
# #-----------------------------------------------------------------------------
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This is the part of the script that runs everything.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
class Battle_Dome
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This is used to call my battle.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
def self.battle
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This sets all my variables.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
$total1, $total2, @enemies_called, = 0, 0, false
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This checks whether caterpillar is true or false so it can fix it after
# the battle ends.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
if $game_system.caterpillar == true
caterpillar = true
else
caterpillar = false
end
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This prevents battles while in battle and resets the battle step count.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
$game_temp.battle_calling = false
$game_player.make_encounter_count
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This prevents the menu from calling while n battle.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
$game_temp.menu_calling = false
$game_temp.menu_beep = false
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This stores the current BGN (Back Ground Music) to play it back when you
# finish the battle.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
$game_temp.map_bgm = $game_system.playing_bgm
$game_system.bgm_stop
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This plays the start and battle BGM. (Back Ground Music)
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
$game_system.se_play($data_system.battle_start_se)
$game_system.bgm_play($game_system.battle_bgm)
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This tells the script you are in battle and prevents the event or
# script battle call.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
$game_temp.in_battle = true
$game_temp.forcing_battler = nil
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This stores your location to take you back after the battle ends.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
@map_id = $game_map.map_id
@player_x = $game_player.x
@player_y = $game_player.y
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This creates the random numbers for enemy you get when you battle.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
$game_variables [1] = rand($Bteleport[4]) + $Bteleport[5] # 1st enemy
$game_variables [2] = rand($Bteleport[4]) + $Bteleport[5] # 2nd Enemy
$game_variables [3] = rand($Bteleport[4]) + $Bteleport[5] # 3rd enemy
$Bwait_count = 20
end
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This waits 20 frames ( secounds) and checks to see if you are already ther
# before taking you to ur battle map.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
def to_battle
$game_temp.player_transferring = true
$game_temp.player_new_map_id = $Bteleport[0]
$game_temp.player_new_x = $Bteleport[1]
$game_temp.player_new_y = $Bteleport[2]
$game_temp.player_new_direction = $Bteleport[3]
end
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This checks if you are on the battle map and if the enemies have already
# been called then calls them.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
def call_enemies
enemy1
enemy2
enemy3
@enemies_called = true
end
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This checks to see if the enemies have been called and if they have
# checks to see if all the enenies have been killed.
# If they have then gives you the exp,and gold.
# Will add items when i can fix the item gain.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
def call_battle_end
exp = $total1
gold = $total2
treasures = $total3
$game_party.gain_exp(exp)
$game_party.gain_gold(gold)
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This checks to see if the cattipillar was true or false and if it wasn't
# true turns it back off.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
if caterpillar == false
$game_system.caterpillar = false
end
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This takes you back wheere you where before the battle started.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
$game_temp.player_transferring = true
$game_temp.player_new_map_id = @map_id
$game_temp.player_new_x = @player_x
$game_temp.player_new_y = @player_y
$game_temp.player_new_direction = 2
end
end
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This Modifies scene_map
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
class Scene_Map
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
# This initializes wait count to prevent a no method error.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
def initialize
$Bwait_count = 0
end
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
# This checks all my conditions
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
alias map_update update
def update
map_update
if $Bwait_count != 0
$Bwait_count -= 1
end
if $Bwait_count == 0 && $game_map.map_id == @map_id
to_battle
end
if $game_map.map_id != @map_id && @enemies_called == false
call_enemies
end
if @enemies_called == true && $game_map.battlers.size == 0
call_battle_end
end
end
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
# This calls my battle scene when a battle occurs
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
def call_battle
$scene = Battle_Dome.battle
end
end
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This Modifies Game_Party
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
class Game_Party
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
# This stores exp in a global variable to be called later.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
attr_reader :exp
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
# This initializes exp to prevent a no method error.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
alias init_nathmatt_later initialize
def initialize
init_nathmatt_later
@exp = 0
end
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
# This makes it either to add exp to all party members in script.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
def gain_exp(n)
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
if actor.cant_get_exp? == false
actor.exp += n
end
end
end
end
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
# Battle Dome by Nathmatt
# Version: 1.02
# Type: Add On
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
# PART 2
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
# This work is protected by the following license:
# #-----------------------------------------------------------------------------
# #
# # Creative Commons - Attribution-NonCommercial-ShareAlike 3.0 Unported
# # ( http://creativecommons.org/licenses/by-nc-sa/3.0/ )
# #
# # You are free:
# #
# # to Share - to copy, distribute and transmit the work
# # to Remix - to adapt the work
# #
# # Under the following conditions:
# #
# # Attribution. You must attribute the work in the manner specified by the
# # author or licensor (but not in any way that suggests that they endorse you
# # or your use of the work).
# #
# # Noncommercial. You may not use this work for commercial purposes.
# #
# # Share alike. If you alter, transform, or build upon this work, you may
# # distribute the resulting work only under the same or similar license to
# # this one.
# #
# # - For any reuse or distribution, you must make clear to others the license
# # terms of this work. The best way to do this is with a link to this web
# # page.
# #
# # - Any of the above conditions can be waived if you get permission from the
# # copyright holder.
# #
# # - Nothing in this license impairs or restricts the author's moral rights.
# #
# #-----------------------------------------------------------------------------
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
# This is the part of the script that runs everything.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
class Scene_Map
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
# This is used to call my battle.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
def call_battle
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
# This prevents battles while in battle and resets the battle step count.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
$game_temp.battle_calling = false
$game_player.make_encounter_count
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
# This prevents the menu from calling while n battle.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
$game_temp.menu_calling = false
$game_temp.menu_beep = false
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
# This stores the current BGN (Back Ground Music) to play it back when you
# finish the battle.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
$game_temp.map_bgm = $game_system.playing_bgm
$game_system.bgm_stop
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
# This plays the start and battle BGM. (Back Ground Music)
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
$game_system.se_play($data_system.battle_start_se)
$game_system.bgm_play($game_system.battle_bgm)
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
# This tells the script you are in battle and prevents the event or
# script battle call.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
@in_battle = true
$game_temp.forcing_battler = nil
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
# This stores your location to take you back after the battle ends.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
@map_id = $game_map.map_id
@player_x = $game_player.x
@player_y = $game_player.y
@player_d = $game_player.direction
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
# This takes you to the battle map
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
$game_temp.player_transferring = true
$game_temp.player_new_map_id = $Bteleport[0]
$game_temp.player_new_x = $Bteleport[1]
$game_temp.player_new_y = $Bteleport[2]
$game_temp.player_new_direction = $Bteleport[3]
end
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
# This is the update method of my system
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
alias map_update update
def update
map_update
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
# This sets all my variables if they hane not already been set.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
if @variable_set != true
@variable_set, $total1, $total2, @enemies_called = true, 0, 0, false
end
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
# This creates the random numbers for enemy you get when you battle.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
if @in_battle != true
$game_variables [1] = rand($Bteleport[4]) + $Bteleport[5] # 1st enemy
$game_variables [2] = rand($Bteleport[4]) + $Bteleport[5] # 2nd Enemy
$game_variables [3] = rand($Bteleport[4]) + $Bteleport[5] # 3rd enemy
end
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
# This checks if you are on the battle map and if the enemies have already
# been called then calls them.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
if $game_map.map_id != @map_id && @enemies_called != true
enemy1
enemy2
enemy3
@enemies_called = true
end
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
# This checks to see if the enemies have been called and if they have
# checks to see if all the enenies have been killed.
# If they have then gives you the exp,and gold.
# Will add items when i can fix the item gain.
# Then takes you back wheere you where before the battle started.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
if @enemies_called == true && $game_map.battlers.size == 0
$game_temp.battle_calling = true
$game_temp.menu_calling = true
$game_temp.menu_beep = true
$game_temp.in_battle = false
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
if actor.cant_get_exp? == false
actor.exp += $total1
end
$game_party.gain_gold($total2)
$game_temp.player_transferring = true
$game_temp.player_new_map_id = @map_id
$game_temp.player_new_x = @player_x
$game_temp.player_new_y = @player_y
$game_temp.player_new_direction = @player_d
end
end
end
end