Inscrit le: 11 Aoû 2006, 00:00 Messages: 244 Points d'aide: 0/60
Créations :
Voir ses créations
|
- Code: Tout sélectionner
#-------------------------------------------------------------------------- # ? Jauge OD #-------------------------------------------------------------------------- def draw_actor_od_jauge(actor, x, y, width) # Jauge if $game_temp.in_battle && self.is_a?(Window_BattleStatus) @gs_od[actor.index] = actor.overdrive if @gs_od[actor.index] == nil dx = actor.screen_x + 52 - @od_g_width dy = y + ($game_temp.in_battle ? KGC::OD_jauge_OFF_Y_BATTLE : KGC::OD_jauge_OFF_Y) dx -= 16 if $imported["HPSPAlter"] && !KGC::HPSP_DRAW_NAME_LUMP gw = @gs_od[actor.index] * @od_g_width / KGC::OD_jauge_MAX maximum = @gs_od[actor.index] == KGC::OD_jauge_MAX else @jauge_x = 0 dx = x + width - @od_g_width - 13 dy = y + ($game_temp.in_battle ? KGC::OD_jauge_OFF_Y_BATTLE : KGC::OD_jauge_OFF_Y) gw = actor.overdrive * @od_g_width / KGC::OD_jauge_MAX maximum = actor.overdrive == KGC::OD_jauge_MAX end # Schéma if KGC::OD_jauge_SLANT self.contents.fill_rect(dx, dy, @od_g_width + 7, 6, Color.new(0, 0, 0, 0)) # Graduation gy = @od_g_height + 1 for i in 0...(@od_g_height + 2) self.contents.blt(dx + i, dy + gy - i, @od_jauge, Rect.new(0, gy - i, @od_g_width + 2, 1)) end # Effet de Substance gy -= 1 gy2 = @od_g_height * (maximum ? 3 : 2) + 1 for i in 0...@od_g_height self.contents.blt(dx + i + 2, dy + gy - i, @od_jauge, Rect.new(@jauge_x, gy2 - i, gw, 1)) end # Normal else self.contents.fill_rect(dx, dy, @od_g_width + 2, @od_g_height + 2, Color.new(0, 0, 0, 0)) self.contents.blt(dx, dy, @od_jauge, Rect.new(0, 0, @od_g_width + 2, @od_g_height + 2)) gy2 = @od_g_height * (maximum ? 2 : 1) + 2 self.contents.blt(dx + 1, dy + 1, @od_jauge, Rect.new(@jauge_x, gy2, gw, @od_g_height)) end end end #??????????????????????????????????????? #============================================================================== # ¦ Window_BattleStatus #============================================================================== class Window_BattleStatus < Window_Base #-------------------------------------------------------------------------- # ? Initialisation #-------------------------------------------------------------------------- alias initialize_KGC_OverDrive initialize def initialize @jauge_x, @gs_od = 0, [] @od_g_width = @@_od_jauge.width / 3 @od_g_height = (@@_od_jauge.height - 2) / 3 # Exécute du processus d'origine initialize_KGC_OverDrive end #-------------------------------------------------------------------------- # ? Rafraichissement #-------------------------------------------------------------------------- alias refresh_KGC_OverDrive refresh def refresh # Exécute le processus d'origine refresh_KGC_OverDrive for i in 0...$game_party.actors.size @gs_od[i] = $game_party.actors[i].overdrive end end #-------------------------------------------------------------------------- # ? Renouvelement de la graduation #-------------------------------------------------------------------------- alias update_KGC_OverDrive update def update # Exécute le processus d'origine update_KGC_OverDrive # L'image de la gauge est laissée unless $imported["HPSPAlter"] @jauge_x -= [@od_g_width / 20, 1].max @jauge_x = @od_g_width * 2 if @jauge_x < 0 end for i in 0...$game_party.actors.size draw_actor_od_jauge($game_party.actors[i], 0, 0, 120) end end end #??????????????????????????????????????? #============================================================================== # ¦ Scene_Battle #============================================================================== class Scene_Battle #-------------------------------------------------------------------------- # ? Fin du combat # result : Résultat (0:Victorieux 1:Lache 2:Défaite) #-------------------------------------------------------------------------- alias battle_end_KGC_OverDrive battle_end def battle_end(result) case result when 0 # Victorieux for actor in $game_party.actors next unless actor.exist? # Quand le type d'OD est Victorieux if actor.overdrive_type == 2 actor.overdrive += KGC::OD_GAIN_RATE[2] end end when 1 # Lache for actor in $game_party.actors next unless actor.exist? # Quand le type d'OD est Lache if actor.overdrive_type == 3 actor.overdrive += KGC::OD_GAIN_RATE[3] end end end # Exécute le processus d'origine battle_end_KGC_OverDrive(result) end end #??????????????????????????????????????? #============================================================================== # ¦ Scene_Battle #============================================================================== class Scene_Battle #-------------------------------------------------------------------------- # ? Renouvelement de la graduation #-------------------------------------------------------------------------- alias update_phase4_step2_KGC_OverDrive update_phase4_step2 def update_phase4_step2 if @active_battler.is_a?(Game_Actor) # Augmentation case @active_battler.overdrive_type when 4 # Solo alone = true for actor in $game_party.actors next if actor == @active_battler # S'il y a un survivant, ce n'est pas considéré comme solo. if actor.exist? alone = false break end end od_up = alone ? KGC::OD_GAIN_RATE[4] : 0 when 5 # Action od_up = KGC::OD_GAIN_RATE[5] when 6 # Si Revenant od_up = @active_battler.hp <= @active_battler.maxhp / 4 ? KGC::OD_GAIN_RATE[6] : 0 else od_up = 0 end @active_battler.overdrive += od_up end # Exécute le processus d'origine update_phase4_step2_KGC_OverDrive end end
|
|