mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Fixed Heavy Ball's catch rate calculation being inaccurate, added Obstruct to some moves' blacklists
This commit is contained in:
@@ -695,6 +695,7 @@ class Battle::Move::UseLastMoveUsed < Battle::Move
|
||||
"ProtectUserSideFromDamagingMovesIfUserFirstTurn", # Mat Block
|
||||
"ProtectUserSideFromStatusMoves", # Crafty Shield # Not listed on Bulbapedia
|
||||
"ProtectUserFromDamagingMovesKingsShield", # King's Shield
|
||||
"ProtectUserFromDamagingMovesObstruct", # Obstruct # Not listed on Bulbapedia
|
||||
"ProtectUserFromTargetingMovesSpikyShield", # Spiky Shield
|
||||
"ProtectUserBanefulBunker", # Baneful Bunker
|
||||
# Moves that call other moves
|
||||
@@ -1009,6 +1010,7 @@ class Battle::Move::UseRandomMoveFromUserParty < Battle::Move
|
||||
"ProtectUserSideFromDamagingMovesIfUserFirstTurn", # Mat Block
|
||||
"ProtectUserSideFromStatusMoves", # Crafty Shield # Not listed on Bulbapedia
|
||||
"ProtectUserFromDamagingMovesKingsShield", # King's Shield
|
||||
"ProtectUserFromDamagingMovesObstruct", # Obstruct # Not listed on Bulbapedia
|
||||
"ProtectUserFromTargetingMovesSpikyShield", # Spiky Shield
|
||||
"ProtectUserBanefulBunker", # Baneful Bunker
|
||||
# Moves that call other moves
|
||||
|
||||
@@ -545,44 +545,44 @@ class Battle::Move::TargetUsesItsLastUsedMoveAgain < Battle::Move
|
||||
def initialize(battle, move)
|
||||
super
|
||||
@moveBlacklist = [
|
||||
"MultiTurnAttackBideThenReturnDoubleDamage", # Bide
|
||||
"ProtectUserFromDamagingMovesKingsShield", # King's Shield
|
||||
"TargetUsesItsLastUsedMoveAgain", # Instruct (this move)
|
||||
"MultiTurnAttackBideThenReturnDoubleDamage", # Bide
|
||||
"ProtectUserFromDamagingMovesKingsShield", # King's Shield
|
||||
"TargetUsesItsLastUsedMoveAgain", # Instruct (this move)
|
||||
# Struggle
|
||||
"Struggle", # Struggle
|
||||
"Struggle", # Struggle
|
||||
# Moves that affect the moveset
|
||||
"ReplaceMoveThisBattleWithTargetLastMoveUsed", # Mimic
|
||||
"ReplaceMoveWithTargetLastMoveUsed", # Sketch
|
||||
"TransformUserIntoTarget", # Transform
|
||||
"ReplaceMoveThisBattleWithTargetLastMoveUsed", # Mimic
|
||||
"ReplaceMoveWithTargetLastMoveUsed", # Sketch
|
||||
"TransformUserIntoTarget", # Transform
|
||||
# Moves that call other moves
|
||||
"UseLastMoveUsedByTarget", # Mirror Move
|
||||
"UseLastMoveUsed", # Copycat
|
||||
"UseMoveTargetIsAboutToUse", # Me First
|
||||
"UseMoveDependingOnEnvironment", # Nature Power
|
||||
"UseRandomUserMoveIfAsleep", # Sleep Talk
|
||||
"UseRandomMoveFromUserParty", # Assist
|
||||
"UseRandomMove", # Metronome
|
||||
"UseLastMoveUsedByTarget", # Mirror Move
|
||||
"UseLastMoveUsed", # Copycat
|
||||
"UseMoveTargetIsAboutToUse", # Me First
|
||||
"UseMoveDependingOnEnvironment", # Nature Power
|
||||
"UseRandomUserMoveIfAsleep", # Sleep Talk
|
||||
"UseRandomMoveFromUserParty", # Assist
|
||||
"UseRandomMove", # Metronome
|
||||
# Moves that require a recharge turn
|
||||
"AttackAndSkipNextTurn", # Hyper Beam
|
||||
"AttackAndSkipNextTurn", # Hyper Beam
|
||||
# Two-turn attacks
|
||||
"TwoTurnAttack", # Razor Wind
|
||||
"TwoTurnAttackOneTurnInSun", # Solar Beam, Solar Blade
|
||||
"TwoTurnAttackParalyzeTarget", # Freeze Shock
|
||||
"TwoTurnAttackBurnTarget", # Ice Burn
|
||||
"TwoTurnAttackFlinchTarget", # Sky Attack
|
||||
"TwoTurnAttackChargeRaiseUserDefense1", # Skull Bash
|
||||
"TwoTurnAttackInvulnerableInSky", # Fly
|
||||
"TwoTurnAttackInvulnerableUnderground", # Dig
|
||||
"TwoTurnAttackInvulnerableUnderwater", # Dive
|
||||
"TwoTurnAttackInvulnerableInSkyParalyzeTarget", # Bounce
|
||||
"TwoTurnAttackInvulnerableRemoveProtections", # Shadow Force, Phantom Force
|
||||
"TwoTurnAttack", # Razor Wind
|
||||
"TwoTurnAttackOneTurnInSun", # Solar Beam, Solar Blade
|
||||
"TwoTurnAttackParalyzeTarget", # Freeze Shock
|
||||
"TwoTurnAttackBurnTarget", # Ice Burn
|
||||
"TwoTurnAttackFlinchTarget", # Sky Attack
|
||||
"TwoTurnAttackChargeRaiseUserDefense1", # Skull Bash
|
||||
"TwoTurnAttackInvulnerableInSky", # Fly
|
||||
"TwoTurnAttackInvulnerableUnderground", # Dig
|
||||
"TwoTurnAttackInvulnerableUnderwater", # Dive
|
||||
"TwoTurnAttackInvulnerableInSkyParalyzeTarget", # Bounce
|
||||
"TwoTurnAttackInvulnerableRemoveProtections", # Shadow Force, Phantom Force
|
||||
"TwoTurnAttackInvulnerableInSkyTargetCannotAct", # Sky Drop
|
||||
"AllBattlersLoseHalfHPUserSkipsNextTurn", # Shadow Half
|
||||
"TwoTurnAttackRaiseUserSpAtkSpDefSpd2", # Geomancy
|
||||
"AllBattlersLoseHalfHPUserSkipsNextTurn", # Shadow Half
|
||||
"TwoTurnAttackRaiseUserSpAtkSpDefSpd2", # Geomancy
|
||||
# Moves that start focussing at the start of the round
|
||||
"FailsIfUserDamagedThisTurn", # Focus Punch
|
||||
"UsedAfterUserTakesPhysicalDamage", # Shell Trap
|
||||
"BurnAttackerBeforeUserActs" # Beak Blast
|
||||
"FailsIfUserDamagedThisTurn", # Focus Punch
|
||||
"UsedAfterUserTakesPhysicalDamage", # Shell Trap
|
||||
"BurnAttackerBeforeUserActs" # Beak Blast
|
||||
]
|
||||
end
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ Battle::PokeBallEffects::ModifyCatchRate.add(:LUREBALL, proc { |ball, catchRate,
|
||||
|
||||
Battle::PokeBallEffects::ModifyCatchRate.add(:HEAVYBALL, proc { |ball, catchRate, battle, battler|
|
||||
next 0 if catchRate == 0
|
||||
weight = battler.pokemon.species_data.base_stats[:SPEED]
|
||||
weight = battler.pbWeight
|
||||
if Settings::NEW_POKE_BALL_CATCH_RATES
|
||||
if weight >= 3000
|
||||
catchRate += 30
|
||||
@@ -141,8 +141,7 @@ Battle::PokeBallEffects::ModifyCatchRate.add(:HEAVYBALL, proc { |ball, catchRate
|
||||
catchRate -= 20
|
||||
end
|
||||
end
|
||||
catchRate = [catchRate, 1].max
|
||||
next [catchRate, 255].min
|
||||
next catchRate.clamp(1, 255)
|
||||
})
|
||||
|
||||
Battle::PokeBallEffects::ModifyCatchRate.add(:LOVEBALL, proc { |ball, catchRate, battle, battler|
|
||||
|
||||
Reference in New Issue
Block a user