mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 14:14:59 +00:00
6.4 update (minus sprites)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user