#_______________________________________________________________________________
# Star_Scene_Tactics V1.0
#_______________________________________________________________________________
# By StarGGundam2
#_______________________________________________________________________________
module STAR
#Transition Time.
STR_TIME = 10
#Transition Type(Name).
STR_TYPE = "004-Blind04"
TEXT1 = "Attack Enemies!"
TEXT2 = "Support Allies!"
TEXT3 = "Use Techs!"
TEXT4 = "Avoid Foes!"
end
###############
# Window_Base #
###############
class Window_Base < Window
def pic_missing?
face = RPG::Cache.picture("")
end
def draw_team_pictures(x,y)
face = RPG::Cache.picture("TACTICS_team") rescue pic_missing?
cw = face.width
ch = face.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x , y, face, src_rect)
end
def draw_tactics_selectable(x,y)
face = RPG::Cache.picture("TACTICS_selectable") rescue pic_missing?
cw = face.width
ch = face.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x , y, face, src_rect)
end
def draw_actor_picture1(actor,x,y)
face = RPG::Cache.picture(actor.name + "_fc5") rescue pic_missing?
cw = face.width
ch = face.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x , y, face, src_rect)
end
def draw_maphp5(actor, x, y)
back = RPG::Cache.picture("BAR")
cw = back.width
ch = back.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 65, y - ch + 30, back, src_rect)
meter = RPG::Cache.picture("HP_Bar2")
cw = meter.width * actor.hp / actor.maxhp
ch = meter.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x + 66, y - 1, 100, 32, actor.hp.to_s + "/" + actor.maxhp.to_s, 1)
self.contents.font.color = Color.new(250,255,255,255)
self.contents.draw_text(x + 65, y - 2, 100, 32, actor.hp.to_s + "/" + actor.maxhp.to_s, 1)
end
def draw_mapsp5(actor, x, y)
back = RPG::Cache.picture("BAR")
cw = back.width
ch = back.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 65 , y - ch + 30, back, src_rect)
meter = RPG::Cache.picture("SP_Bar2")
cw = meter.width * actor.sp / actor.maxsp
ch = meter.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 65 , y - ch + 30, meter, src_rect)
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x + 66, y - 1, 100, 32, actor.sp.to_s + "/" + actor.maxsp.to_s, 1)
self.contents.font.color = Color.new(250,255,255,255)
self.contents.draw_text(x + 65, y - 2, 100, 32, actor.sp.to_s + "/" + actor.maxsp.to_s, 1)
end
def draw_tactics_choice(x, y)
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x + 66, y + 0, 150, 32, STAR::TEXT1, 1)
self.contents.font.color = Color.new(250,255,255,255)
self.contents.draw_text(x + 65, y - 1, 150, 32, STAR::TEXT1, 1)
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x + 66, y + 60, 150, 32, STAR::TEXT2, 1)
self.contents.font.color = Color.new(250,255,255,255)
self.contents.draw_text(x + 65, y + 59, 150, 32, STAR::TEXT2, 1)
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x + 66, y + 120, 150, 32, STAR::TEXT3, 1)
self.contents.font.color = Color.new(250,255,255,255)
self.contents.draw_text(x + 65, y + 119, 150, 32, STAR::TEXT3, 1)
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x + 66, y + 180, 150, 32, STAR::TEXT4, 1)
self.contents.font.color = Color.new(250,255,255,255)
self.contents.draw_text(x + 65, y + 179, 150, 32, STAR::TEXT4, 1)
end
def draw_actor_tactic(actor, x, y)
case actor.id
when 1
if $game_variables[451] == 0
text = STAR::TEXT1
elsif $game_variables[451] == 1
text = STAR::TEXT2
elsif $game_variables[451] == 2
text = STAR::TEXT3
elsif $game_variables[451] == 3
text = STAR::TEXT4
end
when 2
if $game_variables[452] == 0
text = STAR::TEXT1
elsif $game_variables[452] == 1
text = STAR::TEXT2
elsif $game_variables[452] == 2
text = STAR::TEXT3
elsif $game_variables[452] == 3
text = STAR::TEXT4
end
when 3
if $game_variables[453] == 0
text = STAR::TEXT1
elsif $game_variables[453] == 1
text = STAR::TEXT2
elsif $game_variables[453] == 2
text = STAR::TEXT3
elsif $game_variables[453] == 3
text = STAR::TEXT4
end
when 4
if $game_variables[454] == 0
text = STAR::TEXT1
elsif $game_variables[454] == 1
text = STAR::TEXT2
elsif $game_variables[454] == 2
text = STAR::TEXT3
elsif $game_variables[454] == 3
text = STAR::TEXT4
end
when 5
if $game_variables[455] == 0
text = STAR::TEXT1
elsif $game_variables[455] == 1
text = STAR::TEXT2
elsif $game_variables[455] == 2
text = STAR::TEXT3
elsif $game_variables[455] == 3
text = STAR::TEXT4
end
when 6
if $game_variables[456] == 0
text = STAR::TEXT1
elsif $game_variables[456] == 1
text = STAR::TEXT2
elsif $game_variables[456] == 2
text = STAR::TEXT3
elsif $game_variables[456] == 3
text = STAR::TEXT4
end
when 7
if $game_variables[457] == 0
text = STAR::TEXT1
elsif $game_variables[457] == 1
text = STAR::TEXT2
elsif $game_variables[457] == 2
text = STAR::TEXT3
elsif $game_variables[457] == 3
text = STAR::TEXT4
end
when 8
if $game_variables[458] == 0
text = STAR::TEXT1
elsif $game_variables[458] == 1
text = STAR::TEXT2
elsif $game_variables[458] == 2
text = STAR::TEXT3
elsif $game_variables[458] == 3
text = STAR::TEXT4
end
when 9
if $game_variables[459] == 0
text = STAR::TEXT1
elsif $game_variables[459] == 1
text = STAR::TEXT2
elsif $game_variables[459] == 2
text = STAR::TEXT3
elsif $game_variables[459] == 3
text = STAR::TEXT4
end
when 10
if $game_variables[460] == 0
text = STAR::TEXT1
elsif $game_variables[460] == 1
text = STAR::TEXT2
elsif $game_variables[460] == 2
text = STAR::TEXT3
elsif $game_variables[460] == 3
text = STAR::TEXT4
end
when 11
if $game_variables[461] == 0
text = STAR::TEXT1
elsif $game_variables[461] == 1
text = STAR::TEXT2
elsif $game_variables[461] == 2
text = STAR::TEXT3
elsif $game_variables[461] == 3
text = STAR::TEXT4
end
end
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x - 1, y - 1, 120, 32, text, 1)
self.contents.font.color = Color.new(250,255,255,255)
self.contents.draw_text(x, y, 120, 32, text, 1)
end
########
#class Window_Base end
end
########
##################
# Tactics_Window #
##################
class Tactics_Window < Window_Selectable
attr_reader :index
def initialize(actor)
super(0, 0, 680, 480)
self.contents = Bitmap.new(width, height)
self.contents.font.name = "BorisBlackBloxx"
self.z = 20
self.index = 0
@actor = actor
refresh
########
#initialize end
end
########
def refresh
self.contents.clear
for i in 0...$game_party.actors.size
if i >= 4
x = 447
y = 110 + ((i - 4) * 80)
else
x = 120
y = 110 + (i * 80)
end
actor = $game_party.actors[i]
draw_actor_tactic(actor, x, y)
draw_maphp5(actor, x - 84, y - 30)
draw_mapsp5(actor, x + 24, y - 30)
draw_actor_picture1(actor,x - 105,y - 25)
end
end
def update_cursor_rect
if @index >= 4
x = 320
y = 70 + ((@index - 4) * 80)
else
x = 0
y = 70 + (@index * 80)
end
if @index == -1
self.cursor_rect.empty
else
self.cursor_rect.set(x, y, 320, 77)
end
end
def update_help
actor = $game_party.actors[@index]
text = actor.name
@help_window.set_text("Press Enter to edit " + text + "'s tactics in battle")
end
########
#class Tactics_Window end
end
########
##################
# ChangeTactics_Window #
##################
class ChangeTactics_Window < Window_Selectable
def initialize(actor)
super(160, 0, 360, 540)
self.contents = Bitmap.new(width, height)
self.windowskin = RPG::Cache.windowskin("Mywindowskin_deep")
self.opacity = 255
self.z = 55
self.index = 0
@actor = actor
refresh
end
def refresh
self.contents.clear
draw_tactics_selectable( 0, 0)
draw_tactics_choice(50, 105)
draw_maphp5(@actor, 30, 80)
draw_mapsp5(@actor, 140, 80)
draw_actor_picture1(@actor, 16, 85)
end
def update_cursor_rect
self.cursor_rect.set(99, 95 + (@index * 60), 190, 40)
end
def update_help
actor = @actor
text = actor.name
if index == 0
@help_window.set_text("Press enter to pick 'Attack Enemies' for " + text + "'s tactic")
elsif index == 1
@help_window.set_text("Press enter to pick 'Support Allies' for " + text + "'s tactic")
elsif index == 2
@help_window.set_text("Press enter to pick 'Use Techs' for " + text + "'s tactic")
elsif index == 3
@help_window.set_text("Press enter to pick 'Avoid Foes' for " + text + "'s tactic")
end
end
########
#class ChangeTactics_Window end
end
########
##################
# Team_Window #
##################
class Team_Window < Window_Base
def initialize
super(0, 0, 360, 540)
self.contents = Bitmap.new(width, height)
self.z = 1
self.opacity = 0
refresh
end
def refresh
self.contents.clear
draw_team_pictures( 0, 0)
end
########
#class Team_Window end
end
########
##################
# Scene_Tactics #
##################
class Scene_Tactics
def initialize
########
#initialize end
end
########
def main
for i in 0...$game_party.actors.size
@actor = $game_party.actors[i]
end
@tactics_bak = Sprite.new
@tactics_bak.bitmap = RPG::Cache.picture("TACTICS_bak")
@tactics_bak.x = 0
@tactics_bak.z = 10
@tactics_bak.visible = true
@tactics_window = Tactics_Window.new(@actor)
@tactics_window.y = 480
@tactics_window.x = - 15
@tactics_window.visible = true
@team1_window = Team_Window.new
@team1_window.x = -320
@team1_window.visible = true
@team2_window = Team_Window.new
@team2_window.x = 640
@team1_window.visible = true
@changetactics0_window = ChangeTactics_Window.new($game_party.actors[0])
@changetactics0_window.visible = false
@changetactics0_window.active = false
@changetactics1_window = ChangeTactics_Window.new($game_party.actors[1]) unless $game_party.actors.size <= 1
@changetactics1_window.visible = false unless $game_party.actors.size <= 1
@changetactics1_window.active = false unless $game_party.actors.size <= 1
@changetactics2_window = ChangeTactics_Window.new($game_party.actors[2]) unless $game_party.actors.size <= 2
@changetactics2_window.visible = false unless $game_party.actors.size <= 2
@changetactics2_window.active = false unless $game_party.actors.size <= 2
@changetactics3_window = ChangeTactics_Window.new($game_party.actors[3]) unless $game_party.actors.size <= 3
@changetactics3_window.visible = false unless $game_party.actors.size <= 3
@changetactics3_window.active = false unless $game_party.actors.size <= 3
@changetactics4_window = ChangeTactics_Window.new($game_party.actors[4]) unless $game_party.actors.size <= 4
@changetactics4_window.visible = false unless $game_party.actors.size <= 4
@changetactics4_window.active = false unless $game_party.actors.size <= 4
@changetactics5_window = ChangeTactics_Window.new($game_party.actors[5]) unless $game_party.actors.size <= 5
@changetactics5_window.visible = false unless $game_party.actors.size <= 5
@changetactics5_window.active = false unless $game_party.actors.size <= 5
@changetactics6_window = ChangeTactics_Window.new($game_party.actors[6]) unless $game_party.actors.size <= 6
@changetactics6_window.visible = false unless $game_party.actors.size <= 6
@changetactics6_window.active = false unless $game_party.actors.size <= 6
@changetactics7_window = ChangeTactics_Window.new($game_party.actors[7]) unless $game_party.actors.size <= 7
@changetactics7_window.visible = false unless $game_party.actors.size <= 7
@changetactics7_window.active = false unless $game_party.actors.size <= 7
@help_window = Window_Help.new
@help_window.y = 510
@help_window.x = 30
@tactics_window.help_window = @help_window
@spriteset = Spriteset_Map.new
Graphics.transition(STAR::STR_TIME, "Graphics/Transitions/" + STAR::STR_TYPE)
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
for i in 0..10
@tactics_bak.zoom_x += 0.2
@tactics_bak.opacity -= 40
@tactics_window.y += 40
@tactics_window.contents_opacity -=40
@team1_window.x -= 40
@tactics_window.contents_opacity -=40
@team2_window.x += 40
@tactics_window.contents_opacity -=40
@help_window.x += 40
@help_window.contents_opacity -=20
Graphics.update
end
Graphics.freeze
@tactics_bak.dispose
@spriteset.dispose
@tactics_window.dispose
@team1_window.dispose
@team2_window.dispose
@help_window.dispose
@changetactics0_window.dispose
@changetactics1_window.dispose unless $game_party.actors.size <= 1
@changetactics2_window.dispose unless $game_party.actors.size <= 2
@changetactics3_window.dispose unless $game_party.actors.size <= 3
@changetactics4_window.dispose unless $game_party.actors.size <= 4
@changetactics5_window.dispose unless $game_party.actors.size <= 5
@changetactics6_window.dispose unless $game_party.actors.size <= 6
@changetactics7_window.dispose unless $game_party.actors.size <= 7
#############
#main end
end
#############
def update
if @tactics_window.help_window.y > 421
@tactics_window.update_help
@tactics_window.help_window.y -= 30
elsif @tactics_window.help_window.y <= 420
@tactics_window.update_help
@tactics_window.help_window.y = 420
end
if @tactics_window.y > 0
@tactics_window.y -= 40
elsif @tactics_window.y <= 0
@tactics_window.y = 0
end
if @team1_window.x < -15
@team1_window.x += 40
elsif @team1_window.x >= -15
@team1_window.x = -15
end
if @team2_window.x > 321
@team2_window.x -= 30
elsif @team2_window.x >= 320
@team2_window.x = 300
end
if @tactics_window.active
update_tactics
return
end
if @changetactics0_window.active == true
@changetactics0_window.help_window = @help_window
update_changetactics0
else
@changetactics0_window.visible = false
end
if $game_party.actors.size >= 2
if @changetactics1_window.active == true
@changetactics1_window.help_window = @help_window
update_changetactics1
else
@changetactics1_window.visible = false
end
end
if $game_party.actors.size >= 3
if @changetactics2_window.active == true
@changetactics2_window.help_window = @help_window
update_changetactics2
else
@changetactics2_window.visible = false
end
end
if $game_party.actors.size >= 4
if @changetactics3_window.active == true
@changetactics3_window.help_window = @help_window
update_changetactics3
else
@changetactics3_window.visible = false
end
end
if $game_party.actors.size >= 5
if @changetactics4_window.active == true
@changetactics4_window.help_window = @help_window
update_changetactics4
else
@changetactics4_window.visible = false
end
end
if $game_party.actors.size >= 6
if @changetactics5_window.active == true
@changetactics5_window.help_window = @help_window
update_changetactics5
else
@changetactics5_window.visible = false
end
end
if $game_party.actors.size >= 7
if @changetactics6_window.active == true
@changetactics6_window.help_window = @help_window
update_changetactics6
else
@changetactics6_window.visible = false
end
end
if $game_party.actors.size == 8
if @changetactics7_window.active == true
@changetactics7_window.help_window = @help_window
update_changetactics7
else
@changetactics7_window.visible = false
end
end
#######
#update end
end
#######
def update_tactics
if $game_variables[499] == 0 and Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new(4)
return
elsif $game_variables[499] == 1 and Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
if Input.trigger?(Input::DOWN)
#@tactics_window.help_window.y = 510
if @tactics_window.index == 7
@tactics_window.index = 0
else
unless @tactics_window.index == $game_party.actors.size - 1
@tactics_window.index += 1
end
end
end
if Input.trigger?(Input::UP)
#@tactics_window.help_window.y = 510
if @tactics_window.index == 0
@tactics_window.index = $game_party.actors.size - 1
else
@tactics_window.index -= 1
end
end
if Input.trigger?(Input::RIGHT)
#@tactics_window.help_window.y = 510
unless @tactics_window.index == 4 or
@tactics_window.index == 5 or
@tactics_window.index == 6 or
@tactics_window.index == 7 or
$game_party.actors.size <= 4 or
$game_party.actors.size == 5 and @tactics_window.index >= 0 or
$game_party.actors.size == 6 and @tactics_window.index >= 1 or
$game_party.actors.size == 7 and @tactics_window.index >= 2
@tactics_window.index += 4
end
end
if Input.trigger?(Input::LEFT)
#@tactics_window.help_window.y = 510
unless @tactics_window.index == 0 or
@tactics_window.index == 1 or
@tactics_window.index == 2 or
@tactics_window.index == 3
@tactics_window.index -= 4
end
end
if Input.trigger?(Input::C)
@tactics_window.active = false
if @tactics_window.index == 0
@changetactics0_window.active = true
@changetactics0_window.visible = true
return
end
if @tactics_window.index == 1
@changetactics1_window.active = true
@changetactics1_window.visible = true
return
end
if @tactics_window.index == 2
@changetactics2_window.active = true
@changetactics2_window.visible = true
return
end
if @tactics_window.index == 3
@changetactics3_window.active = true
@changetactics3_window.visible = true
return
end
if @tactics_window.index == 4
@changetactics4_window.active = true
@changetactics4_window.visible = true
return
end
if @tactics_window.index == 5
@changetactics5_window.active = true
@changetactics5_window.visible = true
return
end
if @tactics_window.index == 6
@changetactics6_window.active = true
@changetactics6_window.visible = true
return
end
if @tactics_window.index == 7
@changetactics7_window.active = true
@changetactics7_window.visible = true
return
end
end
#######
#update_tactics end
end
#######
def update_changetactics0
if Input.trigger?(Input::B)
@tactics_window.index = 0
@changetactics0_window.visible = false
@tactics_window.active = true
@changetactics0_window.active = false
return
end
if Input.trigger?(Input::C) and @changetactics0_window.visible == true
actor_index = $game_party.actors[0].id
if @changetactics0_window.index == 0
case actor_index
when 1
$game_variables[451] = 0
when 2
$game_variables[452] = 0
when 3
$game_variables[453] = 0
when 4
$game_variables[454] = 0
when 5
$game_variables[455] = 0
when 6
$game_variables[456] = 0
when 7
$game_variables[457] = 0
when 8
$game_variables[458] = 0
when 9
$game_variables[459] = 0
when 10
$game_variables[460] = 0
when 11
$game_variables[461] = 0
end
elsif @changetactics0_window.index == 1
case actor_index
when 1
$game_variables[451] = 1
when 2
$game_variables[452] = 1
when 3
$game_variables[453] = 1
when 4
$game_variables[454] = 1
when 5
$game_variables[455] = 1
when 6
$game_variables[456] = 1
when 7
$game_variables[457] = 1
when 8
$game_variables[458] = 1
when 9
$game_variables[459] = 1
when 10
$game_variables[460] = 1
when 11
$game_variables[461] = 1
end
elsif @changetactics0_window.index == 2
case actor_index
when 1
$game_variables[451] = 2
when 2
$game_variables[452] = 2
when 3
$game_variables[453] = 2
when 4
$game_variables[454] = 2
when 5
$game_variables[455] = 2
when 6
$game_variables[456] = 2
when 7
$game_variables[457] = 2
when 8
$game_variables[458] = 2
when 9
$game_variables[459] = 2
when 10
$game_variables[460] = 2
when 11
$game_variables[461] = 2
end
elsif @changetactics0_window.index == 3
case actor_index
when 1
$game_variables[451] = 3
when 2
$game_variables[452] = 3
when 3
$game_variables[453] = 3
when 4
$game_variables[454] = 3
when 5
$game_variables[455] = 3
when 6
$game_variables[456] = 3
when 7
$game_variables[457] = 3
when 8
$game_variables[458] = 3
when 9
$game_variables[459] = 3
when 10
$game_variables[460] = 3
when 11
$game_variables[461] = 3
end
end
@tactics_window.refresh
@tactics_window.index = 0
@changetactics0_window.visible = false
@tactics_window.active = true
@changetactics0_window.active = false
return
end
if Input.trigger?(Input::DOWN)
#@tactics_window.help_window.y = 510
if @changetactics0_window.index == 3
@changetactics0_window.index = 0
else
@changetactics0_window.index += 1
end
end
if Input.trigger?(Input::UP)
#@tactics_window.help_window.y = 510
if @changetactics0_window.index == 0
@changetactics0_window.index = 3
else
@changetactics0_window.index -= 1
end
end
##########
#update_changetactics end
end
##########
def update_changetactics1
if Input.trigger?(Input::B)
@tactics_window.index = 1
@changetactics1_window.visible = false
@tactics_window.active = true
@changetactics1_window.active = false
return
end
if Input.trigger?(Input::C) and @changetactics1_window.visible == true
actor_index = $game_party.actors[1].id
if @changetactics1_window.index == 0
case actor_index
when 1
$game_variables[451] = 0
when 2
$game_variables[452] = 0
when 3
$game_variables[453] = 0
when 4
$game_variables[454] = 0
when 5
$game_variables[455] = 0
when 6
$game_variables[456] = 0
when 7
$game_variables[457] = 0
when 8
$game_variables[458] = 0
when 9
$game_variables[459] = 0
when 10
$game_variables[460] = 0
when 11
$game_variables[461] = 0
end
elsif @changetactics1_window.index == 1
case actor_index
when 1
$game_variables[451] = 1
when 2
$game_variables[452] = 1
when 3
$game_variables[453] = 1
when 4
$game_variables[454] = 1
when 5
$game_variables[455] = 1
when 6
$game_variables[456] = 1
when 7
$game_variables[457] = 1
when 8
$game_variables[458] = 1
when 9
$game_variables[459] = 1
when 10
$game_variables[460] = 1
when 11
$game_variables[461] = 1
end
elsif @changetactics1_window.index == 2
case actor_index
when 1
$game_variables[451] = 2
when 2
$game_variables[452] = 2
when 3
$game_variables[453] = 2
when 4
$game_variables[454] = 2
when 5
$game_variables[455] = 2
when 6
$game_variables[456] = 2
when 7
$game_variables[457] = 2
when 8
$game_variables[458] = 2
when 9
$game_variables[459] = 2
when 10
$game_variables[460] = 2
when 11
$game_variables[461] = 2
end
elsif @changetactics1_window.index == 3
case actor_index
when 1
$game_variables[451] = 3
when 2
$game_variables[452] = 3
when 3
$game_variables[453] = 3
when 4
$game_variables[454] = 3
when 5
$game_variables[455] = 3
when 6
$game_variables[456] = 3
when 7
$game_variables[457] = 3
when 8
$game_variables[458] = 3
when 9
$game_variables[459] = 3
when 10
$game_variables[460] = 3
when 11
$game_variables[461] = 3
end
end
@tactics_window.refresh
@tactics_window.index = 1
@changetactics1_window.visible = false
@tactics_window.active = true
@changetactics1_window.active = false
return
end
if Input.trigger?(Input::DOWN)
#@tactics_window.help_window.y = 510
if @changetactics1_window.index == 3
@changetactics1_window.index = 0
else
@changetactics1_window.index += 1
end
end
if Input.trigger?(Input::UP)
#@tactics_window.help_window.y = 510
if @changetactics1_window.index == 0
@changetactics1_window.index = 3
else
@changetactics1_window.index -= 1
end
end
##########
#update_changetactics end
end
##########
def update_changetactics2
if Input.trigger?(Input::B)
@tactics_window.index = 2
@changetactics2_window.visible = false
@tactics_window.active = true
@changetactics2_window.active = false
return
end
if Input.trigger?(Input::C) and @changetactics2_window.visible == true
actor_index = $game_party.actors[2].id
if @changetactics2_window.index == 0
case actor_index
when 1
$game_variables[451] = 0
when 2
$game_variables[452] = 0
when 3
$game_variables[453] = 0
when 4
$game_variables[454] = 0
when 5
$game_variables[455] = 0
when 6
$game_variables[456] = 0
when 7
$game_variables[457] = 0
when 8
$game_variables[458] = 0
when 9
$game_variables[459] = 0
when 10
$game_variables[460] = 0
when 11
$game_variables[461] = 0
end
elsif @changetactics2_window.index == 1
case actor_index
when 1
$game_variables[451] = 1
when 2
$game_variables[452] = 1
when 3
$game_variables[453] = 1
when 4
$game_variables[454] = 1
when 5
$game_variables[455] = 1
when 6
$game_variables[456] = 1
when 7
$game_variables[457] = 1
when 8
$game_variables[458] = 1
when 9
$game_variables[459] = 1
when 10
$game_variables[460] = 1
when 11
$game_variables[461] = 1
end
elsif @changetactics2_window.index == 2
case actor_index
when 1
$game_variables[451] = 2
when 2
$game_variables[452] = 2
when 3
$game_variables[453] = 2
when 4
$game_variables[454] = 2
when 5
$game_variables[455] = 2
when 6
$game_variables[456] = 2
when 7
$game_variables[457] = 2
when 8
$game_variables[458] = 2
when 9
$game_variables[459] = 2
when 10
$game_variables[460] = 2
when 11
$game_variables[461] = 2
end
elsif @changetactics2_window.index == 3
case actor_index
when 1
$game_variables[451] = 3
when 2
$game_variables[452] = 3
when 3
$game_variables[453] = 3
when 4
$game_variables[454] = 3
when 5
$game_variables[455] = 3
when 6
$game_variables[456] = 3
when 7
$game_variables[457] = 3
when 8
$game_variables[458] = 3
when 9
$game_variables[459] = 3
when 10
$game_variables[460] = 3
when 11
$game_variables[461] = 3
end
end
@tactics_window.refresh
@tactics_window.index = 2
@changetactics2_window.visible = false
@tactics_window.active = true
@changetactics2_window.active = false
return
end
if Input.trigger?(Input::DOWN)
#@tactics_window.help_window.y = 510
if @changetactics2_window.index == 3
@changetactics2_window.index = 0
else
@changetactics2_window.index += 1
end
end
if Input.trigger?(Input::UP)
#@tactics_window.help_window.y = 510
if @changetactics2_window.index == 0
@changetactics2_window.index = 3
else
@changetactics2_window.index -= 1
end
end
##########
#update_changetactics end
end
##########
def update_changetactics3
if Input.trigger?(Input::B)
@tactics_window.index = 3
@changetactics3_window.visible = false
@tactics_window.active = true
@changetactics3_window.active = false
return
end
if Input.trigger?(Input::C) and @changetactics3_window.visible == true
actor_index = $game_party.actors[3].id
if @changetactics3_window.index == 0
case actor_index
when 1
$game_variables[451] = 0
when 2
$game_variables[452] = 0
when 3
$game_variables[453] = 0
when 4
$game_variables[454] = 0
when 5
$game_variables[455] = 0
when 6
$game_variables[456] = 0
when 7
$game_variables[457] = 0
when 8
$game_variables[458] = 0
when 9
$game_variables[459] = 0
when 10
$game_variables[460] = 0
when 11
$game_variables[461] = 0
end
elsif @changetactics3_window.index == 1
case actor_index
when 1
$game_variables[451] = 1
when 2
$game_variables[452] = 1
when 3
$game_variables[453] = 1
when 4
$game_variables[454] = 1
when 5
$game_variables[455] = 1
when 6
$game_variables[456] = 1
when 7
$game_variables[457] = 1
when 8
$game_variables[458] = 1
when 9
$game_variables[459] = 1
when 10
$game_variables[460] = 1
when 11
$game_variables[461] = 1
end
elsif @changetactics3_window.index == 2
case actor_index
when 1
$game_variables[451] = 2
when 2
$game_variables[452] = 2
when 3
$game_variables[453] = 2
when 4
$game_variables[454] = 2
when 5
$game_variables[455] = 2
when 6
$game_variables[456] = 2
when 7
$game_variables[457] = 2
when 8
$game_variables[458] = 2
when 9
$game_variables[459] = 2
when 10
$game_variables[460] = 2
when 11
$game_variables[461] = 2
end
elsif @changetactics3_window.index == 3
case actor_index
when 1
$game_variables[451] = 3
when 2
$game_variables[452] = 3
when 3
$game_variables[453] = 3
when 4
$game_variables[454] = 3
when 5
$game_variables[455] = 3
when 6
$game_variables[456] = 3
when 7
$game_variables[457] = 3
when 8
$game_variables[458] = 3
when 9
$game_variables[459] = 3
when 10
$game_variables[460] = 3
when 11
$game_variables[461] = 3
end
end
@tactics_window.refresh
@tactics_window.index = 3
@changetactics3_window.visible = false
@tactics_window.active = true
@changetactics3_window.active = false
return
end
if Input.trigger?(Input::DOWN)
#@tactics_window.help_window.y = 510
if @changetactics3_window.index == 3
@changetactics3_window.index = 0
else
@changetactics3_window.index += 1
end
end
if Input.trigger?(Input::UP)
#@tactics_window.help_window.y = 510
if @changetactics3_window.index == 0
@changetactics3_window.index = 3
else
@changetactics3_window.index -= 1
end
end
##########
#update_changetactics end
end
##########
def update_changetactics4
if Input.trigger?(Input::B)
@tactics_window.index = 4
@changetactics4_window.visible = false
@tactics_window.active = true
@changetactics4_window.active = false
return
end
if Input.trigger?(Input::C) and @changetactics4_window.visible == true
actor_index = $game_party.actors[4].id
if @changetactics4_window.index == 0
case actor_index
when 1
$game_variables[451] = 0
when 2
$game_variables[452] = 0
when 3
$game_variables[453] = 0
when 4
$game_variables[454] = 0
when 5
$game_variables[455] = 0
when 6
$game_variables[456] = 0
when 7
$game_variables[457] = 0
when 8
$game_variables[458] = 0
when 9
$game_variables[459] = 0
when 10
$game_variables[460] = 0
when 11
$game_variables[461] = 0
end
elsif @changetactics4_window.index == 1
case actor_index
when 1
$game_variables[451] = 1
when 2
$game_variables[452] = 1
when 3
$game_variables[453] = 1
when 4
$game_variables[454] = 1
when 5
$game_variables[455] = 1
when 6
$game_variables[456] = 1
when 7
$game_variables[457] = 1
when 8
$game_variables[458] = 1
when 9
$game_variables[459] = 1
when 10
$game_variables[460] = 1
when 11
$game_variables[461] = 1
end
elsif @changetactics4_window.index == 2
case actor_index
when 1
$game_variables[451] = 2
when 2
$game_variables[452] = 2
when 3
$game_variables[453] = 2
when 4
$game_variables[454] = 2
when 5
$game_variables[455] = 2
when 6
$game_variables[456] = 2
when 7
$game_variables[457] = 2
when 8
$game_variables[458] = 2
when 9
$game_variables[459] = 2
when 10
$game_variables[460] = 2
when 11
$game_variables[461] = 2
end
elsif @changetactics4_window.index == 3
case actor_index
when 1
$game_variables[451] = 3
when 2
$game_variables[452] = 3
when 3
$game_variables[453] = 3
when 4
$game_variables[454] = 3
when 5
$game_variables[455] = 3
when 6
$game_variables[456] = 3
when 7
$game_variables[457] = 3
when 8
$game_variables[458] = 3
when 9
$game_variables[459] = 3
when 10
$game_variables[460] = 3
when 11
$game_variables[461] = 3
end
end
@tactics_window.refresh
@tactics_window.index = 4
@changetactics4_window.visible = false
@tactics_window.active = true
@changetactics4_window.active = false
return
end
if Input.trigger?(Input::DOWN)
#@tactics_window.help_window.y = 510
if @changetactics4_window.index == 3
@changetactics4_window.index = 0
else
@changetactics4_window.index += 1
end
end
if Input.trigger?(Input::UP)
#@tactics_window.help_window.y = 510
if @changetactics4_window.index == 0
@changetactics4_window.index = 3
else
@changetactics4_window.index -= 1
end
end
##########
#update_changetactics end
end
##########
def update_changetactics5
if Input.trigger?(Input::B)
@tactics_window.index = 5
@changetactics5_window.visible = false
@tactics_window.active = true
@changetactics5_window.active = false
return
end
if Input.trigger?(Input::C) and @changetactics5_window.visible == true
actor_index = $game_party.actors[5].id
if @changetactics5_window.index == 0
case actor_index
when 1
$game_variables[451] = 0
when 2
$game_variables[452] = 0
when 3
$game_variables[453] = 0
when 4
$game_variables[454] = 0
when 5
$game_variables[455] = 0
when 6
$game_variables[456] = 0
when 7
$game_variables[457] = 0
when 8
$game_variables[458] = 0
when 9
$game_variables[459] = 0
when 10
$game_variables[460] = 0
when 11
$game_variables[461] = 0
end
elsif @changetactics5_window.index == 1
case actor_index
when 1
$game_variables[451] = 1
when 2
$game_variables[452] = 1
when 3
$game_variables[453] = 1
when 4
$game_variables[454] = 1
when 5
$game_variables[455] = 1
when 6
$game_variables[456] = 1
when 7
$game_variables[457] = 1
when 8
$game_variables[458] = 1
when 9
$game_variables[459] = 1
when 10
$game_variables[460] = 1
when 11
$game_variables[461] = 1
end
elsif @changetactics5_window.index == 2
case actor_index
when 1
$game_variables[451] = 2
when 2
$game_variables[452] = 2
when 3
$game_variables[453] = 2
when 4
$game_variables[454] = 2
when 5
$game_variables[455] = 2
when 6
$game_variables[456] = 2
when 7
$game_variables[457] = 2
when 8
$game_variables[458] = 2
when 9
$game_variables[459] = 2
when 10
$game_variables[460] = 2
when 11
$game_variables[461] = 2
end
elsif @changetactics5_window.index == 3
case actor_index
when 1
$game_variables[451] = 3
when 2
$game_variables[452] = 3
when 3
$game_variables[453] = 3
when 4
$game_variables[454] = 3
when 5
$game_variables[455] = 3
when 6
$game_variables[456] = 3
when 7
$game_variables[457] = 3
when 8
$game_variables[458] = 3
when 9
$game_variables[459] = 3
when 10
$game_variables[460] = 3
when 11
$game_variables[461] = 3
end
end
@tactics_window.refresh
@tactics_window.index = 5
@changetactics5_window.visible = false
@tactics_window.active = true
@changetactics5_window.active = false
return
end
if Input.trigger?(Input::DOWN)
#@tactics_window.help_window.y = 510
if @changetactics5_window.index == 3
@changetactics5_window.index = 0
else
@changetactics5_window.index += 1
end
end
if Input.trigger?(Input::UP)
#@tactics_window.help_window.y = 510
if @changetactics5_window.index == 0
@changetactics5_window.index = 3
else
@changetactics5_window.index -= 1
end
end
##########
#update_changetactics end
end
##########
def update_changetactics6
if Input.trigger?(Input::B)
@tactics_window.index = 6
@changetactics6_window.visible = false
@tactics_window.active = true
@changetactics6_window.active = false
return
end
if Input.trigger?(Input::C) and @changetactics6_window.visible == true
actor_index = $game_party.actors[6].id
if @changetactics6_window.index == 0
case actor_index
when 1
$game_variables[451] = 0
when 2
$game_variables[452] = 0
when 3
$game_variables[453] = 0
when 4
$game_variables[454] = 0
when 5
$game_variables[455] = 0
when 6
$game_variables[456] = 0
when 7
$game_variables[457] = 0
when 8
$game_variables[458] = 0
when 9
$game_variables[459] = 0
when 10
$game_variables[460] = 0
when 11
$game_variables[461] = 0
end
elsif @changetactics6_window.index == 1
case actor_index
when 1
$game_variables[451] = 1
when 2
$game_variables[452] = 1
when 3
$game_variables[453] = 1
when 4
$game_variables[454] = 1
when 5
$game_variables[455] = 1
when 6
$game_variables[456] = 1
when 7
$game_variables[457] = 1
when 8
$game_variables[458] = 1
when 9
$game_variables[459] = 1
when 10
$game_variables[460] = 1
when 11
$game_variables[461] = 1
end
elsif @changetactics6_window.index == 2
case actor_index
when 1
$game_variables[451] = 2
when 2
$game_variables[452] = 2
when 3
$game_variables[453] = 2
when 4
$game_variables[454] = 2
when 5
$game_variables[455] = 2
when 6
$game_variables[456] = 2
when 7
$game_variables[457] = 2
when 8
$game_variables[458] = 2
when 9
$game_variables[459] = 2
when 10
$game_variables[460] = 2
when 11
$game_variables[461] = 2
end
elsif @changetactics6_window.index == 3
case actor_index
when 1
$game_variables[451] = 3
when 2
$game_variables[452] = 3
when 3
$game_variables[453] = 3
when 4
$game_variables[454] = 3
when 5
$game_variables[455] = 3
when 6
$game_variables[456] = 3
when 7
$game_variables[457] = 3
when 8
$game_variables[458] = 3
when 9
$game_variables[459] = 3
when 10
$game_variables[460] = 3
when 11
$game_variables[461] = 3
end
end
@tactics_window.refresh
@tactics_window.index = 6
@changetactics6_window.visible = false
@tactics_window.active = true
@changetactics6_window.active = false
return
end
if Input.trigger?(Input::DOWN)
#@tactics_window.help_window.y = 510
if @changetactics6_window.index == 3
@changetactics6_window.index = 0
else
@changetactics6_window.index += 1
end
end
if Input.trigger?(Input::UP)
#@tactics_window.help_window.y = 510
if @changetactics6_window.index == 0
@changetactics6_window.index = 3
else
@changetactics6_window.index -= 1
end
end
##########
#update_changetactics end
end
##########
def update_changetactics7
if Input.trigger?(Input::B)
@tactics_window.index = 7
@changetactics7_window.visible = false
@tactics_window.active = true
@changetactics7_window.active = false
return
end
if Input.trigger?(Input::C) and @changetactics7_window.visible == true
actor_index = $game_party.actors[7].id
if @changetactics7_window.index == 0
case actor_index
when 1
$game_variables[451] = 0
when 2
$game_variables[452] = 0
when 3
$game_variables[453] = 0
when 4
$game_variables[454] = 0
when 5
$game_variables[455] = 0
when 6
$game_variables[456] = 0
when 7
$game_variables[457] = 0
when 8
$game_variables[458] = 0
when 9
$game_variables[459] = 0
when 10
$game_variables[460] = 0
when 11
$game_variables[461] = 0
end
elsif @changetactics7_window.index == 1
case actor_index
when 1
$game_variables[451] = 1
when 2
$game_variables[452] = 1
when 3
$game_variables[453] = 1
when 4
$game_variables[454] = 1
when 5
$game_variables[455] = 1
when 6
$game_variables[456] = 1
when 7
$game_variables[457] = 1
when 8
$game_variables[458] = 1
when 9
$game_variables[459] = 1
when 10
$game_variables[460] = 1
when 11
$game_variables[461] = 1
end
elsif @changetactics7_window.index == 2
case actor_index
when 1
$game_variables[451] = 2
when 2
$game_variables[452] = 2
when 3
$game_variables[453] = 2
when 4
$game_variables[454] = 2
when 5
$game_variables[455] = 2
when 6
$game_variables[456] = 2
when 7
$game_variables[457] = 2
when 8
$game_variables[458] = 2
when 9
$game_variables[459] = 2
when 10
$game_variables[460] = 2
when 11
$game_variables[461] = 2
end
elsif @changetactics7_window.index == 3
case actor_index
when 1
$game_variables[451] = 3
when 2
$game_variables[452] = 3
when 3
$game_variables[453] = 3
when 4
$game_variables[454] = 3
when 5
$game_variables[455] = 3
when 6
$game_variables[456] = 3
when 7
$game_variables[457] = 3
when 8
$game_variables[458] = 3
when 9
$game_variables[459] = 3
when 10
$game_variables[460] = 3
when 11
$game_variables[461] = 3
end
end
@tactics_window.refresh
@tactics_window.index = 7
@changetactics7_window.visible = false
@tactics_window.active = true
@changetactics7_window.active = false
return
end
if Input.trigger?(Input::DOWN)
#@tactics_window.help_window.y = 510
if @changetactics7_window.index == 3
@changetactics7_window.index = 0
else
@changetactics7_window.index += 1
end
end
if Input.trigger?(Input::UP)
#@tactics_window.help_window.y = 510
if @changetactics7_window.index == 0
@changetactics7_window.index = 3
else
@changetactics7_window.index -= 1
end
end
##########
#update_changetactics7 end
end
##########
##########
#tactics class end
end
##########