흠. 예전께 왜 안되나 밧더니 줄이 짤렷더군요. 음... 그것이 공작소 게시판의 제한된 줄이 있어서 ㅡㅡ;
(그 스크립트 원본이 무지 김) 사설은 집어치우고. 그런 관계로 주석은 모두 삭제했습니다. 힘드네염.
그래도 출처는 남겨 두어야 된다고 생각해서 출처는 그대로 남겼습니다. 글엄 조은게임 잘만드셈
# http://members.jcom.home.ne.jp/cogwheel/
class Scene_Battle
attr_reader :status_window # 긚긡??긚긂귻깛긤긂
attr_reader :spriteset # 긫긣깑긚긵깋귽긣
attr_reader :scroll_time # 긚긏깏?깛댷벍딈?렄듩
attr_reader :zoom_rate # 밎긫긣깋?딈?댧뭫
attr_reader :drive # 긇긽깋뗭벍
attr_accessor :force # 귺긏긘깈깛떗맕뱗
attr_accessor :camera # 뙸띪궻긇긽깋룋렃롌
def atb_setup
speed = 150
@active = 1
@action = 2
@anime_wait = false
@damage_wait = 10
@enemy_speed = 40
@force = 2
@drive = true
@scroll_time = 15
@zoom_rate = [0.2, 1.0]
@help_time = 40
@escape == false
@camera = nil
@max = 0
@turn_cnt = 0
@help_wait = 0
@action_battlers = []
@synthe = []
@spell_p = {}
@spell_e = {}
@command_a = false
@command = []
@party = false
for battler in $game_party.actors + $game_troop.enemies
spell_reset(battler)
battler.at = battler.agi * rand(speed / 2)
battler.damage_pop = {}
battler.damage = {}
battler.damage_sp = {}
battler.critical = {}
battler.recover_hp = {}
battler.recover_sp = {}
battler.state_p = {}
battler.state_m = {}
battler.animation = []
if battler.is_a?(Game_Actor)
@max += battler.agi
end
end
@max *= speed
@max /= $game_party.actors.size
for battler in $game_party.actors + $game_troop.enemies
battler.atp = 100 * battler.at / @max
end
end
#--------------------------------------------------------------------------
# 걶 AT긒?긙Max렄SE
#--------------------------------------------------------------------------
def fullat_se
Audio.se_play("Audio/SE/033-switch02", 80, 100)
end
#--------------------------------------------------------------------------
# 걶 깒긹깑귺긞긵SE
#--------------------------------------------------------------------------
def levelup_se
Audio.se_play("Audio/SE/056-Right02", 80, 100)
end
#--------------------------------------------------------------------------
# 걶 긚긌깑뢐벦SE
#--------------------------------------------------------------------------
def skill_se
Audio.se_play("Audio/SE/056-Right02", 80, 150)
end
end
class Window_Base < Window
#--------------------------------------------------------------------------
# 걶 ATG 궻?됪
# actor : 귺긏??
# x : ?됪먩 X 띆뷭
# y : ?됪먩 Y 띆뷭
# width : ?됪먩궻븴
#--------------------------------------------------------------------------
def draw_actor_atg(actor, x, y, width = 144)
if @at_gauge == nil
@plus_x = 0
@rate_x = 0
@plus_y = 16
@plus_width = 0
@rate_width = 100
@width = @plus_width + width * @rate_width / 100
@height = 16
@align1 = 0
@align2 = 1
@align3 = 0
grade1 = 1
grade2 = 0
color1 = Color.new(0, 0, 0)
color2 = Color.new(255, 255, 192)
color3 = Color.new(0, 0, 0, 192)
color4 = Color.new(0, 0, 64, 192)
# 긒?긙궻륡먠믦
# 믅륂렄궻륡먠믦
color5 = Color.new(0, 64, 80)
color6 = Color.new(0, 128, 160)
# 긒?긙궕MAX궻렄궻륡먠믦
color7 = Color.new(80, 0, 0)
color8 = Color.new(240, 0, 0)
# 쁀똤긚긌깑럊뾭렄궻륡먠믦
color9 = Color.new(80, 64, 32)
color10 = Color.new(240, 192, 96)
# 긚긌깑뎣룯렄궻륡먠믦
color11 = Color.new(80, 0, 64)
color12 = Color.new(240, 0, 192)
# 긒?긙궻?됪
gauge_rect_at(@width, @height, @align3, color1, color2,
color3, color4, color5, color6, color7, color8,
color9, color10, color11, color12, grade1, grade2)
end
# 빾릶at궸?됪궥귡긒?긙궻븴귩묆볺
if actor.rtp == 0
at = (width + @plus_width) * actor.atp * @rate_width / 10000
else
at = (width + @plus_width) * actor.rt * @rate_width / actor.rtp / 100
end
if at > width
at = width
end
# 긒?긙궻뜺땗갋뭷돍?궑뱳궻뺚맫
case @align1
when 1
x += (@rect_width - width) / 2
when 2
x += @rect_width - width
end
case @align2
when 1
y -= @height / 2
when 2
y -= @height
end
self.contents.blt(x + @plus_x + width * @rate_x / 100, y + @plus_y,
@at_gauge, Rect.new(0, 0, @width, @height))
if @align3 == 0
rect_x = 0
else
x += @width - at - 1
rect_x = @width - at - 1
end
# 긒?긙궻륡먠믦
if at == width
# MAX렄궻긒?긙?됪
self.contents.blt(x + @plus_x + @width * @rate_x / 100, y + @plus_y,
@at_gauge, Rect.new(rect_x, @height * 2, at, @height))
else
if actor.rtp == 0
# 믅륂렄궻긒?긙?됪
self.contents.blt(x + @plus_x + @width * @rate_x / 100, y + @plus_y,
@at_gauge, Rect.new(rect_x, @height, at, @height))
else
if actor.spell == true
# 쁀똤긚긌깑럊뾭렄궻긒?긙?됪
self.contents.blt(x + @plus_x + @width * @rate_x / 100, y + @plus_y,
@at_gauge, Rect.new(rect_x, @height * 3, at, @height))
else
# 긚긌깑뎣룯렄궻긒?긙?됪
self.contents.blt(x + @plus_x + @width * @rate_x / 100, y + @plus_y,
@at_gauge, Rect.new(rect_x, @height * 4, at, @height))
end
end
end
end
end
class Scene_Battle
def main
$game_temp.in_battle = true
$game_temp.battle_turn = 0
$game_temp.battle_event_flags.clear
$game_temp.battle_abort = false
$game_temp.battle_main_phase = false
$game_temp.battleback_name = $game_map.battleback_name
$game_temp.forcing_battler = nil
# 긫긣깑귽긹깛긣뾭귽깛?긵깏?귩룊딖돸
$game_system.battle_interpreter.setup(nil, 0)
# 긣깑?긵귩?뷈
@troop_id = $game_temp.battle_troop_id
$game_troop.setup(@troop_id)
atb_setup
# 귺긏??긓?깛긤긂귻깛긤긂귩띿맟
s1 = $data_system.words.attack
s2 = $data_system.words.skill
s3 = $data_system.words.guard
s4 = $data_system.words.item
@actor_command_window = Window_Command.new(160, [s1, s2, s3, s4])
@actor_command_window.y = 160
@actor_command_window.back_opacity = 160
@actor_command_window.active = false
@actor_command_window.visible = false
# 궩궻뫜궻긂귻깛긤긂귩띿맟
@party_command_window = Window_PartyCommand.new
@help_window = Window_Help.new
@help_window.back_opacity = 160
@help_window.visible = false
@status_window = Window_BattleStatus.new
@message_window = Window_Message.new
# 긚긵깋귽긣긜긞긣귩띿맟
@spriteset = Spriteset_Battle.new
# 긂긃귽긣긇긂깛긣귩룊딖돸
@wait_count = 0
# 긣깋깛긙긘깈깛렳뛱
if $data_system.battle_transition == ""
Graphics.transition(20)
else
Graphics.transition(40, "Graphics/Transitions/" +
$data_system.battle_transition)
end
# 긵깒긫긣깑긲긃?긛둎럑
start_phase1
# 긽귽깛깑?긵
loop do
# 긒??됪뽋귩뛛륷
Graphics.update
# 볺쀍륃뺪귩뛛륷
Input.update
# 긲깒??뛛륷
update
# 됪뽋궕먛귟뫶귦궯궫귞깑?긵귩뭷뭚
if $scene != self
break
end
end
# ?긞긵귩깏긲깒긞긘깄
$game_map.refresh
# 긣깋깛긙긘깈깛?뷈
Graphics.freeze
# 긂귻깛긤긂귩됶뺳
@actor_command_window.dispose
@party_command_window.dispose
@help_window.dispose
@status_window.dispose
@message_window.dispose
if @skill_window != nil
@skill_window.dispose
end
if @item_window != nil
@item_window.dispose
end
if @result_window != nil
@result_window.dispose
end
# 긚긵깋귽긣긜긞긣귩됶뺳
@spriteset.dispose
# ?귽긣깑됪뽋궸먛귟뫶궑뭷궻뤾뜃
if $scene.is_a?(Scene_Title)
# 됪뽋귩긲긃?긤귺긂긣
Graphics.transition
Graphics.freeze
end
# 먰벉긡긚긣궔귞긒??긆?긫?됪뽋댥둖궸먛귟뫶궑뭷궻뤾뜃
if $BTEST and not $scene.is_a?(Scene_Gameover)
$scene = nil
end
end
#--------------------------------------------------------------------------
# 걶 룦봲뵽믦
#--------------------------------------------------------------------------
def judge
# 멣뽅뵽믦궕?갂귏궫궼긬?긡귻릐릶궕 0 릐궻뤾뜃
if $game_party.all_dead? or $game_party.actors.size == 0
# 봲뻢됀?궻뤾뜃
if $game_temp.battle_can_lose
# 긫긣깑둎럑멟궻 BGM 궸뽣궥
$game_system.bgm_play($game_temp.map_bgm)
# 긫긣깑뢎뿹
battle_end(2)
# true 귩뺅궥
return true
end
# 긒??긆?긫?긲깋긐귩긜긞긣
$game_temp.gameover = true
# true 귩뺅궥
return true
end
# 긄긨??궕 1 뫬궳귖뫔띪궥귢궽 false 귩뺅궥
for enemy in $game_troop.enemies
if enemy.exist?
return false
end
end
# 귺긲??긫긣깑긲긃?긛둎럑 (룦뿕)
start_phase5
# true 귩뺅궥
return true
end
#--------------------------------------------------------------------------
# 걶 긲깒??뛛륷
#--------------------------------------------------------------------------
def update
# 긫긣깑귽x깛긣렳뛱뭷궻뤾뜃
if $game_system.battle_interpreter.running?
if @command.size > 0
@command_a = false
@command = []
command_delete
end
@status_window.at_refresh
# 귽깛?긵깏?귩뛛륷
$game_system.battle_interpreter.update
# 귺긏긘깈깛귩떗맕궠귢궲궋귡긫긣깋?궕뫔띪궢궶궋뤾뜃
if $game_temp.forcing_battler == nil
# 긫긣깑귽긹깛긣궻렳뛱궕뢎귦궯궫뤾뜃
unless $game_system.battle_interpreter.running?
# 긫긣깑귽긹깛긣궻긜긞긣귺긞긵귩띋렳뛱
@status_window.refresh
setup_battle_event
end
end
end
# 긘긚긡? (?귽??)갂됪뽋귩뛛륷
$game_system.update
$game_screen.update
# ?귽??궕 0 궸궶궯궫뤾뜃
if $game_system.timer_working and $game_system.timer == 0
# 긫긣깑뭷뭚
$game_temp.battle_abort = true
end
# 긂귻깛긤긂귩뛛륷
@help_window.update
@party_command_window.update
@actor_command_window.update
@status_window.update
@message_window.update
# 긚긵깋귽긣긜긞긣귩뛛륷
@spriteset.update
# 긣깋깛긙긘깈깛룉뿚뭷궻뤾뜃
if $game_temp.transition_processing
# 긣깋깛긙긘깈깛룉뿚뭷긲깋긐귩긏깏귺
$game_temp.transition_processing = false
# 긣깋깛긙긘깈깛렳뛱
if $game_temp.transition_name == ""
Graphics.transition(20)
else
Graphics.transition(40, "Graphics/Transitions/" +
$game_temp.transition_name)
end
end
# 긽긞긜?긙긂귻깛긤긂?렑뭷궻뤾뜃
if $game_temp.message_window_showing
return
end
# 긒??긆?긫?궻뤾뜃
if $game_temp.gameover
# 긒??긆?긫?됪뽋궸먛귟뫶궑
$scene = Scene_Gameover.new
return
end
# ?귽긣깑됪뽋궸뽣궥뤾뜃
if $game_temp.to_title
# ?귽긣깑됪뽋궸먛귟뫶궑
$scene = Scene_Title.new
return
end
# 긫긣깑뭷뭚궻뤾뜃
if $game_temp.battle_abort
# 긫긣깑둎럑멟궻 BGM 궸뽣궥
$game_system.bgm_play($game_temp.map_bgm)
# 긫긣깑뢎뿹
battle_end(1)
return
end
# 긶깑긵긂귻깛긤긂?렑뭷궻뤾뜃
if @help_wait > 0
@help_wait -= 1
if @help_wait == 0
# 긶깑긵긂귻깛긤긂귩덨궥
@help_window.visible = false
end
end
# 긲긃?긛궸귝궯궲빁딌
case @phase
when 0 # AT긒?긙뛛륷긲긃?긛
if anime_wait_return
update_phase0
end
when 1 # 긵깒긫긣깑긲긃?긛
update_phase1
return
when 2 # 긬?긡귻긓?깛긤긲긃?긛
update_phase2
return
when 5 # 귺긲??긫긣깑긲긃?긛
update_phase5
return
end
if $scene != self
return
end
if @phase == 0
if @command.size != 0 # 귺긏??긓?깛긤긲긃?긛
if @command_a == false
start_phase3
end
update_phase3
end
# 긂긃귽긣뭷궻뤾뜃
if @wait_count > 0
# 긂긃귽긣긇긂깛긣귩뙵귞궥
@wait_count -= 1
return
end
update_phase4
end
end
#==============================================================================
# 걾 Scene_Battle (빁뒆믦? 2)
#------------------------------------------------------------------------------
# ?긫긣깑됪뽋궻룉뿚귩뛱궎긏깋긚궳궥갃
#==============================================================================
#--------------------------------------------------------------------------
# 걶 긲깒??뛛륷 (AT긒?긙뛛륷긲긃?긛)
#--------------------------------------------------------------------------
def update_phase0
if $game_temp.battle_turn == 0
$game_temp.battle_turn = 1
end
# B ??깛궕돓궠귢궫뤾뜃
if @command_a == false and @party == false
if Input.trigger?(Input::B)
# 긌긿깛긜깑 SE 귩뎶몋
$game_system.se_play($data_system.cancel_se)
@party = true
end
end
if @party == true and
((@action > 0 and @action_battlers.empty?) or (@action == 0 and
(@action_battlers.empty? or @action_battlers[0].phase == 1)))
# 긬?긡귻긓?깛긤긲긃?긛귉
start_phase2
return
end
# AT긒?긙몵돿룉뿚
cnt = 0
for battler in $game_party.actors + $game_troop.enemies
active?(battler)
if battler.rtp == 0
if battler.at >= @max
if battler.is_a?(Game_Actor)
if battler.inputable?
unless @action_battlers.include?(battler) or
@command.include?(battler) or @escape == true
if battler.current_action.forcing
fullat_se
force_action(battler)
action_start(battler)
else
fullat_se
@command.push(battler)
end
end
else
unless @action_battlers.include?(battler) or
battler == @command[0]
battler.current_action.clear
if @command.include?(battler)
@command.delete(battler)
else
if battler.movable?
fullat_se
end
end
action_start(battler)
end
end
else
unless @action_battlers.include?(battler)
if battler.current_action.forcing
force_action(battler)
action_start(battler)
else
if @enemy_speed != 0
if rand(@enemy_speed) == 0
number = cnt - $game_party.actors.size
enemy_action(number)
end
else
number = cnt - $game_party.actors.size
enemy_action(number)
end
end
end
end
else
battler.at += battler.agi
if battler.guarding?
battler.at += battler.agi
end
if battler.movable?
battler.atp = 100 * battler.at / @max
end
end
else
if battler.rt >= battler.rtp
speller = synthe?(battler)
if speller != nil
battler = speller[0]
end
unless @action_battlers.include?(battler)
if battler.is_a?(Game_Actor)
fullat_se
end
battler.rt = battler.rtp
action_start(battler)
end
else
battler.rt += battler.agi
speller = synthe?(battler)
if speller != nil
for spell in speller
if spell != battler
spell.rt += battler.agi
end
end
end
end
end
cnt += 1
end
# AT긒?긙귩깏긲깒긞긘깄
@status_window.at_refresh
# 벀몪룉뿚
if @escape == true and
((@action > 0 and @action_battlers.empty?) or (@action == 0 and
(@action_battlers.empty? or @action_battlers[0].phase == 1)))
temp = false
for battler in $game_party.actors
if battler.inputable?
temp = true
end
end
if temp == true
for battler in $game_party.actors
if battler.at < @max and battler.inputable?
temp = false
break
end
end
if temp == true
@escape = false
for battler in $game_party.actors
battler.at %= @max
end
$game_temp.battle_main_phase = false
update_phase2_escape
end
end
end
end
#--------------------------------------------------------------------------
# 걶 긬?긡귻긓?깛긤긲긃?긛둎럑
#--------------------------------------------------------------------------
def start_phase2
# 긲긃?긛 2 궸댷뛱
@phase = 2
@party = false
# 긬?긡귻긓?깛긤긂귻깛긤긂귩뾎뚼돸
@party_command_window.active = true
@party_command_window.visible = true
# 귺긏??귩뷄멗묖륉뫴궸먠믦
@actor_index = -1
# 귺긏??긓?깛긤긂귻깛긤긂귩뼰뚼돸
@actor_command_window.active = false
@actor_command_window.visible = false
if @command.size != 0
# 귺긏??궻뼻뽅긄긲긃긏긣 OFF
if @active_actor != nil
@active_actor.blink = false
end
end
# 긇긽깋긜긞긣
@camera == "party"
@spriteset.screen_target(0, 0, 1)
# 긽귽깛긲긃?긛긲깋긐귩긏깏귺
$game_temp.battle_main_phase = false
end
#--------------------------------------------------------------------------
# 걶 긲깒??뛛륷 (긬?긡귻긓?깛긤긲긃?긛)
#--------------------------------------------------------------------------
def update_phase2
# C ??깛궕돓궠귢궫뤾뜃
if Input.trigger?(Input::C)
# 긬?긡귻긓?깛긤긂귻깛긤긂궻긇??깑댧뭫궳빁딌
case @party_command_window.index
when 0 # 먰궎
# 긬?긡귻긓?깛긤긂귻깛긤긂귩뼰뚼돸
@party_command_window.active = false
@party_command_window.visible = false
# 뙂믦 SE 귩뎶몋
$game_system.se_play($data_system.decision_se)
@escape = false
@phase = 0
if $game_temp.battle_turn == 0
$game_temp.battle_turn = 1
end
if @command_a == true
# 귺긏??긓?깛긤긲긃?긛둎럑
start_phase3
else
$game_temp.battle_main_phase = true
end
when 1 # 벀궛귡
# 벀몪됀?궳궼궶궋뤾뜃
if $game_temp.battle_can_escape == false
# 긳긗? SE 귩뎶몋
$game_system.se_play($data_system.buzzer_se)
return
end
# 뙂믦 SE 귩뎶몋
$game_system.se_play($data_system.decision_se)
@phase = 0
# 긬?긡귻긓?깛긤긂귻깛긤긂귩뼰뚼돸
@party_command_window.active = false
@party_command_window.visible = false
$game_temp.battle_main_phase = true
if $game_temp.battle_turn == 0
update_phase2_escape
$game_temp.battle_turn = 1
for battler in $game_party.actors
battler.at -= @max / 2
end
return
end
# 뙂믦 SE 귩뎶몋
$game_system.se_play($data_system.decision_se)
@escape = true
for battler in $game_party.actors
@command_a = false
@command.delete(battler)
@action_battlers.delete(battler)
skill_reset(battler)
end
end
return
end
end
#--------------------------------------------------------------------------
# 걶 귺긲??긫긣깑긲긃?긛둎럑
#--------------------------------------------------------------------------
def start_phase5
# 긲긃?긛 5 궸댷뛱
@phase = 5
# 긫긣깑뢎뿹 ME 귩뎶몋
$game_system.me_play($game_system.battle_end_me)
# 긫긣깑둎럑멟궻 BGM 궸뽣궥
$game_system.bgm_play($game_temp.map_bgm)
# EXP갂긕?깑긤갂긣깒긙긿?귩룊딖돸
exp = 0
gold = 0
treasures = []
if @active_actor != nil
@active_actor.blink = false
end
# 긽귽깛긲긃?긛긲깋긐귩긜긞긣
$game_temp.battle_main_phase = true
# 긬?긡귻긓?깛긤긂귻깛긤긂귩뼰뚼돸
@party_command_window.active = false
@party_command_window.visible = false
# 귺긏??긓?깛긤긂귻깛긤긂귩뼰뚼돸
@actor_command_window.active = false
@actor_command_window.visible = false
if @skill_window != nil
# 긚긌깑긂귻깛긤긂귩됶뺳
@skill_window.dispose
@skill_window = nil
end
if @item_window != nil
# 귺귽긡?긂귻깛긤긂귩됶뺳
@item_window.dispose
@item_window = nil
end
# 긶깑긵긂귻깛긤긂귩덨궥
@help_window.visible = false
# 깑?긵
for enemy in $game_troop.enemies
# 긄긨??궕덨귢륉뫴궳궶궋뤾뜃
unless enemy.hidden
# 둳벦 EXP갂긕?깑긤귩믁돿
exp += enemy.exp
gold += enemy.gold
# 긣깒긙긿?뢯뙸뵽믦
if rand(100) < enemy.treasure_prob
if enemy.item_id > 0
treasures.push($data_items[enemy.item_id])
end
if enemy.weapon_id > 0
treasures.push($data_weapons[enemy.weapon_id])
end
if enemy.armor_id > 0
treasures.push($data_armors[enemy.armor_id])
end
end
end
end
# 긣깒긙긿?궻릶귩 6 뙿귏궳궸뙽믦
treasures = treasures[0..5]
# EXP 둳벦
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)
actor.damage[[actor, -1]] = "Level up!"
actor.up_level = actor.level - last_level
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
# 긫긣깑깏긗깑긣긂귻깛긤긂귩띿맟
@result_window = Window_BattleResult.new(exp, gold, treasures)
# 긂긃귽긣긇긂깛긣귩먠믦
@phase5_wait_count = 100
end
#--------------------------------------------------------------------------
# 걶 긲깒??뛛륷 (귺긲??긫긣깑긲긃?긛)
#--------------------------------------------------------------------------
def update_phase5
# 긂긃귽긣긇긂깛긣궕 0 귝귟묈궖궋뤾뜃
if @phase5_wait_count > 0
# 긂긃귽긣긇긂깛긣귩뙵귞궥
@phase5_wait_count -= 1
# 긂긃귽긣긇긂깛긣궕 0 궸궶궯궫뤾뜃
if @phase5_wait_count == 0
# 깏긗깑긣긂귻깛긤긂귩?렑
@result_window.visible = true
# 긽귽깛긲긃?긛긲깋긐귩긏깏귺
$game_temp.battle_main_phase = false
# 긚긡??긚긂귻깛긤긂귩깏긲깒긞긘깄
@status_window.refresh
for actor in $game_party.actors
if actor.damage.include?([actor, 0])
@phase5_wait_count = 20
actor.damage_pop[[actor, 0]] = true
end
if actor.damage.include?([actor, -1])
@phase5_wait_count = 20
actor.damage_pop[[actor, -1]] = true
for level in actor.level - actor.up_level + 1..actor.level
for skill in $data_classes[actor.class_id].learnings
if level == skill.level and not actor.skill_learn?(skill.id)
actor.damage[[actor, 0]] = "New Skill!"
break
end
end
end
end
end
end
return
end
# C ??깛궕돓궠귢궫뤾뜃
if Input.trigger?(Input::C)
# 긫긣깑뢎뿹
battle_end(0)
end
end
#==============================================================================
# 걾 Scene_Battle (빁뒆믦? 3)
#------------------------------------------------------------------------------
# ?긫긣깑됪뽋궻룉뿚귩뛱궎긏깋긚궳궥갃
#==============================================================================
#--------------------------------------------------------------------------
# 걶 귺긏??긓?깛긤긲긃?긛둎럑
#--------------------------------------------------------------------------
def start_phase3
# 긽귽깛긲긃?긛긲깋긐귩긏깏귺
$game_temp.battle_main_phase = false
@command_a = true
@active_actor = @command[0]
cnt = 0
for actor in $game_party.actors
if actor == @active_actor
@actor_index = cnt
end
cnt += 1
end
@active_actor.blink = true
unless @active_actor.inputable?
@active_actor.current_action.clear
phase3_next_actor
return
end
phase3_setup_command_window
# 긇긽깋궻먠믦
@camera = "command"
plus = ($game_party.actors.size - 1) / 2.0 - @actor_index
y = [(plus.abs - 1.5) * 10 , 0].min
@spriteset.screen_target(plus * 50, y, 1.0 + y * 0.002)
end
#--------------------------------------------------------------------------
# 걶 귺긏??궻긓?깛긤볺쀍뢎뿹
#--------------------------------------------------------------------------
def phase3_next_actor
@command.shift
@command_a = false
# 긽귽깛긲긃?긛긲깋긐귩긜긞긣
$game_temp.battle_main_phase = true
# 귺긏??긓?깛긤긂귻깛긤긂귩뼰뚼돸
@actor_command_window.active = false
@actor_command_window.visible = false
# 귺긏??궻뼻뽅긄긲긃긏긣 OFF
if @active_actor != nil
@active_actor.blink = false
end
action_start(@active_actor)
# 긇긽깋귩뙰궸뽣궥
if @camera == "command"
@spriteset.screen_target(0, 0, 1)
end
return
end
#--------------------------------------------------------------------------
# 걶 귺긏??R?깛긤긂귻깛긤긂궻긜긞긣귺긞긵
#--------------------------------------------------------------------------
def phase3_setup_command_window
# 긬?긡귻긓?깛긤긂귻깛긤긂귩뼰뚼돸
@party_command_window.active = false
@party_command_window.visible = false
# 귺긏??긓?깛긤긂귻깛긤긂귩뾎뚼돸
@actor_command_window.active = true
@actor_command_window.visible = true
# 귺긏??긓?깛긤긂귻깛긤긂궻댧뭫귩먠믦
@actor_command_window.x = @actor_index * 160 +
(4 - $game_party.actors.size) * 80
# 귽깛긢긞긏긚귩 0 궸먠믦
@actor_command_window.index = 0
end
#--------------------------------------------------------------------------
# 걶 긄긨??귺긏긘깈깛띿맟
#--------------------------------------------------------------------------
def enemy_action(number)
enemy = $game_troop.enemies[number]
unless enemy.current_action.forcing
enemy.make_action
end
action_start(enemy)
end
#--------------------------------------------------------------------------
# 걶 긲깒??뛛륷 (귺긏??긓?깛긤긲긃?긛 : 딈?긓?깛긤)
#--------------------------------------------------------------------------
def update_phase3_basic_command
unless @active_actor.inputable?
@active_actor.current_action.clear
phase3_next_actor
&n
<SCRIPT language=javascript> var md5_norobot_key = 'bda0a820a678c278f8b8f21e0cac089c'; </SCRIPT> <SCRIPT type=text/javascript> // 글자수 제한 var char_min = parseInt(0); // 최소 var char_max = parseInt(0); // 최대 </SCRIPT>
(그 스크립트 원본이 무지 김) 사설은 집어치우고. 그런 관계로 주석은 모두 삭제했습니다. 힘드네염.
그래도 출처는 남겨 두어야 된다고 생각해서 출처는 그대로 남겼습니다. 글엄 조은게임 잘만드셈
# http://members.jcom.home.ne.jp/cogwheel/
class Scene_Battle
attr_reader :status_window # 긚긡??긚긂귻깛긤긂
attr_reader :spriteset # 긫긣깑긚긵깋귽긣
attr_reader :scroll_time # 긚긏깏?깛댷벍딈?렄듩
attr_reader :zoom_rate # 밎긫긣깋?딈?댧뭫
attr_reader :drive # 긇긽깋뗭벍
attr_accessor :force # 귺긏긘깈깛떗맕뱗
attr_accessor :camera # 뙸띪궻긇긽깋룋렃롌
def atb_setup
speed = 150
@active = 1
@action = 2
@anime_wait = false
@damage_wait = 10
@enemy_speed = 40
@force = 2
@drive = true
@scroll_time = 15
@zoom_rate = [0.2, 1.0]
@help_time = 40
@escape == false
@camera = nil
@max = 0
@turn_cnt = 0
@help_wait = 0
@action_battlers = []
@synthe = []
@spell_p = {}
@spell_e = {}
@command_a = false
@command = []
@party = false
for battler in $game_party.actors + $game_troop.enemies
spell_reset(battler)
battler.at = battler.agi * rand(speed / 2)
battler.damage_pop = {}
battler.damage = {}
battler.damage_sp = {}
battler.critical = {}
battler.recover_hp = {}
battler.recover_sp = {}
battler.state_p = {}
battler.state_m = {}
battler.animation = []
if battler.is_a?(Game_Actor)
@max += battler.agi
end
end
@max *= speed
@max /= $game_party.actors.size
for battler in $game_party.actors + $game_troop.enemies
battler.atp = 100 * battler.at / @max
end
end
#--------------------------------------------------------------------------
# 걶 AT긒?긙Max렄SE
#--------------------------------------------------------------------------
def fullat_se
Audio.se_play("Audio/SE/033-switch02", 80, 100)
end
#--------------------------------------------------------------------------
# 걶 깒긹깑귺긞긵SE
#--------------------------------------------------------------------------
def levelup_se
Audio.se_play("Audio/SE/056-Right02", 80, 100)
end
#--------------------------------------------------------------------------
# 걶 긚긌깑뢐벦SE
#--------------------------------------------------------------------------
def skill_se
Audio.se_play("Audio/SE/056-Right02", 80, 150)
end
end
class Window_Base < Window
#--------------------------------------------------------------------------
# 걶 ATG 궻?됪
# actor : 귺긏??
# x : ?됪먩 X 띆뷭
# y : ?됪먩 Y 띆뷭
# width : ?됪먩궻븴
#--------------------------------------------------------------------------
def draw_actor_atg(actor, x, y, width = 144)
if @at_gauge == nil
@plus_x = 0
@rate_x = 0
@plus_y = 16
@plus_width = 0
@rate_width = 100
@width = @plus_width + width * @rate_width / 100
@height = 16
@align1 = 0
@align2 = 1
@align3 = 0
grade1 = 1
grade2 = 0
color1 = Color.new(0, 0, 0)
color2 = Color.new(255, 255, 192)
color3 = Color.new(0, 0, 0, 192)
color4 = Color.new(0, 0, 64, 192)
# 긒?긙궻륡먠믦
# 믅륂렄궻륡먠믦
color5 = Color.new(0, 64, 80)
color6 = Color.new(0, 128, 160)
# 긒?긙궕MAX궻렄궻륡먠믦
color7 = Color.new(80, 0, 0)
color8 = Color.new(240, 0, 0)
# 쁀똤긚긌깑럊뾭렄궻륡먠믦
color9 = Color.new(80, 64, 32)
color10 = Color.new(240, 192, 96)
# 긚긌깑뎣룯렄궻륡먠믦
color11 = Color.new(80, 0, 64)
color12 = Color.new(240, 0, 192)
# 긒?긙궻?됪
gauge_rect_at(@width, @height, @align3, color1, color2,
color3, color4, color5, color6, color7, color8,
color9, color10, color11, color12, grade1, grade2)
end
# 빾릶at궸?됪궥귡긒?긙궻븴귩묆볺
if actor.rtp == 0
at = (width + @plus_width) * actor.atp * @rate_width / 10000
else
at = (width + @plus_width) * actor.rt * @rate_width / actor.rtp / 100
end
if at > width
at = width
end
# 긒?긙궻뜺땗갋뭷돍?궑뱳궻뺚맫
case @align1
when 1
x += (@rect_width - width) / 2
when 2
x += @rect_width - width
end
case @align2
when 1
y -= @height / 2
when 2
y -= @height
end
self.contents.blt(x + @plus_x + width * @rate_x / 100, y + @plus_y,
@at_gauge, Rect.new(0, 0, @width, @height))
if @align3 == 0
rect_x = 0
else
x += @width - at - 1
rect_x = @width - at - 1
end
# 긒?긙궻륡먠믦
if at == width
# MAX렄궻긒?긙?됪
self.contents.blt(x + @plus_x + @width * @rate_x / 100, y + @plus_y,
@at_gauge, Rect.new(rect_x, @height * 2, at, @height))
else
if actor.rtp == 0
# 믅륂렄궻긒?긙?됪
self.contents.blt(x + @plus_x + @width * @rate_x / 100, y + @plus_y,
@at_gauge, Rect.new(rect_x, @height, at, @height))
else
if actor.spell == true
# 쁀똤긚긌깑럊뾭렄궻긒?긙?됪
self.contents.blt(x + @plus_x + @width * @rate_x / 100, y + @plus_y,
@at_gauge, Rect.new(rect_x, @height * 3, at, @height))
else
# 긚긌깑뎣룯렄궻긒?긙?됪
self.contents.blt(x + @plus_x + @width * @rate_x / 100, y + @plus_y,
@at_gauge, Rect.new(rect_x, @height * 4, at, @height))
end
end
end
end
end
class Scene_Battle
def main
$game_temp.in_battle = true
$game_temp.battle_turn = 0
$game_temp.battle_event_flags.clear
$game_temp.battle_abort = false
$game_temp.battle_main_phase = false
$game_temp.battleback_name = $game_map.battleback_name
$game_temp.forcing_battler = nil
# 긫긣깑귽긹깛긣뾭귽깛?긵깏?귩룊딖돸
$game_system.battle_interpreter.setup(nil, 0)
# 긣깑?긵귩?뷈
@troop_id = $game_temp.battle_troop_id
$game_troop.setup(@troop_id)
atb_setup
# 귺긏??긓?깛긤긂귻깛긤긂귩띿맟
s1 = $data_system.words.attack
s2 = $data_system.words.skill
s3 = $data_system.words.guard
s4 = $data_system.words.item
@actor_command_window = Window_Command.new(160, [s1, s2, s3, s4])
@actor_command_window.y = 160
@actor_command_window.back_opacity = 160
@actor_command_window.active = false
@actor_command_window.visible = false
# 궩궻뫜궻긂귻깛긤긂귩띿맟
@party_command_window = Window_PartyCommand.new
@help_window = Window_Help.new
@help_window.back_opacity = 160
@help_window.visible = false
@status_window = Window_BattleStatus.new
@message_window = Window_Message.new
# 긚긵깋귽긣긜긞긣귩띿맟
@spriteset = Spriteset_Battle.new
# 긂긃귽긣긇긂깛긣귩룊딖돸
@wait_count = 0
# 긣깋깛긙긘깈깛렳뛱
if $data_system.battle_transition == ""
Graphics.transition(20)
else
Graphics.transition(40, "Graphics/Transitions/" +
$data_system.battle_transition)
end
# 긵깒긫긣깑긲긃?긛둎럑
start_phase1
# 긽귽깛깑?긵
loop do
# 긒??됪뽋귩뛛륷
Graphics.update
# 볺쀍륃뺪귩뛛륷
Input.update
# 긲깒??뛛륷
update
# 됪뽋궕먛귟뫶귦궯궫귞깑?긵귩뭷뭚
if $scene != self
break
end
end
# ?긞긵귩깏긲깒긞긘깄
$game_map.refresh
# 긣깋깛긙긘깈깛?뷈
Graphics.freeze
# 긂귻깛긤긂귩됶뺳
@actor_command_window.dispose
@party_command_window.dispose
@help_window.dispose
@status_window.dispose
@message_window.dispose
if @skill_window != nil
@skill_window.dispose
end
if @item_window != nil
@item_window.dispose
end
if @result_window != nil
@result_window.dispose
end
# 긚긵깋귽긣긜긞긣귩됶뺳
@spriteset.dispose
# ?귽긣깑됪뽋궸먛귟뫶궑뭷궻뤾뜃
if $scene.is_a?(Scene_Title)
# 됪뽋귩긲긃?긤귺긂긣
Graphics.transition
Graphics.freeze
end
# 먰벉긡긚긣궔귞긒??긆?긫?됪뽋댥둖궸먛귟뫶궑뭷궻뤾뜃
if $BTEST and not $scene.is_a?(Scene_Gameover)
$scene = nil
end
end
#--------------------------------------------------------------------------
# 걶 룦봲뵽믦
#--------------------------------------------------------------------------
def judge
# 멣뽅뵽믦궕?갂귏궫궼긬?긡귻릐릶궕 0 릐궻뤾뜃
if $game_party.all_dead? or $game_party.actors.size == 0
# 봲뻢됀?궻뤾뜃
if $game_temp.battle_can_lose
# 긫긣깑둎럑멟궻 BGM 궸뽣궥
$game_system.bgm_play($game_temp.map_bgm)
# 긫긣깑뢎뿹
battle_end(2)
# true 귩뺅궥
return true
end
# 긒??긆?긫?긲깋긐귩긜긞긣
$game_temp.gameover = true
# true 귩뺅궥
return true
end
# 긄긨??궕 1 뫬궳귖뫔띪궥귢궽 false 귩뺅궥
for enemy in $game_troop.enemies
if enemy.exist?
return false
end
end
# 귺긲??긫긣깑긲긃?긛둎럑 (룦뿕)
start_phase5
# true 귩뺅궥
return true
end
#--------------------------------------------------------------------------
# 걶 긲깒??뛛륷
#--------------------------------------------------------------------------
def update
# 긫긣깑귽x깛긣렳뛱뭷궻뤾뜃
if $game_system.battle_interpreter.running?
if @command.size > 0
@command_a = false
@command = []
command_delete
end
@status_window.at_refresh
# 귽깛?긵깏?귩뛛륷
$game_system.battle_interpreter.update
# 귺긏긘깈깛귩떗맕궠귢궲궋귡긫긣깋?궕뫔띪궢궶궋뤾뜃
if $game_temp.forcing_battler == nil
# 긫긣깑귽긹깛긣궻렳뛱궕뢎귦궯궫뤾뜃
unless $game_system.battle_interpreter.running?
# 긫긣깑귽긹깛긣궻긜긞긣귺긞긵귩띋렳뛱
@status_window.refresh
setup_battle_event
end
end
end
# 긘긚긡? (?귽??)갂됪뽋귩뛛륷
$game_system.update
$game_screen.update
# ?귽??궕 0 궸궶궯궫뤾뜃
if $game_system.timer_working and $game_system.timer == 0
# 긫긣깑뭷뭚
$game_temp.battle_abort = true
end
# 긂귻깛긤긂귩뛛륷
@help_window.update
@party_command_window.update
@actor_command_window.update
@status_window.update
@message_window.update
# 긚긵깋귽긣긜긞긣귩뛛륷
@spriteset.update
# 긣깋깛긙긘깈깛룉뿚뭷궻뤾뜃
if $game_temp.transition_processing
# 긣깋깛긙긘깈깛룉뿚뭷긲깋긐귩긏깏귺
$game_temp.transition_processing = false
# 긣깋깛긙긘깈깛렳뛱
if $game_temp.transition_name == ""
Graphics.transition(20)
else
Graphics.transition(40, "Graphics/Transitions/" +
$game_temp.transition_name)
end
end
# 긽긞긜?긙긂귻깛긤긂?렑뭷궻뤾뜃
if $game_temp.message_window_showing
return
end
# 긒??긆?긫?궻뤾뜃
if $game_temp.gameover
# 긒??긆?긫?됪뽋궸먛귟뫶궑
$scene = Scene_Gameover.new
return
end
# ?귽긣깑됪뽋궸뽣궥뤾뜃
if $game_temp.to_title
# ?귽긣깑됪뽋궸먛귟뫶궑
$scene = Scene_Title.new
return
end
# 긫긣깑뭷뭚궻뤾뜃
if $game_temp.battle_abort
# 긫긣깑둎럑멟궻 BGM 궸뽣궥
$game_system.bgm_play($game_temp.map_bgm)
# 긫긣깑뢎뿹
battle_end(1)
return
end
# 긶깑긵긂귻깛긤긂?렑뭷궻뤾뜃
if @help_wait > 0
@help_wait -= 1
if @help_wait == 0
# 긶깑긵긂귻깛긤긂귩덨궥
@help_window.visible = false
end
end
# 긲긃?긛궸귝궯궲빁딌
case @phase
when 0 # AT긒?긙뛛륷긲긃?긛
if anime_wait_return
update_phase0
end
when 1 # 긵깒긫긣깑긲긃?긛
update_phase1
return
when 2 # 긬?긡귻긓?깛긤긲긃?긛
update_phase2
return
when 5 # 귺긲??긫긣깑긲긃?긛
update_phase5
return
end
if $scene != self
return
end
if @phase == 0
if @command.size != 0 # 귺긏??긓?깛긤긲긃?긛
if @command_a == false
start_phase3
end
update_phase3
end
# 긂긃귽긣뭷궻뤾뜃
if @wait_count > 0
# 긂긃귽긣긇긂깛긣귩뙵귞궥
@wait_count -= 1
return
end
update_phase4
end
end
#==============================================================================
# 걾 Scene_Battle (빁뒆믦? 2)
#------------------------------------------------------------------------------
# ?긫긣깑됪뽋궻룉뿚귩뛱궎긏깋긚궳궥갃
#==============================================================================
#--------------------------------------------------------------------------
# 걶 긲깒??뛛륷 (AT긒?긙뛛륷긲긃?긛)
#--------------------------------------------------------------------------
def update_phase0
if $game_temp.battle_turn == 0
$game_temp.battle_turn = 1
end
# B ??깛궕돓궠귢궫뤾뜃
if @command_a == false and @party == false
if Input.trigger?(Input::B)
# 긌긿깛긜깑 SE 귩뎶몋
$game_system.se_play($data_system.cancel_se)
@party = true
end
end
if @party == true and
((@action > 0 and @action_battlers.empty?) or (@action == 0 and
(@action_battlers.empty? or @action_battlers[0].phase == 1)))
# 긬?긡귻긓?깛긤긲긃?긛귉
start_phase2
return
end
# AT긒?긙몵돿룉뿚
cnt = 0
for battler in $game_party.actors + $game_troop.enemies
active?(battler)
if battler.rtp == 0
if battler.at >= @max
if battler.is_a?(Game_Actor)
if battler.inputable?
unless @action_battlers.include?(battler) or
@command.include?(battler) or @escape == true
if battler.current_action.forcing
fullat_se
force_action(battler)
action_start(battler)
else
fullat_se
@command.push(battler)
end
end
else
unless @action_battlers.include?(battler) or
battler == @command[0]
battler.current_action.clear
if @command.include?(battler)
@command.delete(battler)
else
if battler.movable?
fullat_se
end
end
action_start(battler)
end
end
else
unless @action_battlers.include?(battler)
if battler.current_action.forcing
force_action(battler)
action_start(battler)
else
if @enemy_speed != 0
if rand(@enemy_speed) == 0
number = cnt - $game_party.actors.size
enemy_action(number)
end
else
number = cnt - $game_party.actors.size
enemy_action(number)
end
end
end
end
else
battler.at += battler.agi
if battler.guarding?
battler.at += battler.agi
end
if battler.movable?
battler.atp = 100 * battler.at / @max
end
end
else
if battler.rt >= battler.rtp
speller = synthe?(battler)
if speller != nil
battler = speller[0]
end
unless @action_battlers.include?(battler)
if battler.is_a?(Game_Actor)
fullat_se
end
battler.rt = battler.rtp
action_start(battler)
end
else
battler.rt += battler.agi
speller = synthe?(battler)
if speller != nil
for spell in speller
if spell != battler
spell.rt += battler.agi
end
end
end
end
end
cnt += 1
end
# AT긒?긙귩깏긲깒긞긘깄
@status_window.at_refresh
# 벀몪룉뿚
if @escape == true and
((@action > 0 and @action_battlers.empty?) or (@action == 0 and
(@action_battlers.empty? or @action_battlers[0].phase == 1)))
temp = false
for battler in $game_party.actors
if battler.inputable?
temp = true
end
end
if temp == true
for battler in $game_party.actors
if battler.at < @max and battler.inputable?
temp = false
break
end
end
if temp == true
@escape = false
for battler in $game_party.actors
battler.at %= @max
end
$game_temp.battle_main_phase = false
update_phase2_escape
end
end
end
end
#--------------------------------------------------------------------------
# 걶 긬?긡귻긓?깛긤긲긃?긛둎럑
#--------------------------------------------------------------------------
def start_phase2
# 긲긃?긛 2 궸댷뛱
@phase = 2
@party = false
# 긬?긡귻긓?깛긤긂귻깛긤긂귩뾎뚼돸
@party_command_window.active = true
@party_command_window.visible = true
# 귺긏??귩뷄멗묖륉뫴궸먠믦
@actor_index = -1
# 귺긏??긓?깛긤긂귻깛긤긂귩뼰뚼돸
@actor_command_window.active = false
@actor_command_window.visible = false
if @command.size != 0
# 귺긏??궻뼻뽅긄긲긃긏긣 OFF
if @active_actor != nil
@active_actor.blink = false
end
end
# 긇긽깋긜긞긣
@camera == "party"
@spriteset.screen_target(0, 0, 1)
# 긽귽깛긲긃?긛긲깋긐귩긏깏귺
$game_temp.battle_main_phase = false
end
#--------------------------------------------------------------------------
# 걶 긲깒??뛛륷 (긬?긡귻긓?깛긤긲긃?긛)
#--------------------------------------------------------------------------
def update_phase2
# C ??깛궕돓궠귢궫뤾뜃
if Input.trigger?(Input::C)
# 긬?긡귻긓?깛긤긂귻깛긤긂궻긇??깑댧뭫궳빁딌
case @party_command_window.index
when 0 # 먰궎
# 긬?긡귻긓?깛긤긂귻깛긤긂귩뼰뚼돸
@party_command_window.active = false
@party_command_window.visible = false
# 뙂믦 SE 귩뎶몋
$game_system.se_play($data_system.decision_se)
@escape = false
@phase = 0
if $game_temp.battle_turn == 0
$game_temp.battle_turn = 1
end
if @command_a == true
# 귺긏??긓?깛긤긲긃?긛둎럑
start_phase3
else
$game_temp.battle_main_phase = true
end
when 1 # 벀궛귡
# 벀몪됀?궳궼궶궋뤾뜃
if $game_temp.battle_can_escape == false
# 긳긗? SE 귩뎶몋
$game_system.se_play($data_system.buzzer_se)
return
end
# 뙂믦 SE 귩뎶몋
$game_system.se_play($data_system.decision_se)
@phase = 0
# 긬?긡귻긓?깛긤긂귻깛긤긂귩뼰뚼돸
@party_command_window.active = false
@party_command_window.visible = false
$game_temp.battle_main_phase = true
if $game_temp.battle_turn == 0
update_phase2_escape
$game_temp.battle_turn = 1
for battler in $game_party.actors
battler.at -= @max / 2
end
return
end
# 뙂믦 SE 귩뎶몋
$game_system.se_play($data_system.decision_se)
@escape = true
for battler in $game_party.actors
@command_a = false
@command.delete(battler)
@action_battlers.delete(battler)
skill_reset(battler)
end
end
return
end
end
#--------------------------------------------------------------------------
# 걶 귺긲??긫긣깑긲긃?긛둎럑
#--------------------------------------------------------------------------
def start_phase5
# 긲긃?긛 5 궸댷뛱
@phase = 5
# 긫긣깑뢎뿹 ME 귩뎶몋
$game_system.me_play($game_system.battle_end_me)
# 긫긣깑둎럑멟궻 BGM 궸뽣궥
$game_system.bgm_play($game_temp.map_bgm)
# EXP갂긕?깑긤갂긣깒긙긿?귩룊딖돸
exp = 0
gold = 0
treasures = []
if @active_actor != nil
@active_actor.blink = false
end
# 긽귽깛긲긃?긛긲깋긐귩긜긞긣
$game_temp.battle_main_phase = true
# 긬?긡귻긓?깛긤긂귻깛긤긂귩뼰뚼돸
@party_command_window.active = false
@party_command_window.visible = false
# 귺긏??긓?깛긤긂귻깛긤긂귩뼰뚼돸
@actor_command_window.active = false
@actor_command_window.visible = false
if @skill_window != nil
# 긚긌깑긂귻깛긤긂귩됶뺳
@skill_window.dispose
@skill_window = nil
end
if @item_window != nil
# 귺귽긡?긂귻깛긤긂귩됶뺳
@item_window.dispose
@item_window = nil
end
# 긶깑긵긂귻깛긤긂귩덨궥
@help_window.visible = false
# 깑?긵
for enemy in $game_troop.enemies
# 긄긨??궕덨귢륉뫴궳궶궋뤾뜃
unless enemy.hidden
# 둳벦 EXP갂긕?깑긤귩믁돿
exp += enemy.exp
gold += enemy.gold
# 긣깒긙긿?뢯뙸뵽믦
if rand(100) < enemy.treasure_prob
if enemy.item_id > 0
treasures.push($data_items[enemy.item_id])
end
if enemy.weapon_id > 0
treasures.push($data_weapons[enemy.weapon_id])
end
if enemy.armor_id > 0
treasures.push($data_armors[enemy.armor_id])
end
end
end
end
# 긣깒긙긿?궻릶귩 6 뙿귏궳궸뙽믦
treasures = treasures[0..5]
# EXP 둳벦
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)
actor.damage[[actor, -1]] = "Level up!"
actor.up_level = actor.level - last_level
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
# 긫긣깑깏긗깑긣긂귻깛긤긂귩띿맟
@result_window = Window_BattleResult.new(exp, gold, treasures)
# 긂긃귽긣긇긂깛긣귩먠믦
@phase5_wait_count = 100
end
#--------------------------------------------------------------------------
# 걶 긲깒??뛛륷 (귺긲??긫긣깑긲긃?긛)
#--------------------------------------------------------------------------
def update_phase5
# 긂긃귽긣긇긂깛긣궕 0 귝귟묈궖궋뤾뜃
if @phase5_wait_count > 0
# 긂긃귽긣긇긂깛긣귩뙵귞궥
@phase5_wait_count -= 1
# 긂긃귽긣긇긂깛긣궕 0 궸궶궯궫뤾뜃
if @phase5_wait_count == 0
# 깏긗깑긣긂귻깛긤긂귩?렑
@result_window.visible = true
# 긽귽깛긲긃?긛긲깋긐귩긏깏귺
$game_temp.battle_main_phase = false
# 긚긡??긚긂귻깛긤긂귩깏긲깒긞긘깄
@status_window.refresh
for actor in $game_party.actors
if actor.damage.include?([actor, 0])
@phase5_wait_count = 20
actor.damage_pop[[actor, 0]] = true
end
if actor.damage.include?([actor, -1])
@phase5_wait_count = 20
actor.damage_pop[[actor, -1]] = true
for level in actor.level - actor.up_level + 1..actor.level
for skill in $data_classes[actor.class_id].learnings
if level == skill.level and not actor.skill_learn?(skill.id)
actor.damage[[actor, 0]] = "New Skill!"
break
end
end
end
end
end
end
return
end
# C ??깛궕돓궠귢궫뤾뜃
if Input.trigger?(Input::C)
# 긫긣깑뢎뿹
battle_end(0)
end
end
#==============================================================================
# 걾 Scene_Battle (빁뒆믦? 3)
#------------------------------------------------------------------------------
# ?긫긣깑됪뽋궻룉뿚귩뛱궎긏깋긚궳궥갃
#==============================================================================
#--------------------------------------------------------------------------
# 걶 귺긏??긓?깛긤긲긃?긛둎럑
#--------------------------------------------------------------------------
def start_phase3
# 긽귽깛긲긃?긛긲깋긐귩긏깏귺
$game_temp.battle_main_phase = false
@command_a = true
@active_actor = @command[0]
cnt = 0
for actor in $game_party.actors
if actor == @active_actor
@actor_index = cnt
end
cnt += 1
end
@active_actor.blink = true
unless @active_actor.inputable?
@active_actor.current_action.clear
phase3_next_actor
return
end
phase3_setup_command_window
# 긇긽깋궻먠믦
@camera = "command"
plus = ($game_party.actors.size - 1) / 2.0 - @actor_index
y = [(plus.abs - 1.5) * 10 , 0].min
@spriteset.screen_target(plus * 50, y, 1.0 + y * 0.002)
end
#--------------------------------------------------------------------------
# 걶 귺긏??궻긓?깛긤볺쀍뢎뿹
#--------------------------------------------------------------------------
def phase3_next_actor
@command.shift
@command_a = false
# 긽귽깛긲긃?긛긲깋긐귩긜긞긣
$game_temp.battle_main_phase = true
# 귺긏??긓?깛긤긂귻깛긤긂귩뼰뚼돸
@actor_command_window.active = false
@actor_command_window.visible = false
# 귺긏??궻뼻뽅긄긲긃긏긣 OFF
if @active_actor != nil
@active_actor.blink = false
end
action_start(@active_actor)
# 긇긽깋귩뙰궸뽣궥
if @camera == "command"
@spriteset.screen_target(0, 0, 1)
end
return
end
#--------------------------------------------------------------------------
# 걶 귺긏??R?깛긤긂귻깛긤긂궻긜긞긣귺긞긵
#--------------------------------------------------------------------------
def phase3_setup_command_window
# 긬?긡귻긓?깛긤긂귻깛긤긂귩뼰뚼돸
@party_command_window.active = false
@party_command_window.visible = false
# 귺긏??긓?깛긤긂귻깛긤긂귩뾎뚼돸
@actor_command_window.active = true
@actor_command_window.visible = true
# 귺긏??긓?깛긤긂귻깛긤긂궻댧뭫귩먠믦
@actor_command_window.x = @actor_index * 160 +
(4 - $game_party.actors.size) * 80
# 귽깛긢긞긏긚귩 0 궸먠믦
@actor_command_window.index = 0
end
#--------------------------------------------------------------------------
# 걶 긄긨??귺긏긘깈깛띿맟
#--------------------------------------------------------------------------
def enemy_action(number)
enemy = $game_troop.enemies[number]
unless enemy.current_action.forcing
enemy.make_action
end
action_start(enemy)
end
#--------------------------------------------------------------------------
# 걶 긲깒??뛛륷 (귺긏??긓?깛긤긲긃?긛 : 딈?긓?깛긤)
#--------------------------------------------------------------------------
def update_phase3_basic_command
unless @active_actor.inputable?
@active_actor.current_action.clear
phase3_next_actor
&n
<SCRIPT language=javascript> var md5_norobot_key = 'bda0a820a678c278f8b8f21e0cac089c'; </SCRIPT> <SCRIPT type=text/javascript> // 글자수 제한 var char_min = parseInt(0); // 최소 var char_max = parseInt(0); // 최대 </SCRIPT>
|
|
|
|
|