mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-12 07:35:00 +00:00
Moved all settings into module Settings
This commit is contained in:
@@ -37,7 +37,7 @@ class SafariState
|
||||
@start = [$game_map.map_id,$game_player.x,$game_player.y,$game_player.direction]
|
||||
@ballcount = ballcount
|
||||
@inProgress = true
|
||||
@steps = SAFARI_STEPS
|
||||
@steps = Settings::SAFARI_STEPS
|
||||
end
|
||||
|
||||
def pbEnd
|
||||
@@ -76,7 +76,7 @@ end
|
||||
Events.onStepTakenTransferPossible += proc { |_sender,e|
|
||||
handled = e[0]
|
||||
next if handled[0]
|
||||
if pbInSafari? && pbSafariState.decision==0 && SAFARI_STEPS>0
|
||||
if pbInSafari? && pbSafariState.decision==0 && Settings::SAFARI_STEPS > 0
|
||||
pbSafariState.steps -= 1
|
||||
if pbSafariState.steps<=0
|
||||
pbMessage(_INTL("PA: Ding-dong!\1"))
|
||||
|
||||
@@ -13,7 +13,7 @@ class BugContestState
|
||||
_INTL("Picnicker Cindy"),
|
||||
_INTL("Youngster Samuel")
|
||||
]
|
||||
TimerSeconds = BUG_CONTEST_TIME
|
||||
TimerSeconds = Settings::BUG_CONTEST_TIME
|
||||
|
||||
def initialize
|
||||
clear
|
||||
@@ -115,7 +115,7 @@ class BugContestState
|
||||
raise _INTL("No encounters for map {1}, so can't judge contest",@contestMap)
|
||||
end
|
||||
pokemon=Pokemon.new(enc[0],enc[1])
|
||||
pokemon.hp = rand(1, pokemon.totalhp - 1)
|
||||
pokemon.hp = rand(1..pokemon.totalhp - 1)
|
||||
score=pbBugContestScore(pokemon)
|
||||
judgearray.push([cont,pokemon.species,score])
|
||||
end
|
||||
|
||||
@@ -868,7 +868,7 @@ def pbBattleFactoryPokemon(rule,numwins,numswaps,_rentals)
|
||||
party=[]
|
||||
loop do
|
||||
party.clear
|
||||
while party.length < MAX_PARTY_SIZE
|
||||
while party.length < Settings::MAX_PARTY_SIZE
|
||||
rnd=pokemonNumbers[0]+rand(pokemonNumbers[1]-pokemonNumbers[0]+1)
|
||||
rndpoke=btpokemon[rnd]
|
||||
indvalue=(party.length<ivgroups[0]) ? ivs[0] : ivs[1]
|
||||
|
||||
@@ -1000,7 +1000,7 @@ def pbTrainerInfo(pokemonlist,trfile,rules)
|
||||
end
|
||||
end
|
||||
numbers|=[]
|
||||
if numbers.length < MAX_PARTY_SIZE ||
|
||||
if numbers.length < Settings::MAX_PARTY_SIZE ||
|
||||
!rulesetTeam.hasValidTeam?(numbersPokemon)
|
||||
for index in 0...pokemonlist.length
|
||||
pkmn=pokemonlist[index]
|
||||
@@ -1018,11 +1018,11 @@ def pbTrainerInfo(pokemonlist,trfile,rules)
|
||||
end
|
||||
}
|
||||
end
|
||||
break if numbers.length >= MAX_PARTY_SIZE && rules.ruleset.hasValidTeam?(numbersPokemon)
|
||||
break if numbers.length >= Settings::MAX_PARTY_SIZE && rules.ruleset.hasValidTeam?(numbersPokemon)
|
||||
end
|
||||
if numbers.length < MAX_PARTY_SIZE || !rules.ruleset.hasValidTeam?(numbersPokemon)
|
||||
if numbers.length < Settings::MAX_PARTY_SIZE || !rules.ruleset.hasValidTeam?(numbersPokemon)
|
||||
while numbers.length<pokemonlist.length &&
|
||||
(numbers.length < MAX_PARTY_SIZE || !rules.ruleset.hasValidTeam?(numbersPokemon))
|
||||
(numbers.length < Settings::MAX_PARTY_SIZE || !rules.ruleset.hasValidTeam?(numbersPokemon))
|
||||
index=rand(pokemonlist.length)
|
||||
if !numbers.include?(index)
|
||||
numbers.push(index)
|
||||
|
||||
Reference in New Issue
Block a user