mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 22:24:58 +00:00
Moved all settings into module Settings
This commit is contained in:
@@ -59,11 +59,11 @@ class PokemonStorage
|
||||
attr_writer :unlockedWallpapers
|
||||
BASICWALLPAPERQTY = 16
|
||||
|
||||
def initialize(maxBoxes = NUM_STORAGE_BOXES, maxPokemon = PokemonBox::BOX_SIZE)
|
||||
def initialize(maxBoxes = Settings::NUM_STORAGE_BOXES, maxPokemon = PokemonBox::BOX_SIZE)
|
||||
@boxes = []
|
||||
for i in 0...maxBoxes
|
||||
@boxes[i] = PokemonBox.new(_INTL("Box {1}",i+1),maxPokemon)
|
||||
@boxes[i].background = i%BASICWALLPAPERQTY
|
||||
@boxes[i].background = i % BASICWALLPAPERQTY
|
||||
end
|
||||
@currentBox = 0
|
||||
@boxmode = -1
|
||||
@@ -131,7 +131,7 @@ class PokemonStorage
|
||||
|
||||
def maxPokemon(box)
|
||||
return 0 if box >= self.maxBoxes
|
||||
return (box < 0) ? MAX_PARTY_SIZE : self[box].length
|
||||
return (box < 0) ? Settings::MAX_PARTY_SIZE : self[box].length
|
||||
end
|
||||
|
||||
def full?
|
||||
@@ -144,7 +144,7 @@ class PokemonStorage
|
||||
def pbFirstFreePos(box)
|
||||
if box==-1
|
||||
ret = self.party.length
|
||||
return (ret >= MAX_PARTY_SIZE) ? -1 : ret
|
||||
return (ret >= Settings::MAX_PARTY_SIZE) ? -1 : ret
|
||||
end
|
||||
for i in 0...maxPokemon(box)
|
||||
return i if !self[box,i]
|
||||
|
||||
@@ -367,7 +367,7 @@ class Pokemon
|
||||
b = a & 0xFFFF
|
||||
c = (a >> 16) & 0xFFFF
|
||||
d = b ^ c
|
||||
@shiny = d < SHINY_POKEMON_CHANCE
|
||||
@shiny = d < Settings::SHINY_POKEMON_CHANCE
|
||||
end
|
||||
return @shiny
|
||||
end
|
||||
@@ -734,7 +734,7 @@ class Pokemon
|
||||
# @param strain [Integer] Pokérus strain to give
|
||||
def givePokerus(strain = 0)
|
||||
return if self.pokerusStage == 2 # Can't re-infect a cured Pokémon
|
||||
strain = rand(1, 16) if strain <= 0 || strain >= 16
|
||||
strain = rand(1..16) if strain <= 0 || strain >= 16
|
||||
time = 1 + (strain % 4)
|
||||
@pokerus = time
|
||||
@pokerus |= strain << 4
|
||||
@@ -1012,7 +1012,7 @@ class Pokemon
|
||||
@owner = Owner.new(0, '', 2, 2)
|
||||
end
|
||||
@obtain_method = 0 # Met
|
||||
@obtain_method = 4 if $game_switches && $game_switches[FATEFUL_ENCOUNTER_SWITCH]
|
||||
@obtain_method = 4 if $game_switches && $game_switches[Settings::FATEFUL_ENCOUNTER_SWITCH]
|
||||
@obtain_map = ($game_map) ? $game_map.map_id : 0
|
||||
@obtain_text = nil
|
||||
@obtain_level = level
|
||||
|
||||
Reference in New Issue
Block a user