mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 13:44:59 +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
|
||||
|
||||
@@ -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|
|
||||
|
||||
@@ -986,19 +986,14 @@ module Compiler
|
||||
list[index, 0] = new_events if new_events.length > 0
|
||||
changed = true
|
||||
elsif script[/^\s*pbTrainerBattle\((.+)\)\s*$/]
|
||||
echoln ""
|
||||
echoln $1
|
||||
battle_params = split_string_with_quotes($1) # Split on commas
|
||||
echoln battle_params
|
||||
trainer1 = "#{battle_params[0]}, #{battle_params[1]}"
|
||||
trainer1 += ", #{battle_params[4]}" if battle_params[4] && battle_params[4] != "nil"
|
||||
list[index].parameters[1] = "TrainerBattle.start(#{trainer1})"
|
||||
old_indent = list[index].indent
|
||||
new_events = []
|
||||
if battle_params[2] && !battle_params[2].empty? && battle_params[2] != "nil"
|
||||
echoln battle_params[2]
|
||||
speech = battle_params[2].gsub(/^\s*_I\(\s*"\s*/, "").gsub(/\"\s*\)\s*$/, "")
|
||||
echoln speech
|
||||
push_comment(new_events, "EndSpeech: #{speech.strip}", old_indent)
|
||||
end
|
||||
if battle_params[3] && battle_params[3][/true/]
|
||||
|
||||
Reference in New Issue
Block a user