mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-11 23:24:59 +00:00
update 6.7
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
class PokemonEncounters
|
||||
WEATHER_ENCOUNTER_BASE_CHANCE = 8 #/100 (for weather intensity of 0)
|
||||
alias pokemonEssentials_PokemonEncounter_choose_wild_pokemon choose_wild_pokemon
|
||||
ANIMATION_WEATHER_ENCOUNTER = 3
|
||||
def choose_wild_pokemon(enc_type, *args)
|
||||
return pokemonEssentials_PokemonEncounter_choose_wild_pokemon(enc_type, *args) if !$game_weather
|
||||
current_weather_type = $game_weather.get_map_weather_type($game_map.map_id)
|
||||
|
||||
@@ -3,10 +3,9 @@
|
||||
Events.onMapChange+= proc { |_old_map_id|
|
||||
next if !$game_weather || !$game_weather.current_weather || !$game_weather.last_update_time
|
||||
next if !$game_map
|
||||
echoln pbGetTimeNow.to_i
|
||||
update_overworld_weather($game_map.map_id)
|
||||
next if $game_weather.last_update_time.to_i + GameWeather::TIME_BETWEEN_WEATHER_UPDATES > pbGetTimeNow.to_i
|
||||
|
||||
echoln "- Updating the weather -"
|
||||
new_map_id = $game_map.map_id
|
||||
mapMetadata = GameData::MapMetadata.try_get(new_map_id)
|
||||
next if mapMetadata.nil?
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class BetterRegionMap
|
||||
DEBUG_WEATHER = true
|
||||
DEBUG_WEATHER = $DEBUG
|
||||
def update_weather_icon(location)
|
||||
return
|
||||
return nil if !location
|
||||
|
||||
@@ -21,7 +21,8 @@ class GameWeather
|
||||
attr_accessor :current_weather
|
||||
attr_accessor :last_update_time
|
||||
|
||||
TIME_BETWEEN_WEATHER_UPDATES = 12000 # 180 seconds, only actually changes once the player changes map
|
||||
#TIME_BETWEEN_WEATHER_UPDATES in in-game seconds (1 irl second = 60 in-game seconds)
|
||||
TIME_BETWEEN_WEATHER_UPDATES = 3600 #1 in-game hour (1 irl minute) .
|
||||
|
||||
CHANCE_OF_NEW_WEATHER = 2 # /100 spontaneous new weather popping up somewhere
|
||||
CHANCE_OF_RAIN = 40 #/100
|
||||
@@ -122,6 +123,7 @@ class GameWeather
|
||||
def try_propagate_weather_to_neighbors(map_id,propagating_map_weather_type,propagating_map_weather_intensity)
|
||||
propagating_map_neighbors = @neighbors_maps[map_id]
|
||||
|
||||
return unless propagating_map_neighbors
|
||||
return if propagating_map_weather_type == :None
|
||||
return unless can_weather_spread(propagating_map_weather_type)
|
||||
propagating_map_weather_type, propagating_map_weather_intensity = normalize_legendary_weather(propagating_map_weather_type, propagating_map_weather_intensity)
|
||||
@@ -146,10 +148,10 @@ class GameWeather
|
||||
|
||||
def try_move_weather_to_neighbors(map_id,map_weather_type,weather_intensity)
|
||||
map_neighbors = @neighbors_maps[map_id]
|
||||
return unless map_neighbors
|
||||
return if map_weather_type == :None || weather_intensity <= 1
|
||||
return unless can_weather_spread(map_weather_type)
|
||||
map_weather_type, weather_intensity = normalize_legendary_weather(map_weather_type, weather_intensity)
|
||||
|
||||
map_neighbors.each do |neighbor_id|
|
||||
neighbor_weather_type = get_map_weather_type(neighbor_id)
|
||||
neighbor_weather_intensity = get_map_weather_intensity(neighbor_id)
|
||||
|
||||
Reference in New Issue
Block a user