Update 6.8

This commit is contained in:
chardub
2026-07-10 15:42:06 -04:00
parent 5b85e72cb2
commit 6a6f126a18
7871 changed files with 493194 additions and 224826 deletions
@@ -42,6 +42,7 @@ class PokeBattle_Battler
attr_accessor :tookPhysicalHit
attr_accessor :damageState
attr_accessor :initialHP # Set at the start of each move's usage
attr_accessor :original_ability
#=============================================================================
# Complex accessors
@@ -771,6 +772,21 @@ class PokeBattle_Battler
@battle.pbDisplay(_INTL("{1} changed to the Meteor Form!", pbThis))
end
end
if @pokemon.species == :TRIPLE_CELESTIAL_M
if new_hp <= (@totalhp / 2)
changeBattlerForm(:TRIPLE_CELESTIAL_M, :TRIPLE_CELESTIAL_C,nil, :SHELLSMASH)
@battle.pbDisplay(_INTL("{1} changed to the Core Form!", pbThis))
end
end
if @pokemon.species == :TRIPLE_CELESTIAL_C
if new_hp > (@totalhp / 2)
changeBattlerForm(:TRIPLE_CELESTIAL_C, :TRIPLE_CELESTIAL_M,nil, :SHELLSMASH)
@battle.pbDisplay(_INTL("{1} changed to the Meteor Form!", pbThis))
end
end
end
end
@@ -798,4 +814,6 @@ class PokeBattle_Battler
@battle.scene.pbAnimation(moveID, self,self)
@battle.scene.pbRefreshOne(@index)
end
end
@@ -22,7 +22,6 @@ class PokeBattle_Battler
@hp = @totalhp = 0
@type1 = @type2 = nil
@ability_id = nil
@ability2_id = nil
@item_id = nil
@gender = 0
@attack = @defense = @spatk = @spdef = @speed = 0
@@ -82,7 +81,7 @@ class PokeBattle_Battler
@type1 = pkmn.type1
@type2 = pkmn.type2
@ability_id = pkmn.ability_id
@ability2_id = pkmn.ability2_id
@original_ability = @ability_id
@item_id = pkmn.item_id
@gender = pkmn.gender
@attack = pkmn.attack
@@ -54,6 +54,7 @@ class PokeBattle_Battler
return if @fainted # Has already fainted properly
@battle.pbDisplayBrief(_INTL("{1} fainted!",pbThis)) if showMessage
updateSpirits()
$Trainer.stats&.incr_nb_pokemon_defeated if opposes?
PBDebug.log("[Pokémon fainted] #{pbThis} (#{@index})") if !showMessage
@battle.scene.pbFaintBattler(self)
pbInitEffects(false)
@@ -283,7 +284,6 @@ class PokeBattle_Battler
@effects[PBEffects::TransformSpecies] = target.species
pbChangeTypes(target)
self.ability = target.ability
self.ability2 = target.ability2 if target.ability2
@attack = target.attack
@defense = target.defense
@spatk = target.spatk
@@ -60,9 +60,11 @@ class PokeBattle_Battler
if abilityActive?
BattleHandlers.triggerAbilityOnStatGain(self.ability,self,stat,user)
end
checkStatRaiseBattleChallenge(stat,increment) if user.pbOwnedByPlayer?
return true
end
def pbRaiseStatStageByCause(stat,increment,user,cause,showAnim=true,ignoreContrary=false)
# Contrary
if hasActiveAbility?(:CONTRARY) && !ignoreContrary && !@battle.moldBreaker
@@ -120,6 +120,7 @@ class PokeBattle_Battler
@effects[PBEffects::GemConsumed] = nil
@effects[PBEffects::ShellTrap] = false
@battle.eachBattler { |b| b.pbContinualAbilityChecks } # Trace, end primordial weathers
checkChallengesAfterTurn
end
def pbConfusionDamage(msg)
@@ -723,6 +724,10 @@ class PokeBattle_Battler
targets.each do |b|
next if b.damageState.unaffected
move.pbInflictHPDamage(b)
unless onPlayerSide?
@battle.damage_received += b.damageState.hpLost
end
end
# Animate the hit flashing and HP bar changes
move.pbAnimateHitAndHPLost(user, targets)
@@ -806,4 +811,8 @@ class PokeBattle_Battler
user.pbFaint if user.fainted?
return true
end
def onPlayerSide?
return (@index % 2) == 0
end
end
@@ -222,7 +222,11 @@ class PokeBattle_Battler
end
end
end
# Obedience check
if @battle.caughtOffGuard && @battle.turnCount == 0 && !@battle.pbOwnedByPlayer?(@index)
@battle.pbDisplay(_INTL("{1} was caught off guard and couldn't move!",pbThis))
return false
end
# Obedience check
return false if !pbObedienceCheck?(choice)
# Truant
if hasActiveAbility?(:TRUANT)
@@ -98,7 +98,6 @@ class PokeBattle_Battler
# User's ability
if user.abilityActive?
BattleHandlers.triggerUserAbilityEndOfMove(user.ability,user,targets,move,@battle)
BattleHandlers.triggerUserAbilityEndOfMove(user.ability2,user,targets,move,@battle) if user.ability2
end
# Greninja - Battle Bond
if !user.fainted? && !user.effects[PBEffects::Transform] &&
@@ -168,7 +167,6 @@ class PokeBattle_Battler
next if b.damageState.unaffected || switchedBattlers.include?(b.index)
next if !b.abilityActive?
BattleHandlers.triggerTargetAbilityAfterMoveUse(b.ability,b,user,move,switchedBattlers,@battle)
BattleHandlers.triggerTargetAbilityAfterMoveUse(b.ability2,b,user,move,switchedBattlers,@battle) if b.ability2
if !switchedBattlers.include?(b.index) && move.damagingMove?
if b.pbAbilitiesOnDamageTaken(b.damageState.initialHP) # Emergency Exit, Wimp Out
switchWimpOut.push(b.index)