6.4 update (minus sprites)

This commit is contained in:
infinitefusion
2024-12-21 09:43:11 -05:00
parent f70c2cfde4
commit 1e325366d2
1717 changed files with 140299 additions and 27845 deletions

View File

@@ -222,6 +222,9 @@ module PokeBattle_BattleCommon
else
catch_rate /= 10
end
# First half of the shakes calculation
a = battler.totalhp
b = battler.hp
@@ -238,8 +241,12 @@ module PokeBattle_BattleCommon
return 4 if x >= 255 || BallHandlers.isUnconditional?(ball, self, battler)
# Second half of the shakes calculation
y = (65536 / ((255.0 / x) ** 0.1875)).floor
#Increased chances of catching if is on last ball
isOnLastBall = !$PokemonBag.pbHasItem?(ball)
echoln isOnLastBall
# Critical capture check
if Settings::ENABLE_CRITICAL_CAPTURES
if isOnLastBall
c = 0
numOwned = $Trainer.pokedex.owned_count
if numOwned > 600;
@@ -248,11 +255,14 @@ module PokeBattle_BattleCommon
c = x * 4 / 12
elsif numOwned > 300;
c = x * 3 / 12
elsif numOwned > 150;
else
c = x * 2 / 12
elsif numOwned > 30;
c = x / 12
end
# elsif numOwned > 150;
# c = x * 2 / 12
# elsif numOwned > 30;
# c = x / 12
# end
# Calculate the number of shakes
if c > 0 && pbRandom(256) < c
@criticalCapture = true

View File

@@ -282,7 +282,7 @@ class PokeBattle_Battle
pbStartBattleSendOut(sendOuts)
# Weather announcement
weather_data = GameData::BattleWeather.try_get(@field.weather)
echoln @field.weather
echoln "Current weather: #{@field.weather}"
pbCommonAnimation(weather_data.animation) if weather_data
case @field.weather