6.4 update (minus sprites)

This commit is contained in:
infinitefusion
2024-12-21 09:43:11 -05:00
parent f70c2cfde4
commit 1e325366d2
1717 changed files with 140299 additions and 27845 deletions

View File

@@ -749,6 +749,7 @@ Events.onEndBattle += proc { |_sender,e|
pbPickup(pkmn)
pbHoneyGather(pkmn)
end
pickUpTypeItemSetBonus()
when 2, 5 # Lose, draw
if !canLose
$game_system.bgm_unpause

View File

@@ -15,6 +15,7 @@ class PokemonEncounters
@step_chances = {}
@encounter_tables = {}
encounter_data = getEncounterMode().get(map_ID, $PokemonGlobal.encounter_version)
encounter_data = GameData::Encounter.get(map_ID, $PokemonGlobal.encounter_version) if !encounter_data
if encounter_data
encounter_data.step_chances.each { |type, value| @step_chances[type] = value }
@encounter_tables = Marshal.load(Marshal.dump(encounter_data.types))
@@ -22,6 +23,7 @@ class PokemonEncounters
end
def getEncounterMode()
mode = GameData::Encounter
if $game_switches && $game_switches[SWITCH_MODERN_MODE]
mode = GameData::EncounterModern
@@ -29,6 +31,7 @@ class PokemonEncounters
if $game_switches && $game_switches[SWITCH_RANDOM_WILD] && $game_switches[SWITCH_RANDOM_WILD_AREA]
mode= GameData::EncounterRandom
end
echoln mode
return mode
end
@@ -253,12 +256,17 @@ class PokemonEncounters
def encounter_type
time = pbGetTimeNow
ret = nil
terrain_tag = $game_map.terrain_tag($game_player.x, $game_player.y)
if $PokemonGlobal.surfing
ret = find_valid_encounter_type_for_time(:Water, time)
else # Land/Cave (can have both in the same map)
if has_land_encounters? && $game_map.terrain_tag($game_player.x, $game_player.y).land_wild_encounters
ret = :BugContest if pbInBugContest? && has_encounter_type?(:BugContest)
ret = find_valid_encounter_type_for_time(:Land, time) if !ret
baseType = :Land #default grass
baseType = :Land1 if terrain_tag == :Grass_alt1
baseType = :Land2 if terrain_tag == :Grass_alt2
baseType = :Land3 if terrain_tag == :Grass_alt3
ret = find_valid_encounter_type_for_time(baseType, time) if !ret
end
if !ret && has_cave_encounters?
ret = find_valid_encounter_type_for_time(:Cave, time)

View File

@@ -14,20 +14,20 @@ Events.onWildPokemonCreate += proc { |_sender, e|
end
}
# Used in the random dungeon map. Makes the levels of all wild Pokémon in that
# map depend on the levels of Pokémon in the player's party.
# This is a simple method, and can/should be modified to account for evolutions
# and other such details. Of course, you don't HAVE to use this code.
Events.onWildPokemonCreate += proc { |_sender, e|
pokemon = e[0]
if $game_map.map_id == 51
new_level = pbBalancedLevel($Trainer.party) - 4 + rand(5) # For variety
new_level = new_level.clamp(1, GameData::GrowthRate.max_level)
pokemon.level = new_level
pokemon.calc_stats
pokemon.reset_moves
end
}
# # Used in the random dungeon map. Makes the levels of all wild Pokémon in that
# # map depend on the levels of Pokémon in the player's party.
# # This is a simple method, and can/should be modified to account for evolutions
# # and other such details. Of course, you don't HAVE to use this code.
# Events.onWildPokemonCreate += proc { |_sender, e|
# pokemon = e[0]
# if $game_map.map_id == 0
# new_level = pbBalancedLevel($Trainer.party) - 4 + rand(5) # For variety
# new_level = new_level.clamp(1, GameData::GrowthRate.max_level)
# pokemon.level = new_level
# pokemon.calc_stats
# pokemon.reset_moves
# end
# }
# This is the basis of a trainer modifier. It works both for trainers loaded
# when you battle them, and for partner trainers when they are registered.