Combat avec zoom relooké
Supprimer le script New Battle, et au dessus de Main, insérez ces deux scripts. (trés long)
Le premier, nommé le "Jauge" (ou"Gauge", mais je pense plutot que c'est un vieux makeur pourri qui à fait une sale phote d'aurtaugrophe)
Edit : Non non, il faut bel et bien écrire Gauge, avec un "G" attention ^^)
Le premier, nommé le "Jauge" (ou"Gauge", mais je pense plutot que c'est un vieux makeur pourri qui à fait une sale phote d'aurtaugrophe)
Edit : Non non, il faut bel et bien écrire Gauge, avec un "G" attention ^^)
| Citation: |
| # zz³ET|[gURL # http://members.jcom.home.ne.jp/cogwheel/ #=================== # ¡ Game_Actor #---------------------------------- # @AN^[ðµ€NXÅ·B±ÌNXÍ Game_Actors NX ($game_actors) # ÌàÅgp³êAGame_Party NX ($game_party) ©çàQƳêÜ·B #=================== class Game_Actor < Game_Battler def now_exp return @exp - @exp_list[@level] end def next_exp return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0 end end #=================== # ¡ Window_Base #---------------------------------- # @Q[Ì·×ÄÌEBhEÌX[p[NXÅ·B #=================== class Window_Base < Window #---------------------------------- # HP Q[WÌ`æ #---------------------------------- # IWiÌHP`æð draw_actor_hp_original ÆŒOÏX alias :draw_actor_hp_original :draw_actor_hp def draw_actor_hp(actor, x, y, width = 144) # ÏrateÉ »ÝÌHP/MHPðãü if actor.maxhp != 0 rate = actor.hp.to_f / actor.maxhp else rate = 0 end # plus_x:XÀWÌÊuâ³ rate_x:XÀWÌÊuâ³(%) plus_y:YÀWÌÊuâ³ # plus_width:Ìâ³ rate_width:Ìâ³(%) height:c # align1:`æ^Cv1 0:¶lß 1:µŠ 2:Elß # align2:`æ^Cv2 0:ãlß 1:µŠ 2:ºlß # align3:Q[W^Cv 0:¶lß 1:Elß plus_x = 0 rate_x = 0 plus_y = 25 plus_width = 0 rate_width = 100 height = 10 align1 = 1 align2 = 2 align3 = 0 # Of[VÝè grade1:óQ[W grade2:ÀQ[W # (0:¡ÉOf[V 1:cÉOf[V 2:ÎßÉOf[V(d)j grade1 = 1 grade2 = 0 # FÝèBcolor1:OgCcolor2:g # color3:óQ[W_[NJ[Ccolor4:óQ[WCgJ[ # color5:ÀQ[W_[NJ[Ccolor6:ÀQ[WCgJ[ color1 = Color.new(0, 0, 0, 192) color2 = Color.new(255, 255, 192, 192) color3 = Color.new(0, 0, 0, 192) color4 = Color.new(64, 0, 0, 192) color5 = Color.new(80 - 24 * rate, 80 * rate, 14 * rate, 192) color6 = Color.new(240 - 72 * rate, 240 * rate, 62 * rate, 192) # ÏspÉ`æ·éQ[WÌðãü if actor.maxhp != 0 hp = (width + plus_width) * actor.hp * rate_width / 100 / actor.maxhp else hp = 0 end # Q[WÌ`æ gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y, width, plus_width + width * rate_width / 100, height, hp, align1, align2, align3, color1, color2, color3, color4, color5, color6, grade1, grade2) # IWiÌHP`æðÄÑoµ draw_actor_hp_original(actor, x, y, width) end #---------------------------------- # SP Q[WÌ`æ #---------------------------------- # IWiÌSP`æð draw_actor_sp_original ÆŒOÏX alias :draw_actor_sp_original :draw_actor_sp def draw_actor_sp(actor, x, y, width = 144) # ÏrateÉ »ÝÌSP/MSPðãü if actor.maxsp != 0 rate = actor.sp.to_f / actor.maxsp else rate = 1 end # plus_x:XÀWÌÊuâ³ rate_x:XÀWÌÊuâ³(%) plus_y:YÀWÌÊuâ³ # plus_width:Ìâ³ rate_width:Ìâ³(%) height:c # align1:`æ^Cv1 0:¶lß 1:µŠ 2:Elß # align2:`æ^Cv2 0:ãlß 1:µŠ 2:ºlß # align3:Q[W^Cv 0:¶lß 1:Elß plus_x = 0 rate_x = 0 plus_y = 25 plus_width = 0 rate_width = 100 height = 10 align1 = 1 align2 = 2 align3 = 0 # Of[VÝè grade1:óQ[W grade2:ÀQ[W # (0:¡ÉOf[V 1:cÉOf[V 2:ÎßÉOf[V(d)j grade1 = 1 grade2 = 0 # FÝèBcolor1:OgCcolor2:g # color3:óQ[W_[NJ[Ccolor4:óQ[WCgJ[ # color5:ÀQ[W_[NJ[Ccolor6:ÀQ[WCgJ[ color1 = Color.new(0, 0, 0, 192) color2 = Color.new(255, 255, 192, 192) color3 = Color.new(0, 0, 0, 192) color4 = Color.new(0, 64, 0, 192) color5 = Color.new(14 * rate, 80 - 24 * rate, 80 * rate, 192) color6 = Color.new(62 * rate, 240 - 72 * rate, 240 * rate, 192) # ÏspÉ`æ·éQ[WÌðãü if actor.maxsp != 0 sp = (width + plus_width) * actor.sp * rate_width / 100 / actor.maxsp else sp = (width + plus_width) * rate_width / 100 end # Q[WÌ`æ gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y, width, plus_width + width * rate_width / 100, height, sp, align1, align2, align3, color1, color2, color3, color4, color5, color6, grade1, grade2) # IWiÌSP`æðÄÑoµ draw_actor_sp_original(actor, x, y, width) end #---------------------------------- # EXP Q[WÌ`æ #---------------------------------- # IWiÌEXP`æð draw_actor_sp_original ÆŒOÏX alias :draw_actor_exp_original :draw_actor_exp def draw_actor_exp(actor, x, y, width = 204) # ÏrateÉ »ÝÌexp/nextexpðãü if actor.next_exp != 0 rate = actor.now_exp.to_f / actor.next_exp else rate = 1 end # plus_x:XÀWÌÊuâ³ rate_x:XÀWÌÊuâ³(%) plus_y:YÀWÌÊuâ³ # plus_width:Ìâ³ rate_width:Ìâ³(%) height:c # align1:`æ^Cv1 0:¶lß 1:µŠ 2:Elß # align2:`æ^Cv2 0:ãlß 1:µŠ 2:ºlß # align3:Q[W^Cv 0:¶lß 1:Elß plus_x = 0 rate_x = 0 plus_y = 25 plus_width = 0 rate_width = 100 height = 10 align1 = 1 align2 = 2 align3 = 0 # Of[VÝè grade1:óQ[W grade2:ÀQ[W # (0:¡ÉOf[V 1:cÉOf[V 2:ÎßÉOf[V(d)j grade1 = 1 grade2 = 0 # FÝèBcolor1:OgCcolor2:g # color3:óQ[W_[NJ[Ccolor4:óQ[WCgJ[ # color5:ÀQ[W_[NJ[Ccolor6:ÀQ[WCgJ[ color1 = Color.new(0, 0, 0, 192) color2 = Color.new(255, 255, 192, 192) color3 = Color.new(0, 0, 0, 192) color4 = Color.new(64, 0, 0, 192) color5 = Color.new(80 * rate, 80 - 80 * rate ** 2, 80 - 80 * rate, 192) color6 = Color.new(240 * rate, 240 - 240 * rate ** 2, 240 - 240 * rate, 192) # ÏexpÉ`æ·éQ[WÌðãü if actor.next_exp != 0 exp = (width + plus_width) * actor.now_exp * rate_width / 100 / actor.next_exp else exp = (width + plus_width) * rate_width / 100 end # Q[WÌ`æ gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y, width, plus_width + width * rate_width / 100, height, exp, align1, align2, align3, color1, color2, color3, color4, color5, color6, grade1, grade2) # IWiÌEXP`æðÄÑoµ draw_actor_exp_original(actor, x, y) end #---------------------------------- # Q[WÌ`æ #---------------------------------- def gauge_rect(x, y, rect_width, width, height, gauge, align1, align2, align3, color1, color2, color3, color4, color5, color6, grade1, grade2) 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 # g`æ self.contents.fill_rect(x, y, width, height, color1) self.contents.fill_rect(x + 1, y + 1, width - 2, height - 2, color2) if align3 == 0 if grade1 == 2 grade1 = 3 end if grade2 == 2 grade2 = 3 end end if (align3 == 1 and grade1 == 0) or grade1 > 0 color = color3 color3 = color4 color4 = color end if (align3 == 1 and grade2 == 0) or grade2 > 0 color = color5 color5 = color6 color6 = color end # óQ[WÌ`æ self.contents.gradation_rect(x + 2, y + 2, width - 4, height - 4, color3, color4, grade1) if align3 == 1 x += width - gauge end # ÀQ[WÌ`æ self.contents.gradation_rect(x + 2, y + 2, gauge - 4, height - 4, color5, color6, grade2) end end #---------------------------------- # @BitmapNXÉVœÈ@\ðÇÁµÜ·B #=================== class Bitmap #---------------------------------- # é`ðOf[V\Š # color1 : X^[gJ[ # color2 : GhJ[ # align : 0:¡ÉOf[V # 1:cÉOf[V # 2:ÎßÉOf[VidÉ«Ój #---------------------------------- def gradation_rect(x, y, width, height, color1, color2, align = 0) if align == 0 for i in x...x + width red = color1.red + (color2.red - color1.red) * (i - x) / (width - 1) green = color1.green + (color2.green - color1.green) * (i - x) / (width - 1) blue = color1.blue + (color2.blue - color1.blue) * (i - x) / (width - 1) alpha = color1.alpha + (color2.alpha - color1.alpha) * (i - x) / (width - 1) color = Color.new(red, green, blue, alpha) fill_rect(i, y, 1, height, color) end elsif align == 1 for i in y...y + height red = color1.red + (color2.red - color1.red) * (i - y) / (height - 1) green = color1.green + (color2.green - color1.green) * (i - y) / (height - 1) blue = color1.blue + (color2.blue - color1.blue) * (i - y) / (height - 1) alpha = color1.alpha + (color2.alpha - color1.alpha) * (i - y) / (height - 1) color = Color.new(red, green, blue, alpha) fill_rect(x, i, width, 1, color) end elsif align == 2 for i in x...x + width for j in y...y + height red = color1.red + (color2.red - color1.red) * ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2 green = color1.green + (color2.green - color1.green) * ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2 blue = color1.blue + (color2.blue - color1.blue) * ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2 alpha = color1.alpha + (color2.alpha - color1.alpha) * ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2 color = Color.new(red, green, blue, alpha) set_pixel(i, j, color) end end elsif align == 3 for i in x...x + width for j in y...y + height red = color1.red + (color2.red - color1.red) * ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2 green = color1.green + (color2.green - color1.green) * ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2 blue = color1.blue + (color2.blue - color1.blue) * ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2 alpha = color1.alpha + (color2.alpha - color1.alpha) * ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2 color = Color.new(red, green, blue, alpha) set_pixel(i, j, color) end end end end end #=================== # ¡ SpriteW [ #---------------------------------- # @Aj[VÌÇðs€W [Å·B #=================== module RPG class Sprite < ::Sprite def damage(value, critical) dispose_damage if value.is_a?(Numeric) damage_string = value.abs.to_s else damage_string = value.to_s end bitmap = Bitmap.new(160, 48) bitmap.font.name = "Arial Black" bitmap.font.size = 32 bitmap.font.color.set(0, 0, 0) bitmap.draw_text(-1, 12-1, 160, 36, damage_string, 1) bitmap.draw_text(+1, 12-1, 160, 36, damage_string, 1) bitmap.draw_text(-1, 12+1, 160, 36, damage_string, 1) bitmap.draw_text(+1, 12+1, 160, 36, damage_string, 1) if value.is_a?(Numeric) and value < 0 bitmap.font.color.set(176, 255, 144) else bitmap.font.color.set(255, 255, 255) end bitmap.draw_text(0, 12, 160, 36, damage_string, 1) if critical bitmap.font.size = 20 bitmap.font.color.set(0, 0, 0) bitmap.draw_text(-1, -1, 160, 20, "CRITICAL", 1) bitmap.draw_text(+1, -1, 160, 20, "CRITICAL", 1) bitmap.draw_text(-1, +1, 160, 20, "CRITICAL", 1) bitmap.draw_text(+1, +1, 160, 20, "CRITICAL", 1) bitmap.font.color.set(255, 255, 255) bitmap.draw_text(0, 0, 160, 20, "CRITICAL", 1) end @_damage_sprite = ::Sprite.new @_damage_sprite.bitmap = bitmap @_damage_sprite.ox = 80 + self.viewport.ox @_damage_sprite.oy = 20 + self.viewport.oy @_damage_sprite.x = self.x + self.viewport.rect.x @_damage_sprite.y = self.y - self.oy / 2 + self.viewport.rect.y @_damage_sprite.z = 3000 @_damage_duration = 40 end def animation(animation, hit) dispose_animation @_animation = animation return if @_animation == nil @_animation_hit = hit @_animation_duration = @_animation.frame_max animation_name = @_animation.animation_name animation_hue = @_animation.animation_hue bitmap = RPG::Cache.animation(animation_name, animation_hue) if @@_reference_count.include?(bitmap) @@_reference_count[bitmap] += 1 else @@_reference_count[bitmap] = 1 end @_animation_sprites = [] if @_animation.position != 3 or not @@_animations.include?(animation) for i in 0..15 sprite = ::Sprite.new sprite.bitmap = bitmap sprite.visible = false @_animation_sprites.push(sprite) end unless @@_animations.include?(animation) @@_animations.push(animation) end end update_animation end def loop_animation(animation) return if animation == @_loop_animation dispose_loop_animation @_loop_animation = animation return if @_loop_animation == nil @_loop_animation_index = 0 animation_name = @_loop_animation.animation_name animation_hue = @_loop_animation.animation_hue bitmap = RPG::Cache.animation(animation_name, animation_hue) if @@_reference_count.include?(bitmap) @@_reference_count[bitmap] += 1 else @@_reference_count[bitmap] = 1 end @_loop_animation_sprites = [] for i in 0..15 sprite = ::Sprite.new sprite.bitmap = bitmap sprite.visible = false @_loop_animation_sprites.push(sprite) end update_loop_animation end def animation_set_sprites(sprites, cell_data, position) for i in 0..15 sprite = sprites[i] pattern = cell_data[i, 0] if sprite == nil or pattern == nil or pattern == -1 sprite.visible = false if sprite != nil next end sprite.visible = true sprite.src_rect.set(pattern % 5 * 192, pattern / 5 * 192, 192, 192) if position == 3 if self.viewport != nil sprite.x = self.viewport.rect.width / 2 sprite.y = self.viewport.rect.height - 160 else sprite.x = 320 sprite.y = 240 end else sprite.x = self.x + self.viewport.rect.x - self.ox + self.src_rect.width / 2 sprite.y = self.y + self.viewport.rect.y - self.oy + self.src_rect.height / 2 sprite.y -= self.src_rect.height / 4 if position == 0 sprite.y += self.src_rect.height / 4 if position == 2 end sprite.x += cell_data[i, 1] sprite.y += cell_data[i, 2] sprite.z = 2000 sprite.ox = 96 sprite.oy = 96 sprite.zoom_x = cell_data[i, 3] / 100.0 sprite.zoom_y = cell_data[i, 3] / 100.0 sprite.angle = cell_data[i, 4] sprite.mirror = (cell_data[i, 5] == 1) sprite.opacity = cell_data[i, 6] * self.opacity / 255.0 sprite.blend_type = cell_data[i, 7] end end end end |
Et le deuxième, nommé le "Bob" (très long script) et copier coller.
# A^CEANeBuog(RTAB) Ver 1.05 # zz³ET|[gURL # http://members.jcom.home.ne.jp/cogwheel/ class Scene_Battle #-------------------------------------------------------------------------- # öJCX^XÏ #-------------------------------------------------------------------------- attr_reader :status_window # Xe[^XEBhE attr_reader :spriteset # ogXvCg attr_reader :scroll_time # XN[Ú®î{Ô attr_reader :zoom_rate # Gog[î{Êu attr_reader :drive # Jì® attr_accessor :force # ANV§x attr_accessor :camera # »ÝÌJÒ #-------------------------------------------------------------------------- # ATBîbZbgAbv #-------------------------------------------------------------------------- def atb_setup # ATBú» # speed : ogXs[hèBlª¬³¢ÙÇ¢ # @active : ANeBuxÝè # 3 : íÉANeBuóÔ # 2 : XLEACeIðÌÝANeBuQ[Wª~Üé # 1 : 2ÌóÔÉÁŠA^[QbgIðàEFCgª|©é # 0 : 1ÌóÔÉÁŠAR}hüÍÉàEFCgª|©é # @action : Œlªs®É©ªàs®ðN±·±Æð·© # 3 : ©ªªs®s\ÅÈ¢ÀèÀè· # 2 : ©ªª_[Wðó¯Ä¢È¢Àè· # 1 : 2ÌóÔÉÁŠA^[Qbgªs®µÄ¢È¢Àè· # 0 : s®ð³È¢BÔÉs®µIŠéÜÅÒ # @anime_wait : trueÉ·éÆogAjE_[W\ŠÍEFCgª|©é # @damage_wait : _[W\ŠÒ¿ÔiPÊÍt[j # @enemy_speed : GÌvl¬xB1ÈçŠs®B # 1t[ÉA1/@enemy_speedÌmŠÅs®ðN±· # @force : §ANVÅXLgp̧ï # 2:XLÍSÄr¥¹žAKžŠÀs # 1:PÆXLÍr¥µAAgXLÌÝŠÀs # 0:SXLr¥ðs€Ÿ¯ # ($scene.force = x Æ·é±ÆÉæèAÊíCxgÌXNvg©çÏXÂ\j # @drive : Jì®ON/OFFBtrueÅì®ONAfalseÅì®OFF # @scroll_time : XN[Ú®Év·éî{Ô # @zoom_rate = [i, j] : Gl~[ÌY[Š # i ªæÊÅãÉzuµœÌgåŠ # j ªæÊźÉzuµœÌgåŠ # 1 {Ƶœ¢Æ«àA1.0 ÆKž¬ÅÝè·é±Æ 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 #-------------------------------------------------------------------------- # ATQ[WMaxSE #-------------------------------------------------------------------------- def fullat_se Audio.se_play("Audio/SE/033-switch02", 80, 100) end #-------------------------------------------------------------------------- # xAbvSE #-------------------------------------------------------------------------- def levelup_se Audio.se_play("Audio/SE/056-Right02", 80, 100) end #-------------------------------------------------------------------------- # XLKŸSE #-------------------------------------------------------------------------- def skill_se Audio.se_play("Audio/SE/056-Right02", 80, 150) end end class Window_Base < Window #-------------------------------------------------------------------------- # ATG Ì`æ # actor : AN^[ # x : `ææ X ÀW # y : `ææ Y ÀW # width : `ææÌ #-------------------------------------------------------------------------- def draw_actor_atg(actor, x, y, width = 144) if @at_gauge == nil # plus_x:XÀWÌÊuâ³ rate_x:XÀWÌÊuâ³(%) plus_y:YÀWÌÊuâ³ # plus_width:Ìâ³ rate_width:Ìâ³(%) height:c # align1:`æ^Cv1 0:¶lß 1:µŠ 2:Elß # align2:`æ^Cv2 0:ãlß 1:µŠ 2:ºlß # align3:Q[W^Cv 0:¶lß 1:Elß @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 # Of[VÝè grade1:óQ[W grade2:ÀQ[W # (0:¡ÉOf[V 1:cÉOf[V 2:ÎßÉOf[Vj grade1 = 1 grade2 = 0 # FÝèBcolor1:ÅOgCcolor2:g # color3:óg_[NJ[Ccolor4:ógCgJ[ 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) # Q[WÌFÝè # ÊíÌFÝè color5 = Color.new(0, 64, 80) color6 = Color.new(0, 128, 160) # Q[WªMAXÌÌFÝè color7 = Color.new(80, 0, 0) color8 = Color.new(240, 0, 0) # AgXLgpÌFÝè color9 = Color.new(80, 64, 32) color10 = Color.new(240, 192, 96) # XLr¥ÌFÝè color11 = Color.new(80, 0, 64) color12 = Color.new(240, 0, 192) # Q[WÌ`æ gauge_rect_at(@width, @height, @align3, color1, color2, color3, color4, color5, color6, color7, color8, color9, color10, color11, color12, grade1, grade2) end # ÏatÉ`æ·éQ[WÌðãü 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 # Q[W̶lE\ŠÌâ³ 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 # Q[WÌFÝè if at == width # MAXÌQ[W`æ 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 # ÊíÌQ[W`æ 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 # AgXLgpÌQ[W`æ self.contents.blt(x + @plus_x + @width * @rate_x / 100, y + @plus_y, @at_gauge, Rect.new(rect_x, @height * 3, at, @height)) else # XLr¥ÌQ[W`æ 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 #============================================================================== # ¡ Scene_Battle (ªè` 1) #------------------------------------------------------------------------------ # @ogæÊÌðs€NXÅ·B #============================================================================== class Scene_Battle #-------------------------------------------------------------------------- # C #-------------------------------------------------------------------------- def main # í¬pÌeíêf[^ðú» $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 # ogCxgpC^v^ðú» $game_system.battle_interpreter.setup(nil, 0) # g[vðõ @troop_id = $game_temp.battle_troop_id $game_troop.setup(@troop_id) atb_setup # AN^[R}hEBhEðì¬ 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 # »ÌŒÌEBhEðì¬ @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 # XvCgZbgðì¬ @spriteset = Spriteset_Battle.new # EFCgJEgðú» @wait_count = 0 # gWVÀs if $data_system.battle_transition == "" Graphics.transition(20) else Graphics.transition(40, "Graphics/Transitions/" + $data_system.battle_transition) end # vogtF[YJn start_phase1 # C[v loop do # Q[æÊðXV Graphics.update # üÍîñðXV Input.update # t[XV update # æÊªØèÖíÁœç[vðf if $scene != self break end end # }bvðtbV
$game_map.refresh # gWVõ Graphics.freeze # EBhEððú @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 # XvCgZbgððú @spriteset.dispose # ^CgæÊÉØèÖŠÌê if $scene.is_a?(Scene_Title) # æÊðtF[hAEg Graphics.transition Graphics.freeze end # í¬eXg©çQ[I[o[æÊÈOÉØèÖŠÌê if $BTEST and not $scene.is_a?(Scene_Gameover) $scene = nil end end #-------------------------------------------------------------------------- # s»è #-------------------------------------------------------------------------- def judge # SÅ»èª^AÜœÍp[eBlª 0 lÌê if $game_party.all_dead? or $game_party.actors.size == 0 # skÂ\Ìê if $game_temp.battle_can_lose # ogJnOÌ BGM Éß· $game_system.bgm_play($game_temp.map_bgm) # ogI¹ battle_end(2) # true ðÔ· return true end # Q[I[o[tOðZbg $game_temp.gameover = true # true ðÔ· return true end # Gl~[ª 1 ÌÅà¶Ý·êÎ false ðÔ· for enemy in $game_troop.enemies if enemy.exist? return false end end # At^[ogtF[YJn () start_phase5 # true ðÔ· return true end #-------------------------------------------------------------------------- # t[XV #-------------------------------------------------------------------------- def update # ogCxgÀsÌê if $game_system.battle_interpreter.running? if @command.size > 0 @command_a = false @command = [] command_delete end @status_window.at_refresh # C^v^ðXV $game_system.battle_interpreter.update # ANVð§³êÄ¢éog[ª¶ÝµÈ¢ê if $game_temp.forcing_battler == nil # ogCxgÌÀsªIíÁœê unless $game_system.battle_interpreter.running? # ogCxgÌZbgAbvðÄÀs @status_window.refresh setup_battle_event end end end # VXe (^C}[)AæÊðXV $game_system.update $game_screen.update # ^C}[ª 0 ÉÈÁœê if $game_system.timer_working and $game_system.timer == 0 # ogf $game_temp.battle_abort = true end # EBhEðXV @help_window.update @party_command_window.update @actor_command_window.update @status_window.update @message_window.update # XvCgZbgðXV @spriteset.update # gWVÌê if $game_temp.transition_processing # gWVtOðNA $game_temp.transition_processing = false # gWVÀs if $game_temp.transition_name == "" Graphics.transition(20) else Graphics.transition(40, "Graphics/Transitions/" + $game_temp.transition_name) end end # bZ[WEBhE\ŠÌê if $game_temp.message_window_showing return end # Q[I[o[Ìê if $game_temp.gameover # Q[I[o[æÊÉØèÖŠ $scene = Scene_Gameover.new return end # ^CgæÊÉß·ê if $game_temp.to_title # ^CgæÊÉØèÖŠ $scene = Scene_Title.new return end # ogfÌê if $game_temp.battle_abort # ogJnOÌ BGM Éß· $game_system.bgm_play($game_temp.map_bgm) # ogI¹ battle_end(1) return end # wvEBhE\ŠÌê if @help_wait > 0 @help_wait -= 1 if @help_wait == 0 # wvEBhEðB· @help_window.visible = false end end # tF[YÉæÁĪò case @phase when 0 # ATQ[WXVtF[Y if anime_wait_return update_phase0 end when 1 # vogtF[Y update_phase1 return when 2 # p[eBR}htF[Y update_phase2 return when 5 # At^[ogtF[Y update_phase5 return end if $scene != self return end if @phase == 0 if @command.size != 0 # AN^[R}htF[Y if @command_a == false start_phase3 end update_phase3 end # EFCgÌê if @wait_count > 0 # EFCgJEgðžç· @wait_count -= 1 return end update_phase4 end end #============================================================================== # ¡ Scene_Battle (ªè` 2) #------------------------------------------------------------------------------ # @ogæÊÌðs€NXÅ·B #============================================================================== #-------------------------------------------------------------------------- # t[XV (ATQ[WXVtF[Y) #-------------------------------------------------------------------------- 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) # LZ SE ðt $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))) # p[eBR}htF[YÖ start_phase2 return end # ATQ[WÁ 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 # ATQ[WðtbV
@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 #-------------------------------------------------------------------------- # p[eBR}htF[YJn #-------------------------------------------------------------------------- def start_phase2 # tF[Y 2 ÉÚs @phase = 2 @party = false # p[eBR}hEBhEðLø» @party_command_window.active = true @party_command_window.visible = true # AN^[ðñIðóÔÉÝè @actor_index = -1 # AN^[R}hEBhEð³ø» @actor_command_window.active = false @actor_command_window.visible = false if @command.size != 0 # AN^[ÌŸÅGtFNg OFF if @active_actor != nil @active_actor.blink = false end end # JZbg @camera == "party" @spriteset.screen_target(0, 0, 1) # CtF[YtOðNA $game_temp.battle_main_phase = false end #-------------------------------------------------------------------------- # t[XV (p[eBR}htF[Y) #-------------------------------------------------------------------------- def update_phase2 # C {^ª³êœê if Input.trigger?(Input::C) # p[eBR}hEBhEÌJ[\ÊuŪò case @party_command_window.index when 0 # í€ # p[eBR}hEBhEð³ø» @party_command_window.active = false @party_command_window.visible = false # è SE ðt $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 # AN^[R}htF[YJn start_phase3 else $game_temp.battle_main_phase = true end when 1 # аé # ŠÂ\ÅÍÈ¢ê if $game_temp.battle_can_escape == false # uU[ SE ðt $game_system.se_play($data_system.buzzer_se) return end # è SE ðt $game_system.se_play($data_system.decision_se) @phase = 0 # p[eBR}hEBhEð³ø» @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 ðt $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 #-------------------------------------------------------------------------- # At^[ogtF[YJn #-------------------------------------------------------------------------- def start_phase5 # tF[Y 5 ÉÚs @phase = 5 # ogI¹ ME ðt $game_system.me_play($game_system.battle_end_me) # ogJnOÌ BGM Éß· $game_system.bgm_play($game_temp.map_bgm) # EXPAS[hAgW[ðú» exp = 0 gold = 0 treasures = [] if @active_actor != nil @active_actor.blink = false end # CtF[YtOðZbg $game_temp.battle_main_phase = true # p[eBR}hEBhEð³ø» @party_command_window.active = false @party_command_window.visible = false # AN^[R}hEBhEð³ø» @actor_command_window.active = false @actor_command_window.visible = false if @skill_window != nil # XLEBhEððú @skill_window.dispose @skill_window = nil end if @item_window != nil # ACeEBhEððú @item_window.dispose @item_window = nil end # wvEBhEðB· @help_window.visible = false # [v for enemy in $game_troop.enemies # Gl~[ªBêóÔÅÈ¢ê unless enemy.hidden # lŸ EXPAS[hðÇÁ exp += enemy.exp gold += enemy.gold # gW[o»»è 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 # gW[Ìð 6 ÂÜÅÉÀè treasures = treasures[0..5] # EXP lŸ 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 # S[hlŸ $game_party.gain_gold(gold) # gW[lŸ 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 # ogUgEBhEðì¬ @result_window = Window_BattleResult.new(exp, gold, treasures) # EFCgJEgðÝè @phase5_wait_count = 100 end #-------------------------------------------------------------------------- # t[XV (At^[ogtF[Y) #-------------------------------------------------------------------------- def update_phase5 # EFCgJEgª 0 æèå«¢ê if @phase5_wait_count > 0 # EFCgJEgðžç· @phase5_wait_count -= 1 # EFCgJEgª 0 ÉÈÁœê if @phase5_wait_count == 0 # UgEBhEð\Š @result_window.visible = true # CtF[YtOðNA $game_temp.battle_main_phase = false # Xe[^XEBhEðtbV
@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) # ogI¹ battle_end(0) end end #============================================================================== # ¡ Scene_Battle (ªè` 3) #------------------------------------------------------------------------------ # @ogæÊÌðs€NXÅ·B #============================================================================== #-------------------------------------------------------------------------- # AN^[R}htF[YJn #-------------------------------------------------------------------------- def start_phase3 # CtF[YtOðNA $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 # JÌÝè @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 #-------------------------------------------------------------------------- # AN^[ÌR}hüÍI¹ #-------------------------------------------------------------------------- def phase3_next_actor @command.shift @command_a = false # CtF[YtOðZbg $game_temp.battle_main_phase = true # AN^[R}hEBhEð³ø» @actor_command_window.active = false @actor_command_window.visible = false # AN^[ÌŸÅGtFNg OFF if @active_actor != nil @active_actor.blink = false end action_start(@active_actor) # Jð³Éß· if @camera == "command" @spriteset.screen_target(0, 0, 1) end return end #-------------------------------------------------------------------------- # AN^[R}hEBhEÌZbgAbv #-------------------------------------------------------------------------- def phase3_setup_command_window # p[eBR}hEBhEð³ø» @party_command_window.active = false @party_command_window.visible = false # AN^[R}hEBhEðLø» @actor_command_window.active = true @actor_command_window.visible = true # AN^[R}hEBhEÌÊuðÝè @actor_command_window.x = @actor_index * 160 + (4 - $game_party.actors.size) * 80 # CfbNXð 0 ÉÝè @actor_command_window.index = 0 end #-------------------------------------------------------------------------- # Gl~[ANVì¬ #-------------------------------------------------------------------------- def enemy_action(number) enemy = $game_troop.enemies[number] unless enemy.current_action.forcing enemy.make_action end action_start(enemy) end #-------------------------------------------------------------------------- # t[XV (AN^[R}htF[Y : î{R}h) #-------------------------------------------------------------------------- def update_phase3_basic_command unless @active_actor.inputable? @active_actor.current_action.clear phase3_next_actor return end # B {^ª³êœê if Input.trigger?(Input::B) and @party == false # LZ SE ðt $game_system.se_play($data_system.cancel_se) @party = true end if @party == true and ((@action > 0 and @action_battlers.empty?) or (@action == 0 and (@action_battlers.empty? or @action_battlers[0].phase == 1))) # p[eBR}htF[YÖ start_phase2 return end # C {^ª³êœê if Input.trigger?(Input::C) @party = false # AN^[R}hEBhEÌJ[\ÊuŪò case @actor_command_window.index when 0 # U if victory? # uU[ SE ðt $game_system.se_play($data_system.buzzer_se) return end # è SE ðt $game_system.se_play($data_system.decision_se) # Gl~[ÌIððJn start_enemy_select when 1 # XL # è SE ðt $game_system.se_play($data_system.decision_se) # XLÌIððJn start_skill_select when 2 # hä # è SE ðt $game_system.se_play($data_system.decision_se) # ANVðÝè @active_actor.current_action.kind = 0 @active_actor.current_action.basic = 1 # ÌAN^[ÌR}hüÍÖ phase3_next_actor when 3 # ACe # è SE ðt $game_system.se_play($data_system.decision_se) # ACeÌIððJn start_item_select end return end # R {^ª³êœê if Input.trigger?(Input::R) $game_system.se_play($data_system.cursor_se) @party = false # AN^[ÌŸÅGtFNg OFF if @active_actor != nil @active_actor.blink = false end @command.push(@command[0]) @command.shift @command_a = false # CtF[YtOðZbg $game_temp.battle_main_phase = true # AN^[R}hEBhEð³ø» @actor_command_window.active = false @actor_command_window.visible = false end # L {^ª³êœê if Input.trigger?(Input::L) $game_system.se_play($data_system.cursor_se) @party = false # AN^[ÌŸÅGtFNg OFF if @active_actor != nil @active_actor.blink = false end @command.unshift(@command[@command.size - 1]) @command.delete_at(@command.size - 1) @command_a = false # CtF[YtOðZbg $game_temp.battle_main_phase = true # AN^[R}hEBhEð³ø» @actor_command_window.active = false @actor_command_window.visible = false end # E {^ª³êœê if Input.trigger?(Input::RIGHT) $game_system.se_play($data_system.cursor_se) @party = false # AN^[ÌŸÅGtFNg OFF if @active_actor != nil @active_actor.blink = false end actor = $game_party.actors[@actor_index] while actor == @command[0] or (not @command.include?(actor)) @actor_index += 1 @actor_index %= $game_party.actors.size actor = $game_party.actors[@actor_index] if actor == @command[0] break end end while actor != @command[0] @command.push(@command.shift) end @command_a = false # CtF[YtOðZbg $game_temp.battle_main_phase = true # AN^[R}hEBhEð³ø» @actor_command_window.active = false @actor_command_window.visible = false end # ¶ {^ª³êœê if Input.trigger?(Input::LEFT) $game_system.se_play($data_system.cursor_se) @party = false # AN^[ÌŸÅGtFNg OFF if @active_actor != nil @active_actor.blink = false end actor = $game_party.actors[@actor_index] while actor == @command[0] or (not @command.include?(actor)) @actor_index -= 1 @actor_index %= $game_party.actors.size actor = $game_party.actors[@actor_index] if actor == @command[0] break end end while actor != @command[0] @command.push(@command.shift) end @command_a = false # CtF[YtOðZbg $game_temp.battle_main_phase = true # AN^[R}hEBhEð³ø» @actor_command_window.active = false @actor_command_window.visible = false end end #-------------------------------------------------------------------------- # t[XV (AN^[R}htF[Y : XLIð) #-------------------------------------------------------------------------- def update_phase3_skill_select # R}hIðÉs®s\ÉÈÁœê unless @active_actor.inputable? @active_actor.current_action.clear command_delete # ÌAN^[ÌR}hüÍÖ phase3_next_actor return end # XLEBhEðÂóÔÉ·é @skill_window.visible = true # XLEBhEðXV @skill_window.update # B {^ª³êœê if Input.trigger?(Input::B) # LZ SE ðt $game_system.se_play($data_system.cancel_se) # XLÌIððI¹ end_skill_select return end # C {^ª³êœê if Input.trigger?(Input::C) # XLEBhEÅ»ÝIð³êÄ¢éf[^ðæŸ @skill = @skill_window.skill # gpūȢê if @skill == nil or not @active_actor.skill_can_use?(@skill.id) # uU[ SE ðt $game_system.se_play($data_system.buzzer_se) return end if @skill.scope == 1 or @skill.scope == 2 if victory? # uU[ SE ðt $game_system.se_play($data_system.buzzer_se) return end end # è SE ðt $game_system.se_play($data_system.decision_se) # ANVðÝè @active_actor.current_action.skill_id = @skill.id # XLEBhEðsÂóÔÉ·é @skill_window.visible = false # øÊÍͪGPÌÌê if @skill.scope == 1 # Gl~[ÌIððJn start_enemy_select # øÊÍͪ¡ûPÌÌê elsif @skill.scope == 3 or @skill.scope == 5 # AN^[ÌIððJn start_actor_select # øÊÍͪPÌÅÍÈ¢ê else # ANVðÝè @active_actor.current_action.kind = 1 # XLÌIððI¹ end_skill_select # ÌAN^[ÌR}hüÍÖ phase3_next_actor end return end end #-------------------------------------------------------------------------- # t[XV (AN^[R}htF[Y : ACeIð) #-------------------------------------------------------------------------- def update_phase3_item_select # R}hIðÉs®s\ÉÈÁœê unless @active_actor.inputable? @active_actor.current_action.clear command_delete # ÌAN^[ÌR}hüÍÖ phase3_next_actor return end # ACeEBhEðÂóÔÉ·é @item_window.visible = true # ACeEBhEðXV @item_window.update # B {^ª³êœê if Input.trigger?(Input::B) # LZ SE ðt $game_system.se_play($data_system.cancel_se) # ACeÌIððI¹ end_item_select return end # C {^ª³êœê if Input.trigger?(Input::C) # ACeEBhEÅ»ÝIð³êÄ¢éf[^ðæŸ @item = @item_window.item # gpūȢê unless $game_party.item_can_use?(@item.id) # uU[ SE ðt $game_system.se_play($data_system.buzzer_se) return end if @item.scope == 1 or @item.scope == 2 if victory? # uU[ SE ðt $game_system.se_play($data_system.buzzer_se) return end end # è SE ðt $game_system.se_play($data_system.decision_se) # ANVðÝè @active_actor.current_action.item_id = @item.id # ACeEBhEðsÂóÔÉ·é @item_window.visible = false # øÊÍͪGPÌÌê if @item.scope == 1 # Gl~[ÌIððJn start_enemy_select # øÊÍͪ¡ûPÌÌê elsif @item.scope == 3 or @item.scope == 5 # AN^[ÌIððJn start_actor_select # øÊÍͪPÌÅÍÈ¢ê else # ANVðÝè @active_actor.current_action.kind = 2 # ACeÌIððI¹ end_item_select # ÌAN^[ÌR}hüÍÖ phase3_next_actor end return end end #-------------------------------------------------------------------------- # t[XV (AN^[R}htF[Y : Gl~[Ið) #-------------------------------------------------------------------------- def update_phase3_enemy_select if victory? # Jð³Éß· if @camera == "select" @spriteset.screen_target(0, 0, 1) end # Gl~[ÌIððI¹ end_enemy_select return end # R}hIðÉs®s\ÉÈÁœê unless @active_actor.inputable? # Jð³Éß· if @camera == "select" @spriteset.screen_target(0, 0, 1) end @active_actor.current_action.clear command_delete # ÌAN^[ÌR}hüÍÖ phase3_next_actor return end # Gl~[A[ðXV @enemy_arrow.update # B {^ª³êœê if Input.trigger?(Input::B) # LZ SE ðt $game_system.se_play($data_system.cancel_se) # Jð³Éß· if @camera == "select" # JÌÝè @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 # Gl~[ÌIððI¹ end_enemy_select return end # C {^ª³êœê if Input.trigger?(Input::C) # è SE ðt $game_system.se_play($data_system.decision_se) # ANVðÝè @active_actor.current_action.kind = 0 @active_actor.current_action.basic = 0 @active_actor.current_action.target_index = @enemy_arrow.index # XLEBhE\ŠÌê if @skill_window != nil # ANVðÄÝè @active_actor.current_action.kind = 1 # XLÌIððI¹ end_skill_select end # ACeEBhE\ŠÌê if @item_window != nil # ANVðÄÝè @active_actor.current_action.kind = 2 # ACeÌIððI¹ end_item_select end # Gl~[ÌIððI¹ end_enemy_select # ÌAN^[ÌR}hüÍÖ phase3_next_actor end end #-------------------------------------------------------------------------- # t[XV (AN^[R}htF[Y : AN^[Ið) #-------------------------------------------------------------------------- def update_phase3_actor_select # R}hIðÉs®s\ÉÈÁœê unless @active_actor.inputable? @active_actor.current_action.clear command_delete # ÌAN^[ÌR}hüÍÖ phase3_next_actor return end # AN^[A[ðXV @actor_arrow.update # B {^ª³êœê if Input.trigger?(Input::B) # LZ SE ðt $game_system.se_play($data_system.cancel_se) # AN^[ÌIððI¹ end_actor_select return end # C {^ª³êœê if Input.trigger?(Input::C) # è SE ðt $game_system.se_play($data_system.decision_se) # ANVðÝè @active_actor.current_action.kind = 0 @active_actor.current_action.basic = 0 @active_actor.current_action.target_index = @actor_arrow.index # AN^[ÌIððI¹ end_actor_select # XLEBhE\ŠÌê if @skill_window != nil # ANVðÄÝè @active_actor.current_action.kind = 1 # XLÌIððI¹ end_skill_select end # ACeEBhE\ŠÌê if @item_window != nil # ANVðÄÝè @active_actor.current_action.kind = 2 # ACeÌIððI¹ end_item_select end # ÌAN^[ÌR}hüÍÖ phase3_next_actor end end #-------------------------------------------------------------------------- # Gl~[IðJn #-------------------------------------------------------------------------- alias :start_enemy_select_rtab :start_enemy_select def start_enemy_select @camera = "select" for enemy in $game_troop.enemies if enemy.exist? zoom = 1 / enemy.zoom @spriteset.screen_target(enemy.attack_x(zoom) * 0.75, enemy.attack_y(zoom) * 0.75, zoom) break end end # IWiÌ start_enemy_select_rtab end #-------------------------------------------------------------------------- # Gl~[IðI¹ #-------------------------------------------------------------------------- alias :end_enemy_select_rtab :end_enemy_select def end_enemy_select # IWiÌ end_enemy_select_rtab if (@action == 0 and not @action_battlers.empty?) or (@camera == "select" and (@active_actor.current_action.kind != 0 or @active_actor.animation1_id != 0)) @spriteset.screen_target(0, 0, 1) end end #-------------------------------------------------------------------------- # XLIðJn #-------------------------------------------------------------------------- def start_skill_select # XLEBhEðì¬ @skill_window = Window_Skill.new(@active_actor) # wvEBhEðÖAt¯ @skill_window.help_window = @help_window # AN^[R}hEBhEð³ø» @actor_command_window.active = false @actor_command_window.visible = false end #============================================================================== # ¡ Scene_Battle (ªè` 4) #------------------------------------------------------------------------------ # @ogæÊÌðs€NXÅ·B #============================================================================== #-------------------------------------------------------------------------- # CtF[YJn #-------------------------------------------------------------------------- def start_phase4 $game_temp.battle_main_phase = true end #-------------------------------------------------------------------------- # t[XV (CtF[Y) #-------------------------------------------------------------------------- def update_phase4 # ANVð§³êÄ¢éog[ª¶Ý·éê if $game_temp.forcing_battler != nil battler = $game_temp.forcing_battler if battler.current_action.forcing == false if @action_battlers.include?(battler) if @action > 0 or @action_battlers[0].phase == 1 @action_battlers.delete(battler) @action_battlers.push(battler) end if battler.phase == 1 battler.current_action.forcing = true force_action(battler) end else battler.current_action.forcing = true force_action(battler) action_start(battler) @action_battlers.delete(battler) @action_battlers.push(battler) end battler.at = @max battler.atp = 100 * battler.at / @max end end # action ª1ÈãÌêAêÄÉs®ðN±· for battler in @action_battlers.reverse # EFCgÌê if battler.wait > 0 # EFCgJEgðžç· battler.wait -= 1 break if @action == 0 next end unless fin? and battler.phase < 3 and not $game_system.battle_interpreter.running? action_phase(battler) end break if @action == 0 end # ANVð§³êÄ¢éog[ª¶ÝµÈ¢ê if $game_temp.forcing_battler == nil # ogCxgðZbgAbv setup_battle_event # ogCxgÀsÌê if $game_system.battle_interpreter.running? return end end for battler in @action_battlers.reverse if fin? and battler.phase < 3 and not $game_system.battle_interpreter.running? # í¬ªI¹µA©ÂAN^[ªs®ŒOÌêÍAN^[Ìs®ðÁ @action_battlers.delete(battler) end end if @action_battlers.empty? and not $game_system.battle_interpreter.running? # s»è judge end end #-------------------------------------------------------------------------- # ANVXV (CtF[Y) #-------------------------------------------------------------------------- def action_phase(battler) # action ª 1 ÌêAog[ªs®©Ç€©mF if @action == 1 and battler.phase < 3 for target in battler.target speller = synthe?(target) if speller == nil
Publicité