mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 13:44:59 +00:00
Merge branch 'master' of https://github.com/Maruno17/pokemon-essentials
This commit is contained in:
@@ -271,6 +271,10 @@ class PokeBattle_Battler
|
||||
return ret
|
||||
end
|
||||
|
||||
def isSpecies?(species)
|
||||
return @pokemon && @pokemon.isSpecies?(species)
|
||||
end
|
||||
|
||||
# Returns the active types of this Pokémon. The array should not include the
|
||||
# same type more than once, and should not include any invalid type numbers
|
||||
# (e.g. -1).
|
||||
|
||||
@@ -108,7 +108,7 @@ class PokeBattle_Battler
|
||||
end
|
||||
# These effects are passed on if Baton Pass is used, but they need to be
|
||||
# cancelled in certain circumstances anyway
|
||||
@effects[PBEffects::Telekinesis] = 0 if isConst?(@species,PBSpecies,:GENGAR) && mega?
|
||||
@effects[PBEffects::Telekinesis] = 0 if isSpecies?(:GENGAR) && mega?
|
||||
@effects[PBEffects::GastroAcid] = false if nonNegatableAbility?
|
||||
else
|
||||
# These effects are passed on if Baton Pass is used
|
||||
|
||||
@@ -148,7 +148,7 @@ class PokeBattle_Battler
|
||||
def pbCheckFormOnStatusChange
|
||||
return if fainted? || @effects[PBEffects::Transform]
|
||||
# Shaymin - reverts if frozen
|
||||
if isConst?(@species,PBSpecies,:SHAYMIN) && frozen?
|
||||
if isSpecies?(:SHAYMIN) && frozen?
|
||||
pbChangeForm(0,_INTL("{1} transformed!",pbThis))
|
||||
end
|
||||
end
|
||||
@@ -156,7 +156,7 @@ class PokeBattle_Battler
|
||||
def pbCheckFormOnMovesetChange
|
||||
return if fainted? || @effects[PBEffects::Transform]
|
||||
# Keldeo - knowing Secret Sword
|
||||
if isConst?(@species,PBSpecies,:KELDEO)
|
||||
if isSpecies?(:KELDEO)
|
||||
newForm = 0
|
||||
newForm = 1 if pbHasMove?(:SECRETSWORD)
|
||||
pbChangeForm(newForm,_INTL("{1} transformed!",pbThis))
|
||||
@@ -166,7 +166,7 @@ class PokeBattle_Battler
|
||||
def pbCheckFormOnWeatherChange
|
||||
return if fainted? || @effects[PBEffects::Transform]
|
||||
# Castform - Forecast
|
||||
if isConst?(@species,PBSpecies,:CASTFORM)
|
||||
if isSpecies?(:CASTFORM)
|
||||
if hasActiveAbility?(:FORECAST)
|
||||
newForm = 0
|
||||
case @battle.pbWeather
|
||||
@@ -184,7 +184,7 @@ class PokeBattle_Battler
|
||||
end
|
||||
end
|
||||
# Cherrim - Flower Gift
|
||||
if isConst?(@species,PBSpecies,:CHERRIM)
|
||||
if isSpecies?(:CHERRIM)
|
||||
if hasActiveAbility?(:FLOWERGIFT)
|
||||
newForm = 0
|
||||
case @battle.pbWeather
|
||||
@@ -209,7 +209,7 @@ class PokeBattle_Battler
|
||||
# Form changes upon entering battle and when the weather changes
|
||||
pbCheckFormOnWeatherChange if !endOfRound
|
||||
# Darmanitan - Zen Mode
|
||||
if isConst?(@species,PBSpecies,:DARMANITAN) && isConst?(@ability,PBAbilities,:ZENMODE)
|
||||
if isSpecies?(:DARMANITAN) && isConst?(@ability,PBAbilities,:ZENMODE)
|
||||
if @hp<=@totalhp/2
|
||||
if @form!=1
|
||||
@battle.pbShowAbilitySplash(self,true)
|
||||
@@ -223,7 +223,7 @@ class PokeBattle_Battler
|
||||
end
|
||||
end
|
||||
# Minior - Shields Down
|
||||
if isConst?(@species,PBSpecies,:MINIOR) && isConst?(@ability,PBAbilities,:SHIELDSDOWN)
|
||||
if isSpecies?(:MINIOR) && isConst?(@ability,PBAbilities,:SHIELDSDOWN)
|
||||
if @hp>@totalhp/2 # Turn into Meteor form
|
||||
newForm = (@form>=7) ? @form-7 : @form
|
||||
if @form!=newForm
|
||||
@@ -240,7 +240,7 @@ class PokeBattle_Battler
|
||||
end
|
||||
end
|
||||
# Wishiwashi - Schooling
|
||||
if isConst?(@species,PBSpecies,:WISHIWASHI) && isConst?(@ability,PBAbilities,:SCHOOLING)
|
||||
if isSpecies?(:WISHIWASHI) && isConst?(@ability,PBAbilities,:SCHOOLING)
|
||||
if @level>=20 && @hp>@totalhp/4
|
||||
if @form!=1
|
||||
@battle.pbShowAbilitySplash(self,true)
|
||||
@@ -254,7 +254,7 @@ class PokeBattle_Battler
|
||||
end
|
||||
end
|
||||
# Zygarde - Power Construct
|
||||
if isConst?(@species,PBSpecies,:ZYGARDE) && isConst?(@ability,PBAbilities,:POWERCONSTRUCT) &&
|
||||
if isSpecies?(:ZYGARDE) && isConst?(@ability,PBAbilities,:POWERCONSTRUCT) &&
|
||||
endOfRound
|
||||
if @hp<=@totalhp/2 && @form<2 # Turn into Complete Forme
|
||||
newForm = @form+2
|
||||
|
||||
@@ -216,7 +216,7 @@ class PokeBattle_Battler
|
||||
end
|
||||
end
|
||||
# Stance Change
|
||||
if isConst?(@species,PBSpecies,:AEGISLASH) && isConst?(@ability,PBAbilities,:STANCECHANGE)
|
||||
if isSpecies?(:AEGISLASH) && isConst?(@ability,PBAbilities,:STANCECHANGE)
|
||||
if move.damagingMove?
|
||||
pbChangeForm(1,_INTL("{1} changed to Blade Forme!",pbThis))
|
||||
elsif isConst?(move.id,PBMoves,:KINGSSHIELD)
|
||||
|
||||
@@ -96,7 +96,7 @@ class PokeBattle_Battler
|
||||
end
|
||||
# Greninja - Battle Bond
|
||||
if !user.fainted? && !user.effects[PBEffects::Transform] &&
|
||||
isConst?(user.species,PBSpecies,:GRENINJA) &&
|
||||
user.isSpecies?(:GRENINJA) &&
|
||||
isConst?(user.ability,PBAbilities,:BATTLEBOND)
|
||||
if !@battle.pbAllFainted?(user.idxOpposingSide) &&
|
||||
!@battle.battleBond[user.index&1][user.pokemonIndex]
|
||||
|
||||
Reference in New Issue
Block a user