mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-10 14:44:58 +00:00
various fixes
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -358,6 +358,17 @@ class PokemonEncounters
|
||||
level = rand(encounter[2]..encounter[3])
|
||||
return [encounter[1], level]
|
||||
end
|
||||
|
||||
|
||||
|
||||
def listPossibleEncounters(enctype)
|
||||
if !enctype
|
||||
raise ArgumentError.new(_INTL("Encounter type out of range"))
|
||||
end
|
||||
return @encounter_tables[enctype]
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
@@ -53,6 +53,40 @@ def pbPokeRadarCancel
|
||||
$PokemonTemp.pokeradar = nil
|
||||
end
|
||||
|
||||
def listUnseenPokemonInCurrentRoute(encounterType)
|
||||
processed = []
|
||||
unseen = []
|
||||
for encounter in $PokemonEncounters.listPossibleEncounters(encounterType)
|
||||
species = encounter[0]
|
||||
if !processed.include?(species)
|
||||
if $Trainer.seen?(species)
|
||||
processed<<species
|
||||
else
|
||||
unseen<<species
|
||||
processed<<species
|
||||
end
|
||||
end
|
||||
end
|
||||
return unseen
|
||||
end
|
||||
|
||||
|
||||
#can only encounter rare if have seen every encounterable land pokemon on the route
|
||||
def canEncounterRarePokemon()
|
||||
processed = []
|
||||
for encounter in $PokemonEncounters.listPossibleEncounters($PokemonEncounters.pbEncounterType)
|
||||
species = encounter[0]
|
||||
if !processed.include?(species)
|
||||
if $Trainer.seen[species]
|
||||
processed<<species
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
def pbPokeRadarHighlightGrass(showmessage=true)
|
||||
grasses = [] # x, y, ring (0-3 inner to outer), rarity
|
||||
# Choose 1 random tile from each ring around the player
|
||||
@@ -237,3 +271,5 @@ ItemHandlers::UseInField.add(:POKERADAR,proc { |item|
|
||||
ItemHandlers::UseFromBag.add(:POKERADAR,proc { |item|
|
||||
next (pbCanUsePokeRadar?) ? 2 : 0
|
||||
})
|
||||
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ ItemHandlers::UseInField.add(:TELEPORTER, proc { |item|
|
||||
})
|
||||
|
||||
def useTeleporter()
|
||||
if HiddenMoveHandlers.triggerCanUseMove(:TELEPORT, 0)
|
||||
if HiddenMoveHandlers.triggerCanUseMove(:TELEPORT, 0,true)
|
||||
Kernel.pbMessage(_INTL("Teleport to where?", $Trainer.name))
|
||||
scene = PokemonRegionMapScene.new(-1, false)
|
||||
screen = PokemonRegionMap.new(scene)
|
||||
|
||||
19
Data/Scripts/050_AddOns/RandomAddOns.rb
Normal file
19
Data/Scripts/050_AddOns/RandomAddOns.rb
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
#Eevee quest
|
||||
Events.onStepTaken+=proc {|sender,e|
|
||||
next if !$game_switches[173]
|
||||
next if !$game_switches[179] #If not outside of building
|
||||
$game_variables[102]+=1
|
||||
|
||||
if $game_variables[102] % 100 == 0 then
|
||||
$game_variables[101]+=1
|
||||
end
|
||||
|
||||
if $game_variables[102] >= 400 then
|
||||
if $game_variables[102] % 100 == 0 then
|
||||
Kernel.pbMessage(_INTL("Eevee is getting tired. You should head back soon!"))
|
||||
cry=pbResolveAudioSE(pbCryFile(133))
|
||||
pbSEPlay(cry,100,100)
|
||||
end
|
||||
end
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user