Added some more Gen 8 item effects, added Intimidate being blocked by some abilities, fixed Nectars being usable on fainted Oricorio

This commit is contained in:
Maruno17
2021-07-17 20:48:06 +01:00
parent 78f5530cbe
commit 14748f4999
22 changed files with 206 additions and 152 deletions

View File

@@ -541,6 +541,12 @@ class PokeBattle_Battler
return true return true
end end
def effectiveWeather
ret = @battle.pbWeather
ret = :None if [:Sun, :Rain, :HarshSun, :HeavyRain].include?(ret) && hasActiveItem?(:UTILITYUMBRELLA)
return ret
end
def affectedByPowder?(showMsg=false) def affectedByPowder?(showMsg=false)
return false if fainted? return false if fainted?
if pbHasType?(:GRASS) && Settings::MORE_TYPE_EFFECTS if pbHasType?(:GRASS) && Settings::MORE_TYPE_EFFECTS

View File

@@ -169,7 +169,7 @@ class PokeBattle_Battler
if isSpecies?(:CASTFORM) if isSpecies?(:CASTFORM)
if hasActiveAbility?(:FORECAST) if hasActiveAbility?(:FORECAST)
newForm = 0 newForm = 0
case @battle.pbWeather case effectiveWeather
when :Sun, :HarshSun then newForm = 1 when :Sun, :HarshSun then newForm = 1
when :Rain, :HeavyRain then newForm = 2 when :Rain, :HeavyRain then newForm = 2
when :Hail then newForm = 3 when :Hail then newForm = 3
@@ -187,7 +187,7 @@ class PokeBattle_Battler
if isSpecies?(:CHERRIM) if isSpecies?(:CHERRIM)
if hasActiveAbility?(:FLOWERGIFT) if hasActiveAbility?(:FLOWERGIFT)
newForm = 0 newForm = 0
newForm = 1 if [:Sun, :HarshSun].include?(@battle.pbWeather) newForm = 1 if [:Sun, :HarshSun].include?(effectiveWeather)
if @form!=newForm if @form!=newForm
@battle.pbShowAbilitySplash(self,true) @battle.pbShowAbilitySplash(self,true)
@battle.pbHideAbilitySplash(self) @battle.pbHideAbilitySplash(self)
@@ -199,7 +199,7 @@ class PokeBattle_Battler
end end
# Eiscue - Ice Face # Eiscue - Ice Face
if !ability_changed && isSpecies?(:EISCUE) && self.ability = :ICEFACE && if !ability_changed && isSpecies?(:EISCUE) && self.ability = :ICEFACE &&
@form == 1 && @battle.pbWeather == :Hail @form == 1 && effectiveWeather == :Hail
@canRestoreIceFace = true # Changed form at end of round @canRestoreIceFace = true # Changed form at end of round
end end
end end

View File

@@ -52,7 +52,7 @@ class PokeBattle_Battler
return false return false
end end
# Weather immunity # Weather immunity
if newStatus == :FROZEN && [:Sun, :HarshSun].include?(@battle.pbWeather) if newStatus == :FROZEN && [:Sun, :HarshSun].include?(effectiveWeather)
@battle.pbDisplay(_INTL("It doesn't affect {1}...",pbThis(true))) if showMessages @battle.pbDisplay(_INTL("It doesn't affect {1}...",pbThis(true))) if showMessages
return false return false
end end

View File

@@ -253,6 +253,17 @@ class PokeBattle_Battler
end end
return false return false
end end
if Settings::MECHANICS_GENERATION >= 8 && hasActiveAbility?([:OBLIVIOUS, :OWNTEMPO, :INNERFOCUS, :SCRAPPY])
@battle.pbShowAbilitySplash(self)
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
@battle.pbDisplay(_INTL("{1}'s {2} cannot be lowered!", pbThis, GameData::Stat.get(:ATTACK).name))
else
@battle.pbDisplay(_INTL("{1}'s {2} prevents {3} loss!", pbThis, abilityName,
GameData::Stat.get(:ATTACK).name))
end
@battle.pbHideAbilitySplash(self)
return false
end
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
return pbLowerStatStageByAbility(:ATTACK,1,user,false) return pbLowerStatStageByAbility(:ATTACK,1,user,false)
end end

View File

@@ -324,7 +324,7 @@ class PokeBattle_Battler
@battle.pbCommonAnimation("Powder",user) @battle.pbCommonAnimation("Powder",user)
@battle.pbDisplay(_INTL("When the flame touched the powder on the Pokémon, it exploded!")) @battle.pbDisplay(_INTL("When the flame touched the powder on the Pokémon, it exploded!"))
user.lastMoveFailed = true user.lastMoveFailed = true
if ![:Rain, :HeavyRain].include?(@battle.pbWeather) && user.takesIndirectDamage? if ![:Rain, :HeavyRain].include?(user.effectiveWeather) && user.takesIndirectDamage?
oldHP = user.hp oldHP = user.hp
user.pbReduceHP((user.totalhp/4.0).round,false) user.pbReduceHP((user.totalhp/4.0).round,false)
user.pbFaint if user.fainted? user.pbFaint if user.fainted?

View File

@@ -46,7 +46,7 @@ class PokeBattle_Move
Effectiveness.ineffective_type?(moveType, defType) Effectiveness.ineffective_type?(moveType, defType)
end end
# Delta Stream's weather # Delta Stream's weather
if @battle.pbWeather == :StrongWinds if target.effectiveWeather == :StrongWinds
ret = Effectiveness::NORMAL_EFFECTIVE_ONE if defType == :FLYING && ret = Effectiveness::NORMAL_EFFECTIVE_ONE if defType == :FLYING &&
Effectiveness.super_effective_type?(moveType, defType) Effectiveness.super_effective_type?(moveType, defType)
end end
@@ -349,13 +349,14 @@ class PokeBattle_Move
end end
end end
# Terrain moves # Terrain moves
terrain_multiplier = (Settings::MECHANICS_GENERATION >= 8) ? 1.3 : 1.5
case @battle.field.terrain case @battle.field.terrain
when :Electric when :Electric
multipliers[:base_damage_multiplier] *= 1.5 if type == :ELECTRIC && user.affectedByTerrain? multipliers[:base_damage_multiplier] *= terrain_multiplier if type == :ELECTRIC && user.affectedByTerrain?
when :Grassy when :Grassy
multipliers[:base_damage_multiplier] *= 1.5 if type == :GRASS && user.affectedByTerrain? multipliers[:base_damage_multiplier] *= terrain_multiplier if type == :GRASS && user.affectedByTerrain?
when :Psychic when :Psychic
multipliers[:base_damage_multiplier] *= 1.5 if type == :PSYCHIC && user.affectedByTerrain? multipliers[:base_damage_multiplier] *= terrain_multiplier if type == :PSYCHIC && user.affectedByTerrain?
when :Misty when :Misty
multipliers[:base_damage_multiplier] /= 2 if type == :DRAGON && target.affectedByTerrain? multipliers[:base_damage_multiplier] /= 2 if type == :DRAGON && target.affectedByTerrain?
end end
@@ -381,7 +382,7 @@ class PokeBattle_Move
multipliers[:final_damage_multiplier] *= 0.75 multipliers[:final_damage_multiplier] *= 0.75
end end
# Weather # Weather
case @battle.pbWeather case user.effectiveWeather
when :Sun, :HarshSun when :Sun, :HarshSun
if type == :FIRE if type == :FIRE
multipliers[:final_damage_multiplier] *= 1.5 multipliers[:final_damage_multiplier] *= 1.5

