mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-07-21 23:27:00 +00:00
[6.8.2] Safari Zone crash patch
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
#==============================================================================#
|
||||
module Settings
|
||||
# The version of your game. It has to adhere to the MAJOR.MINOR.PATCH format.
|
||||
GAME_VERSION_NUMBER = "6.8.1"
|
||||
GAME_VERSION_NUMBER = "6.8.2"
|
||||
LATEST_GAME_RELEASE = "6.8"
|
||||
|
||||
HOENN_VERSION_NUMBER = "1.1.0"
|
||||
@@ -212,6 +212,17 @@ module Settings
|
||||
FIRE_STARTERS = [:CHARMANDER, :CYNDAQUIL, :TORCHIC, :CHIMCHAR, :FENNEKIN]
|
||||
WATER_STARTERS = [:SQUIRTLE, :TOTODILE, :MUDKIP, :PIPLUP, :FROAKIE]
|
||||
|
||||
ALTERING_CAVE_ENCOUNTERS =
|
||||
{
|
||||
:MONDAY => [:ZUBAT, :ZUBAT, :ZUBAT, :WOOBAT, :HOUNDOUR],
|
||||
:TUESDAY => [:ZUBAT, :ZUBAT, :ZUBAT, :WOOBAT, :SCRAGGY],
|
||||
:WEDNESDAY => [:ZUBAT, :ZUBAT, :ZUBAT, :WOOBAT, :PINECO],
|
||||
:THURSDAY => [:ZUBAT, :ZUBAT, :ZUBAT, :WOOBAT, :MAREEP],
|
||||
:FRIDAY => [:ZUBAT, :ZUBAT, :ZUBAT, :WOOBAT, :TEDDIURSA],
|
||||
:SATURDAY => [:ZUBAT, :ZUBAT, :ZUBAT, :WOOBAT, :AIPOM],
|
||||
:SUNDAY => [:ZUBAT, :ZUBAT, :ZUBAT, :WOOBAT, :SMEARGLE],
|
||||
}
|
||||
|
||||
#=============================================================================
|
||||
|
||||
# The amount of money the player starts the game with.
|
||||
|
||||
@@ -619,3 +619,52 @@ def pbScrollMap(direction, distance, speed)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def pbScrollMapDiagonal(distance_horizontal, distance_vertical, speed)
|
||||
real_x = distance_horizontal.abs * Game_Map::REAL_RES_X
|
||||
real_y = distance_vertical.abs * Game_Map::REAL_RES_Y
|
||||
|
||||
if speed == 0
|
||||
if distance_horizontal > 0
|
||||
$game_map.scroll_right(real_x)
|
||||
elsif distance_horizontal < 0
|
||||
$game_map.scroll_left(real_x)
|
||||
end
|
||||
if distance_vertical > 0
|
||||
$game_map.scroll_down(real_y)
|
||||
elsif distance_vertical < 0
|
||||
$game_map.scroll_up(real_y)
|
||||
end
|
||||
else
|
||||
x_rest = real_x
|
||||
y_rest = real_y
|
||||
step = 2 ** speed
|
||||
loop do
|
||||
Graphics.update
|
||||
Input.update
|
||||
moved = false
|
||||
if x_rest > 0
|
||||
dx = [step, x_rest].min
|
||||
if distance_horizontal > 0
|
||||
$game_map.scroll_right(dx)
|
||||
else
|
||||
$game_map.scroll_left(dx)
|
||||
end
|
||||
x_rest -= dx
|
||||
moved = true
|
||||
end
|
||||
if y_rest > 0
|
||||
dy = [step, y_rest].min
|
||||
if distance_vertical > 0
|
||||
$game_map.scroll_down(dy)
|
||||
else
|
||||
$game_map.scroll_up(dy)
|
||||
end
|
||||
y_rest -= dy
|
||||
moved = true
|
||||
end
|
||||
pbUpdateSceneMap
|
||||
break if !moved || (x_rest <= 0 && y_rest <= 0)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -34,7 +34,6 @@ class Game_Character
|
||||
attr_accessor :shadow_offset
|
||||
attr_accessor :animation_speed
|
||||
attr_accessor :step_anime
|
||||
|
||||
def initialize(map = nil)
|
||||
@map = map
|
||||
@id = 0
|
||||
@@ -420,6 +419,7 @@ class Game_Character
|
||||
# Movement
|
||||
#=============================================================================
|
||||
def moving?
|
||||
return true if @diag_move_active
|
||||
return @real_x != @x * Game_Map::REAL_RES_X ||
|
||||
@real_y != @y * Game_Map::REAL_RES_Y
|
||||
end
|
||||
@@ -1235,6 +1235,10 @@ class Game_Character
|
||||
end
|
||||
|
||||
def update_move
|
||||
if @diag_move_active
|
||||
update_diagonal_move
|
||||
return
|
||||
end
|
||||
# Move the character (the 0.1 catches rounding errors)
|
||||
distance = (jumping?) ? jump_speed_real : move_speed_real
|
||||
dest_x = @x * Game_Map::REAL_RES_X
|
||||
@@ -1326,5 +1330,68 @@ class Game_Character
|
||||
return (dx + dy) - 1
|
||||
end
|
||||
|
||||
def move_diagonal_freeform(distance_horizontal, distance_vertical, speed)
|
||||
real_dx = distance_horizontal * Game_Map::REAL_RES_X
|
||||
real_dy = distance_vertical * Game_Map::REAL_RES_Y
|
||||
total_dist = Math.sqrt((real_dx ** 2) + (real_dy ** 2))
|
||||
return if total_dist == 0
|
||||
|
||||
unless @direction_fix
|
||||
if real_dx.abs > real_dy.abs
|
||||
@direction = (real_dx < 0) ? 4 : 6
|
||||
else
|
||||
@direction = (real_dy < 0) ? 8 : 2
|
||||
end
|
||||
end
|
||||
|
||||
@diag_start_x = @real_x
|
||||
@diag_start_y = @real_y
|
||||
@diag_real_dx = real_dx
|
||||
@diag_real_dy = real_dy
|
||||
@diag_total_dist = total_dist
|
||||
@diag_traveled = 0
|
||||
step = (speed == 6) ? 64 : (speed == 5) ? 32 : (2 ** (speed + 1)) * 0.8
|
||||
@diag_step = step * 40.0 / Graphics.frame_rate
|
||||
@diag_move_active = true
|
||||
end
|
||||
|
||||
def stop_diagonal_move
|
||||
return unless @diag_move_active
|
||||
@diag_move_active = false
|
||||
calculate_bush_depth
|
||||
triggerLeaveTile
|
||||
end
|
||||
|
||||
def update_diagonal_move
|
||||
move_amount = [@diag_step, @diag_total_dist - @diag_traveled].min
|
||||
@diag_traveled += move_amount
|
||||
frac = @diag_traveled / @diag_total_dist
|
||||
@real_x = @diag_start_x + (@diag_real_dx * frac)
|
||||
@real_y = @diag_start_y + (@diag_real_dy * frac)
|
||||
@x = (@real_x / Game_Map::REAL_RES_X).round % self.map.width
|
||||
@y = (@real_y / Game_Map::REAL_RES_Y).round % self.map.height
|
||||
@anime_count += 1 if @walk_anime || @step_anime
|
||||
@moved_this_frame = true
|
||||
|
||||
return if @diag_traveled < @diag_total_dist
|
||||
|
||||
# Finished - snap to tile
|
||||
@real_x = @diag_start_x + @diag_real_dx
|
||||
@real_y = @diag_start_y + @diag_real_dy
|
||||
@x = (@real_x / Game_Map::REAL_RES_X).round % self.map.width
|
||||
@y = (@real_y / Game_Map::REAL_RES_Y).round % self.map.height
|
||||
@diag_move_active = false
|
||||
calculate_bush_depth
|
||||
triggerLeaveTile
|
||||
Events.onStepTakenFieldMovement.trigger(self, self)
|
||||
end
|
||||
|
||||
def diagonal_moving?
|
||||
return @diag_move_active
|
||||
end
|
||||
end
|
||||
|
||||
def pbMoveEventDiagonal(event, distance_horizontal, distance_vertical, speed)
|
||||
event = get_character(event) if event.is_a?(Integer)
|
||||
event.move_diagonal_freeform(distance_horizontal, distance_vertical, speed)
|
||||
end
|
||||
|
||||
@@ -1165,6 +1165,19 @@ HiddenMoveHandlers::UseMove.add(:MAGNETRISE, proc { |move, pokemon|
|
||||
next true
|
||||
})
|
||||
|
||||
HiddenMoveHandlers::CanUseMove.add(:SPLASH, proc { |move, pkmn, showmsg|
|
||||
next true unless $PokemonGlobal.bicycle || $game_player.floating
|
||||
})
|
||||
HiddenMoveHandlers::UseMove.add(:SPLASH, proc { |move, pokemon|
|
||||
if !pbHiddenMoveAnimation(pokemon)
|
||||
pbMessage(_INTL("{1} used {2}!", pokemon.name, GameData::Move.get(move).name))
|
||||
end
|
||||
pbSEPlay("jump", 80, 100)
|
||||
$game_player.jump(0,0)
|
||||
next true
|
||||
})
|
||||
|
||||
|
||||
HiddenMoveHandlers::CanUseMove.add(:MIST, proc { |move, pkmn, showmsg|
|
||||
next true if Settings::GAME_ID == :IF_HOENN
|
||||
})
|
||||
|
||||
@@ -67,7 +67,8 @@ UnworthyPie<s>Doctor Miawoo
|
||||
Chardub<s>TCGrunler#4583
|
||||
|
||||
<title>Elite 4 rematch teams
|
||||
duskrd<s>anaconja<s>taraline
|
||||
duskrd<s>anaconja
|
||||
taraline<s>
|
||||
|
||||
<title>French translation
|
||||
anthonygourmand
|
||||
|
||||
@@ -562,7 +562,6 @@ def pbExtractText
|
||||
end
|
||||
pbMessageDisplay(msgwindow,_INTL("Please wait.\\wtnp[0]"))
|
||||
pbSetTextMessages
|
||||
MessageTypes.saveMessages
|
||||
MessageTypes.extract("intl.txt")
|
||||
pbMessageDisplay(msgwindow,_INTL("All text in the game was extracted and saved to intl.txt.\1"))
|
||||
pbMessageDisplay(msgwindow,_INTL("To localize the text for a particular language, translate every second line in the file.\1"))
|
||||
|
||||
@@ -41,7 +41,7 @@ TYPE_EXPERTS_APPEARANCES = {
|
||||
:TYPE_EXPERT_WATER => TrainerAppearance.new(5, "waterdress", "waterdress", "1_pixie", 180, 0, 0),
|
||||
:TYPE_EXPERT_GRASS => TrainerAppearance.new(3, "grassexpert", "grassexpert", "3_roseradeF", 70, 0, 0, "sprout"),
|
||||
:TYPE_EXPERT_ELECTRIC => TrainerAppearance.new(3, "designerheadphones", "urbanelectric", "1_dancer", 10, 0, 0), # OK
|
||||
:TYPE_EXPERT_PSYCHIC => TrainerAppearance.new(4, "nil", "psyshamanm", "3_nhair", 250, 0, 0), # TODO NEEDS OUTFIT, LOCATION, TEAM
|
||||
:TYPE_EXPERT_PSYCHIC => TrainerAppearance.new(4, "nil", "psyshaman", "3_nhair", 250, 0, 0), # TODO NEEDS OUTFIT, LOCATION, TEAM
|
||||
:TYPE_EXPERT_ICE => TrainerAppearance.new(6, "skierF", "iceoutfit", "1_wavy", 0, 0, 210),
|
||||
:TYPE_EXPERT_DRAGON => TrainerAppearance.new(5, "aerodactylSkull", "dragonconqueror", "2_SpecialLatias", 670, 0, 510), # OK
|
||||
:TYPE_EXPERT_DARK => TrainerAppearance.new(4, "cynthiaaccessory", "darkoutfit", "3_emo", 330, 0, 0),
|
||||
|
||||
@@ -104,7 +104,7 @@ class FusionTutorService
|
||||
compatibleMoves << :DEFENDORDER if is_fusion_of([:BEEDRILL])
|
||||
compatibleMoves << :HEALORDER if is_fusion_of([:BEEDRILL])
|
||||
compatibleMoves << :POWDER if is_fusion_of([:BUTTERFREE, :VENOMOTH, :VOLCARONA, :PARASECT, :BRELOOM])
|
||||
compatibleMoves << :TAILGLOW if is_fusion_of([:MAREEP, :FLAAFFY, :AMPHAROS, :LANTURN, :ZEKROM, :RESHIRAM])
|
||||
#compatibleMoves << :TAILGLOW if is_fusion_of([:MAREEP, :FLAAFFY, :AMPHAROS, :LANTURN, :ZEKROM, :RESHIRAM])
|
||||
compatibleMoves << :DARKESTLARIAT if is_fusion_of([:SNORLAX, :REGIGIGAS, :POLIWRATH, :MACHAMP, :ELECTIVIRE, :DUSKNOIR, :SWAMPERT, :KROOKODILE, :GOLURK])
|
||||
compatibleMoves << :PARTINGSHOT if is_fusion_of([:MEOWTH, :PERSIAN, :SANDILE, :KROKOROK, :KROOKODILE, :UMBREON])
|
||||
compatibleMoves << :TOPSYTURVY if is_fusion_of([:HITMONTOP, :WOBBUFFET])
|
||||
@@ -115,7 +115,7 @@ class FusionTutorService
|
||||
compatibleMoves << :AROMATICMIST if is_fusion_of([:WEEZING, :BULBASAUR, :IVYSAUR, :VENUSAUR, :CHIKORITA, :BAYLEEF, :MEGANIUM, :GLOOM, :VILEPLUME, :BELLOSSOM, :ROSELIA, :ROSERADE])
|
||||
compatibleMoves << :FLORALHEALING if is_fusion_of([:SUNFLORA, :BELLOSSOM, :ROSELIA, :ROSERADE])
|
||||
#compatibleMoves << :FLYINGPRESS if is_fusion_of([:TORCHIC, :COMBUSKEN, :BLAZIKEN, :FARFETCHD, :HERACROSS]) || (hasType(:FLYING) && hasType(:FIGHTING))
|
||||
compatibleMoves << :MATBLOCK if is_fusion_of([:MACHOP, :MACHOKE, :MACHAMP, :TYROGUE, :HITMONLEE, :HITMONCHAN, :HITMONTOP])
|
||||
#compatibleMoves << :MATBLOCK if is_fusion_of([:MACHOP, :MACHOKE, :MACHAMP, :TYROGUE, :HITMONLEE, :HITMONCHAN, :HITMONTOP])
|
||||
compatibleMoves << :MINDBLOWN if is_fusion_of([:VOLTORB, :ELECTRODE, :EXEGGUTOR])
|
||||
compatibleMoves << :SHELLTRAP if is_fusion_of([:MAGCARGO, :FORRETRESS])
|
||||
compatibleMoves << :HEATCRASH if is_fusion_of([:BLAZIKEN, :RESHIRAM, :GROUDON, :CHARIZARD, :GOLURK, :REGIGIGAS, :RHYDON, :RHYPERIOR, :SNORLAX])
|
||||
|
||||
@@ -128,16 +128,7 @@ end
|
||||
|
||||
def select_altering_cave_encounter
|
||||
level_range = 8..16
|
||||
encounter_table =
|
||||
{
|
||||
:MONDAY => [:ZUBAT, :ZUBAT, :ZUBAT, :WOOBAT, :HOUNDOUR],
|
||||
:TUESDAY => [:ZUBAT, :ZUBAT, :ZUBAT, :WOOBAT, :SCRAGGY],
|
||||
:WEDNESDAY => [:ZUBAT, :ZUBAT, :ZUBAT, :WOOBAT, :PINECO],
|
||||
:THURSDAY => [:ZUBAT, :ZUBAT, :ZUBAT, :WOOBAT, :MAREEP],
|
||||
:FRIDAY => [:ZUBAT, :ZUBAT, :ZUBAT, :WOOBAT, :TEDDIURSA],
|
||||
:SATURDAY => [:ZUBAT, :ZUBAT, :ZUBAT, :WOOBAT, :AIPOM],
|
||||
:SUNDAY => [:ZUBAT, :ZUBAT, :ZUBAT, :WOOBAT, :SMEARGLE],
|
||||
}
|
||||
encounter_table = Settings::ALTERING_CAVE_ENCOUNTERS
|
||||
day_of_week = getDayOfTheWeek
|
||||
species = encounter_table[day_of_week].sample
|
||||
level = rand(level_range)
|
||||
|
||||
@@ -102,7 +102,7 @@ class OverworldPokemonEvent < Game_Event
|
||||
|
||||
def roll_for_special_encounters
|
||||
# Mew encounter
|
||||
if rand(10000) < Settings::MEW_OW_ENCOUNTER_CHANCE
|
||||
if rand(15100) < Settings::MEW_OW_ENCOUNTER_CHANCE
|
||||
@species = :MEW
|
||||
@level = 7
|
||||
end
|
||||
|
||||
@@ -51,8 +51,7 @@ end
|
||||
|
||||
def get_overworld_pokemon_group_size(species, max_group_size)
|
||||
catch_rate = GameData::Species.get(species).catch_rate
|
||||
t = (catch_rate - 1) / 254.0
|
||||
t = Math.sqrt(t) # invert to favor smaller groups
|
||||
t = Math.sqrt([(catch_rate - 1) / 254.0, 0].max)
|
||||
|
||||
# Base group size, biased toward smaller numbers
|
||||
base = 1 + (t * (max_group_size - 1) * 0.5) # multiply by 0.5 to shrink toward 1–2
|
||||
|
||||
@@ -3,6 +3,7 @@ class PokemonTemp
|
||||
end
|
||||
module PokeBattle_BattleCommon
|
||||
def checkCatchChallenge(pokeball, battle, caught_pokemon)
|
||||
return unless battle.is_a?(PokeBattle_Battle) #This whole check gets skipped for safari zone - maybe implement it later
|
||||
#Caught in 1 try
|
||||
if battle.balls_thrown == 0 #It's incremented after this method gets checked
|
||||
$Trainer.complete_challenge(:catch_first_try)
|
||||
|
||||
@@ -180,7 +180,7 @@ class BattledTrainer
|
||||
held_item = pokemon.item
|
||||
is_holdable_item = HELD_ITEMS.include?(held_item.id)
|
||||
echoln "#{held_item} #{is_holdable_item}"
|
||||
next if is_holdable_item && rand(100) >= store_held_item_chancex
|
||||
next if is_holdable_item && rand(100) >= store_held_item_chance
|
||||
|
||||
is_evolution_item = held_item.is_evolution_stone?
|
||||
is_battle_item = held_item.has_battle_use?
|
||||
|
||||
@@ -118,21 +118,21 @@ class BattledTrainer
|
||||
|
||||
|
||||
#story / bosses
|
||||
LEADER_Roxanne: [20, 40, 200],
|
||||
LEADER_Brawly: [20, 40, 200],
|
||||
LEADER_Wattson: [20, 40, 200],
|
||||
LEADER_Flannery: [20, 40, 200],
|
||||
LEADER_Norman: [5, 40, 200],
|
||||
LEADER_Winona: [20, 40, 200],
|
||||
LEADER_Tate: [20, 40, 200],
|
||||
LEADER_Liza: [20, 40, 200],
|
||||
LEADER_Wallace: [20, 40, 200],
|
||||
LEADER_Juan: [20, 40, 200],
|
||||
ELITEFOUR_Sidney: [30, 60, 200],
|
||||
ELITEFOUR_Phoebe: [30, 60, 200],
|
||||
ELITEFOUR_Glacia: [30, 60, 200],
|
||||
ELITEFOUR_Drake: [30, 60, 200],
|
||||
CHAMPION_Steven: [50, 70, 200],
|
||||
LEADER_Roxanne: [20, 40, 80],
|
||||
LEADER_Brawly: [20, 40, 80],
|
||||
LEADER_Wattson: [20, 40, 80],
|
||||
LEADER_Flannery: [20, 40, 80],
|
||||
LEADER_Norman: [5, 40, 80],
|
||||
LEADER_Winona: [20, 40, 80],
|
||||
LEADER_Tate: [20, 40, 80],
|
||||
LEADER_Liza: [20, 40, 80],
|
||||
LEADER_Wallace: [20, 40, 80],
|
||||
LEADER_Juan: [20, 40, 80],
|
||||
ELITEFOUR_Sidney: [30, 60, 90],
|
||||
ELITEFOUR_Phoebe: [30, 60, 90],
|
||||
ELITEFOUR_Glacia: [30, 60, 90],
|
||||
ELITEFOUR_Drake: [30, 60, 90],
|
||||
CHAMPION_Steven: [50, 70, 90],
|
||||
TEAM_AQUA_BOSS: [60, 200, 200],
|
||||
TEAM_MAGMA_BOSS: [60, 200, 200]
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
module Settings
|
||||
LATEST_GAME_RELEASE = "6.7.2"
|
||||
LATEST_GAME_RELEASE = "6.8.0"
|
||||
|
||||
SHINY_POKEMON_CHANCE = 16
|
||||
SNOW_DAY = false
|
||||
@@ -48,7 +48,7 @@ module Settings
|
||||
CUSTOM_FUSIONS_SPRITESHEET_TRUE_SIZE_URL = "https://infinitefusion.net/customsprites/spritesheets/spritesheets_custom/"
|
||||
|
||||
|
||||
TRANSFER_BOX_DISCLAIMER_MESSAGE = "\\C[2]The Transfer Box is not yet available in Infinite Fusion 1, it is planned for a future update. It can still be used to transfer Pokémon between Hoenn savefiles in the meantime."
|
||||
TRANSFER_BOX_DISCLAIMER_MESSAGE = ""
|
||||
|
||||
CUSTOMSPRITES_RATE_MAX_NB_REQUESTS = 15 #Nb. requests allowed in each time window
|
||||
CUSTOMSPRITES_ENTRIES_RATE_TIME_WINDOW = 60 # In seconds
|
||||
|
||||
Reference in New Issue
Block a user