mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-06-13 07:19:28 +00:00
Moved all settings into module Settings
This commit is contained in:
+361
-355
@@ -4,381 +4,387 @@
|
||||
# https://github.com/Maruno17/pokemon-essentials #
|
||||
#==============================================================================#
|
||||
|
||||
# The generation that the battle system follows. Used throughout the battle
|
||||
# scripts, and also by some other settings which are used in and out of battle
|
||||
# (you can of course change those settings to suit your game).
|
||||
# Note that this isn't perfect. Essentials doesn't accurately replicate every
|
||||
# single generation's mechanics. It's considered to be good enough. Only
|
||||
# generations 5 and later are reasonably supported.
|
||||
MECHANICS_GENERATION = 7
|
||||
module Settings
|
||||
# The generation that the battle system follows. Used throughout the battle
|
||||
# scripts, and also by some other settings which are used in and out of battle
|
||||
# (you can of course change those settings to suit your game).
|
||||
# Note that this isn't perfect. Essentials doesn't accurately replicate every
|
||||
# single generation's mechanics. It's considered to be good enough. Only
|
||||
# generations 5 and later are reasonably supported.
|
||||
MECHANICS_GENERATION = 7
|
||||
|
||||
#===============================================================================
|
||||
#===============================================================================
|
||||
|
||||
# The default screen width (at a scale of 1.0).
|
||||
SCREEN_WIDTH = 512
|
||||
# The default screen height (at a scale of 1.0).
|
||||
SCREEN_HEIGHT = 384
|
||||
# The default screen scale factor. Possible values are 0.5, 1.0, 1.5 and 2.0.
|
||||
SCREEN_SCALE = 1.0
|
||||
# Map view mode (0=original, 1=custom, 2=perspective).
|
||||
MAP_VIEW_MODE = 1
|
||||
# The default screen width (at a scale of 1.0).
|
||||
SCREEN_WIDTH = 512
|
||||
# The default screen height (at a scale of 1.0).
|
||||
SCREEN_HEIGHT = 384
|
||||
# The default screen scale factor. Possible values are 0.5, 1.0, 1.5 and 2.0.
|
||||
SCREEN_SCALE = 1.0
|
||||
# Map view mode (0=original, 1=custom, 2=perspective).
|
||||
MAP_VIEW_MODE = 1
|
||||
|
||||
#===============================================================================
|
||||
#===============================================================================
|
||||
|
||||
# The maximum level Pokémon can reach.
|
||||
MAXIMUM_LEVEL = 100
|
||||
# The level of newly hatched Pokémon.
|
||||
EGG_LEVEL = 1
|
||||
# The odds of a newly generated Pokémon being shiny (out of 65536).
|
||||
SHINY_POKEMON_CHANCE = (MECHANICS_GENERATION >= 6) ? 16 : 8
|
||||
# The odds of a wild Pokémon/bred egg having Pokérus (out of 65536).
|
||||
POKERUS_CHANCE = 3
|
||||
# Whether a bred baby Pokémon can inherit any TM/HM moves from its father. It
|
||||
# can never inherit TM/HM moves from its mother.
|
||||
BREEDING_CAN_INHERIT_MACHINE_MOVES = (MECHANICS_GENERATION <= 5)
|
||||
# Whether a bred baby Pokémon can inherit egg moves from its mother. It can
|
||||
# always inherit egg moves from its father.
|
||||
BREEDING_CAN_INHERIT_EGG_MOVES_FROM_MOTHER = (MECHANICS_GENERATION >= 6)
|
||||
# The maximum level Pokémon can reach.
|
||||
MAXIMUM_LEVEL = 100
|
||||
# The level of newly hatched Pokémon.
|
||||
EGG_LEVEL = 1
|
||||
# The odds of a newly generated Pokémon being shiny (out of 65536).
|
||||
SHINY_POKEMON_CHANCE = (MECHANICS_GENERATION >= 6) ? 16 : 8
|
||||
# The odds of a wild Pokémon/bred egg having Pokérus (out of 65536).
|
||||
POKERUS_CHANCE = 3
|
||||
# Whether a bred baby Pokémon can inherit any TM/HM moves from its father. It
|
||||
# can never inherit TM/HM moves from its mother.
|
||||
BREEDING_CAN_INHERIT_MACHINE_MOVES = (MECHANICS_GENERATION <= 5)
|
||||
# Whether a bred baby Pokémon can inherit egg moves from its mother. It can
|
||||
# always inherit egg moves from its father.
|
||||
BREEDING_CAN_INHERIT_EGG_MOVES_FROM_MOTHER = (MECHANICS_GENERATION >= 6)
|
||||
|
||||
#===============================================================================
|
||||
#===============================================================================
|
||||
|
||||
# The amount of money the player starts the game with.
|
||||
INITIAL_MONEY = 3000
|
||||
# The maximum amount of money the player can have.
|
||||
MAX_MONEY = 999_999
|
||||
# The maximum number of Game Corner coins the player can have.
|
||||
MAX_COINS = 99_999
|
||||
# The maximum length, in characters, that the player's name can be.
|
||||
MAX_PLAYER_NAME_SIZE = 10
|
||||
# The maximum number of Pokémon that can be in the party.
|
||||
MAX_PARTY_SIZE = 6
|
||||
# The amount of money the player starts the game with.
|
||||
INITIAL_MONEY = 3000
|
||||
# The maximum amount of money the player can have.
|
||||
MAX_MONEY = 999_999
|
||||
# The maximum number of Game Corner coins the player can have.
|
||||
MAX_COINS = 99_999
|
||||
# The maximum length, in characters, that the player's name can be.
|
||||
MAX_PLAYER_NAME_SIZE = 10
|
||||
# The maximum number of Pokémon that can be in the party.
|
||||
MAX_PARTY_SIZE = 6
|
||||
|
||||
#===============================================================================
|
||||
#===============================================================================
|
||||
|
||||
# A set of arrays each containing a trainer type followed by a Global Variable
|
||||
# number. If the variable isn't set to 0, then all trainers with the associated
|
||||
# trainer type will be named as whatever is in that variable.
|
||||
RIVAL_NAMES = [
|
||||
[:RIVAL1, 12],
|
||||
[:RIVAL2, 12],
|
||||
[:CHAMPION, 12]
|
||||
]
|
||||
# A set of arrays each containing a trainer type followed by a Global Variable
|
||||
# number. If the variable isn't set to 0, then all trainers with the associated
|
||||
# trainer type will be named as whatever is in that variable.
|
||||
RIVAL_NAMES = [
|
||||
[:RIVAL1, 12],
|
||||
[:RIVAL2, 12],
|
||||
[:CHAMPION, 12]
|
||||
]
|
||||
|
||||
#===============================================================================
|
||||
#===============================================================================
|
||||
|
||||
# Whether outdoor maps should be shaded according to the time of day.
|
||||
TIME_SHADING = true
|
||||
# Whether outdoor maps should be shaded according to the time of day.
|
||||
TIME_SHADING = true
|
||||
|
||||
#===============================================================================
|
||||
#===============================================================================
|
||||
|
||||
# Whether poisoned Pokémon will lose HP while walking around in the field.
|
||||
POISON_IN_FIELD = (MECHANICS_GENERATION <= 4)
|
||||
# Whether poisoned Pokémon will faint while walking around in the field (true),
|
||||
# or survive the poisoning with 1 HP (false).
|
||||
POISON_FAINT_IN_FIELD = (MECHANICS_GENERATION <= 3)
|
||||
# Whether planted berries grow according to Gen 4 mechanics (true) or Gen 3
|
||||
# mechanics (false).
|
||||
NEW_BERRY_PLANTS = (MECHANICS_GENERATION >= 4)
|
||||
# Whether fishing automatically hooks the Pokémon (if false, there is a reaction
|
||||
# test first).
|
||||
FISHING_AUTO_HOOK = false
|
||||
# The ID of the common event that runs when the player starts fishing (runs
|
||||
# instead of showing the casting animation).
|
||||
FISHING_BEGIN_COMMON_EVENT = -1
|
||||
# The ID of the common event that runs when the player stops fishing (runs
|
||||
# instead of showing the reeling in animation).
|
||||
FISHING_END_COMMON_EVENT = -1
|
||||
# Whether poisoned Pokémon will lose HP while walking around in the field.
|
||||
POISON_IN_FIELD = (MECHANICS_GENERATION <= 4)
|
||||
# Whether poisoned Pokémon will faint while walking around in the field (true),
|
||||
# or survive the poisoning with 1 HP (false).
|
||||
POISON_FAINT_IN_FIELD = (MECHANICS_GENERATION <= 3)
|
||||
# Whether planted berries grow according to Gen 4 mechanics (true) or Gen 3
|
||||
# mechanics (false).
|
||||
NEW_BERRY_PLANTS = (MECHANICS_GENERATION >= 4)
|
||||
# Whether fishing automatically hooks the Pokémon (if false, there is a reaction
|
||||
# test first).
|
||||
FISHING_AUTO_HOOK = false
|
||||
# The ID of the common event that runs when the player starts fishing (runs
|
||||
# instead of showing the casting animation).
|
||||
FISHING_BEGIN_COMMON_EVENT = -1
|
||||
# The ID of the common event that runs when the player stops fishing (runs
|
||||
# instead of showing the reeling in animation).
|
||||
FISHING_END_COMMON_EVENT = -1
|
||||
|
||||
#===============================================================================
|
||||
#===============================================================================
|
||||
|
||||
# The number of steps allowed before a Safari Zone game is over (0=infinite).
|
||||
SAFARI_STEPS = 600
|
||||
# The number of seconds a Bug Catching Contest lasts for (0=infinite).
|
||||
BUG_CONTEST_TIME = 1200
|
||||
# The number of steps allowed before a Safari Zone game is over (0=infinite).
|
||||
SAFARI_STEPS = 600
|
||||
# The number of seconds a Bug Catching Contest lasts for (0=infinite).
|
||||
BUG_CONTEST_TIME = 1200
|
||||
|
||||
#===============================================================================
|
||||
#===============================================================================
|
||||
|
||||
# Pairs of map IDs, where the location signpost isn't shown when moving from one
|
||||
# of the maps in a pair to the other (and vice versa). Useful for single long
|
||||
# routes/towns that are spread over multiple maps.
|
||||
# e.g. [4,5,16,17,42,43] will be map pairs 4,5 and 16,17 and 42,43.
|
||||
# Moving between two maps that have the exact same name won't show the location
|
||||
# signpost anyway, so you don't need to list those maps here.
|
||||
NO_SIGNPOSTS = []
|
||||
# Pairs of map IDs, where the location signpost isn't shown when moving from one
|
||||
# of the maps in a pair to the other (and vice versa). Useful for single long
|
||||
# routes/towns that are spread over multiple maps.
|
||||
# e.g. [4,5,16,17,42,43] will be map pairs 4,5 and 16,17 and 42,43.
|
||||
# Moving between two maps that have the exact same name won't show the location
|
||||
# signpost anyway, so you don't need to list those maps here.
|
||||
NO_SIGNPOSTS = []
|
||||
|
||||
#===============================================================================
|
||||
#===============================================================================
|
||||
|
||||
# Whether the badge restriction on using certain hidden moves is owning at least
|
||||
# a certain number of badges (true), or owning a particular badge (false).
|
||||
FIELD_MOVES_COUNT_BADGES = true
|
||||
# Depending on FIELD_MOVES_COUNT_BADGES, either the number of badges required to
|
||||
# use each hidden move, or the specific badge number required to use each move.
|
||||
# Remember that badge 0 is the first badge, badge 1 is the second badge, etc.
|
||||
# e.g. To require the second badge, put false and 1.
|
||||
# To require at least 2 badges, put true and 2.
|
||||
BADGE_FOR_CUT = 1
|
||||
BADGE_FOR_FLASH = 2
|
||||
BADGE_FOR_ROCKSMASH = 3
|
||||
BADGE_FOR_SURF = 4
|
||||
BADGE_FOR_FLY = 5
|
||||
BADGE_FOR_STRENGTH = 6
|
||||
BADGE_FOR_DIVE = 7
|
||||
BADGE_FOR_WATERFALL = 8
|
||||
# Whether the badge restriction on using certain hidden moves is owning at least
|
||||
# a certain number of badges (true), or owning a particular badge (false).
|
||||
FIELD_MOVES_COUNT_BADGES = true
|
||||
# Depending on FIELD_MOVES_COUNT_BADGES, either the number of badges required to
|
||||
# use each hidden move, or the specific badge number required to use each move.
|
||||
# Remember that badge 0 is the first badge, badge 1 is the second badge, etc.
|
||||
# e.g. To require the second badge, put false and 1.
|
||||
# To require at least 2 badges, put true and 2.
|
||||
BADGE_FOR_CUT = 1
|
||||
BADGE_FOR_FLASH = 2
|
||||
BADGE_FOR_ROCKSMASH = 3
|
||||
BADGE_FOR_SURF = 4
|
||||
BADGE_FOR_FLY = 5
|
||||
BADGE_FOR_STRENGTH = 6
|
||||
BADGE_FOR_DIVE = 7
|
||||
BADGE_FOR_WATERFALL = 8
|
||||
|
||||
#===============================================================================
|
||||
#===============================================================================
|
||||
|
||||
# If a move taught by a TM/HM/TR replaces another move, this setting is whether
|
||||
# the machine's move retains the replaced move's PP (true) or whether the
|
||||
# machine's move has full PP (false).
|
||||
TAUGHT_MACHINES_KEEP_OLD_PP = (MECHANICS_GENERATION == 5)
|
||||
# Whether Black/White Flute raise/lower the levels of wild Pokémon respectively
|
||||
# (true) or lower/raise the wild encounter rate respectively (false).
|
||||
FLUTES_CHANGE_WILD_ENCOUNTER_LEVELS = (MECHANICS_GENERATION >= 6)
|
||||
# Whether Repel uses the level of the first Pokémon in the party regardless of
|
||||
# its HP (true) or uses the level of the first unfainted Pokémon (false)
|
||||
REPEL_COUNTS_FAINTED_POKEMON = (MECHANICS_GENERATION >= 6)
|
||||
# Whether Rage Candy Bar acts as a Full Heal (true) or a Potion (false).
|
||||
RAGE_CANDY_BAR_CURES_STATUS_PROBLEMS = (MECHANICS_GENERATION >= 7)
|
||||
# If a move taught by a TM/HM/TR replaces another move, this setting is whether
|
||||
# the machine's move retains the replaced move's PP (true) or whether the
|
||||
# machine's move has full PP (false).
|
||||
TAUGHT_MACHINES_KEEP_OLD_PP = (MECHANICS_GENERATION == 5)
|
||||
# Whether Black/White Flute raise/lower the levels of wild Pokémon respectively
|
||||
# (true) or lower/raise the wild encounter rate respectively (false).
|
||||
FLUTES_CHANGE_WILD_ENCOUNTER_LEVELS = (MECHANICS_GENERATION >= 6)
|
||||
# Whether Repel uses the level of the first Pokémon in the party regardless of
|
||||
# its HP (true) or uses the level of the first unfainted Pokémon (false)
|
||||
REPEL_COUNTS_FAINTED_POKEMON = (MECHANICS_GENERATION >= 6)
|
||||
# Whether Rage Candy Bar acts as a Full Heal (true) or a Potion (false).
|
||||
RAGE_CANDY_BAR_CURES_STATUS_PROBLEMS = (MECHANICS_GENERATION >= 7)
|
||||
|
||||
#===============================================================================
|
||||
#===============================================================================
|
||||
|
||||
# The name of the person who created the Pokémon storage system.
|
||||
def pbStorageCreator
|
||||
return _INTL("Bill")
|
||||
# The name of the person who created the Pokémon storage system.
|
||||
def self.storage_creator_name
|
||||
return _INTL("Bill")
|
||||
end
|
||||
# The number of boxes in Pokémon storage.
|
||||
NUM_STORAGE_BOXES = 30
|
||||
|
||||
#===============================================================================
|
||||
|
||||
# The names of each pocket of the Bag. Leave the first entry blank.
|
||||
def self.bag_pocket_names
|
||||
return ["",
|
||||
_INTL("Items"),
|
||||
_INTL("Medicine"),
|
||||
_INTL("Poké Balls"),
|
||||
_INTL("TMs & HMs"),
|
||||
_INTL("Berries"),
|
||||
_INTL("Mail"),
|
||||
_INTL("Battle Items"),
|
||||
_INTL("Key Items")
|
||||
]
|
||||
end
|
||||
# The maximum number of slots per pocket (-1 means infinite number). Ignore the
|
||||
# first number (0).
|
||||
BAG_MAX_POCKET_SIZE = [0, -1, -1, -1, -1, -1, -1, -1, -1]
|
||||
# The maximum number of items each slot in the Bag can hold.
|
||||
BAG_MAX_PER_SLOT = 999
|
||||
# Whether each pocket in turn auto-sorts itself by item ID number. Ignore the
|
||||
# first entry (the 0).
|
||||
BAG_POCKET_AUTO_SORT = [0, false, false, false, true, true, false, false, false]
|
||||
|
||||
#===============================================================================
|
||||
|
||||
# Whether the Pokédex list shown is the one for the player's current region
|
||||
# (true), or whether a menu pops up for the player to manually choose which Dex
|
||||
# list to view if more than one is available (false).
|
||||
USE_CURRENT_REGION_DEX = false
|
||||
# The names of each Dex list in the game, in order and with National Dex at the
|
||||
# end. This is also the order that $PokemonGlobal.pokedexUnlocked is in, which
|
||||
# records which Dexes have been unlocked (first is unlocked by default).
|
||||
# You can define which region a particular Dex list is linked to. This means the
|
||||
# area map shown while viewing that Dex list will ALWAYS be that of the defined
|
||||
# region, rather than whichever region the player is currently in. To define
|
||||
# this, put the Dex name and the region number in an array, like the Kanto and
|
||||
# Johto Dexes are. The National Dex isn't in an array with a region number,
|
||||
# therefore its area map is whichever region the player is currently in.
|
||||
def self.pokedex_names
|
||||
return [
|
||||
[_INTL("Kanto Pokédex"), 0],
|
||||
[_INTL("Johto Pokédex"), 1],
|
||||
_INTL("National Pokédex")
|
||||
]
|
||||
end
|
||||
# Whether all forms of a given species will be immediately available to view in
|
||||
# the Pokédex so long as that species has been seen at all (true), or whether
|
||||
# each form needs to be seen specifically before that form appears in the
|
||||
# Pokédex (false).
|
||||
DEX_SHOWS_ALL_FORMS = false
|
||||
# An array of numbers, where each number is that of a Dex list (National Dex is
|
||||
# -1). All Dex lists included here have the species numbers in them reduced by
|
||||
# 1, thus making the first listed species have a species number of 0 (e.g.
|
||||
# Victini in Unova's Dex).
|
||||
DEXES_WITH_OFFSETS = []
|
||||
|
||||
#===============================================================================
|
||||
|
||||
# A set of arrays each containing details of a graphic to be shown on the region
|
||||
# map if appropriate. The values for each array are as follows:
|
||||
# - Region number.
|
||||
# - Global Switch; the graphic is shown if this is ON (non-wall maps only).
|
||||
# - X coordinate of the graphic on the map, in squares.
|
||||
# - Y coordinate of the graphic on the map, in squares.
|
||||
# - Name of the graphic, found in the Graphics/Pictures folder.
|
||||
# - The graphic will always (true) or never (false) be shown on a wall map.
|
||||
REGION_MAP_EXTRAS = [
|
||||
[0, 51, 16, 15, "mapHiddenBerth", false],
|
||||
[0, 52, 20, 14, "mapHiddenFaraday", false]
|
||||
]
|
||||
|
||||
#===============================================================================
|
||||
|
||||
# A list of maps used by roaming Pokémon. Each map has an array of other maps it
|
||||
# can lead to.
|
||||
ROAMING_AREAS = {
|
||||
5 => [ 21, 28, 31, 39, 41, 44, 47, 66, 69],
|
||||
21 => [5, 28, 31, 39, 41, 44, 47, 66, 69],
|
||||
28 => [5, 21, 31, 39, 41, 44, 47, 66, 69],
|
||||
31 => [5, 21, 28, 39, 41, 44, 47, 66, 69],
|
||||
39 => [5, 21, 28, 31, 41, 44, 47, 66, 69],
|
||||
41 => [5, 21, 28, 31, 39, 44, 47, 66, 69],
|
||||
44 => [5, 21, 28, 31, 39, 41, 47, 66, 69],
|
||||
47 => [5, 21, 28, 31, 39, 41, 44, 66, 69],
|
||||
66 => [5, 21, 28, 31, 39, 41, 44, 47, 69],
|
||||
69 => [5, 21, 28, 31, 39, 41, 44, 47, 66 ]
|
||||
}
|
||||
# A set of arrays each containing the details of a roaming Pokémon. The
|
||||
# information within is as follows:
|
||||
# - Species.
|
||||
# - Level.
|
||||
# - Global Switch; the Pokémon roams while this is ON.
|
||||
# - Encounter type (0=any, 1=grass/walking in cave, 2=surfing, 3=fishing,
|
||||
# 4=surfing/fishing). See bottom of PField_RoamingPokemon for lists.
|
||||
# - Name of BGM to play for that encounter (optional).
|
||||
# - Roaming areas specifically for this Pokémon (optional).
|
||||
ROAMING_SPECIES = [
|
||||
[:LATIAS, 30, 53, 0, "Battle roaming"],
|
||||
[:LATIOS, 30, 53, 0, "Battle roaming"],
|
||||
[:KYOGRE, 40, 54, 2, nil, {
|
||||
2 => [ 21, 31 ],
|
||||
21 => [2, 31, 69],
|
||||
31 => [2, 21, 69],
|
||||
69 => [ 21, 31 ]
|
||||
}],
|
||||
[:ENTEI, 40, 55, 1, nil]
|
||||
]
|
||||
|
||||
#===============================================================================
|
||||
|
||||
# A set of arrays each containing details of a wild encounter that can only
|
||||
# occur via using the Poké Radar. The information within is as follows:
|
||||
# - Map ID on which this encounter can occur.
|
||||
# - Probability that this encounter will occur (as a percentage).
|
||||
# - Species.
|
||||
# - Minimum possible level.
|
||||
# - Maximum possible level (optional).
|
||||
POKE_RADAR_ENCOUNTERS = [
|
||||
[5, 20, :STARLY, 12, 15],
|
||||
[21, 10, :STANTLER, 14],
|
||||
[28, 20, :BUTTERFREE, 15, 18],
|
||||
[28, 20, :BEEDRILL, 15, 18]
|
||||
]
|
||||
|
||||
#===============================================================================
|
||||
|
||||
# The Game Switch that is set to ON when the player blacks out.
|
||||
STARTING_OVER_SWITCH = 1
|
||||
# The Game Switch that is set to ON when the player has seen Pokérus in the Poké
|
||||
# Center, and doesn't need to be told about it again.
|
||||
SEEN_POKERUS_SWITCH = 2
|
||||
# The Game Switch which, while ON, makes all wild Pokémon created be shiny.
|
||||
SHINY_WILD_POKEMON_SWITCH = 31
|
||||
# The Game Switch which, while ON, makes all Pokémon created considered to be
|
||||
# met via a fateful encounter.
|
||||
FATEFUL_ENCOUNTER_SWITCH = 32
|
||||
|
||||
#===============================================================================
|
||||
|
||||
# ID of the animation played when the player steps on grass (grass rustling).
|
||||
GRASS_ANIMATION_ID = 1
|
||||
# ID of the animation played when the player lands on the ground after hopping
|
||||
# over a ledge (shows a dust impact).
|
||||
DUST_ANIMATION_ID = 2
|
||||
# ID of the animation played when a trainer notices the player (an exclamation
|
||||
# bubble).
|
||||
EXCLAMATION_ANIMATION_ID = 3
|
||||
# ID of the animation played when a patch of grass rustles due to using the Poké
|
||||
# Radar.
|
||||
RUSTLE_NORMAL_ANIMATION_ID = 1
|
||||
# ID of the animation played when a patch of grass rustles vigorously due to
|
||||
# using the Poké Radar. (Rarer species)
|
||||
RUSTLE_VIGOROUS_ANIMATION_ID = 5
|
||||
# ID of the animation played when a patch of grass rustles and shines due to
|
||||
# using the Poké Radar. (Shiny encounter)
|
||||
RUSTLE_SHINY_ANIMATION_ID = 6
|
||||
# ID of the animation played when a berry tree grows a stage while the player is
|
||||
# on the map (for new plant growth mechanics only).
|
||||
PLANT_SPARKLE_ANIMATION_ID = 7
|
||||
|
||||
#===============================================================================
|
||||
|
||||
# An array of available languages in the game, and their corresponding message
|
||||
# file in the Data folder. Edit only if you have 2 or more languages to choose
|
||||
# from.
|
||||
LANGUAGES = [
|
||||
# ["English", "english.dat"],
|
||||
# ["Deutsch", "deutsch.dat"]
|
||||
]
|
||||
|
||||
#===============================================================================
|
||||
|
||||
# Available speech frames. These are graphic files in "Graphics/Windowskins/".
|
||||
SPEECH_WINDOWSKINS = [
|
||||
"speech hgss 1",
|
||||
"speech hgss 2",
|
||||
"speech hgss 3",
|
||||
"speech hgss 4",
|
||||
"speech hgss 5",
|
||||
"speech hgss 6",
|
||||
"speech hgss 7",
|
||||
"speech hgss 8",
|
||||
"speech hgss 9",
|
||||
"speech hgss 10",
|
||||
"speech hgss 11",
|
||||
"speech hgss 12",
|
||||
"speech hgss 13",
|
||||
"speech hgss 14",
|
||||
"speech hgss 15",
|
||||
"speech hgss 16",
|
||||
"speech hgss 17",
|
||||
"speech hgss 18",
|
||||
"speech hgss 19",
|
||||
"speech hgss 20",
|
||||
"speech pl 18"
|
||||
]
|
||||
|
||||
# Available menu frames. These are graphic files in "Graphics/Windowskins/".
|
||||
MENU_WINDOWSKINS = [
|
||||
"choice 1",
|
||||
"choice 2",
|
||||
"choice 3",
|
||||
"choice 4",
|
||||
"choice 5",
|
||||
"choice 6",
|
||||
"choice 7",
|
||||
"choice 8",
|
||||
"choice 9",
|
||||
"choice 10",
|
||||
"choice 11",
|
||||
"choice 12",
|
||||
"choice 13",
|
||||
"choice 14",
|
||||
"choice 15",
|
||||
"choice 16",
|
||||
"choice 17",
|
||||
"choice 18",
|
||||
"choice 19",
|
||||
"choice 20",
|
||||
"choice 21",
|
||||
"choice 22",
|
||||
"choice 23",
|
||||
"choice 24",
|
||||
"choice 25",
|
||||
"choice 26",
|
||||
"choice 27",
|
||||
"choice 28"
|
||||
]
|
||||
|
||||
# Available fonts, as selectable in the Options Screen.
|
||||
FONT_OPTIONS = [
|
||||
"Power Green",
|
||||
"Power Red and Blue",
|
||||
"Power Red and Green",
|
||||
"Power Clear"
|
||||
]
|
||||
end
|
||||
# The number of boxes in Pokémon storage.
|
||||
NUM_STORAGE_BOXES = 30
|
||||
|
||||
#===============================================================================
|
||||
|
||||
# The names of each pocket of the Bag. Leave the first entry blank.
|
||||
def pbPocketNames; return ["",
|
||||
_INTL("Items"),
|
||||
_INTL("Medicine"),
|
||||
_INTL("Poké Balls"),
|
||||
_INTL("TMs & HMs"),
|
||||
_INTL("Berries"),
|
||||
_INTL("Mail"),
|
||||
_INTL("Battle Items"),
|
||||
_INTL("Key Items")
|
||||
]; end
|
||||
# The maximum number of slots per pocket (-1 means infinite number). Ignore the
|
||||
# first number (0).
|
||||
BAG_MAX_POCKET_SIZE = [0, -1, -1, -1, -1, -1, -1, -1, -1]
|
||||
# The maximum number of items each slot in the Bag can hold.
|
||||
BAG_MAX_PER_SLOT = 999
|
||||
# Whether each pocket in turn auto-sorts itself by item ID number. Ignore the
|
||||
# first entry (the 0).
|
||||
BAG_POCKET_AUTO_SORT = [0, false, false, false, true, true, false, false, false]
|
||||
|
||||
#===============================================================================
|
||||
|
||||
# Whether the Pokédex list shown is the one for the player's current region
|
||||
# (true), or whether a menu pops up for the player to manually choose which Dex
|
||||
# list to view if more than one is available (false).
|
||||
USE_CURRENT_REGION_DEX = false
|
||||
# The names of each Dex list in the game, in order and with National Dex at the
|
||||
# end. This is also the order that $PokemonGlobal.pokedexUnlocked is in, which
|
||||
# records which Dexes have been unlocked (first is unlocked by default).
|
||||
# You can define which region a particular Dex list is linked to. This means the
|
||||
# area map shown while viewing that Dex list will ALWAYS be that of the defined
|
||||
# region, rather than whichever region the player is currently in. To define
|
||||
# this, put the Dex name and the region number in an array, like the Kanto and
|
||||
# Johto Dexes are. The National Dex isn't in an array with a region number,
|
||||
# therefore its area map is whichever region the player is currently in.
|
||||
def pbDexNames; return [
|
||||
[_INTL("Kanto Pokédex"), 0],
|
||||
[_INTL("Johto Pokédex"), 1],
|
||||
_INTL("National Pokédex")
|
||||
]; end
|
||||
# Whether all forms of a given species will be immediately available to view in
|
||||
# the Pokédex so long as that species has been seen at all (true), or whether
|
||||
# each form needs to be seen specifically before that form appears in the
|
||||
# Pokédex (false).
|
||||
DEX_SHOWS_ALL_FORMS = false
|
||||
# An array of numbers, where each number is that of a Dex list (National Dex is
|
||||
# -1). All Dex lists included here have the species numbers in them reduced by
|
||||
# 1, thus making the first listed species have a species number of 0 (e.g.
|
||||
# Victini in Unova's Dex).
|
||||
DEXES_WITH_OFFSETS = []
|
||||
|
||||
#===============================================================================
|
||||
|
||||
# A set of arrays each containing details of a graphic to be shown on the region
|
||||
# map if appropriate. The values for each array are as follows:
|
||||
# - Region number.
|
||||
# - Global Switch; the graphic is shown if this is ON (non-wall maps only).
|
||||
# - X coordinate of the graphic on the map, in squares.
|
||||
# - Y coordinate of the graphic on the map, in squares.
|
||||
# - Name of the graphic, found in the Graphics/Pictures folder.
|
||||
# - The graphic will always (true) or never (false) be shown on a wall map.
|
||||
REGION_MAP_EXTRAS = [
|
||||
[0, 51, 16, 15, "mapHiddenBerth", false],
|
||||
[0, 52, 20, 14, "mapHiddenFaraday", false]
|
||||
]
|
||||
|
||||
#===============================================================================
|
||||
|
||||
# A list of maps used by roaming Pokémon. Each map has an array of other maps it
|
||||
# can lead to.
|
||||
ROAMING_AREAS = {
|
||||
5 => [ 21, 28, 31, 39, 41, 44, 47, 66, 69],
|
||||
21 => [5, 28, 31, 39, 41, 44, 47, 66, 69],
|
||||
28 => [5, 21, 31, 39, 41, 44, 47, 66, 69],
|
||||
31 => [5, 21, 28, 39, 41, 44, 47, 66, 69],
|
||||
39 => [5, 21, 28, 31, 41, 44, 47, 66, 69],
|
||||
41 => [5, 21, 28, 31, 39, 44, 47, 66, 69],
|
||||
44 => [5, 21, 28, 31, 39, 41, 47, 66, 69],
|
||||
47 => [5, 21, 28, 31, 39, 41, 44, 66, 69],
|
||||
66 => [5, 21, 28, 31, 39, 41, 44, 47, 69],
|
||||
69 => [5, 21, 28, 31, 39, 41, 44, 47, 66 ]
|
||||
}
|
||||
# A set of arrays each containing the details of a roaming Pokémon. The
|
||||
# information within is as follows:
|
||||
# - Species.
|
||||
# - Level.
|
||||
# - Global Switch; the Pokémon roams while this is ON.
|
||||
# - Encounter type (0=any, 1=grass/walking in cave, 2=surfing, 3=fishing,
|
||||
# 4=surfing/fishing). See bottom of PField_RoamingPokemon for lists.
|
||||
# - Name of BGM to play for that encounter (optional).
|
||||
# - Roaming areas specifically for this Pokémon (optional).
|
||||
ROAMING_SPECIES = [
|
||||
[:LATIAS, 30, 53, 0, "Battle roaming"],
|
||||
[:LATIOS, 30, 53, 0, "Battle roaming"],
|
||||
[:KYOGRE, 40, 54, 2, nil, {
|
||||
2 => [ 21, 31 ],
|
||||
21 => [2, 31, 69],
|
||||
31 => [2, 21, 69],
|
||||
69 => [ 21, 31 ]
|
||||
}],
|
||||
[:ENTEI, 40, 55, 1, nil]
|
||||
]
|
||||
|
||||
#===============================================================================
|
||||
|
||||
# A set of arrays each containing details of a wild encounter that can only
|
||||
# occur via using the Poké Radar. The information within is as follows:
|
||||
# - Map ID on which this encounter can occur.
|
||||
# - Probability that this encounter will occur (as a percentage).
|
||||
# - Species.
|
||||
# - Minimum possible level.
|
||||
# - Maximum possible level (optional).
|
||||
POKE_RADAR_ENCOUNTERS = [
|
||||
[5, 20, :STARLY, 12, 15],
|
||||
[21, 10, :STANTLER, 14],
|
||||
[28, 20, :BUTTERFREE, 15, 18],
|
||||
[28, 20, :BEEDRILL, 15, 18]
|
||||
]
|
||||
|
||||
#===============================================================================
|
||||
|
||||
# The Game Switch that is set to ON when the player blacks out.
|
||||
STARTING_OVER_SWITCH = 1
|
||||
# The Game Switch that is set to ON when the player has seen Pokérus in the Poké
|
||||
# Center, and doesn't need to be told about it again.
|
||||
SEEN_POKERUS_SWITCH = 2
|
||||
# The Game Switch which, while ON, makes all wild Pokémon created be shiny.
|
||||
SHINY_WILD_POKEMON_SWITCH = 31
|
||||
# The Game Switch which, while ON, makes all Pokémon created considered to be
|
||||
# met via a fateful encounter.
|
||||
FATEFUL_ENCOUNTER_SWITCH = 32
|
||||
|
||||
#===============================================================================
|
||||
|
||||
# ID of the animation played when the player steps on grass (grass rustling).
|
||||
GRASS_ANIMATION_ID = 1
|
||||
# ID of the animation played when the player lands on the ground after hopping
|
||||
# over a ledge (shows a dust impact).
|
||||
DUST_ANIMATION_ID = 2
|
||||
# ID of the animation played when a trainer notices the player (an exclamation
|
||||
# bubble).
|
||||
EXCLAMATION_ANIMATION_ID = 3
|
||||
# ID of the animation played when a patch of grass rustles due to using the Poké
|
||||
# Radar.
|
||||
RUSTLE_NORMAL_ANIMATION_ID = 1
|
||||
# ID of the animation played when a patch of grass rustles vigorously due to
|
||||
# using the Poké Radar. (Rarer species)
|
||||
RUSTLE_VIGOROUS_ANIMATION_ID = 5
|
||||
# ID of the animation played when a patch of grass rustles and shines due to
|
||||
# using the Poké Radar. (Shiny encounter)
|
||||
RUSTLE_SHINY_ANIMATION_ID = 6
|
||||
# ID of the animation played when a berry tree grows a stage while the player is
|
||||
# on the map (for new plant growth mechanics only).
|
||||
PLANT_SPARKLE_ANIMATION_ID = 7
|
||||
|
||||
#===============================================================================
|
||||
|
||||
# An array of available languages in the game, and their corresponding message
|
||||
# file in the Data folder. Edit only if you have 2 or more languages to choose
|
||||
# from.
|
||||
LANGUAGES = [
|
||||
# ["English", "english.dat"],
|
||||
# ["Deutsch", "deutsch.dat"]
|
||||
]
|
||||
|
||||
#===============================================================================
|
||||
|
||||
# Available speech frames. These are graphic files in "Graphics/Windowskins/".
|
||||
$SpeechFrames = [
|
||||
"speech hgss 1",
|
||||
"speech hgss 2",
|
||||
"speech hgss 3",
|
||||
"speech hgss 4",
|
||||
"speech hgss 5",
|
||||
"speech hgss 6",
|
||||
"speech hgss 7",
|
||||
"speech hgss 8",
|
||||
"speech hgss 9",
|
||||
"speech hgss 10",
|
||||
"speech hgss 11",
|
||||
"speech hgss 12",
|
||||
"speech hgss 13",
|
||||
"speech hgss 14",
|
||||
"speech hgss 15",
|
||||
"speech hgss 16",
|
||||
"speech hgss 17",
|
||||
"speech hgss 18",
|
||||
"speech hgss 19",
|
||||
"speech hgss 20",
|
||||
"speech pl 18"
|
||||
]
|
||||
|
||||
# Available menu frames. These are graphic files in "Graphics/Windowskins/".
|
||||
$TextFrames = [
|
||||
"choice 1",
|
||||
"choice 2",
|
||||
"choice 3",
|
||||
"choice 4",
|
||||
"choice 5",
|
||||
"choice 6",
|
||||
"choice 7",
|
||||
"choice 8",
|
||||
"choice 9",
|
||||
"choice 10",
|
||||
"choice 11",
|
||||
"choice 12",
|
||||
"choice 13",
|
||||
"choice 14",
|
||||
"choice 15",
|
||||
"choice 16",
|
||||
"choice 17",
|
||||
"choice 18",
|
||||
"choice 19",
|
||||
"choice 20",
|
||||
"choice 21",
|
||||
"choice 22",
|
||||
"choice 23",
|
||||
"choice 24",
|
||||
"choice 25",
|
||||
"choice 26",
|
||||
"choice 27",
|
||||
"choice 28"
|
||||
]
|
||||
|
||||
# Available fonts. Each one needs to be in its own array.
|
||||
$VersionStyles = [
|
||||
["Power Green"],
|
||||
["Power Red and Blue"],
|
||||
["Power Red and Green"],
|
||||
["Power Clear"]
|
||||
]
|
||||
|
||||
@@ -19,7 +19,7 @@ end
|
||||
|
||||
def pbSetResizeFactor(factor)
|
||||
if !$ResizeInitialized
|
||||
Graphics.resize_screen(SCREEN_WIDTH, SCREEN_HEIGHT)
|
||||
Graphics.resize_screen(Settings::SCREEN_WIDTH, Settings::SCREEN_HEIGHT)
|
||||
$ResizeInitialized = true
|
||||
end
|
||||
if factor < 0 || factor == 4
|
||||
|
||||
@@ -1,76 +1,78 @@
|
||||
# Whether a move's physical/special category depends on the move itself as in
|
||||
# newer Gens (true), or on its type as in older Gens (false).
|
||||
MOVE_CATEGORY_PER_MOVE = (MECHANICS_GENERATION >= 4)
|
||||
# Whether turn order is recalculated after a Pokémon Mega Evolves.
|
||||
RECALCULATE_TURN_ORDER_AFTER_MEGA_EVOLUTION = (MECHANICS_GENERATION >= 7)
|
||||
# Whether turn order is recalculated after a Pokémon's Speed stat changes.
|
||||
RECALCULATE_TURN_ORDER_AFTER_SPEED_CHANGES = (MECHANICS_GENERATION >= 8)
|
||||
# Whether critical hits do 1.5x damage and have 4 stages (true), or they do 2x
|
||||
# damage and have 5 stages as in Gen 5 (false). Also determines whether critical
|
||||
# hit rate can be copied by Transform/Psych Up.
|
||||
NEW_CRITICAL_HIT_RATE_MECHANICS = (MECHANICS_GENERATION >= 6)
|
||||
# Whether several effects apply relating to a Pokémon's type:
|
||||
# * Electric-type immunity to paralysis
|
||||
# * Ghost-type immunity to being trapped
|
||||
# * Grass-type immunity to powder moves and Effect Spore
|
||||
# * Poison-type Pokémon can't miss when using Toxic
|
||||
MORE_TYPE_EFFECTS = (MECHANICS_GENERATION >= 6)
|
||||
# Whether weather caused by an ability lasts 5 rounds (true) or forever (false).
|
||||
FIXED_DURATION_WEATHER_FROM_ABILITY = (MECHANICS_GENERATION >= 6)
|
||||
module Settings
|
||||
# Whether a move's physical/special category depends on the move itself as in
|
||||
# newer Gens (true), or on its type as in older Gens (false).
|
||||
MOVE_CATEGORY_PER_MOVE = (MECHANICS_GENERATION >= 4)
|
||||
# Whether turn order is recalculated after a Pokémon Mega Evolves.
|
||||
RECALCULATE_TURN_ORDER_AFTER_MEGA_EVOLUTION = (MECHANICS_GENERATION >= 7)
|
||||
# Whether turn order is recalculated after a Pokémon's Speed stat changes.
|
||||
RECALCULATE_TURN_ORDER_AFTER_SPEED_CHANGES = (MECHANICS_GENERATION >= 8)
|
||||
# Whether critical hits do 1.5x damage and have 4 stages (true), or they do 2x
|
||||
# damage and have 5 stages as in Gen 5 (false). Also determines whether critical
|
||||
# hit rate can be copied by Transform/Psych Up.
|
||||
NEW_CRITICAL_HIT_RATE_MECHANICS = (MECHANICS_GENERATION >= 6)
|
||||
# Whether several effects apply relating to a Pokémon's type:
|
||||
# * Electric-type immunity to paralysis
|
||||
# * Ghost-type immunity to being trapped
|
||||
# * Grass-type immunity to powder moves and Effect Spore
|
||||
# * Poison-type Pokémon can't miss when using Toxic
|
||||
MORE_TYPE_EFFECTS = (MECHANICS_GENERATION >= 6)
|
||||
# Whether weather caused by an ability lasts 5 rounds (true) or forever (false).
|
||||
FIXED_DURATION_WEATHER_FROM_ABILITY = (MECHANICS_GENERATION >= 6)
|
||||
|
||||
#===============================================================================
|
||||
#===============================================================================
|
||||
|
||||
# Whether X items (X Attack, etc.) raise their stat by 2 stages (true) or 1
|
||||
# (false).
|
||||
X_STAT_ITEMS_RAISE_BY_TWO_STAGES = (MECHANICS_GENERATION >= 7)
|
||||
# Whether some Poké Balls have catch rate multipliers from Gen 7 (true) or from
|
||||
# earlier generations (false).
|
||||
NEW_POKE_BALL_CATCH_RATES = (MECHANICS_GENERATION >= 7)
|
||||
# Whether Soul Dew powers up Psychic and Dragon-type moves by 20% (true) or
|
||||
# raises the holder's Special Attack and Special Defense by 50% (false).
|
||||
SOUL_DEW_POWERS_UP_TYPES = (MECHANICS_GENERATION >= 7)
|
||||
# Whether X items (X Attack, etc.) raise their stat by 2 stages (true) or 1
|
||||
# (false).
|
||||
X_STAT_ITEMS_RAISE_BY_TWO_STAGES = (MECHANICS_GENERATION >= 7)
|
||||
# Whether some Poké Balls have catch rate multipliers from Gen 7 (true) or from
|
||||
# earlier generations (false).
|
||||
NEW_POKE_BALL_CATCH_RATES = (MECHANICS_GENERATION >= 7)
|
||||
# Whether Soul Dew powers up Psychic and Dragon-type moves by 20% (true) or
|
||||
# raises the holder's Special Attack and Special Defense by 50% (false).
|
||||
SOUL_DEW_POWERS_UP_TYPES = (MECHANICS_GENERATION >= 7)
|
||||
|
||||
#===============================================================================
|
||||
#===============================================================================
|
||||
|
||||
# The minimum number of badges required to boost each stat of a player's
|
||||
# Pokémon by 1.1x, in battle only.
|
||||
NUM_BADGES_BOOST_ATTACK = (MECHANICS_GENERATION >= 4) ? 999 : 1
|
||||
NUM_BADGES_BOOST_DEFENSE = (MECHANICS_GENERATION >= 4) ? 999 : 5
|
||||
NUM_BADGES_BOOST_SPATK = (MECHANICS_GENERATION >= 4) ? 999 : 7
|
||||
NUM_BADGES_BOOST_SPDEF = (MECHANICS_GENERATION >= 4) ? 999 : 7
|
||||
NUM_BADGES_BOOST_SPEED = (MECHANICS_GENERATION >= 4) ? 999 : 3
|
||||
# The minimum number of badges required to boost each stat of a player's
|
||||
# Pokémon by 1.1x, in battle only.
|
||||
NUM_BADGES_BOOST_ATTACK = (MECHANICS_GENERATION >= 4) ? 999 : 1
|
||||
NUM_BADGES_BOOST_DEFENSE = (MECHANICS_GENERATION >= 4) ? 999 : 5
|
||||
NUM_BADGES_BOOST_SPATK = (MECHANICS_GENERATION >= 4) ? 999 : 7
|
||||
NUM_BADGES_BOOST_SPDEF = (MECHANICS_GENERATION >= 4) ? 999 : 7
|
||||
NUM_BADGES_BOOST_SPEED = (MECHANICS_GENERATION >= 4) ? 999 : 3
|
||||
|
||||
#===============================================================================
|
||||
#===============================================================================
|
||||
|
||||
# An array of items which act as Mega Rings for the player (NPCs don't need a
|
||||
# Mega Ring item, just a Mega Stone held by their Pokémon).
|
||||
MEGA_RINGS = [:MEGARING, :MEGABRACELET, :MEGACUFF, :MEGACHARM]
|
||||
# The Game Switch which, while ON, prevents all Pokémon in battle from Mega
|
||||
# Evolving even if they otherwise could.
|
||||
NO_MEGA_EVOLUTION = 34
|
||||
# An array of items which act as Mega Rings for the player (NPCs don't need a
|
||||
# Mega Ring item, just a Mega Stone held by their Pokémon).
|
||||
MEGA_RINGS = [:MEGARING, :MEGABRACELET, :MEGACUFF, :MEGACHARM]
|
||||
# The Game Switch which, while ON, prevents all Pokémon in battle from Mega
|
||||
# Evolving even if they otherwise could.
|
||||
NO_MEGA_EVOLUTION = 34
|
||||
|
||||
#===============================================================================
|
||||
#===============================================================================
|
||||
|
||||
# Whether the Exp gained from beating a Pokémon should be scaled depending on
|
||||
# the gainer's level.
|
||||
SCALED_EXP_FORMULA = (MECHANICS_GENERATION >= 5 && MECHANICS_GENERATION != 6)
|
||||
# Whether the Exp gained from beating a Pokémon should be divided equally
|
||||
# between each participant (true), or whether each participant should gain that
|
||||
# much Exp (false). This also applies to Exp gained via the Exp Share (held item
|
||||
# version) being distributed to all Exp Share holders.
|
||||
SPLIT_EXP_BETWEEN_GAINERS = (MECHANICS_GENERATION <= 5)
|
||||
# Whether the critical capture mechanic applies. Note that it is based on a
|
||||
# total of 600+ species (i.e. that many species need to be caught to provide the
|
||||
# greatest critical capture chance of 2.5x), and there may be fewer species in
|
||||
# your game.
|
||||
ENABLE_CRITICAL_CAPTURES = (MECHANICS_GENERATION >= 5)
|
||||
# Whether Pokémon gain Exp for capturing a Pokémon.
|
||||
GAIN_EXP_FOR_CAPTURE = (MECHANICS_GENERATION >= 6)
|
||||
# The Game Switch which determines whether the player will lose money if they
|
||||
# lose a battle (they can still gain money from trainers for winning).
|
||||
NO_MONEY_LOSS = 33
|
||||
# Whether party Pokémon check whether they can evolve after all battles
|
||||
# regardless of the outcome (true) or only after battles the player won (false).
|
||||
CHECK_EVOLUTION_AFTER_ALL_BATTLES = (MECHANICS_GENERATION >= 6)
|
||||
# Whether fainted Pokémon can try to evolve after a battle.
|
||||
CHECK_EVOLUTION_FOR_FAINTED_POKEMON = (MECHANICS_GENERATION >= 6)
|
||||
# Whether the Exp gained from beating a Pokémon should be scaled depending on
|
||||
# the gainer's level.
|
||||
SCALED_EXP_FORMULA = (MECHANICS_GENERATION == 5 || MECHANICS_GENERATION >= 7)
|
||||
# Whether the Exp gained from beating a Pokémon should be divided equally
|
||||
# between each participant (true), or whether each participant should gain that
|
||||
# much Exp (false). This also applies to Exp gained via the Exp Share (held item
|
||||
# version) being distributed to all Exp Share holders.
|
||||
SPLIT_EXP_BETWEEN_GAINERS = (MECHANICS_GENERATION <= 5)
|
||||
# Whether the critical capture mechanic applies. Note that it is based on a
|
||||
# total of 600+ species (i.e. that many species need to be caught to provide the
|
||||
# greatest critical capture chance of 2.5x), and there may be fewer species in
|
||||
# your game.
|
||||
ENABLE_CRITICAL_CAPTURES = (MECHANICS_GENERATION >= 5)
|
||||
# Whether Pokémon gain Exp for capturing a Pokémon.
|
||||
GAIN_EXP_FOR_CAPTURE = (MECHANICS_GENERATION >= 6)
|
||||
# The Game Switch which, whie ON, prevents the player from losing money if they
|
||||
# lose a battle (they can still gain money from trainers for winning).
|
||||
NO_MONEY_LOSS = 33
|
||||
# Whether party Pokémon check whether they can evolve after all battles
|
||||
# regardless of the outcome (true) or only after battles the player won (false).
|
||||
CHECK_EVOLUTION_AFTER_ALL_BATTLES = (MECHANICS_GENERATION >= 6)
|
||||
# Whether fainted Pokémon can try to evolve after a battle.
|
||||
CHECK_EVOLUTION_FOR_FAINTED_POKEMON = (MECHANICS_GENERATION >= 6)
|
||||
end
|
||||
|
||||
@@ -74,7 +74,7 @@ class Sprite_Reflection
|
||||
if @height>0
|
||||
@sprite.color = Color.new(48,96,160,255) # Dark still water
|
||||
@sprite.opacity = @rsprite.opacity
|
||||
@sprite.visible = !TIME_SHADING # Can't time-tone a colored sprite
|
||||
@sprite.visible = !Settings::TIME_SHADING # Can't time-tone a colored sprite
|
||||
else
|
||||
@sprite.color = Color.new(224,224,224,96)
|
||||
@sprite.opacity = @rsprite.opacity*3/4
|
||||
|
||||
@@ -33,11 +33,11 @@ end
|
||||
class Spriteset_Map
|
||||
attr_reader :map
|
||||
attr_accessor :tilemap
|
||||
@@viewport0 = Viewport.new(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT) # Panorama
|
||||
@@viewport0 = Viewport.new(0, 0, Settings::SCREEN_WIDTH, Settings::SCREEN_HEIGHT) # Panorama
|
||||
@@viewport0.z = -100
|
||||
@@viewport1 = Viewport.new(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT) # Map, events, player, fog
|
||||
@@viewport1 = Viewport.new(0, 0, Settings::SCREEN_WIDTH, Settings::SCREEN_HEIGHT) # Map, events, player, fog
|
||||
@@viewport1.z = 0
|
||||
@@viewport3 = Viewport.new(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT) # Flashing
|
||||
@@viewport3 = Viewport.new(0, 0, Settings::SCREEN_WIDTH, Settings::SCREEN_HEIGHT) # Flashing
|
||||
@@viewport3.z = 500
|
||||
|
||||
def Spriteset_Map.viewport # For access by Spriteset_Global
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
class Spriteset_Global
|
||||
attr_reader :playersprite
|
||||
@@viewport2 = Viewport.new(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)
|
||||
@@viewport2 = Viewport.new(0, 0, Settings::SCREEN_WIDTH, Settings::SCREEN_HEIGHT)
|
||||
@@viewport2.z = 200
|
||||
|
||||
def initialize
|
||||
|
||||
@@ -572,10 +572,10 @@ class Interpreter
|
||||
# * Change Windowskin
|
||||
#-----------------------------------------------------------------------------
|
||||
def command_131
|
||||
for i in 0...$SpeechFrames.length
|
||||
next if $SpeechFrames[i] != @parameters[0]
|
||||
for i in 0...Settings::SPEECH_WINDOWSKINS.length
|
||||
next if Settings::SPEECH_WINDOWSKINS[i] != @parameters[0]
|
||||
$PokemonSystem.textskin = i
|
||||
MessageConfig.pbSetSpeechFrame("Graphics/Windowskins/" + $SpeechFrames[i])
|
||||
MessageConfig.pbSetSpeechFrame("Graphics/Windowskins/" + Settings::SPEECH_WINDOWSKINS[i])
|
||||
return true
|
||||
end
|
||||
return true
|
||||
|
||||
@@ -41,25 +41,25 @@ module MessageConfig
|
||||
|
||||
def self.pbDefaultSystemFrame
|
||||
begin
|
||||
return pbResolveBitmap("Graphics/Windowskins/" + $TextFrames[$PokemonSystem.frame]) || ""
|
||||
return pbResolveBitmap("Graphics/Windowskins/" + Settings::MENU_WINDOWSKINS[$PokemonSystem.frame]) || ""
|
||||
rescue
|
||||
return pbResolveBitmap("Graphics/Windowskins/" + $TextFrames[0]) || ""
|
||||
return pbResolveBitmap("Graphics/Windowskins/" + Settings::MENU_WINDOWSKINS[0]) || ""
|
||||
end
|
||||
end
|
||||
|
||||
def self.pbDefaultSpeechFrame
|
||||
begin
|
||||
return pbResolveBitmap("Graphics/Windowskins/" + $SpeechFrames[$PokemonSystem.textskin]) || ""
|
||||
return pbResolveBitmap("Graphics/Windowskins/" + Settings::SPEECH_WINDOWSKINS[$PokemonSystem.textskin]) || ""
|
||||
rescue
|
||||
return pbResolveBitmap("Graphics/Windowskins/" + $SpeechFrames[0]) || ""
|
||||
return pbResolveBitmap("Graphics/Windowskins/" + Settings::SPEECH_WINDOWSKINS[0]) || ""
|
||||
end
|
||||
end
|
||||
|
||||
def self.pbDefaultSystemFontName
|
||||
begin
|
||||
return MessageConfig.pbTryFonts($VersionStyles[$PokemonSystem.font][0], "Arial Narrow", "Arial")
|
||||
return MessageConfig.pbTryFonts(Settings::FONT_OPTIONS[$PokemonSystem.font], "Arial Narrow", "Arial")
|
||||
rescue
|
||||
return MessageConfig.pbTryFonts($VersionStyles[0], "Arial Narrow", "Arial")
|
||||
return MessageConfig.pbTryFonts(Settings::FONT_OPTIONS[0], "Arial Narrow", "Arial")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -123,7 +123,7 @@ module MessageConfig
|
||||
end
|
||||
|
||||
def self.pbSetSystemFontName(value)
|
||||
@@systemFont=MessageConfig.pbTryFonts(value,"Arial Narrow","Arial")
|
||||
@@systemFont=MessageConfig.pbTryFonts([value],"Arial Narrow","Arial")
|
||||
end
|
||||
|
||||
def self.pbSetTextSpeed(value)
|
||||
|
||||
@@ -50,13 +50,13 @@ module GameData
|
||||
|
||||
def physical?
|
||||
return false if @base_damage == 0
|
||||
return @category == 0 if MOVE_CATEGORY_PER_MOVE
|
||||
return @category == 0 if Settings::MOVE_CATEGORY_PER_MOVE
|
||||
return GameData::Type.get(@type).physical?
|
||||
end
|
||||
|
||||
def special?
|
||||
return false if @base_damage == 0
|
||||
return @category == 1 if MOVE_CATEGORY_PER_MOVE
|
||||
return @category == 1 if Settings::MOVE_CATEGORY_PER_MOVE
|
||||
return GameData::Type.get(@type).special?
|
||||
end
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ module GameData
|
||||
def to_trainer
|
||||
# Determine trainer's name
|
||||
tr_name = self.name
|
||||
RIVAL_NAMES.each do |rival|
|
||||
Settings::RIVAL_NAMES.each do |rival|
|
||||
next if rival[0] != @trainer_type || !$game_variables[rival[1]].is_a?(String)
|
||||
tr_name = $game_variables[rival[1]]
|
||||
break
|
||||
|
||||
@@ -92,7 +92,7 @@ module PBExperience
|
||||
# player's data) is loaded, so make sure they exist before using them, and
|
||||
# make this method return the most maximum ever level if they don't.
|
||||
def self.maxLevel
|
||||
return MAXIMUM_LEVEL
|
||||
return Settings::MAXIMUM_LEVEL
|
||||
end
|
||||
|
||||
# Erratic (600000):
|
||||
|
||||
@@ -255,11 +255,11 @@ class PokeBattle_Battler
|
||||
speedMult /= 2 if pbOwnSide.effects[PBEffects::Swamp]>0
|
||||
# Paralysis
|
||||
if status==PBStatuses::PARALYSIS && !hasActiveAbility?(:QUICKFEET)
|
||||
speedMult /= (MECHANICS_GENERATION >= 7) ? 2 : 4
|
||||
speedMult /= (Settings::MECHANICS_GENERATION >= 7) ? 2 : 4
|
||||
end
|
||||
# Badge multiplier
|
||||
if @battle.internalBattle && pbOwnedByPlayer? &&
|
||||
@battle.pbPlayer.badge_count >= NUM_BADGES_BOOST_SPEED
|
||||
@battle.pbPlayer.badge_count >= Settings::NUM_BADGES_BOOST_SPEED
|
||||
speedMult *= 1.1
|
||||
end
|
||||
# Calculation
|
||||
@@ -524,11 +524,11 @@ class PokeBattle_Battler
|
||||
|
||||
def affectedByPowder?(showMsg=false)
|
||||
return false if fainted?
|
||||
if pbHasType?(:GRASS) && MORE_TYPE_EFFECTS
|
||||
if pbHasType?(:GRASS) && Settings::MORE_TYPE_EFFECTS
|
||||
@battle.pbDisplay(_INTL("{1} is unaffected!",pbThis)) if showMsg
|
||||
return false
|
||||
end
|
||||
if MECHANICS_GENERATION >= 6
|
||||
if Settings::MECHANICS_GENERATION >= 6
|
||||
if hasActiveAbility?(:OVERCOAT) && !@battle.moldBreaker
|
||||
if showMsg
|
||||
@battle.pbShowAbilitySplash(self)
|
||||
|
||||
@@ -137,7 +137,7 @@ class PokeBattle_Battler
|
||||
self.form = newForm
|
||||
pbUpdate(true)
|
||||
@hp = @totalhp-oldDmg
|
||||
@effects[PBEffects::WeightChange] = 0 if MECHANICS_GENERATION >= 6
|
||||
@effects[PBEffects::WeightChange] = 0 if Settings::MECHANICS_GENERATION >= 6
|
||||
@battle.scene.pbChangePokemon(self,@pokemon)
|
||||
@battle.scene.pbRefreshOne(@index)
|
||||
@battle.pbDisplay(msg) if msg && msg!=""
|
||||
@@ -275,7 +275,7 @@ class PokeBattle_Battler
|
||||
@spdef = target.spdef
|
||||
@speed = target.speed
|
||||
PBStats.eachBattleStat { |s| @stages[s] = target.stages[s] }
|
||||
if NEW_CRITICAL_HIT_RATE_MECHANICS
|
||||
if Settings::NEW_CRITICAL_HIT_RATE_MECHANICS
|
||||
@effects[PBEffects::FocusEnergy] = target.effects[PBEffects::FocusEnergy]
|
||||
@effects[PBEffects::LaserFocus] = target.effects[PBEffects::LaserFocus]
|
||||
end
|
||||
|
||||
@@ -93,7 +93,7 @@ class PokeBattle_Battler
|
||||
when PBStatuses::BURN
|
||||
hasImmuneType |= pbHasType?(:FIRE)
|
||||
when PBStatuses::PARALYSIS
|
||||
hasImmuneType |= pbHasType?(:ELECTRIC) && MORE_TYPE_EFFECTS
|
||||
hasImmuneType |= pbHasType?(:ELECTRIC) && Settings::MORE_TYPE_EFFECTS
|
||||
when PBStatuses::FROZEN
|
||||
hasImmuneType |= pbHasType?(:ICE)
|
||||
end
|
||||
@@ -189,7 +189,7 @@ class PokeBattle_Battler
|
||||
when PBStatuses::BURN
|
||||
hasImmuneType |= pbHasType?(:FIRE)
|
||||
when PBStatuses::PARALYSIS
|
||||
hasImmuneType |= pbHasType?(:ELECTRIC) && MORE_TYPE_EFFECTS
|
||||
hasImmuneType |= pbHasType?(:ELECTRIC) && Settings::MORE_TYPE_EFFECTS
|
||||
end
|
||||
return false if hasImmuneType
|
||||
# Ability immunity
|
||||
|
||||
@@ -61,7 +61,7 @@ class PokeBattle_Battler
|
||||
}
|
||||
@battle.pbJudge
|
||||
# Update priority order
|
||||
@battle.pbCalculatePriority if RECALCULATE_TURN_ORDER_AFTER_SPEED_CHANGES
|
||||
@battle.pbCalculatePriority if Settings::RECALCULATE_TURN_ORDER_AFTER_SPEED_CHANGES
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
@@ -253,7 +253,7 @@ class PokeBattle_Battler
|
||||
else
|
||||
@battle.pbCommonAnimation("Confusion",self)
|
||||
@battle.pbDisplay(_INTL("{1} is confused!",pbThis))
|
||||
threshold = (MECHANICS_GENERATION >= 7) ? 33 : 50 # % chance
|
||||
threshold = (Settings::MECHANICS_GENERATION >= 7) ? 33 : 50 # % chance
|
||||
if @battle.pbRandom(100)<threshold
|
||||
pbConfusionDamage(_INTL("It hurt itself in its confusion!"))
|
||||
@lastMoveFailed = true
|
||||
@@ -313,7 +313,7 @@ class PokeBattle_Battler
|
||||
# Wide Guard
|
||||
if target.pbOwnSide.effects[PBEffects::WideGuard] && user.index!=target.index &&
|
||||
PBTargets.multipleTargets?(move.pbTarget(user)) &&
|
||||
(MECHANICS_GENERATION >= 7 || move.damagingMove?)
|
||||
(Settings::MECHANICS_GENERATION >= 7 || move.damagingMove?)
|
||||
@battle.pbCommonAnimation("WideGuard",target)
|
||||
@battle.pbDisplay(_INTL("Wide Guard protected {1}!",target.pbThis(true)))
|
||||
target.damageState.protected = true
|
||||
@@ -408,7 +408,7 @@ class PokeBattle_Battler
|
||||
return false
|
||||
end
|
||||
# Dark-type immunity to moves made faster by Prankster
|
||||
if MECHANICS_GENERATION >= 7 && user.effects[PBEffects::Prankster] &&
|
||||
if Settings::MECHANICS_GENERATION >= 7 && user.effects[PBEffects::Prankster] &&
|
||||
target.pbHasType?(:DARK) && target.opposes?(user)
|
||||
PBDebug.log("[Target immune] #{target.pbThis} is Dark-type and immune to Prankster-boosted moves")
|
||||
@battle.pbDisplay(_INTL("It doesn't affect {1}...",target.pbThis(true)))
|
||||
@@ -442,12 +442,12 @@ class PokeBattle_Battler
|
||||
end
|
||||
# Immunity to powder-based moves
|
||||
if move.powderMove?
|
||||
if target.pbHasType?(:GRASS) && MORE_TYPE_EFFECTS
|
||||
if target.pbHasType?(:GRASS) && Settings::MORE_TYPE_EFFECTS
|
||||
PBDebug.log("[Target immune] #{target.pbThis} is Grass-type and immune to powder-based moves")
|
||||
@battle.pbDisplay(_INTL("It doesn't affect {1}...",target.pbThis(true)))
|
||||
return false
|
||||
end
|
||||
if MECHANICS_GENERATION >= 6
|
||||
if Settings::MECHANICS_GENERATION >= 6
|
||||
if target.hasActiveAbility?(:OVERCOAT) && !@battle.moldBreaker
|
||||
@battle.pbShowAbilitySplash(target)
|
||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
||||
|
||||
@@ -72,7 +72,7 @@ class PokeBattle_Battler
|
||||
next if b.status!=PBStatuses::FROZEN
|
||||
# NOTE: Non-Fire-type moves that thaw the user will also thaw the
|
||||
# target (in Gen 6+).
|
||||
if move.calcType == :FIRE || (MECHANICS_GENERATION >= 6 && move.thawsUser?)
|
||||
if move.calcType == :FIRE || (Settings::MECHANICS_GENERATION >= 6 && move.thawsUser?)
|
||||
b.pbCureStatus
|
||||
end
|
||||
end
|
||||
|
||||
@@ -71,7 +71,7 @@ class PokeBattle_Move
|
||||
# NOTE: This method is only ever called while using a move (and also by the
|
||||
# AI), so using @calcType here is acceptable.
|
||||
def physicalMove?(thisType=nil)
|
||||
return (@category==0) if MOVE_CATEGORY_PER_MOVE
|
||||
return (@category==0) if Settings::MOVE_CATEGORY_PER_MOVE
|
||||
thisType ||= @calcType
|
||||
thisType ||= @type
|
||||
return true if !thisType
|
||||
@@ -81,7 +81,7 @@ class PokeBattle_Move
|
||||
# NOTE: This method is only ever called while using a move (and also by the
|
||||
# AI), so using @calcType here is acceptable.
|
||||
def specialMove?(thisType=nil)
|
||||
return (@category==1) if MOVE_CATEGORY_PER_MOVE
|
||||
return (@category==1) if Settings::MOVE_CATEGORY_PER_MOVE
|
||||
thisType ||= @calcType
|
||||
thisType ||= @type
|
||||
return false if !thisType
|
||||
@@ -132,7 +132,7 @@ class PokeBattle_Move
|
||||
def nonLethal?(_user,_target); return false; end # For False Swipe
|
||||
|
||||
def ignoresSubstitute?(user) # user is the Pokémon using this move
|
||||
if MECHANICS_GENERATION >= 6
|
||||
if Settings::MECHANICS_GENERATION >= 6
|
||||
return true if soundMove?
|
||||
return true if user && user.hasActiveAbility?(:INFILTRATOR)
|
||||
end
|
||||
|
||||
@@ -161,7 +161,7 @@ class PokeBattle_Move
|
||||
def pbIsCritical?(user,target)
|
||||
return false if target.pbOwnSide.effects[PBEffects::LuckyChant]>0
|
||||
# Set up the critical hit ratios
|
||||
ratios = (NEW_CRITICAL_HIT_RATE_MECHANICS) ? [24,8,2,1] : [16,8,4,3,2]
|
||||
ratios = (Settings::NEW_CRITICAL_HIT_RATE_MECHANICS) ? [24,8,2,1] : [16,8,4,3,2]
|
||||
c = 0
|
||||
# Ability effects that alter critical hit rate
|
||||
if c>=0 && user.abilityActive?
|
||||
@@ -357,16 +357,16 @@ class PokeBattle_Move
|
||||
# Badge multipliers
|
||||
if @battle.internalBattle
|
||||
if user.pbOwnedByPlayer?
|
||||
if physicalMove? && @battle.pbPlayer.badge_count >= NUM_BADGES_BOOST_ATTACK
|
||||
if physicalMove? && @battle.pbPlayer.badge_count >= Settings::NUM_BADGES_BOOST_ATTACK
|
||||
multipliers[:attack_multiplier] *= 1.1
|
||||
elsif specialMove? && @battle.pbPlayer.badge_count >= NUM_BADGES_BOOST_SPATK
|
||||
elsif specialMove? && @battle.pbPlayer.badge_count >= Settings::NUM_BADGES_BOOST_SPATK
|
||||
multipliers[:attack_multiplier] *= 1.1
|
||||
end
|
||||
end
|
||||
if target.pbOwnedByPlayer?
|
||||
if physicalMove? && @battle.pbPlayer.badge_count >= NUM_BADGES_BOOST_DEFENSE
|
||||
if physicalMove? && @battle.pbPlayer.badge_count >= Settings::NUM_BADGES_BOOST_DEFENSE
|
||||
multipliers[:defense_multiplier] *= 1.1
|
||||
elsif specialMove? && @battle.pbPlayer.badge_count >= NUM_BADGES_BOOST_SPDEF
|
||||
elsif specialMove? && @battle.pbPlayer.badge_count >= Settings::NUM_BADGES_BOOST_SPDEF
|
||||
multipliers[:defense_multiplier] *= 1.1
|
||||
end
|
||||
end
|
||||
@@ -396,7 +396,7 @@ class PokeBattle_Move
|
||||
end
|
||||
# Critical hits
|
||||
if target.damageState.critical
|
||||
if NEW_CRITICAL_HIT_RATE_MECHANICS
|
||||
if Settings::NEW_CRITICAL_HIT_RATE_MECHANICS
|
||||
multipliers[:final_damage_multiplier] *= 1.5
|
||||
else
|
||||
multipliers[:final_damage_multiplier] *= 2
|
||||
@@ -461,7 +461,7 @@ class PokeBattle_Move
|
||||
def pbAdditionalEffectChance(user,target,effectChance=0)
|
||||
return 0 if target.hasActiveAbility?(:SHIELDDUST) && !@battle.moldBreaker
|
||||
ret = (effectChance>0) ? effectChance : @addlEffect
|
||||
if MECHANICS_GENERATION >= 6 || @function != "0A4" # Secret Power
|
||||
if Settings::MECHANICS_GENERATION >= 6 || @function != "0A4" # Secret Power
|
||||
ret *= 2 if user.hasActiveAbility?(:SERENEGRACE) ||
|
||||
user.pbOwnSide.effects[PBEffects::Rainbow]>0
|
||||
end
|
||||
|
||||
@@ -555,7 +555,7 @@ class PokeBattle_ProtectMove < PokeBattle_Move
|
||||
@battle.pbDisplay(_INTL("But it failed!"))
|
||||
return true
|
||||
end
|
||||
if (!@sidedEffect || MECHANICS_GENERATION <= 5) &&
|
||||
if (!@sidedEffect || Settings::MECHANICS_GENERATION <= 5) &&
|
||||
user.effects[PBEffects::ProtectRate]>1 &&
|
||||
@battle.pbRandom(user.effects[PBEffects::ProtectRate])!=0
|
||||
user.effects[PBEffects::ProtectRate] = 1
|
||||
@@ -575,7 +575,7 @@ class PokeBattle_ProtectMove < PokeBattle_Move
|
||||
else
|
||||
user.effects[@effect] = true
|
||||
end
|
||||
user.effects[PBEffects::ProtectRate] *= (MECHANICS_GENERATION >= 6) ? 3 : 2
|
||||
user.effects[PBEffects::ProtectRate] *= (Settings::MECHANICS_GENERATION >= 6) ? 3 : 2
|
||||
pbProtectMessage(user)
|
||||
end
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ end
|
||||
#===============================================================================
|
||||
class PokeBattle_Move_003 < PokeBattle_SleepMove
|
||||
def pbMoveFailed?(user,targets)
|
||||
if MECHANICS_GENERATION >= 7 && @id == :DARKVOID
|
||||
if Settings::MECHANICS_GENERATION >= 7 && @id == :DARKVOID
|
||||
if !user.isSpecies?(:DARKRAI) && user.effects[PBEffects::TransformSpecies] != :DARKRAI
|
||||
@battle.pbDisplay(_INTL("But {1} can't use the move!",user.pbThis))
|
||||
return true
|
||||
@@ -93,7 +93,7 @@ class PokeBattle_Move_006 < PokeBattle_PoisonMove
|
||||
end
|
||||
|
||||
def pbOverrideSuccessCheckPerHit(user,target)
|
||||
return (MORE_TYPE_EFFECTS && statusMove? && user.pbHasType?(:POISON))
|
||||
return (Settings::MORE_TYPE_EFFECTS && statusMove? && user.pbHasType?(:POISON))
|
||||
end
|
||||
end
|
||||
|
||||
@@ -107,7 +107,7 @@ end
|
||||
class PokeBattle_Move_007 < PokeBattle_ParalysisMove
|
||||
def tramplesMinimize?(param=1)
|
||||
# Perfect accuracy and double damage (for Body Slam only)
|
||||
return MECHANICS_GENERATION >= 6 if @id == :BODYSLAM
|
||||
return Settings::MECHANICS_GENERATION >= 6 if @id == :BODYSLAM
|
||||
return super
|
||||
end
|
||||
|
||||
@@ -241,8 +241,8 @@ end
|
||||
#===============================================================================
|
||||
class PokeBattle_Move_010 < PokeBattle_FlinchMove
|
||||
def tramplesMinimize?(param=1)
|
||||
return super if @id == :DRAGONRUSH && MECHANICS_GENERATION <= 5
|
||||
return true if param==1 && MECHANICS_GENERATION >= 6 # Perfect accuracy
|
||||
return super if @id == :DRAGONRUSH && Settings::MECHANICS_GENERATION <= 5
|
||||
return true if param==1 && Settings::MECHANICS_GENERATION >= 6 # Perfect accuracy
|
||||
return true if param==2 # Double damage
|
||||
return super
|
||||
end
|
||||
@@ -1254,7 +1254,7 @@ end
|
||||
class PokeBattle_Move_048 < PokeBattle_TargetStatDownMove
|
||||
def initialize(battle,move)
|
||||
super
|
||||
@statDown = [PBStats::EVASION,(MECHANICS_GENERATION >= 6) ? 2 : 1]
|
||||
@statDown = [PBStats::EVASION, (Settings::MECHANICS_GENERATION >= 6) ? 2 : 1]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1284,12 +1284,12 @@ class PokeBattle_Move_049 < PokeBattle_TargetStatDownMove
|
||||
targetSide.effects[PBEffects::Spikes]>0 ||
|
||||
targetSide.effects[PBEffects::ToxicSpikes]>0 ||
|
||||
targetSide.effects[PBEffects::StickyWeb]
|
||||
return false if MECHANICS_GENERATION >= 6 &&
|
||||
return false if Settings::MECHANICS_GENERATION >= 6 &&
|
||||
(targetOpposingSide.effects[PBEffects::StealthRock] ||
|
||||
targetOpposingSide.effects[PBEffects::Spikes]>0 ||
|
||||
targetOpposingSide.effects[PBEffects::ToxicSpikes]>0 ||
|
||||
targetOpposingSide.effects[PBEffects::StickyWeb])
|
||||
return false if MECHANICS_GENERATION >= 8 &&
|
||||
return false if Settings::MECHANICS_GENERATION >= 8 &&
|
||||
@battle.field.terrain != PBBattleTerrains::None
|
||||
return super
|
||||
end
|
||||
@@ -1319,34 +1319,34 @@ class PokeBattle_Move_049 < PokeBattle_TargetStatDownMove
|
||||
@battle.pbDisplay(_INTL("{1} is no longer protected by Safeguard!!",target.pbTeam))
|
||||
end
|
||||
if target.pbOwnSide.effects[PBEffects::StealthRock] ||
|
||||
(MECHANICS_GENERATION >= 6 &&
|
||||
(Settings::MECHANICS_GENERATION >= 6 &&
|
||||
target.pbOpposingSide.effects[PBEffects::StealthRock])
|
||||
target.pbOwnSide.effects[PBEffects::StealthRock] = false
|
||||
target.pbOpposingSide.effects[PBEffects::StealthRock] = false if MECHANICS_GENERATION >= 6
|
||||
target.pbOpposingSide.effects[PBEffects::StealthRock] = false if Settings::MECHANICS_GENERATION >= 6
|
||||
@battle.pbDisplay(_INTL("{1} blew away stealth rocks!",user.pbThis))
|
||||
end
|
||||
if target.pbOwnSide.effects[PBEffects::Spikes]>0 ||
|
||||
(MECHANICS_GENERATION >= 6 &&
|
||||
(Settings::MECHANICS_GENERATION >= 6 &&
|
||||
target.pbOpposingSide.effects[PBEffects::Spikes]>0)
|
||||
target.pbOwnSide.effects[PBEffects::Spikes] = 0
|
||||
target.pbOpposingSide.effects[PBEffects::Spikes] = 0 if MECHANICS_GENERATION >= 6
|
||||
target.pbOpposingSide.effects[PBEffects::Spikes] = 0 if Settings::MECHANICS_GENERATION >= 6
|
||||
@battle.pbDisplay(_INTL("{1} blew away spikes!",user.pbThis))
|
||||
end
|
||||
if target.pbOwnSide.effects[PBEffects::ToxicSpikes]>0 ||
|
||||
(MECHANICS_GENERATION >= 6 &&
|
||||
(Settings::MECHANICS_GENERATION >= 6 &&
|
||||
target.pbOpposingSide.effects[PBEffects::ToxicSpikes]>0)
|
||||
target.pbOwnSide.effects[PBEffects::ToxicSpikes] = 0
|
||||
target.pbOpposingSide.effects[PBEffects::ToxicSpikes] = 0 if MECHANICS_GENERATION >= 6
|
||||
target.pbOpposingSide.effects[PBEffects::ToxicSpikes] = 0 if Settings::MECHANICS_GENERATION >= 6
|
||||
@battle.pbDisplay(_INTL("{1} blew away poison spikes!",user.pbThis))
|
||||
end
|
||||
if target.pbOwnSide.effects[PBEffects::StickyWeb] ||
|
||||
(MECHANICS_GENERATION >= 6 &&
|
||||
(Settings::MECHANICS_GENERATION >= 6 &&
|
||||
target.pbOpposingSide.effects[PBEffects::StickyWeb])
|
||||
target.pbOwnSide.effects[PBEffects::StickyWeb] = false
|
||||
target.pbOpposingSide.effects[PBEffects::StickyWeb] = false if MECHANICS_GENERATION >= 6
|
||||
target.pbOpposingSide.effects[PBEffects::StickyWeb] = false if Settings::MECHANICS_GENERATION >= 6
|
||||
@battle.pbDisplay(_INTL("{1} blew away sticky webs!",user.pbThis))
|
||||
end
|
||||
if MECHANICS_GENERATION >= 8 && @battle.field.terrain != PBBattleTerrains::None
|
||||
if Settings::MECHANICS_GENERATION >= 8 && @battle.field.terrain != PBBattleTerrains::None
|
||||
case @battle.field.terrain
|
||||
when PBBattleTerrains::Electric
|
||||
@battle.pbDisplay(_INTL("The electricity disappeared from the battlefield."))
|
||||
@@ -1407,7 +1407,7 @@ class PokeBattle_Move_04D < PokeBattle_TargetStatDownMove
|
||||
def initialize(battle,move)
|
||||
super
|
||||
inc = 2
|
||||
inc = 1 if @id == :STRINGSHOT && MECHANICS_GENERATION <= 5
|
||||
inc = 1 if @id == :STRINGSHOT && Settings::MECHANICS_GENERATION <= 5
|
||||
@statDown = [PBStats::SPEED,inc]
|
||||
end
|
||||
end
|
||||
@@ -1561,7 +1561,7 @@ class PokeBattle_Move_055 < PokeBattle_Move
|
||||
|
||||
def pbEffectAgainstTarget(user,target)
|
||||
PBStats.eachBattleStat { |s| user.stages[s] = target.stages[s] }
|
||||
if NEW_CRITICAL_HIT_RATE_MECHANICS
|
||||
if Settings::NEW_CRITICAL_HIT_RATE_MECHANICS
|
||||
user.effects[PBEffects::FocusEnergy] = target.effects[PBEffects::FocusEnergy]
|
||||
user.effects[PBEffects::LaserFocus] = target.effects[PBEffects::LaserFocus]
|
||||
end
|
||||
@@ -1796,7 +1796,7 @@ class PokeBattle_Move_05E < PokeBattle_Move
|
||||
userTypes = user.pbTypes(true)
|
||||
@newTypes = []
|
||||
user.eachMoveWithIndex do |m,i|
|
||||
break if MECHANICS_GENERATION >= 6 && i>0
|
||||
break if Settings::MECHANICS_GENERATION >= 6 && i>0
|
||||
next if PBTypes.isPseudoType?(m.type)
|
||||
next if userTypes.include?(m.type)
|
||||
@newTypes.push(m.type) if !@newTypes.include?(m.type)
|
||||
@@ -2169,7 +2169,7 @@ class PokeBattle_Move_067 < PokeBattle_Move
|
||||
|
||||
def pbFailsAgainstTarget?(user,target)
|
||||
if !target.ability ||
|
||||
(user.ability == target.ability && MECHANICS_GENERATION <= 5)
|
||||
(user.ability == target.ability && Settings::MECHANICS_GENERATION <= 5)
|
||||
@battle.pbDisplay(_INTL("But it failed!"))
|
||||
return true
|
||||
end
|
||||
@@ -2371,7 +2371,7 @@ class PokeBattle_Move_070 < PokeBattle_FixedDamageMove
|
||||
@battle.pbHideAbilitySplash(target)
|
||||
return true
|
||||
end
|
||||
if MECHANICS_GENERATION >= 7 && @id == :SHEERCOLD && target.pbHasType?(:ICE)
|
||||
if Settings::MECHANICS_GENERATION >= 7 && @id == :SHEERCOLD && target.pbHasType?(:ICE)
|
||||
@battle.pbDisplay(_INTL("But it failed!"))
|
||||
return true
|
||||
end
|
||||
@@ -2380,7 +2380,7 @@ class PokeBattle_Move_070 < PokeBattle_FixedDamageMove
|
||||
|
||||
def pbAccuracyCheck(user,target)
|
||||
acc = @accuracy+user.level-target.level
|
||||
acc -= 10 if MECHANICS_GENERATION >= 7 && @id == :SHEERCOLD && !user.pbHasType?(:ICE)
|
||||
acc -= 10 if Settings::MECHANICS_GENERATION >= 7 && @id == :SHEERCOLD && !user.pbHasType?(:ICE)
|
||||
return @battle.pbRandom(100)<acc
|
||||
end
|
||||
|
||||
@@ -2699,7 +2699,7 @@ end
|
||||
# Burn's halving of Attack is negated (new mechanics).
|
||||
#===============================================================================
|
||||
class PokeBattle_Move_07E < PokeBattle_Move
|
||||
def damageReducedByBurn?; return MECHANICS_GENERATION <= 5; end
|
||||
def damageReducedByBurn?; return Settings::MECHANICS_GENERATION <= 5; end
|
||||
|
||||
def pbBaseDamage(baseDmg,user,target)
|
||||
baseDmg *= 2 if user.poisoned? || user.burned? || user.paralyzed?
|
||||
|
||||
@@ -248,7 +248,7 @@ class PokeBattle_Move_090 < PokeBattle_Move
|
||||
end
|
||||
|
||||
def pbBaseDamage(baseDmg,user,target)
|
||||
return super if MECHANICS_GENERATION >= 6
|
||||
return super if Settings::MECHANICS_GENERATION >= 6
|
||||
hp = pbHiddenPower(user)
|
||||
return hp[1]
|
||||
end
|
||||
@@ -272,7 +272,7 @@ def pbHiddenPower(pkmn)
|
||||
idxType |= (iv[PBStats::SPDEF]&1)<<5
|
||||
idxType = (types.length-1)*idxType/63
|
||||
type = types[idxType]
|
||||
if MECHANICS_GENERATION <= 5
|
||||
if Settings::MECHANICS_GENERATION <= 5
|
||||
powerMin = 30
|
||||
powerMax = 70
|
||||
power |= (iv[PBStats::HP]&2)>>1
|
||||
@@ -503,7 +503,7 @@ class PokeBattle_Move_096 < PokeBattle_Move
|
||||
@damageArray.each do |dmg, items|
|
||||
next if !items.include?(heldItem)
|
||||
ret = dmg
|
||||
ret += 20 if MECHANICS_GENERATION >= 6
|
||||
ret += 20 if Settings::MECHANICS_GENERATION >= 6
|
||||
break
|
||||
end
|
||||
return ret
|
||||
@@ -600,7 +600,7 @@ end
|
||||
#===============================================================================
|
||||
class PokeBattle_Move_09B < PokeBattle_Move
|
||||
def tramplesMinimize?(param=1)
|
||||
return true if MECHANICS_GENERATION >= 7 # Perfect accuracy and double damage
|
||||
return true if Settings::MECHANICS_GENERATION >= 7 # Perfect accuracy and double damage
|
||||
return super
|
||||
end
|
||||
|
||||
@@ -646,7 +646,7 @@ end
|
||||
#===============================================================================
|
||||
class PokeBattle_Move_09D < PokeBattle_Move
|
||||
def pbMoveFailed?(user,targets)
|
||||
if MECHANICS_GENERATION >= 6
|
||||
if Settings::MECHANICS_GENERATION >= 6
|
||||
if @battle.field.effects[PBEffects::MudSportField]>0
|
||||
@battle.pbDisplay(_INTL("But it failed!"))
|
||||
return true
|
||||
@@ -662,7 +662,7 @@ class PokeBattle_Move_09D < PokeBattle_Move
|
||||
end
|
||||
|
||||
def pbEffectGeneral(user)
|
||||
if MECHANICS_GENERATION >= 6
|
||||
if Settings::MECHANICS_GENERATION >= 6
|
||||
@battle.field.effects[PBEffects::MudSportField] = 5
|
||||
else
|
||||
user.effects[PBEffects::MudSport] = true
|
||||
@@ -678,7 +678,7 @@ end
|
||||
#===============================================================================
|
||||
class PokeBattle_Move_09E < PokeBattle_Move
|
||||
def pbMoveFailed?(user,targets)
|
||||
if MECHANICS_GENERATION >= 6
|
||||
if Settings::MECHANICS_GENERATION >= 6
|
||||
if @battle.field.effects[PBEffects::WaterSportField]>0
|
||||
@battle.pbDisplay(_INTL("But it failed!"))
|
||||
return true
|
||||
@@ -694,7 +694,7 @@ class PokeBattle_Move_09E < PokeBattle_Move
|
||||
end
|
||||
|
||||
def pbEffectGeneral(user)
|
||||
if MECHANICS_GENERATION >= 6
|
||||
if Settings::MECHANICS_GENERATION >= 6
|
||||
@battle.field.effects[PBEffects::WaterSportField] = 5
|
||||
else
|
||||
user.effects[PBEffects::WaterSport] = true
|
||||
@@ -1193,7 +1193,7 @@ class PokeBattle_Move_0AF < PokeBattle_Move
|
||||
"133", # Hold Hands
|
||||
"134" # Celebrate
|
||||
]
|
||||
if MECHANICS_GENERATION >= 6
|
||||
if Settings::MECHANICS_GENERATION >= 6
|
||||
@moveBlacklist += [
|
||||
# Target-switching moves
|
||||
"0EB", # Roar, Whirlwind
|
||||
@@ -1325,7 +1325,7 @@ class PokeBattle_Move_0B3 < PokeBattle_Move
|
||||
case @battle.environment
|
||||
when PBEnvironment::Grass, PBEnvironment::TallGrass,
|
||||
PBEnvironment::Forest, PBEnvironment::ForestGrass
|
||||
if MECHANICS_GENERATION >= 6
|
||||
if Settings::MECHANICS_GENERATION >= 6
|
||||
@npMove = :ENERGYBALL if GameData::Move.exists?(:ENERGYBALL)
|
||||
else
|
||||
@npMove = :SEEDBOMB if GameData::Move.exists?(:SEEDBOMB)
|
||||
@@ -1335,25 +1335,25 @@ class PokeBattle_Move_0B3 < PokeBattle_Move
|
||||
when PBEnvironment::Puddle
|
||||
@npMove = :MUDBOMB if GameData::Move.exists?(:MUDBOMB)
|
||||
when PBEnvironment::Cave
|
||||
if MECHANICS_GENERATION >= 6
|
||||
if Settings::MECHANICS_GENERATION >= 6
|
||||
@npMove = :POWERGEM if GameData::Move.exists?(:POWERGEM)
|
||||
else
|
||||
@npMove = :ROCKSLIDE if GameData::Move.exists?(:ROCKSLIDE)
|
||||
end
|
||||
when PBEnvironment::Rock
|
||||
if MECHANICS_GENERATION >= 6
|
||||
if Settings::MECHANICS_GENERATION >= 6
|
||||
@npMove = :EARTHPOWER if GameData::Move.exists?(:EARTHPOWER)
|
||||
else
|
||||
@npMove = :ROCKSLIDE if GameData::Move.exists?(:ROCKSLIDE)
|
||||
end
|
||||
when PBEnvironment::Sand
|
||||
if MECHANICS_GENERATION >= 6
|
||||
if Settings::MECHANICS_GENERATION >= 6
|
||||
@npMove = :EARTHPOWER if GameData::Move.exists?(:EARTHPOWER)
|
||||
else
|
||||
@npMove = :EARTHQUAKE if GameData::Move.exists?(:EARTHQUAKE)
|
||||
end
|
||||
when PBEnvironment::Snow
|
||||
if MECHANICS_GENERATION >= 6
|
||||
if Settings::MECHANICS_GENERATION >= 6
|
||||
@npMove = :FROSTBREATH if GameData::Move.exists?(:FROSTBREATH)
|
||||
else
|
||||
@npMove = :BLIZZARD if GameData::Move.exists?(:BLIZZARD)
|
||||
@@ -1519,7 +1519,7 @@ class PokeBattle_Move_0B5 < PokeBattle_Move
|
||||
"133", # Hold Hands
|
||||
"134" # Celebrate
|
||||
]
|
||||
if MECHANICS_GENERATION >= 6
|
||||
if Settings::MECHANICS_GENERATION >= 6
|
||||
@moveBlacklist += [
|
||||
# Moves that call other moves
|
||||
"0B3", # Nature Power
|
||||
@@ -1550,7 +1550,7 @@ class PokeBattle_Move_0B5 < PokeBattle_Move
|
||||
# NOTE: This includes the Pokémon of ally trainers in multi battles.
|
||||
@battle.pbParty(user.index).each_with_index do |pkmn,i|
|
||||
next if !pkmn || i==user.pokemonIndex
|
||||
next if MECHANICS_GENERATION >= 6 && pkmn.egg?
|
||||
next if Settings::MECHANICS_GENERATION >= 6 && pkmn.egg?
|
||||
pkmn.moves.each do |move|
|
||||
next if @moveBlacklist.include?(move.function_code)
|
||||
next if move.type == :SHADOW
|
||||
@@ -1783,7 +1783,7 @@ class PokeBattle_Move_0BA < PokeBattle_Move
|
||||
return true
|
||||
end
|
||||
return true if pbMoveFailedAromaVeil?(user,target)
|
||||
if MECHANICS_GENERATION >= 6 && target.hasActiveAbility?(:OBLIVIOUS) &&
|
||||
if Settings::MECHANICS_GENERATION >= 6 && target.hasActiveAbility?(:OBLIVIOUS) &&
|
||||
!@battle.moldBreaker
|
||||
@battle.pbShowAbilitySplash(target)
|
||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
||||
@@ -1848,7 +1848,7 @@ class PokeBattle_Move_0BC < PokeBattle_Move
|
||||
# Moves that call other moves (see also below)
|
||||
"0AE" # Mirror Move
|
||||
]
|
||||
if MECHANICS_GENERATION >= 7
|
||||
if Settings::MECHANICS_GENERATION >= 7
|
||||
@moveBlacklist += [
|
||||
# Moves that call other moves
|
||||
# "0AE", # Mirror Move # See above
|
||||
@@ -2241,7 +2241,7 @@ class PokeBattle_Move_0CE < PokeBattle_TwoTurnMove
|
||||
@battle.pbDisplay(_INTL("But it failed!"))
|
||||
return true
|
||||
end
|
||||
if MECHANICS_GENERATION >= 6 && target.pbWeight>=2000 # 200.0kg
|
||||
if Settings::MECHANICS_GENERATION >= 6 && target.pbWeight>=2000 # 200.0kg
|
||||
@battle.pbDisplay(_INTL("But it failed!"))
|
||||
return true
|
||||
end
|
||||
@@ -2291,7 +2291,7 @@ class PokeBattle_Move_0CF < PokeBattle_Move
|
||||
return if target.effects[PBEffects::Trapping]>0
|
||||
# Set trapping effect duration and info
|
||||
if user.hasActiveItem?(:GRIPCLAW)
|
||||
target.effects[PBEffects::Trapping] = (MECHANICS_GENERATION >= 5) ? 8 : 6
|
||||
target.effects[PBEffects::Trapping] = (Settings::MECHANICS_GENERATION >= 5) ? 8 : 6
|
||||
else
|
||||
target.effects[PBEffects::Trapping] = 5+@battle.pbRandom(2)
|
||||
end
|
||||
@@ -2654,7 +2654,7 @@ end
|
||||
# User gains half the HP it inflicts as damage.
|
||||
#===============================================================================
|
||||
class PokeBattle_Move_0DD < PokeBattle_Move
|
||||
def healingMove?; return MECHANICS_GENERATION >= 6; end
|
||||
def healingMove?; return Settings::MECHANICS_GENERATION >= 6; end
|
||||
|
||||
def pbEffectAgainstTarget(user,target)
|
||||
return if target.damageState.hpLost<=0
|
||||
@@ -2670,7 +2670,7 @@ end
|
||||
# (Dream Eater)
|
||||
#===============================================================================
|
||||
class PokeBattle_Move_0DE < PokeBattle_Move
|
||||
def healingMove?; return MECHANICS_GENERATION >= 6; end
|
||||
def healingMove?; return Settings::MECHANICS_GENERATION >= 6; end
|
||||
|
||||
def pbFailsAgainstTarget?(user,target)
|
||||
if !target.asleep?
|
||||
@@ -2905,7 +2905,7 @@ end
|
||||
#===============================================================================
|
||||
class PokeBattle_Move_0E7 < PokeBattle_Move
|
||||
def pbMoveFailed?(user,targets)
|
||||
if MECHANICS_GENERATION >= 7 && user.effects[PBEffects::DestinyBondPrevious]
|
||||
if Settings::MECHANICS_GENERATION >= 7 && user.effects[PBEffects::DestinyBondPrevious]
|
||||
@battle.pbDisplay(_INTL("But it failed!"))
|
||||
return true
|
||||
end
|
||||
@@ -3150,7 +3150,7 @@ class PokeBattle_Move_0EF < PokeBattle_Move
|
||||
@battle.pbDisplay(_INTL("But it failed!"))
|
||||
return true
|
||||
end
|
||||
if MORE_TYPE_EFFECTS && target.pbHasType?(:GHOST)
|
||||
if Settings::MORE_TYPE_EFFECTS && target.pbHasType?(:GHOST)
|
||||
@battle.pbDisplay(_INTL("It doesn't affect {1}...",target.pbThis(true)))
|
||||
return true
|
||||
end
|
||||
@@ -3166,7 +3166,7 @@ class PokeBattle_Move_0EF < PokeBattle_Move
|
||||
def pbAdditionalEffect(user,target)
|
||||
return if target.fainted? || target.damageState.substitute
|
||||
return if target.effects[PBEffects::MeanLook]>=0
|
||||
return if MORE_TYPE_EFFECTS && target.pbHasType?(:GHOST)
|
||||
return if Settings::MORE_TYPE_EFFECTS && target.pbHasType?(:GHOST)
|
||||
target.effects[PBEffects::MeanLook] = user.index
|
||||
@battle.pbDisplay(_INTL("{1} can no longer escape!",target.pbThis))
|
||||
end
|
||||
@@ -3180,7 +3180,7 @@ end
|
||||
#===============================================================================
|
||||
class PokeBattle_Move_0F0 < PokeBattle_Move
|
||||
def pbBaseDamage(baseDmg,user,target)
|
||||
if MECHANICS_GENERATION >= 6 &&
|
||||
if Settings::MECHANICS_GENERATION >= 6 &&
|
||||
target.item && !target.unlosableItem?(target.item)
|
||||
# NOTE: Damage is still boosted even if target has Sticky Hold or a
|
||||
# substitute.
|
||||
@@ -3306,7 +3306,7 @@ end
|
||||
#===============================================================================
|
||||
class PokeBattle_Move_0F3 < PokeBattle_Move
|
||||
def ignoresSubstitute?(user)
|
||||
return true if MECHANICS_GENERATION >= 6
|
||||
return true if Settings::MECHANICS_GENERATION >= 6
|
||||
return super
|
||||
end
|
||||
|
||||
@@ -3370,7 +3370,7 @@ class PokeBattle_Move_0F5 < PokeBattle_Move
|
||||
def pbEffectWhenDealingDamage(user,target)
|
||||
return if target.damageState.substitute || target.damageState.berryWeakened
|
||||
return if !target.item || (!target.item.is_berry? &&
|
||||
!(MECHANICS_GENERATION >= 6 && target.item.is_gem?))
|
||||
!(Settings::MECHANICS_GENERATION >= 6 && target.item.is_gem?))
|
||||
target.pbRemoveItem
|
||||
@battle.pbDisplay(_INTL("{1}'s {2} was incinerated!",target.pbThis,target.itemName))
|
||||
end
|
||||
|
||||
@@ -1445,7 +1445,7 @@ end
|
||||
#===============================================================================
|
||||
class PokeBattle_Move_144 < PokeBattle_Move
|
||||
def tramplesMinimize?(param=1)
|
||||
return true if param==1 && MECHANICS_GENERATION >= 6 # Perfect accuracy
|
||||
return true if param==1 && Settings::MECHANICS_GENERATION >= 6 # Perfect accuracy
|
||||
return true if param==2 # Double damage
|
||||
return super
|
||||
end
|
||||
@@ -1666,7 +1666,7 @@ end
|
||||
# User gains 3/4 the HP it inflicts as damage. (Draining Kiss, Oblivion Wing)
|
||||
#===============================================================================
|
||||
class PokeBattle_Move_14F < PokeBattle_Move
|
||||
def healingMove?; return MECHANICS_GENERATION >= 6; end
|
||||
def healingMove?; return Settings::MECHANICS_GENERATION >= 6; end
|
||||
|
||||
def pbEffectAgainstTarget(user,target)
|
||||
return if target.damageState.hpLost<=0
|
||||
|
||||
@@ -128,7 +128,7 @@ module PokeBattle_BattleCommon
|
||||
@scene.pbThrowSuccess # Play capture success jingle
|
||||
pbRemoveFromParty(battler.index,battler.pokemonIndex)
|
||||
# Gain Exp
|
||||
if GAIN_EXP_FOR_CAPTURE
|
||||
if Settings::GAIN_EXP_FOR_CAPTURE
|
||||
battler.captured = true
|
||||
pbGainExp
|
||||
battler.captured = false
|
||||
@@ -192,7 +192,7 @@ module PokeBattle_BattleCommon
|
||||
# Second half of the shakes calculation
|
||||
y = ( 65536 / ((255.0/x)**0.1875) ).floor
|
||||
# Critical capture check
|
||||
if ENABLE_CRITICAL_CAPTURES
|
||||
if Settings::ENABLE_CRITICAL_CAPTURES
|
||||
c = 0
|
||||
numOwned = $Trainer.owned_count
|
||||
if numOwned>600; c = x*5/12
|
||||
|
||||
@@ -365,7 +365,7 @@ class PokeBattle_Battle
|
||||
|
||||
def pbLoseMoney
|
||||
return if !@internalBattle || !@moneyGain
|
||||
return if $game_switches[NO_MONEY_LOSS]
|
||||
return if $game_switches[Settings::NO_MONEY_LOSS]
|
||||
maxLevel = pbMaxLevelInTeam(0,0) # Player's Pokémon only, not partner's
|
||||
multiplier = [8,16,24,36,48,64,80,100,120]
|
||||
idxMultiplier = [pbPlayer.badge_count, multiplier.length - 1].min
|
||||
@@ -446,7 +446,7 @@ class PokeBattle_Battle
|
||||
end
|
||||
##### CAUGHT WILD POKÉMON #####
|
||||
when 4
|
||||
@scene.pbWildBattleSuccess if !GAIN_EXP_FOR_CAPTURE
|
||||
@scene.pbWildBattleSuccess if !Settings::GAIN_EXP_FOR_CAPTURE
|
||||
end
|
||||
# Register captured Pokémon in the Pokédex, and store them
|
||||
pbRecordAndStoreCaughtPokemon
|
||||
|
||||
@@ -105,15 +105,15 @@ class PokeBattle_Battle
|
||||
a = level*defeatedBattler.pokemon.base_exp
|
||||
if expShare.length>0 && (isPartic || hasExpShare)
|
||||
if numPartic==0 # No participants, all Exp goes to Exp Share holders
|
||||
exp = a/(SPLIT_EXP_BETWEEN_GAINERS ? expShare.length : 1)
|
||||
elsif SPLIT_EXP_BETWEEN_GAINERS # Gain from participating and/or Exp Share
|
||||
exp = a / (Settings::SPLIT_EXP_BETWEEN_GAINERS ? expShare.length : 1)
|
||||
elsif Settings::SPLIT_EXP_BETWEEN_GAINERS # Gain from participating and/or Exp Share
|
||||
exp = a/(2*numPartic) if isPartic
|
||||
exp += a/(2*expShare.length) if hasExpShare
|
||||
else # Gain from participating and/or Exp Share (Exp not split)
|
||||
exp = (isPartic) ? a : a/2
|
||||
end
|
||||
elsif isPartic # Participated in battle, no Exp Shares held by anyone
|
||||
exp = a/(SPLIT_EXP_BETWEEN_GAINERS ? numPartic : 1)
|
||||
exp = a / (Settings::SPLIT_EXP_BETWEEN_GAINERS ? numPartic : 1)
|
||||
elsif expAll # Didn't participate in battle, gaining Exp due to Exp All
|
||||
# NOTE: Exp All works like the Exp Share from Gen 6+, not like the Exp All
|
||||
# from Gen 1, i.e. Exp isn't split between all Pokémon gaining it.
|
||||
@@ -123,7 +123,7 @@ class PokeBattle_Battle
|
||||
# Pokémon gain more Exp from trainer battles
|
||||
exp = (exp*1.5).floor if trainerBattle?
|
||||
# Scale the gained Exp based on the gainer's level (or not)
|
||||
if SCALED_EXP_FORMULA
|
||||
if Settings::SCALED_EXP_FORMULA
|
||||
exp /= 5
|
||||
levelAdjust = (2*level+10.0)/(pkmn.level+level+10.0)
|
||||
levelAdjust = levelAdjust**5
|
||||
|
||||
@@ -64,7 +64,7 @@ class PokeBattle_Battle
|
||||
end
|
||||
end
|
||||
# Other certain switching effects
|
||||
return true if MORE_TYPE_EFFECTS && battler.pbHasType?(:GHOST)
|
||||
return true if Settings::MORE_TYPE_EFFECTS && battler.pbHasType?(:GHOST)
|
||||
# Other certain trapping effects
|
||||
if battler.effects[PBEffects::Trapping]>0 ||
|
||||
battler.effects[PBEffects::MeanLook]>=0 ||
|
||||
@@ -286,7 +286,7 @@ class PokeBattle_Battle
|
||||
partyOrder[idxParty],partyOrder[idxPartyOld] = partyOrder[idxPartyOld],partyOrder[idxParty]
|
||||
# Send out the new Pokémon
|
||||
pbSendOut([[idxBattler,party[idxParty]]])
|
||||
pbCalculatePriority(false,[idxBattler]) if RECALCULATE_TURN_ORDER_AFTER_SPEED_CHANGES
|
||||
pbCalculatePriority(false,[idxBattler]) if Settings::RECALCULATE_TURN_ORDER_AFTER_SPEED_CHANGES
|
||||
end
|
||||
|
||||
# Called from def pbReplace above and at the start of battle.
|
||||
|
||||
@@ -6,7 +6,7 @@ class PokeBattle_Battle
|
||||
return false if trainerBattle?
|
||||
battler = @battlers[idxBattler]
|
||||
return false if !@canRun && !battler.opposes?
|
||||
return true if battler.pbHasType?(:GHOST) && MORE_TYPE_EFFECTS
|
||||
return true if battler.pbHasType?(:GHOST) && Settings::MORE_TYPE_EFFECTS
|
||||
return true if battler.abilityActive? &&
|
||||
BattleHandlers.triggerRunFromBattleAbility(battler.ability,battler)
|
||||
return true if battler.itemActive? &&
|
||||
@@ -71,7 +71,7 @@ class PokeBattle_Battle
|
||||
return 0
|
||||
end
|
||||
if !duringBattle
|
||||
if battler.pbHasType?(:GHOST) && MORE_TYPE_EFFECTS
|
||||
if battler.pbHasType?(:GHOST) && Settings::MORE_TYPE_EFFECTS
|
||||
pbSEPlay("Battle flee")
|
||||
pbDisplayPaused(_INTL("You got away safely!"))
|
||||
@decision = 3
|
||||
|
||||
@@ -62,13 +62,13 @@ class PokeBattle_Battle
|
||||
#=============================================================================
|
||||
def pbHasMegaRing?(idxBattler)
|
||||
return true if !pbOwnedByPlayer?(idxBattler) # Assume AI trainer have a ring
|
||||
MEGA_RINGS.each { |item| return true if $PokemonBag.pbHasItem?(item) }
|
||||
Settings::MEGA_RINGS.each { |item| return true if $PokemonBag.pbHasItem?(item) }
|
||||
return false
|
||||
end
|
||||
|
||||
def pbGetMegaRingName(idxBattler)
|
||||
if pbOwnedByPlayer?(idxBattler)
|
||||
MEGA_RINGS.each do |item|
|
||||
Settings::MEGA_RINGS.each do |item|
|
||||
return GameData::Item.get(item).name if $PokemonBag.pbHasItem?(item)
|
||||
end
|
||||
end
|
||||
@@ -80,7 +80,7 @@ class PokeBattle_Battle
|
||||
end
|
||||
|
||||
def pbCanMegaEvolve?(idxBattler)
|
||||
return false if $game_switches[NO_MEGA_EVOLUTION]
|
||||
return false if $game_switches[Settings::NO_MEGA_EVOLUTION]
|
||||
return false if !@battlers[idxBattler].hasMega?
|
||||
return false if wildBattle? && opposes?(idxBattler)
|
||||
return true if $DEBUG && Input.press?(Input::CTRL)
|
||||
@@ -157,7 +157,7 @@ class PokeBattle_Battle
|
||||
if battler.isSpecies?(:GENGAR) && battler.mega?
|
||||
battler.effects[PBEffects::Telekinesis] = 0
|
||||
end
|
||||
pbCalculatePriority(false,[idxBattler]) if RECALCULATE_TURN_ORDER_AFTER_MEGA_EVOLUTION
|
||||
pbCalculatePriority(false,[idxBattler]) if Settings::RECALCULATE_TURN_ORDER_AFTER_MEGA_EVOLUTION
|
||||
# Trigger ability
|
||||
battler.pbEffectsOnSwitchIn
|
||||
end
|
||||
|
||||
@@ -84,7 +84,7 @@ class PokeBattle_Battle
|
||||
end
|
||||
return if @decision > 0
|
||||
end
|
||||
pbCalculatePriority if RECALCULATE_TURN_ORDER_AFTER_SPEED_CHANGES
|
||||
pbCalculatePriority if Settings::RECALCULATE_TURN_ORDER_AFTER_SPEED_CHANGES
|
||||
end
|
||||
|
||||
def pbAttackPhaseMegaEvolution
|
||||
|
||||
@@ -370,7 +370,7 @@ class PokeBattle_Battle
|
||||
priority.each do |b|
|
||||
next if b.status!=PBStatuses::BURN || !b.takesIndirectDamage?
|
||||
oldHP = b.hp
|
||||
dmg = (MECHANICS_GENERATION >= 7) ? b.totalhp/16 : b.totalhp/8
|
||||
dmg = (Settings::MECHANICS_GENERATION >= 7) ? b.totalhp/16 : b.totalhp/8
|
||||
dmg = (dmg/2.0).round if b.hasActiveAbility?(:HEATPROOF)
|
||||
b.pbContinueStatus { b.pbReduceHP(dmg,false) }
|
||||
b.pbItemHPHealCheck
|
||||
@@ -417,9 +417,9 @@ class PokeBattle_Battle
|
||||
else pbCommonAnimation("Wrap", b)
|
||||
end
|
||||
if b.takesIndirectDamage?
|
||||
hpLoss = (MECHANICS_GENERATION >= 6) ? b.totalhp/8 : b.totalhp/16
|
||||
hpLoss = (Settings::MECHANICS_GENERATION >= 6) ? b.totalhp/8 : b.totalhp/16
|
||||
if @battlers[b.effects[PBEffects::TrappingUser]].hasActiveItem?(:BINDINGBAND)
|
||||
hpLoss = (MECHANICS_GENERATION >= 6) ? b.totalhp/6 : b.totalhp/8
|
||||
hpLoss = (Settings::MECHANICS_GENERATION >= 6) ? b.totalhp/6 : b.totalhp/8
|
||||
end
|
||||
@scene.pbDamageAnimation(b)
|
||||
b.pbReduceHP(hpLoss,false)
|
||||
|
||||
@@ -44,7 +44,7 @@ class PokeBattle_AI
|
||||
:ENERGYPOWDER => 50,
|
||||
:ENERGYROOT => 200
|
||||
}
|
||||
hpItems[:RAGECANDYBAR] = 20 if !RAGE_CANDY_BAR_CURES_STATUS_PROBLEMS
|
||||
hpItems[:RAGECANDYBAR] = 20 if !Settings::RAGE_CANDY_BAR_CURES_STATUS_PROBLEMS
|
||||
fullRestoreItems = [
|
||||
:FULLRESTORE
|
||||
]
|
||||
@@ -59,37 +59,37 @@ class PokeBattle_AI
|
||||
:FULLHEAL, :LAVACOOKIE, :OLDGATEAU, :CASTELIACONE, :LUMIOSEGALETTE,
|
||||
:SHALOURSABLE, :BIGMALASADA, :LUMBERRY, :HEALPOWDER
|
||||
]
|
||||
allStatusItems.push(:RAGECANDYBAR) if RAGE_CANDY_BAR_CURES_STATUS_PROBLEMS
|
||||
allStatusItems.push(:RAGECANDYBAR) if Settings::RAGE_CANDY_BAR_CURES_STATUS_PROBLEMS
|
||||
xItems = {
|
||||
:XATTACK => [PBStats::ATTACK, (X_STAT_ITEMS_RAISE_BY_TWO_STAGES) ? 2 : 1],
|
||||
:XATTACK => [PBStats::ATTACK, (Settings::X_STAT_ITEMS_RAISE_BY_TWO_STAGES) ? 2 : 1],
|
||||
:XATTACK2 => [PBStats::ATTACK, 2],
|
||||
:XATTACK3 => [PBStats::ATTACK, 3],
|
||||
:XATTACK6 => [PBStats::ATTACK, 6],
|
||||
:XDEFENSE => [PBStats::DEFENSE, (X_STAT_ITEMS_RAISE_BY_TWO_STAGES) ? 2 : 1],
|
||||
:XDEFENSE => [PBStats::DEFENSE, (Settings::X_STAT_ITEMS_RAISE_BY_TWO_STAGES) ? 2 : 1],
|
||||
:XDEFENSE2 => [PBStats::DEFENSE, 2],
|
||||
:XDEFENSE3 => [PBStats::DEFENSE, 3],
|
||||
:XDEFENSE6 => [PBStats::DEFENSE, 6],
|
||||
:XDEFEND => [PBStats::DEFENSE, (X_STAT_ITEMS_RAISE_BY_TWO_STAGES) ? 2 : 1],
|
||||
:XDEFEND => [PBStats::DEFENSE, (Settings::X_STAT_ITEMS_RAISE_BY_TWO_STAGES) ? 2 : 1],
|
||||
:XDEFEND2 => [PBStats::DEFENSE, 2],
|
||||
:XDEFEND3 => [PBStats::DEFENSE, 3],
|
||||
:XDEFEND6 => [PBStats::DEFENSE, 6],
|
||||
:XSPATK => [PBStats::SPATK, (X_STAT_ITEMS_RAISE_BY_TWO_STAGES) ? 2 : 1],
|
||||
:XSPATK => [PBStats::SPATK, (Settings::X_STAT_ITEMS_RAISE_BY_TWO_STAGES) ? 2 : 1],
|
||||
:XSPATK2 => [PBStats::SPATK, 2],
|
||||
:XSPATK3 => [PBStats::SPATK, 3],
|
||||
:XSPATK6 => [PBStats::SPATK, 6],
|
||||
:XSPECIAL => [PBStats::SPATK, (X_STAT_ITEMS_RAISE_BY_TWO_STAGES) ? 2 : 1],
|
||||
:XSPECIAL => [PBStats::SPATK, (Settings::X_STAT_ITEMS_RAISE_BY_TWO_STAGES) ? 2 : 1],
|
||||
:XSPECIAL2 => [PBStats::SPATK, 2],
|
||||
:XSPECIAL3 => [PBStats::SPATK, 3],
|
||||
:XSPECIAL6 => [PBStats::SPATK, 6],
|
||||
:XSPDEF => [PBStats::SPDEF, (X_STAT_ITEMS_RAISE_BY_TWO_STAGES) ? 2 : 1],
|
||||
:XSPDEF => [PBStats::SPDEF, (Settings::X_STAT_ITEMS_RAISE_BY_TWO_STAGES) ? 2 : 1],
|
||||
:XSPDEF2 => [PBStats::SPDEF, 2],
|
||||
:XSPDEF3 => [PBStats::SPDEF, 3],
|
||||
:XSPDEF6 => [PBStats::SPDEF, 6],
|
||||
:XSPEED => [PBStats::SPEED, (X_STAT_ITEMS_RAISE_BY_TWO_STAGES) ? 2 : 1],
|
||||
:XSPEED => [PBStats::SPEED, (Settings::X_STAT_ITEMS_RAISE_BY_TWO_STAGES) ? 2 : 1],
|
||||
:XSPEED2 => [PBStats::SPEED, 2],
|
||||
:XSPEED3 => [PBStats::SPEED, 3],
|
||||
:XSPEED6 => [PBStats::SPEED, 6],
|
||||
:XACCURACY => [PBStats::ACCURACY, (X_STAT_ITEMS_RAISE_BY_TWO_STAGES) ? 2 : 1],
|
||||
:XACCURACY => [PBStats::ACCURACY, (Settings::X_STAT_ITEMS_RAISE_BY_TWO_STAGES) ? 2 : 1],
|
||||
:XACCURACY2 => [PBStats::ACCURACY, 2],
|
||||
:XACCURACY3 => [PBStats::ACCURACY, 3],
|
||||
:XACCURACY6 => [PBStats::ACCURACY, 6]
|
||||
|
||||
@@ -1514,8 +1514,8 @@ class PokeBattle_AI
|
||||
elsif skill>=PBTrainerAI.mediumSkill && target.lastMoveUsed
|
||||
moveData = GameData::Move.get(target.lastMoveUsed)
|
||||
if moveData.base_damage > 0 &&
|
||||
(MOVE_CATEGORY_PER_MOVE && moveData.category == 0) ||
|
||||
(!MOVE_CATEGORY_PER_MOVE && PBTypes.isPhysicalType?(moveData.type))
|
||||
(Settings::MOVE_CATEGORY_PER_MOVE && moveData.category == 0) ||
|
||||
(!Settings::MOVE_CATEGORY_PER_MOVE && PBTypes.isPhysicalType?(moveData.type))
|
||||
score -= 60
|
||||
end
|
||||
end
|
||||
@@ -1532,8 +1532,8 @@ class PokeBattle_AI
|
||||
elsif skill>=PBTrainerAI.mediumSkill && target.lastMoveUsed
|
||||
moveData = GameData::Move.get(target.lastMoveUsed)
|
||||
if moveData.base_damage > 0 &&
|
||||
(MOVE_CATEGORY_PER_MOVE && moveData.category == 1) ||
|
||||
(!MOVE_CATEGORY_PER_MOVE && !PBTypes.isSpecialType?(moveData.type))
|
||||
(Settings::MOVE_CATEGORY_PER_MOVE && moveData.category == 1) ||
|
||||
(!Settings::MOVE_CATEGORY_PER_MOVE && !PBTypes.isSpecialType?(moveData.type))
|
||||
score -= 60
|
||||
end
|
||||
end
|
||||
|
||||
@@ -120,7 +120,7 @@ class PokeBattle_AI
|
||||
end
|
||||
return true if target.effects[PBEffects::Substitute]>0 && move.statusMove? &&
|
||||
!move.ignoresSubstitute?(user) && user.index!=target.index
|
||||
return true if MECHANICS_GENERATION >= 7 && user.hasActiveAbility?(:PRANKSTER) &&
|
||||
return true if Settings::MECHANICS_GENERATION >= 7 && user.hasActiveAbility?(:PRANKSTER) &&
|
||||
target.pbHasType?(:DARK) && target.opposes?(user)
|
||||
return true if move.priority>0 && @battle.field.terrain==PBBattleTerrains::Psychic &&
|
||||
target.affectedByTerrain? && target.opposes?(user)
|
||||
@@ -200,7 +200,7 @@ class PokeBattle_AI
|
||||
baseDmg = move.pbNaturalGiftBaseDamage(user.item_id)
|
||||
when "09B" # Heavy Slam
|
||||
baseDmg = move.pbBaseDamage(baseDmg,user,target)
|
||||
baseDmg *= 2 if MECHANICS_GENERATION >= 7 && skill>=PBTrainerAI.mediumSkill &&
|
||||
baseDmg *= 2 if Settings::MECHANICS_GENERATION >= 7 && skill>=PBTrainerAI.mediumSkill &&
|
||||
target.effects[PBEffects::Minimize]
|
||||
when "0A0", "0BD", "0BE" # Frost Breath, Double Kick, Twineedle
|
||||
baseDmg *= 2
|
||||
@@ -418,9 +418,9 @@ class PokeBattle_AI
|
||||
# Don't need to check the Atk/Sp Atk-boosting badges because the AI
|
||||
# won't control the player's Pokémon.
|
||||
if target.pbOwnedByPlayer?
|
||||
if move.physicalMove?(type) && @battle.pbPlayer.badge_count >= NUM_BADGES_BOOST_DEFENSE
|
||||
if move.physicalMove?(type) && @battle.pbPlayer.badge_count >= Settings::NUM_BADGES_BOOST_DEFENSE
|
||||
multipliers[:defense_multiplier] *= 1.1
|
||||
elsif move.specialMove?(type) && @battle.pbPlayer.badge_count >= NUM_BADGES_BOOST_SPDEF
|
||||
elsif move.specialMove?(type) && @battle.pbPlayer.badge_count >= Settings::NUM_BADGES_BOOST_SPDEF
|
||||
multipliers[:defense_multiplier] *= 1.1
|
||||
end
|
||||
end
|
||||
@@ -474,7 +474,7 @@ class PokeBattle_AI
|
||||
if skill>=PBTrainerAI.highSkill
|
||||
if user.status==PBStatuses::BURN && move.physicalMove?(type) &&
|
||||
!user.hasActiveAbility?(:GUTS) &&
|
||||
!(MECHANICS_GENERATION >= 6 && move.function == "07E") # Facade
|
||||
!(Settings::MECHANICS_GENERATION >= 6 && move.function == "07E") # Facade
|
||||
multipliers[:final_damage_multiplier] /= 2
|
||||
end
|
||||
end
|
||||
@@ -651,7 +651,7 @@ class PokeBattle_AI
|
||||
end
|
||||
if skill>=PBTrainerAI.highSkill
|
||||
if move.function=="006" # Toxic
|
||||
modifiers[:base_accuracy] = 0 if MORE_TYPE_EFFECTS && move.statusMove? &&
|
||||
modifiers[:base_accuracy] = 0 if Settings::MORE_TYPE_EFFECTS && move.statusMove? &&
|
||||
user.pbHasType?(:POISON)
|
||||
end
|
||||
if move.function=="070" # OHKO moves
|
||||
|
||||
@@ -5,15 +5,15 @@ module PokeBattle_SceneConstants
|
||||
MESSAGE_SHADOW_COLOR = Color.new(160, 160, 168)
|
||||
|
||||
# The number of party balls to show in each side's lineup.
|
||||
NUM_BALLS = MAX_PARTY_SIZE
|
||||
NUM_BALLS = Settings::MAX_PARTY_SIZE
|
||||
|
||||
# Centre bottom of the player's side base graphic
|
||||
PLAYER_BASE_X = 128
|
||||
PLAYER_BASE_Y = SCREEN_HEIGHT - 80
|
||||
PLAYER_BASE_Y = Settings::SCREEN_HEIGHT - 80
|
||||
|
||||
# Centre middle of the foe's side base graphic
|
||||
FOE_BASE_X = SCREEN_WIDTH - 128
|
||||
FOE_BASE_Y = (SCREEN_HEIGHT * 3 / 4) - 112
|
||||
FOE_BASE_X = Settings::SCREEN_WIDTH - 128
|
||||
FOE_BASE_Y = (Settings::SCREEN_HEIGHT * 3 / 4) - 112
|
||||
|
||||
# Returns where the centre bottom of a battler's sprite should be, given its
|
||||
# index and the number of battlers on its side, assuming the battler has
|
||||
|
||||
@@ -480,12 +480,12 @@ end
|
||||
|
||||
def pbBattleConfusionBerry(battler,battle,item,forced,flavor,confuseMsg)
|
||||
return false if !forced && !battler.canHeal?
|
||||
return false if !forced && !battler.canConsumePinchBerry?(MECHANICS_GENERATION >= 7)
|
||||
return false if !forced && !battler.canConsumePinchBerry?(Settings::MECHANICS_GENERATION >= 7)
|
||||
itemName = GameData::Item.get(item).name
|
||||
battle.pbCommonAnimation("EatBerry",battler) if !forced
|
||||
fraction_to_heal = 8 # Gens 6 and lower
|
||||
if MECHANICS_GENERATION == 7; fraction_to_heal = 2
|
||||
elsif MECHANICS_GENERATION >= 8; fraction_to_heal = 3
|
||||
if Settings::MECHANICS_GENERATION == 7; fraction_to_heal = 2
|
||||
elsif Settings::MECHANICS_GENERATION >= 8; fraction_to_heal = 3
|
||||
end
|
||||
amt = battler.pbRecoverHP(battler.totalhp / fraction_to_heal)
|
||||
if amt>0
|
||||
@@ -572,7 +572,7 @@ def pbBattleGem(user,type,move,mults,moveType)
|
||||
return if move.is_a?(PokeBattle_PledgeMove)
|
||||
return if moveType != type
|
||||
user.effects[PBEffects::GemConsumed] = user.item_id
|
||||
if MECHANICS_GENERATION >= 6
|
||||
if Settings::MECHANICS_GENERATION >= 6
|
||||
mults[:base_damage_multiplier] *= 1.3
|
||||
else
|
||||
mults[:base_damage_multiplier] *= 1.5
|
||||
@@ -598,7 +598,7 @@ def pbBattleWeatherAbility(weather,battler,battle,ignorePrimal=false)
|
||||
battle.pbDisplay(_INTL("{1}'s {2} activated!",battler.pbThis,battler.abilityName))
|
||||
end
|
||||
fixedDuration = false
|
||||
fixedDuration = true if FIXED_DURATION_WEATHER_FROM_ABILITY &&
|
||||
fixedDuration = true if Settings::FIXED_DURATION_WEATHER_FROM_ABILITY &&
|
||||
weather != PBWeather::HarshSun &&
|
||||
weather != PBWeather::HeavyRain &&
|
||||
weather != PBWeather::StrongWinds
|
||||
|
||||
@@ -308,7 +308,7 @@ BattleHandlers::StatusCureAbility.add(:MAGMAARMOR,
|
||||
BattleHandlers::StatusCureAbility.add(:OBLIVIOUS,
|
||||
proc { |ability,battler|
|
||||
next if battler.effects[PBEffects::Attract]<0 &&
|
||||
(battler.effects[PBEffects::Taunt]==0 || MECHANICS_GENERATION <= 5)
|
||||
(battler.effects[PBEffects::Taunt]==0 || Settings::MECHANICS_GENERATION <= 5)
|
||||
battler.battle.pbShowAbilitySplash(battler)
|
||||
if battler.effects[PBEffects::Attract]>=0
|
||||
battler.pbCureAttract
|
||||
@@ -319,7 +319,7 @@ BattleHandlers::StatusCureAbility.add(:OBLIVIOUS,
|
||||
battler.pbThis,battler.abilityName))
|
||||
end
|
||||
end
|
||||
if battler.effects[PBEffects::Taunt]>0 && MECHANICS_GENERATION >= 6
|
||||
if battler.effects[PBEffects::Taunt]>0 && Settings::MECHANICS_GENERATION >= 6
|
||||
battler.effects[PBEffects::Taunt] = 0
|
||||
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
|
||||
battler.battle.pbDisplay(_INTL("{1}'s Taunt wore off!",battler.pbThis))
|
||||
@@ -741,7 +741,7 @@ BattleHandlers::MoveBaseTypeModifierAbility.add(:LIQUIDVOICE,
|
||||
BattleHandlers::MoveBaseTypeModifierAbility.add(:NORMALIZE,
|
||||
proc { |ability,user,move,type|
|
||||
next if !GameData::Type.exists?(:NORMAL)
|
||||
move.powerBoost = true if MECHANICS_GENERATION >= 7
|
||||
move.powerBoost = true if Settings::MECHANICS_GENERATION >= 7
|
||||
next :NORMAL
|
||||
}
|
||||
)
|
||||
@@ -780,7 +780,7 @@ BattleHandlers::AccuracyCalcUserAbility.add(:HUSTLE,
|
||||
|
||||
BattleHandlers::AccuracyCalcUserAbility.add(:KEENEYE,
|
||||
proc { |ability,mods,user,target,move,type|
|
||||
mods[:evasion_stage] = 0 if mods[:evasion_stage] > 0 && MECHANICS_GENERATION >= 6
|
||||
mods[:evasion_stage] = 0 if mods[:evasion_stage] > 0 && Settings::MECHANICS_GENERATION >= 6
|
||||
}
|
||||
)
|
||||
|
||||
@@ -1606,7 +1606,7 @@ BattleHandlers::TargetAbilityOnHit.add(:WEAKARMOR,
|
||||
battle.pbShowAbilitySplash(target)
|
||||
target.pbLowerStatStageByAbility(PBStats::DEFENSE, 1, target, false)
|
||||
target.pbRaiseStatStageByAbility(PBStats::SPEED,
|
||||
(MECHANICS_GENERATION >= 7) ? 2 : 1, target, false)
|
||||
(Settings::MECHANICS_GENERATION >= 7) ? 2 : 1, target, false)
|
||||
battle.pbHideAbilitySplash(target)
|
||||
}
|
||||
)
|
||||
@@ -2089,7 +2089,7 @@ BattleHandlers::AbilityOnSwitchIn.add(:ANTICIPATION,
|
||||
next if m.statusMove?
|
||||
if type1
|
||||
moveType = m.type
|
||||
if MECHANICS_GENERATION >= 6 && m.function == "090" # Hidden Power
|
||||
if Settings::MECHANICS_GENERATION >= 6 && m.function == "090" # Hidden Power
|
||||
moveType = pbHiddenPower(b.pokemon)[0]
|
||||
end
|
||||
eff = PBTypes.getCombinedEffectiveness(moveType,type1,type2,type3)
|
||||
@@ -2236,7 +2236,7 @@ BattleHandlers::AbilityOnSwitchIn.add(:FRISK,
|
||||
end
|
||||
if foes.length>0
|
||||
battle.pbShowAbilitySplash(battler)
|
||||
if MECHANICS_GENERATION >= 6
|
||||
if Settings::MECHANICS_GENERATION >= 6
|
||||
foes.each do |b|
|
||||
battle.pbDisplay(_INTL("{1} frisked {2} and found its {3}!",
|
||||
battler.pbThis,b.pbThis(true),b.itemName))
|
||||
|
||||
@@ -746,7 +746,7 @@ BattleHandlers::DamageCalcUserItem.copy(:SOFTSAND,:EARTHPLATE)
|
||||
BattleHandlers::DamageCalcUserItem.add(:SOULDEW,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
next if !user.isSpecies?(:LATIAS) && !user.isSpecies?(:LATIOS)
|
||||
if SOUL_DEW_POWERS_UP_TYPES
|
||||
if Settings::SOUL_DEW_POWERS_UP_TYPES
|
||||
mults[:final_damage_multiplier] *= 1.2 if type == :PSYCHIC || type == :DRAGON
|
||||
else
|
||||
if move.specialMove? && !user.battle.rules["souldewclause"]
|
||||
@@ -932,7 +932,7 @@ BattleHandlers::DamageCalcTargetItem.add(:SHUCABERRY,
|
||||
|
||||
BattleHandlers::DamageCalcTargetItem.add(:SOULDEW,
|
||||
proc { |item,user,target,move,mults,baseDmg,type|
|
||||
next if SOUL_DEW_POWERS_UP_TYPES
|
||||
next if Settings::SOUL_DEW_POWERS_UP_TYPES
|
||||
next if !target.isSpecies?(:LATIAS) && !target.isSpecies?(:LATIOS)
|
||||
if move.specialMove? && !user.battle.rules["souldewclause"]
|
||||
mults[:defense_multiplier] *= 1.5
|
||||
|
||||
@@ -101,7 +101,7 @@ BallHandlers::ModifyCatchRate.add(:SAFARIBALL,proc { |ball,catchRate,battle,batt
|
||||
})
|
||||
|
||||
BallHandlers::ModifyCatchRate.add(:NETBALL,proc { |ball,catchRate,battle,battler,ultraBeast|
|
||||
multiplier = (NEW_POKE_BALL_CATCH_RATES) ? 3.5 : 3
|
||||
multiplier = (Settings::NEW_POKE_BALL_CATCH_RATES) ? 3.5 : 3
|
||||
catchRate *= multiplier if battler.pbHasType?(:BUG) || battler.pbHasType?(:WATER)
|
||||
next catchRate
|
||||
})
|
||||
@@ -119,7 +119,7 @@ BallHandlers::ModifyCatchRate.add(:NESTBALL,proc { |ball,catchRate,battle,battle
|
||||
})
|
||||
|
||||
BallHandlers::ModifyCatchRate.add(:REPEATBALL,proc { |ball,catchRate,battle,battler,ultraBeast|
|
||||
multiplier = (NEW_POKE_BALL_CATCH_RATES) ? 3.5 : 3
|
||||
multiplier = (Settings::NEW_POKE_BALL_CATCH_RATES) ? 3.5 : 3
|
||||
catchRate *= multiplier if battle.pbPlayer.owned?(battler.species)
|
||||
next catchRate
|
||||
})
|
||||
@@ -131,7 +131,7 @@ BallHandlers::ModifyCatchRate.add(:TIMERBALL,proc { |ball,catchRate,battle,battl
|
||||
})
|
||||
|
||||
BallHandlers::ModifyCatchRate.add(:DUSKBALL,proc { |ball,catchRate,battle,battler,ultraBeast|
|
||||
multiplier = (NEW_POKE_BALL_CATCH_RATES) ? 3 : 3.5
|
||||
multiplier = (Settings::NEW_POKE_BALL_CATCH_RATES) ? 3 : 3.5
|
||||
catchRate *= multiplier if battle.time==2
|
||||
next catchRate
|
||||
})
|
||||
@@ -161,7 +161,7 @@ BallHandlers::ModifyCatchRate.add(:LEVELBALL,proc { |ball,catchRate,battle,battl
|
||||
})
|
||||
|
||||
BallHandlers::ModifyCatchRate.add(:LUREBALL,proc { |ball,catchRate,battle,battler,ultraBeast|
|
||||
multiplier = (NEW_POKE_BALL_CATCH_RATES) ? 5 : 3
|
||||
multiplier = (Settings::NEW_POKE_BALL_CATCH_RATES) ? 5 : 3
|
||||
catchRate *= multiplier if $PokemonTemp.encounterType==EncounterTypes::OldRod ||
|
||||
$PokemonTemp.encounterType==EncounterTypes::GoodRod ||
|
||||
$PokemonTemp.encounterType==EncounterTypes::SuperRod
|
||||
@@ -171,7 +171,7 @@ BallHandlers::ModifyCatchRate.add(:LUREBALL,proc { |ball,catchRate,battle,battle
|
||||
BallHandlers::ModifyCatchRate.add(:HEAVYBALL,proc { |ball,catchRate,battle,battler,ultraBeast|
|
||||
next 0 if catchRate==0
|
||||
weight = battler.pbWeight
|
||||
if NEW_POKE_BALL_CATCH_RATES
|
||||
if Settings::NEW_POKE_BALL_CATCH_RATES
|
||||
if weight>=3000; catchRate += 30
|
||||
elsif weight>=2000; catchRate += 20
|
||||
elsif weight<1000; catchRate -= 20
|
||||
|
||||
@@ -193,7 +193,7 @@ Events.onMapUpdate += proc { |_sender,_e|
|
||||
# Returns whether the Poké Center should explain Pokérus to the player, if a
|
||||
# healed Pokémon has it.
|
||||
def pbPokerus?
|
||||
return false if $game_switches[SEEN_POKERUS_SWITCH]
|
||||
return false if $game_switches[Settings::SEEN_POKERUS_SWITCH]
|
||||
for i in $Trainer.party
|
||||
return true if i.pokerusStage==1
|
||||
end
|
||||
@@ -274,7 +274,7 @@ Events.onStepTaken += proc {
|
||||
Events.onStepTakenTransferPossible += proc { |_sender,e|
|
||||
handled = e[0]
|
||||
next if handled[0]
|
||||
if $PokemonGlobal.stepcount%4==0 && POISON_IN_FIELD
|
||||
if $PokemonGlobal.stepcount%4==0 && Settings::POISON_IN_FIELD
|
||||
flashed = false
|
||||
for i in $Trainer.able_party
|
||||
if i.status==PBStatuses::POISON && !i.hasAbility?(:IMMUNITY)
|
||||
@@ -282,8 +282,8 @@ Events.onStepTakenTransferPossible += proc { |_sender,e|
|
||||
$game_screen.start_flash(Color.new(255,0,0,128), 4)
|
||||
flashed = true
|
||||
end
|
||||
i.hp -= 1 if i.hp>1 || POISON_FAINT_IN_FIELD
|
||||
if i.hp==1 && !POISON_FAINT_IN_FIELD
|
||||
i.hp -= 1 if i.hp>1 || Settings::POISON_FAINT_IN_FIELD
|
||||
if i.hp==1 && !Settings::POISON_FAINT_IN_FIELD
|
||||
i.status = PBStatuses::NONE
|
||||
pbMessage(_INTL("{1} survived the poisoning.\\nThe poison faded away!\1",i.name))
|
||||
next
|
||||
@@ -341,7 +341,7 @@ Events.onStepTakenFieldMovement += proc { |_sender,e|
|
||||
if $scene.is_a?(Scene_Map)
|
||||
currentTag = pbGetTerrainTag(event)
|
||||
if PBTerrain.isJustGrass?(pbGetTerrainTag(event,true)) # Won't show if under bridge
|
||||
$scene.spriteset.addUserAnimation(GRASS_ANIMATION_ID,event.x,event.y,true,1)
|
||||
$scene.spriteset.addUserAnimation(Settings::GRASS_ANIMATION_ID,event.x,event.y,true,1)
|
||||
elsif event==$game_player
|
||||
if currentTag==PBTerrain::WaterfallCrest
|
||||
# Descend waterfall, but only if this event is the player
|
||||
@@ -470,9 +470,11 @@ Events.onMapSceneChange += proc { |_sender, e|
|
||||
if mapChanged && map_metadata && map_metadata.announce_location
|
||||
nosignpost = false
|
||||
if $PokemonGlobal.mapTrail[1]
|
||||
for i in 0...NO_SIGNPOSTS.length / 2
|
||||
nosignpost = true if NO_SIGNPOSTS[2 * i] == $PokemonGlobal.mapTrail[1] && NO_SIGNPOSTS[2 * i + 1] == $game_map.map_id
|
||||
nosignpost = true if NO_SIGNPOSTS[2 * i + 1] == $PokemonGlobal.mapTrail[1] && NO_SIGNPOSTS[2 * i] == $game_map.map_id
|
||||
for i in 0...Settings::NO_SIGNPOSTS.length / 2
|
||||
nosignpost = true if Settings::NO_SIGNPOSTS[2 * i] == $PokemonGlobal.mapTrail[1] &&
|
||||
Settings::NO_SIGNPOSTS[2 * i + 1] == $game_map.map_id
|
||||
nosignpost = true if Settings::NO_SIGNPOSTS[2 * i + 1] == $PokemonGlobal.mapTrail[1] &&
|
||||
Settings::NO_SIGNPOSTS[2 * i] == $game_map.map_id
|
||||
break if nosignpost
|
||||
end
|
||||
mapinfos = load_data("Data/MapInfos.rxdata")
|
||||
@@ -769,7 +771,7 @@ end
|
||||
def pbLedge(_xOffset,_yOffset)
|
||||
if PBTerrain.isLedge?(pbFacingTerrainTag)
|
||||
if pbJumpToward(2,true)
|
||||
$scene.spriteset.addUserAnimation(DUST_ANIMATION_ID,$game_player.x,$game_player.y,true,1)
|
||||
$scene.spriteset.addUserAnimation(Settings::DUST_ANIMATION_ID,$game_player.x,$game_player.y,true,1)
|
||||
$game_player.increase_steps
|
||||
$game_player.check_event_trigger_here([1,2])
|
||||
end
|
||||
@@ -868,7 +870,7 @@ end
|
||||
#===============================================================================
|
||||
def pbFishingBegin
|
||||
$PokemonGlobal.fishing = true
|
||||
if !pbCommonEvent(FISHING_BEGIN_COMMON_EVENT)
|
||||
if !pbCommonEvent(Settings::FISHING_BEGIN_COMMON_EVENT)
|
||||
patternb = 2*$game_player.direction - 1
|
||||
meta = GameData::Metadata.get_player($PokemonGlobal.playerID)
|
||||
num = ($PokemonGlobal.surfing) ? 7 : 6
|
||||
@@ -887,7 +889,7 @@ def pbFishingBegin
|
||||
end
|
||||
|
||||
def pbFishingEnd
|
||||
if !pbCommonEvent(FISHING_END_COMMON_EVENT)
|
||||
if !pbCommonEvent(Settings::FISHING_END_COMMON_EVENT)
|
||||
patternb = 2*($game_player.direction - 2)
|
||||
meta = GameData::Metadata.get_player($PokemonGlobal.playerID)
|
||||
num = ($PokemonGlobal.surfing) ? 7 : 6
|
||||
@@ -927,7 +929,7 @@ def pbFishing(hasEncounter,rodType=1)
|
||||
break
|
||||
end
|
||||
if hasEncounter && rand(100)<biteChance
|
||||
$scene.spriteset.addUserAnimation(EXCLAMATION_ANIMATION_ID,$game_player.x,$game_player.y,true,3)
|
||||
$scene.spriteset.addUserAnimation(Settings::EXCLAMATION_ANIMATION_ID,$game_player.x,$game_player.y,true,3)
|
||||
frames = Graphics.frame_rate - rand(Graphics.frame_rate/2) # 0.5-1 second
|
||||
if !pbWaitForInput(msgWindow,message+_INTL("\r\nOh! A bite!"),frames)
|
||||
pbFishingEnd
|
||||
@@ -935,9 +937,9 @@ def pbFishing(hasEncounter,rodType=1)
|
||||
pbMessageDisplay(msgWindow,_INTL("The Pokémon got away..."))
|
||||
break
|
||||
end
|
||||
if FISHING_AUTO_HOOK || rand(100)<hookChance
|
||||
if Settings::FISHING_AUTO_HOOK || rand(100) < hookChance
|
||||
pbFishingEnd
|
||||
pbMessageDisplay(msgWindow,_INTL("Landed a Pokémon!")) if !FISHING_AUTO_HOOK
|
||||
pbMessageDisplay(msgWindow,_INTL("Landed a Pokémon!")) if !Settings::FISHING_AUTO_HOOK
|
||||
$game_player.setDefaultCharName(nil,oldpattern)
|
||||
ret = true
|
||||
break
|
||||
@@ -996,7 +998,7 @@ def pbWaitForInput(msgWindow,message,frames)
|
||||
$game_player.pattern = 0
|
||||
return true
|
||||
end
|
||||
break if !FISHING_AUTO_HOOK && numFrame>frames
|
||||
break if !Settings::FISHING_AUTO_HOOK && numFrame > frames
|
||||
numFrame += 1
|
||||
end
|
||||
return false
|
||||
|
||||
@@ -640,7 +640,7 @@ def pbStartOver(gameover=false)
|
||||
end
|
||||
pbCancelVehicles
|
||||
pbRemoveDependencies
|
||||
$game_switches[STARTING_OVER_SWITCH] = true
|
||||
$game_switches[Settings::STARTING_OVER_SWITCH] = true
|
||||
$game_temp.player_new_map_id = $PokemonGlobal.pokecenterMapId
|
||||
$game_temp.player_new_x = $PokemonGlobal.pokecenterX
|
||||
$game_temp.player_new_y = $PokemonGlobal.pokecenterY
|
||||
@@ -664,7 +664,7 @@ def pbStartOver(gameover=false)
|
||||
if homedata
|
||||
pbCancelVehicles
|
||||
pbRemoveDependencies
|
||||
$game_switches[STARTING_OVER_SWITCH] = true
|
||||
$game_switches[Settings::STARTING_OVER_SWITCH] = true
|
||||
$game_temp.player_new_map_id = homedata[0]
|
||||
$game_temp.player_new_x = homedata[1]
|
||||
$game_temp.player_new_y = homedata[2]
|
||||
|
||||
@@ -161,7 +161,7 @@ def pbPrepareBattle(battle)
|
||||
if GameData::MapMetadata.exists?($game_map.map_id) &&
|
||||
GameData::MapMetadata.get($game_map.map_id).battle_environment == PBEnvironment::Cave
|
||||
battle.time = 2 # This makes Dusk Balls work properly in caves
|
||||
elsif TIME_SHADING
|
||||
elsif Settings::TIME_SHADING
|
||||
timeNow = pbGetTimeNow
|
||||
if PBDayNight.isNight?(timeNow); battle.time = 2
|
||||
elsif PBDayNight.isEvening?(timeNow); battle.time = 1
|
||||
@@ -487,7 +487,7 @@ def pbTrainerBattle(trainerID, trainerName, endSpeech=nil,
|
||||
# If there is exactly 1 other triggered trainer event, and this trainer has
|
||||
# 6 or fewer Pokémon, record this trainer for a double battle caused by the
|
||||
# other triggered trainer event
|
||||
if otherEvent.length == 1 && trainer.party.length <= MAX_PARTY_SIZE
|
||||
if otherEvent.length == 1 && trainer.party.length <= Settings::MAX_PARTY_SIZE
|
||||
trainer.lose_text = endSpeech if endSpeech && !endSpeech.empty?
|
||||
$PokemonTemp.waitingTrainer = [trainer, thisEvent.id]
|
||||
return false
|
||||
@@ -579,7 +579,7 @@ end
|
||||
Events.onEndBattle += proc { |_sender,e|
|
||||
decision = e[0]
|
||||
canLose = e[1]
|
||||
if CHECK_EVOLUTION_AFTER_ALL_BATTLES || (decision!=2 && decision!=5) # not a loss or a draw
|
||||
if Settings::CHECK_EVOLUTION_AFTER_ALL_BATTLES || (decision!=2 && decision!=5) # not a loss or a draw
|
||||
if $PokemonTemp.evolutionLevels
|
||||
pbEvolutionCheck($PokemonTemp.evolutionLevels)
|
||||
$PokemonTemp.evolutionLevels = nil
|
||||
@@ -603,7 +603,7 @@ Events.onEndBattle += proc { |_sender,e|
|
||||
def pbEvolutionCheck(currentLevels)
|
||||
for i in 0...currentLevels.length
|
||||
pkmn = $Trainer.party[i]
|
||||
next if !pkmn || (pkmn.hp==0 && !CHECK_EVOLUTION_FOR_FAINTED_POKEMON)
|
||||
next if !pkmn || (pkmn.hp==0 && !Settings::CHECK_EVOLUTION_FOR_FAINTED_POKEMON)
|
||||
next if currentLevels[i] && pkmn.level==currentLevels[i]
|
||||
newSpecies = pbCheckEvolution(pkmn)
|
||||
next if !newSpecies
|
||||
|
||||
@@ -216,7 +216,7 @@ class PokemonEncounters
|
||||
# with modifiers applied, divided by 180.
|
||||
encount = @step_chances[enc_type].to_f
|
||||
encount *= 0.8 if $PokemonGlobal.bicycle
|
||||
if !FLUTES_CHANGE_WILD_ENCOUNTER_LEVELS
|
||||
if !Settings::FLUTES_CHANGE_WILD_ENCOUNTER_LEVELS
|
||||
encount /= 2 if $PokemonMap.blackFluteUsed
|
||||
encount *= 1.5 if $PokemonMap.whiteFluteUsed
|
||||
end
|
||||
@@ -253,7 +253,7 @@ class PokemonEncounters
|
||||
return false if !enc_data
|
||||
# Repel
|
||||
if !ignore_repel && $PokemonGlobal.repel > 0 && !pbPokeRadarOnShakingGrass
|
||||
first_pkmn = (REPEL_COUNTS_FAINTED_POKEMON) ? $Trainer.first_pokemon : $Trainer.first_able_pokemon
|
||||
first_pkmn = (Settings::REPEL_COUNTS_FAINTED_POKEMON) ? $Trainer.first_pokemon : $Trainer.first_able_pokemon
|
||||
return false if first_pkmn && enc_data[1] < first_pkmn.level
|
||||
end
|
||||
# Some abilities make wild encounters less likely if the wild Pokémon is
|
||||
@@ -391,7 +391,7 @@ class PokemonEncounters
|
||||
break
|
||||
end
|
||||
# Get the chosen species and level
|
||||
level = rand(encounter[2], encounter[3])
|
||||
level = rand(encounter[2]..encounter[3])
|
||||
# Some abilities alter the level of the wild Pokémon
|
||||
if first_pkmn
|
||||
case first_pkmn.ability_id
|
||||
@@ -400,11 +400,11 @@ class PokemonEncounters
|
||||
end
|
||||
end
|
||||
# Black Flute and White Flute alter the level of the wild Pokémon
|
||||
if FLUTES_CHANGE_WILD_ENCOUNTER_LEVELS
|
||||
if Settings::FLUTES_CHANGE_WILD_ENCOUNTER_LEVELS
|
||||
if $PokemonMap.blackFluteUsed
|
||||
level = [level + rand(1, 4), PBExperience.maxLevel].min
|
||||
level = [level + rand(1..4), PBExperience.maxLevel].min
|
||||
elsif $PokemonMap.whiteFluteUsed
|
||||
level = [level - rand(1, 4), 1].max
|
||||
level = [level - rand(1..4), 1].max
|
||||
end
|
||||
end
|
||||
# Return [species, level]
|
||||
@@ -441,7 +441,7 @@ class PokemonEncounters
|
||||
break
|
||||
end
|
||||
# Return [species, level]
|
||||
level = rand(encounter[2], encounter[3])
|
||||
level = rand(encounter[2]..encounter[3])
|
||||
return [encounter[1], level]
|
||||
end
|
||||
end
|
||||
@@ -477,9 +477,7 @@ def pbGenerateWildPokemon(species,level,isRoamer=false)
|
||||
end
|
||||
end
|
||||
# Give Pokérus
|
||||
if rand(65536)<POKERUS_CHANCE
|
||||
genwildpoke.givePokerus
|
||||
end
|
||||
genwildpoke.givePokerus if rand(65536) < Settings::POKERUS_CHANCE
|
||||
# Change wild Pokémon's gender/nature depending on the lead party Pokémon's
|
||||
# ability
|
||||
if first_pkmn
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
# Make all wild Pokémon shiny while a certain Switch is ON (see Settings).
|
||||
Events.onWildPokemonCreate += proc { |_sender, e|
|
||||
pokemon = e[0]
|
||||
if $game_switches[SHINY_WILD_POKEMON_SWITCH]
|
||||
if $game_switches[Settings::SHINY_WILD_POKEMON_SWITCH]
|
||||
pokemon.shiny = true
|
||||
end
|
||||
}
|
||||
|
||||
@@ -27,9 +27,9 @@ end
|
||||
# Gets the roaming areas for a particular Pokémon.
|
||||
def pbRoamingAreas(idxRoamer)
|
||||
# [species ID, level, Game Switch, encounter type, battle BGM, area maps hash]
|
||||
roamData = ROAMING_SPECIES[idxRoamer]
|
||||
roamData = Settings::ROAMING_SPECIES[idxRoamer]
|
||||
return roamData[5] if roamData && roamData[5]
|
||||
return ROAMING_AREAS
|
||||
return Settings::ROAMING_AREAS
|
||||
end
|
||||
|
||||
# Puts a roamer in a completely random map available to it.
|
||||
@@ -45,14 +45,14 @@ def pbRoamPokemon
|
||||
# Start all roamers off in random maps
|
||||
if !$PokemonGlobal.roamPosition
|
||||
$PokemonGlobal.roamPosition = {}
|
||||
for i in 0...ROAMING_SPECIES.length
|
||||
for i in 0...Settings::ROAMING_SPECIES.length
|
||||
next if !GameData::Species.exists?(i[0])
|
||||
keys = pbRoamingAreas(i).keys
|
||||
$PokemonGlobal.roamPosition[i] = keys[rand(keys.length)]
|
||||
end
|
||||
end
|
||||
# Roam each Pokémon in turn
|
||||
for i in 0...ROAMING_SPECIES.length
|
||||
for i in 0...Settings::ROAMING_SPECIES.length
|
||||
pbRoamPokemonOne(i)
|
||||
end
|
||||
end
|
||||
@@ -61,7 +61,7 @@ end
|
||||
# currently possible to encounter it (i.e. its Game Switch is off).
|
||||
def pbRoamPokemonOne(idxRoamer)
|
||||
# [species ID, level, Game Switch, encounter type, battle BGM, area maps hash]
|
||||
roamData = ROAMING_SPECIES[idxRoamer]
|
||||
roamData = Settings::ROAMING_SPECIES[idxRoamer]
|
||||
return if roamData[2]>0 && !$game_switches[roamData[2]] # Game Switch is off
|
||||
return if !GameData::Species.exists?(roamData[0])
|
||||
# Get hash of area patrolled by the roaming Pokémon
|
||||
@@ -151,7 +151,7 @@ EncounterModifier.register(proc { |encounter|
|
||||
currentRegion = pbGetCurrentRegion
|
||||
currentMapName = pbGetMessage(MessageTypes::MapNames, $game_map.map_id)
|
||||
possible_roamers = []
|
||||
ROAMING_SPECIES.each_with_index do |data, i|
|
||||
Settings::ROAMING_SPECIES.each_with_index do |data, i|
|
||||
# data = [species, level, Game Switch, roamer method, battle BGM, area maps hash]
|
||||
next if !GameData::Species.exists?(data[0])
|
||||
next if data[2] > 0 && !$game_switches[data[2]] # Isn't roaming
|
||||
|
||||
@@ -85,8 +85,8 @@ module DungeonMaze
|
||||
paintTile(dungeon, xDst, yDst, tile, rotation)
|
||||
return false if rand(100) < 30
|
||||
# Generate a randomly placed room
|
||||
width = rand(MINWIDTH, MAXWIDTH)
|
||||
height = rand(MINHEIGHT, MAXHEIGHT)
|
||||
width = rand(MINWIDTH..MAXWIDTH)
|
||||
height = rand(MINHEIGHT..MAXHEIGHT)
|
||||
return false if width <= 0 || height <= 0
|
||||
centerX = TILE_WIDTH / 2 + rand(5) - 2
|
||||
centerY = TILE_HEIGHT / 2 + rand(5) - 2
|
||||
|
||||
@@ -55,7 +55,7 @@ end
|
||||
def pbCheckHiddenMoveBadge(badge=-1,showmsg=true)
|
||||
return true if badge<0 # No badge requirement
|
||||
return true if $DEBUG
|
||||
if (FIELD_MOVES_COUNT_BADGES) ? $Trainer.badge_count >= badge : $Trainer.badges[badge]
|
||||
if (Settings::FIELD_MOVES_COUNT_BADGES) ? $Trainer.badge_count >= badge : $Trainer.badges[badge]
|
||||
return true
|
||||
end
|
||||
pbMessage(_INTL("Sorry, a new Badge is required.")) if showmsg
|
||||
@@ -188,7 +188,7 @@ end
|
||||
def pbCut
|
||||
move = :CUT
|
||||
movefinder = $Trainer.get_pokemon_with_move(move)
|
||||
if !pbCheckHiddenMoveBadge(BADGE_FOR_CUT,false) || (!$DEBUG && !movefinder)
|
||||
if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_CUT,false) || (!$DEBUG && !movefinder)
|
||||
pbMessage(_INTL("This tree looks like it can be cut down."))
|
||||
return false
|
||||
end
|
||||
@@ -203,7 +203,7 @@ def pbCut
|
||||
end
|
||||
|
||||
HiddenMoveHandlers::CanUseMove.add(:CUT,proc { |move,pkmn,showmsg|
|
||||
next false if !pbCheckHiddenMoveBadge(BADGE_FOR_CUT,showmsg)
|
||||
next false if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_CUT,showmsg)
|
||||
facingEvent = $game_player.pbFacingEvent
|
||||
if !facingEvent || facingEvent.name.downcase!="tree"
|
||||
pbMessage(_INTL("Can't use that here.")) if showmsg
|
||||
@@ -298,7 +298,7 @@ def pbDive
|
||||
return false if !map_metadata || !map_metadata.dive_map_id
|
||||
move = :DIVE
|
||||
movefinder = $Trainer.get_pokemon_with_move(move)
|
||||
if !pbCheckHiddenMoveBadge(BADGE_FOR_DIVE,false) || (!$DEBUG && !movefinder)
|
||||
if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_DIVE,false) || (!$DEBUG && !movefinder)
|
||||
pbMessage(_INTL("The sea is deep here. A Pokémon may be able to go underwater."))
|
||||
return false
|
||||
end
|
||||
@@ -334,7 +334,7 @@ def pbSurfacing
|
||||
return if !surface_map_id
|
||||
move = :DIVE
|
||||
movefinder = $Trainer.get_pokemon_with_move(move)
|
||||
if !pbCheckHiddenMoveBadge(BADGE_FOR_DIVE,false) || (!$DEBUG && !movefinder)
|
||||
if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_DIVE,false) || (!$DEBUG && !movefinder)
|
||||
pbMessage(_INTL("Light is filtering down from above. A Pokémon may be able to surface here."))
|
||||
return false
|
||||
end
|
||||
@@ -390,7 +390,7 @@ Events.onAction += proc { |_sender, _e|
|
||||
}
|
||||
|
||||
HiddenMoveHandlers::CanUseMove.add(:DIVE,proc { |move,pkmn,showmsg|
|
||||
next false if !pbCheckHiddenMoveBadge(BADGE_FOR_DIVE,showmsg)
|
||||
next false if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_DIVE,showmsg)
|
||||
if $PokemonGlobal.diving
|
||||
surface_map_id = nil
|
||||
GameData::MapMetadata.each do |map_data|
|
||||
@@ -455,7 +455,7 @@ HiddenMoveHandlers::UseMove.add(:DIVE,proc { |move,pokemon|
|
||||
# Flash
|
||||
#===============================================================================
|
||||
HiddenMoveHandlers::CanUseMove.add(:FLASH,proc { |move,pkmn,showmsg|
|
||||
next false if !pbCheckHiddenMoveBadge(BADGE_FOR_FLASH,showmsg)
|
||||
next false if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_FLASH,showmsg)
|
||||
if !GameData::MapMetadata.exists?($game_map.map_id) ||
|
||||
!GameData::MapMetadata.get($game_map.map_id).dark_map
|
||||
pbMessage(_INTL("Can't use that here.")) if showmsg
|
||||
@@ -492,7 +492,7 @@ HiddenMoveHandlers::UseMove.add(:FLASH,proc { |move,pokemon|
|
||||
# Fly
|
||||
#===============================================================================
|
||||
HiddenMoveHandlers::CanUseMove.add(:FLY,proc { |move,pkmn,showmsg|
|
||||
next false if !pbCheckHiddenMoveBadge(BADGE_FOR_FLY,showmsg)
|
||||
next false if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_FLY,showmsg)
|
||||
if $game_player.pbHasDependentEvents?
|
||||
pbMessage(_INTL("It can't be used when you have someone with you.")) if showmsg
|
||||
next false
|
||||
@@ -600,7 +600,7 @@ end
|
||||
def pbRockSmash
|
||||
move = :ROCKSMASH
|
||||
movefinder = $Trainer.get_pokemon_with_move(move)
|
||||
if !pbCheckHiddenMoveBadge(BADGE_FOR_ROCKSMASH,false) || (!$DEBUG && !movefinder)
|
||||
if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_ROCKSMASH,false) || (!$DEBUG && !movefinder)
|
||||
pbMessage(_INTL("It's a rugged rock, but a Pokémon may be able to smash it."))
|
||||
return false
|
||||
end
|
||||
@@ -614,7 +614,7 @@ def pbRockSmash
|
||||
end
|
||||
|
||||
HiddenMoveHandlers::CanUseMove.add(:ROCKSMASH,proc { |move,pkmn,showmsg|
|
||||
next false if !pbCheckHiddenMoveBadge(BADGE_FOR_ROCKSMASH,showmsg)
|
||||
next false if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_ROCKSMASH,showmsg)
|
||||
facingEvent = $game_player.pbFacingEvent
|
||||
if !facingEvent || facingEvent.name.downcase!="rock"
|
||||
pbMessage(_INTL("Can't use that here.")) if showmsg
|
||||
@@ -647,7 +647,7 @@ def pbStrength
|
||||
end
|
||||
move = :STRENGTH
|
||||
movefinder = $Trainer.get_pokemon_with_move(move)
|
||||
if !pbCheckHiddenMoveBadge(BADGE_FOR_STRENGTH,false) || (!$DEBUG && !movefinder)
|
||||
if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_STRENGTH,false) || (!$DEBUG && !movefinder)
|
||||
pbMessage(_INTL("It's a big boulder, but a Pokémon may be able to push it aside."))
|
||||
return false
|
||||
end
|
||||
@@ -669,7 +669,7 @@ Events.onAction += proc { |_sender,_e|
|
||||
}
|
||||
|
||||
HiddenMoveHandlers::CanUseMove.add(:STRENGTH,proc { |move,pkmn,showmsg|
|
||||
next false if !pbCheckHiddenMoveBadge(BADGE_FOR_STRENGTH,showmsg)
|
||||
next false if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_STRENGTH,showmsg)
|
||||
if $PokemonMap.strengthUsed
|
||||
pbMessage(_INTL("Strength is already being used.")) if showmsg
|
||||
next false
|
||||
@@ -696,7 +696,7 @@ def pbSurf
|
||||
return false if $game_player.pbHasDependentEvents?
|
||||
move = :SURF
|
||||
movefinder = $Trainer.get_pokemon_with_move(move)
|
||||
if !pbCheckHiddenMoveBadge(BADGE_FOR_SURF,false) || (!$DEBUG && !movefinder)
|
||||
if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_SURF,false) || (!$DEBUG && !movefinder)
|
||||
return false
|
||||
end
|
||||
if pbConfirmMessage(_INTL("The water is a deep blue...\nWould you like to surf on it?"))
|
||||
@@ -765,7 +765,7 @@ Events.onAction += proc { |_sender,_e|
|
||||
}
|
||||
|
||||
HiddenMoveHandlers::CanUseMove.add(:SURF,proc { |move,pkmn,showmsg|
|
||||
next false if !pbCheckHiddenMoveBadge(BADGE_FOR_SURF,showmsg)
|
||||
next false if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_SURF,showmsg)
|
||||
if $PokemonGlobal.surfing
|
||||
pbMessage(_INTL("You're already surfing.")) if showmsg
|
||||
next false
|
||||
@@ -948,7 +948,7 @@ end
|
||||
def pbWaterfall
|
||||
move = :WATERFALL
|
||||
movefinder = $Trainer.get_pokemon_with_move(move)
|
||||
if !pbCheckHiddenMoveBadge(BADGE_FOR_WATERFALL,false) || (!$DEBUG && !movefinder)
|
||||
if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_WATERFALL,false) || (!$DEBUG && !movefinder)
|
||||
pbMessage(_INTL("A wall of water is crashing down with a mighty roar."))
|
||||
return false
|
||||
end
|
||||
@@ -972,7 +972,7 @@ Events.onAction += proc { |_sender,_e|
|
||||
}
|
||||
|
||||
HiddenMoveHandlers::CanUseMove.add(:WATERFALL,proc { |move,pkmn,showmsg|
|
||||
next false if !pbCheckHiddenMoveBadge(BADGE_FOR_WATERFALL,showmsg)
|
||||
next false if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_WATERFALL,showmsg)
|
||||
if pbFacingTerrainTag!=PBTerrain::Waterfall
|
||||
pbMessage(_INTL("Can't use that here.")) if showmsg
|
||||
next false
|
||||
|
||||
@@ -266,7 +266,7 @@ class BerryPlantSprite
|
||||
@event.character_name="Object ball"
|
||||
end
|
||||
if @oldstage!=berryData[0] && berryData.length>6 # Gen 4 growth mechanisms
|
||||
$scene.spriteset.addUserAnimation(PLANT_SPARKLE_ANIMATION_ID,@event.x,@event.y,false,1) if $scene.spriteset
|
||||
$scene.spriteset.addUserAnimation(Settings::PLANT_SPARKLE_ANIMATION_ID,@event.x,@event.y,false,1) if $scene.spriteset
|
||||
end
|
||||
end
|
||||
@oldstage=berryData[0]
|
||||
@@ -280,7 +280,7 @@ def pbBerryPlant
|
||||
thisEvent=interp.get_character(0)
|
||||
berryData=interp.getVariable
|
||||
if !berryData
|
||||
if NEW_BERRY_PLANTS
|
||||
if Settings::NEW_BERRY_PLANTS
|
||||
berryData=[0,nil,0,0,0,0,0,0]
|
||||
else
|
||||
berryData=[0,nil,false,0,0,0]
|
||||
@@ -298,7 +298,7 @@ def pbBerryPlant
|
||||
berry=berryData[1]
|
||||
case berryData[0]
|
||||
when 0 # empty
|
||||
if NEW_BERRY_PLANTS
|
||||
if Settings::NEW_BERRY_PLANTS
|
||||
# Gen 4 planting mechanics
|
||||
if !berryData[7] || berryData[7]==0 # No mulch used yet
|
||||
cmd=pbMessage(_INTL("It's soft, earthy soil."),[
|
||||
@@ -421,7 +421,7 @@ def pbBerryPlant
|
||||
when 3 # X taller
|
||||
pbMessage(_INTL("The {1} plant is growing bigger.",GameData::Item.get(berry).name))
|
||||
when 4 # X flowering
|
||||
if NEW_BERRY_PLANTS
|
||||
if Settings::NEW_BERRY_PLANTS
|
||||
pbMessage(_INTL("This {1} plant is in bloom!",GameData::Item.get(berry).name))
|
||||
else
|
||||
case berryData[4]
|
||||
@@ -475,7 +475,7 @@ def pbBerryPlant
|
||||
end
|
||||
pbMessage(_INTL("{1} put the \\c[1]{2}\\c[0] in the <icon=bagPocket{3}>\\c[1]{4}\\c[0] Pocket.\1",
|
||||
$Trainer.name,itemname,pocket,PokemonBag.pocketNames()[pocket]))
|
||||
if NEW_BERRY_PLANTS
|
||||
if Settings::NEW_BERRY_PLANTS
|
||||
pbMessage(_INTL("The soil returned to its soft and earthy state."))
|
||||
berryData=[0,nil,0,0,0,0,0,0]
|
||||
else
|
||||
@@ -502,7 +502,7 @@ def pbBerryPlant
|
||||
end
|
||||
interp.setVariable(berryData)
|
||||
pbMessage(_INTL("{1} watered the plant.\\wtnp[40]",$Trainer.name))
|
||||
if NEW_BERRY_PLANTS
|
||||
if Settings::NEW_BERRY_PLANTS
|
||||
pbMessage(_INTL("There! All happy!"))
|
||||
else
|
||||
pbMessage(_INTL("The plant seemed to be delighted."))
|
||||
@@ -538,7 +538,7 @@ def pbPickBerry(berry, qty = 1)
|
||||
pocket = berry.pocket
|
||||
pbMessage(_INTL("{1} put the \\c[1]{2}\\c[0] in the <icon=bagPocket{3}>\\c[1]{4}\\c[0] Pocket.\1",
|
||||
$Trainer.name,itemname,pocket,PokemonBag.pocketNames()[pocket]))
|
||||
if NEW_BERRY_PLANTS
|
||||
if Settings::NEW_BERRY_PLANTS
|
||||
pbMessage(_INTL("The soil returned to its soft and earthy state."))
|
||||
berryData=[0,nil,0,0,0,0,0,0]
|
||||
else
|
||||
|
||||
@@ -186,7 +186,7 @@ def pbDayCareGenerateEgg
|
||||
end
|
||||
end
|
||||
# Generate egg
|
||||
egg = Pokemon.new(babyspecies,EGG_LEVEL)
|
||||
egg = Pokemon.new(babyspecies, Settings::EGG_LEVEL)
|
||||
# Randomise personal ID
|
||||
pid = rand(65536)
|
||||
pid |= (rand(65536)<<16)
|
||||
@@ -217,7 +217,7 @@ def pbDayCareGenerateEgg
|
||||
# Initial Moves
|
||||
initialmoves = egg.getMoveList
|
||||
for k in initialmoves
|
||||
if k[0]<=EGG_LEVEL
|
||||
if k[0] <= Settings::EGG_LEVEL
|
||||
moves.push(k[1])
|
||||
elsif mother.hasMove?(k[1]) && father.hasMove?(k[1])
|
||||
othermoves.push(k[1])
|
||||
@@ -228,7 +228,7 @@ def pbDayCareGenerateEgg
|
||||
moves.push(move)
|
||||
end
|
||||
# Inheriting Machine Moves
|
||||
if BREEDING_CAN_INHERIT_MACHINE_MOVES
|
||||
if Settings::BREEDING_CAN_INHERIT_MACHINE_MOVES
|
||||
GameData::Item.each do |i|
|
||||
atk = i.move
|
||||
next if !atk
|
||||
@@ -242,7 +242,7 @@ def pbDayCareGenerateEgg
|
||||
if movefather.male?
|
||||
babyEggMoves.each { |m| moves.push(m) if movefather.hasMove?(m) }
|
||||
end
|
||||
if BREEDING_CAN_INHERIT_EGG_MOVES_FROM_MOTHER
|
||||
if Settings::BREEDING_CAN_INHERIT_EGG_MOVES_FROM_MOTHER
|
||||
babyEggMoves.each { |m| moves.push(m) if movemother.hasMove?(m) }
|
||||
end
|
||||
# Volt Tackle
|
||||
@@ -361,7 +361,7 @@ def pbDayCareGenerateEgg
|
||||
egg.obtain_text = _INTL("Day-Care Couple")
|
||||
egg.name = _INTL("Egg")
|
||||
egg.steps_to_hatch = egg.species_data.hatch_steps
|
||||
egg.givePokerus if rand(65536)<POKERUS_CHANCE
|
||||
egg.givePokerus if rand(65536) < Settings::POKERUS_CHANCE
|
||||
# Add egg to party
|
||||
$Trainer.party[$Trainer.party.length] = egg
|
||||
end
|
||||
|
||||
@@ -79,7 +79,7 @@ module PBDayNight
|
||||
# tone for the current time of day.
|
||||
def self.getTone
|
||||
@cachedTone = Tone.new(0,0,0) if !@cachedTone
|
||||
return @cachedTone if !TIME_SHADING
|
||||
return @cachedTone if !Settings::TIME_SHADING
|
||||
if !@dayNightToneLastUpdate ||
|
||||
Graphics.frame_count-@dayNightToneLastUpdate>=Graphics.frame_rate*30
|
||||
getToneInternal
|
||||
@@ -117,7 +117,7 @@ end
|
||||
|
||||
def pbDayNightTint(object)
|
||||
return if !$scene.is_a?(Scene_Map)
|
||||
if TIME_SHADING && GameData::MapMetadata.exists?($game_map.map_id) &&
|
||||
if Settings::TIME_SHADING && GameData::MapMetadata.exists?($game_map.map_id) &&
|
||||
GameData::MapMetadata.get($game_map.map_id).outdoor_map
|
||||
tone = PBDayNight.getTone
|
||||
object.tone.set(tone.red,tone.green,tone.blue,tone.gray)
|
||||
|
||||
@@ -77,7 +77,7 @@ class Trainer
|
||||
end
|
||||
|
||||
def party_full?
|
||||
return party_count >= MAX_PARTY_SIZE
|
||||
return party_count >= Settings::MAX_PARTY_SIZE
|
||||
end
|
||||
|
||||
# Returns true if there are no usable Pokémon in the player's party.
|
||||
@@ -211,7 +211,7 @@ class PlayerTrainer < Trainer
|
||||
end
|
||||
|
||||
def money=(value)
|
||||
@money = value.clamp(0, MAX_MONEY)
|
||||
@money = value.clamp(0, Settings::MAX_MONEY)
|
||||
end
|
||||
|
||||
def badge_count
|
||||
@@ -301,7 +301,7 @@ class PlayerTrainer < Trainer
|
||||
@character_ID = nil
|
||||
@outfit = 0
|
||||
@badges = [false] * 8
|
||||
@money = INITIAL_MONEY
|
||||
@money = Settings::INITIAL_MONEY
|
||||
clear_pokedex
|
||||
@pokegear = false
|
||||
@pokedex = false
|
||||
|
||||
@@ -19,7 +19,7 @@ end
|
||||
|
||||
def pbNewTrainer(tr_type, tr_name, tr_version, save_changes = true)
|
||||
party = []
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
if i == 0
|
||||
pbMessage(_INTL("Please enter the first Pokémon.",i))
|
||||
else
|
||||
|
||||
@@ -432,7 +432,7 @@ def pbLearnMove(pkmn,move,ignoreifknown=false,bymachine=false,&block)
|
||||
oldmovename = pkmn.moves[forgetmove].name
|
||||
oldmovepp = pkmn.moves[forgetmove].pp
|
||||
pkmn.moves[forgetmove] = Pokemon::Move.new(move) # Replaces current/total PP
|
||||
if bymachine && TAUGHT_MACHINES_KEEP_OLD_PP
|
||||
if bymachine && Settings::TAUGHT_MACHINES_KEEP_OLD_PP
|
||||
pkmn.moves[forgetmove].pp = [oldmovepp,pkmn.moves[forgetmove].total_pp].min
|
||||
end
|
||||
pbMessage(_INTL("1,\\wt[16] 2, and\\wt[16]...\\wt[16] ...\\wt[16] ... Ta-da!\\se[Battle ball drop]\1"),&block)
|
||||
|
||||
@@ -372,7 +372,7 @@ ItemHandlers::UseOnPokemon.add(:POTION,proc { |item,pkmn,scene|
|
||||
})
|
||||
|
||||
ItemHandlers::UseOnPokemon.copy(:POTION,:BERRYJUICE,:SWEETHEART)
|
||||
ItemHandlers::UseOnPokemon.copy(:POTION,:RAGECANDYBAR) if !RAGE_CANDY_BAR_CURES_STATUS_PROBLEMS
|
||||
ItemHandlers::UseOnPokemon.copy(:POTION,:RAGECANDYBAR) if !Settings::RAGE_CANDY_BAR_CURES_STATUS_PROBLEMS
|
||||
|
||||
ItemHandlers::UseOnPokemon.add(:SUPERPOTION,proc { |item,pkmn,scene|
|
||||
next pbHPItem(pkmn,50,scene)
|
||||
@@ -489,7 +489,7 @@ ItemHandlers::UseOnPokemon.add(:FULLHEAL,proc { |item,pkmn,scene|
|
||||
ItemHandlers::UseOnPokemon.copy(:FULLHEAL,
|
||||
:LAVACOOKIE,:OLDGATEAU,:CASTELIACONE,:LUMIOSEGALETTE,:SHALOURSABLE,
|
||||
:BIGMALASADA,:LUMBERRY)
|
||||
ItemHandlers::UseOnPokemon.copy(:FULLHEAL,:RAGECANDYBAR) if RAGE_CANDY_BAR_CURES_STATUS_PROBLEMS
|
||||
ItemHandlers::UseOnPokemon.copy(:FULLHEAL,:RAGECANDYBAR) if Settings::RAGE_CANDY_BAR_CURES_STATUS_PROBLEMS
|
||||
|
||||
ItemHandlers::UseOnPokemon.add(:FULLRESTORE,proc { |item,pkmn,scene|
|
||||
if pkmn.fainted? || (pkmn.hp==pkmn.totalhp && pkmn.status==PBStatuses::NONE)
|
||||
|
||||
@@ -66,7 +66,7 @@ ItemHandlers::CanUseInBattle.copy(:POTION,
|
||||
:SUPERPOTION,:HYPERPOTION,:MAXPOTION,:BERRYJUICE,:SWEETHEART,:FRESHWATER,
|
||||
:SODAPOP,:LEMONADE,:MOOMOOMILK,:ORANBERRY,:SITRUSBERRY,:ENERGYPOWDER,
|
||||
:ENERGYROOT)
|
||||
ItemHandlers::CanUseInBattle.copy(:POTION,:RAGECANDYBAR) if !RAGE_CANDY_BAR_CURES_STATUS_PROBLEMS
|
||||
ItemHandlers::CanUseInBattle.copy(:POTION,:RAGECANDYBAR) if !Settings::RAGE_CANDY_BAR_CURES_STATUS_PROBLEMS
|
||||
|
||||
ItemHandlers::CanUseInBattle.add(:AWAKENING,proc { |item,pokemon,battler,move,firstAction,battle,scene,showMessages|
|
||||
next pbBattleItemCanCureStatus?(PBStatuses::SLEEP,pokemon,scene,showMessages)
|
||||
@@ -119,7 +119,7 @@ ItemHandlers::CanUseInBattle.add(:FULLHEAL,proc { |item,pokemon,battler,move,fir
|
||||
ItemHandlers::CanUseInBattle.copy(:FULLHEAL,
|
||||
:LAVACOOKIE,:OLDGATEAU,:CASTELIACONE,:LUMIOSEGALETTE,:SHALOURSABLE,
|
||||
:BIGMALASADA,:LUMBERRY,:HEALPOWDER)
|
||||
ItemHandlers::CanUseInBattle.copy(:FULLHEAL,:RAGECANDYBAR) if RAGE_CANDY_BAR_CURES_STATUS_PROBLEMS
|
||||
ItemHandlers::CanUseInBattle.copy(:FULLHEAL,:RAGECANDYBAR) if Settings::RAGE_CANDY_BAR_CURES_STATUS_PROBLEMS
|
||||
|
||||
ItemHandlers::CanUseInBattle.add(:FULLRESTORE,proc { |item,pokemon,battler,move,firstAction,battle,scene,showMessages|
|
||||
if !pokemon.able? ||
|
||||
@@ -317,7 +317,7 @@ ItemHandlers::BattleUseOnPokemon.add(:POTION,proc { |item,pokemon,battler,choice
|
||||
})
|
||||
|
||||
ItemHandlers::BattleUseOnPokemon.copy(:POTION,:BERRYJUICE,:SWEETHEART)
|
||||
ItemHandlers::BattleUseOnPokemon.copy(:POTION,:RAGECANDYBAR) if !RAGE_CANDY_BAR_CURES_STATUS_PROBLEMS
|
||||
ItemHandlers::BattleUseOnPokemon.copy(:POTION,:RAGECANDYBAR) if !Settings::RAGE_CANDY_BAR_CURES_STATUS_PROBLEMS
|
||||
|
||||
ItemHandlers::BattleUseOnPokemon.add(:SUPERPOTION,proc { |item,pokemon,battler,choices,scene|
|
||||
pbBattleHPItem(pokemon,battler,50,scene)
|
||||
@@ -417,7 +417,7 @@ ItemHandlers::BattleUseOnPokemon.add(:FULLHEAL,proc { |item,pokemon,battler,choi
|
||||
ItemHandlers::BattleUseOnPokemon.copy(:FULLHEAL,
|
||||
:LAVACOOKIE,:OLDGATEAU,:CASTELIACONE,:LUMIOSEGALETTE,:SHALOURSABLE,
|
||||
:BIGMALASADA,:LUMBERRY)
|
||||
ItemHandlers::BattleUseOnPokemon.copy(:FULLHEAL,:RAGECANDYBAR) if RAGE_CANDY_BAR_CURES_STATUS_PROBLEMS
|
||||
ItemHandlers::BattleUseOnPokemon.copy(:FULLHEAL,:RAGECANDYBAR) if Settings::RAGE_CANDY_BAR_CURES_STATUS_PROBLEMS
|
||||
|
||||
ItemHandlers::BattleUseOnPokemon.add(:FULLRESTORE,proc { |item,pokemon,battler,choices,scene|
|
||||
pokemon.heal_status
|
||||
@@ -523,7 +523,7 @@ ItemHandlers::BattleUseOnBattler.add(:YELLOWFLUTE,proc { |item,battler,scene|
|
||||
ItemHandlers::BattleUseOnBattler.copy(:YELLOWFLUTE,:PERSIMBERRY)
|
||||
|
||||
ItemHandlers::BattleUseOnBattler.add(:XATTACK,proc { |item,battler,scene|
|
||||
battler.pbRaiseStatStage(PBStats::ATTACK,(X_STAT_ITEMS_RAISE_BY_TWO_STAGES) ? 2 : 1,battler)
|
||||
battler.pbRaiseStatStage(PBStats::ATTACK,(Settings::X_STAT_ITEMS_RAISE_BY_TWO_STAGES) ? 2 : 1,battler)
|
||||
battler.pokemon.changeHappiness("battleitem")
|
||||
})
|
||||
|
||||
@@ -543,7 +543,7 @@ ItemHandlers::BattleUseOnBattler.add(:XATTACK6,proc { |item,battler,scene|
|
||||
})
|
||||
|
||||
ItemHandlers::BattleUseOnBattler.add(:XDEFENSE,proc { |item,battler,scene|
|
||||
battler.pbRaiseStatStage(PBStats::DEFENSE,(X_STAT_ITEMS_RAISE_BY_TWO_STAGES) ? 2 : 1,battler)
|
||||
battler.pbRaiseStatStage(PBStats::DEFENSE,(Settings::X_STAT_ITEMS_RAISE_BY_TWO_STAGES) ? 2 : 1,battler)
|
||||
battler.pokemon.changeHappiness("battleitem")
|
||||
})
|
||||
|
||||
@@ -571,7 +571,7 @@ ItemHandlers::BattleUseOnBattler.add(:XDEFENSE6,proc { |item,battler,scene|
|
||||
ItemHandlers::BattleUseOnBattler.copy(:XDEFENSE6,:XDEFEND6)
|
||||
|
||||
ItemHandlers::BattleUseOnBattler.add(:XSPATK,proc { |item,battler,scene|
|
||||
battler.pbRaiseStatStage(PBStats::SPATK,(X_STAT_ITEMS_RAISE_BY_TWO_STAGES) ? 2 : 1,battler)
|
||||
battler.pbRaiseStatStage(PBStats::SPATK,(Settings::X_STAT_ITEMS_RAISE_BY_TWO_STAGES) ? 2 : 1,battler)
|
||||
battler.pokemon.changeHappiness("battleitem")
|
||||
})
|
||||
|
||||
@@ -599,7 +599,7 @@ ItemHandlers::BattleUseOnBattler.add(:XSPATK6,proc { |item,battler,scene|
|
||||
ItemHandlers::BattleUseOnBattler.copy(:XSPATK6,:XSPECIAL6)
|
||||
|
||||
ItemHandlers::BattleUseOnBattler.add(:XSPDEF,proc { |item,battler,scene|
|
||||
battler.pbRaiseStatStage(PBStats::SPDEF,(X_STAT_ITEMS_RAISE_BY_TWO_STAGES) ? 2 : 1,battler)
|
||||
battler.pbRaiseStatStage(PBStats::SPDEF,(Settings::X_STAT_ITEMS_RAISE_BY_TWO_STAGES) ? 2 : 1,battler)
|
||||
battler.pokemon.changeHappiness("battleitem")
|
||||
})
|
||||
|
||||
@@ -619,7 +619,7 @@ ItemHandlers::BattleUseOnBattler.add(:XSPDEF6,proc { |item,battler,scene|
|
||||
})
|
||||
|
||||
ItemHandlers::BattleUseOnBattler.add(:XSPEED,proc { |item,battler,scene|
|
||||
battler.pbRaiseStatStage(PBStats::SPEED,(X_STAT_ITEMS_RAISE_BY_TWO_STAGES) ? 2 : 1,battler)
|
||||
battler.pbRaiseStatStage(PBStats::SPEED,(Settings::X_STAT_ITEMS_RAISE_BY_TWO_STAGES) ? 2 : 1,battler)
|
||||
battler.pokemon.changeHappiness("battleitem")
|
||||
})
|
||||
|
||||
@@ -639,7 +639,7 @@ ItemHandlers::BattleUseOnBattler.add(:XSPEED6,proc { |item,battler,scene|
|
||||
})
|
||||
|
||||
ItemHandlers::BattleUseOnBattler.add(:XACCURACY,proc { |item,battler,scene|
|
||||
battler.pbRaiseStatStage(PBStats::ACCURACY,(X_STAT_ITEMS_RAISE_BY_TWO_STAGES) ? 2 : 1,battler)
|
||||
battler.pbRaiseStatStage(PBStats::ACCURACY,(Settings::X_STAT_ITEMS_RAISE_BY_TWO_STAGES) ? 2 : 1,battler)
|
||||
battler.pokemon.changeHappiness("battleitem")
|
||||
})
|
||||
|
||||
|
||||
@@ -76,11 +76,11 @@ def pbPokeRadarHighlightGrass(showmessage=true)
|
||||
if PBTerrain.isJustGrass?($game_map.terrain_tag(x,y))
|
||||
# Choose a rarity for the grass (0=normal, 1=rare, 2=shiny)
|
||||
s = (rand(100) < 25) ? 1 : 0
|
||||
if $PokemonTemp.pokeradar && $PokemonTemp.pokeradar[2]>0
|
||||
v = [(65536/SHINY_POKEMON_CHANCE)-$PokemonTemp.pokeradar[2]*200,200].max
|
||||
v = 0xFFFF/v
|
||||
v = rand(65536)/v
|
||||
s = 2 if v==0
|
||||
if $PokemonTemp.pokeradar && $PokemonTemp.pokeradar[2] > 0
|
||||
v = [(65536 / Settings::SHINY_POKEMON_CHANCE) - $PokemonTemp.pokeradar[2] * 200, 200].max
|
||||
v = 0xFFFF / v
|
||||
v = rand(65536) / v
|
||||
s = 2 if v == 0
|
||||
end
|
||||
grasses.push([x,y,i,s])
|
||||
end
|
||||
@@ -95,11 +95,11 @@ def pbPokeRadarHighlightGrass(showmessage=true)
|
||||
for grass in grasses
|
||||
case grass[3]
|
||||
when 0 # Normal rustle
|
||||
$scene.spriteset.addUserAnimation(RUSTLE_NORMAL_ANIMATION_ID,grass[0],grass[1],true,1)
|
||||
$scene.spriteset.addUserAnimation(Settings::RUSTLE_NORMAL_ANIMATION_ID,grass[0],grass[1],true,1)
|
||||
when 1 # Vigorous rustle
|
||||
$scene.spriteset.addUserAnimation(RUSTLE_VIGOROUS_ANIMATION_ID,grass[0],grass[1],true,1)
|
||||
$scene.spriteset.addUserAnimation(Settings::RUSTLE_VIGOROUS_ANIMATION_ID,grass[0],grass[1],true,1)
|
||||
when 2 # Shiny rustle
|
||||
$scene.spriteset.addUserAnimation(RUSTLE_SHINY_ANIMATION_ID,grass[0],grass[1],true,1)
|
||||
$scene.spriteset.addUserAnimation(Settings::RUSTLE_SHINY_ANIMATION_ID,grass[0],grass[1],true,1)
|
||||
end
|
||||
end
|
||||
$PokemonTemp.pokeradar[3] = grasses if $PokemonTemp.pokeradar
|
||||
@@ -127,7 +127,7 @@ def pbPokeRadarGetEncounter(rarity = 0)
|
||||
# Get all Poké Radar-exclusive encounters for this map
|
||||
map = $game_map.map_id
|
||||
array = []
|
||||
POKE_RADAR_ENCOUNTERS.each do |enc|
|
||||
Settings::POKE_RADAR_ENCOUNTERS.each do |enc|
|
||||
array.push(enc) if enc[0] == map && GameData::Species.exists?(enc[2])
|
||||
end
|
||||
# If there are any exclusives, first have a chance of encountering those
|
||||
@@ -137,7 +137,7 @@ def pbPokeRadarGetEncounter(rarity = 0)
|
||||
array.each do |enc|
|
||||
rnd -= enc[1]
|
||||
next if rnd >= 0
|
||||
level = (enc[4] && enc[4] > enc[3]) ? rand(enc[3], enc[4]) : enc[3]
|
||||
level = (enc[4] && enc[4] > enc[3]) ? rand(enc[3]..enc[4]) : enc[3]
|
||||
return [enc[2], level]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -5,7 +5,7 @@ class PokemonBag
|
||||
attr_accessor :lastpocket
|
||||
|
||||
def self.pocketNames
|
||||
return pbPocketNames
|
||||
return Settings.bag_pocket_names
|
||||
end
|
||||
|
||||
def self.numPockets
|
||||
@@ -52,7 +52,7 @@ class PokemonBag
|
||||
end
|
||||
|
||||
def maxPocketSize(pocket)
|
||||
maxsize = BAG_MAX_POCKET_SIZE[pocket]
|
||||
maxsize = Settings::BAG_MAX_POCKET_SIZE[pocket]
|
||||
return -1 if !maxsize
|
||||
return maxsize
|
||||
end
|
||||
@@ -103,7 +103,7 @@ class PokemonBag
|
||||
maxsize = maxPocketSize(pocket)
|
||||
maxsize = @pockets[pocket].length + 1 if maxsize < 0
|
||||
return ItemStorageHelper.pbCanStore?(
|
||||
@pockets[pocket], maxsize, BAG_MAX_PER_SLOT, item.id, qty)
|
||||
@pockets[pocket], maxsize, Settings::BAG_MAX_PER_SLOT, item.id, qty)
|
||||
end
|
||||
|
||||
def pbStoreItem(item, qty = 1)
|
||||
@@ -112,7 +112,7 @@ class PokemonBag
|
||||
maxsize = maxPocketSize(pocket)
|
||||
maxsize = @pockets[pocket].length + 1 if maxsize < 0
|
||||
return ItemStorageHelper.pbStoreItem(
|
||||
@pockets[pocket], maxsize, BAG_MAX_PER_SLOT, item.id, qty, true)
|
||||
@pockets[pocket], maxsize, Settings::BAG_MAX_PER_SLOT, item.id, qty, true)
|
||||
end
|
||||
|
||||
def pbStoreAllOrNone(item, qty = 1)
|
||||
@@ -307,7 +307,7 @@ module ItemStorageHelper
|
||||
if !itemslot
|
||||
items[i] = [item, [qty, maxPerSlot].min]
|
||||
qty -= items[i][1]
|
||||
if itemPocket > 0 && sorting && BAG_POCKET_AUTO_SORT[itemPocket]
|
||||
if itemPocket > 0 && sorting && Settings::BAG_POCKET_AUTO_SORT[itemPocket]
|
||||
items.sort! { |a, b| GameData::Item.get(a[0]).id_number <=> GameData::Item.get(b[0]).id_number }
|
||||
end
|
||||
return true if qty == 0
|
||||
|
||||
@@ -59,11 +59,11 @@ class PokemonStorage
|
||||
attr_writer :unlockedWallpapers
|
||||
BASICWALLPAPERQTY = 16
|
||||
|
||||
def initialize(maxBoxes = NUM_STORAGE_BOXES, maxPokemon = PokemonBox::BOX_SIZE)
|
||||
def initialize(maxBoxes = Settings::NUM_STORAGE_BOXES, maxPokemon = PokemonBox::BOX_SIZE)
|
||||
@boxes = []
|
||||
for i in 0...maxBoxes
|
||||
@boxes[i] = PokemonBox.new(_INTL("Box {1}",i+1),maxPokemon)
|
||||
@boxes[i].background = i%BASICWALLPAPERQTY
|
||||
@boxes[i].background = i % BASICWALLPAPERQTY
|
||||
end
|
||||
@currentBox = 0
|
||||
@boxmode = -1
|
||||
@@ -131,7 +131,7 @@ class PokemonStorage
|
||||
|
||||
def maxPokemon(box)
|
||||
return 0 if box >= self.maxBoxes
|
||||
return (box < 0) ? MAX_PARTY_SIZE : self[box].length
|
||||
return (box < 0) ? Settings::MAX_PARTY_SIZE : self[box].length
|
||||
end
|
||||
|
||||
def full?
|
||||
@@ -144,7 +144,7 @@ class PokemonStorage
|
||||
def pbFirstFreePos(box)
|
||||
if box==-1
|
||||
ret = self.party.length
|
||||
return (ret >= MAX_PARTY_SIZE) ? -1 : ret
|
||||
return (ret >= Settings::MAX_PARTY_SIZE) ? -1 : ret
|
||||
end
|
||||
for i in 0...maxPokemon(box)
|
||||
return i if !self[box,i]
|
||||
|
||||
@@ -367,7 +367,7 @@ class Pokemon
|
||||
b = a & 0xFFFF
|
||||
c = (a >> 16) & 0xFFFF
|
||||
d = b ^ c
|
||||
@shiny = d < SHINY_POKEMON_CHANCE
|
||||
@shiny = d < Settings::SHINY_POKEMON_CHANCE
|
||||
end
|
||||
return @shiny
|
||||
end
|
||||
@@ -734,7 +734,7 @@ class Pokemon
|
||||
# @param strain [Integer] Pokérus strain to give
|
||||
def givePokerus(strain = 0)
|
||||
return if self.pokerusStage == 2 # Can't re-infect a cured Pokémon
|
||||
strain = rand(1, 16) if strain <= 0 || strain >= 16
|
||||
strain = rand(1..16) if strain <= 0 || strain >= 16
|
||||
time = 1 + (strain % 4)
|
||||
@pokerus = time
|
||||
@pokerus |= strain << 4
|
||||
@@ -1012,7 +1012,7 @@ class Pokemon
|
||||
@owner = Owner.new(0, '', 2, 2)
|
||||
end
|
||||
@obtain_method = 0 # Met
|
||||
@obtain_method = 4 if $game_switches && $game_switches[FATEFUL_ENCOUNTER_SWITCH]
|
||||
@obtain_method = 4 if $game_switches && $game_switches[Settings::FATEFUL_ENCOUNTER_SWITCH]
|
||||
@obtain_map = ($game_map) ? $game_map.map_id : 0
|
||||
@obtain_text = nil
|
||||
@obtain_level = level
|
||||
|
||||
@@ -122,11 +122,11 @@ class PokemonPauseMenu
|
||||
commands[cmdPokegear = commands.length] = _INTL("Pokégear") if $Trainer.pokegear
|
||||
commands[cmdTrainer = commands.length] = $Trainer.name
|
||||
if pbInSafari?
|
||||
if SAFARI_STEPS<=0
|
||||
if Settings::SAFARI_STEPS <= 0
|
||||
@scene.pbShowInfo(_INTL("Balls: {1}",pbSafariState.ballcount))
|
||||
else
|
||||
@scene.pbShowInfo(_INTL("Steps: {1}/{2}\nBalls: {3}",
|
||||
pbSafariState.steps,SAFARI_STEPS,pbSafariState.ballcount))
|
||||
pbSafariState.steps, Settings::SAFARI_STEPS, pbSafariState.ballcount))
|
||||
end
|
||||
commands[cmdQuit = commands.length] = _INTL("Quit")
|
||||
elsif pbInBugContest?
|
||||
@@ -148,7 +148,7 @@ class PokemonPauseMenu
|
||||
loop do
|
||||
command = @scene.pbShowCommands(commands)
|
||||
if cmdPokedex>=0 && command==cmdPokedex
|
||||
if USE_CURRENT_REGION_DEX
|
||||
if Settings::USE_CURRENT_REGION_DEX
|
||||
pbFadeOutIn {
|
||||
scene = PokemonPokedex_Scene.new
|
||||
screen = PokemonPokedexScreen.new(scene)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#===============================================================================
|
||||
# Pokédex Regional Dexes list menu screen
|
||||
# * For choosing which region list to view. Only appears when there is more
|
||||
# than one viable region list to choose from, and if USE_CURRENT_REGION_DEX is
|
||||
# false.
|
||||
# than one viable region list to choose from, and if
|
||||
# Settings::USE_CURRENT_REGION_DEX is false.
|
||||
#===============================================================================
|
||||
class Window_DexesList < Window_CommandPokemon
|
||||
def initialize(commands,commands2,width)
|
||||
@@ -93,7 +93,7 @@ class PokemonPokedexMenuScreen
|
||||
def pbStartScreen
|
||||
commands = []
|
||||
commands2 = []
|
||||
dexnames = pbDexNames
|
||||
dexnames = Settings.pokedex_names
|
||||
for i in 0...$PokemonGlobal.pokedexViable.length
|
||||
index = $PokemonGlobal.pokedexViable[i]
|
||||
if dexnames[index]==nil
|
||||
|
||||
@@ -282,7 +282,7 @@ class PokemonPokedex_Scene
|
||||
# return value of pbGetCurrentRegion, and thus will change according to the
|
||||
# current map's MapPosition metadata setting.
|
||||
def pbGetPokedexRegion
|
||||
if USE_CURRENT_REGION_DEX
|
||||
if Settings::USE_CURRENT_REGION_DEX
|
||||
region = pbGetCurrentRegion
|
||||
region = -1 if region>=$PokemonGlobal.pokedexUnlocked.length-1
|
||||
return region
|
||||
@@ -320,7 +320,7 @@ class PokemonPokedex_Scene
|
||||
regionalSpecies = []
|
||||
GameData::Species.each { |s| regionalSpecies.push(s.id) if s.form == 0 }
|
||||
end
|
||||
shift = DEXES_WITH_OFFSETS.include?(region)
|
||||
shift = Settings::DEXES_WITH_OFFSETS.include?(region)
|
||||
ret = []
|
||||
regionalSpecies.each_with_index do |species, i|
|
||||
next if !species
|
||||
@@ -386,7 +386,7 @@ class PokemonPokedex_Scene
|
||||
# Write various bits of text
|
||||
dexname = _INTL("Pokédex")
|
||||
if $PokemonGlobal.pokedexUnlocked.length>1
|
||||
thisdex = pbDexNames[pbGetSavePositionIndex]
|
||||
thisdex = Settings.pokedex_names[pbGetSavePositionIndex]
|
||||
if thisdex!=nil
|
||||
dexname = (thisdex.is_a?(Array)) ? thisdex[0] : thisdex
|
||||
end
|
||||
@@ -792,8 +792,8 @@ class PokemonPokedex_Scene
|
||||
def pbDexEntry(index)
|
||||
oldsprites = pbFadeOutAndHide(@sprites)
|
||||
region = -1
|
||||
if !USE_CURRENT_REGION_DEX
|
||||
dexnames = pbDexNames
|
||||
if !Settings::USE_CURRENT_REGION_DEX
|
||||
dexnames = Settings.pokedex_names
|
||||
if dexnames[pbGetSavePositionIndex].is_a?(Array)
|
||||
region = dexnames[pbGetSavePositionIndex][1]
|
||||
end
|
||||
|
||||
@@ -26,7 +26,7 @@ class PokemonPokedexInfo_Scene
|
||||
@sprites["areamap"].setBitmap("Graphics/Pictures/#{@mapdata[@region][1]}")
|
||||
@sprites["areamap"].x += (Graphics.width-@sprites["areamap"].bitmap.width)/2
|
||||
@sprites["areamap"].y += (Graphics.height+32-@sprites["areamap"].bitmap.height)/2
|
||||
for hidden in REGION_MAP_EXTRAS
|
||||
for hidden in Settings::REGION_MAP_EXTRAS
|
||||
if hidden[0]==@region && hidden[1]>0 && $game_switches[hidden[1]]
|
||||
pbDrawImagePositions(@sprites["areamap"].bitmap,[
|
||||
["Graphics/Pictures/#{hidden[4]}",
|
||||
@@ -73,7 +73,7 @@ class PokemonPokedexInfo_Scene
|
||||
dexnum = species
|
||||
dexnumshift = false
|
||||
if $PokemonGlobal.pokedexUnlocked[$PokemonGlobal.pokedexUnlocked.length - 1]
|
||||
dexnumshift = true if DEXES_WITH_OFFSETS.include?(-1) # National Dex
|
||||
dexnumshift = true if Settings::DEXES_WITH_OFFSETS.include?(-1) # National Dex
|
||||
else
|
||||
dexnum = 0
|
||||
for i in 0...$PokemonGlobal.pokedexUnlocked.length - 1 # Regional Dexes
|
||||
@@ -81,7 +81,7 @@ class PokemonPokedexInfo_Scene
|
||||
num = pbGetRegionalNumber(i,species)
|
||||
next if num <= 0
|
||||
dexnum = num
|
||||
dexnumshift = true if DEXES_WITH_OFFSETS.include?(i)
|
||||
dexnumshift = true if Settings::DEXES_WITH_OFFSETS.include?(i)
|
||||
break
|
||||
end
|
||||
end
|
||||
@@ -153,12 +153,12 @@ class PokemonPokedexInfo_Scene
|
||||
case sp.gender_rate
|
||||
when PBGenderRates::AlwaysMale, PBGenderRates::AlwaysFemale, PBGenderRates::Genderless
|
||||
real_gender = (sp.gender_rate == PBGenderRates::AlwaysFemale) ? 1 : 0
|
||||
next if !$Trainer.seen_forms[@species][real_gender][sp.form] && !DEX_SHOWS_ALL_FORMS
|
||||
next if !$Trainer.seen_forms[@species][real_gender][sp.form] && !Settings::DEX_SHOWS_ALL_FORMS
|
||||
real_gender = 2 if sp.gender_rate == PBGenderRates::Genderless
|
||||
ret.push([sp.form_name, real_gender, sp.form])
|
||||
else # Both male and female
|
||||
for real_gender in 0...2
|
||||
next if !$Trainer.seen_forms[@species][real_gender][sp.form] && !DEX_SHOWS_ALL_FORMS
|
||||
next if !$Trainer.seen_forms[@species][real_gender][sp.form] && !Settings::DEX_SHOWS_ALL_FORMS
|
||||
ret.push([sp.form_name, real_gender, sp.form])
|
||||
break if sp.form_name && !sp.form_name.empty? # Only show 1 entry for each non-0 form
|
||||
end
|
||||
@@ -554,14 +554,14 @@ class PokemonPokedexInfoScreen
|
||||
|
||||
def pbStartSceneSingle(species) # For use from a Pokémon's summary screen
|
||||
region = -1
|
||||
if USE_CURRENT_REGION_DEX
|
||||
if Settings::USE_CURRENT_REGION_DEX
|
||||
region = pbGetCurrentRegion
|
||||
region = -1 if region>=$PokemonGlobal.pokedexUnlocked.length-1
|
||||
else
|
||||
region = $PokemonGlobal.pokedexDex # National Dex -1, regional dexes 0 etc.
|
||||
end
|
||||
dexnum = pbGetRegionalNumber(region,species)
|
||||
dexnumshift = DEXES_WITH_OFFSETS.include?(region)
|
||||
dexnumshift = Settings::DEXES_WITH_OFFSETS.include?(region)
|
||||
dexlist = [[species,GameData::Species.get(species).name,0,0,dexnum,dexnumshift]]
|
||||
@scene.pbStartScene(dexlist,0,region)
|
||||
@scene.pbScene
|
||||
|
||||
@@ -448,7 +448,7 @@ class PokemonParty_Scene
|
||||
pbBottomLeftLines(@sprites["helpwindow"],1)
|
||||
pbSetHelpText(starthelptext)
|
||||
# Add party Pokémon sprites
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
if @party[i]
|
||||
@sprites["pokemon#{i}"] = PokemonPartyPanel.new(@party[i],i,@viewport)
|
||||
else
|
||||
@@ -457,10 +457,10 @@ class PokemonParty_Scene
|
||||
@sprites["pokemon#{i}"].text = annotations[i] if annotations
|
||||
end
|
||||
if @multiselect
|
||||
@sprites["pokemon#{MAX_PARTY_SIZE}"] = PokemonPartyConfirmSprite.new(@viewport)
|
||||
@sprites["pokemon#{MAX_PARTY_SIZE + 1}"] = PokemonPartyCancelSprite2.new(@viewport)
|
||||
@sprites["pokemon#{Settings::MAX_PARTY_SIZE}"] = PokemonPartyConfirmSprite.new(@viewport)
|
||||
@sprites["pokemon#{Settings::MAX_PARTY_SIZE + 1}"] = PokemonPartyCancelSprite2.new(@viewport)
|
||||
else
|
||||
@sprites["pokemon#{MAX_PARTY_SIZE}"] = PokemonPartyCancelSprite.new(@viewport)
|
||||
@sprites["pokemon#{Settings::MAX_PARTY_SIZE}"] = PokemonPartyCancelSprite.new(@viewport)
|
||||
end
|
||||
# Select first Pokémon
|
||||
@activecmd = 0
|
||||
@@ -573,14 +573,14 @@ class PokemonParty_Scene
|
||||
end
|
||||
|
||||
def pbAnnotate(annot)
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
@sprites["pokemon#{i}"].text = (annot) ? annot[i] : nil
|
||||
end
|
||||
end
|
||||
|
||||
def pbSelect(item)
|
||||
@activecmd = item
|
||||
numsprites = MAX_PARTY_SIZE + ((@multiselect) ? 2 : 1)
|
||||
numsprites = Settings::MAX_PARTY_SIZE + ((@multiselect) ? 2 : 1)
|
||||
for i in 0...numsprites
|
||||
@sprites["pokemon#{i}"].selected = (i==@activecmd)
|
||||
end
|
||||
@@ -620,7 +620,7 @@ class PokemonParty_Scene
|
||||
Input.update
|
||||
self.update
|
||||
end
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
@sprites["pokemon#{i}"].preselected = false
|
||||
@sprites["pokemon#{i}"].switching = false
|
||||
end
|
||||
@@ -628,7 +628,7 @@ class PokemonParty_Scene
|
||||
end
|
||||
|
||||
def pbClearSwitching
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
@sprites["pokemon#{i}"].preselected = false
|
||||
@sprites["pokemon#{i}"].switching = false
|
||||
end
|
||||
@@ -674,7 +674,7 @@ class PokemonParty_Scene
|
||||
end
|
||||
|
||||
def pbChoosePokemon(switching=false,initialsel=-1,canswitch=0)
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
@sprites["pokemon#{i}"].preselected = (switching && i==@activecmd)
|
||||
@sprites["pokemon#{i}"].switching = switching
|
||||
end
|
||||
@@ -695,12 +695,12 @@ class PokemonParty_Scene
|
||||
end
|
||||
if @activecmd!=oldsel # Changing selection
|
||||
pbPlayCursorSE
|
||||
numsprites = MAX_PARTY_SIZE + ((@multiselect) ? 2 : 1)
|
||||
numsprites = Settings::MAX_PARTY_SIZE + ((@multiselect) ? 2 : 1)
|
||||
for i in 0...numsprites
|
||||
@sprites["pokemon#{i}"].selected = (i==@activecmd)
|
||||
end
|
||||
end
|
||||
cancelsprite = MAX_PARTY_SIZE + ((@multiselect) ? 1 : 0)
|
||||
cancelsprite = Settings::MAX_PARTY_SIZE + ((@multiselect) ? 1 : 0)
|
||||
if Input.trigger?(Input::A) && canswitch==1 && @activecmd!=cancelsprite
|
||||
pbPlayDecisionSE
|
||||
return [1,@activecmd]
|
||||
@@ -722,13 +722,13 @@ class PokemonParty_Scene
|
||||
end
|
||||
|
||||
def pbChangeSelection(key,currentsel)
|
||||
numsprites = MAX_PARTY_SIZE + ((@multiselect) ? 2 : 1)
|
||||
numsprites = Settings::MAX_PARTY_SIZE + ((@multiselect) ? 2 : 1)
|
||||
case key
|
||||
when Input::LEFT
|
||||
begin
|
||||
currentsel -= 1
|
||||
end while currentsel > 0 && currentsel < @party.length && !@party[currentsel]
|
||||
if currentsel >= @party.length && currentsel < MAX_PARTY_SIZE
|
||||
if currentsel >= @party.length && currentsel < Settings::MAX_PARTY_SIZE
|
||||
currentsel = @party.length - 1
|
||||
end
|
||||
currentsel = numsprites - 1 if currentsel < 0
|
||||
@@ -737,12 +737,12 @@ class PokemonParty_Scene
|
||||
currentsel += 1
|
||||
end while currentsel < @party.length && !@party[currentsel]
|
||||
if currentsel == @party.length
|
||||
currentsel = MAX_PARTY_SIZE
|
||||
currentsel = Settings::MAX_PARTY_SIZE
|
||||
elsif currentsel == numsprites
|
||||
currentsel = 0
|
||||
end
|
||||
when Input::UP
|
||||
if currentsel >= MAX_PARTY_SIZE
|
||||
if currentsel >= Settings::MAX_PARTY_SIZE
|
||||
begin
|
||||
currentsel -= 1
|
||||
end while currentsel > 0 && !@party[currentsel]
|
||||
@@ -751,19 +751,19 @@ class PokemonParty_Scene
|
||||
currentsel -= 2
|
||||
end while currentsel > 0 && !@party[currentsel]
|
||||
end
|
||||
if currentsel >= @party.length && currentsel < MAX_PARTY_SIZE
|
||||
if currentsel >= @party.length && currentsel < Settings::MAX_PARTY_SIZE
|
||||
currentsel = @party.length-1
|
||||
end
|
||||
currentsel = numsprites - 1 if currentsel < 0
|
||||
when Input::DOWN
|
||||
if currentsel >= MAX_PARTY_SIZE - 1
|
||||
if currentsel >= Settings::MAX_PARTY_SIZE - 1
|
||||
currentsel += 1
|
||||
else
|
||||
currentsel += 2
|
||||
currentsel = MAX_PARTY_SIZE if currentsel < MAX_PARTY_SIZE && !@party[currentsel]
|
||||
currentsel = Settings::MAX_PARTY_SIZE if currentsel < Settings::MAX_PARTY_SIZE && !@party[currentsel]
|
||||
end
|
||||
if currentsel >= @party.length && currentsel < MAX_PARTY_SIZE
|
||||
currentsel = MAX_PARTY_SIZE
|
||||
if currentsel >= @party.length && currentsel < Settings::MAX_PARTY_SIZE
|
||||
currentsel = Settings::MAX_PARTY_SIZE
|
||||
elsif currentsel >= numsprites
|
||||
currentsel = 0
|
||||
end
|
||||
@@ -774,14 +774,14 @@ class PokemonParty_Scene
|
||||
def pbHardRefresh
|
||||
oldtext = []
|
||||
lastselected = -1
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
oldtext.push(@sprites["pokemon#{i}"].text)
|
||||
lastselected = i if @sprites["pokemon#{i}"].selected
|
||||
@sprites["pokemon#{i}"].dispose
|
||||
end
|
||||
lastselected = @party.length-1 if lastselected>=@party.length
|
||||
lastselected = 0 if lastselected<0
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
if @party[i]
|
||||
@sprites["pokemon#{i}"] = PokemonPartyPanel.new(@party[i],i,@viewport)
|
||||
else
|
||||
@@ -793,7 +793,7 @@ class PokemonParty_Scene
|
||||
end
|
||||
|
||||
def pbRefresh
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
sprite = @sprites["pokemon#{i}"]
|
||||
if sprite
|
||||
if sprite.is_a?(PokemonPartyPanel)
|
||||
@@ -971,7 +971,7 @@ class PokemonPartyScreen
|
||||
positions = [_INTL("FIRST"), _INTL("SECOND"), _INTL("THIRD"), _INTL("FOURTH"),
|
||||
_INTL("FIFTH"), _INTL("SIXTH"), _INTL("SEVENTH"), _INTL("EIGHTH"),
|
||||
_INTL("NINTH"), _INTL("TENTH"), _INTL("ELEVENTH"), _INTL("TWELFTH")]
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
if i < positions.length
|
||||
ordinals.push(positions[i])
|
||||
else
|
||||
@@ -1006,12 +1006,12 @@ class PokemonPartyScreen
|
||||
end
|
||||
@scene.pbAnnotate(annot)
|
||||
if realorder.length==ruleset.number && addedEntry
|
||||
@scene.pbSelect(MAX_PARTY_SIZE)
|
||||
@scene.pbSelect(Settings::MAX_PARTY_SIZE)
|
||||
end
|
||||
@scene.pbSetHelpText(_INTL("Choose Pokémon and confirm."))
|
||||
pkmnid = @scene.pbChoosePokemon
|
||||
addedEntry = false
|
||||
if pkmnid == MAX_PARTY_SIZE # Confirm was chosen
|
||||
if pkmnid == Settings::MAX_PARTY_SIZE # Confirm was chosen
|
||||
ret = []
|
||||
for i in realorder; ret.push(@party[i]); end
|
||||
error = []
|
||||
|
||||
@@ -391,7 +391,7 @@ class PokemonSummary_Scene
|
||||
dexnum = @pokemon.species
|
||||
dexnumshift = false
|
||||
if $PokemonGlobal.pokedexUnlocked[$PokemonGlobal.pokedexUnlocked.length-1]
|
||||
dexnumshift = true if DEXES_WITH_OFFSETS.include?(-1)
|
||||
dexnumshift = true if Settings::DEXES_WITH_OFFSETS.include?(-1)
|
||||
else
|
||||
dexnum = 0
|
||||
for i in 0...$PokemonGlobal.pokedexUnlocked.length-1
|
||||
@@ -399,7 +399,7 @@ class PokemonSummary_Scene
|
||||
num = pbGetRegionalNumber(i,@pokemon.species)
|
||||
next if num<=0
|
||||
dexnum = num
|
||||
dexnumshift = true if DEXES_WITH_OFFSETS.include?(i)
|
||||
dexnumshift = true if Settings::DEXES_WITH_OFFSETS.include?(i)
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
@@ -419,7 +419,7 @@ class PokemonBag_Scene
|
||||
elsif Input.trigger?(Input::A) # Start switching the selected item
|
||||
if !@choosing
|
||||
if thispocket.length>1 && itemwindow.index<thispocket.length &&
|
||||
!BAG_POCKET_AUTO_SORT[itemwindow.pocket]
|
||||
!Settings::BAG_POCKET_AUTO_SORT[itemwindow.pocket]
|
||||
itemwindow.sorting = true
|
||||
swapinitialpos = itemwindow.index
|
||||
pbPlayDecisionSE
|
||||
@@ -544,10 +544,10 @@ class PokemonBagScreen
|
||||
qty = @bag.pbQuantity(item)
|
||||
itemplural = itm.name_plural
|
||||
params = ChooseNumberParams.new
|
||||
params.setRange(0,BAG_MAX_PER_SLOT)
|
||||
params.setRange(0, Settings::BAG_MAX_PER_SLOT)
|
||||
params.setDefaultValue(qty)
|
||||
newqty = pbMessageChooseNumber(
|
||||
_INTL("Choose new quantity of {1} (max. #{BAG_MAX_PER_SLOT}).",itemplural),params) { @scene.pbUpdate }
|
||||
_INTL("Choose new quantity of {1} (max. #{Settings::BAG_MAX_PER_SLOT}).",itemplural),params) { @scene.pbUpdate }
|
||||
if newqty>qty
|
||||
@bag.pbStoreItem(item,newqty-qty)
|
||||
elsif newqty<qty
|
||||
|
||||
@@ -119,7 +119,7 @@ class PokemonRegionMap_Scene
|
||||
@sprites["map"].setBitmap("Graphics/Pictures/#{@map[1]}")
|
||||
@sprites["map"].x += (Graphics.width-@sprites["map"].bitmap.width)/2
|
||||
@sprites["map"].y += (Graphics.height-@sprites["map"].bitmap.height)/2
|
||||
for hidden in REGION_MAP_EXTRAS
|
||||
for hidden in Settings::REGION_MAP_EXTRAS
|
||||
if hidden[0]==mapindex && ((@wallmap && hidden[5]) ||
|
||||
(!@wallmap && hidden[1]>0 && $game_switches[hidden[1]]))
|
||||
if !@sprites["map2"]
|
||||
|
||||
@@ -323,7 +323,7 @@ class PokemonLoadScreen
|
||||
commands[cmdNewGame = commands.length] = _INTL("New Game")
|
||||
end
|
||||
commands[cmdOption = commands.length] = _INTL("Options")
|
||||
commands[cmdLanguage = commands.length] = _INTL("Language") if LANGUAGES.length>=2
|
||||
commands[cmdLanguage = commands.length] = _INTL("Language") if Settings::LANGUAGES.length>=2
|
||||
commands[cmdDebug = commands.length] = _INTL("Debug") if $DEBUG
|
||||
commands[cmdQuit = commands.length] = _INTL("Quit Game")
|
||||
@scene.pbStartScene(commands,showContinue,trainer,framecount,mapid)
|
||||
@@ -452,7 +452,7 @@ class PokemonLoadScreen
|
||||
pbPlayDecisionSE
|
||||
@scene.pbEndScene
|
||||
$PokemonSystem.language = pbChooseLanguage
|
||||
pbLoadMessages("Data/"+LANGUAGES[$PokemonSystem.language][1])
|
||||
pbLoadMessages("Data/"+Settings::LANGUAGES[$PokemonSystem.language][1])
|
||||
savedata = []
|
||||
if safeExists?(savefile)
|
||||
File.open(savefile,"rb") { |f|
|
||||
|
||||
@@ -19,24 +19,24 @@ class PokemonSystem
|
||||
@textspeed = 1 # Text speed (0=slow, 1=normal, 2=fast)
|
||||
@battlescene = 0 # Battle effects (animations) (0=on, 1=off)
|
||||
@battlestyle = 0 # Battle style (0=switch, 1=set)
|
||||
@frame = 0 # Default window frame (see also $TextFrames)
|
||||
@frame = 0 # Default window frame (see also Settings::MENU_WINDOWSKINS)
|
||||
@textskin = 0 # Speech frame
|
||||
@font = 0 # Font (see also $VersionStyles)
|
||||
@screensize = (SCREEN_SCALE * 2).floor - 1 # 0=half size, 1=full size, 2=full-and-a-half size, 3=double size
|
||||
@language = 0 # Language (see also LANGUAGES in script PokemonSystem)
|
||||
@font = 0 # Font (see also Settings::FONT_OPTIONS)
|
||||
@screensize = (Settings::SCREEN_SCALE * 2).floor - 1 # 0=half size, 1=full size, 2=full-and-a-half size, 3=double size
|
||||
@language = 0 # Language (see also Settings::LANGUAGES in script PokemonSystem)
|
||||
@runstyle = 0 # Run key functionality (0=hold to run, 1=toggle auto-run)
|
||||
@bgmvolume = 100 # Volume of background music and ME
|
||||
@sevolume = 100 # Volume of sound effects
|
||||
@textinput = 0 # Text input mode (0=cursor, 1=keyboard)
|
||||
end
|
||||
|
||||
def textskin; return @textskin || 0; end
|
||||
def language; return @language || 0; end
|
||||
def runstyle; return @runstyle || 0; end
|
||||
def bgmvolume; return @bgmvolume || 100; end
|
||||
def sevolume; return @sevolume || 100; end
|
||||
def textinput; return @textinput || 0; end
|
||||
def tilemap; return MAP_VIEW_MODE; end
|
||||
def textskin; return @textskin || 0; end
|
||||
def language; return @language || 0; end
|
||||
def runstyle; return @runstyle || 0; end
|
||||
def bgmvolume; return @bgmvolume || 100; end
|
||||
def sevolume; return @sevolume || 100; end
|
||||
def textinput; return @textinput || 0; end
|
||||
def tilemap; return Settings::MAP_VIEW_MODE; end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
@@ -364,25 +364,25 @@ class PokemonOption_Scene
|
||||
end
|
||||
}
|
||||
),
|
||||
NumberOption.new(_INTL("Speech Frame"),1,$SpeechFrames.length,
|
||||
NumberOption.new(_INTL("Speech Frame"),1,Settings::SPEECH_WINDOWSKINS.length,
|
||||
proc { $PokemonSystem.textskin },
|
||||
proc { |value|
|
||||
$PokemonSystem.textskin = value
|
||||
MessageConfig.pbSetSpeechFrame("Graphics/Windowskins/" + $SpeechFrames[value])
|
||||
MessageConfig.pbSetSpeechFrame("Graphics/Windowskins/" + Settings::SPEECH_WINDOWSKINS[value])
|
||||
}
|
||||
),
|
||||
NumberOption.new(_INTL("Menu Frame"),1,$TextFrames.length,
|
||||
NumberOption.new(_INTL("Menu Frame"),1,Settings::MENU_WINDOWSKINS.length,
|
||||
proc { $PokemonSystem.frame },
|
||||
proc { |value|
|
||||
$PokemonSystem.frame = value
|
||||
MessageConfig.pbSetSystemFrame("Graphics/Windowskins/" + $TextFrames[value])
|
||||
MessageConfig.pbSetSystemFrame("Graphics/Windowskins/" + Settings::MENU_WINDOWSKINS[value])
|
||||
}
|
||||
),
|
||||
EnumOption.new(_INTL("Font Style"),[_INTL("Em"),_INTL("R/S"),_INTL("FRLG"),_INTL("DP")],
|
||||
proc { $PokemonSystem.font },
|
||||
proc { |value|
|
||||
$PokemonSystem.font = value
|
||||
MessageConfig.pbSetSystemFontName($VersionStyles[value])
|
||||
MessageConfig.pbSetSystemFontName(Settings::FONT_OPTIONS[value])
|
||||
}
|
||||
),
|
||||
EnumOption.new(_INTL("Text Entry"),[_INTL("Cursor"),_INTL("Keyboard")],
|
||||
|
||||
@@ -449,7 +449,7 @@ class PokemonBoxPartySprite < SpriteWrapper
|
||||
@party = party
|
||||
@boxbitmap = AnimatedBitmap.new("Graphics/Pictures/Storage/overlay_party")
|
||||
@pokemonsprites = []
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
@pokemonsprites[i] = nil
|
||||
pokemon = @party[i]
|
||||
if pokemon
|
||||
@@ -465,7 +465,7 @@ class PokemonBoxPartySprite < SpriteWrapper
|
||||
end
|
||||
|
||||
def dispose
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
@pokemonsprites[i].dispose if @pokemonsprites[i]
|
||||
end
|
||||
@boxbitmap.dispose
|
||||
@@ -485,7 +485,7 @@ class PokemonBoxPartySprite < SpriteWrapper
|
||||
|
||||
def color=(value)
|
||||
super
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
if @pokemonsprites[i] && !@pokemonsprites[i].disposed?
|
||||
@pokemonsprites[i].color = pbSrcOver(@pokemonsprites[i].color,value)
|
||||
end
|
||||
@@ -494,7 +494,7 @@ class PokemonBoxPartySprite < SpriteWrapper
|
||||
|
||||
def visible=(value)
|
||||
super
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
if @pokemonsprites[i] && !@pokemonsprites[i].disposed?
|
||||
@pokemonsprites[i].visible = value
|
||||
end
|
||||
@@ -535,15 +535,15 @@ class PokemonBoxPartySprite < SpriteWrapper
|
||||
])
|
||||
xvalues = [] # [18, 90, 18, 90, 18, 90]
|
||||
yvalues = [] # [2, 18, 66, 82, 130, 146]
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
xvalues.push(18 + 72 * (i % 2))
|
||||
yvalues.push(2 + 16 * (i % 2) + 64 * (i / 2))
|
||||
end
|
||||
for j in 0...MAX_PARTY_SIZE
|
||||
for j in 0...Settings::MAX_PARTY_SIZE
|
||||
@pokemonsprites[j] = nil if @pokemonsprites[j] && @pokemonsprites[j].disposed?
|
||||
end
|
||||
@pokemonsprites.compact!
|
||||
for j in 0...MAX_PARTY_SIZE
|
||||
for j in 0...Settings::MAX_PARTY_SIZE
|
||||
sprite = @pokemonsprites[j]
|
||||
if sprite && !sprite.disposed?
|
||||
sprite.viewport = self.viewport
|
||||
@@ -556,7 +556,7 @@ class PokemonBoxPartySprite < SpriteWrapper
|
||||
|
||||
def update
|
||||
super
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
@pokemonsprites[i].update if @pokemonsprites[i] && !@pokemonsprites[i].disposed?
|
||||
end
|
||||
end
|
||||
@@ -773,7 +773,7 @@ class PokemonStorageScene
|
||||
return if selection < 0
|
||||
xvalues = [] # [200, 272, 200, 272, 200, 272, 236]
|
||||
yvalues = [] # [2, 18, 66, 82, 130, 146, 220]
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
xvalues.push(200 + 72 * (i % 2))
|
||||
yvalues.push(2 + 16 * (i % 2) + 64 * (i / 2))
|
||||
end
|
||||
@@ -791,23 +791,23 @@ class PokemonStorageScene
|
||||
case key
|
||||
when Input::LEFT
|
||||
selection -= 1
|
||||
selection = MAX_PARTY_SIZE if selection < 0
|
||||
selection = Settings::MAX_PARTY_SIZE if selection < 0
|
||||
when Input::RIGHT
|
||||
selection += 1
|
||||
selection = 0 if selection > MAX_PARTY_SIZE
|
||||
selection = 0 if selection > Settings::MAX_PARTY_SIZE
|
||||
when Input::UP
|
||||
if selection == MAX_PARTY_SIZE
|
||||
selection = MAX_PARTY_SIZE - 1
|
||||
if selection == Settings::MAX_PARTY_SIZE
|
||||
selection = Settings::MAX_PARTY_SIZE - 1
|
||||
else
|
||||
selection -= 2
|
||||
selection = MAX_PARTY_SIZE if selection < 0
|
||||
selection = Settings::MAX_PARTY_SIZE if selection < 0
|
||||
end
|
||||
when Input::DOWN
|
||||
if selection == MAX_PARTY_SIZE
|
||||
if selection == Settings::MAX_PARTY_SIZE
|
||||
selection = 0
|
||||
else
|
||||
selection += 2
|
||||
selection = MAX_PARTY_SIZE if selection > MAX_PARTY_SIZE
|
||||
selection = Settings::MAX_PARTY_SIZE if selection > Settings::MAX_PARTY_SIZE
|
||||
end
|
||||
end
|
||||
return selection
|
||||
@@ -952,10 +952,10 @@ class PokemonStorageScene
|
||||
@selection = selection
|
||||
return -1
|
||||
elsif Input.trigger?(Input::C)
|
||||
if selection >= 0 && selection < MAX_PARTY_SIZE
|
||||
if selection >= 0 && selection < Settings::MAX_PARTY_SIZE
|
||||
@selection = selection
|
||||
return selection
|
||||
elsif selection == MAX_PARTY_SIZE # Close Box
|
||||
elsif selection == Settings::MAX_PARTY_SIZE # Close Box
|
||||
@selection = selection
|
||||
return (depositing) ? -3 : -1
|
||||
end
|
||||
|
||||
@@ -247,7 +247,7 @@ def pbPokeCenterPC
|
||||
end
|
||||
|
||||
def pbGetStorageCreator
|
||||
creator = pbStorageCreator
|
||||
creator = Settings.storage_creator_name
|
||||
creator = _INTL("Bill") if !creator || creator==""
|
||||
return creator
|
||||
end
|
||||
|
||||
@@ -558,8 +558,8 @@ class PokemonMartScreen
|
||||
end
|
||||
quantity=1
|
||||
else
|
||||
maxafford=(price<=0) ? BAG_MAX_PER_SLOT : @adapter.getMoney/price
|
||||
maxafford=BAG_MAX_PER_SLOT if maxafford>BAG_MAX_PER_SLOT
|
||||
maxafford = (price <= 0) ? Settings::BAG_MAX_PER_SLOT : @adapter.getMoney / price
|
||||
maxafford = Settings::BAG_MAX_PER_SLOT if maxafford > Settings::BAG_MAX_PER_SLOT
|
||||
quantity=@scene.pbChooseNumber(
|
||||
_INTL("{1}? Certainly. How many would you like?",itemname),item,maxafford)
|
||||
next if quantity==0
|
||||
|
||||
@@ -93,8 +93,8 @@ class SlotMachineScore < BitmapSprite
|
||||
end
|
||||
|
||||
def score=(value)
|
||||
@score=value
|
||||
@score=MAX_COINS if @score>MAX_COINS
|
||||
@score = value
|
||||
@score = Settings::MAX_COINS if @score > Settings::MAX_COINS
|
||||
refresh
|
||||
end
|
||||
|
||||
@@ -212,7 +212,7 @@ class SlotMachineScene
|
||||
update
|
||||
@sprites["payout"].score -= 1
|
||||
@sprites["credit"].score += 1
|
||||
if Input.trigger?(Input::C) || @sprites["credit"].score==MAX_COINS
|
||||
if Input.trigger?(Input::C) || @sprites["credit"].score == Settings::MAX_COINS
|
||||
@sprites["credit"].score += @sprites["payout"].score
|
||||
@sprites["payout"].score = 0
|
||||
end
|
||||
@@ -286,8 +286,8 @@ class SlotMachineScene
|
||||
update
|
||||
@sprites["window1"].bitmap.clear if @sprites["window1"].bitmap
|
||||
@sprites["window2"].bitmap.clear if @sprites["window2"].bitmap
|
||||
if @sprites["credit"].score==MAX_COINS
|
||||
pbMessage(_INTL("You've got {1} Coins.",MAX_COINS.to_s_formatted))
|
||||
if @sprites["credit"].score == Settings::MAX_COINS
|
||||
pbMessage(_INTL("You've got {1} Coins.", Settings::MAX_COINS.to_s_formatted))
|
||||
break
|
||||
elsif $PokemonGlobal.coins==0
|
||||
pbMessage(_INTL("You've run out of Coins.\nGame over!"))
|
||||
@@ -392,7 +392,7 @@ def pbSlotMachine(difficulty=1)
|
||||
pbMessage(_INTL("It's a Slot Machine."))
|
||||
elsif $PokemonGlobal.coins==0
|
||||
pbMessage(_INTL("You don't have any Coins to play!"))
|
||||
elsif $PokemonGlobal.coins==MAX_COINS
|
||||
elsif $PokemonGlobal.coins == Settings::MAX_COINS
|
||||
pbMessage(_INTL("Your Coin Case is full!"))
|
||||
else
|
||||
pbFadeOutIn {
|
||||
|
||||
@@ -108,9 +108,9 @@ class VoltorbFlip
|
||||
@sprites["curtainL"].visible=false
|
||||
@sprites["curtainR"].visible=false
|
||||
@sprites["curtain"].opacity=100
|
||||
if $PokemonGlobal.coins>=MAX_COINS
|
||||
pbMessage(_INTL("You've gathered {1} Coins. You cannot gather any more.",MAX_COINS.to_s_formatted))
|
||||
$PokemonGlobal.coins=MAX_COINS # As a precaution
|
||||
if $PokemonGlobal.coins >= Settings::MAX_COINS
|
||||
pbMessage(_INTL("You've gathered {1} Coins. You cannot gather any more.", Settings::MAX_COINS.to_s_formatted))
|
||||
$PokemonGlobal.coins = Settings::MAX_COINS # As a precaution
|
||||
@quit=true
|
||||
# elsif !pbConfirmMessage(_INTL("Play Voltorb Flip Lv. {1}?",@level)) && $PokemonGlobal.coins<99999
|
||||
# @quit=true
|
||||
@@ -616,7 +616,7 @@ end
|
||||
def pbVoltorbFlip
|
||||
if GameData::Item.exists?(:COINCASE) && !$PokemonBag.pbHasItem?(:COINCASE)
|
||||
pbMessage(_INTL("You can't play unless you have a Coin Case."))
|
||||
elsif $PokemonGlobal.coins==MAX_COINS
|
||||
elsif $PokemonGlobal.coins == Settings::MAX_COINS
|
||||
pbMessage(_INTL("Your Coin Case is full!"))
|
||||
else
|
||||
scene=VoltorbFlip.new
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -10,7 +10,7 @@ end
|
||||
|
||||
def pbChooseLanguage
|
||||
commands=[]
|
||||
for lang in LANGUAGES
|
||||
for lang in Settings::LANGUAGES
|
||||
commands.push(lang[0])
|
||||
end
|
||||
return pbShowCommands(nil,commands)
|
||||
@@ -48,9 +48,9 @@ def pbSetUpSystem
|
||||
end
|
||||
# Load constants
|
||||
GameData.load_all
|
||||
if LANGUAGES.length>=2
|
||||
if Settings::LANGUAGES.length>=2
|
||||
pokemonSystem.language = pbChooseLanguage if !havedata
|
||||
pbLoadMessages("Data/"+LANGUAGES[pokemonSystem.language][1])
|
||||
pbLoadMessages("Data/"+Settings::LANGUAGES[pokemonSystem.language][1])
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ end
|
||||
|
||||
def pbGenerateEgg(pkmn, text = "")
|
||||
return false if !pkmn || $Trainer.party_full?
|
||||
pkmn = Pokemon.new(pkmn, EGG_LEVEL) if !pkmn.is_a?(Pokemon)
|
||||
pkmn = Pokemon.new(pkmn, Settings::EGG_LEVEL) if !pkmn.is_a?(Pokemon)
|
||||
# Set egg's details
|
||||
pkmn.name = _INTL("Egg")
|
||||
pkmn.steps_to_hatch = pkmn.species_data.hatch_steps
|
||||
|
||||
@@ -190,7 +190,7 @@ def pbTimeEventValid(variableNumber)
|
||||
return retval
|
||||
end
|
||||
|
||||
def pbExclaim(event,id=EXCLAMATION_ANIMATION_ID,tinting=false)
|
||||
def pbExclaim(event,id=Settings::EXCLAMATION_ANIMATION_ID,tinting=false)
|
||||
if event.is_a?(Array)
|
||||
sprite = nil
|
||||
done = []
|
||||
@@ -253,7 +253,7 @@ def pbTrainerName(name = nil, outfit = 0)
|
||||
$Trainer.outfit = outfit
|
||||
$Trainer.character_ID = $PokemonGlobal.playerID
|
||||
if name.nil?
|
||||
name = pbEnterPlayerName(_INTL("Your name?"), 0, MAX_PLAYER_NAME_SIZE)
|
||||
name = pbEnterPlayerName(_INTL("Your name?"), 0, Settings::MAX_PLAYER_NAME_SIZE)
|
||||
if name.nil? || name.empty?
|
||||
gender = pbGetTrainerTypeGender(trainer_type)
|
||||
name = pbSuggestTrainerName(gender)
|
||||
@@ -283,7 +283,7 @@ def pbSuggestTrainerName(gender)
|
||||
owner[0,1] = owner[0,1].upcase
|
||||
return owner
|
||||
end
|
||||
return getRandomNameEx(gender,nil,1,MAX_PLAYER_NAME_SIZE)
|
||||
return getRandomNameEx(gender, nil, 1, Settings::MAX_PLAYER_NAME_SIZE)
|
||||
end
|
||||
|
||||
def pbGetUserName
|
||||
@@ -436,7 +436,7 @@ end
|
||||
# Here, just used to decide whether to show the Pokédex in the Pause menu.
|
||||
def pbSetViableDexes
|
||||
$PokemonGlobal.pokedexViable = []
|
||||
if USE_CURRENT_REGION_DEX
|
||||
if Settings::USE_CURRENT_REGION_DEX
|
||||
region = pbGetCurrentRegion
|
||||
region = -1 if region>=$PokemonGlobal.pokedexUnlocked.length-1
|
||||
$PokemonGlobal.pokedexViable[0] = region if $Trainer.seen_any?(region)
|
||||
|
||||
@@ -449,7 +449,7 @@ DebugMenuCommands.register("additem", {
|
||||
pbListScreenBlock(_INTL("ADD ITEM"), ItemLister.new) { |button, item|
|
||||
if button == Input::C && item
|
||||
params = ChooseNumberParams.new
|
||||
params.setRange(1, BAG_MAX_PER_SLOT)
|
||||
params.setRange(1, Settings::BAG_MAX_PER_SLOT)
|
||||
params.setInitialValue(1)
|
||||
params.setCancelValue(0)
|
||||
qty = pbMessageChooseNumber(_INTL("Add how many {1}?",
|
||||
@@ -469,7 +469,7 @@ DebugMenuCommands.register("fillbag", {
|
||||
"description" => _INTL("Add a certain number of every item to the Bag."),
|
||||
"effect" => proc {
|
||||
params = ChooseNumberParams.new
|
||||
params.setRange(1, BAG_MAX_PER_SLOT)
|
||||
params.setRange(1, Settings::BAG_MAX_PER_SLOT)
|
||||
params.setInitialValue(1)
|
||||
params.setCancelValue(0)
|
||||
qty = pbMessageChooseNumber(_INTL("Choose the number of items."), params)
|
||||
@@ -613,7 +613,7 @@ DebugMenuCommands.register("fillboxes", {
|
||||
end
|
||||
# Add Pokémon (if form 0)
|
||||
next if f != 0
|
||||
if added >= NUM_STORAGE_BOXES * box_qty
|
||||
if added >= Settings::NUM_STORAGE_BOXES * box_qty
|
||||
completed = false
|
||||
next
|
||||
end
|
||||
@@ -622,7 +622,8 @@ DebugMenuCommands.register("fillboxes", {
|
||||
end
|
||||
pbMessage(_INTL("Storage boxes were filled with one Pokémon of each species."))
|
||||
if !completed
|
||||
pbMessage(_INTL("Note: The number of storage spaces ({1} boxes of {2}) is less than the number of species.", NUM_STORAGE_BOXES, box_qty))
|
||||
pbMessage(_INTL("Note: The number of storage spaces ({1} boxes of {2}) is less than the number of species.",
|
||||
Settings::NUM_STORAGE_BOXES, box_qty))
|
||||
end
|
||||
}
|
||||
})
|
||||
@@ -695,7 +696,7 @@ DebugMenuCommands.register("setmoney", {
|
||||
"description" => _INTL("Edit how much money you have."),
|
||||
"effect" => proc {
|
||||
params = ChooseNumberParams.new
|
||||
params.setRange(0, MAX_MONEY)
|
||||
params.setRange(0, Settings::MAX_MONEY)
|
||||
params.setDefaultValue($Trainer.money)
|
||||
$Trainer.money = pbMessageChooseNumber(_INTL("Set the player's money."), params)
|
||||
pbMessage(_INTL("You now have ${1}.", $Trainer.money.to_s_formatted))
|
||||
@@ -708,7 +709,7 @@ DebugMenuCommands.register("setcoins", {
|
||||
"description" => _INTL("Edit how many Game Corner Coins you have."),
|
||||
"effect" => proc {
|
||||
params = ChooseNumberParams.new
|
||||
params.setRange(0, MAX_COINS)
|
||||
params.setRange(0, Settings::MAX_COINS)
|
||||
params.setDefaultValue($PokemonGlobal.coins)
|
||||
$PokemonGlobal.coins = pbMessageChooseNumber(_INTL("Set the player's Coin amount."), params)
|
||||
pbMessage(_INTL("You now have {1} Coins.", $PokemonGlobal.coins.to_s_formatted))
|
||||
@@ -746,7 +747,7 @@ DebugMenuCommands.register("dexlists", {
|
||||
loop do
|
||||
dexescmds = []
|
||||
dexescmds.push(_INTL("Have Pokédex: {1}", $Trainer.pokedex ? "[YES]" : "[NO]"))
|
||||
d = pbDexNames
|
||||
d = Settings.pokedex_names
|
||||
for i in 0...d.length
|
||||
name = d[i]
|
||||
name = name[0] if name.is_a?(Array)
|
||||
@@ -816,7 +817,7 @@ DebugMenuCommands.register("renameplayer", {
|
||||
"name" => _INTL("Set Player Name"),
|
||||
"description" => _INTL("Rename the player."),
|
||||
"effect" => proc {
|
||||
trname = pbEnterPlayerName("Your name?", 0, MAX_PLAYER_NAME_SIZE, $Trainer.name)
|
||||
trname = pbEnterPlayerName("Your name?", 0, Settings::MAX_PLAYER_NAME_SIZE, $Trainer.name)
|
||||
if trname == "" && pbConfirmMessage(_INTL("Give yourself a default name?"))
|
||||
trainertype = $Trainer.trainer_type
|
||||
gender = pbGetTrainerTypeGender(trainertype)
|
||||
|
||||
@@ -373,7 +373,7 @@ class SpriteWindow_DebugRoamers < Window_DrawableCommand
|
||||
end
|
||||
|
||||
def roamerCount
|
||||
return ROAMING_SPECIES.length
|
||||
return Settings::ROAMING_SPECIES.length
|
||||
end
|
||||
|
||||
def itemCount
|
||||
@@ -405,7 +405,7 @@ class SpriteWindow_DebugRoamers < Window_DrawableCommand
|
||||
# Advance roaming
|
||||
self.shadowtext(_INTL("[Clear all current roamer locations]"),rect.x,text_y,nameWidth,rect.height)
|
||||
else
|
||||
pkmn = ROAMING_SPECIES[index]
|
||||
pkmn = Settings::ROAMING_SPECIES[index]
|
||||
name = GameData::Species.get(pkmn[0]).name + " (Lv. #{pkmn[1]})"
|
||||
status = ""
|
||||
statuscolor = 0
|
||||
@@ -480,7 +480,7 @@ def pbDebugRoamers
|
||||
if cmdwindow.index<cmdwindow.roamerCount
|
||||
pbPlayDecisionSE
|
||||
# Toggle through roaming, not roaming, defeated
|
||||
pkmn = ROAMING_SPECIES[cmdwindow.index]
|
||||
pkmn = Settings::ROAMING_SPECIES[cmdwindow.index]
|
||||
if pkmn[2]>0 && !$game_switches[pkmn[2]]
|
||||
# not roaming -> roaming
|
||||
$game_switches[pkmn[2]] = true
|
||||
@@ -500,7 +500,7 @@ def pbDebugRoamers
|
||||
end
|
||||
cmdwindow.refresh
|
||||
elsif cmdwindow.index==cmdwindow.itemCount-2 # All roam
|
||||
if ROAMING_SPECIES.length==0
|
||||
if Settings::ROAMING_SPECIES.length==0
|
||||
pbPlayBuzzerSE
|
||||
else
|
||||
pbPlayDecisionSE
|
||||
@@ -509,11 +509,11 @@ def pbDebugRoamers
|
||||
cmdwindow.refresh
|
||||
end
|
||||
else # Clear all roaming locations
|
||||
if ROAMING_SPECIES.length==0
|
||||
if Settings::ROAMING_SPECIES.length==0
|
||||
pbPlayBuzzerSE
|
||||
else
|
||||
pbPlayDecisionSE
|
||||
for i in 0...ROAMING_SPECIES.length
|
||||
for i in 0...Settings::ROAMING_SPECIES.length
|
||||
$PokemonGlobal.roamPosition[i] = nil
|
||||
end
|
||||
$PokemonGlobal.roamedAlready = false
|
||||
@@ -638,7 +638,7 @@ def pbCompileTextUI
|
||||
begin
|
||||
pbCompileText
|
||||
pbMessageDisplay(msgwindow,_INTL("Successfully compiled text and saved it to intl.dat.\1"))
|
||||
pbMessageDisplay(msgwindow,_INTL("To use the file in a game, place the file in the Data folder under a different name, and edit the LANGUAGES array in the Settings script."))
|
||||
pbMessageDisplay(msgwindow,_INTL("To use the file in a game, place the file in the Data folder under a different name, and edit the Settings::LANGUAGES array in the scripts."))
|
||||
rescue RuntimeError
|
||||
pbMessageDisplay(msgwindow,_INTL("Failed to compile text: {1}",$!.message))
|
||||
end
|
||||
|
||||
@@ -918,7 +918,7 @@ PokemonDebugMenuCommands.register("ownership", {
|
||||
when 0 # Make player's
|
||||
pkmn.owner = Pokemon::Owner.new_from_trainer($Trainer)
|
||||
when 1 # Set OT's name
|
||||
pkmn.owner.name = pbEnterPlayerName(_INTL("{1}'s OT's name?", pkmn.name), 1, MAX_PLAYER_NAME_SIZE)
|
||||
pkmn.owner.name = pbEnterPlayerName(_INTL("{1}'s OT's name?", pkmn.name), 1, Settings::MAX_PLAYER_NAME_SIZE)
|
||||
when 2 # Set OT's gender
|
||||
cmd2 = screen.pbShowCommands(_INTL("Set OT's gender."),
|
||||
[_INTL("Male"), _INTL("Female"), _INTL("Unknown")], pkmn.owner.gender)
|
||||
@@ -958,7 +958,7 @@ PokemonDebugMenuCommands.register("setegg", {
|
||||
when 0 # Make egg
|
||||
if !pkmn.egg? && (pbHasEgg?(pkmn.species) ||
|
||||
screen.pbConfirm(_INTL("{1} cannot legally be an egg. Make egg anyway?", pkmn.speciesName)))
|
||||
pkmn.level = EGG_LEVEL
|
||||
pkmn.level = Settings::EGG_LEVEL
|
||||
pkmn.calcStats
|
||||
pkmn.name = _INTL("Egg")
|
||||
pkmn.steps_to_hatch = pkmn.species_data.hatch_steps
|
||||
|
||||
@@ -967,7 +967,7 @@ end
|
||||
# Main
|
||||
################################################################################
|
||||
def animationEditorMain(animation)
|
||||
viewport=Viewport.new(0, 0, SCREEN_WIDTH + 288, SCREEN_HEIGHT + 288)
|
||||
viewport=Viewport.new(0, 0, Settings::SCREEN_WIDTH + 288, Settings::SCREEN_HEIGHT + 288)
|
||||
viewport.z=99999
|
||||
# Canvas
|
||||
canvas=AnimationCanvas.new(animation[animation.selected],viewport)
|
||||
@@ -1184,10 +1184,10 @@ def pbAnimationEditor
|
||||
animation=PBAnimations.new
|
||||
animation[0].graphic=""
|
||||
end
|
||||
Graphics.resize_screen(SCREEN_WIDTH + 288, SCREEN_HEIGHT + 288)
|
||||
Graphics.resize_screen(Settings::SCREEN_WIDTH + 288, Settings::SCREEN_HEIGHT + 288)
|
||||
pbSetResizeFactor(1)
|
||||
animationEditorMain(animation)
|
||||
Graphics.resize_screen(SCREEN_WIDTH, SCREEN_HEIGHT)
|
||||
Graphics.resize_screen(Settings::SCREEN_WIDTH, Settings::SCREEN_HEIGHT)
|
||||
pbSetResizeFactor($PokemonSystem.screensize)
|
||||
$game_map.autoplay if $game_map
|
||||
end
|
||||
|
||||
@@ -480,7 +480,7 @@ module TrainerBattleProperty
|
||||
[_INTL("Version"), LimitProperty.new(9999), _INTL("Number used to distinguish Trainers with the same name and trainer type.")],
|
||||
[_INTL("Lose Text"), StringProperty, _INTL("Message shown in battle when the Trainer is defeated.")]
|
||||
]
|
||||
MAX_PARTY_SIZE.times do |i|
|
||||
Settings::MAX_PARTY_SIZE.times do |i|
|
||||
properties.push([_INTL("Pokémon {1}", i + 1), TrainerPokemonProperty, _INTL("A Pokémon owned by the Trainer.")])
|
||||
end
|
||||
NUM_ITEMS.times do |i|
|
||||
@@ -524,7 +524,7 @@ def pbTrainerBattleEditor
|
||||
tr_data.version,
|
||||
tr_data.real_lose_text
|
||||
]
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
data.push(tr_data.pokemon[i])
|
||||
end
|
||||
for i in 0...TrainerBattleProperty::NUM_ITEMS
|
||||
@@ -535,11 +535,11 @@ def pbTrainerBattleEditor
|
||||
break if !data
|
||||
party = []
|
||||
items = []
|
||||
for i in 0...MAX_PARTY_SIZE
|
||||
for i in 0...Settings::MAX_PARTY_SIZE
|
||||
party.push(data[4 + i]) if data[4 + i] && data[4 + i][:species]
|
||||
end
|
||||
for i in 0...TrainerBattleProperty::NUM_ITEMS
|
||||
items.push(data[4 + MAX_PARTY_SIZE + i]) if data[4 + MAX_PARTY_SIZE + i]
|
||||
items.push(data[4 + Settings::MAX_PARTY_SIZE + i]) if data[4 + Settings::MAX_PARTY_SIZE + i]
|
||||
end
|
||||
if !data[0]
|
||||
pbMessage(_INTL("Can't save. No trainer type was chosen."))
|
||||
|
||||
@@ -791,7 +791,7 @@ end
|
||||
|
||||
module PocketProperty
|
||||
def self.set(_settingname, oldsetting)
|
||||
commands = pbPocketNames.clone
|
||||
commands = Settings.bag_pocket_names.clone
|
||||
commands.shift
|
||||
cmd = pbMessage(_INTL("Choose a pocket for this item."), commands, -1)
|
||||
return (cmd >= 0) ? cmd + 1 : oldsetting
|
||||
@@ -803,7 +803,7 @@ module PocketProperty
|
||||
|
||||
def self.format(value)
|
||||
return _INTL("No Pocket") if value == 0
|
||||
return (value) ? pbPocketNames[value] : value.inspect
|
||||
return (value) ? Settings.bag_pocket_names[value] : value.inspect
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -677,7 +677,7 @@ module Compiler
|
||||
#=============================================================================
|
||||
def compile_all(mustCompile)
|
||||
FileLineData.clear
|
||||
if (!$INEDITOR || LANGUAGES.length < 2) && safeExists?("Data/messages.dat")
|
||||
if (!$INEDITOR || Settings::LANGUAGES.length < 2) && safeExists?("Data/messages.dat")
|
||||
MessageTypes.loadMessageFile("Data/messages.dat")
|
||||
end
|
||||
if mustCompile
|
||||
|
||||
Reference in New Issue
Block a user