View File

@@ -132,7 +132,7 @@ class PokeBattle_Move_008 < PokeBattle_ParalysisMove
def hitsFlyingTargets?; return true; end def hitsFlyingTargets?; return true; end
def pbBaseAccuracy(user,target) def pbBaseAccuracy(user,target)
case @battle.pbWeather case target.effectiveWeather
when :Sun, :HarshSun when :Sun, :HarshSun
return 50 return 50
when :Rain, :HeavyRain when :Rain, :HeavyRain
@@ -203,7 +203,7 @@ end
#=============================================================================== #===============================================================================
class PokeBattle_Move_00D < PokeBattle_FreezeMove class PokeBattle_Move_00D < PokeBattle_FreezeMove
def pbBaseAccuracy(user,target) def pbBaseAccuracy(user,target)
return 0 if @battle.pbWeather == :Hail return 0 if target.effectiveWeather == :Hail
return super return super
end end
end end
@@ -309,7 +309,7 @@ class PokeBattle_Move_015 < PokeBattle_ConfuseMove
def hitsFlyingTargets?; return true; end def hitsFlyingTargets?; return true; end
def pbBaseAccuracy(user,target) def pbBaseAccuracy(user,target)
case @battle.pbWeather case target.effectiveWeather
when :Sun, :HarshSun when :Sun, :HarshSun
return 50 return 50
when :Rain, :HeavyRain when :Rain, :HeavyRain
@@ -741,7 +741,7 @@ class PokeBattle_Move_028 < PokeBattle_MultiStatUpMove
def pbOnStartUse(user,targets) def pbOnStartUse(user,targets)
increment = 1 increment = 1
increment = 2 if [:Sun, :HarshSun].include?(@battle.pbWeather) increment = 2 if [:Sun, :HarshSun].include?(user.effectiveWeather)
@statUp[1] = @statUp[3] = increment @statUp[1] = @statUp[3] = increment
end end
end end

View File

@@ -105,13 +105,13 @@ end
#=============================================================================== #===============================================================================
class PokeBattle_Move_087 < PokeBattle_Move class PokeBattle_Move_087 < PokeBattle_Move
def pbBaseDamage(baseDmg,user,target) def pbBaseDamage(baseDmg,user,target)
baseDmg *= 2 if @battle.pbWeather != :None baseDmg *= 2 if user.effectiveWeather != :None
return baseDmg return baseDmg
end end
def pbBaseType(user) def pbBaseType(user)
ret = :NORMAL ret = :NORMAL
case @battle.pbWeather case user.effectiveWeather
when :Sun, :HarshSun when :Sun, :HarshSun
ret = :FIRE if GameData::Type.exists?(:FIRE) ret = :FIRE if GameData::Type.exists?(:FIRE)
when :Rain, :HeavyRain when :Rain, :HeavyRain
@@ -2064,7 +2064,7 @@ class PokeBattle_Move_0C4 < PokeBattle_TwoTurnMove
def pbIsChargingTurn?(user) def pbIsChargingTurn?(user)
ret = super ret = super
if !user.effects[PBEffects::TwoTurnAttack] if !user.effects[PBEffects::TwoTurnAttack]
if [:Sun, :HarshSun].include?(@battle.pbWeather) if [:Sun, :HarshSun].include?(user.effectiveWeather)
@powerHerb = false @powerHerb = false
@chargingTurn = true @chargingTurn = true
@damagingTurn = true @damagingTurn = true
@@ -2079,7 +2079,7 @@ class PokeBattle_Move_0C4 < PokeBattle_TwoTurnMove
end end
def pbBaseDamageMultiplier(damageMult,user,target) def pbBaseDamageMultiplier(damageMult,user,target)
damageMult /= 2 if ![:None, :Sun, :HarshSun].include?(@battle.pbWeather) damageMult /= 2 if ![:None, :Sun, :HarshSun].include?(user.effectiveWeather)
return damageMult return damageMult
end end
end end
@@ -2560,7 +2560,7 @@ end
#=============================================================================== #===============================================================================
class PokeBattle_Move_0D8 < PokeBattle_HealingMove class PokeBattle_Move_0D8 < PokeBattle_HealingMove
def pbOnStartUse(user,targets) def pbOnStartUse(user,targets)
case @battle.pbWeather case user.effectiveWeather
when :Sun, :HarshSun when :Sun, :HarshSun
@healAmount = (user.totalhp*2/3.0).round @healAmount = (user.totalhp*2/3.0).round
when :None, :StrongWinds when :None, :StrongWinds

View File

@@ -2242,7 +2242,7 @@ class PokeBattle_Move_167 < PokeBattle_Move
def canSnatch?; return true; end def canSnatch?; return true; end
def pbMoveFailed?(user,targets) def pbMoveFailed?(user,targets)
if @battle.pbWeather != :Hail if user.effectiveWeather != :Hail
@battle.pbDisplay(_INTL("But it failed!")) @battle.pbDisplay(_INTL("But it failed!"))
return true return true
end end
@@ -2416,8 +2416,8 @@ end
#=============================================================================== #===============================================================================
class PokeBattle_Move_16D < PokeBattle_HealingMove class PokeBattle_Move_16D < PokeBattle_HealingMove
def pbHealAmount(user) def pbHealAmount(user)
return (user.totalhp*2/3.0).round if @battle.pbWeather == :Sandstorm return (user.totalhp * 2 / 3.0).round if user.effectiveWeather == :Sandstorm
return (user.totalhp/2.0).round return (user.totalhp / 2.0).round
end end
end end

View File

@@ -80,7 +80,7 @@ class PokeBattle_Battle
attr_accessor :lastMoveUsed # Last move used attr_accessor :lastMoveUsed # Last move used
attr_accessor :lastMoveUser # Last move user attr_accessor :lastMoveUser # Last move user
attr_accessor :first_poke_ball # ID of the first thrown Poké Ball that failed attr_accessor :first_poke_ball # ID of the first thrown Poké Ball that failed
attr_Accessor :poke_ball_failed # Set after first_poke_ball to prevent it being set again attr_accessor :poke_ball_failed # Set after first_poke_ball to prevent it being set again
attr_reader :switching # True if during the switching phase of the round attr_reader :switching # True if during the switching phase of the round
attr_reader :futureSight # True if Future Sight is hitting attr_reader :futureSight # True if Future Sight is hitting
attr_reader :endOfRound # True during the end of round attr_reader :endOfRound # True during the end of round

