Renamed some constants

This commit is contained in:
infinitefusion
2022-04-30 17:22:44 -04:00
parent 9d73e88afd
commit 2a76ee27e9
18 changed files with 120 additions and 107 deletions

View File

@@ -161,7 +161,7 @@ Events.onStepTakenFieldMovement += proc { |_sender, e|
}
def isRepelActive()
return false if $game_switches[USED_AN_INCENSE_SWITCH]
return false if $game_switches[SWITCH_USED_AN_INCENSE]
return ($PokemonGlobal.repel > 0) || $PokemonTemp.pokeradar
end
@@ -191,15 +191,15 @@ Events.onChangeDirection += proc {
}
def isFusionForced?
return false if $game_switches[RANDOMIZED_WILD_POKEMON_SWITCH]
return $game_switches[FORCE_FUSE_NEXT_POKEMON_SWITCH] || $game_switches[FORCE_ALL_WILD_FUSIONS_SWITCH]
return false if $game_switches[SWITCH_RANDOMIZED_WILD_POKEMON]
return $game_switches[SWITCH_FORCE_FUSE_NEXT_POKEMON] || $game_switches[SWITCH_FORCE_ALL_WILD_FUSIONS]
end
def isFusedEncounter
return false if !FUSED_WILD_POKEMON_SWITCH[35]
return false if $game_switches[RANDOMIZED_WILD_POKEMON_SWITCH]
return false if !SWITCH_FUSED_WILD_POKEMON[35]
return false if $game_switches[SWITCH_RANDOMIZED_WILD_POKEMON]
return true if isFusionForced?()
chance = pbGet(WILD_FUSION_RATE_VAR) == 0 ? 5 : pbGet(WILD_FUSION_RATE_VAR)
chance = pbGet(VAR_WILD_FUSION_RATE) == 0 ? 5 : pbGet(VAR_WILD_FUSION_RATE)
return (rand(chance) == 0)
end
@@ -217,7 +217,7 @@ def pbBattleOnStepTaken(repel_active)
encounter[0] = getFusionSpecies(encounter[0], encounter_fusedWith[0])
end
end
$game_switches[FORCE_FUSE_NEXT_POKEMON_SWITCH] = false
$game_switches[SWITCH_FORCE_FUSE_NEXT_POKEMON] = false
encounter = EncounterModifier.trigger(encounter)
if $PokemonEncounters.allow_encounter?(encounter, repel_active)

View File

@@ -120,7 +120,7 @@ end
def pbPrepareBattle(battle)
battleRules = $PokemonTemp.battleRules
# The size of the battle, i.e. how many Pokémon on each side (default: "single")
battle.setBattleMode(battleRules["size"]) if !battleRules["size"].nil? || $game_switches[NEW_GAME_PLUS]
battle.setBattleMode(battleRules["size"]) if !battleRules["size"].nil? || $game_switches[SWITCH_NEW_GAME_PLUS]
# Whether the game won't black out even if the player loses (default: false)
battle.canLose = battleRules["canLose"] if !battleRules["canLose"].nil?
# Whether the player can choose to run from the battle (default: true)

View File

@@ -42,7 +42,7 @@ def pbFishingEnd
end
def pbFishing(hasEncounter,rodType=1)
autohook= Settings::FISHING_AUTO_HOOK || $game_switches[FISHING_AUTOHOOK_SWITCH]
autohook= Settings::FISHING_AUTO_HOOK || $game_switches[SWITCH_FISHING_AUTOHOOK]
speedup = ($Trainer.first_pokemon && [:STICKYHOLD, :SUCTIONCUPS].include?($Trainer.first_pokemon.ability_id))
biteChance = 20+(25*rodType) # 45, 70, 95
biteChance *= 1.5 if speedup # 67.5, 100, 100
@@ -133,7 +133,7 @@ end
# A Pokémon is biting, reflex test to reel it in
def pbWaitForInput(msgWindow,message,frames)
autohook= Settings::FISHING_AUTO_HOOK || $game_switches[FISHING_AUTOHOOK_SWITCH]
autohook= Settings::FISHING_AUTO_HOOK || $game_switches[SWITCH_FISHING_AUTOHOOK]
pbMessageDisplay(msgWindow,message,false)
numFrame = 0
twitchFrame = 0