View File

@@ -121,7 +121,7 @@ class PokeBattle_Battle
pbParty(1).each_with_index do |pkmn,idxPkmn| pbParty(1).each_with_index do |pkmn,idxPkmn|
pbCreateBattler(2*idxPkmn+side,pkmn,idxPkmn) pbCreateBattler(2*idxPkmn+side,pkmn,idxPkmn)
# Changes the Pokémon's form upon entering battle (if it should) # Changes the Pokémon's form upon entering battle (if it should)
@peer.pbOnEnteringBattle(self,pkmn,true) @peer.pbOnEnteringBattle(self, @battlers[2 * idxPkmn + side], pkmn, true)
pbSetSeen(@battlers[2*idxPkmn+side]) pbSetSeen(@battlers[2*idxPkmn+side])
@usedInBattle[side][idxPkmn] = true @usedInBattle[side][idxPkmn] = true
end end

View File

@@ -291,7 +291,7 @@ class PokeBattle_Battle
# Called from def pbReplace above and at the start of battle. # Called from def pbReplace above and at the start of battle.
# sendOuts is an array; each element is itself an array: [idxBattler,pkmn] # sendOuts is an array; each element is itself an array: [idxBattler,pkmn]
def pbSendOut(sendOuts,startBattle=false) def pbSendOut(sendOuts,startBattle=false)
sendOuts.each { |b| @peer.pbOnEnteringBattle(self,b[1]) } sendOuts.each { |b| @peer.pbOnEnteringBattle(self, @battlers[b[0]], b[1]) }
@scene.pbSendOutBattlers(sendOuts,startBattle) @scene.pbSendOutBattlers(sendOuts,startBattle)
sendOuts.each do |b| sendOuts.each do |b|
@scene.pbResetMoveIndex(b[0]) @scene.pbResetMoveIndex(b[0])

View File

@@ -67,16 +67,14 @@ class PokeBattle_Battle
when :ShadowSky then pbDisplay(_INTL("The shadow sky continues.")) when :ShadowSky then pbDisplay(_INTL("The shadow sky continues."))
end end
# Effects due to weather # Effects due to weather
curWeather = pbWeather
priority.each do |b| priority.each do |b|
# Weather-related abilities # Weather-related abilities
if b.abilityActive? if b.abilityActive?
BattleHandlers.triggerEORWeatherAbility(b.ability,curWeather,b,self) BattleHandlers.triggerEORWeatherAbility(b.ability, b.effectiveWeather, b, self)
b.pbFaint if b.fainted? b.pbFaint if b.fainted?
end end
# Weather damage # Weather damage
# NOTE: case b.effectiveWeather
case curWeather
when :Sandstorm when :Sandstorm
next if !b.takesSandstormDamage? next if !b.takesSandstormDamage?
pbDisplay(_INTL("{1} is buffeted by the sandstorm!",b.pbThis)) pbDisplay(_INTL("{1} is buffeted by the sandstorm!",b.pbThis))
@@ -257,10 +255,8 @@ class PokeBattle_Battle
pbDisplay(_INTL("{1}'s wish came true!",wishMaker)) pbDisplay(_INTL("{1}'s wish came true!",wishMaker))
end end
# Sea of Fire damage (Fire Pledge + Grass Pledge combination) # Sea of Fire damage (Fire Pledge + Grass Pledge combination)
curWeather = pbWeather
for side in 0...2 for side in 0...2
next if sides[side].effects[PBEffects::SeaOfFire]==0 next if sides[side].effects[PBEffects::SeaOfFire]==0
next if [:Rain, :HeavyRain].include?(curWeather)
@battle.pbCommonAnimation("SeaOfFire") if side==0 @battle.pbCommonAnimation("SeaOfFire") if side==0
@battle.pbCommonAnimation("SeaOfFireOpp") if side==1 @battle.pbCommonAnimation("SeaOfFireOpp") if side==1
priority.each do |b| priority.each do |b|

View File

@@ -4,7 +4,7 @@
BattleHandlers::SpeedCalcAbility.add(:CHLOROPHYLL, BattleHandlers::SpeedCalcAbility.add(:CHLOROPHYLL,
proc { |ability,battler,mult| proc { |ability,battler,mult|
next mult * 2 if [:Sun, :HarshSun].include?(battler.battle.pbWeather) next mult * 2 if [:Sun, :HarshSun].include?(battler.effectiveWeather)
} }
) )
@@ -16,7 +16,7 @@ BattleHandlers::SpeedCalcAbility.add(:QUICKFEET,
BattleHandlers::SpeedCalcAbility.add(:SANDRUSH, BattleHandlers::SpeedCalcAbility.add(:SANDRUSH,
proc { |ability,battler,mult| proc { |ability,battler,mult|
next mult * 2 if [:Sandstorm].include?(battler.battle.pbWeather) next mult * 2 if [:Sandstorm].include?(battler.effectiveWeather)
} }
) )
@@ -28,7 +28,7 @@ BattleHandlers::SpeedCalcAbility.add(:SLOWSTART,
BattleHandlers::SpeedCalcAbility.add(:SLUSHRUSH, BattleHandlers::SpeedCalcAbility.add(:SLUSHRUSH,
proc { |ability,battler,mult| proc { |ability,battler,mult|
next mult * 2 if [:Hail].include?(battler.battle.pbWeather) next mult * 2 if [:Hail].include?(battler.effectiveWeather)
} }
) )
@@ -40,7 +40,7 @@ BattleHandlers::SpeedCalcAbility.add(:SURGESURFER,
BattleHandlers::SpeedCalcAbility.add(:SWIFTSWIM, BattleHandlers::SpeedCalcAbility.add(:SWIFTSWIM,
proc { |ability,battler,mult| proc { |ability,battler,mult|
next mult * 2 if [:Rain, :HeavyRain].include?(battler.battle.pbWeather) next mult * 2 if [:Rain, :HeavyRain].include?(battler.effectiveWeather)
} }
) )
@@ -147,7 +147,7 @@ BattleHandlers::StatusImmunityAbility.copy(:INSOMNIA,:SWEETVEIL,:VITALSPIRIT)
BattleHandlers::StatusImmunityAbility.add(:LEAFGUARD, BattleHandlers::StatusImmunityAbility.add(:LEAFGUARD,
proc { |ability,battler,status| proc { |ability,battler,status|
next true if [:Sun, :HarshSun].include?(battler.battle.pbWeather) next true if [:Sun, :HarshSun].include?(battler.effectiveWeather)
} }
) )
@@ -826,13 +826,13 @@ BattleHandlers::AccuracyCalcTargetAbility.add(:NOGUARD,
BattleHandlers::AccuracyCalcTargetAbility.add(:SANDVEIL, BattleHandlers::AccuracyCalcTargetAbility.add(:SANDVEIL,
proc { |ability,mods,user,target,move,type| proc { |ability,mods,user,target,move,type|
mods[:evasion_multiplier] *= 1.25 if target.battle.pbWeather == :Sandstorm mods[:evasion_multiplier] *= 1.25 if target.effectiveWeather == :Sandstorm
} }
) )
BattleHandlers::AccuracyCalcTargetAbility.add(:SNOWCLOAK, BattleHandlers::AccuracyCalcTargetAbility.add(:SNOWCLOAK,
proc { |ability,mods,user,target,move,type| proc { |ability,mods,user,target,move,type|
mods[:evasion_multiplier] *= 1.25 if target.battle.pbWeather == :Hail mods[:evasion_multiplier] *= 1.25 if target.effectiveWeather == :Hail
} }
) )
@@ -916,7 +916,7 @@ BattleHandlers::DamageCalcUserAbility.add(:FLASHFIRE,
BattleHandlers::DamageCalcUserAbility.add(:FLOWERGIFT, BattleHandlers::DamageCalcUserAbility.add(:FLOWERGIFT,
proc { |ability,user,target,move,mults,baseDmg,type| proc { |ability,user,target,move,mults,baseDmg,type|
if move.physicalMove? && [:Sun, :HarshSun].include?(user.battle.pbWeather) if move.physicalMove? && [:Sun, :HarshSun].include?(user.effectiveWeather)
mults[:attack_multiplier] *= 1.5 mults[:attack_multiplier] *= 1.5
end end
} }
@@ -1005,7 +1005,7 @@ BattleHandlers::DamageCalcUserAbility.add(:RIVALRY,
BattleHandlers::DamageCalcUserAbility.add(:SANDFORCE, BattleHandlers::DamageCalcUserAbility.add(:SANDFORCE,
proc { |ability,user,target,move,mults,baseDmg,type| proc { |ability,user,target,move,mults,baseDmg,type|
if user.battle.pbWeather == :Sandstorm && if user.effectiveWeather == :Sandstorm &&
[:ROCK, :GROUND, :STEEL].include?(type) [:ROCK, :GROUND, :STEEL].include?(type)
mults[:base_damage_multiplier] *= 1.3 mults[:base_damage_multiplier] *= 1.3
end end
@@ -1026,7 +1026,7 @@ BattleHandlers::DamageCalcUserAbility.add(:SLOWSTART,
BattleHandlers::DamageCalcUserAbility.add(:SOLARPOWER, BattleHandlers::DamageCalcUserAbility.add(:SOLARPOWER,
proc { |ability,user,target,move,mults,baseDmg,type| proc { |ability,user,target,move,mults,baseDmg,type|
if move.specialMove? && [:Sun, :HarshSun].include?(user.battle.pbWeather) if move.specialMove? && [:Sun, :HarshSun].include?(user.effectiveWeather)
mults[:attack_multiplier] *= 1.5 mults[:attack_multiplier] *= 1.5
end end
} }
@@ -1122,7 +1122,7 @@ BattleHandlers::DamageCalcUserAllyAbility.add(:BATTERY,
BattleHandlers::DamageCalcUserAllyAbility.add(:FLOWERGIFT, BattleHandlers::DamageCalcUserAllyAbility.add(:FLOWERGIFT,
proc { |ability,user,target,move,mults,baseDmg,type| proc { |ability,user,target,move,mults,baseDmg,type|
if move.physicalMove? && [:Sun, :HarshSun].include?(user.battle.pbWeather) if move.physicalMove? && [:Sun, :HarshSun].include?(user.effectiveWeather)
mults[:attack_multiplier] *= 1.5 mults[:attack_multiplier] *= 1.5
end end
} }
@@ -1150,7 +1150,7 @@ BattleHandlers::DamageCalcTargetAbility.copy(:FILTER,:SOLIDROCK)
BattleHandlers::DamageCalcTargetAbility.add(:FLOWERGIFT, BattleHandlers::DamageCalcTargetAbility.add(:FLOWERGIFT,
proc { |ability,user,target,move,mults,baseDmg,type| proc { |ability,user,target,move,mults,baseDmg,type|
if move.specialMove? && [:Sun, :HarshSun].include?(user.battle.pbWeather) if move.specialMove? && [:Sun, :HarshSun].include?(target.effectiveWeather)
mults[:defense_multiplier] *= 1.5 mults[:defense_multiplier] *= 1.5
end end
} }
@@ -1235,7 +1235,7 @@ BattleHandlers::DamageCalcTargetAbilityNonIgnorable.add(:SHADOWSHIELD,
BattleHandlers::DamageCalcTargetAllyAbility.add(:FLOWERGIFT, BattleHandlers::DamageCalcTargetAllyAbility.add(:FLOWERGIFT,
proc { |ability,user,target,move,mults,baseDmg,type| proc { |ability,user,target,move,mults,baseDmg,type|
if move.specialMove? && [:Sun, :HarshSun].include?(user.battle.pbWeather) if move.specialMove? && [:Sun, :HarshSun].include?(target.effectiveWeather)
mults[:defense_multiplier] *= 1.5 mults[:defense_multiplier] *= 1.5
end end
} }
@@ -1864,7 +1864,7 @@ BattleHandlers::EORHealingAbility.add(:HEALER,
BattleHandlers::EORHealingAbility.add(:HYDRATION, BattleHandlers::EORHealingAbility.add(:HYDRATION,
proc { |ability,battler,battle| proc { |ability,battler,battle|
next if battler.status == :NONE next if battler.status == :NONE
next if ![:Rain, :HeavyRain].include?(battle.pbWeather) next if ![:Rain, :HeavyRain].include?(battler.effectiveWeather)
battle.pbShowAbilitySplash(battler) battle.pbShowAbilitySplash(battler)
oldStatus = battler.status oldStatus = battler.status
battler.pbCureStatus(PokeBattle_SceneConstants::USE_ABILITY_SPLASH) battler.pbCureStatus(PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
@@ -1987,7 +1987,7 @@ BattleHandlers::EORGainItemAbility.add(:HARVEST,
proc { |ability,battler,battle| proc { |ability,battler,battle|
next if battler.item next if battler.item
next if !battler.recycleItem || !GameData::Item.get(battler.recycleItem).is_berry? next if !battler.recycleItem || !GameData::Item.get(battler.recycleItem).is_berry?
if ![:Sun, :HarshSun].include?(battle.pbWeather) if ![:Sun, :HarshSun].include?(battler.effectiveWeather)
next unless battle.pbRandom(100)<50 next unless battle.pbRandom(100)<50
end end
battle.pbShowAbilitySplash(battler) battle.pbShowAbilitySplash(battler)

View File

@@ -455,7 +455,7 @@ class PokeBattle_AI
end end
end end
if move.function=="028" # Growth if move.function=="028" # Growth
score += 20 if [:Sun, :HarshSun].include?(@battle.pbWeather) score += 20 if [:Sun, :HarshSun].include?(user.effectiveWeather)
end end
end end
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
@@ -1869,7 +1869,7 @@ class PokeBattle_AI
if user.hp==user.totalhp || (skill>=PBTrainerAI.mediumSkill && !user.canHeal?) if user.hp==user.totalhp || (skill>=PBTrainerAI.mediumSkill && !user.canHeal?)
score -= 90 score -= 90
else else
case @battle.pbWeather case user.effectiveWeather
when :Sun, :HarshSun when :Sun, :HarshSun
score += 30 score += 30
when :None when :None
@@ -2159,7 +2159,7 @@ class PokeBattle_AI
if @battle.pbCheckGlobalAbility(:AIRLOCK) || if @battle.pbCheckGlobalAbility(:AIRLOCK) ||
@battle.pbCheckGlobalAbility(:CLOUDNINE) @battle.pbCheckGlobalAbility(:CLOUDNINE)
score -= 90 score -= 90
elsif @battle.pbWeather == :Sun elsif @battle.field.weather == :Sun
score -= 90 score -= 90
else else
user.eachMove do |m| user.eachMove do |m|
@@ -2172,7 +2172,7 @@ class PokeBattle_AI
if @battle.pbCheckGlobalAbility(:AIRLOCK) || if @battle.pbCheckGlobalAbility(:AIRLOCK) ||
@battle.pbCheckGlobalAbility(:CLOUDNINE) @battle.pbCheckGlobalAbility(:CLOUDNINE)
score -= 90 score -= 90
elsif @battle.pbWeather == :Rain elsif @battle.field.weather == :Rain
score -= 90 score -= 90
else else
user.eachMove do |m| user.eachMove do |m|
@@ -2185,7 +2185,7 @@ class PokeBattle_AI
if @battle.pbCheckGlobalAbility(:AIRLOCK) || if @battle.pbCheckGlobalAbility(:AIRLOCK) ||
@battle.pbCheckGlobalAbility(:CLOUDNINE) @battle.pbCheckGlobalAbility(:CLOUDNINE)
score -= 90 score -= 90
elsif @battle.pbWeather == :Sandstorm elsif @battle.field.weather == :Sandstorm
score -= 90 score -= 90
end end
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
@@ -2193,7 +2193,7 @@ class PokeBattle_AI
if @battle.pbCheckGlobalAbility(:AIRLOCK) || if @battle.pbCheckGlobalAbility(:AIRLOCK) ||
@battle.pbCheckGlobalAbility(:CLOUDNINE) @battle.pbCheckGlobalAbility(:CLOUDNINE)
score -= 90 score -= 90
elsif @battle.pbWeather == :Hail elsif @battle.field.weather == :Hail
score -= 90 score -= 90
end end
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
@@ -2522,7 +2522,7 @@ class PokeBattle_AI
if @battle.pbCheckGlobalAbility(:AIRLOCK) || if @battle.pbCheckGlobalAbility(:AIRLOCK) ||
@battle.pbCheckGlobalAbility(:CLOUDNINE) @battle.pbCheckGlobalAbility(:CLOUDNINE)
score -= 90 score -= 90
elsif @battle.pbWeather == :ShadowSky elsif @battle.field.weather == :ShadowSky
score -= 90 score -= 90
end end
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
@@ -2929,7 +2929,7 @@ class PokeBattle_AI
when "166" when "166"
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
when "167" when "167"
if user.pbOwnSide.effects[PBEffects::AuroraVeil]>0 || @battle.pbWeather != :Hail if user.pbOwnSide.effects[PBEffects::AuroraVeil]>0 || user.effectiveWeather != :Hail
score -= 90 score -= 90
else else
score += 40 score += 40
@@ -2988,7 +2988,7 @@ class PokeBattle_AI
else else
score += 50 score += 50
score -= user.hp*100/user.totalhp score -= user.hp*100/user.totalhp
score += 30 if @battle.pbWeather == :Sandstorm score += 30 if user.effectiveWeather == :Sandstorm
end end
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
when "16E" when "16E"

View File

@@ -43,7 +43,7 @@ class PokeBattle_AI
Effectiveness.ineffective_type?(moveType, defType) Effectiveness.ineffective_type?(moveType, defType)
end end
# Delta Stream's weather # Delta Stream's weather
if @battle.pbWeather == :StrongWinds if target.effectiveWeather == :StrongWinds
ret = Effectiveness::NORMAL_EFFECTIVE_ONE if defType == :FLYING && ret = Effectiveness::NORMAL_EFFECTIVE_ONE if defType == :FLYING &&
Effectiveness.super_effective_type?(moveType, defType) Effectiveness.super_effective_type?(moveType, defType)
end end
@@ -439,7 +439,7 @@ class PokeBattle_AI
end end
# Weather # Weather
if skill>=PBTrainerAI.mediumSkill if skill>=PBTrainerAI.mediumSkill
case @battle.pbWeather case user.effectiveWeather
when :Sun, :HarshSun when :Sun, :HarshSun
if type == :FIRE if type == :FIRE
multipliers[:final_damage_multiplier] *= 1.5 multipliers[:final_damage_multiplier] *= 1.5

View File

@@ -3,7 +3,7 @@
#=============================================================================== #===============================================================================
# Unused class. # Unused class.
class PokeBattle_NullBattlePeer class PokeBattle_NullBattlePeer
def pbOnEnteringBattle(battle,pkmn,wild=false); end def pbOnEnteringBattle(battle, battler, pkmn, wild = false); end
def pbOnLeavingBattle(battle,pkmn,usedInBattle,endBattle=false); end def pbOnLeavingBattle(battle,pkmn,usedInBattle,endBattle=false); end
def pbStorePokemon(player,pkmn) def pbStorePokemon(player,pkmn)
@@ -52,9 +52,11 @@ class PokeBattle_RealBattlePeer
return (box<0) ? "" : $PokemonStorage[box].name return (box<0) ? "" : $PokemonStorage[box].name
end end
def pbOnEnteringBattle(_battle,pkmn,wild=false) def pbOnEnteringBattle(battle, battler, pkmn, wild = false)
f = MultipleForms.call("getFormOnEnteringBattle",pkmn,wild) f = MultipleForms.call("getFormOnEnteringBattle",pkmn,wild)
pkmn.form = f if f pkmn.form = f if f
battler.form = pkmn.form if battler.form != pkmn.form
MultipleForms.call("changePokemonOnEnteringBattle", battler, pkmn, battle)
end end
# For switching out, including due to fainting, and for the end of battle # For switching out, including due to fainting, and for the end of battle
@@ -63,6 +65,7 @@ class PokeBattle_RealBattlePeer
f = MultipleForms.call("getFormOnLeavingBattle",pkmn,battle,usedInBattle,endBattle) f = MultipleForms.call("getFormOnLeavingBattle",pkmn,battle,usedInBattle,endBattle)
pkmn.form = f if f && pkmn.form!=f pkmn.form = f if f && pkmn.form!=f
pkmn.hp = pkmn.totalhp if pkmn.hp>pkmn.totalhp pkmn.hp = pkmn.totalhp if pkmn.hp>pkmn.totalhp
MultipleForms.call("changePokemonOnLeavingBattle", pkmn, battle, usedInBattle, endBattle)
end end
end end

View File

@@ -301,7 +301,7 @@ BattleHandlers::UserAbilityEndOfMove.copy(:GRIMNEIGH, :ASONEGRIMNEIGH)
BattleHandlers::AbilityOnSwitchIn.add(:ICEFACE, BattleHandlers::AbilityOnSwitchIn.add(:ICEFACE,
proc { |ability, battler, battle| proc { |ability, battler, battle|
next if !battler.isSpecies?(:EISCUE) || battler.form != 1 next if !battler.isSpecies?(:EISCUE) || battler.form != 1
next if battle.pbWeather != :Hail next if battler.effectiveWeather != :Hail
battle.pbShowAbilitySplash(battler) battle.pbShowAbilitySplash(battler)
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
battle.pbDisplay(_INTL("{1}'s {2} activated!", battler.pbThis, battler.abilityName)) battle.pbDisplay(_INTL("{1}'s {2} activated!", battler.pbThis, battler.abilityName))

View File

@@ -858,8 +858,7 @@ ItemHandlers::UseOnPokemon.add(:GRACIDEA,proc { |item,pkmn,scene|
pkmn.status == :FROZEN || PBDayNight.isNight? pkmn.status == :FROZEN || PBDayNight.isNight?
scene.pbDisplay(_INTL("It had no effect.")) scene.pbDisplay(_INTL("It had no effect."))
next false next false
end elsif pkmn.fainted?
if pkmn.fainted?
scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon.")) scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
next false next false
end end
@@ -874,9 +873,9 @@ ItemHandlers::UseOnPokemon.add(:REDNECTAR,proc { |item,pkmn,scene|
if !pkmn.isSpecies?(:ORICORIO) || pkmn.form==0 if !pkmn.isSpecies?(:ORICORIO) || pkmn.form==0
scene.pbDisplay(_INTL("It had no effect.")) scene.pbDisplay(_INTL("It had no effect."))
next false next false
end elsif pkmn.fainted?
if pkmn.fainted?
scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon.")) scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
next false
end end
pkmn.setForm(0) { pkmn.setForm(0) {
scene.pbRefresh scene.pbRefresh
@@ -889,9 +888,9 @@ ItemHandlers::UseOnPokemon.add(:YELLOWNECTAR,proc { |item,pkmn,scene|
if !pkmn.isSpecies?(:ORICORIO) || pkmn.form==1 if !pkmn.isSpecies?(:ORICORIO) || pkmn.form==1
scene.pbDisplay(_INTL("It had no effect.")) scene.pbDisplay(_INTL("It had no effect."))
next false next false
end elsif pkmn.fainted?
if pkmn.fainted?
scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon.")) scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
next false
end end
pkmn.setForm(1) { pkmn.setForm(1) {
scene.pbRefresh scene.pbRefresh
@@ -904,9 +903,9 @@ ItemHandlers::UseOnPokemon.add(:PINKNECTAR,proc { |item,pkmn,scene|
if !pkmn.isSpecies?(:ORICORIO) || pkmn.form==2 if !pkmn.isSpecies?(:ORICORIO) || pkmn.form==2
scene.pbDisplay(_INTL("It had no effect.")) scene.pbDisplay(_INTL("It had no effect."))
next false next false
end elsif pkmn.fainted?
if pkmn.fainted?
scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon.")) scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
next false
end end
pkmn.setForm(2) { pkmn.setForm(2) {
scene.pbRefresh scene.pbRefresh
@@ -919,9 +918,9 @@ ItemHandlers::UseOnPokemon.add(:PURPLENECTAR,proc { |item,pkmn,scene|
if !pkmn.isSpecies?(:ORICORIO) || pkmn.form==3 if !pkmn.isSpecies?(:ORICORIO) || pkmn.form==3
scene.pbDisplay(_INTL("It had no effect.")) scene.pbDisplay(_INTL("It had no effect."))
next false next false
end elsif pkmn.fainted?
if pkmn.fainted?
scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon.")) scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
next false
end end
pkmn.setForm(3) { pkmn.setForm(3) {
scene.pbRefresh scene.pbRefresh
@@ -936,8 +935,7 @@ ItemHandlers::UseOnPokemon.add(:REVEALGLASS,proc { |item,pkmn,scene|
!pkmn.isSpecies?(:LANDORUS) !pkmn.isSpecies?(:LANDORUS)
scene.pbDisplay(_INTL("It had no effect.")) scene.pbDisplay(_INTL("It had no effect."))
next false next false
end elsif pkmn.fainted?
if pkmn.fainted?
scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon.")) scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
next false next false
end end
@@ -953,9 +951,9 @@ ItemHandlers::UseOnPokemon.add(:PRISONBOTTLE,proc { |item,pkmn,scene|
if !pkmn.isSpecies?(:HOOPA) if !pkmn.isSpecies?(:HOOPA)
scene.pbDisplay(_INTL("It had no effect.")) scene.pbDisplay(_INTL("It had no effect."))
next false next false
end elsif pkmn.fainted?
if pkmn.fainted?
scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon.")) scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
next false
end end
newForm = (pkmn.form==0) ? 1 : 0 newForm = (pkmn.form==0) ? 1 : 0
pkmn.setForm(newForm) { pkmn.setForm(newForm) {
@@ -969,8 +967,7 @@ ItemHandlers::UseOnPokemon.add(:DNASPLICERS,proc { |item,pkmn,scene|
if !pkmn.isSpecies?(:KYUREM) if !pkmn.isSpecies?(:KYUREM)
scene.pbDisplay(_INTL("It had no effect.")) scene.pbDisplay(_INTL("It had no effect."))
next false next false
end elsif pkmn.fainted?
if pkmn.fainted?
scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon.")) scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
next false next false
end end
@@ -1022,8 +1019,7 @@ ItemHandlers::UseOnPokemon.add(:NSOLARIZER,proc { |item,pkmn,scene|
if !pkmn.isSpecies?(:NECROZMA) || pkmn.form == 2 if !pkmn.isSpecies?(:NECROZMA) || pkmn.form == 2
scene.pbDisplay(_INTL("It had no effect.")) scene.pbDisplay(_INTL("It had no effect."))
next false next false
end elsif pkmn.fainted?
if pkmn.fainted?
scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon.")) scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
next false next false
end end
@@ -1071,8 +1067,7 @@ ItemHandlers::UseOnPokemon.add(:NLUNARIZER,proc { |item,pkmn,scene|
if !pkmn.isSpecies?(:NECROZMA) || pkmn.form == 1 if !pkmn.isSpecies?(:NECROZMA) || pkmn.form == 1
scene.pbDisplay(_INTL("It had no effect.")) scene.pbDisplay(_INTL("It had no effect."))
next false next false
end elsif pkmn.fainted?
if pkmn.fainted?
scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon.")) scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
next false next false
end end

View File

@@ -219,8 +219,7 @@ ItemHandlers::UseOnPokemon.add(:REINSOFUNITY, proc { |item, pkmn, scene|
if !pkmn.isSpecies?(:CALYREX) if !pkmn.isSpecies?(:CALYREX)
scene.pbDisplay(_INTL("It had no effect.")) scene.pbDisplay(_INTL("It had no effect."))
next false next false
end elsif pkmn.fainted?
if pkmn.fainted?
scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon.")) scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
next false next false
end end
@@ -287,27 +286,54 @@ ItemHandlers::UseOnPokemon.add(:ABILITYPATCH, proc { |item, pkmn, scene|
next false next false
}) })
ItemHandlers::UseOnPokemon.add(:ROTOMCATALOG, proc { |item, pkmn, scene|
if !pkmn.isSpecies?(:ROTOM)
scene.pbDisplay(_INTL("It had no effect."))
next false
elsif pkmn.fainted?
scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
next false
end
choices = [
_INTL("Light bulb"),
_INTL("Microwave oven"),
_INTL("Washing machine"),
_INTL("Refrigerator"),
_INTL("Electric fan"),
_INTL("Lawn mower"),
_INTL("Cancel")
]
new_form = scene.pbShowCommands(_INTL("Which appliance would you like to order?"),
commands, pkmn.form)
if new_form == pkmn.form
scene.pbDisplay(_INTL("It won't have any effect."))
next false
elsif new_form > 0 && new_form < choices.length - 1
pkmn.setForm(new_form) {
scene.pbRefresh
scene.pbDisplay(_INTL("{1} transformed!", pkmn.name))
}
next true
end
next false
})
BattleHandlers::UserItemAfterMoveUse.add(:THROATSPRAY,
proc { |item, user, targets, move, numHits, battle|
next if battle.pbAllFainted?(user.idxOwnSide) ||
battle.pbAllFainted?(user.idxOpposingSide)
next if !move.soundMove? || numHits == 0
next if !user.pbCanRaiseStatStage?(:SPECIAL_ATTACK, user)
user.pbRaiseStatStage(:SPECIAL_ATTACK, 1, user)
user.pbConsumeItem
}
)
=begin =begin
#=============================================================================== #===============================================================================
Pokémon Box Link
Key item, unusable. Enables pressing a button while in the party screen to open
the "Organise Boxes" mode of Pokémon storage. This is disabled at certain times,
perhaps when a Game Switch is on.
Rusted Sword
Changes form of Zacian holding it. In battle, changes Zacian's Iron Head to
Behemoth Blade.
Rusted Shield
Changes form of Zamazenta holding it. In battle, changes Zamazenta's Iron Head
to Behemoth Bash.
Throat Spray
After holder uses a sound-based move, consume item and holder gets +1 Special
Attack (unless battle ends).
Eject Pack Eject Pack
When holder's stat(s) is lowered, consume item and holder switches out. Not When holder's stat(s) is lowered, consume item and holder switches out. Not
triggered by Parting Shot, or if a faster mon's Eject Button/Eject Pack triggered by Parting Shot, or if a faster mon's Eject Button/Eject Pack
@@ -322,16 +348,12 @@ Room Service
If Trick Room is used, or if holder switches in while Trick Room applies, If Trick Room is used, or if holder switches in while Trick Room applies,
consume item and holder gets -1 Speed. consume item and holder gets -1 Speed.
Utility Umbrella Pokémon Box Link
Holder is unaffected by sun and rain weathers. Key item, unusable. Enables pressing a button while in the party screen to open
the "Organise Boxes" mode of Pokémon storage. This is disabled at certain times,
perhaps when a Game Switch is on.
Catching Charm Catching Charm
Increases the chance of a critical catch. By how much? Increases the chance of a critical catch. By how much?
Rotom Catalog
Changes Rotom's form (choosable).
Mark Charm
Increases the chance of a wild Pokémon having a mark.
=end =end

View File

@@ -212,50 +212,47 @@ MultipleForms.register(:CHERRIM,{
} }
}) })
MultipleForms.register(:ROTOM,{ MultipleForms.register(:ROTOM, {
"onSetForm" => proc { |pkmn, form, oldForm| "onSetForm" => proc { |pkmn, form, oldForm|
form_moves = [ form_moves = [
:OVERHEAT, # Heat, Microwave :OVERHEAT, # Heat (microwave oven)
:HYDROPUMP, # Wash, Washing Machine :HYDROPUMP, # Wash (washing machine)
:BLIZZARD, # Frost, Refrigerator :BLIZZARD, # Frost (refrigerator)
:AIRSLASH, # Fan :AIRSLASH, # Fan (electric fan)
:LEAFSTORM # Mow, Lawnmower :LEAFSTORM # Mow (lawn mower)
] ]
move_index = -1 # Find a known move that should be forgotten
old_move_index = -1
pkmn.moves.each_with_index do |move, i| pkmn.moves.each_with_index do |move, i|
next if !form_moves.any? { |m| m == move.id } next if !form_moves.include?(move.id)
move_index = i old_move_index = i
break break
end end
if form == 0 # Determine which new move to learn (if any)
# Turned back into the base form; forget form-specific moves new_move_id = (form > 0) ? form_moves[form - 1] : nil
if move_index >= 0 new_move_id = nil if !GameData::Move.exists?(new_move_id)
move_name = pkmn.moves[move_index].name if new_move_id.nil? && old_move_index >= 0 && pkmn.numMoves == 1
pkmn.forget_move_at_index(move_index) new_move_id = :THUNDERSHOCK
pbMessage(_INTL("{1} forgot {2}...", pkmn.name, move_name)) new_move_id = nil if !GameData::Move.exists?(new_move_id)
pbLearnMove(pkmn, :THUNDERSHOCK) if pkmn.numMoves == 0 raise _INTL("Rotom is trying to forget its last move, but there isn't another move to replace it with.") if new_move_id.nil?
end end
else # Forget a known move (if relevant) and learn a new move (if relevant)
# Turned into an alternate form; try learning that form's unique move if old_move_index >= 0
new_move_id = form_moves[form - 1] old_move_name = pkmn.moves[old_move_index].name
if move_index >= 0 if new_move_id.nil?
# Knows another form's unique move; replace it # Just forget the old move
old_move_name = pkmn.moves[move_index].name pkmn.forget_move_at_index(old_move_index)
if GameData::Move.exists?(new_move_id) pbMessage(_INTL("{1} forgot {2}...\1", pkmn.name, old_move_name))
pkmn.moves[move_index].id = new_move_id
new_move_name = pkmn.moves[move_index].name
pbMessage(_INTL("1,\\wt[16] 2, and\\wt[16]...\\wt[16] ...\\wt[16] ... Ta-da!\\se[Battle ball drop]\1"))
pbMessage(_INTL("{1} forgot how to use {2}.\\nAnd...\1", pkmn.name, old_move_name))
pbMessage(_INTL("\\se[]{1} learned {2}!\\se[Pkmn move learnt]", pkmn.name, new_move_name))
else
pkmn.forget_move_at_index(move_index)
pbMessage(_INTL("{1} forgot {2}...", pkmn.name, old_move_name))
pbLearnMove(pkmn, :THUNDERSHOCK) if pkmn.numMoves == 0
end
else else
# Just try to learn this form's unique move # Replace the old move with the new move (keeps the same index)
pbLearnMove(pkmn, new_move_id, true) pkmn.moves[old_move_index].id = new_move_id
new_move_name = pkmn.moves[old_move_index].name
pbMessage(_INTL("{1} forgot {2}...\1", pkmn.name, old_move_name))
pbMessage(_INTL("\\se[]{1} learned {2}!\\se[Pkmn move learnt]\1", pkmn.name, new_move_name))
end end
elsif !new_move_id.nil?
# Just learn the new move
pbLearnMove(pkmn, new_move_id, true)
end end
} }
}) })
@@ -657,8 +654,23 @@ MultipleForms.register(:ZACIAN, {
next 1 if pkmn.hasItem?(:RUSTEDSWORD) next 1 if pkmn.hasItem?(:RUSTEDSWORD)
next 0 next 0
}, },
"changePokemonOnEnteringBattle" => proc { |battler, pkmn, battle|
if GameData::Move.exists?(:BEHEMOTHBLADE) && pkmn.hasItem?(:RUSTEDSWORD)
pkmn.moves.each do |move|
next if move.id != :IRONHEAD
move.id = :BEHEMOTHBLADE
battler.moves.each_with_index do |b_move, i|
next if b_move.id != :IRONHEAD
battler.moves[i] = PokeBattle_Move.from_pokemon_move(battle, move)
end
end
end
},
"getFormOnLeavingBattle" => proc { |pkmn, battle, usedInBattle, endBattle| "getFormOnLeavingBattle" => proc { |pkmn, battle, usedInBattle, endBattle|
next 0 next 0
},
"changePokemonOnLeavingBattle" => proc { |pkmn, battle, usedInBattle, endBattle|
pkmn.moves.each { |move| move.id = :IRONHEAD if move.id == :BEHEMOTHBLADE }
} }
}) })
@@ -667,8 +679,23 @@ MultipleForms.register(:ZAMAZENTA, {
next 1 if pkmn.hasItem?(:RUSTEDSHIELD) next 1 if pkmn.hasItem?(:RUSTEDSHIELD)
next 0 next 0
}, },
"changePokemonOnEnteringBattle" => proc { |battler, pkmn, battle|
if GameData::Move.exists?(:BEHEMOTHBASH) && pkmn.hasItem?(:RUSTEDSHIELD)
pkmn.moves.each do |move|
next if move.id != :IRONHEAD
move.id = :BEHEMOTHBASH
battler.moves.each_with_index do |b_move, i|
next if b_move.id != :IRONHEAD
battler.moves[i] = PokeBattle_Move.from_pokemon_move(battle, move)
end
end
end
},
"getFormOnLeavingBattle" => proc { |pkmn, battle, usedInBattle, endBattle| "getFormOnLeavingBattle" => proc { |pkmn, battle, usedInBattle, endBattle|
next 0 next 0
},
"changePokemonOnLeavingBattle" => proc { |pkmn, battle, usedInBattle, endBattle|
pkmn.moves.each { |move| move.id = :IRONHEAD if move.id == :BEHEMOTHBASH }
} }
}) })

View File

@@ -29,14 +29,10 @@ Some moves have changed properties/effects:
than the order in which they were Quashed. than the order in which they were Quashed.
- Parting Shot is able to make the user switch out if its effect is redirected - Parting Shot is able to make the user switch out if its effect is redirected
by Mirror Armor. Throat Spray is triggered and applies before the switch. by Mirror Armor. Throat Spray is triggered and applies before the switch.
- Terrains have altered/additional effects.
- Double Iron Bash no longer has a different effect if the target is Minimized. - Double Iron Bash no longer has a different effect if the target is Minimized.
Some abilities have changed effects: Some abilities have changed effects:
- Oblivious, Own Tempo, Inner Focus and Scrappy now block Intimidate.
- Intimidate now triggers Rattled. - Intimidate now triggers Rattled.
- If Unburden is negated by Neutralizing Gas, Unburden's effect stops applying.
If Neutralizing Gas then leaves the field, Unburden's boost returns.
- If another Pokémon faints before a Pokémon with Analytic makes its move, - If another Pokémon faints before a Pokémon with Analytic makes its move,
Analytic calculates whether it would have moved before or after the fainted Analytic calculates whether it would have moved before or after the fainted
Pokémon. In Gen 8, speed- and priority-modifying effects aren't considered, Pokémon. In Gen 8, speed- and priority-modifying effects aren't considered,
@@ -62,7 +58,6 @@ Other notes:
- Look at Sweet Scent's out of battle effect, namely whether it should try to - Look at Sweet Scent's out of battle effect, namely whether it should try to
cause a horde battle (and what does that mean in Essentials?). cause a horde battle (and what does that mean in Essentials?).
- Maybe have multiple sets of Pickup items for multiple Gens. - Maybe have multiple sets of Pickup items for multiple Gens.
- Dive Ball should have an increased catch rate if surfing or fishing(?). Nah.
- Add a newer type of berry tree mechanics? Have a separate setting that - Add a newer type of berry tree mechanics? Have a separate setting that
prevents deterioration? prevents deterioration?
- If a battle ends because of Rocky Helmet damage, the side that the Rocky - If a battle ends because of Rocky Helmet damage, the side that the Rocky
@@ -79,10 +74,8 @@ Make example event that combines the Gen 8 fossils.
Add AI for new moves/items/abilities. Add AI for new moves/items/abilities.
Zacian/Zamazenta need code that changes their movesets upon entering/leaving What happens to the PP of Iron Head when turned into/from Behemoth Blade/Bash
battle. Can't use "onSetForm" since that's called after the battler is for Zacian/Zamazenta?
initialized and pbOnEnteringBattle doesn't have access to the battler (could
change this).
#=============================================================================== #===============================================================================
# Low priority or ignorable # Low priority or ignorable