mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Merge branch 'dev' into animations
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -2,6 +2,7 @@
|
||||
Audio/
|
||||
Graphics/
|
||||
Plugins/
|
||||
Screenshots/
|
||||
|
||||
# Data folder, but not Data/Scripts folder or messages_core.dat
|
||||
Data/*
|
||||
@@ -10,6 +11,7 @@ Data/*
|
||||
!Data/messages_core.dat
|
||||
|
||||
# Files in the main project folder
|
||||
errorlog.txt
|
||||
Game.ini
|
||||
Game.rxproj
|
||||
RGSS*.dll
|
||||
|
||||
Binary file not shown.
@@ -16,7 +16,34 @@ module Settings
|
||||
# generations 5 and later are reasonably supported.
|
||||
MECHANICS_GENERATION = 8
|
||||
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# Credits
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# Your game's credits, in an array. You can allow certain lines to be
|
||||
# translated by wrapping them in _INTL() as shown. Blank lines are just "".
|
||||
# To split a line into two columns, put "<s>" in it. Plugin credits and
|
||||
# Essentials engine credits are added to the end of these credits
|
||||
# automatically.
|
||||
def self.game_credits
|
||||
return [
|
||||
_INTL("My Game by:"),
|
||||
"Maruno",
|
||||
"",
|
||||
_INTL("Also involved were:"),
|
||||
"A. Lee Uss<s>Anne O'Nymus",
|
||||
"Ecksam Pell<s>Jane Doe",
|
||||
"Joe Dan<s>Nick Nayme",
|
||||
"Sue Donnim<s>",
|
||||
"",
|
||||
_INTL("Special thanks to:"),
|
||||
"Pizza"
|
||||
]
|
||||
end
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# The player and NPCs
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# The maximum amount of money the player can have.
|
||||
MAX_MONEY = 999_999
|
||||
@@ -28,128 +55,6 @@ module Settings
|
||||
MAX_SOOT = 9_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 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
|
||||
# Whether super shininess is enabled (uses a different shiny animation).
|
||||
SUPER_SHINY = (MECHANICS_GENERATION >= 8)
|
||||
# The odds of a wild Pokémon/bred egg having Pokérus (out of 65536).
|
||||
POKERUS_CHANCE = 3
|
||||
# Whether IVs and EVs are treated as 0 when calculating a Pokémon's stats.
|
||||
# IVs and EVs still exist, and are used by Hidden Power and some cosmetic
|
||||
# things as normal.
|
||||
DISABLE_IVS_AND_EVS = false
|
||||
|
||||
#=============================================================================
|
||||
|
||||
# Whether outdoor maps should be shaded according to the time of day.
|
||||
TIME_SHADING = true
|
||||
# Whether the reflections of the player/events will ripple horizontally.
|
||||
ANIMATE_REFLECTIONS = 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 (true), or whether there is
|
||||
# a reaction test first (false).
|
||||
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 Pokémon in the Day Care gain Exp for each step the player takes.
|
||||
# This is true for the Day Care and false for the Pokémon Nursery, both of
|
||||
# which use the same code in Essentials.
|
||||
DAY_CARE_POKEMON_GAIN_EXP_FROM_WALKING = (MECHANICS_GENERATION <= 6)
|
||||
# Whether two Pokémon in the Day Care can learn egg moves from each other if
|
||||
# they are the same species.
|
||||
DAY_CARE_POKEMON_CAN_SHARE_EGG_MOVES = (MECHANICS_GENERATION >= 8)
|
||||
# Whether a bred baby Pokémon can inherit any TM/TR/HM moves from its father.
|
||||
# It can never inherit TM/TR/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)
|
||||
# Whether the Pokédex entry of a newly owned species will be shown after it
|
||||
# hatches from an egg, after it evolves and after obtaining it from a trade,
|
||||
# in addition to after catching it in battle.
|
||||
SHOW_NEW_SPECIES_POKEDEX_ENTRY_MORE_OFTEN = (MECHANICS_GENERATION >= 7)
|
||||
# Whether you get 1 Premier Ball for every 10 of any kind of Poké Ball bought
|
||||
# at once (true), or 1 Premier Ball for buying 10+ Poké Balls (false).
|
||||
MORE_BONUS_PREMIER_BALLS = (MECHANICS_GENERATION >= 8)
|
||||
# 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 = 20 * 60 # 20 minutes
|
||||
|
||||
#=============================================================================
|
||||
|
||||
# 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 the Move Relearner can also teach egg moves that the Pokémon knew
|
||||
# when it hatched and moves that the Pokémon was once taught by a TR. Moves
|
||||
# from the Pokémon's level-up moveset of the same or a lower level than the
|
||||
# Pokémon can always be relearned.
|
||||
MOVE_RELEARNER_CAN_TEACH_MORE_MOVES = (MECHANICS_GENERATION >= 6)
|
||||
# Whether various HP-healing items heal the amounts they do in Gen 7+ (true)
|
||||
# or in earlier Generations (false).
|
||||
REBALANCED_HEALING_ITEM_AMOUNTS = (MECHANICS_GENERATION >= 7)
|
||||
# Whether Rage Candy Bar acts as a Full Heal (true) or a Potion (false).
|
||||
RAGE_CANDY_BAR_CURES_STATUS_PROBLEMS = (MECHANICS_GENERATION >= 7)
|
||||
# Whether vitamins can add EVs no matter how many that stat already has in it
|
||||
# (true), or whether they can't make that stat's EVs greater than 100 (false).
|
||||
NO_VITAMIN_EV_CAP = (MECHANICS_GENERATION >= 8)
|
||||
# Whether Rare Candy can be used on a Pokémon that is already at its maximum
|
||||
# level if it is able to evolve by level-up (if so, triggers that evolution).
|
||||
RARE_CANDY_USABLE_AT_MAX_LEVEL = (MECHANICS_GENERATION >= 8)
|
||||
# Whether the player can choose how many of an item to use at once on a
|
||||
# Pokémon. This applies to Exp-changing items (Rare Candy, Exp Candies) and
|
||||
# EV-changing items (vitamins, feathers, EV-lowering berries).
|
||||
USE_MULTIPLE_STAT_ITEMS_AT_ONCE = (MECHANICS_GENERATION >= 8)
|
||||
|
||||
#=============================================================================
|
||||
|
||||
# Whether Repel uses the level of the first Pokémon in the party regardless of
|
||||
# its HP (true), or it uses the level of the first unfainted Pokémon (false).
|
||||
REPEL_COUNTS_FAINTED_POKEMON = (MECHANICS_GENERATION >= 6)
|
||||
# Whether more abilities affect whether wild Pokémon appear, which Pokémon
|
||||
# they are, etc.
|
||||
MORE_ABILITIES_AFFECT_WILD_ENCOUNTERS = (MECHANICS_GENERATION >= 8)
|
||||
# Whether the Black/White Flutes will raise/lower the levels of wild Pokémon
|
||||
# respectively (true), or will lower/raise the wild encounter rate
|
||||
# respectively (false).
|
||||
FLUTES_CHANGE_WILD_ENCOUNTER_LEVELS = (MECHANICS_GENERATION >= 6)
|
||||
# Whether shiny wild Pokémon are more likely to appear if the player has
|
||||
# previously defeated/caught lots of other Pokémon of the same species.
|
||||
HIGHER_SHINY_CHANCES_WITH_NUMBER_BATTLED = (MECHANICS_GENERATION >= 8)
|
||||
# Whether overworld weather can set the default terrain effect in battle.
|
||||
# Storm weather sets Electric Terrain, and fog weather sets Misty Terrain.
|
||||
OVERWORLD_WEATHER_SETS_BATTLE_TERRAIN = (MECHANICS_GENERATION >= 8)
|
||||
# The default setting for Phone.rematches_enabled, which determines whether
|
||||
# trainers registered in the Phone can become ready for a rematch. If false,
|
||||
# Phone.rematches_enabled = true will enable rematches at any point you want.
|
||||
PHONE_REMATCHES_POSSIBLE_FROM_BEGINNING = false
|
||||
# Whether the messages in a phone call with a trainer are colored blue or red
|
||||
# depending on that trainer's gender. Note that this doesn't apply to contacts
|
||||
# that are not trainers; they will need to be colored manually in their Common
|
||||
# Events.
|
||||
COLOR_PHONE_CALL_MESSAGES_BY_CONTACT_GENDER = true
|
||||
|
||||
#=============================================================================
|
||||
|
||||
# A set of arrays each containing a trainer type followed by a Game 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.
|
||||
@@ -159,8 +64,46 @@ module Settings
|
||||
[:CHAMPION, 12]
|
||||
]
|
||||
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# Overworld
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# Whether outdoor maps should be shaded according to the time of day.
|
||||
TIME_SHADING = true
|
||||
# Whether the reflections of the player/events will ripple horizontally.
|
||||
ANIMATE_REFLECTIONS = true
|
||||
# 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 (true), or whether there is
|
||||
# a reaction test first (false).
|
||||
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 = 20 * 60 # 20 minutes
|
||||
# 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 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)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Using moves in the overworld
|
||||
#-----------------------------------------------------------------------------
|
||||
# Whether you need at least a certain number of badges to use some hidden
|
||||
# moves in the field (true), or whether you need one specific badge to use
|
||||
# them (false). The amounts/specific badges are defined below.
|
||||
@@ -180,100 +123,54 @@ module Settings
|
||||
BADGE_FOR_DIVE = 7
|
||||
BADGE_FOR_WATERFALL = 8
|
||||
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# Pokémon
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# The names of each pocket of the Bag.
|
||||
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).
|
||||
BAG_MAX_POCKET_SIZE = [-1, -1, -1, -1, -1, -1, -1, -1]
|
||||
# Whether each pocket in turn auto-sorts itself by item ID number.
|
||||
BAG_POCKET_AUTO_SORT = [false, false, false, true, true, false, false, false]
|
||||
# The maximum number of items each slot in the Bag can hold.
|
||||
BAG_MAX_PER_SLOT = 999
|
||||
# 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
|
||||
# Whether super shininess is enabled (uses a different shiny animation).
|
||||
SUPER_SHINY = (MECHANICS_GENERATION >= 8)
|
||||
# Whether Pokémon with the "Legendary", "Mythical" or "Ultra Beast" flags will
|
||||
# have at least 3 perfect IVs.
|
||||
LEGENDARIES_HAVE_SOME_PERFECT_IVS = (MECHANICS_GENERATION >= 6)
|
||||
# The odds of a wild Pokémon/bred egg having Pokérus (out of 65536).
|
||||
POKERUS_CHANCE = 3
|
||||
# Whether IVs and EVs are treated as 0 when calculating a Pokémon's stats.
|
||||
# IVs and EVs still exist, and are used by Hidden Power and some cosmetic
|
||||
# things as normal.
|
||||
DISABLE_IVS_AND_EVS = false
|
||||
# Whether the Move Relearner can also teach egg moves that the Pokémon knew
|
||||
# when it hatched and moves that the Pokémon was once taught by a TR. Moves
|
||||
# from the Pokémon's level-up moveset of the same or a lower level than the
|
||||
# Pokémon can always be relearned.
|
||||
MOVE_RELEARNER_CAN_TEACH_MORE_MOVES = (MECHANICS_GENERATION >= 6)
|
||||
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# Breeding Pokémon and Day Care
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# The number of boxes in Pokémon storage.
|
||||
NUM_STORAGE_BOXES = 40
|
||||
# Whether putting a Pokémon into Pokémon storage will heal it. IF false, they
|
||||
# are healed by the Recover All: Entire Party event command (at Poké Centers).
|
||||
HEAL_STORED_POKEMON = (MECHANICS_GENERATION <= 7)
|
||||
# Whether Pokémon in the Day Care gain Exp for each step the player takes.
|
||||
# This should be true for the Day Care and false for the Pokémon Nursery, both
|
||||
# of which use the same code in Essentials.
|
||||
DAY_CARE_POKEMON_GAIN_EXP_FROM_WALKING = (MECHANICS_GENERATION <= 6)
|
||||
# Whether two Pokémon in the Day Care can learn egg moves from each other if
|
||||
# they are the same species.
|
||||
DAY_CARE_POKEMON_CAN_SHARE_EGG_MOVES = (MECHANICS_GENERATION >= 8)
|
||||
# Whether a bred baby Pokémon can inherit any TM/TR/HM moves from its father.
|
||||
# It can never inherit TM/TR/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)
|
||||
|
||||
#=============================================================================
|
||||
|
||||
# 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 the Pokédex lists, in the order they are defined in the PBS
|
||||
# file "regional_dexes.txt". The last name is for the National Dex and is
|
||||
# added onto the end of this array (remember that you don't need to use it).
|
||||
# This array's order is also the order of $player.pokedex.unlocked_dexes,
|
||||
# which records which Dexes have been unlocked (the first is unlocked by
|
||||
# default). If an entry is just a name, then the region map shown in the Area
|
||||
# page while viewing that Dex list will be the region map of the region the
|
||||
# player is currently in. The National Dex entry should always behave like
|
||||
# this. If an entry is of the form [name, number], then the number is a region
|
||||
# number, and that region's map will appear in the Area page while viewing
|
||||
# that Dex list, no matter which 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 (in the same
|
||||
# order as above, except the National Dex is -1). All Dex lists included here
|
||||
# will begin their numbering at 0 rather than 1 (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.
|
||||
# * Game 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/UI/Town Map folder.
|
||||
# * The graphic will always (true) or never (false) be shown on a wall map.
|
||||
REGION_MAP_EXTRAS = [
|
||||
[0, 51, 16, 15, "hidden_Berth", false],
|
||||
[0, 52, 20, 14, "hidden_Faraday", false]
|
||||
]
|
||||
|
||||
# Whether the player can use Fly while looking at the Town Map. This is only
|
||||
# allowed if the player can use Fly normally.
|
||||
CAN_FLY_FROM_TOWN_MAP = true
|
||||
|
||||
#=============================================================================
|
||||
|
||||
# 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 = []
|
||||
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# Roaming Pokémon
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# A list of maps used by roaming Pokémon. Each map has an array of other maps
|
||||
# it can lead to.
|
||||
@@ -294,10 +191,15 @@ module Settings
|
||||
# * Species.
|
||||
# * Level.
|
||||
# * Game 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 the bottom of PField_RoamingPokemon for lists.
|
||||
# * Encounter type (see def pbRoamingMethodAllowed for their use):
|
||||
# 0 = grass, walking in cave, surfing
|
||||
# 1 = grass, walking in cave
|
||||
# 2 = surfing
|
||||
# 3 = fishing
|
||||
# 4 = surfing, fishing
|
||||
# * Name of BGM to play for that encounter (optional).
|
||||
# * Roaming areas specifically for this Pokémon (optional).
|
||||
# * Roaming areas specifically for this Pokémon (optional; used instead of
|
||||
# ROAMING_AREAS).
|
||||
ROAMING_SPECIES = [
|
||||
[:LATIAS, 30, 53, 0, "Battle roaming"],
|
||||
[:LATIOS, 30, 53, 0, "Battle roaming"],
|
||||
@@ -310,7 +212,166 @@ module Settings
|
||||
[:ENTEI, 40, 55, 1]
|
||||
]
|
||||
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# Party and Pokémon storage
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# The maximum number of Pokémon that can be in the party.
|
||||
MAX_PARTY_SIZE = 6
|
||||
# The number of boxes in Pokémon storage.
|
||||
NUM_STORAGE_BOXES = 40
|
||||
# Whether putting a Pokémon into Pokémon storage will heal it. If false, they
|
||||
# are healed by the Recover All: Entire Party event command (at Poké Centers).
|
||||
HEAL_STORED_POKEMON = (MECHANICS_GENERATION <= 7)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Items
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# Whether various HP-healing items heal the amounts they do in Gen 7+ (true)
|
||||
# or in earlier Generations (false).
|
||||
REBALANCED_HEALING_ITEM_AMOUNTS = (MECHANICS_GENERATION >= 7)
|
||||
# Whether vitamins can add EVs no matter how many that stat already has in it
|
||||
# (true), or whether they can't make that stat's EVs greater than 100 (false).
|
||||
NO_VITAMIN_EV_CAP = (MECHANICS_GENERATION >= 8)
|
||||
# Whether Rage Candy Bar acts as a Full Heal (true) or a Potion (false).
|
||||
RAGE_CANDY_BAR_CURES_STATUS_PROBLEMS = (MECHANICS_GENERATION >= 7)
|
||||
# Whether the Black/White Flutes will raise/lower the levels of wild Pokémon
|
||||
# respectively (true), or will lower/raise the wild encounter rate
|
||||
# respectively (false).
|
||||
FLUTES_CHANGE_WILD_ENCOUNTER_LEVELS = (MECHANICS_GENERATION >= 6)
|
||||
# Whether Rare Candy can be used on a Pokémon that is already at its maximum
|
||||
# level if it is able to evolve by level-up (if so, triggers that evolution).
|
||||
RARE_CANDY_USABLE_AT_MAX_LEVEL = (MECHANICS_GENERATION >= 8)
|
||||
# Whether the player can choose how many of an item to use at once on a
|
||||
# Pokémon. This applies to Exp-changing items (Rare Candy, Exp Candies) and
|
||||
# EV-changing items (vitamins, feathers, EV-lowering berries).
|
||||
USE_MULTIPLE_STAT_ITEMS_AT_ONCE = (MECHANICS_GENERATION >= 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 you get 1 Premier Ball for every 10 of any kind of Poké Ball bought
|
||||
# from a Mart at once (true), or 1 Premier Ball for buying 10+ regular Poké
|
||||
# Balls (false).
|
||||
MORE_BONUS_PREMIER_BALLS = (MECHANICS_GENERATION >= 8)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Bag
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# The names of each pocket of the Bag.
|
||||
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).
|
||||
BAG_MAX_POCKET_SIZE = [-1, -1, -1, -1, -1, -1, -1, -1]
|
||||
# Whether each pocket in turn auto-sorts itself by the order items are defined
|
||||
# in the PBS file items.txt.
|
||||
BAG_POCKET_AUTO_SORT = [false, false, false, true, true, false, false, false]
|
||||
# The maximum number of items each slot in the Bag can hold.
|
||||
BAG_MAX_PER_SLOT = 999
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Pokédex
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# The names of the Pokédex lists, in the order they are defined in the PBS
|
||||
# file "regional_dexes.txt". The last name is for the National Dex and is
|
||||
# added onto the end of this array.
|
||||
# Each entry is either just a name, or is an array containing a name and a
|
||||
# number. If there is a number, it is a region number as defined in
|
||||
# town_map.txt. If there is no number, the number of the region the player is
|
||||
# currently in will be used. The region number determines which Town Map is
|
||||
# shown in the Area page when viewing that Pokédex list.
|
||||
def self.pokedex_names
|
||||
return [
|
||||
[_INTL("Kanto Pokédex"), 0],
|
||||
[_INTL("Johto Pokédex"), 1],
|
||||
_INTL("National Pokédex")
|
||||
]
|
||||
end
|
||||
# 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
|
||||
# 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 (in the same
|
||||
# order as above, except the National Dex is -1). All Dex lists included here
|
||||
# will begin their numbering at 0 rather than 1 (e.g. Victini in Unova's Dex).
|
||||
DEXES_WITH_OFFSETS = []
|
||||
# Whether the Pokédex entry of a newly owned species will be shown after it
|
||||
# hatches from an egg, after it evolves and after obtaining it from a trade,
|
||||
# in addition to after catching it in battle.
|
||||
SHOW_NEW_SPECIES_POKEDEX_ENTRY_MORE_OFTEN = (MECHANICS_GENERATION >= 7)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Town Map
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# 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.
|
||||
# * Game 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/UI/Town Map folder.
|
||||
# * The graphic will always (true) or never (false) be shown on a wall map.
|
||||
REGION_MAP_EXTRAS = [
|
||||
[0, 51, 16, 15, "hidden_Berth", false],
|
||||
[0, 52, 20, 14, "hidden_Faraday", false]
|
||||
]
|
||||
# Whether the player can use Fly while looking at the Town Map. This is only
|
||||
# allowed if the player can use Fly normally.
|
||||
CAN_FLY_FROM_TOWN_MAP = true
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Phone
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# The default setting for Phone.rematches_enabled, which determines whether
|
||||
# trainers registered in the Phone can become ready for a rematch. If false,
|
||||
# Phone.rematches_enabled = true will enable rematches at any point you want.
|
||||
PHONE_REMATCHES_POSSIBLE_FROM_BEGINNING = false
|
||||
# Whether the messages in a phone call with a trainer are colored blue or red
|
||||
# depending on that trainer's gender. Note that this doesn't apply to contacts
|
||||
# whose phone calls are in a Common Event; they will need to be colored
|
||||
# manually in their Common Events.
|
||||
COLOR_PHONE_CALL_MESSAGES_BY_CONTACT_GENDER = true
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Battle starting
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# Whether Repel uses the level of the first Pokémon in the party regardless of
|
||||
# its HP (true), or it uses the level of the first unfainted Pokémon (false).
|
||||
REPEL_COUNTS_FAINTED_POKEMON = (MECHANICS_GENERATION >= 6)
|
||||
# Whether more abilities affect whether wild Pokémon appear, which Pokémon
|
||||
# they are, etc.
|
||||
MORE_ABILITIES_AFFECT_WILD_ENCOUNTERS = (MECHANICS_GENERATION >= 8)
|
||||
# Whether shiny wild Pokémon are more likely to appear if the player has
|
||||
# previously defeated/caught lots of other Pokémon of the same species.
|
||||
HIGHER_SHINY_CHANCES_WITH_NUMBER_BATTLED = (MECHANICS_GENERATION >= 8)
|
||||
# Whether overworld weather can set the default terrain effect in battle.
|
||||
# Storm weather sets Electric Terrain, and fog weather sets Misty Terrain.
|
||||
OVERWORLD_WEATHER_SETS_BATTLE_TERRAIN = (MECHANICS_GENERATION >= 8)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Game Switches
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# The Game Switch that is set to ON when the player blacks out.
|
||||
STARTING_OVER_SWITCH = 1
|
||||
@@ -327,7 +388,9 @@ module Settings
|
||||
# with it.
|
||||
DISABLE_BOX_LINK_SWITCH = 35
|
||||
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# Overworld animation IDs
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# ID of the animation played when the player steps on grass (grass rustling).
|
||||
GRASS_ANIMATION_ID = 1
|
||||
@@ -350,16 +413,9 @@ module Settings
|
||||
# is on the map (for new plant growth mechanics only).
|
||||
PLANT_SPARKLE_ANIMATION_ID = 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
|
||||
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# Languages
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# An array of available languages in the game. Each one is an array containing
|
||||
# the display name of the language in-game, and that language's filename
|
||||
@@ -371,7 +427,22 @@ module Settings
|
||||
# ["Deutsch", "deutsch"]
|
||||
]
|
||||
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# Screen size and zoom
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# The default screen width (at a scale of 1.0). You should also edit the
|
||||
# property "defScreenW" in mkxp.json to match.
|
||||
SCREEN_WIDTH = 512
|
||||
# The default screen height (at a scale of 1.0). You should also edit the
|
||||
# property "defScreenH" in mkxp.json to match.
|
||||
SCREEN_HEIGHT = 384
|
||||
# The default screen scale factor. Possible values are 0.5, 1.0, 1.5 and 2.0.
|
||||
SCREEN_SCALE = 1.0
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Messages
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# Available speech frames. These are graphic files in "Graphics/Windowskins/".
|
||||
SPEECH_WINDOWSKINS = [
|
||||
@@ -397,7 +468,6 @@ module Settings
|
||||
"speech hgss 20",
|
||||
"speech pl 18"
|
||||
]
|
||||
|
||||
# Available menu frames. These are graphic files in "Graphics/Windowskins/".
|
||||
MENU_WINDOWSKINS = [
|
||||
"choice 1",
|
||||
@@ -430,31 +500,23 @@ module Settings
|
||||
"choice 28"
|
||||
]
|
||||
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# Debug helpers
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# Your game's credits, in an array. You can allow certain lines to be
|
||||
# translated by wrapping them in _INTL() as shown. Blank lines are just "".
|
||||
# To split a line into two columns, put "<s>" in it. Plugin credits and
|
||||
# Essentials engine credits are added to the end of these credits
|
||||
# automatically.
|
||||
def self.game_credits
|
||||
return [
|
||||
_INTL("My Game by:"),
|
||||
"Maruno",
|
||||
"",
|
||||
_INTL("Also involved were:"),
|
||||
"A. Lee Uss<s>Anne O'Nymus",
|
||||
"Ecksam Pell<s>Jane Doe",
|
||||
"Joe Dan<s>Nick Nayme",
|
||||
"Sue Donnim<s>",
|
||||
"",
|
||||
_INTL("Special thanks to:"),
|
||||
"Pizza"
|
||||
]
|
||||
end
|
||||
# Whether the game will ask you if you want to fully compile every time you
|
||||
# start the game (in Debug mode). You will not need to hold Ctrl/Shift to
|
||||
# compile anything.
|
||||
PROMPT_TO_COMPILE = false
|
||||
# Whether the game will skip the Continue/New Game screen and go straight into
|
||||
# a saved game (if there is one) or start a new game (if there isn't). Only
|
||||
# applies to playing in Debug mode.
|
||||
SKIP_CONTINUE_SCREEN = false
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# DO NOT EDIT THESE!
|
||||
#===============================================================================
|
||||
module Essentials
|
||||
VERSION = "21.1"
|
||||
ERROR_TEXT = ""
|
||||
|
||||
@@ -51,7 +51,6 @@ def pbPrintException(e)
|
||||
end
|
||||
# output to log
|
||||
errorlog = "errorlog.txt"
|
||||
errorlog = RTP.getSaveFileName("errorlog.txt") if (Object.const_defined?(:RTP) rescue false)
|
||||
File.open(errorlog, "ab") do |f|
|
||||
f.write("\r\n=================\r\n\r\n[#{Time.now}]\r\n")
|
||||
f.write(message)
|
||||
|
||||
@@ -108,8 +108,8 @@ end
|
||||
|
||||
def pbResolveAudioSE(file)
|
||||
return nil if !file
|
||||
if RTP.exists?("Audio/SE/" + file, ["", ".wav", ".ogg"]) # ".mp3"
|
||||
return RTP.getPath("Audio/SE/" + file, ["", ".wav", ".ogg"]) # ".mp3"
|
||||
if RTP.exists?("Audio/SE/" + file, ["", ".wav", ".ogg", ".mp3", ".wma"])
|
||||
return RTP.getPath("Audio/SE/" + file, ["", ".wav", ".ogg", ".mp3", ".wma"])
|
||||
end
|
||||
return nil
|
||||
end
|
||||
@@ -197,7 +197,7 @@ module RTP
|
||||
end
|
||||
|
||||
def self.getAudioPath(filename)
|
||||
return self.getPath(filename, ["", ".wav", ".wma", ".mid", ".ogg", ".midi"]) # ".mp3"
|
||||
return self.getPath(filename, ["", ".wav", ".ogg", ".mp3", ".midi", ".mid", ".wma"])
|
||||
end
|
||||
|
||||
def self.getPath(filename, extensions = [])
|
||||
@@ -261,7 +261,7 @@ end
|
||||
#===============================================================================
|
||||
module FileTest
|
||||
IMAGE_EXTENSIONS = [".png", ".gif"] # ".jpg", ".jpeg", ".bmp",
|
||||
AUDIO_EXTENSIONS = [".mid", ".midi", ".ogg", ".wav", ".wma"] # ".mp3"
|
||||
AUDIO_EXTENSIONS = [".wav", ".ogg", ".mp3", ".midi", ".mid", ".wma"]
|
||||
|
||||
def self.audio_exist?(filename)
|
||||
return RTP.exists?(filename, AUDIO_EXTENSIONS)
|
||||
|
||||
@@ -509,17 +509,19 @@ class Translation
|
||||
end
|
||||
|
||||
def load_message_files(filename)
|
||||
@core_messages = nil
|
||||
@game_messages = nil
|
||||
begin
|
||||
core_filename = sprintf("Data/messages_%s_core.dat", filename)
|
||||
if FileTest.exist?(core_filename)
|
||||
pbRgssOpen(core_filename, "rb") { |f| @core_messages = Marshal.load(f) }
|
||||
@core_messages = load_data(core_filename)
|
||||
@core_messages = nil if !@core_messages.is_a?(Array)
|
||||
end
|
||||
@core_messages = nil if !@core_messages.is_a?(Array)
|
||||
game_filename = sprintf("Data/messages_%s_game.dat", filename)
|
||||
if FileTest.exist?(game_filename)
|
||||
pbRgssOpen(game_filename, "rb") { |f| @game_messages = Marshal.load(f) }
|
||||
@game_messages = load_data(game_filename)
|
||||
@game_messages = nil if !@game_messages.is_a?(Array)
|
||||
end
|
||||
@game_messages = nil if !@game_messages.is_a?(Array)
|
||||
rescue
|
||||
@core_messages = nil
|
||||
@game_messages = nil
|
||||
|
||||
@@ -380,7 +380,6 @@ module PluginManager
|
||||
e.backtrace[0, 10].each { |i| message += "#{i}\r\n" }
|
||||
# output to log
|
||||
errorlog = "errorlog.txt"
|
||||
errorlog = RTP.getSaveFileName("errorlog.txt") if (Object.const_defined?(:RTP) rescue false)
|
||||
File.open(errorlog, "ab") do |f|
|
||||
f.write("\r\n=================\r\n\r\n[#{Time.now}]\r\n")
|
||||
f.write(message)
|
||||
@@ -411,7 +410,7 @@ module PluginManager
|
||||
Compiler.pbCompilerEachPreppedLine(filename) do |line, line_no|
|
||||
# split line up into property name and values
|
||||
if !line[/^\s*(\w+)\s*=\s*(.*)$/]
|
||||
raise _INTL("Bad line syntax (expected syntax like XXX=YYY)\n{1}", FileLineData.linereport)
|
||||
raise _INTL("Bad line syntax (expected syntax like XXX=YYY).") + "\n" + FileLineData.linereport
|
||||
end
|
||||
property = $~[1].upcase
|
||||
data = $~[2].split(",")
|
||||
@@ -555,6 +554,7 @@ module PluginManager
|
||||
def self.needCompiling?(order, plugins)
|
||||
# fixed actions
|
||||
return false if !$DEBUG || FileTest.exist?("Game.rgssad")
|
||||
return true if $full_compile
|
||||
return true if !FileTest.exist?("Data/PluginScripts.rxdata")
|
||||
Input.update
|
||||
return true if Input.press?(Input::SHIFT) || Input.press?(Input::CTRL)
|
||||
|
||||
@@ -1,262 +1,6 @@
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
class SpriteAnimation
|
||||
@@_animations = []
|
||||
@@_reference_count = {}
|
||||
|
||||
def initialize(sprite)
|
||||
@sprite = sprite
|
||||
end
|
||||
|
||||
def x(*arg); @sprite.x(*arg); end
|
||||
def y(*arg); @sprite.y(*arg); end
|
||||
def ox(*arg); @sprite.ox(*arg); end
|
||||
def oy(*arg); @sprite.oy(*arg); end
|
||||
def viewport(*arg); @sprite.viewport(*arg); end
|
||||
def flash(*arg); @sprite.flash(*arg); end
|
||||
def src_rect(*arg); @sprite.src_rect(*arg); end
|
||||
def opacity(*arg); @sprite.opacity(*arg); end
|
||||
def tone(*arg); @sprite.tone(*arg); end
|
||||
|
||||
def self.clear
|
||||
@@_animations.clear
|
||||
end
|
||||
|
||||
def dispose
|
||||
dispose_animation
|
||||
dispose_loop_animation
|
||||
end
|
||||
|
||||
def animation(animation, hit, height = 3)
|
||||
dispose_animation
|
||||
@_animation = animation
|
||||
return if @_animation.nil?
|
||||
@_animation_hit = hit
|
||||
@_animation_height = height
|
||||
@_animation_duration = @_animation.frame_max
|
||||
@_animation_index = -1
|
||||
fr = 20
|
||||
if @_animation.name[/\[\s*(\d+?)\s*\]\s*$/]
|
||||
fr = $~[1].to_i
|
||||
end
|
||||
@_animation_time_per_frame = 1.0 / fr
|
||||
@_animation_timer_start = System.uptime
|
||||
animation_name = @_animation.animation_name
|
||||
animation_hue = @_animation.animation_hue
|
||||
bitmap = pbGetAnimation(animation_name, animation_hue)
|
||||
if @@_reference_count.include?(bitmap)
|
||||
@@_reference_count[bitmap] += 1
|
||||
else
|
||||
@@_reference_count[bitmap] = 1
|
||||
end
|
||||
@_animation_sprites = []
|
||||
if @_animation.position != 3 || !@@_animations.include?(animation)
|
||||
16.times do
|
||||
sprite = ::Sprite.new(self.viewport)
|
||||
sprite.bitmap = bitmap
|
||||
sprite.visible = false
|
||||
@_animation_sprites.push(sprite)
|
||||
end
|
||||
@@_animations.push(animation) unless @@_animations.include?(animation)
|
||||
end
|
||||
update_animation
|
||||
end
|
||||
|
||||
def loop_animation(animation)
|
||||
return if animation == @_loop_animation
|
||||
dispose_loop_animation
|
||||
@_loop_animation = animation
|
||||
return if @_loop_animation.nil?
|
||||
@_loop_animation_duration = @_animation.frame_max
|
||||
@_loop_animation_index = -1
|
||||
fr = 20
|
||||
if @_animation.name[/\[\s*(\d+?)\s*\]\s*$/]
|
||||
fr = $~[1].to_i
|
||||
end
|
||||
@_loop_animation_time_per_frame = 1.0 / fr
|
||||
@_loop_animation_timer_start = System.uptime
|
||||
animation_name = @_loop_animation.animation_name
|
||||
animation_hue = @_loop_animation.animation_hue
|
||||
bitmap = pbGetAnimation(animation_name, animation_hue)
|
||||
if @@_reference_count.include?(bitmap)
|
||||
@@_reference_count[bitmap] += 1
|
||||
else
|
||||
@@_reference_count[bitmap] = 1
|
||||
end
|
||||
@_loop_animation_sprites = []
|
||||
16.times do
|
||||
sprite = ::Sprite.new(self.viewport)
|
||||
sprite.bitmap = bitmap
|
||||
sprite.visible = false
|
||||
@_loop_animation_sprites.push(sprite)
|
||||
end
|
||||
update_loop_animation
|
||||
end
|
||||
|
||||
def dispose_animation
|
||||
return if @_animation_sprites.nil?
|
||||
sprite = @_animation_sprites[0]
|
||||
if sprite
|
||||
@@_reference_count[sprite.bitmap] -= 1
|
||||
sprite.bitmap.dispose if @@_reference_count[sprite.bitmap] == 0
|
||||
end
|
||||
@_animation_sprites.each { |s| s.dispose }
|
||||
@_animation_sprites = nil
|
||||
@_animation = nil
|
||||
@_animation_duration = 0
|
||||
end
|
||||
|
||||
def dispose_loop_animation
|
||||
return if @_loop_animation_sprites.nil?
|
||||
sprite = @_loop_animation_sprites[0]
|
||||
if sprite
|
||||
@@_reference_count[sprite.bitmap] -= 1
|
||||
sprite.bitmap.dispose if @@_reference_count[sprite.bitmap] == 0
|
||||
end
|
||||
@_loop_animation_sprites.each { |s| s.dispose }
|
||||
@_loop_animation_sprites = nil
|
||||
@_loop_animation = nil
|
||||
end
|
||||
|
||||
def active?
|
||||
return @_loop_animation_sprites || @_animation_sprites
|
||||
end
|
||||
|
||||
def effect?
|
||||
return @_animation_duration > 0
|
||||
end
|
||||
|
||||
def update
|
||||
update_animation if @_animation
|
||||
update_loop_animation if @_loop_animation
|
||||
end
|
||||
|
||||
def update_animation
|
||||
new_index = ((System.uptime - @_animation_timer_start) / @_animation_time_per_frame).to_i
|
||||
if new_index >= @_animation_duration
|
||||
dispose_animation
|
||||
return
|
||||
end
|
||||
quick_update = (@_animation_index == new_index)
|
||||
@_animation_index = new_index
|
||||
frame_index = @_animation_index
|
||||
cell_data = @_animation.frames[frame_index].cell_data
|
||||
position = @_animation.position
|
||||
animation_set_sprites(@_animation_sprites, cell_data, position, quick_update)
|
||||
return if quick_update
|
||||
@_animation.timings.each do |timing|
|
||||
next if timing.frame != frame_index
|
||||
animation_process_timing(timing, @_animation_hit)
|
||||
end
|
||||
end
|
||||
|
||||
def update_loop_animation
|
||||
new_index = ((System.uptime - @_loop_animation_timer_start) / @_loop_animation_time_per_frame).to_i
|
||||
new_index %= @_loop_animation_duration
|
||||
quick_update = (@_loop_animation_index == new_index)
|
||||
@_loop_animation_index = new_index
|
||||
frame_index = @_loop_animation_index
|
||||
cell_data = @_loop_animation.frames[frame_index].cell_data
|
||||
position = @_loop_animation.position
|
||||
animation_set_sprites(@_loop_animation_sprites, cell_data, position, quick_update)
|
||||
return if quick_update
|
||||
@_loop_animation.timings.each do |timing|
|
||||
next if timing.frame != frame_index
|
||||
animation_process_timing(timing, true)
|
||||
end
|
||||
end
|
||||
|
||||
def animation_set_sprites(sprites, cell_data, position, quick_update = false)
|
||||
sprite_x = 320
|
||||
sprite_y = 240
|
||||
if position == 3 # Screen
|
||||
if self.viewport
|
||||
sprite_x = self.viewport.rect.width / 2
|
||||
sprite_y = self.viewport.rect.height - 160
|
||||
end
|
||||
else
|
||||
sprite_x = self.x - self.ox + (self.src_rect.width / 2)
|
||||
sprite_y = self.y - self.oy
|
||||
if self.src_rect.height > 1
|
||||
sprite_y += self.src_rect.height / 2 if position == 1 # Middle
|
||||
sprite_y += self.src_rect.height if position == 2 # Bottom
|
||||
end
|
||||
end
|
||||
16.times do |i|
|
||||
sprite = sprites[i]
|
||||
pattern = cell_data[i, 0]
|
||||
if sprite.nil? || pattern.nil? || pattern == -1
|
||||
sprite.visible = false if sprite
|
||||
next
|
||||
end
|
||||
sprite.x = sprite_x + cell_data[i, 1]
|
||||
sprite.y = sprite_y + cell_data[i, 2]
|
||||
next if quick_update
|
||||
sprite.visible = true
|
||||
sprite.src_rect.set((pattern % 5) * 192, (pattern / 5) * 192, 192, 192)
|
||||
case @_animation_height
|
||||
when 0 then sprite.z = 1
|
||||
when 1 then sprite.z = sprite.y + (Game_Map::TILE_HEIGHT * 3 / 2) + 1
|
||||
when 2 then sprite.z = sprite.y + (Game_Map::TILE_HEIGHT * 3) + 1
|
||||
else sprite.z = 2000
|
||||
end
|
||||
sprite.ox = 96
|
||||
sprite.oy = 96
|
||||
sprite.zoom_x = cell_data[i, 3] / 100.0
|
||||
sprite.zoom_y = cell_data[i, 3] / 100.0
|
||||
sprite.angle = cell_data[i, 4]
|
||||
sprite.mirror = (cell_data[i, 5] == 1)
|
||||
sprite.tone = self.tone
|
||||
sprite.opacity = cell_data[i, 6] * self.opacity / 255.0
|
||||
sprite.blend_type = cell_data[i, 7]
|
||||
end
|
||||
end
|
||||
|
||||
def animation_process_timing(timing, hit)
|
||||
if timing.condition == 0 ||
|
||||
(timing.condition == 1 && hit == true) ||
|
||||
(timing.condition == 2 && hit == false)
|
||||
if timing.se.name != ""
|
||||
se = timing.se
|
||||
pbSEPlay(se)
|
||||
end
|
||||
case timing.flash_scope
|
||||
when 1
|
||||
self.flash(timing.flash_color, timing.flash_duration * 2)
|
||||
when 2
|
||||
self.viewport.flash(timing.flash_color, timing.flash_duration * 2) if self.viewport
|
||||
when 3
|
||||
self.flash(nil, timing.flash_duration * 2)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def x=(x)
|
||||
sx = x - self.x
|
||||
return if sx == 0
|
||||
if @_animation_sprites
|
||||
16.times { |i| @_animation_sprites[i].x += sx }
|
||||
end
|
||||
if @_loop_animation_sprites
|
||||
16.times { |i| @_loop_animation_sprites[i].x += sx }
|
||||
end
|
||||
end
|
||||
|
||||
def y=(y)
|
||||
sy = y - self.y
|
||||
return if sy == 0
|
||||
if @_animation_sprites
|
||||
16.times { |i| @_animation_sprites[i].y += sy }
|
||||
end
|
||||
if @_loop_animation_sprites
|
||||
16.times { |i| @_loop_animation_sprites[i].y += sy }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
# Additions to class Sprite that allows class AnimationContainerSprite to attach
|
||||
# overworld animations to itself.
|
||||
#===============================================================================
|
||||
module RPG
|
||||
class Sprite < ::Sprite
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
module Settings
|
||||
#-----------------------------------------------------------------------------
|
||||
# Turn order and disobedience
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# 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.
|
||||
@@ -10,22 +17,44 @@ module Settings
|
||||
# Whether foreign Pokémon can disobey the player's commands if the Pokémon is
|
||||
# too high a level compared to the number of Gym Badges the player has.
|
||||
FOREIGN_HIGH_LEVEL_POKEMON_CAN_DISOBEY = true
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Mega Evolution
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# The Game Switch which, while ON, prevents all Pokémon in battle from Mega
|
||||
# Evolving even if they otherwise could.
|
||||
NO_MEGA_EVOLUTION = 34
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Move usage calculations
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# 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)
|
||||
MOVE_CATEGORY_PER_MOVE = (MECHANICS_GENERATION >= 4)
|
||||
# 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)
|
||||
|
||||
#=============================================================================
|
||||
|
||||
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)
|
||||
MORE_TYPE_EFFECTS = (MECHANICS_GENERATION >= 6)
|
||||
# The minimum number of Gym 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
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Ability and item effects
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# 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
|
||||
@@ -38,7 +67,9 @@ module Settings
|
||||
# raises the holder's Special Attack and Special Defense by 50% (false).
|
||||
SOUL_DEW_POWERS_UP_TYPES = (MECHANICS_GENERATION >= 7)
|
||||
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# Affection
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# Whether Pokémon with high happiness will gain more Exp from battles, have a
|
||||
# chance of avoiding/curing negative effects by themselves, resisting
|
||||
@@ -50,51 +81,44 @@ module Settings
|
||||
# 179. Also lowers the happiness evolution threshold to 160.
|
||||
APPLY_HAPPINESS_SOFT_CAP = AFFECTION_EFFECTS
|
||||
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# Capturing Pokémon
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# 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 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 >= 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 Exp gained from beating a Pokémon is multiplied by 1.5 if that
|
||||
# Pokémon is owned by another trainer.
|
||||
MORE_EXP_FROM_TRAINER_POKEMON = (MECHANICS_GENERATION <= 6)
|
||||
# Whether a Pokémon holding a Power item gains 8 (true) or 4 (false) EVs in
|
||||
# the relevant stat.
|
||||
MORE_EVS_FROM_POWER_ITEMS = (MECHANICS_GENERATION >= 7)
|
||||
# Whether the critical capture mechanic applies. Note that its calculation 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)
|
||||
# Whether the player is asked what to do with a newly caught Pokémon if their
|
||||
# party is full. If true, the player can toggle whether they are asked this in
|
||||
# the Options screen.
|
||||
NEW_CAPTURE_CAN_REPLACE_PARTY_MEMBER = (MECHANICS_GENERATION >= 7)
|
||||
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# Exp and EV gain
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# 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 Exp gained from beating a Pokémon is multiplied by 1.5 if that
|
||||
# Pokémon is owned by another trainer.
|
||||
MORE_EXP_FROM_TRAINER_POKEMON = (MECHANICS_GENERATION <= 6)
|
||||
# Whether a Pokémon holding a Power item gains 8 (true) or 4 (false) EVs in
|
||||
# the relevant stat.
|
||||
MORE_EVS_FROM_POWER_ITEMS = (MECHANICS_GENERATION >= 7)
|
||||
# Whether Pokémon gain Exp for capturing a Pokémon.
|
||||
GAIN_EXP_FOR_CAPTURE = (MECHANICS_GENERATION >= 6)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# End of battle
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# 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).
|
||||
@@ -105,7 +129,9 @@ module Settings
|
||||
# Whether fainted Pokémon can try to evolve after a battle.
|
||||
CHECK_EVOLUTION_FOR_FAINTED_POKEMON = true
|
||||
|
||||
#=============================================================================
|
||||
#-----------------------------------------------------------------------------
|
||||
# AI
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# Whether wild Pokémon with the "Legendary", "Mythical" or "UltraBeast" flag
|
||||
# (as defined in pokemon.txt) have a smarter AI. Their skill level is set to
|
||||
|
||||
@@ -113,6 +113,8 @@ class Interpreter
|
||||
end
|
||||
@move_route_waiting = false
|
||||
end
|
||||
# Do nothing if the player is jumping out of surfing
|
||||
return if $game_temp.ending_surf
|
||||
# Do nothing while waiting
|
||||
if @wait_count > 0
|
||||
return if System.uptime - @wait_start < @wait_count
|
||||
@@ -162,7 +164,7 @@ class Interpreter
|
||||
# Assemble error message
|
||||
err = "Script error in Interpreter\r\n"
|
||||
if $game_map
|
||||
map_name = ($game_map.name rescue nil) || "???"
|
||||
map_name = (pbGetBasicMapNameFromId($game_map.map_id) rescue nil) || "???"
|
||||
if event
|
||||
err = "Script error in event #{event.id} (coords #{event.x},#{event.y}), map #{$game_map.map_id} (#{map_name})\r\n"
|
||||
else
|
||||
|
||||
@@ -70,7 +70,7 @@ class NamedEvent
|
||||
|
||||
# Adds an event handler procedure from the event.
|
||||
def add(key, proc)
|
||||
@callbacks[key] = proc if !@callbacks.has_key?(key)
|
||||
@callbacks[key] = proc
|
||||
end
|
||||
|
||||
# Removes an event handler procedure from the event.
|
||||
|
||||
@@ -817,7 +817,7 @@ class Game_Character
|
||||
oldDirection = @direction
|
||||
@direction = dir
|
||||
@stop_count = 0
|
||||
pbCheckEventTriggerAfterTurning if dir != oldDirection
|
||||
check_event_trigger_after_turning if dir != oldDirection
|
||||
end
|
||||
|
||||
def turn_down; turn_generic(2); end
|
||||
|
||||
@@ -139,16 +139,6 @@ class Game_Event < Game_Character
|
||||
return false
|
||||
end
|
||||
|
||||
def pbCheckEventTriggerAfterTurning
|
||||
return if $game_system.map_interpreter.running? || @starting
|
||||
return if @trigger != 2 # Event touch
|
||||
return if !@event.name[/(?:sight|trainer)\((\d+)\)/i]
|
||||
distance = $~[1].to_i
|
||||
return if !pbEventCanReachPlayer?(self, $game_player, distance)
|
||||
return if jumping? || over_trigger?
|
||||
start
|
||||
end
|
||||
|
||||
def check_event_trigger_touch(dir)
|
||||
return if $game_system.map_interpreter.running?
|
||||
return if @trigger != 2 # Event touch
|
||||
@@ -167,6 +157,32 @@ class Game_Event < Game_Character
|
||||
start
|
||||
end
|
||||
|
||||
def check_event_trigger_after_turning
|
||||
return if $game_system.map_interpreter.running? || @starting
|
||||
return if @trigger != 2 # Not Event Touch
|
||||
return if !self.name[/(?:sight|trainer)\((\d+)\)/i]
|
||||
distance = $~[1].to_i
|
||||
return if !pbEventCanReachPlayer?(self, $game_player, distance)
|
||||
return if jumping? || over_trigger?
|
||||
start
|
||||
end
|
||||
|
||||
def check_event_trigger_after_moving
|
||||
return if $game_system.map_interpreter.running? || @starting
|
||||
return if @trigger != 2 # Not Event Touch
|
||||
if self.name[/(?:sight|trainer)\((\d+)\)/i]
|
||||
distance = $~[1].to_i
|
||||
return if !pbEventCanReachPlayer?(self, $game_player, distance)
|
||||
elsif self.name[/counter\((\d+)\)/i]
|
||||
distance = $~[1].to_i
|
||||
return if !pbEventFacesPlayer?(self, $game_player, distance)
|
||||
else
|
||||
return
|
||||
end
|
||||
return if jumping? || over_trigger?
|
||||
start
|
||||
end
|
||||
|
||||
def check_event_trigger_auto
|
||||
case @trigger
|
||||
when 2 # Event touch
|
||||
@@ -263,7 +279,7 @@ class Game_Event < Game_Character
|
||||
@moveto_happened = false
|
||||
last_moving = moving?
|
||||
super
|
||||
$game_player.pbCheckEventTriggerFromDistance([2]) if !moving? && last_moving
|
||||
check_event_trigger_after_moving if !moving? && last_moving
|
||||
if @need_refresh
|
||||
@need_refresh = false
|
||||
refresh
|
||||
|
||||
@@ -313,16 +313,18 @@ class Game_Player < Game_Character
|
||||
return result
|
||||
end
|
||||
|
||||
def pbCheckEventTriggerAfterTurning; end
|
||||
def check_event_trigger_after_turning; end
|
||||
|
||||
def pbCheckEventTriggerFromDistance(triggers)
|
||||
ret = pbTriggeredTrainerEvents(triggers)
|
||||
ret.concat(pbTriggeredCounterEvents(triggers))
|
||||
return false if ret.length == 0
|
||||
ret.each do |event|
|
||||
events = pbTriggeredTrainerEvents(triggers)
|
||||
events.concat(pbTriggeredCounterEvents(triggers))
|
||||
return false if events.length == 0
|
||||
ret = false
|
||||
events.each do |event|
|
||||
event.start
|
||||
ret = true if event.starting
|
||||
end
|
||||
return true
|
||||
return ret
|
||||
end
|
||||
|
||||
# Trigger event(s) at the same coordinates as self with the appropriate
|
||||
@@ -339,7 +341,7 @@ class Game_Player < Game_Character
|
||||
# If starting determinant is same position event (other than jumping)
|
||||
next if event.jumping? || !event.over_trigger?
|
||||
event.start
|
||||
result = true
|
||||
result = true if event.starting
|
||||
end
|
||||
return result
|
||||
end
|
||||
@@ -361,7 +363,7 @@ class Game_Player < Game_Character
|
||||
# If starting determinant is front event (other than jumping)
|
||||
next if event.jumping? || event.over_trigger?
|
||||
event.start
|
||||
result = true
|
||||
result = true if event.starting
|
||||
end
|
||||
# If fitting event is not found
|
||||
if result == false && $game_map.counter?(new_x, new_y)
|
||||
@@ -377,7 +379,7 @@ class Game_Player < Game_Character
|
||||
# If starting determinant is front event (other than jumping)
|
||||
next if event.jumping? || event.over_trigger?
|
||||
event.start
|
||||
result = true
|
||||
result = true if event.starting
|
||||
end
|
||||
end
|
||||
return result
|
||||
@@ -404,7 +406,7 @@ class Game_Player < Game_Character
|
||||
# If starting determinant is front event (other than jumping)
|
||||
next if event.jumping? || event.over_trigger?
|
||||
event.start
|
||||
result = true
|
||||
result = true if event.starting
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
||||
@@ -1,15 +1,270 @@
|
||||
#===============================================================================
|
||||
# A sprite whose sole purpose is to display an animation. This sprite can be
|
||||
# displayed anywhere on the map and is disposed automatically when its animation
|
||||
# is finished. Used for grass rustling and so forth.
|
||||
#
|
||||
#===============================================================================
|
||||
class AnimationSprite < RPG::Sprite
|
||||
class SpriteAnimation
|
||||
@@_animations = []
|
||||
@@_reference_count = {}
|
||||
|
||||
def initialize(sprite)
|
||||
@sprite = sprite
|
||||
end
|
||||
|
||||
def x(*arg); @sprite.x(*arg); end
|
||||
def y(*arg); @sprite.y(*arg); end
|
||||
def ox(*arg); @sprite.ox(*arg); end
|
||||
def oy(*arg); @sprite.oy(*arg); end
|
||||
def viewport(*arg); @sprite.viewport(*arg); end
|
||||
def flash(*arg); @sprite.flash(*arg); end
|
||||
def src_rect(*arg); @sprite.src_rect(*arg); end
|
||||
def opacity(*arg); @sprite.opacity(*arg); end
|
||||
def tone(*arg); @sprite.tone(*arg); end
|
||||
|
||||
def self.clear
|
||||
@@_animations.clear
|
||||
end
|
||||
|
||||
def dispose
|
||||
dispose_animation
|
||||
dispose_loop_animation
|
||||
end
|
||||
|
||||
def animation(animation, hit, height = 3)
|
||||
dispose_animation
|
||||
@_animation = animation
|
||||
return if @_animation.nil?
|
||||
@_animation_hit = hit
|
||||
@_animation_height = height
|
||||
@_animation_duration = @_animation.frame_max
|
||||
@_animation_index = -1
|
||||
fr = 20
|
||||
if @_animation.name[/\[\s*(\d+?)\s*\]\s*$/]
|
||||
fr = $~[1].to_i
|
||||
end
|
||||
@_animation_time_per_frame = 1.0 / fr
|
||||
@_animation_timer_start = System.uptime
|
||||
animation_name = @_animation.animation_name
|
||||
animation_hue = @_animation.animation_hue
|
||||
bitmap = pbGetAnimation(animation_name, animation_hue)
|
||||
if @@_reference_count.include?(bitmap)
|
||||
@@_reference_count[bitmap] += 1
|
||||
else
|
||||
@@_reference_count[bitmap] = 1
|
||||
end
|
||||
@_animation_sprites = []
|
||||
if @_animation.position != 3 || !@@_animations.include?(animation)
|
||||
16.times do
|
||||
sprite = ::Sprite.new(self.viewport)
|
||||
sprite.bitmap = bitmap
|
||||
sprite.visible = false
|
||||
@_animation_sprites.push(sprite)
|
||||
end
|
||||
@@_animations.push(animation) unless @@_animations.include?(animation)
|
||||
end
|
||||
update_animation
|
||||
end
|
||||
|
||||
def loop_animation(animation)
|
||||
return if animation == @_loop_animation
|
||||
dispose_loop_animation
|
||||
@_loop_animation = animation
|
||||
return if @_loop_animation.nil?
|
||||
@_loop_animation_duration = @_animation.frame_max
|
||||
@_loop_animation_index = -1
|
||||
fr = 20
|
||||
if @_animation.name[/\[\s*(\d+?)\s*\]\s*$/]
|
||||
fr = $~[1].to_i
|
||||
end
|
||||
@_loop_animation_time_per_frame = 1.0 / fr
|
||||
@_loop_animation_timer_start = System.uptime
|
||||
animation_name = @_loop_animation.animation_name
|
||||
animation_hue = @_loop_animation.animation_hue
|
||||
bitmap = pbGetAnimation(animation_name, animation_hue)
|
||||
if @@_reference_count.include?(bitmap)
|
||||
@@_reference_count[bitmap] += 1
|
||||
else
|
||||
@@_reference_count[bitmap] = 1
|
||||
end
|
||||
@_loop_animation_sprites = []
|
||||
16.times do
|
||||
sprite = ::Sprite.new(self.viewport)
|
||||
sprite.bitmap = bitmap
|
||||
sprite.visible = false
|
||||
@_loop_animation_sprites.push(sprite)
|
||||
end
|
||||
update_loop_animation
|
||||
end
|
||||
|
||||
def dispose_animation
|
||||
return if @_animation_sprites.nil?
|
||||
sprite = @_animation_sprites[0]
|
||||
if sprite
|
||||
@@_reference_count[sprite.bitmap] -= 1
|
||||
sprite.bitmap.dispose if @@_reference_count[sprite.bitmap] == 0
|
||||
end
|
||||
@_animation_sprites.each { |s| s.dispose }
|
||||
@_animation_sprites = nil
|
||||
@_animation = nil
|
||||
@_animation_duration = 0
|
||||
end
|
||||
|
||||
def dispose_loop_animation
|
||||
return if @_loop_animation_sprites.nil?
|
||||
sprite = @_loop_animation_sprites[0]
|
||||
if sprite
|
||||
@@_reference_count[sprite.bitmap] -= 1
|
||||
sprite.bitmap.dispose if @@_reference_count[sprite.bitmap] == 0
|
||||
end
|
||||
@_loop_animation_sprites.each { |s| s.dispose }
|
||||
@_loop_animation_sprites = nil
|
||||
@_loop_animation = nil
|
||||
end
|
||||
|
||||
def active?
|
||||
return @_loop_animation_sprites || @_animation_sprites
|
||||
end
|
||||
|
||||
def effect?
|
||||
return @_animation_duration > 0
|
||||
end
|
||||
|
||||
def update
|
||||
update_animation if @_animation
|
||||
update_loop_animation if @_loop_animation
|
||||
end
|
||||
|
||||
def update_animation
|
||||
new_index = ((System.uptime - @_animation_timer_start) / @_animation_time_per_frame).to_i
|
||||
if new_index >= @_animation_duration
|
||||
dispose_animation
|
||||
return
|
||||
end
|
||||
quick_update = (@_animation_index == new_index)
|
||||
@_animation_index = new_index
|
||||
frame_index = @_animation_index
|
||||
cell_data = @_animation.frames[frame_index].cell_data
|
||||
position = @_animation.position
|
||||
animation_set_sprites(@_animation_sprites, cell_data, position, quick_update)
|
||||
return if quick_update
|
||||
@_animation.timings.each do |timing|
|
||||
next if timing.frame != frame_index
|
||||
animation_process_timing(timing, @_animation_hit)
|
||||
end
|
||||
end
|
||||
|
||||
def update_loop_animation
|
||||
new_index = ((System.uptime - @_loop_animation_timer_start) / @_loop_animation_time_per_frame).to_i
|
||||
new_index %= @_loop_animation_duration
|
||||
quick_update = (@_loop_animation_index == new_index)
|
||||
@_loop_animation_index = new_index
|
||||
frame_index = @_loop_animation_index
|
||||
cell_data = @_loop_animation.frames[frame_index].cell_data
|
||||
position = @_loop_animation.position
|
||||
animation_set_sprites(@_loop_animation_sprites, cell_data, position, quick_update)
|
||||
return if quick_update
|
||||
@_loop_animation.timings.each do |timing|
|
||||
next if timing.frame != frame_index
|
||||
animation_process_timing(timing, true)
|
||||
end
|
||||
end
|
||||
|
||||
def animation_set_sprites(sprites, cell_data, position, quick_update = false)
|
||||
sprite_x = 320
|
||||
sprite_y = 240
|
||||
if position == 3 # Screen
|
||||
if self.viewport
|
||||
sprite_x = self.viewport.rect.width / 2
|
||||
sprite_y = self.viewport.rect.height - 160
|
||||
end
|
||||
else
|
||||
sprite_x = self.x - self.ox + (self.src_rect.width / 2)
|
||||
sprite_y = self.y - self.oy
|
||||
if self.src_rect.height > 1
|
||||
sprite_y += self.src_rect.height / 2 if position == 1 # Middle
|
||||
sprite_y += self.src_rect.height if position == 2 # Bottom
|
||||
end
|
||||
end
|
||||
16.times do |i|
|
||||
sprite = sprites[i]
|
||||
pattern = cell_data[i, 0]
|
||||
if sprite.nil? || pattern.nil? || pattern == -1
|
||||
sprite.visible = false if sprite
|
||||
next
|
||||
end
|
||||
sprite.x = sprite_x + cell_data[i, 1]
|
||||
sprite.y = sprite_y + cell_data[i, 2]
|
||||
next if quick_update
|
||||
sprite.visible = true
|
||||
sprite.src_rect.set((pattern % 5) * 192, (pattern / 5) * 192, 192, 192)
|
||||
case @_animation_height
|
||||
when 0 then sprite.z = 1
|
||||
when 1 then sprite.z = sprite.y + (Game_Map::TILE_HEIGHT * 3 / 2) + 1
|
||||
when 2 then sprite.z = sprite.y + (Game_Map::TILE_HEIGHT * 3) + 1
|
||||
else sprite.z = 2000
|
||||
end
|
||||
sprite.ox = 96
|
||||
sprite.oy = 96
|
||||
sprite.zoom_x = cell_data[i, 3] / 100.0
|
||||
sprite.zoom_y = cell_data[i, 3] / 100.0
|
||||
sprite.angle = cell_data[i, 4]
|
||||
sprite.mirror = (cell_data[i, 5] == 1)
|
||||
sprite.tone = self.tone
|
||||
sprite.opacity = cell_data[i, 6] * self.opacity / 255.0
|
||||
sprite.blend_type = cell_data[i, 7]
|
||||
end
|
||||
end
|
||||
|
||||
def animation_process_timing(timing, hit)
|
||||
if timing.condition == 0 ||
|
||||
(timing.condition == 1 && hit == true) ||
|
||||
(timing.condition == 2 && hit == false)
|
||||
if timing.se.name != ""
|
||||
se = timing.se
|
||||
pbSEPlay(se)
|
||||
end
|
||||
case timing.flash_scope
|
||||
when 1
|
||||
self.flash(timing.flash_color, timing.flash_duration * 2)
|
||||
when 2
|
||||
self.viewport.flash(timing.flash_color, timing.flash_duration * 2) if self.viewport
|
||||
when 3
|
||||
self.flash(nil, timing.flash_duration * 2)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def x=(x)
|
||||
sx = x - self.x
|
||||
return if sx == 0
|
||||
if @_animation_sprites
|
||||
16.times { |i| @_animation_sprites[i].x += sx }
|
||||
end
|
||||
if @_loop_animation_sprites
|
||||
16.times { |i| @_loop_animation_sprites[i].x += sx }
|
||||
end
|
||||
end
|
||||
|
||||
def y=(y)
|
||||
sy = y - self.y
|
||||
return if sy == 0
|
||||
if @_animation_sprites
|
||||
16.times { |i| @_animation_sprites[i].y += sy }
|
||||
end
|
||||
if @_loop_animation_sprites
|
||||
16.times { |i| @_loop_animation_sprites[i].y += sy }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# A sprite whose sole purpose is to display an animation (a SpriteAnimation).
|
||||
# This sprite can be displayed anywhere on the map and is disposed automatically
|
||||
# when its animation is finished. Used for grass rustling and so forth.
|
||||
#===============================================================================
|
||||
class AnimationContainerSprite < RPG::Sprite
|
||||
def initialize(animID, map, tileX, tileY, viewport = nil, tinting = false, height = 3)
|
||||
super(viewport)
|
||||
@tileX = tileX
|
||||
@tileY = tileY
|
||||
self.bitmap = Bitmap.new(1, 1)
|
||||
self.bitmap.clear
|
||||
@map = map
|
||||
setCoords
|
||||
pbDayNightTint(self) if tinting
|
||||
@@ -23,17 +278,11 @@ class AnimationSprite < RPG::Sprite
|
||||
self.y += Game_Map::TILE_HEIGHT
|
||||
end
|
||||
|
||||
def dispose
|
||||
self.bitmap.dispose
|
||||
super
|
||||
end
|
||||
|
||||
def update
|
||||
if !self.disposed?
|
||||
setCoords
|
||||
super
|
||||
self.dispose if !self.effect?
|
||||
end
|
||||
return if disposed?
|
||||
setCoords
|
||||
super
|
||||
dispose if !effect?
|
||||
end
|
||||
end
|
||||
|
||||
@@ -53,7 +302,7 @@ class Spriteset_Map
|
||||
end
|
||||
|
||||
def addUserAnimation(animID, x, y, tinting = false, height = 3)
|
||||
sprite = AnimationSprite.new(animID, self.map, x, y, @@viewport1, tinting, height)
|
||||
sprite = AnimationContainerSprite.new(animID, self.map, x, y, @@viewport1, tinting, height)
|
||||
addUserSprite(sprite)
|
||||
return sprite
|
||||
end
|
||||
@@ -77,5 +326,6 @@ class Spriteset_Map
|
||||
@@viewport3.tone.set(0, 0, 0, 0)
|
||||
_animationSprite_update
|
||||
@usersprites.each { |sprite| sprite.update if !sprite.disposed? }
|
||||
@usersprites.delete_if { |sprite| sprite.disposed? }
|
||||
end
|
||||
end
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
# 4096px -> 65536px (enough to load pretty much any tileset)
|
||||
# 8192px -> 262144px
|
||||
# 16384px -> 1048576px (what most people have at this point)
|
||||
#
|
||||
# ~Roza/Zoroark
|
||||
#===============================================================================
|
||||
class TilemapRenderer
|
||||
module TilesetWrapper
|
||||
|
||||
@@ -406,19 +406,15 @@ class Window_AdvancedTextPokemon < SpriteWindow_Base
|
||||
return if !busy?
|
||||
return if @textchars[@curchar] == "\n"
|
||||
resume
|
||||
visiblelines = (self.height - self.borderY) / @lineHeight
|
||||
loop do
|
||||
curcharSkip(true)
|
||||
break if @curchar >= @fmtchars.length # End of message
|
||||
if @textchars[@curchar] == "\1" # Pause message
|
||||
if curcharSkip(true)
|
||||
visiblelines = (self.height - self.borderY) / @lineHeight
|
||||
if @textchars[@curchar] == "\n" && @linesdrawn >= visiblelines - 1
|
||||
@scroll_timer_start = System.uptime
|
||||
elsif @textchars[@curchar] == "\1"
|
||||
@pausing = true if @curchar < @numtextchars - 1
|
||||
self.startPause
|
||||
refresh
|
||||
break
|
||||
end
|
||||
break if @textchars[@curchar] != "\n" # Skip past newlines only
|
||||
break if @linesdrawn >= visiblelines - 1 # No more empty lines to continue to
|
||||
@linesdrawn += 1
|
||||
end
|
||||
end
|
||||
|
||||
@@ -533,6 +529,7 @@ class Window_AdvancedTextPokemon < SpriteWindow_Base
|
||||
delta_t = time_now - @display_last_updated
|
||||
@display_last_updated = time_now
|
||||
visiblelines = (self.height - self.borderY) / @lineHeight
|
||||
@lastchar = -1 if !@lastchar
|
||||
show_more_characters = false
|
||||
# Pauses and new lines
|
||||
if @textchars[@curchar] == "\1" # Waiting
|
||||
@@ -554,7 +551,7 @@ class Window_AdvancedTextPokemon < SpriteWindow_Base
|
||||
show_more_characters = true
|
||||
end
|
||||
else # New line but the next line can be shown without scrolling to it
|
||||
@linesdrawn += 1
|
||||
@linesdrawn += 1 if @lastchar < @curchar
|
||||
show_more_characters = true
|
||||
end
|
||||
elsif @curchar <= @numtextchars # Displaying more text
|
||||
@@ -566,6 +563,7 @@ class Window_AdvancedTextPokemon < SpriteWindow_Base
|
||||
@scroll_timer_start = nil
|
||||
@linesdrawn = 0
|
||||
end
|
||||
@lastchar = @curchar
|
||||
# Keep displaying more text
|
||||
if show_more_characters
|
||||
@display_timer += delta_t
|
||||
|
||||
@@ -59,7 +59,7 @@ class AnimatedSprite < Sprite
|
||||
self.frame = 0
|
||||
end
|
||||
|
||||
# Shorter version of AnimationSprite. All frames are placed on a single row
|
||||
# Shorter version of AnimatedSprite. All frames are placed on a single row
|
||||
# of the bitmap, so that the width and height need not be defined beforehand.
|
||||
# frameskip is in 1/20ths of a second, and is the time between frame changes.
|
||||
def initializeShort(animname, framecount, frameskip)
|
||||
|
||||
@@ -48,14 +48,14 @@ class PngAnimatedBitmap
|
||||
if filename[/^\[(\d+)(?:,(\d+))?\]/] # Starts with 1 or 2 numbers in brackets
|
||||
# File has a frame count
|
||||
numFrames = $1.to_i
|
||||
duration = $2.to_i
|
||||
duration = $2.to_i # In 1/20ths of a second
|
||||
duration = 5 if duration == 0
|
||||
raise "Invalid frame count in #{filename}" if numFrames <= 0
|
||||
raise "Invalid frame duration in #{filename}" if duration <= 0
|
||||
if panorama.width % numFrames != 0
|
||||
raise "Bitmap's width (#{panorama.width}) is not divisible by frame count: #{filename}"
|
||||
end
|
||||
@frame_duration = duration
|
||||
@frame_duration = duration / 20.0
|
||||
subWidth = panorama.width / numFrames
|
||||
numFrames.times do |i|
|
||||
subBitmap = Bitmap.new(subWidth, panorama.height)
|
||||
@@ -99,7 +99,7 @@ class PngAnimatedBitmap
|
||||
|
||||
# Actually returns the total number of 1/20ths of a second this animation lasts.
|
||||
def totalFrames
|
||||
return @frame_duration * @frames.length
|
||||
return (@frame_duration * @frames.length * 20).to_i
|
||||
end
|
||||
|
||||
def each
|
||||
|
||||
@@ -162,6 +162,7 @@ class EventScene
|
||||
next if !sprite || sprite.disposed? || !sprite.is_a?(Sprite)
|
||||
sprite.update
|
||||
end
|
||||
@usersprites.delete_if { |sprite| sprite.disposed? }
|
||||
@onUpdate.trigger(self)
|
||||
if Input.trigger?(Input::BACK)
|
||||
@onBTrigger.trigger(self)
|
||||
|
||||
@@ -190,7 +190,7 @@ module GameData
|
||||
return self::DATA.keys
|
||||
end
|
||||
|
||||
# Yields all data in numberical order.
|
||||
# Yields all data in numerical order.
|
||||
def each
|
||||
keys = self::DATA.keys.sort
|
||||
keys.each { |key| yield self::DATA[key] }
|
||||
|
||||
@@ -101,9 +101,11 @@ module GameData
|
||||
ret["WildItemUncommon"] = [:wild_item_uncommon, "*e", :Item]
|
||||
ret["WildItemRare"] = [:wild_item_rare, "*e", :Item]
|
||||
if compiling_forms
|
||||
ret["Evolutions"] = [:evolutions, "*ees", :Species, :Evolution, nil]
|
||||
ret["Evolutions"] = [:evolutions, "*ees", :Species, :Evolution]
|
||||
ret["Evolution"] = [:evolutions, "^eeS", :Species, :Evolution]
|
||||
else
|
||||
ret["Evolutions"] = [:evolutions, "*ses", nil, :Evolution, nil]
|
||||
ret["Evolutions"] = [:evolutions, "*ses", nil, :Evolution]
|
||||
ret["Evolution"] = [:evolutions, "^seS", nil, :Evolution]
|
||||
end
|
||||
return ret
|
||||
end
|
||||
@@ -420,6 +422,8 @@ module GameData
|
||||
when "Habitat"
|
||||
ret = nil if ret == :None
|
||||
when "Evolutions"
|
||||
ret = nil # Want to use "Evolution" instead
|
||||
when "Evolution"
|
||||
if ret
|
||||
ret = ret.reject { |evo| evo[3] } # Remove prevolutions
|
||||
ret.each do |evo|
|
||||
|
||||
@@ -131,10 +131,7 @@ module GameData
|
||||
pkmn = Pokemon.new(species, pkmn_data[:level], trainer, false)
|
||||
trainer.party.push(pkmn)
|
||||
# Set Pokémon's properties if defined
|
||||
if pkmn_data[:form]
|
||||
pkmn.forced_form = pkmn_data[:form] if MultipleForms.hasFunction?(species, "getForm")
|
||||
pkmn.form_simple = pkmn_data[:form]
|
||||
end
|
||||
pkmn.form_simple = pkmn_data[:form] if pkmn_data[:form]
|
||||
pkmn.item = pkmn_data[:item]
|
||||
if pkmn_data[:moves] && pkmn_data[:moves].length > 0
|
||||
pkmn_data[:moves].each { |move| pkmn.learn_move(move) }
|
||||
|
||||
@@ -55,7 +55,7 @@ class Battle
|
||||
end
|
||||
else
|
||||
items = pbGetOwnerItems(idxBattler)
|
||||
items.delete_at(items.index(item))
|
||||
items.delete_at(items.index(item)) if items
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -81,7 +81,9 @@ class Battle
|
||||
@mega_rings.each { |item| return GameData::Item.get(item).name if $bag.has?(item) }
|
||||
else
|
||||
trainer_items = pbGetOwnerItems(idxBattler)
|
||||
@mega_rings.each { |item| return GameData::Item.get(item).name if trainer_items&.include?(item) }
|
||||
if trainer_items
|
||||
@mega_rings.each { |item| return GameData::Item.get(item).name if trainer_items.include?(item) }
|
||||
end
|
||||
end
|
||||
end
|
||||
return _INTL("Mega Ring")
|
||||
|
||||
@@ -8,12 +8,21 @@ class Battle::Battler
|
||||
end
|
||||
# Reset form
|
||||
@battle.peer.pbOnLeavingBattle(@battle, @pokemon, @battle.usedInBattle[idxOwnSide][@index / 2])
|
||||
# Check for end of Neutralizing Gas/Unnerve
|
||||
if hasActiveAbility?(:NEUTRALIZINGGAS)
|
||||
# Treat self as fainted
|
||||
@hp = 0
|
||||
@fainted = true
|
||||
pbAbilitiesOnNeutralizingGasEnding
|
||||
elsif hasActiveAbility?([:UNNERVE, :ASONECHILLINGNEIGH, :ASONEGRIMNEIGH])
|
||||
# Treat self as fainted
|
||||
@hp = 0
|
||||
@fainted = true
|
||||
pbItemsOnUnnerveEnding
|
||||
end
|
||||
# Treat self as fainted
|
||||
@hp = 0
|
||||
@fainted = true
|
||||
# Check for end of Neutralizing Gas/Unnerve
|
||||
pbAbilitiesOnNeutralizingGasEnding if hasActiveAbility?(:NEUTRALIZINGGAS, true)
|
||||
pbItemsOnUnnerveEnding if hasActiveAbility?([:UNNERVE, :ASONECHILLINGNEIGH, :ASONEGRIMNEIGH], true)
|
||||
# Check for end of primordial weather
|
||||
@battle.pbEndPrimordialWeather
|
||||
end
|
||||
|
||||
@@ -18,6 +18,7 @@ class Battle::Battler
|
||||
# target Cramorant attacking the user) and the ability splash
|
||||
# shouldn't be shown.
|
||||
@battle.pbShowAbilitySplash(target)
|
||||
target.pbChangeForm(0, nil)
|
||||
if user.takesIndirectDamage?(Battle::Scene::USE_ABILITY_SPLASH)
|
||||
@battle.scene.pbDamageAnimation(user)
|
||||
user.pbReduceHP(user.totalhp / 4, false)
|
||||
|
||||
@@ -188,7 +188,7 @@ class Battle::Scene
|
||||
cw.setText(msg)
|
||||
PBDebug.log_message(msg)
|
||||
yielded = false
|
||||
timer_start = System.uptime
|
||||
timer_start = nil
|
||||
loop do
|
||||
pbUpdate(cw)
|
||||
if !cw.busy?
|
||||
@@ -202,6 +202,7 @@ class Battle::Scene
|
||||
@briefMessage = true
|
||||
break
|
||||
end
|
||||
timer_start = System.uptime if !timer_start
|
||||
if System.uptime - timer_start >= MESSAGE_PAUSE_TIME # Autoclose after 1 second
|
||||
cw.text = ""
|
||||
cw.visible = false
|
||||
@@ -233,7 +234,7 @@ class Battle::Scene
|
||||
cw.text = msg + "\1"
|
||||
PBDebug.log_message(msg)
|
||||
yielded = false
|
||||
timer_start = System.uptime
|
||||
timer_start = nil
|
||||
loop do
|
||||
pbUpdate(cw)
|
||||
if !cw.busy?
|
||||
@@ -242,6 +243,7 @@ class Battle::Scene
|
||||
yielded = true
|
||||
end
|
||||
if !@battleEnd
|
||||
timer_start = System.uptime if !timer_start
|
||||
if System.uptime - timer_start >= MESSAGE_PAUSE_TIME * 3 # Autoclose after 3 seconds
|
||||
cw.text = ""
|
||||
cw.visible = false
|
||||
|
||||
@@ -408,8 +408,10 @@ Battle::AI::Handlers::ShouldSwitch.add(:asleep,
|
||||
end
|
||||
# Doesn't have sufficiently raised stats that would be lost by switching
|
||||
next false if battler.stages.any? { |key, val| val >= 2 }
|
||||
# 50% chance to not bother
|
||||
next false if ai.pbAIRandom(100) < 50
|
||||
# A reserve Pokémon is awake and not frozen
|
||||
next false if reserves.none? { |pkmn| ![:SLEEP, :FROZEN].include?(pkmn.status) }
|
||||
# 60% chance to not bother
|
||||
next false if ai.pbAIRandom(100) < 60
|
||||
PBDebug.log_ai("#{battler.name} wants to switch because it is asleep and can't do anything")
|
||||
next true
|
||||
}
|
||||
@@ -631,6 +633,7 @@ Battle::AI::Handlers::ShouldNotSwitch.add(:lethal_entry_hazards,
|
||||
Battle::AI::Handlers::ShouldNotSwitch.add(:battler_has_super_effective_move,
|
||||
proc { |battler, reserves, ai, battle|
|
||||
next false if battler.effects[PBEffects::PerishSong] == 1
|
||||
next false if battler.rough_end_of_round_damage >= battler.hp * 2 / 3
|
||||
next false if battle.rules["suddendeath"]
|
||||
has_super_effective_move = false
|
||||
battler.battler.eachMove do |move|
|
||||
@@ -674,3 +677,29 @@ Battle::AI::Handlers::ShouldNotSwitch.add(:battler_has_very_raised_stats,
|
||||
next false
|
||||
}
|
||||
)
|
||||
|
||||
#===============================================================================
|
||||
# Don't bother switching if the battler has Wonder Guard and is immune to the
|
||||
# foe's damaging attacks.
|
||||
#===============================================================================
|
||||
Battle::AI::Handlers::ShouldNotSwitch.add(:battler_is_immune_via_wonder_guard,
|
||||
proc { |battler, reserves, ai, battle|
|
||||
next false if battler.effects[PBEffects::PerishSong] == 1
|
||||
next false if battler.rough_end_of_round_damage >= battler.hp / 2
|
||||
next false if !battler.has_active_ability?(:WONDERGUARD)
|
||||
super_effective_foe = false
|
||||
ai.each_foe_battler(battler.side) do |b|
|
||||
next if !b.check_for_move do |m|
|
||||
next false if !m.damagingMove?
|
||||
eff = battler.effectiveness_of_type_against_battler(m.pbCalcType(b.battler), b, m)
|
||||
next Effectiveness.super_effective?(eff)
|
||||
end
|
||||
super_effective_foe = true
|
||||
break
|
||||
end
|
||||
if !super_effective_foe
|
||||
PBDebug.log_ai("#{battler.name} won't switch after all because it has Wonder Guard and can't be damaged by foes")
|
||||
end
|
||||
next !super_effective_foe
|
||||
}
|
||||
)
|
||||
|
||||
@@ -342,7 +342,8 @@ class Battle::AI
|
||||
if @trainer.high_skill? && @user.can_switch_lax?
|
||||
badMoves = false
|
||||
if max_score <= MOVE_USELESS_SCORE
|
||||
badMoves = true
|
||||
badMoves = user.can_attack?
|
||||
badMoves = true if !badMoves && pbAIRandom(100) < 25
|
||||
elsif max_score < MOVE_BASE_SCORE * move_score_threshold && user_battler.turnCount > 2
|
||||
badMoves = true if pbAIRandom(100) < 80
|
||||
end
|
||||
|
||||
@@ -115,7 +115,7 @@ Battle::AI::Handlers::MoveEffectAgainstTargetScore.copy("OHKO",
|
||||
Battle::AI::Handlers::MoveEffectAgainstTargetScore.add("DamageTargetAlly",
|
||||
proc { |score, move, user, target, ai, battle|
|
||||
target.battler.allAllies.each do |b|
|
||||
next if !b.near?(target.battler) || !b.battler.takesIndirectDamage?
|
||||
next if !b.near?(target.battler) || !b.takesIndirectDamage?
|
||||
score += 10
|
||||
if ai.trainer.has_skill_flag?("HPAware")
|
||||
score += 10 if b.hp <= b.totalhp / 16
|
||||
|
||||
@@ -32,8 +32,13 @@ module Battle::CatchAndStoreMixin
|
||||
end
|
||||
next if party_index < 0 # Cancelled
|
||||
party_size = pbPlayer.party.length
|
||||
# Send chosen Pokémon to storage
|
||||
# Get chosen Pokémon and clear battle-related conditions
|
||||
send_pkmn = pbPlayer.party[party_index]
|
||||
@peer.pbOnLeavingBattle(self, send_pkmn, @usedInBattle[0][party_index], true)
|
||||
send_pkmn.statusCount = 0 if send_pkmn.status == :POISON # Bad poison becomes regular
|
||||
send_pkmn.makeUnmega
|
||||
send_pkmn.makeUnprimal
|
||||
# Send chosen Pokémon to storage
|
||||
stored_box = @peer.pbStorePokemon(pbPlayer, send_pkmn)
|
||||
pbPlayer.party.delete_at(party_index)
|
||||
box_name = @peer.pbBoxName(stored_box)
|
||||
|
||||
@@ -14,6 +14,7 @@ class LocationWindow
|
||||
@window.viewport.z = 99999
|
||||
@currentmap = $game_map.map_id
|
||||
@timer_start = System.uptime
|
||||
@delayed = !$game_temp.fly_destination.nil?
|
||||
end
|
||||
|
||||
def disposed?
|
||||
@@ -25,7 +26,11 @@ class LocationWindow
|
||||
end
|
||||
|
||||
def update
|
||||
return if @window.disposed?
|
||||
return if @window.disposed? || $game_temp.fly_destination
|
||||
if @delayed
|
||||
@timer_start = System.uptime
|
||||
@delayed = false
|
||||
end
|
||||
@window.update
|
||||
if $game_temp.message_window_showing || @currentmap != $game_map.map_id
|
||||
@window.dispose
|
||||
|
||||
@@ -189,7 +189,8 @@ module BattleCreationHelperMethods
|
||||
ally = NPCTrainer.new($PokemonGlobal.partner[1], $PokemonGlobal.partner[0])
|
||||
ally.id = $PokemonGlobal.partner[2]
|
||||
ally.party = $PokemonGlobal.partner[3]
|
||||
ally_items[1] = ally.items.clone
|
||||
data = GameData::Trainer.try_get($PokemonGlobal.partner[0], $PokemonGlobal.partner[1], $PokemonGlobal.partner[2])
|
||||
ally_items[1] = data&.items.clone || []
|
||||
trainer_array.push(ally)
|
||||
pokemon_array = []
|
||||
$player.party.each { |pkmn| pokemon_array.push(pkmn) }
|
||||
|
||||
@@ -443,6 +443,7 @@ def pbGenerateWildPokemon(species, level, isRoamer = false)
|
||||
end
|
||||
end
|
||||
# Trigger events that may alter the generated Pokémon further
|
||||
genwildpoke.form_simple = genwildpoke.form if MultipleForms.hasFunction?(genwildpoke.species, "getForm")
|
||||
EventHandlers.trigger(:on_wild_pokemon_created, genwildpoke)
|
||||
return genwildpoke
|
||||
end
|
||||
|
||||
@@ -12,6 +12,38 @@ EventHandlers.add(:on_wild_pokemon_created, :make_shiny_switch,
|
||||
}
|
||||
)
|
||||
|
||||
# In the Safari Zone and Bug-Catching Contests, wild Pokémon reroll their IVs up
|
||||
# to 4 times if they don't have a perfect IV.
|
||||
EventHandlers.add(:on_wild_pokemon_created, :reroll_ivs_in_safari_and_bug_contest,
|
||||
proc { |pkmn|
|
||||
next if !pbInSafari? && !pbInBugContest?
|
||||
rerolled = false
|
||||
4.times do
|
||||
break if pkmn.iv.any? { |_stat, val| val == Pokemon::IV_STAT_LIMIT }
|
||||
rerolled = true
|
||||
GameData::Stat.each_main do |s|
|
||||
pkmn.iv[s.id] = rand(Pokemon::IV_STAT_LIMIT + 1)
|
||||
end
|
||||
end
|
||||
pkmn.calc_stats if rerolled
|
||||
}
|
||||
)
|
||||
|
||||
# In Gen 6 and later, Legendary/Mythical/Ultra Beast Pokémon are guaranteed to
|
||||
# have at least 3 perfect IVs.
|
||||
EventHandlers.add(:on_wild_pokemon_created, :some_perfect_ivs_for_legendaries,
|
||||
proc { |pkmn|
|
||||
next if !Settings::LEGENDARIES_HAVE_SOME_PERFECT_IVS
|
||||
data = pkmn.species_data
|
||||
next if !data.has_flag?("Legendary") && !data.has_flag?("Mythical") && !data.has_flag?("UltraBeast")
|
||||
stats = []
|
||||
GameData::Stat.each_main { |s| stats.push(s.id) }
|
||||
perfect_stats = stats.sample(3)
|
||||
perfect_stats.each { |s| pkmn.iv[s] = Pokemon::IV_STAT_LIMIT }
|
||||
pkmn.calc_stats
|
||||
}
|
||||
)
|
||||
|
||||
# Used in the random dungeon map. Makes the levels of all wild Pokémon in that
|
||||
# map depend on the levels of Pokémon in the player's party.
|
||||
# This is a simple method, and can/should be modified to account for evolutions
|
||||
|
||||
@@ -487,7 +487,6 @@ def pbFlyToNewLocation(pkmn = nil, move = :FLY)
|
||||
$game_temp.player_new_x = $game_temp.fly_destination[1]
|
||||
$game_temp.player_new_y = $game_temp.fly_destination[2]
|
||||
$game_temp.player_new_direction = 2
|
||||
$game_temp.fly_destination = nil
|
||||
pbDismountBike
|
||||
$scene.transfer_player
|
||||
$game_map.autoplay
|
||||
@@ -496,6 +495,7 @@ def pbFlyToNewLocation(pkmn = nil, move = :FLY)
|
||||
pbWait(0.25)
|
||||
end
|
||||
pbEraseEscapePoint
|
||||
$game_temp.fly_destination = nil
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
@@ -320,7 +320,7 @@ class Phone
|
||||
module_function
|
||||
|
||||
def can_make?
|
||||
return false if $game_map.metadata.has_flag?("NoPhoneSignal")
|
||||
return false if $game_map.metadata&.has_flag?("NoPhoneSignal")
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# The Bag object, which actually contains all the items.
|
||||
#===============================================================================
|
||||
class PokemonBag
|
||||
attr_reader :pockets
|
||||
attr_accessor :last_viewed_pocket
|
||||
attr_accessor :last_pocket_selections
|
||||
attr_reader :registered_items
|
||||
@@ -34,11 +35,6 @@ class PokemonBag
|
||||
(PokemonBag.pocket_count + 1).times { |i| @last_pocket_selections[i] = 0 }
|
||||
end
|
||||
|
||||
def pockets
|
||||
rearrange
|
||||
return @pockets
|
||||
end
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# Gets the index of the current selected item in the pocket
|
||||
@@ -46,7 +42,6 @@ class PokemonBag
|
||||
if pocket <= 0 || pocket > PokemonBag.pocket_count
|
||||
raise ArgumentError.new(_INTL("Invalid pocket: {1}", pocket.inspect))
|
||||
end
|
||||
rearrange
|
||||
return [@last_pocket_selections[pocket], @pockets[pocket].length].min || 0
|
||||
end
|
||||
|
||||
@@ -55,7 +50,6 @@ class PokemonBag
|
||||
if pocket <= 0 || pocket > PokemonBag.pocket_count
|
||||
raise ArgumentError.new(_INTL("Invalid pocket: {1}", pocket.inspect))
|
||||
end
|
||||
rearrange
|
||||
@last_pocket_selections[pocket] = value if value <= @pockets[pocket].length
|
||||
end
|
||||
|
||||
@@ -168,29 +162,6 @@ class PokemonBag
|
||||
def max_pocket_size(pocket)
|
||||
return Settings::BAG_MAX_POCKET_SIZE[pocket - 1] || -1
|
||||
end
|
||||
|
||||
def rearrange
|
||||
return if @pockets.length == PokemonBag.pocket_count + 1
|
||||
@last_viewed_pocket = 1
|
||||
new_pockets = []
|
||||
@last_pocket_selections = []
|
||||
(PokemonBag.pocket_count + 1).times do |i|
|
||||
new_pockets[i] = []
|
||||
@last_pocket_selections[i] = 0
|
||||
end
|
||||
@pockets.each do |pocket|
|
||||
next if !pocket
|
||||
pocket.each do |item|
|
||||
item_pocket = GameData::Item.get(item[0]).pocket
|
||||
new_pockets[item_pocket].push(item)
|
||||
end
|
||||
end
|
||||
new_pockets.each_with_index do |pocket, i|
|
||||
next if i == 0 || !Settings::BAG_POCKET_AUTO_SORT[i - 1]
|
||||
pocket.sort! { |a, b| GameData::Item.keys.index(a[0]) <=> GameData::Item.keys.index(b[0]) }
|
||||
end
|
||||
@pockets = new_pockets
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
|
||||
@@ -16,7 +16,8 @@ class Trainer
|
||||
end
|
||||
|
||||
def full_name
|
||||
return _INTL("{1} {2}", trainer_type_name, @name)
|
||||
return @name if has_flag?("NoName")
|
||||
return "#{trainer_type_name} #{@name}"
|
||||
end
|
||||
|
||||
#=============================================================================
|
||||
|
||||
@@ -88,7 +88,7 @@ class Scene_Credits
|
||||
ret.push("")
|
||||
ret.push(_INTL("\"mkxp-z\" by:"))
|
||||
add_names_to_credits(ret, [
|
||||
"Roza",
|
||||
"Anon",
|
||||
_INTL("Based on \"mkxp\" by Ancurio et al.")
|
||||
])
|
||||
ret.push(_INTL("\"RPG Maker XP\" by:"))
|
||||
|
||||
@@ -154,7 +154,7 @@ class PokemonPokedexInfo_Scene
|
||||
def pbGetAvailableForms
|
||||
ret = []
|
||||
multiple_forms = false
|
||||
gender_differences = (GameData::Species.front_sprite_filename(@species, 0) == GameData::Species.front_sprite_filename(@species, 0, 1))
|
||||
gender_differences = (GameData::Species.front_sprite_filename(@species, 0) != GameData::Species.front_sprite_filename(@species, 0, 1))
|
||||
# Find all genders/forms of @species that have been seen
|
||||
GameData::Species.each do |sp|
|
||||
next if sp.species != @species
|
||||
@@ -328,7 +328,7 @@ class PokemonPokedexInfo_Scene
|
||||
map_metadata = GameData::MapMetadata.try_get(enc_data.map)
|
||||
next if !map_metadata || map_metadata.has_flag?("HideEncountersInPokedex")
|
||||
mappos = map_metadata.town_map_position
|
||||
next if mappos[0] != @region # Map isn't in the region being shown
|
||||
next if !mappos || mappos[0] != @region # Map isn't in the region being shown
|
||||
# Get the size and shape of the map in the Town Map
|
||||
map_size = map_metadata.town_map_size
|
||||
map_width = 1
|
||||
|
||||
@@ -308,7 +308,8 @@ class PokemonRegionMap_Scene
|
||||
end
|
||||
elsif Input.trigger?(Input::USE) && @editor # Intentionally after other USE input check
|
||||
pbChangeMapLocation(@map_x, @map_y)
|
||||
elsif Input.trigger?(Input::ACTION) && !@wallmap && !@fly_map && pbCanFly?
|
||||
elsif Input.trigger?(Input::ACTION) && Settings::CAN_FLY_FROM_TOWN_MAP &&
|
||||
!@wallmap && !@fly_map && pbCanFly?
|
||||
pbPlayDecisionSE
|
||||
@mode = (@mode == 1) ? 0 : 1
|
||||
refresh_fly_screen
|
||||
|
||||
@@ -279,6 +279,14 @@ class PokemonLoadScreen
|
||||
end
|
||||
|
||||
def pbStartLoadScreen
|
||||
if $DEBUG && !FileTest.exist?("Game.rgssad") && Settings::SKIP_CONTINUE_SCREEN
|
||||
if @save_data.empty?
|
||||
Game.start_new
|
||||
else
|
||||
Game.load(@save_data)
|
||||
end
|
||||
return
|
||||
end
|
||||
commands = []
|
||||
cmd_continue = -1
|
||||
cmd_new_game = -1
|
||||
|
||||
@@ -60,7 +60,7 @@ class PokemonDuel
|
||||
@viewport.z = 99999
|
||||
@sprites = {}
|
||||
@sprites["player"] = IconSprite.new(-160, 96, @viewport)
|
||||
@sprites["player"].setBitmap(GameData::TrainerType.front_sprite_filename($player.trainer_type))
|
||||
@sprites["player"].setBitmap(GameData::TrainerType.player_front_sprite_filename($player.trainer_type))
|
||||
@sprites["opponent"] = IconSprite.new(Graphics.width + 32, 96, @viewport)
|
||||
@sprites["opponent"].setBitmap(GameData::TrainerType.front_sprite_filename(opponent.trainer_type))
|
||||
@sprites["playerwindow"] = DuelWindow.new($player.name, false)
|
||||
|
||||
@@ -5,15 +5,113 @@
|
||||
# Run with: pbVoltorbFlip
|
||||
#===============================================================================
|
||||
class VoltorbFlip
|
||||
# Ranges of total coins available in each level.
|
||||
LEVEL_RANGES = [[20, 50],
|
||||
[50, 100],
|
||||
[100, 200],
|
||||
[200, 350],
|
||||
[350, 600],
|
||||
[600, 1000],
|
||||
[1000, 2000],
|
||||
[2000, 3500]]
|
||||
GRAPHICS_DIRECTORY = "Graphics/UI/Voltorb Flip/"
|
||||
NUM_ROWS = 5
|
||||
NUM_COLUMNS = 5
|
||||
NUM_TILES = NUM_ROWS * NUM_COLUMNS
|
||||
TILE_DISTRIBUTIONS = [ # Voltorbs, Twos, Threes, MaxFreePerRowOrCol, MaxFreeTotal
|
||||
# NOTE: The MaxFree values are not inclusive. The board will only be valid
|
||||
# if the corresponding counts are strictly less than these values.
|
||||
# Level 1
|
||||
[
|
||||
[6, 3, 1, 3, 3],
|
||||
[6, 0, 3, 2, 2],
|
||||
[6, 5, 0, 3, 4],
|
||||
[6, 2, 2, 3, 3],
|
||||
[6, 4, 1, 3, 4]
|
||||
],
|
||||
# Level 2
|
||||
[
|
||||
[7, 1, 3, 2, 3],
|
||||
[7, 6, 0, 3, 4],
|
||||
[7, 3, 2, 2, 3],
|
||||
[7, 0, 4, 2, 3],
|
||||
[7, 5, 1, 3, 4],
|
||||
[7, 1, 3, 2, 2],
|
||||
[7, 6, 0, 3, 3],
|
||||
[7, 3, 2, 2, 2],
|
||||
[7, 0, 4, 2, 2],
|
||||
[7, 5, 1, 3, 3]
|
||||
],
|
||||
# Level 3
|
||||
[
|
||||
[8, 2, 3, 2, 3],
|
||||
[8, 7, 0, 3, 4],
|
||||
[8, 4, 2, 3, 4],
|
||||
[8, 1, 4, 2, 3],
|
||||
[8, 6, 1, 4, 3],
|
||||
[8, 2, 3, 2, 2],
|
||||
[8, 7, 0, 3, 3],
|
||||
[8, 4, 2, 3, 3],
|
||||
[8, 1, 4, 2, 2],
|
||||
[8, 6, 1, 3, 3]
|
||||
],
|
||||
# Level 4
|
||||
[
|
||||
[8, 3, 3, 4, 3],
|
||||
[8, 0, 5, 2, 3],
|
||||
[10, 8, 0, 4, 5],
|
||||
[10, 5, 2, 3, 4],
|
||||
[10, 2, 4, 3, 4],
|
||||
[8, 3, 3, 3, 3],
|
||||
[8, 0, 5, 2, 2],
|
||||
[10, 8, 0, 4, 4],
|
||||
[10, 5, 2, 3, 3],
|
||||
[10, 2, 4, 3, 3]
|
||||
],
|
||||
# Level 5
|
||||
[
|
||||
[10, 7, 1, 4, 5],
|
||||
[10, 4, 3, 3, 4],
|
||||
[10, 1, 5, 3, 4],
|
||||
[10, 9, 0, 4, 5],
|
||||
[10, 6, 2, 4, 5],
|
||||
[10, 7, 1, 4, 4],
|
||||
[10, 4, 3, 3, 3],
|
||||
[10, 1, 5, 3, 3],
|
||||
[10, 9, 0, 4, 4],
|
||||
[10, 6, 2, 4, 4]
|
||||
],
|
||||
# Level 6
|
||||
[
|
||||
[10, 3, 4, 3, 4],
|
||||
[10, 0, 6, 3, 4],
|
||||
[10, 8, 1, 4, 5],
|
||||
[10, 5, 3, 4, 5],
|
||||
[10, 2, 5, 3, 4],
|
||||
[10, 3, 4, 3, 3],
|
||||
[10, 0, 6, 3, 3],
|
||||
[10, 8, 1, 4, 4],
|
||||
[10, 5, 3, 4, 4],
|
||||
[10, 2, 5, 3, 3]
|
||||
],
|
||||
# Level 7
|
||||
[
|
||||
[10, 7, 2, 4, 5],
|
||||
[10, 4, 4, 4, 5],
|
||||
[13, 1, 6, 3, 4],
|
||||
[13, 9, 1, 5, 6],
|
||||
[10, 6, 3, 4, 5],
|
||||
[10, 7, 2, 4, 4],
|
||||
[10, 4, 4, 4, 4],
|
||||
[13, 1, 6, 3, 3],
|
||||
[13, 9, 1, 5, 5],
|
||||
[10, 6, 3, 4, 4]
|
||||
],
|
||||
# Level 8
|
||||
[
|
||||
[10, 0, 7, 3, 4],
|
||||
[10, 8, 2, 5, 6],
|
||||
[10, 5, 4, 4, 5],
|
||||
[10, 2, 6, 4, 5],
|
||||
[10, 7, 3, 5, 6],
|
||||
[10, 0, 7, 3, 3],
|
||||
[10, 8, 2, 5, 5],
|
||||
[10, 5, 4, 4, 4],
|
||||
[10, 2, 6, 4, 4],
|
||||
[10, 7, 3, 5, 5]
|
||||
]
|
||||
]
|
||||
|
||||
def update
|
||||
pbUpdateSpriteHash(@sprites)
|
||||
@@ -25,6 +123,50 @@ class VoltorbFlip
|
||||
pbNewGame
|
||||
end
|
||||
|
||||
def generate_board
|
||||
ret = []
|
||||
1000.times do |attempt|
|
||||
board_distro = TILE_DISTRIBUTIONS[@level - 1].sample
|
||||
# Randomly distribute tiles
|
||||
ret = [1] * NUM_TILES
|
||||
index = 0
|
||||
[0, 2, 3].each do |value|
|
||||
qty = board_distro[[value - 1, 0].max]
|
||||
qty.times do |i|
|
||||
ret[index] = value
|
||||
index += 1
|
||||
end
|
||||
end
|
||||
ret.shuffle!
|
||||
# Find how many Voltorbs are in each row/column
|
||||
row_voltorbs = [0] * NUM_ROWS
|
||||
col_voltorbs = [0] * NUM_COLUMNS
|
||||
ret.each_with_index do |val, i|
|
||||
next if val != 0
|
||||
row_voltorbs[i / NUM_COLUMNS] += 1
|
||||
col_voltorbs[i % NUM_COLUMNS] += 1
|
||||
end
|
||||
# Count the number of x2 and x3 tiles are free (i.e. no Voltorbs in its row/column)
|
||||
free_multipliers = 0
|
||||
free_row = [0] * NUM_ROWS
|
||||
free_col = [0] * NUM_COLUMNS
|
||||
ret.each_with_index do |val, i|
|
||||
next if val <= 1
|
||||
next if row_voltorbs[i / NUM_COLUMNS] > 0 && col_voltorbs[i % NUM_COLUMNS] > 0
|
||||
free_multipliers += 1
|
||||
free_row[i / NUM_COLUMNS] += 1
|
||||
free_col[i % NUM_COLUMNS] += 1
|
||||
end
|
||||
# Regnerate board if there are too many free multiplier tiles
|
||||
next if free_multipliers >= board_distro[4]
|
||||
next if free_row.any? { |i| i >= board_distro[3] }
|
||||
next if free_col.any? { |i| i >= board_distro[3] }
|
||||
# Board is valid; use it
|
||||
break
|
||||
end
|
||||
return ret
|
||||
end
|
||||
|
||||
def pbNewGame
|
||||
# Initialize variables
|
||||
@sprites = {}
|
||||
@@ -35,54 +177,17 @@ class VoltorbFlip
|
||||
@voltorbNumbers = []
|
||||
@points = 0
|
||||
@index = [0, 0]
|
||||
# [x,y,points,selected]
|
||||
@squares = [0, 0, 0, false]
|
||||
@directory = "Graphics/UI/Voltorb Flip/"
|
||||
squareValues = []
|
||||
total = 1
|
||||
voltorbs = 0
|
||||
25.times do |i|
|
||||
# Sets the value to 1 by default
|
||||
squareValues[i] = 1
|
||||
# Sets the value to 0 (a voltorb) if # for that level hasn't been reached
|
||||
if voltorbs < 5 + @level
|
||||
squareValues[i] = 0
|
||||
voltorbs += 1
|
||||
# Sets the value randomly to a 2 or 3 if the total is less than the max
|
||||
elsif total < LEVEL_RANGES[@level - 1][1]
|
||||
squareValues[i] = rand(2..3)
|
||||
total *= squareValues[i]
|
||||
end
|
||||
next if total <= LEVEL_RANGES[@level - 1][1]
|
||||
# Lowers value of square to 1 if over max
|
||||
total /= squareValues[i]
|
||||
squareValues[i] = 1
|
||||
end
|
||||
# Randomize the values a little
|
||||
25.times do |i|
|
||||
temp = squareValues[i]
|
||||
if squareValues[i] > 1 && rand(10) == 0
|
||||
total /= squareValues[i]
|
||||
squareValues[i] -= 1
|
||||
total *= squareValues[i]
|
||||
end
|
||||
next if total >= LEVEL_RANGES[@level - 1][0] || squareValues[i] <= 0
|
||||
total /= squareValues[i]
|
||||
squareValues[i] = temp
|
||||
total *= squareValues[i]
|
||||
end
|
||||
# Populate @squares array
|
||||
25.times do |i|
|
||||
r = rand(squareValues.length)
|
||||
@squares[i] = [((i % 5) * 64) + 128, (i / 5).abs * 64, squareValues[r], false]
|
||||
squareValues.delete_at(r)
|
||||
@squares = [] # Each square is [x, y, points, revealed]
|
||||
# Generate a board
|
||||
squareValues = generate_board
|
||||
# Apply the generated board
|
||||
squareValues.each_with_index do |val, i|
|
||||
@squares[i] = [((i % NUM_COLUMNS) * 64) + 128, (i / NUM_COLUMNS).abs * 64, val, false]
|
||||
end
|
||||
pbCreateSprites
|
||||
# Display numbers (all zeroes, as no values have been calculated yet)
|
||||
5.times do |i|
|
||||
pbUpdateRowNumbers(0, 0, i)
|
||||
pbUpdateColumnNumbers(0, 0, i)
|
||||
end
|
||||
NUM_ROWS.times { |i| pbUpdateRowNumbers(0, 0, i) }
|
||||
NUM_COLUMNS.times { |i| pbUpdateColumnNumbers(0, 0, i) }
|
||||
pbDrawShadowText(@sprites["text"].bitmap, 8, 22, 118, 26,
|
||||
_INTL("Your coins"), Color.new(60, 60, 60), Color.new(150, 190, 170), 1)
|
||||
pbDrawShadowText(@sprites["text"].bitmap, 8, 88, 118, 26,
|
||||
@@ -122,27 +227,27 @@ class VoltorbFlip
|
||||
@voltorbNumbers = []
|
||||
@numbers = []
|
||||
# Draw numbers for each row (precautionary)
|
||||
@squares.length.times do |i|
|
||||
next if (i % 5) != 0
|
||||
NUM_ROWS.times do |j|
|
||||
num = 0
|
||||
voltorbs = 0
|
||||
j = i + 5
|
||||
(i...j).each do |k|
|
||||
num += @squares[k][2]
|
||||
voltorbs += 1 if @squares[k][2] == 0
|
||||
NUM_COLUMNS.times do |i|
|
||||
val = @squares[i + (j * NUM_COLUMNS)][2]
|
||||
num += val
|
||||
voltorbs += 1 if val == 0
|
||||
end
|
||||
pbUpdateRowNumbers(num, voltorbs, i / 5)
|
||||
pbUpdateRowNumbers(num, voltorbs, j)
|
||||
end
|
||||
# Reset arrays to empty
|
||||
@voltorbNumbers = []
|
||||
@numbers = []
|
||||
# Draw numbers for each column
|
||||
5.times do |i|
|
||||
NUM_COLUMNS.times do |i|
|
||||
num = 0
|
||||
voltorbs = 0
|
||||
5.times do |j|
|
||||
num += @squares[i + (j * 5)][2]
|
||||
voltorbs += 1 if @squares[i + (j * 5)][2] == 0
|
||||
NUM_ROWS.times do |j|
|
||||
val = @squares[i + (j * NUM_COLUMNS)][2]
|
||||
num += val
|
||||
voltorbs += 1 if val == 0
|
||||
end
|
||||
pbUpdateColumnNumbers(num, voltorbs, i)
|
||||
end
|
||||
@@ -153,7 +258,7 @@ class VoltorbFlip
|
||||
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
|
||||
@viewport.z = 99999
|
||||
@sprites["bg"] = Sprite.new(@viewport)
|
||||
@sprites["bg"].bitmap = RPG::Cache.load_bitmap(@directory, _INTL("Voltorb Flip bg"))
|
||||
@sprites["bg"].bitmap = RPG::Cache.load_bitmap(GRAPHICS_DIRECTORY, _INTL("Voltorb Flip bg"))
|
||||
@sprites["text"] = BitmapSprite.new(Graphics.width, Graphics.height, @viewport)
|
||||
pbSetSystemFont(@sprites["text"].bitmap)
|
||||
@sprites["level"] = BitmapSprite.new(Graphics.width, Graphics.height, @viewport)
|
||||
@@ -177,7 +282,7 @@ class VoltorbFlip
|
||||
@sprites["icon"].z = 99997
|
||||
@sprites["mark"] = BitmapSprite.new(Graphics.width, Graphics.height, @viewport)
|
||||
@sprites["memo"] = Sprite.new(@viewport)
|
||||
@sprites["memo"].bitmap = RPG::Cache.load_bitmap(@directory, _INTL("memo"))
|
||||
@sprites["memo"].bitmap = RPG::Cache.load_bitmap(GRAPHICS_DIRECTORY, _INTL("memo"))
|
||||
@sprites["memo"].x = 10
|
||||
@sprites["memo"].y = 244
|
||||
@sprites["memo"].visible = false
|
||||
@@ -195,20 +300,20 @@ class VoltorbFlip
|
||||
icons = []
|
||||
points = 0
|
||||
3.times do |i|
|
||||
25.times do |j|
|
||||
NUM_TILES.times do |j|
|
||||
points = @squares[j][2] if i == 2
|
||||
icons[j] = [@directory + "tiles", @squares[j][0], @squares[j][1], 320 + (i * 64) + (points * 64), 0, 64, 64]
|
||||
icons[j] = [GRAPHICS_DIRECTORY + "tiles", @squares[j][0], @squares[j][1], 320 + (i * 64) + (points * 64), 0, 64, 64]
|
||||
end
|
||||
icons.compact!
|
||||
pbDrawImagePositions(@sprites[i].bitmap, icons)
|
||||
end
|
||||
icons = []
|
||||
25.times do |i|
|
||||
icons[i] = [@directory + "tiles", @squares[i][0], @squares[i][1], @squares[i][2] * 64, 0, 64, 64]
|
||||
NUM_TILES.times do |i|
|
||||
icons[i] = [GRAPHICS_DIRECTORY + "tiles", @squares[i][0], @squares[i][1], @squares[i][2] * 64, 0, 64, 64]
|
||||
end
|
||||
pbDrawImagePositions(@sprites[5].bitmap, icons)
|
||||
# Default cursor image
|
||||
@cursor[0] = [@directory + "cursor", 0 + 128, 0, 0, 0, 64, 64]
|
||||
@cursor[0] = [GRAPHICS_DIRECTORY + "cursor", 0 + 128, 0, 0, 0, 64, 64]
|
||||
end
|
||||
|
||||
def getInput
|
||||
@@ -257,7 +362,7 @@ class VoltorbFlip
|
||||
end
|
||||
(@marks.length + 1).times do |i|
|
||||
if @marks[i].nil?
|
||||
@marks[i] = [@directory + "tiles", (@index[0] * 64) + 128, @index[1] * 64, 256, 0, 64, 64]
|
||||
@marks[i] = [GRAPHICS_DIRECTORY + "tiles", (@index[0] * 64) + 128, @index[1] * 64, 256, 0, 64, 64]
|
||||
elsif @marks[i][1] == (@index[0] * 64) + 128 && @marks[i][2] == @index[1] * 64
|
||||
@marks.delete_at(i)
|
||||
@marks.compact!
|
||||
@@ -281,7 +386,7 @@ class VoltorbFlip
|
||||
# Part1
|
||||
animation = []
|
||||
3.times do |j|
|
||||
animation[0] = icons[0] = [@directory + "tiles", (@index[0] * 64) + 128, @index[1] * 64,
|
||||
animation[0] = icons[0] = [GRAPHICS_DIRECTORY + "tiles", (@index[0] * 64) + 128, @index[1] * 64,
|
||||
704 + (64 * j), 0, 64, 64]
|
||||
pbDrawImagePositions(@sprites["animation"].bitmap, animation)
|
||||
pbWait(0.05)
|
||||
@@ -290,7 +395,7 @@ class VoltorbFlip
|
||||
# Part2
|
||||
animation = []
|
||||
6.times do |j|
|
||||
animation[0] = [@directory + "explosion", (@index[0] * 64) - 32 + 128, (@index[1] * 64) - 32,
|
||||
animation[0] = [GRAPHICS_DIRECTORY + "explosion", (@index[0] * 64) - 32 + 128, (@index[1] * 64) - 32,
|
||||
j * 128, 0, 128, 128]
|
||||
pbDrawImagePositions(@sprites["animation"].bitmap, animation)
|
||||
pbWait(0.1)
|
||||
@@ -302,14 +407,10 @@ class VoltorbFlip
|
||||
@sprites["mark"].bitmap.clear
|
||||
if @level > 1
|
||||
# Determine how many levels to reduce by
|
||||
newLevel = 0
|
||||
@squares.length.times do |j|
|
||||
newLevel += 1 if @squares[j][3] == true && @squares[j][2] > 1
|
||||
end
|
||||
newLevel = @level if newLevel > @level
|
||||
if @level > newLevel
|
||||
newLevel = @squares.count { |tile| tile[3] && tile[2] > 0 }
|
||||
newLevel = newLevel.clamp(@level, 1)
|
||||
if newLevel < @level
|
||||
@level = newLevel
|
||||
@level = 1 if @level < 1
|
||||
pbMessage("\\se[Voltorb Flip level down]" + _INTL("Dropped to Game Lv. {1}!", @level.to_s))
|
||||
end
|
||||
end
|
||||
@@ -321,10 +422,8 @@ class VoltorbFlip
|
||||
pbUpdateCoins
|
||||
# Revert numbers to 0s
|
||||
@sprites["numbers"].bitmap.clear
|
||||
5.times do |j|
|
||||
pbUpdateRowNumbers(0, 0, j)
|
||||
pbUpdateColumnNumbers(0, 0, j)
|
||||
end
|
||||
NUM_ROWS.times { |j| pbUpdateRowNumbers(0, 0, j) }
|
||||
NUM_COLUMNS.times { |j| pbUpdateColumnNumbers(0, 0, j) }
|
||||
pbDisposeSpriteHash(@sprites)
|
||||
@firstRound = false
|
||||
pbNewGame
|
||||
@@ -332,7 +431,7 @@ class VoltorbFlip
|
||||
# Play tile animation
|
||||
animation = []
|
||||
4.times do |j|
|
||||
animation[0] = [@directory + "flipAnimation", (@index[0] * 64) - 14 + 128, (@index[1] * 64) - 16,
|
||||
animation[0] = [GRAPHICS_DIRECTORY + "flipAnimation", (@index[0] * 64) - 14 + 128, (@index[1] * 64) - 16,
|
||||
j * 92, 0, 92, 96]
|
||||
pbDrawImagePositions(@sprites["animation"].bitmap, animation)
|
||||
pbWait(0.05)
|
||||
@@ -375,10 +474,8 @@ class VoltorbFlip
|
||||
pbShowAndDispose
|
||||
# Revert numbers to 0s
|
||||
@sprites["numbers"].bitmap.clear
|
||||
5.times do |i|
|
||||
pbUpdateRowNumbers(0, 0, i)
|
||||
pbUpdateColumnNumbers(0, 0, i)
|
||||
end
|
||||
NUM_ROWS.times { |i| pbUpdateRowNumbers(0, 0, i) }
|
||||
NUM_COLUMNS.times { |i| pbUpdateColumnNumbers(0, 0, i) }
|
||||
@sprites["curtain"].opacity = 100
|
||||
if @level < 8
|
||||
@level += 1
|
||||
@@ -395,11 +492,11 @@ class VoltorbFlip
|
||||
elsif Input.trigger?(Input::ACTION)
|
||||
pbPlayDecisionSE
|
||||
@sprites["cursor"].bitmap.clear
|
||||
if @cursor[0][3] == 0 # If in normal mode
|
||||
@cursor[0] = [@directory + "cursor", 128, 0, 64, 0, 64, 64]
|
||||
if @cursor[0][3] == 0 # If in normal mode
|
||||
@cursor[0] = [GRAPHICS_DIRECTORY + "cursor", 128, 0, 64, 0, 64, 64]
|
||||
@sprites["memo"].visible = true
|
||||
else # Mark mode
|
||||
@cursor[0] = [@directory + "cursor", 128, 0, 0, 0, 64, 64]
|
||||
else # Mark mode
|
||||
@cursor[0] = [GRAPHICS_DIRECTORY + "cursor", 128, 0, 0, 0, 64, 64]
|
||||
@sprites["memo"].visible = false
|
||||
end
|
||||
elsif Input.trigger?(Input::BACK)
|
||||
@@ -431,9 +528,9 @@ class VoltorbFlip
|
||||
def pbUpdateRowNumbers(num, voltorbs, i)
|
||||
numText = sprintf("%02d", num)
|
||||
numText.chars.each_with_index do |digit, j|
|
||||
@numbers[j] = [@directory + "numbersSmall", 472 + (j * 16), 8 + (i * 64), digit.to_i * 16, 0, 16, 16]
|
||||
@numbers[j] = [GRAPHICS_DIRECTORY + "numbersSmall", 472 + (j * 16), 8 + (i * 64), digit.to_i * 16, 0, 16, 16]
|
||||
end
|
||||
@voltorbNumbers[i] = [@directory + "numbersSmall", 488, 34 + (i * 64), voltorbs * 16, 0, 16, 16]
|
||||
@voltorbNumbers[i] = [GRAPHICS_DIRECTORY + "numbersSmall", 488, 34 + (i * 64), voltorbs * 16, 0, 16, 16]
|
||||
# Display the numbers
|
||||
pbDrawImagePositions(@sprites["numbers"].bitmap, @numbers)
|
||||
pbDrawImagePositions(@sprites["numbers"].bitmap, @voltorbNumbers)
|
||||
@@ -442,9 +539,9 @@ class VoltorbFlip
|
||||
def pbUpdateColumnNumbers(num, voltorbs, i)
|
||||
numText = sprintf("%02d", num)
|
||||
numText.chars.each_with_index do |digit, j|
|
||||
@numbers[j] = [@directory + "numbersSmall", 152 + (i * 64) + (j * 16), 328, digit.to_i * 16, 0, 16, 16]
|
||||
@numbers[j] = [GRAPHICS_DIRECTORY + "numbersSmall", 152 + (i * 64) + (j * 16), 328, digit.to_i * 16, 0, 16, 16]
|
||||
end
|
||||
@voltorbNumbers[i] = [@directory + "numbersSmall", 168 + (i * 64), 354, voltorbs * 16, 0, 16, 16]
|
||||
@voltorbNumbers[i] = [GRAPHICS_DIRECTORY + "numbersSmall", 168 + (i * 64), 354, voltorbs * 16, 0, 16, 16]
|
||||
# Display the numbers
|
||||
pbDrawImagePositions(@sprites["numbers"].bitmap, @numbers)
|
||||
pbDrawImagePositions(@sprites["numbers"].bitmap, @voltorbNumbers)
|
||||
@@ -453,7 +550,7 @@ class VoltorbFlip
|
||||
def pbCreateCoins(source, y)
|
||||
coinText = sprintf("%05d", source)
|
||||
coinText.chars.each_with_index do |digit, i|
|
||||
@coins[i] = [@directory + "numbersScore", 6 + (i * 24), y, digit.to_i * 24, 0, 24, 38]
|
||||
@coins[i] = [GRAPHICS_DIRECTORY + "numbersScore", 6 + (i * 24), y, digit.to_i * 24, 0, 24, 38]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -473,11 +570,11 @@ class VoltorbFlip
|
||||
points = 0
|
||||
3.times do |i|
|
||||
points = tile if i == 2
|
||||
icons[i] = [@directory + "tiles", x, y, 320 + (i * 64) + (points * 64), 0, 64, 64]
|
||||
icons[i] = [GRAPHICS_DIRECTORY + "tiles", x, y, 320 + (i * 64) + (points * 64), 0, 64, 64]
|
||||
pbDrawImagePositions(@sprites["icon"].bitmap, icons)
|
||||
pbWait(0.05)
|
||||
end
|
||||
icons[3] = [@directory + "tiles", x, y, tile * 64, 0, 64, 64]
|
||||
icons[3] = [GRAPHICS_DIRECTORY + "tiles", x, y, tile * 64, 0, 64, 64]
|
||||
pbDrawImagePositions(@sprites["icon"].bitmap, icons)
|
||||
pbSEPlay("Voltorb Flip tile")
|
||||
end
|
||||
@@ -504,27 +601,30 @@ class VoltorbFlip
|
||||
end
|
||||
end
|
||||
# "Dispose" of tiles by column
|
||||
5.times do |i|
|
||||
NUM_COLUMNS.times do |i|
|
||||
icons = []
|
||||
pbSEPlay("Voltorb Flip tile")
|
||||
5.times do |j|
|
||||
icons[j] = [@directory + "tiles", @squares[i + (j * 5)][0], @squares[i + (j * 5)][1],
|
||||
448 + (@squares[i + (j * 5)][2] * 64), 0, 64, 64]
|
||||
NUM_ROWS.times do |j|
|
||||
icons[j] = [GRAPHICS_DIRECTORY + "tiles", @squares[i + (j * NUM_COLUMNS)][0], @squares[i + (j * NUM_COLUMNS)][1],
|
||||
448 + (@squares[i + (j * NUM_COLUMNS)][2] * 64), 0, 64, 64]
|
||||
end
|
||||
pbDrawImagePositions(@sprites[i].bitmap, icons)
|
||||
pbWait(0.05)
|
||||
5.times do |j|
|
||||
icons[j] = [@directory + "tiles", @squares[i + (j * 5)][0], @squares[i + (j * 5)][1], 384, 0, 64, 64]
|
||||
NUM_ROWS.times do |j|
|
||||
icons[j] = [GRAPHICS_DIRECTORY + "tiles", @squares[i + (j * NUM_COLUMNS)][0], @squares[i + (j * NUM_COLUMNS)][1],
|
||||
384, 0, 64, 64]
|
||||
end
|
||||
pbDrawImagePositions(@sprites[i].bitmap, icons)
|
||||
pbWait(0.05)
|
||||
5.times do |j|
|
||||
icons[j] = [@directory + "tiles", @squares[i + (j * 5)][0], @squares[i + (j * 5)][1], 320, 0, 64, 64]
|
||||
NUM_ROWS.times do |j|
|
||||
icons[j] = [GRAPHICS_DIRECTORY + "tiles", @squares[i + (j * NUM_COLUMNS)][0], @squares[i + (j * NUM_COLUMNS)][1],
|
||||
320, 0, 64, 64]
|
||||
end
|
||||
pbDrawImagePositions(@sprites[i].bitmap, icons)
|
||||
pbWait(0.05)
|
||||
5.times do |j|
|
||||
icons[j] = [@directory + "tiles", @squares[i + (j * 5)][0], @squares[i + (j * 5)][1], 896, 0, 64, 64]
|
||||
NUM_ROWS.times do |j|
|
||||
icons[j] = [GRAPHICS_DIRECTORY + "tiles", @squares[i + (j * NUM_COLUMNS)][0], @squares[i + (j * NUM_COLUMNS)][1],
|
||||
896, 0, 64, 64]
|
||||
end
|
||||
pbDrawImagePositions(@sprites[i].bitmap, icons)
|
||||
pbWait(0.05)
|
||||
|
||||
@@ -611,7 +611,14 @@ end
|
||||
def pbScreenCapture
|
||||
t = Time.now
|
||||
filestart = t.strftime("[%Y-%m-%d] %H_%M_%S.%L")
|
||||
capturefile = RTP.getSaveFileName(sprintf("%s.png", filestart))
|
||||
Graphics.screenshot(capturefile)
|
||||
begin
|
||||
folder_name = "Screenshots"
|
||||
Dir.create(folder_name) if !Dir.safe?(folder_name)
|
||||
capturefile = folder_name + "/" + sprintf("%s.png", filestart)
|
||||
Graphics.screenshot(capturefile)
|
||||
rescue
|
||||
capturefile = RTP.getSaveFileName(sprintf("%s.png", filestart))
|
||||
Graphics.screenshot(capturefile)
|
||||
end
|
||||
pbSEPlay("Pkmn exp full") if FileTest.audio_exist?("Audio/SE/Pkmn exp full")
|
||||
end
|
||||
|
||||
@@ -65,8 +65,14 @@ def pbPlayTrainerIntroBGM(trainer_type)
|
||||
return if nil_or_empty?(trainer_type_data.intro_BGM)
|
||||
bgm = pbStringToAudioFile(trainer_type_data.intro_BGM)
|
||||
if !$game_temp.memorized_bgm
|
||||
$game_temp.memorized_bgm = $game_system.getPlayingBGM
|
||||
$game_temp.memorized_bgm_position = (Audio.bgm_pos rescue 0)
|
||||
if $game_temp.cue_bgm_delay
|
||||
$game_temp.cue_bgm_delay = nil
|
||||
$game_temp.memorized_bgm = $game_temp.cue_bgm
|
||||
$game_temp.memorized_bgm_position = 0
|
||||
else
|
||||
$game_temp.memorized_bgm = $game_system.getPlayingBGM
|
||||
$game_temp.memorized_bgm_position = (Audio.bgm_pos rescue 0)
|
||||
end
|
||||
end
|
||||
pbBGMPlay(bgm)
|
||||
end
|
||||
|
||||
@@ -348,7 +348,7 @@ def pbTrainerTypeEditor
|
||||
if tr_type
|
||||
case button
|
||||
when Input::ACTION
|
||||
if tr_type.is_a?(Symbol) && pbConfirmMessageSerious("Delete this trainer type?")
|
||||
if tr_type.is_a?(Symbol) && pbConfirmMessageSerious(_INTL("Delete this trainer type?"))
|
||||
GameData::TrainerType::DATA.delete(tr_type)
|
||||
GameData::TrainerType.save
|
||||
pbConvertTrainerData
|
||||
@@ -481,7 +481,7 @@ def pbTrainerBattleEditor
|
||||
if trainer_id
|
||||
case button
|
||||
when Input::ACTION
|
||||
if trainer_id.is_a?(Array) && pbConfirmMessageSerious("Delete this trainer battle?")
|
||||
if trainer_id.is_a?(Array) && pbConfirmMessageSerious(_INTL("Delete this trainer battle?"))
|
||||
tr_data = GameData::Trainer::DATA[trainer_id]
|
||||
GameData::Trainer::DATA.delete(trainer_id)
|
||||
modified = true
|
||||
@@ -825,7 +825,7 @@ def pbItemEditor
|
||||
if item
|
||||
case button
|
||||
when Input::ACTION
|
||||
if item.is_a?(Symbol) && pbConfirmMessageSerious("Delete this item?")
|
||||
if item.is_a?(Symbol) && pbConfirmMessageSerious(_INTL("Delete this item?"))
|
||||
GameData::Item::DATA.delete(item)
|
||||
GameData::Item.save
|
||||
Compiler.write_items
|
||||
@@ -929,7 +929,7 @@ def pbPokemonEditor
|
||||
if species
|
||||
case button
|
||||
when Input::ACTION
|
||||
if species.is_a?(Symbol) && pbConfirmMessageSerious("Delete this species?")
|
||||
if species.is_a?(Symbol) && pbConfirmMessageSerious(_INTL("Delete this species?"))
|
||||
GameData::Species::DATA.delete(species)
|
||||
GameData::Species.save
|
||||
Compiler.write_pokemon
|
||||
|
||||
@@ -508,8 +508,8 @@ module BattleAnimationEditor
|
||||
ret = false
|
||||
pbRgssChdir(File.join("Audio", "SE", "Anim")) do
|
||||
animfiles.concat(Dir.glob("*.wav"))
|
||||
# animfiles.concat(Dir.glob("*.mp3"))
|
||||
animfiles.concat(Dir.glob("*.ogg"))
|
||||
animfiles.concat(Dir.glob("*.mp3"))
|
||||
animfiles.concat(Dir.glob("*.wma"))
|
||||
end
|
||||
animfiles.uniq!
|
||||
|
||||
@@ -126,7 +126,7 @@ MenuHandlers.add(:debug_menu, :safari_zone_and_bug_contest, {
|
||||
break
|
||||
end
|
||||
end
|
||||
when 1 # Safari Balls
|
||||
when 1 # Sport Balls
|
||||
params = ChooseNumberParams.new
|
||||
params.setRange(0, 99999)
|
||||
params.setDefaultValue(contest.ballcount)
|
||||
@@ -162,7 +162,7 @@ MenuHandlers.add(:debug_menu, :edit_field_effects, {
|
||||
params = ChooseNumberParams.new
|
||||
params.setRange(0, 99999)
|
||||
params.setDefaultValue($PokemonGlobal.repel)
|
||||
$PokemonGlobal.repel = pbMessageChooseNumber(_INTL("Set the Pokémon's level."), params)
|
||||
$PokemonGlobal.repel = pbMessageChooseNumber(_INTL("Set the number of steps remaining."), params)
|
||||
when 1 # Strength used
|
||||
$PokemonMap.strengthUsed = !$PokemonMap.strengthUsed
|
||||
when 2 # Flash used
|
||||
|
||||
@@ -613,7 +613,7 @@ def pbImportAllAnimations
|
||||
Graphics.update
|
||||
audios = []
|
||||
files = Dir.glob(folder + "/*.*")
|
||||
["wav", "ogg", "mid", "wma"].each do |ext| # mp3
|
||||
["wav", "ogg", "mp3", "midi", "mid", "wma"].each do |ext|
|
||||
upext = ext.upcase
|
||||
audios.concat(files.find_all { |f| f[f.length - 3, 3] == ext })
|
||||
audios.concat(files.find_all { |f| f[f.length - 3, 3] == upext })
|
||||
|
||||
@@ -213,11 +213,12 @@ class MusicFileLister
|
||||
folder = (@bgm) ? "Audio/BGM/" : "Audio/ME/"
|
||||
@commands.clear
|
||||
Dir.chdir(folder) do
|
||||
# Dir.glob("*.mp3") { |f| @commands.push(f) }
|
||||
Dir.glob("*.ogg") { |f| @commands.push(f) }
|
||||
Dir.glob("*.wav") { |f| @commands.push(f) }
|
||||
Dir.glob("*.mid") { |f| @commands.push(f) }
|
||||
Dir.glob("*.ogg") { |f| @commands.push(f) }
|
||||
Dir.glob("*.mp3") { |f| @commands.push(f) }
|
||||
Dir.glob("*.midi") { |f| @commands.push(f) }
|
||||
Dir.glob("*.mid") { |f| @commands.push(f) }
|
||||
Dir.glob("*.wma") { |f| @commands.push(f) }
|
||||
end
|
||||
@commands.uniq!
|
||||
@commands.sort! { |a, b| a.downcase <=> b.downcase }
|
||||
|
||||
@@ -112,11 +112,11 @@ module Compiler
|
||||
else
|
||||
if sectionname.nil?
|
||||
FileLineData.setLine(line, lineno)
|
||||
raise _INTL("Expected a section at the beginning of the file. This error may also occur if the file was not saved in UTF-8.\n{1}", FileLineData.linereport)
|
||||
raise _INTL("Expected a section at the beginning of the file.\nThis error may also occur if the file was not saved in UTF-8.") + "\n" + FileLineData.linereport
|
||||
end
|
||||
if !line[/^\s*(\w+)\s*=\s*(.*)$/]
|
||||
FileLineData.setSection(sectionname, nil, line)
|
||||
raise _INTL("Bad line syntax (expected syntax like XXX=YYY)\n{1}", FileLineData.linereport)
|
||||
raise _INTL("Bad line syntax (expected syntax like XXX=YYY).") + "\n" + FileLineData.linereport
|
||||
end
|
||||
r1 = $~[1]
|
||||
r2 = $~[2]
|
||||
@@ -316,7 +316,7 @@ module Compiler
|
||||
end
|
||||
str[0, fieldbytes] = ""
|
||||
if !str[/^\s*,/] && !str[/^\s*$/]
|
||||
raise _INTL("Invalid quoted field (in: {1})\n{2}", str, FileLineData.linereport)
|
||||
raise _INTL("Invalid quoted field (in: {1}).", str) + "\n" + FileLineData.linereport
|
||||
end
|
||||
str[0, str.length] = $~.post_match
|
||||
else
|
||||
@@ -337,14 +337,14 @@ module Compiler
|
||||
field = csvfield!(str)
|
||||
return true if field[/^(?:1|TRUE|YES|Y)$/i]
|
||||
return false if field[/^(?:0|FALSE|NO|N)$/i]
|
||||
raise _INTL("Field {1} is not a Boolean value (true, false, 1, 0)\n{2}", field, FileLineData.linereport)
|
||||
raise _INTL("Field '{1}' is not a Boolean value (true, false, 1, 0).", field) + "\n" + FileLineData.linereport
|
||||
end
|
||||
|
||||
# Unused
|
||||
def csvInt!(str, _line = -1)
|
||||
ret = csvfield!(str)
|
||||
if !ret[/^\-?\d+$/]
|
||||
raise _INTL("Field {1} is not an integer\n{2}", ret, FileLineData.linereport)
|
||||
raise _INTL("Field '{1}' is not an integer.", ret) + "\n" + FileLineData.linereport
|
||||
end
|
||||
return ret.to_i
|
||||
end
|
||||
@@ -353,7 +353,7 @@ module Compiler
|
||||
def csvPosInt!(str, _line = -1)
|
||||
ret = csvfield!(str)
|
||||
if !ret[/^\d+$/]
|
||||
raise _INTL("Field {1} is not a positive integer\n{2}", ret, FileLineData.linereport)
|
||||
raise _INTL("Field '{1}' is not a positive integer.", ret) + "\n" + FileLineData.linereport
|
||||
end
|
||||
return ret.to_i
|
||||
end
|
||||
@@ -361,7 +361,7 @@ module Compiler
|
||||
# Unused
|
||||
def csvFloat!(str, _line = -1)
|
||||
ret = csvfield!(str)
|
||||
return Float(ret) rescue raise _INTL("Field {1} is not a number\n{2}", ret, FileLineData.linereport)
|
||||
return Float(ret) rescue raise _INTL("Field '{1}' is not a number.", ret) + "\n" + FileLineData.linereport
|
||||
end
|
||||
|
||||
# Unused
|
||||
@@ -384,52 +384,52 @@ module Compiler
|
||||
def cast_csv_value(value, schema, enumer = nil)
|
||||
case schema.downcase
|
||||
when "i" # Integer
|
||||
if !value[/^\-?\d+$/]
|
||||
raise _INTL("Field {1} is not an integer\n{2}", value, FileLineData.linereport)
|
||||
if !value || !value[/^\-?\d+$/]
|
||||
raise _INTL("Field '{1}' is not an integer.", value) + "\n" + FileLineData.linereport
|
||||
end
|
||||
return value.to_i
|
||||
when "u" # Positive integer or zero
|
||||
if !value[/^\d+$/]
|
||||
raise _INTL("Field {1} is not a positive integer or 0\n{2}", value, FileLineData.linereport)
|
||||
if !value || !value[/^\d+$/]
|
||||
raise _INTL("Field '{1}' is not a positive integer or 0.", value) + "\n" + FileLineData.linereport
|
||||
end
|
||||
return value.to_i
|
||||
when "v" # Positive integer
|
||||
if !value[/^\d+$/]
|
||||
raise _INTL("Field {1} is not a positive integer\n{2}", value, FileLineData.linereport)
|
||||
if !value || !value[/^\d+$/]
|
||||
raise _INTL("Field '{1}' is not a positive integer.", value) + "\n" + FileLineData.linereport
|
||||
end
|
||||
if value.to_i == 0
|
||||
raise _INTL("Field '{1}' must be greater than 0\n{2}", value, FileLineData.linereport)
|
||||
raise _INTL("Field '{1}' must be greater than 0.", value) + "\n" + FileLineData.linereport
|
||||
end
|
||||
return value.to_i
|
||||
when "x" # Hexadecimal number
|
||||
if !value[/^[A-F0-9]+$/i]
|
||||
raise _INTL("Field '{1}' is not a hexadecimal number\n{2}", value, FileLineData.linereport)
|
||||
if !value || !value[/^[A-F0-9]+$/i]
|
||||
raise _INTL("Field '{1}' is not a hexadecimal number.", value) + "\n" + FileLineData.linereport
|
||||
end
|
||||
return value.hex
|
||||
when "f" # Floating point number
|
||||
if !value[/^\-?^\d*\.?\d*$/]
|
||||
raise _INTL("Field {1} is not a number\n{2}", value, FileLineData.linereport)
|
||||
if !value || !value[/^\-?^\d*\.?\d*$/]
|
||||
raise _INTL("Field '{1}' is not a number.", value) + "\n" + FileLineData.linereport
|
||||
end
|
||||
return value.to_f
|
||||
when "b" # Boolean
|
||||
return true if value[/^(?:1|TRUE|YES|Y)$/i]
|
||||
return false if value[/^(?:0|FALSE|NO|N)$/i]
|
||||
raise _INTL("Field {1} is not a Boolean value (true, false, 1, 0)\n{2}", value, FileLineData.linereport)
|
||||
return true if value && value[/^(?:1|TRUE|YES|Y)$/i]
|
||||
return false if value && value[/^(?:0|FALSE|NO|N)$/i]
|
||||
raise _INTL("Field '{1}' is not a Boolean value (true, false, 1, 0).", value) + "\n" + FileLineData.linereport
|
||||
when "n" # Name
|
||||
if !value[/^(?![0-9])\w+$/]
|
||||
raise _INTL("Field '{1}' must contain only letters, digits, and\nunderscores and can't begin with a number.\n{2}", value, FileLineData.linereport)
|
||||
if !value || !value[/^(?![0-9])\w+$/]
|
||||
raise _INTL("Field '{1}' must contain only letters, digits, and\nunderscores and can't begin with a number.", value) + "\n" + FileLineData.linereport
|
||||
end
|
||||
when "s" # String
|
||||
when "q" # Unformatted text
|
||||
when "m" # Symbol
|
||||
if !value[/^(?![0-9])\w+$/]
|
||||
raise _INTL("Field '{1}' must contain only letters, digits, and\nunderscores and can't begin with a number.\n{2}", value, FileLineData.linereport)
|
||||
if !value || !value[/^(?![0-9])\w+$/]
|
||||
raise _INTL("Field '{1}' must contain only letters, digits, and\nunderscores and can't begin with a number.", value) + "\n" + FileLineData.linereport
|
||||
end
|
||||
return value.to_sym
|
||||
when "e" # Enumerable
|
||||
return checkEnumField(value, enumer)
|
||||
when "y" # Enumerable or integer
|
||||
return value.to_i if value[/^\-?\d+$/]
|
||||
return value.to_i if value && value[/^\-?\d+$/]
|
||||
return checkEnumField(value, enumer)
|
||||
end
|
||||
return value
|
||||
@@ -440,10 +440,10 @@ module Compiler
|
||||
when Module
|
||||
begin
|
||||
if nil_or_empty?(ret) || !enumer.const_defined?(ret)
|
||||
raise _INTL("Undefined value {1} in {2}\n{3}", ret, enumer.name, FileLineData.linereport)
|
||||
raise _INTL("Undefined value {1} in {2}.", ret, enumer.name) + "\n" + FileLineData.linereport
|
||||
end
|
||||
rescue NameError
|
||||
raise _INTL("Incorrect value {1} in {2}\n{3}", ret, enumer.name, FileLineData.linereport)
|
||||
raise _INTL("Incorrect value {1} in {2}.", ret, enumer.name) + "\n" + FileLineData.linereport
|
||||
end
|
||||
return enumer.const_get(ret.to_sym)
|
||||
when Symbol, String
|
||||
@@ -451,36 +451,36 @@ module Compiler
|
||||
enumer = GameData.const_get(enumer.to_sym)
|
||||
begin
|
||||
if nil_or_empty?(ret) || !enumer.exists?(ret.to_sym)
|
||||
raise _INTL("Undefined value {1} in {2}\n{3}", ret, enumer.name, FileLineData.linereport)
|
||||
raise _INTL("Undefined value {1} in {2}.", ret, enumer.name) + "\n" + FileLineData.linereport
|
||||
end
|
||||
rescue NameError
|
||||
raise _INTL("Incorrect value {1} in {2}\n{3}", ret, enumer.name, FileLineData.linereport)
|
||||
raise _INTL("Incorrect value {1} in {2}.", ret, enumer.name) + "\n" + FileLineData.linereport
|
||||
end
|
||||
return ret.to_sym
|
||||
end
|
||||
enumer = Object.const_get(enumer.to_sym)
|
||||
begin
|
||||
if nil_or_empty?(ret) || !enumer.const_defined?(ret)
|
||||
raise _INTL("Undefined value {1} in {2}\n{3}", ret, enumer.name, FileLineData.linereport)
|
||||
raise _INTL("Undefined value {1} in {2}.", ret, enumer.name) + "\n" + FileLineData.linereport
|
||||
end
|
||||
rescue NameError
|
||||
raise _INTL("Incorrect value {1} in {2}\n{3}", ret, enumer.name, FileLineData.linereport)
|
||||
raise _INTL("Incorrect value {1} in {2}.", ret, enumer.name) + "\n" + FileLineData.linereport
|
||||
end
|
||||
return enumer.const_get(ret.to_sym)
|
||||
when Array
|
||||
idx = findIndex(enumer) { |item| ret == item }
|
||||
idx = (nil_or_empty?(ret)) ? -1 : findIndex(enumer) { |item| ret == item }
|
||||
if idx < 0
|
||||
raise _INTL("Undefined value {1} (expected one of: {2})\n{3}", ret, enumer.inspect, FileLineData.linereport)
|
||||
raise _INTL("Undefined value {1} (expected one of: {2}).", ret, enumer.inspect) + "\n" + FileLineData.linereport
|
||||
end
|
||||
return idx
|
||||
when Hash
|
||||
value = enumer[ret]
|
||||
value = (nil_or_empty?(ret)) ? nil : enumer[ret]
|
||||
if value.nil?
|
||||
raise _INTL("Undefined value {1} (expected one of: {2})\n{3}", ret, enumer.keys.inspect, FileLineData.linereport)
|
||||
raise _INTL("Undefined value {1} (expected one of: {2}).", ret, enumer.keys.inspect) + "\n" + FileLineData.linereport
|
||||
end
|
||||
return value
|
||||
end
|
||||
raise _INTL("Enumeration not defined\n{1}", FileLineData.linereport)
|
||||
raise _INTL("Enumeration not defined.") + "\n" + FileLineData.linereport
|
||||
end
|
||||
|
||||
# Unused
|
||||
@@ -540,7 +540,7 @@ module Compiler
|
||||
if nil_or_empty?(field)
|
||||
subrecord.push(nil)
|
||||
elsif !field[/^\-?\d+$/]
|
||||
raise _INTL("Field {1} is not an integer\n{2}", field, FileLineData.linereport)
|
||||
raise _INTL("Field '{1}' is not an integer.", field) + "\n" + FileLineData.linereport
|
||||
else
|
||||
subrecord.push(field.to_i)
|
||||
end
|
||||
@@ -551,29 +551,29 @@ module Compiler
|
||||
if nil_or_empty?(field)
|
||||
subrecord.push(nil)
|
||||
elsif !field[/^\d+$/]
|
||||
raise _INTL("Field '{1}' must be 0 or greater\n{2}", field, FileLineData.linereport)
|
||||
raise _INTL("Field '{1}' must be 0 or greater.", field) + "\n" + FileLineData.linereport
|
||||
else
|
||||
subrecord.push(field.to_i)
|
||||
end
|
||||
when "v" # Positive integer
|
||||
field = csvPosInt!(rec, lineno)
|
||||
raise _INTL("Field '{1}' must be greater than 0\n{2}", field, FileLineData.linereport) if field == 0
|
||||
raise _INTL("Field '{1}' must be greater than 0.", field) + "\n" + FileLineData.linereport if field == 0
|
||||
subrecord.push(field)
|
||||
when "V" # Optional positive integer
|
||||
field = csvfield!(rec)
|
||||
if nil_or_empty?(field)
|
||||
subrecord.push(nil)
|
||||
elsif !field[/^\d+$/]
|
||||
raise _INTL("Field '{1}' must be greater than 0\n{2}", field, FileLineData.linereport)
|
||||
raise _INTL("Field '{1}' must be greater than 0.", field) + "\n" + FileLineData.linereport
|
||||
elsif field.to_i == 0
|
||||
raise _INTL("Field '{1}' must be greater than 0\n{2}", field, FileLineData.linereport)
|
||||
raise _INTL("Field '{1}' must be greater than 0.", field) + "\n" + FileLineData.linereport
|
||||
else
|
||||
subrecord.push(field.to_i)
|
||||
end
|
||||
when "x" # Hexadecimal number
|
||||
field = csvfield!(rec)
|
||||
if !field[/^[A-Fa-f0-9]+$/]
|
||||
raise _INTL("Field '{1}' is not a hexadecimal number\n{2}", field, FileLineData.linereport)
|
||||
raise _INTL("Field '{1}' is not a hexadecimal number.", field) + "\n" + FileLineData.linereport
|
||||
end
|
||||
subrecord.push(field.hex)
|
||||
when "X" # Optional hexadecimal number
|
||||
@@ -581,7 +581,7 @@ module Compiler
|
||||
if nil_or_empty?(field)
|
||||
subrecord.push(nil)
|
||||
elsif !field[/^[A-Fa-f0-9]+$/]
|
||||
raise _INTL("Field '{1}' is not a hexadecimal number\n{2}", field, FileLineData.linereport)
|
||||
raise _INTL("Field '{1}' is not a hexadecimal number.", field) + "\n" + FileLineData.linereport
|
||||
else
|
||||
subrecord.push(field.hex)
|
||||
end
|
||||
@@ -592,7 +592,7 @@ module Compiler
|
||||
if nil_or_empty?(field)
|
||||
subrecord.push(nil)
|
||||
elsif !field[/^\-?^\d*\.?\d*$/]
|
||||
raise _INTL("Field {1} is not a floating point number\n{2}", field, FileLineData.linereport)
|
||||
raise _INTL("Field '{1}' is not a floating point number.", field) + "\n" + FileLineData.linereport
|
||||
else
|
||||
subrecord.push(field.to_f)
|
||||
end
|
||||
@@ -610,7 +610,7 @@ module Compiler
|
||||
when "n" # Name
|
||||
field = csvfield!(rec)
|
||||
if !field[/^(?![0-9])\w+$/]
|
||||
raise _INTL("Field '{1}' must contain only letters, digits, and\nunderscores and can't begin with a number.\n{2}", field, FileLineData.linereport)
|
||||
raise _INTL("Field '{1}' must contain only letters, digits, and\nunderscores and can't begin with a number.", field) + "\n" + FileLineData.linereport
|
||||
end
|
||||
subrecord.push(field)
|
||||
when "N" # Optional name
|
||||
@@ -618,7 +618,7 @@ module Compiler
|
||||
if nil_or_empty?(field)
|
||||
subrecord.push(nil)
|
||||
elsif !field[/^(?![0-9])\w+$/]
|
||||
raise _INTL("Field '{1}' must contain only letters, digits, and\nunderscores and can't begin with a number.\n{2}", field, FileLineData.linereport)
|
||||
raise _INTL("Field '{1}' must contain only letters, digits, and\nunderscores and can't begin with a number.", field) + "\n" + FileLineData.linereport
|
||||
else
|
||||
subrecord.push(field)
|
||||
end
|
||||
@@ -640,7 +640,7 @@ module Compiler
|
||||
when "m" # Symbol
|
||||
field = csvfield!(rec)
|
||||
if !field[/^(?![0-9])\w+$/]
|
||||
raise _INTL("Field '{1}' must contain only letters, digits, and\nunderscores and can't begin with a number.\n{2}", field, FileLineData.linereport)
|
||||
raise _INTL("Field '{1}' must contain only letters, digits, and\nunderscores and can't begin with a number.", field) + "\n" + FileLineData.linereport
|
||||
end
|
||||
subrecord.push(field.to_sym)
|
||||
when "M" # Optional symbol
|
||||
@@ -648,7 +648,7 @@ module Compiler
|
||||
if nil_or_empty?(field)
|
||||
subrecord.push(nil)
|
||||
elsif !field[/^(?![0-9])\w+$/]
|
||||
raise _INTL("Field '{1}' must contain only letters, digits, and\nunderscores and can't begin with a number.\n{2}", field, FileLineData.linereport)
|
||||
raise _INTL("Field '{1}' must contain only letters, digits, and\nunderscores and can't begin with a number.", field) + "\n" + FileLineData.linereport
|
||||
else
|
||||
subrecord.push(field.to_sym)
|
||||
end
|
||||
@@ -760,69 +760,79 @@ module Compiler
|
||||
end
|
||||
end
|
||||
file.write(",") if index > 0
|
||||
if value.nil?
|
||||
# do nothing
|
||||
elsif value.is_a?(String)
|
||||
if schema[1][i, 1].downcase == "q"
|
||||
file.write(value)
|
||||
else
|
||||
file.write(csvQuote(value))
|
||||
end
|
||||
elsif value.is_a?(Symbol)
|
||||
file.write(csvQuote(value.to_s))
|
||||
elsif value == true
|
||||
file.write("true")
|
||||
elsif value == false
|
||||
file.write("false")
|
||||
elsif value.is_a?(Numeric)
|
||||
case schema[1][i, 1]
|
||||
when "e", "E" # Enumerable
|
||||
enumer = schema[2 + i]
|
||||
case enumer
|
||||
when Array
|
||||
file.write(enumer[value])
|
||||
when Symbol, String
|
||||
next if value.nil?
|
||||
case schema[1][i, 1]
|
||||
when "e", "E" # Enumerable
|
||||
enumer = schema[2 + i - start]
|
||||
case enumer
|
||||
when Array
|
||||
file.write((value.is_a?(Integer) && enumer[value].nil?) ? enumer[value] : value)
|
||||
when Symbol, String
|
||||
if GameData.const_defined?(enumer.to_sym)
|
||||
mod = GameData.const_get(enumer.to_sym)
|
||||
file.write(mod.get(value).id.to_s)
|
||||
else
|
||||
mod = Object.const_get(enumer.to_sym)
|
||||
file.write(getConstantName(mod, value))
|
||||
when Module
|
||||
file.write(getConstantName(enumer, value))
|
||||
when Hash
|
||||
enumer.each_key do |key|
|
||||
if enumer[key] == value
|
||||
file.write(key)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
when "y", "Y" # Enumerable or integer
|
||||
enumer = schema[2 + i]
|
||||
case enumer
|
||||
when Array
|
||||
if enumer[value].nil?
|
||||
file.write(value)
|
||||
else
|
||||
file.write(enumer[value])
|
||||
end
|
||||
when Symbol, String
|
||||
mod = Object.const_get(enumer.to_sym)
|
||||
file.write(getConstantNameOrValue(mod, value))
|
||||
when Module
|
||||
file.write(getConstantNameOrValue(enumer, value))
|
||||
when Hash
|
||||
hasenum = false
|
||||
when Module
|
||||
file.write(getConstantName(enumer, value))
|
||||
when Hash
|
||||
if value.is_a?(String)
|
||||
file.write(value)
|
||||
else
|
||||
enumer.each_key do |key|
|
||||
next if enumer[key] != value
|
||||
file.write(key)
|
||||
hasenum = true
|
||||
break
|
||||
end
|
||||
file.write(value) unless hasenum
|
||||
end
|
||||
else # Any other record type
|
||||
file.write(value.inspect)
|
||||
end
|
||||
when "y", "Y" # Enumerable or integer
|
||||
enumer = schema[2 + i - start]
|
||||
case enumer
|
||||
when Array
|
||||
file.write((value.is_a?(Integer) && enumer[value].nil?) ? enumer[value] : value)
|
||||
when Symbol, String
|
||||
if !Kernel.const_defined?(enumer.to_sym) && GameData.const_defined?(enumer.to_sym)
|
||||
mod = GameData.const_get(enumer.to_sym)
|
||||
if mod.exists?(value)
|
||||
file.write(mod.get(value).id.to_s)
|
||||
else
|
||||
file.write(value.to_s)
|
||||
end
|
||||
else
|
||||
mod = Object.const_get(enumer.to_sym)
|
||||
file.write(getConstantNameOrValue(mod, value))
|
||||
end
|
||||
when Module
|
||||
file.write(getConstantNameOrValue(enumer, value))
|
||||
when Hash
|
||||
if value.is_a?(String)
|
||||
file.write(value)
|
||||
else
|
||||
has_enum = false
|
||||
enumer.each_key do |key|
|
||||
next if enumer[key] != value
|
||||
file.write(key)
|
||||
has_enum = true
|
||||
break
|
||||
end
|
||||
file.write(value) if !has_enum
|
||||
end
|
||||
end
|
||||
else
|
||||
file.write(value.inspect)
|
||||
if value.is_a?(String)
|
||||
file.write((schema[1][i, 1].downcase == "q") ? value : csvQuote(value))
|
||||
elsif value.is_a?(Symbol)
|
||||
file.write(csvQuote(value.to_s))
|
||||
elsif value == true
|
||||
file.write("true")
|
||||
elsif value == false
|
||||
file.write("false")
|
||||
else
|
||||
file.write(value.inspect)
|
||||
end
|
||||
end
|
||||
end
|
||||
break if start > 0 && index >= rec.length - 1
|
||||
@@ -854,7 +864,7 @@ module Compiler
|
||||
clonitem.sub!(/\s*$/, "")
|
||||
itm = GameData::Item.try_get(clonitem)
|
||||
if !itm
|
||||
raise _INTL("Undefined item constant name: {1}\nMake sure the item is defined in PBS/items.txt.\n{2}", item, FileLineData.linereport)
|
||||
raise _INTL("Undefined item constant name: {1}.\nMake sure the item is defined in PBS/items.txt.", item) + "\n" + FileLineData.linereport
|
||||
end
|
||||
return itm.id
|
||||
end
|
||||
@@ -867,7 +877,7 @@ module Compiler
|
||||
clonspecies = "NIDORANfE" if clonspecies == "NIDORANFE"
|
||||
spec = GameData::Species.try_get(clonspecies)
|
||||
if !spec
|
||||
raise _INTL("Undefined species constant name: {1}\nMake sure the species is defined in PBS/pokemon.txt.\n{2}", species, FileLineData.linereport)
|
||||
raise _INTL("Undefined species constant name: {1}.\nMake sure the species is defined in PBS/pokemon.txt.", species) + "\n" + FileLineData.linereport
|
||||
end
|
||||
return spec.id
|
||||
end
|
||||
@@ -879,7 +889,7 @@ module Compiler
|
||||
mov = GameData::Move.try_get(clonmove)
|
||||
if !mov
|
||||
return nil if skip_unknown
|
||||
raise _INTL("Undefined move constant name: {1}\nMake sure the move is defined in PBS/moves.txt.\n{2}", move, FileLineData.linereport)
|
||||
raise _INTL("Undefined move constant name: {1}.\nMake sure the move is defined in PBS/moves.txt.", move) + "\n" + FileLineData.linereport
|
||||
end
|
||||
return mov.id
|
||||
end
|
||||
@@ -891,7 +901,7 @@ module Compiler
|
||||
clonnature.sub!(/\s*$/, "")
|
||||
nat = GameData::Nature.try_get(clonnature)
|
||||
if !nat
|
||||
raise _INTL("Undefined nature constant name: {1}\nMake sure the nature is defined in the scripts.\n{2}", nature, FileLineData.linereport)
|
||||
raise _INTL("Undefined nature constant name: {1}.\nMake sure the nature is defined in the scripts.", nature) + "\n" + FileLineData.linereport
|
||||
end
|
||||
return nat.id
|
||||
end
|
||||
@@ -903,7 +913,7 @@ module Compiler
|
||||
clontype.sub!(/\s*$/, "")
|
||||
typ = GameData::TrainerType.try_get(clontype)
|
||||
if !typ
|
||||
raise _INTL("Undefined Trainer type constant name: {1}\nMake sure the trainer type is defined in PBS/trainer_types.txt.\n{2}", type, FileLineData.linereport)
|
||||
raise _INTL("Undefined trainer type constant name: {1}.\nMake sure the trainer type is defined in PBS/trainer_types.txt.", type) + "\n" + FileLineData.linereport
|
||||
end
|
||||
return typ.id
|
||||
end
|
||||
@@ -1078,7 +1088,7 @@ module Compiler
|
||||
mustCompile |= (latestTextTime >= latestDataTime)
|
||||
# Should recompile if holding Ctrl
|
||||
Input.update
|
||||
mustCompile = true if Input.press?(Input::CTRL)
|
||||
mustCompile = true if $full_compile || Input.press?(Input::CTRL)
|
||||
# Delete old data files in preparation for recompiling
|
||||
if mustCompile
|
||||
data_files.each do |filename|
|
||||
|
||||
@@ -54,7 +54,7 @@ module Compiler
|
||||
# Validate and modify the compiled data
|
||||
yield false, data_hash if block_given?
|
||||
if game_data.exists?(data_hash[:id])
|
||||
raise _INTL("Section name '{1}' is used twice.\n{2}", data_hash[:id], FileLineData.linereport)
|
||||
raise _INTL("Section name '{1}' is used twice.", data_hash[:id]) + "\n" + FileLineData.linereport
|
||||
end
|
||||
# Add section's data to records
|
||||
game_data.register(data_hash)
|
||||
@@ -116,19 +116,19 @@ module Compiler
|
||||
FileLineData.setLine(line, lineno)
|
||||
record = get_csv_record(line, schema)
|
||||
if !pbRgssExists?(sprintf("Data/Map%03d.rxdata", record[0]))
|
||||
print _INTL("Warning: Map {1}, as mentioned in the map connection data, was not found.\n{2}", record[0], FileLineData.linereport)
|
||||
print _INTL("Warning: Map {1}, as mentioned in the map connection data, was not found.", record[0]) + "\n" + FileLineData.linereport
|
||||
elsif !pbRgssExists?(sprintf("Data/Map%03d.rxdata", record[3]))
|
||||
print _INTL("Warning: Map {1}, as mentioned in the map connection data, was not found.\n{2}", record[3], FileLineData.linereport)
|
||||
print _INTL("Warning: Map {1}, as mentioned in the map connection data, was not found.", record[3]) + "\n" + FileLineData.linereport
|
||||
end
|
||||
case record[1]
|
||||
when "N"
|
||||
raise _INTL("North side of first map must connect with south side of second map\n{1}", FileLineData.linereport) if record[4] != "S"
|
||||
raise _INTL("North side of first map must connect with south side of second map.") + "\n" + FileLineData.linereport if record[4] != "S"
|
||||
when "S"
|
||||
raise _INTL("South side of first map must connect with north side of second map\n{1}", FileLineData.linereport) if record[4] != "N"
|
||||
raise _INTL("South side of first map must connect with north side of second map.") + "\n" + FileLineData.linereport if record[4] != "N"
|
||||
when "E"
|
||||
raise _INTL("East side of first map must connect with west side of second map\n{1}", FileLineData.linereport) if record[4] != "W"
|
||||
raise _INTL("East side of first map must connect with west side of second map.") + "\n" + FileLineData.linereport if record[4] != "W"
|
||||
when "W"
|
||||
raise _INTL("West side of first map must connect with east side of second map\n{1}", FileLineData.linereport) if record[4] != "E"
|
||||
raise _INTL("West side of first map must connect with east side of second map.") + "\n" + FileLineData.linereport if record[4] != "E"
|
||||
end
|
||||
records.push(record)
|
||||
end
|
||||
@@ -159,15 +159,15 @@ module Compiler
|
||||
# Ensure all weaknesses/resistances/immunities are valid types
|
||||
type.weaknesses.each do |other_type|
|
||||
next if GameData::Type.exists?(other_type)
|
||||
raise _INTL("'{1}' is not a defined type ({2}, section {3}, Weaknesses).", other_type.to_s, path, type.id)
|
||||
raise _INTL("'{1}' is not a defined type (type {2}, Weaknesses).", other_type.to_s, type.id)
|
||||
end
|
||||
type.resistances.each do |other_type|
|
||||
next if GameData::Type.exists?(other_type)
|
||||
raise _INTL("'{1}' is not a defined type ({2}, section {3}, Resistances).", other_type.to_s, path, type.id)
|
||||
raise _INTL("'{1}' is not a defined type (type {2}, Resistances).", other_type.to_s, type.id)
|
||||
end
|
||||
type.immunities.each do |other_type|
|
||||
next if GameData::Type.exists?(other_type)
|
||||
raise _INTL("'{1}' is not a defined type ({2}, section {3}, Immunities).", other_type.to_s, path, type.id)
|
||||
raise _INTL("'{1}' is not a defined type (type {2}, Immunities).", other_type.to_s, type.id)
|
||||
end
|
||||
# Get type names for translating
|
||||
type_names.push(type.real_name)
|
||||
@@ -210,11 +210,9 @@ module Compiler
|
||||
|
||||
def validate_compiled_move(hash)
|
||||
if (hash[:category] || 2) == 2 && (hash[:power] || 0) != 0
|
||||
raise _INTL("Move {1} is defined as a Status move with a non-zero base damage.\n{2}",
|
||||
hash[:real_name], FileLineData.linereport)
|
||||
raise _INTL("Move {1} is defined as a Status move with a non-zero base damage.", hash[:real_name]) + "\n" + FileLineData.linereport
|
||||
elsif (hash[:category] || 2) != 2 && (hash[:power] || 0) == 0
|
||||
print _INTL("Warning: Move {1} is defined as Physical or Special but has a base damage of 0. Changing it to a Status move.\n{2}",
|
||||
hash[:real_name], FileLineData.linereport)
|
||||
print _INTL("Warning: Move {1} is defined as Physical or Special but has a base damage of 0. Changing it to a Status move.", hash[:real_name]) + "\n" + FileLineData.linereport
|
||||
hash[:category] = 2
|
||||
end
|
||||
end
|
||||
@@ -310,6 +308,16 @@ module Compiler
|
||||
# Convert height and weight to integer values of tenths of a unit
|
||||
hash[:height] = [(hash[:height] * 10).round, 1].max if hash[:height]
|
||||
hash[:weight] = [(hash[:weight] * 10).round, 1].max if hash[:weight]
|
||||
# Ensure evolutions have a parameter if they need one (don't need to ensure
|
||||
# the parameter makes sense; that happens below)
|
||||
if hash[:evolutions]
|
||||
hash[:evolutions].each do |evo|
|
||||
FileLineData.setSection(hash[:id].to_s, "Evolution", "Evolution = #{evo[0]},#{evo[1]}") # For error reporting
|
||||
param_type = GameData::Evolution.get(evo[1]).parameter
|
||||
next if evo[2] || param_type.nil?
|
||||
raise _INTL("Evolution method {1} requires a parameter, but none was given.", evo[1]) + "\n" + FileLineData.linereport
|
||||
end
|
||||
end
|
||||
# Record all evolutions as not being prevolutions
|
||||
if hash[:evolutions].is_a?(Array)
|
||||
hash[:evolutions].each { |evo| evo[3] = false }
|
||||
@@ -424,7 +432,7 @@ module Compiler
|
||||
# Validate and modify the compiled data
|
||||
validate_compiled_pokemon_form(data_hash)
|
||||
if GameData::Species.exists?(data_hash[:id])
|
||||
raise _INTL("Section name '{1}' is used twice.\n{2}", data_hash[:id], FileLineData.linereport)
|
||||
raise _INTL("Section name '{1}' is used twice.", data_hash[:id]) + "\n" + FileLineData.linereport
|
||||
end
|
||||
# Add section's data to records
|
||||
GameData::Species.register(data_hash)
|
||||
@@ -443,9 +451,9 @@ module Compiler
|
||||
hash[:form] = hash[:id][1]
|
||||
hash[:id] = sprintf("%s_%d", hash[:species].to_s, hash[:form]).to_sym
|
||||
if !GameData::Species.exists?(hash[:species])
|
||||
raise _INTL("Undefined species ID '{1}'.\n{3}", hash[:species], FileLineData.linereport)
|
||||
raise _INTL("Undefined species ID '{1}'.", hash[:species]) + "\n" + FileLineData.linereport
|
||||
elsif GameData::Species.exists?(hash[:id])
|
||||
raise _INTL("Form {1} for species ID {2} is defined twice.\n{3}", hash[:form], hash[:species], FileLineData.linereport)
|
||||
raise _INTL("Form {1} for species ID '{2}' is defined twice.", hash[:form], hash[:species]) + "\n" + FileLineData.linereport
|
||||
end
|
||||
# Perform the same validations on this form as for a regular species
|
||||
validate_compiled_pokemon(hash)
|
||||
@@ -592,11 +600,11 @@ module Compiler
|
||||
if line[/^\s*\[\s*(\d+)\s*\]\s*$/]
|
||||
section = $~[1].to_i
|
||||
if dex_lists[section]
|
||||
raise _INTL("Dex list number {1} is defined at least twice.\n{2}", section, FileLineData.linereport)
|
||||
raise _INTL("Dex list number {1} is defined at least twice.", section) + "\n" + FileLineData.linereport
|
||||
end
|
||||
dex_lists[section] = []
|
||||
else
|
||||
raise _INTL("Expected a section at the beginning of the file.\n{1}", FileLineData.linereport) if !section
|
||||
raise _INTL("Expected a section at the beginning of the file.") + "\n" + FileLineData.linereport if !section
|
||||
species_list = line.split(",")
|
||||
species_list.each do |species|
|
||||
next if !species || species.empty?
|
||||
@@ -613,7 +621,7 @@ module Compiler
|
||||
next if list == unique_list
|
||||
list.each_with_index do |s, i|
|
||||
next if unique_list[i] == s
|
||||
raise _INTL("Dex list number {1} has species {2} listed twice.\n{3}", index, s, FileLineData.linereport)
|
||||
raise _INTL("Dex list number {1} has species {2} listed twice.", index, s) + "\n" + FileLineData.linereport
|
||||
end
|
||||
end
|
||||
# Save all data
|
||||
@@ -665,17 +673,17 @@ module Compiler
|
||||
if current_type && line[/^\d+,/] # Species line
|
||||
values = line.split(",").collect! { |v| v.strip }
|
||||
if !values || values.length < 3
|
||||
raise _INTL("Expected a species entry line for encounter type {1} for map '{2}', got \"{3}\" instead.\n{4}",
|
||||
GameData::EncounterType.get(current_type).real_name, encounter_hash[:map], line, FileLineData.linereport)
|
||||
raise _INTL("Expected a species entry line for encounter type {1} for map {2}.",
|
||||
GameData::EncounterType.get(current_type).real_name, encounter_hash[:map]) + "\n" + FileLineData.linereport
|
||||
end
|
||||
values = get_csv_record(line, [nil, "vevV", nil, :Species])
|
||||
values[3] = values[2] if !values[3]
|
||||
if values[2] > max_level
|
||||
raise _INTL("Level number {1} is not valid (max. {2}).\n{3}", values[2], max_level, FileLineData.linereport)
|
||||
raise _INTL("Level number {1} is not valid (max. {2}).", values[2], max_level) + "\n" + FileLineData.linereport
|
||||
elsif values[3] > max_level
|
||||
raise _INTL("Level number {1} is not valid (max. {2}).\n{3}", values[3], max_level, FileLineData.linereport)
|
||||
raise _INTL("Level number {1} is not valid (max. {2}).", values[3], max_level) + "\n" + FileLineData.linereport
|
||||
elsif values[2] > values[3]
|
||||
raise _INTL("Minimum level is greater than maximum level: {1}\n{2}", line, FileLineData.linereport)
|
||||
raise _INTL("Minimum level is greater than maximum level.") + "\n" + FileLineData.linereport
|
||||
end
|
||||
encounter_hash[:types][current_type].push(values)
|
||||
elsif line[/^\[\s*(.+)\s*\]$/] # Map ID line
|
||||
@@ -704,7 +712,7 @@ module Compiler
|
||||
# Raise an error if a map/version combo is used twice
|
||||
key = sprintf("%s_%d", map_number, map_version).to_sym
|
||||
if GameData::Encounter::DATA[key]
|
||||
raise _INTL("Encounters for map '{1}' are defined twice.\n{2}", map_number, FileLineData.linereport)
|
||||
raise _INTL("Encounters for map '{1}' are defined twice.", map_number) + "\n" + FileLineData.linereport
|
||||
end
|
||||
step_chances = {}
|
||||
# Construct encounter hash
|
||||
@@ -718,7 +726,7 @@ module Compiler
|
||||
}
|
||||
current_type = nil
|
||||
elsif !encounter_hash # File began with something other than a map ID line
|
||||
raise _INTL("Expected a map number, got \"{1}\" instead.\n{2}", line, FileLineData.linereport)
|
||||
raise _INTL("Expected a map number, got \"{1}\" instead.", line) + "\n" + FileLineData.linereport
|
||||
else
|
||||
# Check if line is an encounter method name or not
|
||||
values = line.split(",").collect! { |v| v.strip }
|
||||
@@ -728,8 +736,7 @@ module Compiler
|
||||
step_chances[current_type] ||= GameData::EncounterType.get(current_type).trigger_chance
|
||||
encounter_hash[:types][current_type] = []
|
||||
else
|
||||
raise _INTL("Undefined encounter type \"{1}\" for map '{2}'.\n{3}",
|
||||
line, encounter_hash[:map], FileLineData.linereport)
|
||||
raise _INTL("Undefined encounter type \"{1}\" for map '{2}'.", line, encounter_hash[:map]) + "\n" + FileLineData.linereport
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -819,7 +826,7 @@ module Compiler
|
||||
elsif line[/^\s*(\w+)\s*=\s*(.*)$/]
|
||||
# XXX=YYY lines
|
||||
if !data_hash
|
||||
raise _INTL("Expected a section at the beginning of the file.\n{1}", FileLineData.linereport)
|
||||
raise _INTL("Expected a section at the beginning of the file.") + "\n" + FileLineData.linereport
|
||||
end
|
||||
key = $~[1]
|
||||
if schema[key] # Property of the trainer
|
||||
@@ -835,7 +842,7 @@ module Compiler
|
||||
end
|
||||
elsif sub_schema[key] # Property of a Pokémon
|
||||
if !current_pkmn
|
||||
raise _INTL("Pokémon hasn't been defined yet!\n{1}", FileLineData.linereport)
|
||||
raise _INTL("Pokémon hasn't been defined yet!") + "\n" + FileLineData.linereport
|
||||
end
|
||||
current_pkmn[sub_schema[key][0]] = get_csv_record($~[2], sub_schema[key])
|
||||
end
|
||||
@@ -862,19 +869,18 @@ module Compiler
|
||||
hash[:version] = hash[:id][2]
|
||||
# Ensure the trainer has at least one Pokémon
|
||||
if hash[:pokemon].empty?
|
||||
raise _INTL("Trainer with ID {1} has no Pokémon.\n{2}", hash[:id], FileLineData.linereport)
|
||||
raise _INTL("Trainer with ID '{1}' has no Pokémon.", hash[:id]) + "\n" + FileLineData.linereport
|
||||
end
|
||||
max_level = GameData::GrowthRate.max_level
|
||||
hash[:pokemon].each do |pkmn|
|
||||
# Ensure valid level
|
||||
if pkmn[:level] > max_level
|
||||
raise _INTL("Invalid Pokémon level {1} (must be 1-{2}).\n{3}",
|
||||
pkmn[:level], max_level, FileLineData.linereport)
|
||||
raise _INTL("Invalid Pokémon level {1} (must be 1-{2}).", pkmn[:level], max_level) + "\n" + FileLineData.linereport
|
||||
end
|
||||
# Ensure valid name length
|
||||
if pkmn[:real_name] && pkmn[:real_name].length > Pokemon::MAX_NAME_SIZE
|
||||
raise _INTL("Invalid Pokémon nickname: {1} (must be 1-{2} characters).\n{3}",
|
||||
pkmn[:real_name], Pokemon::MAX_NAME_SIZE, FileLineData.linereport)
|
||||
raise _INTL("Invalid Pokémon nickname: {1} (must be 1-{2} characters).",
|
||||
pkmn[:real_name], Pokemon::MAX_NAME_SIZE) + "\n" + FileLineData.linereport
|
||||
end
|
||||
# Ensure no duplicate moves
|
||||
pkmn[:moves].uniq! if pkmn[:moves]
|
||||
@@ -885,8 +891,7 @@ module Compiler
|
||||
next if s.pbs_order < 0
|
||||
iv_hash[s.id] = pkmn[:iv][s.pbs_order] || pkmn[:iv][0]
|
||||
if iv_hash[s.id] > Pokemon::IV_STAT_LIMIT
|
||||
raise _INTL("Invalid IV: {1} (must be 0-{2}).\n{3}",
|
||||
iv_hash[s.id], Pokemon::IV_STAT_LIMIT, FileLineData.linereport)
|
||||
raise _INTL("Invalid IV: {1} (must be 0-{2}).", iv_hash[s.id], Pokemon::IV_STAT_LIMIT) + "\n" + FileLineData.linereport
|
||||
end
|
||||
end
|
||||
pkmn[:iv] = iv_hash
|
||||
@@ -900,26 +905,24 @@ module Compiler
|
||||
ev_hash[s.id] = pkmn[:ev][s.pbs_order] || pkmn[:ev][0]
|
||||
ev_total += ev_hash[s.id]
|
||||
if ev_hash[s.id] > Pokemon::EV_STAT_LIMIT
|
||||
raise _INTL("Invalid EV: {1} (must be 0-{2}).\n{3}",
|
||||
ev_hash[s.id], Pokemon::EV_STAT_LIMIT, FileLineData.linereport)
|
||||
raise _INTL("Invalid EV: {1} (must be 0-{2}).", ev_hash[s.id], Pokemon::EV_STAT_LIMIT) + "\n" + FileLineData.linereport
|
||||
end
|
||||
end
|
||||
pkmn[:ev] = ev_hash
|
||||
if ev_total > Pokemon::EV_LIMIT
|
||||
raise _INTL("Invalid EV set (must sum to {1} or less).\n{2}",
|
||||
Pokemon::EV_LIMIT, FileLineData.linereport)
|
||||
raise _INTL("Invalid EV set (must sum to {1} or less).", Pokemon::EV_LIMIT) + "\n" + FileLineData.linereport
|
||||
end
|
||||
end
|
||||
# Ensure valid happiness
|
||||
if pkmn[:happiness]
|
||||
if pkmn[:happiness] > 255
|
||||
raise _INTL("Bad happiness: {1} (must be 0-255).\n{2}", pkmn[:happiness], FileLineData.linereport)
|
||||
raise _INTL("Bad happiness: {1} (must be 0-255).", pkmn[:happiness]) + "\n" + FileLineData.linereport
|
||||
end
|
||||
end
|
||||
# Ensure valid Poké Ball
|
||||
if pkmn[:poke_ball]
|
||||
if !GameData::Item.get(pkmn[:poke_ball]).is_poke_ball?
|
||||
raise _INTL("Value {1} isn't a defined Poké Ball.\n{2}", pkmn[:poke_ball], FileLineData.linereport)
|
||||
raise _INTL("Value '{1}' isn't a defined Poké Ball.", pkmn[:poke_ball]) + "\n" + FileLineData.linereport
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -984,10 +987,10 @@ module Compiler
|
||||
rsection[schema[0]] = record
|
||||
end
|
||||
if !rsection[0]
|
||||
raise _INTL("No trainer data file given in section {1}.\n{2}", name, FileLineData.linereport)
|
||||
raise _INTL("No trainer data file given in section {1}.", name) + "\n" + FileLineData.linereport
|
||||
end
|
||||
if !rsection[1]
|
||||
raise _INTL("No trainer data file given in section {1}.\n{2}", name, FileLineData.linereport)
|
||||
raise _INTL("No trainer data file given in section {1}.", name) + "\n" + FileLineData.linereport
|
||||
end
|
||||
rsection[3] = rsection[0]
|
||||
rsection[4] = rsection[1]
|
||||
@@ -1116,12 +1119,12 @@ module Compiler
|
||||
if data_hash[:id] == 0
|
||||
validate_compiled_global_metadata(data_hash)
|
||||
if GameData::Metadata.exists?(data_hash[:id])
|
||||
raise _INTL("Global metadata ID '{1}' is used twice.\n{2}", data_hash[:id], FileLineData.linereport)
|
||||
raise _INTL("Global metadata ID '{1}' is used twice.", data_hash[:id]) + "\n" + FileLineData.linereport
|
||||
end
|
||||
else
|
||||
validate_compiled_player_metadata(data_hash)
|
||||
if GameData::PlayerMetadata.exists?(data_hash[:id])
|
||||
raise _INTL("Player metadata ID '{1}' is used twice.\n{2}", data_hash[:id], FileLineData.linereport)
|
||||
raise _INTL("Player metadata ID '{1}' is used twice.", data_hash[:id]) + "\n" + FileLineData.linereport
|
||||
end
|
||||
end
|
||||
# Add section's data to records
|
||||
@@ -1142,7 +1145,7 @@ module Compiler
|
||||
|
||||
def validate_compiled_global_metadata(hash)
|
||||
if hash[:home].nil?
|
||||
raise _INTL("The entry 'Home' is required in metadata.txt section 0.\n{1}", FileLineData.linereport)
|
||||
raise _INTL("The entry 'Home' is required in metadata.txt section 0.") + "\n" + FileLineData.linereport
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1153,11 +1156,11 @@ module Compiler
|
||||
def validate_all_compiled_metadata
|
||||
# Ensure global metadata is defined
|
||||
if !GameData::Metadata.exists?(0)
|
||||
raise _INTL("Global metadata is not defined in metadata.txt but should be.\n{1}", FileLineData.linereport)
|
||||
raise _INTL("Global metadata is not defined in metadata.txt but should be.") + "\n" + FileLineData.linereport
|
||||
end
|
||||
# Ensure player character 1's metadata is defined
|
||||
if !GameData::PlayerMetadata.exists?(1)
|
||||
raise _INTL("Metadata for player character 1 is not defined in metadata.txt but should be.\n{1}", FileLineData.linereport)
|
||||
raise _INTL("Metadata for player character 1 is not defined in metadata.txt but should be.") + "\n" + FileLineData.linereport
|
||||
end
|
||||
# Get storage creator's name for translating
|
||||
storage_creator = [GameData::Metadata.get.real_storage_creator]
|
||||
@@ -1221,7 +1224,7 @@ module Compiler
|
||||
hash[:id] = sprintf("%s_%d", hash[:area].to_s, hash[:version]).to_sym
|
||||
end
|
||||
if GameData::DungeonParameters.exists?(hash[:id])
|
||||
raise _INTL("Version {1} of dungeon area {2} is defined twice.\n{3}", hash[:version], hash[:area], FileLineData.linereport)
|
||||
raise _INTL("Version {1} of dungeon area {2} is defined twice.", hash[:version], hash[:area]) + "\n" + FileLineData.linereport
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -25,6 +25,12 @@ end
|
||||
def mainFunctionDebug
|
||||
begin
|
||||
MessageTypes.load_default_messages if FileTest.exist?("Data/messages_core.dat")
|
||||
if $DEBUG && !FileTest.exist?("Game.rgssad") && Settings::PROMPT_TO_COMPILE
|
||||
pbSetResizeFactor(1) # Needed to make the message look good
|
||||
if pbConfirmMessage("\\ts[]" + "Do you want to compile your data and plugins?")
|
||||
$full_compile = true
|
||||
end
|
||||
end
|
||||
PluginManager.runPlugins
|
||||
Compiler.main
|
||||
Game.initialize
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[{000214A0-0000-0000-C000-000000000046}]
|
||||
Prop3=19,11
|
||||
[InternetShortcut]
|
||||
URL=https://essentialsdocs.fandom.com/wiki/Essentials_Docs_Wiki
|
||||
URL=https://essentialsengine.miraheze.org/wiki/Essentials_Engine_wiki
|
||||
IDList=
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@
|
||||
[PICHU,2]
|
||||
FormName = Spiky-Eared
|
||||
Generation = 4
|
||||
Evolutions = PIKACHU,None,
|
||||
Evolution = PIKACHU,None
|
||||
#-------------------------------
|
||||
[UNOWN,1]
|
||||
FormName = B
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -168,7 +168,7 @@ Generation = 6
|
||||
[PICHU,2]
|
||||
FormName = Spiky-Eared
|
||||
Generation = 4
|
||||
Evolutions = PIKACHU,None,
|
||||
Evolution = PIKACHU,None
|
||||
#-------------------------------
|
||||
[AMPHAROS,1]
|
||||
FormName = Mega Ampharos
|
||||
@@ -1003,7 +1003,7 @@ BaseExp = 243
|
||||
Moves = 1,TACKLE,1,VINEWHIP,6,FAIRYWIND,10,LUCKYCHANT,15,RAZORLEAF,20,WISH,25,MAGICALLEAF,27,GRASSYTERRAIN,33,PETALBLIZZARD,38,AROMATHERAPY,43,MISTYTERRAIN,46,MOONBLAST,50,LIGHTOFRUIN,51,PETALDANCE,58,SOLARBEAM
|
||||
EggGroups = Undiscovered
|
||||
Pokedex = The flower it's holding can no longer be found blooming anywhere. It's also thought to contain terrifying power.
|
||||
Evolutions = FLORGES,None,
|
||||
Evolution = FLORGES,None
|
||||
#-------------------------------
|
||||
[FLORGES,1]
|
||||
FormName = Yellow Flower
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -82,9 +82,9 @@ Weight = 3.8
|
||||
Color = Black
|
||||
Pokedex = With its incisors, it gnaws through doors and infiltrates people's homes. Then, with a twitch of its whiskers, it steals whatever food it finds.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
WildItemUncommon = PECHABERRY
|
||||
Evolutions = RATICATE,LevelNight,20
|
||||
Evolution = RATICATE,LevelNight,20
|
||||
#-------------------------------
|
||||
[RATICATE,1]
|
||||
FormName = Alolan
|
||||
@@ -97,7 +97,7 @@ Weight = 25.5
|
||||
Color = Black
|
||||
Pokedex = It forms a group of Rattata, which it assumes command of. Each group has its own territory, and disputes over food happen often.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
WildItemUncommon = PECHABERRY
|
||||
#-------------------------------
|
||||
[RAICHU,1]
|
||||
@@ -128,8 +128,8 @@ Weight = 40.0
|
||||
Color = White
|
||||
Pokedex = The skin on its back is as hard as steel. Predators go after its soft belly, so it clings to the ground desperately.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Evolutions = SANDSLASH,Item,ICESTONE
|
||||
Flags = InheritFormWithEverstone
|
||||
Evolution = SANDSLASH,Item,ICESTONE
|
||||
#-------------------------------
|
||||
[SANDSLASH,1]
|
||||
FormName = Alolan
|
||||
@@ -144,7 +144,7 @@ Weight = 55.0
|
||||
Color = Blue
|
||||
Pokedex = It runs across snow-covered plains at high speeds. It developed thick, sharp claws to plow through the snow.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[VULPIX,1]
|
||||
FormName = Alolan
|
||||
@@ -157,9 +157,9 @@ EggMoves = AGILITY,CHARM,DISABLE,ENCORE,EXTRASENSORY,FLAIL,FREEZEDRY,HOWL,HYPNOS
|
||||
Color = White
|
||||
Pokedex = In hot weather, this Pokémon makes ice shards with its six tails and sprays them around to cool itself off.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
WildItemUncommon = SNOWBALL
|
||||
Evolutions = NINETALES,Item,ICESTONE
|
||||
Evolution = NINETALES,Item,ICESTONE
|
||||
#-------------------------------
|
||||
[NINETALES,1]
|
||||
FormName = Alolan
|
||||
@@ -173,7 +173,7 @@ TutorMoves = AQUATAIL,ATTRACT,AURORAVEIL,BLIZZARD,BODYSLAM,CALMMIND,CAPTIVATE,CO
|
||||
Color = Blue
|
||||
Pokedex = It lives on mountains perpetually covered in snow and is revered as a deity incarnate. It appears draped in a blizzard.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
WildItemUncommon = SNOWBALL
|
||||
#-------------------------------
|
||||
[DIGLETT,1]
|
||||
@@ -187,7 +187,7 @@ EggMoves = ANCIENTPOWER,BEATUP,ENDURE,FEINTATTACK,FINALGAMBIT,HEADBUTT,MEMENTO,M
|
||||
Weight = 1.0
|
||||
Pokedex = Its head sports an altered form of whiskers made of metal. When in communication with its comrades, its whiskers wobble to and fro.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[DUGTRIO,1]
|
||||
FormName = Alolan
|
||||
@@ -200,7 +200,7 @@ TutorMoves = AERIALACE,ATTRACT,BODYSLAM,BULLDOZE,CAPTIVATE,CONFIDE,CUT,DIG,DOUBL
|
||||
Weight = 66.6
|
||||
Pokedex = Its shining gold hair provides it with protection. It's reputed that keeping any of its fallen hairs will bring bad luck.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[MEOWTH,1]
|
||||
FormName = Alolan
|
||||
@@ -213,8 +213,8 @@ EggMoves = AMNESIA,ASSIST,CHARM,COVET,FLAIL,FLATTER,FOULPLAY,HYPNOSIS,PARTINGSHO
|
||||
Color = Blue
|
||||
Pokedex = It's impulsive, selfish, and fickle. It's very popular with some Trainers who like giving it the attention it needs.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Evolutions = PERSIAN,Happiness,
|
||||
Flags = InheritFormWithEverstone
|
||||
Evolution = PERSIAN,Happiness
|
||||
#-------------------------------
|
||||
[PERSIAN,1]
|
||||
FormName = Alolan
|
||||
@@ -229,7 +229,7 @@ Weight = 33.0
|
||||
Color = Blue
|
||||
Pokedex = Its round face is a symbol of wealth. Persian that have bigger, plumper faces are considered more beautiful.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[ALAKAZAM,1]
|
||||
FormName = Mega Alakazam
|
||||
@@ -254,7 +254,7 @@ Weight = 20.3
|
||||
Color = Gray
|
||||
Pokedex = Geodude compete against each other with headbutts. The iron sand on their heads will stick to whichever one has stronger magnetism.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
WildItemUncommon = CELLBATTERY
|
||||
#-------------------------------
|
||||
[GRAVELER,1]
|
||||
@@ -268,7 +268,7 @@ Weight = 110.0
|
||||
Color = Gray
|
||||
Pokedex = They eat rocks and often get into a scrap over them. The shock of Graveler smashing together causes a flash of light and a booming noise.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
WildItemUncommon = CELLBATTERY
|
||||
#-------------------------------
|
||||
[GOLEM,1]
|
||||
@@ -283,7 +283,7 @@ Weight = 316.0
|
||||
Color = Gray
|
||||
Pokedex = It fires rocks charged with electricity. Even if the rock isn't fired that accurately, just grazing an opponent will cause numbness and fainting.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
WildItemCommon = CELLBATTERY
|
||||
#-------------------------------
|
||||
[SLOWBRO,1]
|
||||
@@ -312,7 +312,7 @@ Weight = 42.0
|
||||
Color = Green
|
||||
Pokedex = A Grimer, which had been brought in to solve a problem with garbage, developed over time into this form.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[MUK,1]
|
||||
FormName = Alolan
|
||||
@@ -326,7 +326,7 @@ Weight = 52.0
|
||||
Color = Green
|
||||
Pokedex = The garbage it eats causes continuous chemical changes in its body, which produce its exceedingly vivid coloration.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[GENGAR,1]
|
||||
FormName = Mega Gengar
|
||||
@@ -353,7 +353,7 @@ Generation = 7
|
||||
#-------------------------------
|
||||
[CUBONE,1]
|
||||
Generation = 7
|
||||
Evolutions = MAROWAK,LevelNight,28
|
||||
Evolution = MAROWAK,LevelNight,28
|
||||
#-------------------------------
|
||||
[MAROWAK,1]
|
||||
FormName = Alolan
|
||||
@@ -444,7 +444,7 @@ Generation = 6
|
||||
[PICHU,2]
|
||||
FormName = Spiky-Eared
|
||||
Generation = 4
|
||||
Evolutions = PIKACHU,None,
|
||||
Evolution = PIKACHU,None
|
||||
#-------------------------------
|
||||
[AMPHAROS,1]
|
||||
FormName = Mega Ampharos
|
||||
@@ -1337,7 +1337,7 @@ BaseExp = 243
|
||||
Moves = 1,TACKLE,1,VINEWHIP,1,FAIRYWIND,6,FAIRYWIND,10,LUCKYCHANT,15,RAZORLEAF,20,WISH,25,MAGICALLEAF,27,GRASSYTERRAIN,33,PETALBLIZZARD,38,AROMATHERAPY,43,MISTYTERRAIN,46,MOONBLAST,50,LIGHTOFRUIN,51,PETALDANCE,58,SOLARBEAM
|
||||
EggGroups = Undiscovered
|
||||
Pokedex = The flower it's holding can no longer be found blooming anywhere. It's also thought to contain terrifying power.
|
||||
Evolutions = FLORGES,None,
|
||||
Evolution = FLORGES,None
|
||||
#-------------------------------
|
||||
[FLORGES,1]
|
||||
FormName = Yellow Flower
|
||||
@@ -1515,7 +1515,7 @@ Pokedex = It summons the dead with its dreamy dancing. From their malice, it dra
|
||||
Abilities = OWNTEMPO
|
||||
HiddenAbilities = OWNTEMPO
|
||||
Flags = InheritFormFromMother
|
||||
Evolutions = LYCANROC,LevelEvening,25
|
||||
Evolution = LYCANROC,LevelEvening,25
|
||||
#-------------------------------
|
||||
[LYCANROC,1]
|
||||
FormName = Midnight Form
|
||||
|
||||
@@ -523,7 +523,7 @@ Name = Big Nugget
|
||||
NamePlural = Big Nuggets
|
||||
Pocket = 1
|
||||
Price = 40000
|
||||
Flags = Fling_30
|
||||
Flags = Fling_130
|
||||
Description = A big nugget of pure gold that gives off a lustrous gleam. A maniac will buy it for a high price.
|
||||
#-------------------------------
|
||||
[HEARTSCALE]
|
||||
|
||||
@@ -479,7 +479,7 @@ Accuracy = 100
|
||||
TotalPP = 5
|
||||
Target = NearOther
|
||||
FunctionCode = AlwaysCriticalHit
|
||||
Flags = Contact,CanProtect,CanMirrorMove,CannotMetronome
|
||||
Flags = Contact,CanProtect,CanMirrorMove,Punching,CannotMetronome
|
||||
Description = Strikes with a fierce blow through mastery of the Dark style. Always results in a critical hit.
|
||||
#-------------------------------
|
||||
[LASHOUT]
|
||||
@@ -8633,7 +8633,7 @@ Accuracy = 100
|
||||
TotalPP = 5
|
||||
Target = NearOther
|
||||
FunctionCode = HitThreeTimesAlwaysCriticalHit
|
||||
Flags = Contact,CanProtect,CanMirrorMove,CannotMetronome
|
||||
Flags = Contact,CanProtect,CanMirrorMove,Punching,CannotMetronome
|
||||
Description = Hits three times in a row with mastery of the Water style. This attack always deals critical hits.
|
||||
#-------------------------------
|
||||
[WATERSHURIKEN]
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -82,9 +82,9 @@ Weight = 3.8
|
||||
Color = Black
|
||||
Pokedex = With its incisors, it gnaws through doors and infiltrates people's homes. Then, with a twitch of its whiskers, it steals whatever food it finds.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
WildItemUncommon = PECHABERRY
|
||||
Evolutions = RATICATE,LevelNight,20
|
||||
Evolution = RATICATE,LevelNight,20
|
||||
#-------------------------------
|
||||
[RATICATE,1]
|
||||
FormName = Alolan
|
||||
@@ -97,7 +97,7 @@ Weight = 25.5
|
||||
Color = Black
|
||||
Pokedex = It forms a group of Rattata, which it assumes command of. Each group has its own territory, and disputes over food happen often.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
WildItemUncommon = PECHABERRY
|
||||
#-------------------------------
|
||||
[RAICHU,1]
|
||||
@@ -128,8 +128,8 @@ Weight = 40.0
|
||||
Color = White
|
||||
Pokedex = The skin on its back is as hard as steel. Predators go after its soft belly, so it clings to the ground desperately.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Evolutions = SANDSLASH,Item,ICESTONE
|
||||
Flags = InheritFormWithEverstone
|
||||
Evolution = SANDSLASH,Item,ICESTONE
|
||||
#-------------------------------
|
||||
[SANDSLASH,1]
|
||||
FormName = Alolan
|
||||
@@ -144,7 +144,7 @@ Weight = 55.0
|
||||
Color = Blue
|
||||
Pokedex = It runs across snow-covered plains at high speeds. It developed thick, sharp claws to plow through the snow.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[VULPIX,1]
|
||||
FormName = Alolan
|
||||
@@ -157,9 +157,9 @@ EggMoves = AGILITY,CHARM,DISABLE,ENCORE,EXTRASENSORY,FLAIL,FREEZEDRY,HOWL,HYPNOS
|
||||
Color = White
|
||||
Pokedex = In hot weather, this Pokémon makes ice shards with its six tails and sprays them around to cool itself off.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
WildItemUncommon = SNOWBALL
|
||||
Evolutions = NINETALES,Item,ICESTONE
|
||||
Evolution = NINETALES,Item,ICESTONE
|
||||
#-------------------------------
|
||||
[NINETALES,1]
|
||||
FormName = Alolan
|
||||
@@ -173,7 +173,7 @@ TutorMoves = AGILITY,AQUATAIL,ATTRACT,AURORAVEIL,AVALANCHE,BLIZZARD,BODYSLAM,CAL
|
||||
Color = Blue
|
||||
Pokedex = It lives on mountains perpetually covered in snow and is revered as a deity incarnate. It appears draped in a blizzard.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
WildItemUncommon = SNOWBALL
|
||||
#-------------------------------
|
||||
[DIGLETT,1]
|
||||
@@ -187,7 +187,7 @@ EggMoves = ANCIENTPOWER,BEATUP,ENDURE,FEINTATTACK,FINALGAMBIT,HEADBUTT,MEMENTO,M
|
||||
Weight = 1.0
|
||||
Pokedex = Its head sports an altered form of whiskers made of metal. When in communication with its comrades, its whiskers wobble to and fro.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[DUGTRIO,1]
|
||||
FormName = Alolan
|
||||
@@ -200,7 +200,7 @@ TutorMoves = AERIALACE,AGILITY,ALLYSWITCH,ASSURANCE,ATTRACT,BEATUP,BODYSLAM,BULL
|
||||
Weight = 66.6
|
||||
Pokedex = Its shining gold hair provides it with protection. It's reputed that keeping any of its fallen hairs will bring bad luck.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[MEOWTH,1]
|
||||
FormName = Alolan
|
||||
@@ -213,8 +213,8 @@ EggMoves = AMNESIA,ASSIST,CHARM,COVET,FLAIL,FLATTER,FOULPLAY,HYPNOSIS,PARTINGSHO
|
||||
Color = Blue
|
||||
Pokedex = It's impulsive, selfish, and fickle. It's very popular with some Trainers who like giving it the attention it needs.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Evolutions = PERSIAN,Happiness,
|
||||
Flags = InheritFormWithEverstone
|
||||
Evolution = PERSIAN,Happiness
|
||||
#-------------------------------
|
||||
[MEOWTH,2]
|
||||
FormName = Galarian
|
||||
@@ -229,8 +229,8 @@ Color = Brown
|
||||
Shape = BipedalTail
|
||||
Pokedex = Living with a savage, seafaring people has toughened this Pokémon's body so much that parts of it have turned to iron.
|
||||
Generation = 8
|
||||
Flags = InheritFormWithEverStone
|
||||
Evolutions = PERRSERKER,Level,28
|
||||
Flags = InheritFormWithEverstone
|
||||
Evolution = PERRSERKER,Level,28
|
||||
#-------------------------------
|
||||
[PERSIAN,1]
|
||||
FormName = Alolan
|
||||
@@ -245,7 +245,7 @@ Weight = 33.0
|
||||
Color = Blue
|
||||
Pokedex = Its round face is a symbol of wealth. Persian that have bigger, plumper faces are considered more beautiful.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[ALAKAZAM,1]
|
||||
FormName = Mega Alakazam
|
||||
@@ -270,7 +270,7 @@ Weight = 20.3
|
||||
Color = Gray
|
||||
Pokedex = Geodude compete against each other with headbutts. The iron sand on their heads will stick to whichever one has stronger magnetism.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
WildItemUncommon = CELLBATTERY
|
||||
#-------------------------------
|
||||
[GRAVELER,1]
|
||||
@@ -284,7 +284,7 @@ Weight = 110.0
|
||||
Color = Gray
|
||||
Pokedex = They eat rocks and often get into a scrap over them. The shock of Graveler smashing together causes a flash of light and a booming noise.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
WildItemUncommon = CELLBATTERY
|
||||
#-------------------------------
|
||||
[GOLEM,1]
|
||||
@@ -299,7 +299,7 @@ Weight = 316.0
|
||||
Color = Gray
|
||||
Pokedex = It fires rocks charged with electricity. Even if the rock isn't fired that accurately, just grazing an opponent will cause numbness and fainting.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
WildItemCommon = CELLBATTERY
|
||||
#-------------------------------
|
||||
[PONYTA,1]
|
||||
@@ -315,7 +315,7 @@ Color = White
|
||||
Category = Unique Horn
|
||||
Pokedex = Its small horn hides a healing power. With a few rubs from this Pokémon's horn, any slight wound you have will be healed.
|
||||
Generation = 8
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[RAPIDASH,1]
|
||||
FormName = Galarian
|
||||
@@ -329,7 +329,7 @@ Color = White
|
||||
Category = Unique Horn
|
||||
Pokedex = Little can stand up to its psycho cut. Unleashed from this Pokémon's horn, the move will punch a hole right through a thick metal sheet.
|
||||
Generation = 8
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[SLOWPOKE,1]
|
||||
FormName = Galarian
|
||||
@@ -339,8 +339,9 @@ Moves = 1,TACKLE,1,CURSE,3,GROWL,6,ACID,9,YAWN,12,CONFUSION,15,DISABLE,18,WATERP
|
||||
TutorMoves = AMNESIA,ATTRACT,BLIZZARD,BODYSLAM,BRINE,BULLDOZE,CALMMIND,CAPTIVATE,CONFIDE,DIG,DIVE,DOUBLEEDGE,DOUBLETEAM,EARTHQUAKE,ENDURE,EXPANDINGFORCE,FACADE,FIREBLAST,FLAMETHROWER,FOULPLAY,FRUSTRATION,FUTURESIGHT,GRASSKNOT,HAIL,HIDDENPOWER,HYDROPUMP,ICEBEAM,ICYWIND,IMPRISON,IRONTAIL,LIGHTSCREEN,LIQUIDATION,MIMIC,MUDSHOT,NATURALGIFT,PAYDAY,PROTECT,PSYCHIC,PSYCHICTERRAIN,PSYSHOCK,RAINDANCE,REST,RETURN,ROUND,SAFEGUARD,SCALD,SECRETPOWER,SHADOWBALL,SKILLSWAP,SLEEPTALK,SNORE,STOREDPOWER,SUBSTITUTE,SUNNYDAY,SURF,SWAGGER,SWIFT,THUNDERWAVE,TRIATTACK,TRICK,TRICKROOM,WEATHERBALL,WHIRLPOOL,WONDERROOM,ZENHEADBUTT
|
||||
Pokedex = Although this Pokémon is normally zoned out, its expression abruptly sharpens on occasion. The cause for this seems to lie in Slowpoke's diet.
|
||||
Generation = 8
|
||||
Flags = InheritFormWithEverStone
|
||||
Evolutions = SLOWBRO,Item,GALARICACUFF,SLOWKING,Item,GALARICAWREATH
|
||||
Flags = InheritFormWithEverstone
|
||||
Evolution = SLOWBRO,Item,GALARICACUFF
|
||||
Evolution = SLOWKING,Item,GALARICAWREATH
|
||||
#-------------------------------
|
||||
[SLOWBRO,1]
|
||||
FormName = Galarian
|
||||
@@ -352,7 +353,7 @@ TutorMoves = AMNESIA,ATTRACT,AVALANCHE,BLIZZARD,BODYSLAM,BRICKBREAK,BRINE,BRUTAL
|
||||
Weight = 70.5
|
||||
Pokedex = If this Pokémon squeezes the tongue of the Shellder biting it, the Shellder will launch a toxic liquid from the tip of its shell.
|
||||
Generation = 8
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[SLOWBRO,2]
|
||||
FormName = Mega Slowbro
|
||||
@@ -379,9 +380,9 @@ EggMoves = COUNTER,COVET,CURSE,DOUBLEEDGE,FEINT,FLAIL,NIGHTSLASH,QUICKATTACK,QUI
|
||||
Weight = 42.0
|
||||
Pokedex = The stalks of leeks are thicker and longer in the Galar region. Farfetch'd that adapted to these stalks took on a unique form.
|
||||
Generation = 8
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
WildItemCommon = LEEK
|
||||
Evolutions = SIRFETCHD,BattleDealCriticalHit,3
|
||||
Evolution = SIRFETCHD,BattleDealCriticalHit,3
|
||||
#-------------------------------
|
||||
[GRIMER,1]
|
||||
FormName = Alolan
|
||||
@@ -396,7 +397,7 @@ Weight = 42.0
|
||||
Color = Green
|
||||
Pokedex = A Grimer, which had been brought in to solve a problem with garbage, developed over time into this form.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[MUK,1]
|
||||
FormName = Alolan
|
||||
@@ -410,7 +411,7 @@ Weight = 52.0
|
||||
Color = Green
|
||||
Pokedex = The garbage it eats causes continuous chemical changes in its body, which produce its exceedingly vivid coloration.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[GENGAR,1]
|
||||
FormName = Mega Gengar
|
||||
@@ -437,7 +438,7 @@ Generation = 7
|
||||
#-------------------------------
|
||||
[CUBONE,1]
|
||||
Generation = 7
|
||||
Evolutions = MAROWAK,LevelNight,28
|
||||
Evolution = MAROWAK,LevelNight,28
|
||||
#-------------------------------
|
||||
[MAROWAK,1]
|
||||
FormName = Alolan
|
||||
@@ -490,8 +491,8 @@ Color = White
|
||||
Category = Dancing
|
||||
Pokedex = Its talent is tap-dancing. It can also manipulate temperatures to create a floor of ice, which this Pokémon can kick up to use as a barrier.
|
||||
Generation = 8
|
||||
Flags = InheritFormWithEverStone
|
||||
Evolutions = MRRIME,Level,42
|
||||
Flags = InheritFormWithEverstone
|
||||
Evolution = MRRIME,Level,42
|
||||
#-------------------------------
|
||||
[PINSIR,1]
|
||||
FormName = Mega Pinsir
|
||||
@@ -603,7 +604,7 @@ Generation = 6
|
||||
[PICHU,2]
|
||||
FormName = Spiky-Eared
|
||||
Generation = 4
|
||||
Evolutions = PIKACHU,None,
|
||||
Evolution = PIKACHU,None
|
||||
#-------------------------------
|
||||
[AMPHAROS,1]
|
||||
FormName = Mega Ampharos
|
||||
@@ -627,7 +628,7 @@ Height = 1.8
|
||||
Category = Hexpert
|
||||
Pokedex = While chanting strange spells, this Pokémon combines its internal toxins with what it's eaten, creating strange potions.
|
||||
Generation = 8
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[UNOWN,1]
|
||||
FormName = B
|
||||
@@ -760,8 +761,8 @@ Weight = 0.5
|
||||
Color = White
|
||||
Pokedex = Sudden climate change wiped out this ancient kind of Corsola. This Pokémon absorbs others' life-force through its branches.
|
||||
Generation = 8
|
||||
Flags = InheritFormWithEverStone
|
||||
Evolutions = CURSOLA,Level,38
|
||||
Flags = InheritFormWithEverstone
|
||||
Evolution = CURSOLA,Level,38
|
||||
#-------------------------------
|
||||
[HOUNDOOM,1]
|
||||
FormName = Mega Houndoom
|
||||
@@ -826,7 +827,7 @@ EggMoves = KNOCKOFF,PARTINGSHOT,QUICKGUARD
|
||||
Color = White
|
||||
Pokedex = Its restlessness has it constantly running around. If it sees another Pokémon, it will purposely run into them in order to start a fight.
|
||||
Generation = 8
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[LINOONE,1]
|
||||
FormName = Galarian
|
||||
@@ -835,8 +836,8 @@ Moves = 0,NIGHTSLASH,1,SWITCHEROO,1,PINMISSILE,1,BABYDOLLEYES,1,TACKLE,1,LEER,1,
|
||||
TutorMoves = ASSURANCE,ATTRACT,BLIZZARD,BODYPRESS,BODYSLAM,CAPTIVATE,CONFIDE,DIG,DOUBLEEDGE,DOUBLETEAM,ENDURE,FACADE,FAKETEARS,FLING,FRUSTRATION,GIGAIMPACT,GRASSKNOT,GUNKSHOT,HELPINGHAND,HIDDENPOWER,HYPERBEAM,HYPERVOICE,ICEBEAM,ICYWIND,IRONTAIL,LASHOUT,MIMIC,MUDSHOT,NATURALGIFT,PAYBACK,PINMISSILE,PROTECT,RAINDANCE,REST,RETALIATE,RETURN,ROUND,SCARYFACE,SCREECH,SECRETPOWER,SEEDBOMB,SHADOWBALL,SHADOWCLAW,SLEEPTALK,SNARL,SNORE,STOMPINGTANTRUM,SUBSTITUTE,SUNNYDAY,SURF,SWAGGER,SWIFT,TAUNT,THIEF,THROATCHOP,THUNDER,THUNDERBOLT,THUNDERWAVE,TRICK,WHIRLPOOL,WORKUP
|
||||
Pokedex = It uses its long tongue to taunt opponents. Once the opposition is enraged, this Pokémon hurls itself at the opponent, tackling them forcefully.
|
||||
Generation = 8
|
||||
Flags = InheritFormWithEverStone
|
||||
Evolutions = OBSTAGOON,LevelNight,35
|
||||
Flags = InheritFormWithEverstone
|
||||
Evolution = OBSTAGOON,LevelNight,35
|
||||
#-------------------------------
|
||||
[GARDEVOIR,1]
|
||||
FormName = Mega Gardevoir
|
||||
@@ -1339,8 +1340,8 @@ Weight = 40.0
|
||||
Color = White
|
||||
Pokedex = The colder they get, the more energetic they are. They freeze their breath to make snowballs, using them as ammo for playful snowball fights.
|
||||
Generation = 8
|
||||
Flags = InheritFormWithEverStone
|
||||
Evolutions = DARMANITAN,Item,ICESTONE
|
||||
Flags = InheritFormWithEverstone
|
||||
Evolution = DARMANITAN,Item,ICESTONE
|
||||
#-------------------------------
|
||||
[DARMANITAN,1]
|
||||
FormName = Zen Mode
|
||||
@@ -1363,7 +1364,7 @@ Color = White
|
||||
Category = Zen Charm
|
||||
Pokedex = On days when blizzards blow through, it comes down to where people live. It stashes food in the snowball on its head, taking it home for later.
|
||||
Generation = 8
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[DARMANITAN,3]
|
||||
FormName = Galarian Zen Mode
|
||||
@@ -1390,8 +1391,8 @@ Moves = 1,ASTONISH,1,PROTECT,4,HAZE,8,NIGHTSHADE,12,DISABLE,16,BRUTALSWING,20,CR
|
||||
TutorMoves = ALLYSWITCH,ATTRACT,BRUTALSWING,CALMMIND,CAPTIVATE,CONFIDE,DARKPULSE,DOUBLEEDGE,DOUBLETEAM,EARTHPOWER,EARTHQUAKE,ENDURE,ENERGYBALL,FACADE,FAKETEARS,FRUSTRATION,HEX,HIDDENPOWER,IMPRISON,IRONDEFENSE,MIMIC,NASTYPLOT,NATURALGIFT,PAYBACK,POLTERGEIST,PROTECT,PSYCHIC,RAINDANCE,REST,RETURN,ROCKSLIDE,ROCKTOMB,ROUND,SAFEGUARD,SANDSTORM,SECRETPOWER,SHADOWBALL,SKILLSWAP,SLEEPTALK,SNORE,SUBSTITUTE,SWAGGER,THIEF,TOXIC,TOXICSPIKES,TRICK,TRICKROOM,WILLOWISP,WONDERROOM,ZENHEADBUTT
|
||||
Pokedex = A clay slab with cursed engravings took possession of a Yamask. The slab is said to be absorbing the Yamask's dark power.
|
||||
Generation = 8
|
||||
Flags = InheritFormWithEverStone
|
||||
Evolutions = RUNERIGUS,EventAfterDamageTaken,2
|
||||
Flags = InheritFormWithEverstone
|
||||
Evolution = RUNERIGUS,EventAfterDamageTaken,2
|
||||
#-------------------------------
|
||||
[DEERLING,1]
|
||||
FormName = Summer Form
|
||||
@@ -1427,7 +1428,7 @@ Weight = 20.5
|
||||
Color = Green
|
||||
Pokedex = Its conspicuous lips lure prey in as it lies in wait in the mud. When prey gets close, Stunfisk clamps its jagged steel fins down on them.
|
||||
Generation = 8
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[TORNADUS,1]
|
||||
FormName = Therian Forme
|
||||
@@ -1617,7 +1618,7 @@ BaseExp = 243
|
||||
Moves = 1,TACKLE,1,VINEWHIP,1,FAIRYWIND,6,FAIRYWIND,10,LUCKYCHANT,15,RAZORLEAF,20,WISH,25,MAGICALLEAF,27,GRASSYTERRAIN,33,PETALBLIZZARD,38,AROMATHERAPY,43,MISTYTERRAIN,46,MOONBLAST,50,LIGHTOFRUIN,51,PETALDANCE,58,SOLARBEAM
|
||||
EggGroups = Undiscovered
|
||||
Pokedex = The flower it's holding can no longer be found blooming anywhere. It's also thought to contain terrifying power.
|
||||
Evolutions = FLORGES,None,
|
||||
Evolution = FLORGES,None
|
||||
#-------------------------------
|
||||
[FLORGES,1]
|
||||
FormName = Yellow Flower
|
||||
@@ -1803,7 +1804,7 @@ Pokedex = It summons the dead with its dreamy dancing. From their malice, it dra
|
||||
Abilities = OWNTEMPO
|
||||
HiddenAbilities = OWNTEMPO
|
||||
Flags = InheritFormFromMother
|
||||
Evolutions = LYCANROC,LevelEvening,25
|
||||
Evolution = LYCANROC,LevelEvening,25
|
||||
#-------------------------------
|
||||
[LYCANROC,1]
|
||||
FormName = Midnight Form
|
||||
@@ -2049,7 +2050,7 @@ Pokedex = Capable of generating 15,000 volts of electricity, this Pokémon looks
|
||||
[SINISTEA,1]
|
||||
FormName = Antique Form
|
||||
Pokedex = The swirl pattern in this Pokémon's body is its weakness. If it gets stirred, the swirl loses its shape, and Sinistea gets dizzy.
|
||||
Evolutions = POLTEAGEIST,Item,CHIPPEDPOT
|
||||
Evolution = POLTEAGEIST,Item,CHIPPEDPOT
|
||||
#-------------------------------
|
||||
[POLTEAGEIST,1]
|
||||
FormName = Antique Form
|
||||
|
||||
@@ -523,7 +523,7 @@ Name = Big Nugget
|
||||
NamePlural = Big Nuggets
|
||||
Pocket = 1
|
||||
Price = 40000
|
||||
Flags = Fling_30
|
||||
Flags = Fling_130
|
||||
Description = A big nugget of pure gold that gives off a lustrous gleam. A maniac will buy it for a high price.
|
||||
#-------------------------------
|
||||
[HEARTSCALE]
|
||||
|
||||
@@ -479,7 +479,7 @@ Accuracy = 100
|
||||
TotalPP = 5
|
||||
Target = NearOther
|
||||
FunctionCode = AlwaysCriticalHit
|
||||
Flags = Contact,CanProtect,CanMirrorMove,CannotMetronome
|
||||
Flags = Contact,CanProtect,CanMirrorMove,Punching,CannotMetronome
|
||||
Description = Strikes with a fierce blow through mastery of the Dark style. Always results in a critical hit.
|
||||
#-------------------------------
|
||||
[LASHOUT]
|
||||
@@ -8633,7 +8633,7 @@ Accuracy = 100
|
||||
TotalPP = 5
|
||||
Target = NearOther
|
||||
FunctionCode = HitThreeTimesAlwaysCriticalHit
|
||||
Flags = Contact,CanProtect,CanMirrorMove,CannotMetronome
|
||||
Flags = Contact,CanProtect,CanMirrorMove,Punching,CannotMetronome
|
||||
Description = Hits three times in a row with mastery of the Water style. This attack always deals critical hits.
|
||||
#-------------------------------
|
||||
[WATERSHURIKEN]
|
||||
|
||||
850
PBS/pokemon.txt
850
PBS/pokemon.txt
File diff suppressed because it is too large
Load Diff
@@ -82,9 +82,9 @@ Weight = 3.8
|
||||
Color = Black
|
||||
Pokedex = With its incisors, it gnaws through doors and infiltrates people's homes. Then, with a twitch of its whiskers, it steals whatever food it finds.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
WildItemUncommon = PECHABERRY
|
||||
Evolutions = RATICATE,LevelNight,20
|
||||
Evolution = RATICATE,LevelNight,20
|
||||
#-------------------------------
|
||||
[RATICATE,1]
|
||||
FormName = Alolan
|
||||
@@ -97,7 +97,7 @@ Weight = 25.5
|
||||
Color = Black
|
||||
Pokedex = It forms a group of Rattata, which it assumes command of. Each group has its own territory, and disputes over food happen often.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
WildItemUncommon = PECHABERRY
|
||||
#-------------------------------
|
||||
[RAICHU,1]
|
||||
@@ -128,8 +128,8 @@ Weight = 40.0
|
||||
Color = White
|
||||
Pokedex = The skin on its back is as hard as steel. Predators go after its soft belly, so it clings to the ground desperately.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Evolutions = SANDSLASH,Item,ICESTONE
|
||||
Flags = InheritFormWithEverstone
|
||||
Evolution = SANDSLASH,Item,ICESTONE
|
||||
#-------------------------------
|
||||
[SANDSLASH,1]
|
||||
FormName = Alolan
|
||||
@@ -144,7 +144,7 @@ Weight = 55.0
|
||||
Color = Blue
|
||||
Pokedex = It runs across snow-covered plains at high speeds. It developed thick, sharp claws to plow through the snow.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[VULPIX,1]
|
||||
FormName = Alolan
|
||||
@@ -157,9 +157,9 @@ EggMoves = AGILITY,CHARM,DISABLE,ENCORE,EXTRASENSORY,FLAIL,FREEZEDRY,HOWL,HYPNOS
|
||||
Color = White
|
||||
Pokedex = In hot weather, this Pokémon makes ice shards with its six tails and sprays them around to cool itself off.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
WildItemUncommon = SNOWBALL
|
||||
Evolutions = NINETALES,Item,ICESTONE
|
||||
Evolution = NINETALES,Item,ICESTONE
|
||||
#-------------------------------
|
||||
[NINETALES,1]
|
||||
FormName = Alolan
|
||||
@@ -173,7 +173,7 @@ TutorMoves = AGILITY,AQUATAIL,ATTRACT,AURORAVEIL,AVALANCHE,BLIZZARD,BODYSLAM,CAL
|
||||
Color = Blue
|
||||
Pokedex = It lives on mountains perpetually covered in snow and is revered as a deity incarnate. It appears draped in a blizzard.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
WildItemUncommon = SNOWBALL
|
||||
#-------------------------------
|
||||
[DIGLETT,1]
|
||||
@@ -187,7 +187,7 @@ EggMoves = ANCIENTPOWER,BEATUP,ENDURE,FEINTATTACK,FINALGAMBIT,HEADBUTT,MEMENTO,M
|
||||
Weight = 1.0
|
||||
Pokedex = Its head sports an altered form of whiskers made of metal. When in communication with its comrades, its whiskers wobble to and fro.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[DUGTRIO,1]
|
||||
FormName = Alolan
|
||||
@@ -200,7 +200,7 @@ TutorMoves = AERIALACE,AGILITY,ALLYSWITCH,ASSURANCE,ATTRACT,BEATUP,BODYSLAM,BULL
|
||||
Weight = 66.6
|
||||
Pokedex = Its shining gold hair provides it with protection. It's reputed that keeping any of its fallen hairs will bring bad luck.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[MEOWTH,1]
|
||||
FormName = Alolan
|
||||
@@ -213,8 +213,8 @@ EggMoves = AMNESIA,ASSIST,CHARM,COVET,FLAIL,FLATTER,FOULPLAY,HYPNOSIS,PARTINGSHO
|
||||
Color = Blue
|
||||
Pokedex = It's impulsive, selfish, and fickle. It's very popular with some Trainers who like giving it the attention it needs.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Evolutions = PERSIAN,Happiness,
|
||||
Flags = InheritFormWithEverstone
|
||||
Evolution = PERSIAN,Happiness
|
||||
#-------------------------------
|
||||
[MEOWTH,2]
|
||||
FormName = Galarian
|
||||
@@ -229,8 +229,8 @@ Color = Brown
|
||||
Shape = BipedalTail
|
||||
Pokedex = Living with a savage, seafaring people has toughened this Pokémon's body so much that parts of it have turned to iron.
|
||||
Generation = 8
|
||||
Flags = InheritFormWithEverStone
|
||||
Evolutions = PERRSERKER,Level,28
|
||||
Flags = InheritFormWithEverstone
|
||||
Evolution = PERRSERKER,Level,28
|
||||
#-------------------------------
|
||||
[PERSIAN,1]
|
||||
FormName = Alolan
|
||||
@@ -245,7 +245,7 @@ Weight = 33.0
|
||||
Color = Blue
|
||||
Pokedex = Its round face is a symbol of wealth. Persian that have bigger, plumper faces are considered more beautiful.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[ALAKAZAM,1]
|
||||
FormName = Mega Alakazam
|
||||
@@ -270,7 +270,7 @@ Weight = 20.3
|
||||
Color = Gray
|
||||
Pokedex = Geodude compete against each other with headbutts. The iron sand on their heads will stick to whichever one has stronger magnetism.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
WildItemUncommon = CELLBATTERY
|
||||
#-------------------------------
|
||||
[GRAVELER,1]
|
||||
@@ -284,7 +284,7 @@ Weight = 110.0
|
||||
Color = Gray
|
||||
Pokedex = They eat rocks and often get into a scrap over them. The shock of Graveler smashing together causes a flash of light and a booming noise.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
WildItemUncommon = CELLBATTERY
|
||||
#-------------------------------
|
||||
[GOLEM,1]
|
||||
@@ -299,7 +299,7 @@ Weight = 316.0
|
||||
Color = Gray
|
||||
Pokedex = It fires rocks charged with electricity. Even if the rock isn't fired that accurately, just grazing an opponent will cause numbness and fainting.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
WildItemCommon = CELLBATTERY
|
||||
#-------------------------------
|
||||
[PONYTA,1]
|
||||
@@ -315,7 +315,7 @@ Color = White
|
||||
Category = Unique Horn
|
||||
Pokedex = Its small horn hides a healing power. With a few rubs from this Pokémon's horn, any slight wound you have will be healed.
|
||||
Generation = 8
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[RAPIDASH,1]
|
||||
FormName = Galarian
|
||||
@@ -329,7 +329,7 @@ Color = White
|
||||
Category = Unique Horn
|
||||
Pokedex = Little can stand up to its psycho cut. Unleashed from this Pokémon's horn, the move will punch a hole right through a thick metal sheet.
|
||||
Generation = 8
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[SLOWPOKE,1]
|
||||
FormName = Galarian
|
||||
@@ -339,8 +339,9 @@ Moves = 1,TACKLE,1,CURSE,3,GROWL,6,ACID,9,YAWN,12,CONFUSION,15,DISABLE,18,WATERP
|
||||
TutorMoves = AMNESIA,ATTRACT,BLIZZARD,BODYSLAM,BRINE,BULLDOZE,CALMMIND,CAPTIVATE,CONFIDE,DIG,DIVE,DOUBLEEDGE,DOUBLETEAM,EARTHQUAKE,ENDURE,EXPANDINGFORCE,FACADE,FIREBLAST,FLAMETHROWER,FOULPLAY,FRUSTRATION,FUTURESIGHT,GRASSKNOT,HAIL,HIDDENPOWER,HYDROPUMP,ICEBEAM,ICYWIND,IMPRISON,IRONTAIL,LIGHTSCREEN,LIQUIDATION,MIMIC,MUDSHOT,NATURALGIFT,PAYDAY,PROTECT,PSYCHIC,PSYCHICTERRAIN,PSYSHOCK,RAINDANCE,REST,RETURN,ROUND,SAFEGUARD,SCALD,SECRETPOWER,SHADOWBALL,SKILLSWAP,SLEEPTALK,SNORE,STOREDPOWER,SUBSTITUTE,SUNNYDAY,SURF,SWAGGER,SWIFT,THUNDERWAVE,TRIATTACK,TRICK,TRICKROOM,WEATHERBALL,WHIRLPOOL,WONDERROOM,ZENHEADBUTT
|
||||
Pokedex = Although this Pokémon is normally zoned out, its expression abruptly sharpens on occasion. The cause for this seems to lie in Slowpoke's diet.
|
||||
Generation = 8
|
||||
Flags = InheritFormWithEverStone
|
||||
Evolutions = SLOWBRO,Item,GALARICACUFF,SLOWKING,Item,GALARICAWREATH
|
||||
Flags = InheritFormWithEverstone
|
||||
Evolution = SLOWBRO,Item,GALARICACUFF
|
||||
Evolution = SLOWKING,Item,GALARICAWREATH
|
||||
#-------------------------------
|
||||
[SLOWBRO,1]
|
||||
FormName = Galarian
|
||||
@@ -352,7 +353,7 @@ TutorMoves = AMNESIA,ATTRACT,AVALANCHE,BLIZZARD,BODYSLAM,BRICKBREAK,BRINE,BRUTAL
|
||||
Weight = 70.5
|
||||
Pokedex = If this Pokémon squeezes the tongue of the Shellder biting it, the Shellder will launch a toxic liquid from the tip of its shell.
|
||||
Generation = 8
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[SLOWBRO,2]
|
||||
FormName = Mega Slowbro
|
||||
@@ -379,9 +380,9 @@ EggMoves = COUNTER,COVET,CURSE,DOUBLEEDGE,FEINT,FLAIL,NIGHTSLASH,QUICKATTACK,QUI
|
||||
Weight = 42.0
|
||||
Pokedex = The stalks of leeks are thicker and longer in the Galar region. Farfetch'd that adapted to these stalks took on a unique form.
|
||||
Generation = 8
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
WildItemCommon = LEEK
|
||||
Evolutions = SIRFETCHD,BattleDealCriticalHit,3
|
||||
Evolution = SIRFETCHD,BattleDealCriticalHit,3
|
||||
#-------------------------------
|
||||
[GRIMER,1]
|
||||
FormName = Alolan
|
||||
@@ -396,7 +397,7 @@ Weight = 42.0
|
||||
Color = Green
|
||||
Pokedex = A Grimer, which had been brought in to solve a problem with garbage, developed over time into this form.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[MUK,1]
|
||||
FormName = Alolan
|
||||
@@ -410,7 +411,7 @@ Weight = 52.0
|
||||
Color = Green
|
||||
Pokedex = The garbage it eats causes continuous chemical changes in its body, which produce its exceedingly vivid coloration.
|
||||
Generation = 7
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[GENGAR,1]
|
||||
FormName = Mega Gengar
|
||||
@@ -437,7 +438,7 @@ Generation = 7
|
||||
#-------------------------------
|
||||
[CUBONE,1]
|
||||
Generation = 7
|
||||
Evolutions = MAROWAK,LevelNight,28
|
||||
Evolution = MAROWAK,LevelNight,28
|
||||
#-------------------------------
|
||||
[MAROWAK,1]
|
||||
FormName = Alolan
|
||||
@@ -490,8 +491,8 @@ Color = White
|
||||
Category = Dancing
|
||||
Pokedex = Its talent is tap-dancing. It can also manipulate temperatures to create a floor of ice, which this Pokémon can kick up to use as a barrier.
|
||||
Generation = 8
|
||||
Flags = InheritFormWithEverStone
|
||||
Evolutions = MRRIME,Level,42
|
||||
Flags = InheritFormWithEverstone
|
||||
Evolution = MRRIME,Level,42
|
||||
#-------------------------------
|
||||
[PINSIR,1]
|
||||
FormName = Mega Pinsir
|
||||
@@ -603,7 +604,7 @@ Generation = 6
|
||||
[PICHU,2]
|
||||
FormName = Spiky-Eared
|
||||
Generation = 4
|
||||
Evolutions = PIKACHU,None,
|
||||
Evolution = PIKACHU,None
|
||||
#-------------------------------
|
||||
[AMPHAROS,1]
|
||||
FormName = Mega Ampharos
|
||||
@@ -627,7 +628,7 @@ Height = 1.8
|
||||
Category = Hexpert
|
||||
Pokedex = While chanting strange spells, this Pokémon combines its internal toxins with what it's eaten, creating strange potions.
|
||||
Generation = 8
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[UNOWN,1]
|
||||
FormName = B
|
||||
@@ -760,8 +761,8 @@ Weight = 0.5
|
||||
Color = White
|
||||
Pokedex = Sudden climate change wiped out this ancient kind of Corsola. This Pokémon absorbs others' life-force through its branches.
|
||||
Generation = 8
|
||||
Flags = InheritFormWithEverStone
|
||||
Evolutions = CURSOLA,Level,38
|
||||
Flags = InheritFormWithEverstone
|
||||
Evolution = CURSOLA,Level,38
|
||||
#-------------------------------
|
||||
[HOUNDOOM,1]
|
||||
FormName = Mega Houndoom
|
||||
@@ -826,7 +827,7 @@ EggMoves = KNOCKOFF,PARTINGSHOT,QUICKGUARD
|
||||
Color = White
|
||||
Pokedex = Its restlessness has it constantly running around. If it sees another Pokémon, it will purposely run into them in order to start a fight.
|
||||
Generation = 8
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[LINOONE,1]
|
||||
FormName = Galarian
|
||||
@@ -835,8 +836,8 @@ Moves = 0,NIGHTSLASH,1,SWITCHEROO,1,PINMISSILE,1,BABYDOLLEYES,1,TACKLE,1,LEER,1,
|
||||
TutorMoves = ASSURANCE,ATTRACT,BLIZZARD,BODYPRESS,BODYSLAM,CAPTIVATE,CONFIDE,DIG,DOUBLEEDGE,DOUBLETEAM,ENDURE,FACADE,FAKETEARS,FLING,FRUSTRATION,GIGAIMPACT,GRASSKNOT,GUNKSHOT,HELPINGHAND,HIDDENPOWER,HYPERBEAM,HYPERVOICE,ICEBEAM,ICYWIND,IRONTAIL,LASHOUT,MIMIC,MUDSHOT,NATURALGIFT,PAYBACK,PINMISSILE,PROTECT,RAINDANCE,REST,RETALIATE,RETURN,ROUND,SCARYFACE,SCREECH,SECRETPOWER,SEEDBOMB,SHADOWBALL,SHADOWCLAW,SLEEPTALK,SNARL,SNORE,STOMPINGTANTRUM,SUBSTITUTE,SUNNYDAY,SURF,SWAGGER,SWIFT,TAUNT,THIEF,THROATCHOP,THUNDER,THUNDERBOLT,THUNDERWAVE,TRICK,WHIRLPOOL,WORKUP
|
||||
Pokedex = It uses its long tongue to taunt opponents. Once the opposition is enraged, this Pokémon hurls itself at the opponent, tackling them forcefully.
|
||||
Generation = 8
|
||||
Flags = InheritFormWithEverStone
|
||||
Evolutions = OBSTAGOON,LevelNight,35
|
||||
Flags = InheritFormWithEverstone
|
||||
Evolution = OBSTAGOON,LevelNight,35
|
||||
#-------------------------------
|
||||
[GARDEVOIR,1]
|
||||
FormName = Mega Gardevoir
|
||||
@@ -1339,8 +1340,8 @@ Weight = 40.0
|
||||
Color = White
|
||||
Pokedex = The colder they get, the more energetic they are. They freeze their breath to make snowballs, using them as ammo for playful snowball fights.
|
||||
Generation = 8
|
||||
Flags = InheritFormWithEverStone
|
||||
Evolutions = DARMANITAN,Item,ICESTONE
|
||||
Flags = InheritFormWithEverstone
|
||||
Evolution = DARMANITAN,Item,ICESTONE
|
||||
#-------------------------------
|
||||
[DARMANITAN,1]
|
||||
FormName = Zen Mode
|
||||
@@ -1363,7 +1364,7 @@ Color = White
|
||||
Category = Zen Charm
|
||||
Pokedex = On days when blizzards blow through, it comes down to where people live. It stashes food in the snowball on its head, taking it home for later.
|
||||
Generation = 8
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[DARMANITAN,3]
|
||||
FormName = Galarian Zen Mode
|
||||
@@ -1390,8 +1391,8 @@ Moves = 1,ASTONISH,1,PROTECT,4,HAZE,8,NIGHTSHADE,12,DISABLE,16,BRUTALSWING,20,CR
|
||||
TutorMoves = ALLYSWITCH,ATTRACT,BRUTALSWING,CALMMIND,CAPTIVATE,CONFIDE,DARKPULSE,DOUBLEEDGE,DOUBLETEAM,EARTHPOWER,EARTHQUAKE,ENDURE,ENERGYBALL,FACADE,FAKETEARS,FRUSTRATION,HEX,HIDDENPOWER,IMPRISON,IRONDEFENSE,MIMIC,NASTYPLOT,NATURALGIFT,PAYBACK,POLTERGEIST,PROTECT,PSYCHIC,RAINDANCE,REST,RETURN,ROCKSLIDE,ROCKTOMB,ROUND,SAFEGUARD,SANDSTORM,SECRETPOWER,SHADOWBALL,SKILLSWAP,SLEEPTALK,SNORE,SUBSTITUTE,SWAGGER,THIEF,TOXIC,TOXICSPIKES,TRICK,TRICKROOM,WILLOWISP,WONDERROOM,ZENHEADBUTT
|
||||
Pokedex = A clay slab with cursed engravings took possession of a Yamask. The slab is said to be absorbing the Yamask's dark power.
|
||||
Generation = 8
|
||||
Flags = InheritFormWithEverStone
|
||||
Evolutions = RUNERIGUS,EventAfterDamageTaken,2
|
||||
Flags = InheritFormWithEverstone
|
||||
Evolution = RUNERIGUS,EventAfterDamageTaken,2
|
||||
#-------------------------------
|
||||
[DEERLING,1]
|
||||
FormName = Summer Form
|
||||
@@ -1427,7 +1428,7 @@ Weight = 20.5
|
||||
Color = Green
|
||||
Pokedex = Its conspicuous lips lure prey in as it lies in wait in the mud. When prey gets close, Stunfisk clamps its jagged steel fins down on them.
|
||||
Generation = 8
|
||||
Flags = InheritFormWithEverStone
|
||||
Flags = InheritFormWithEverstone
|
||||
#-------------------------------
|
||||
[TORNADUS,1]
|
||||
FormName = Therian Forme
|
||||
@@ -1617,7 +1618,7 @@ BaseExp = 243
|
||||
Moves = 1,TACKLE,1,VINEWHIP,1,FAIRYWIND,6,FAIRYWIND,10,LUCKYCHANT,15,RAZORLEAF,20,WISH,25,MAGICALLEAF,27,GRASSYTERRAIN,33,PETALBLIZZARD,38,AROMATHERAPY,43,MISTYTERRAIN,46,MOONBLAST,50,LIGHTOFRUIN,51,PETALDANCE,58,SOLARBEAM
|
||||
EggGroups = Undiscovered
|
||||
Pokedex = The flower it's holding can no longer be found blooming anywhere. It's also thought to contain terrifying power.
|
||||
Evolutions = FLORGES,None,
|
||||
Evolution = FLORGES,None
|
||||
#-------------------------------
|
||||
[FLORGES,1]
|
||||
FormName = Yellow Flower
|
||||
@@ -1803,7 +1804,7 @@ Pokedex = It summons the dead with its dreamy dancing. From their malice, it dra
|
||||
Abilities = OWNTEMPO
|
||||
HiddenAbilities = OWNTEMPO
|
||||
Flags = InheritFormFromMother
|
||||
Evolutions = LYCANROC,LevelEvening,25
|
||||
Evolution = LYCANROC,LevelEvening,25
|
||||
#-------------------------------
|
||||
[LYCANROC,1]
|
||||
FormName = Midnight Form
|
||||
@@ -2049,7 +2050,7 @@ Pokedex = Capable of generating 15,000 volts of electricity, this Pokémon looks
|
||||
[SINISTEA,1]
|
||||
FormName = Antique Form
|
||||
Pokedex = The swirl pattern in this Pokémon's body is its weakness. If it gets stirred, the swirl loses its shape, and Sinistea gets dizzy.
|
||||
Evolutions = POLTEAGEIST,Item,CHIPPEDPOT
|
||||
Evolution = POLTEAGEIST,Item,CHIPPEDPOT
|
||||
#-------------------------------
|
||||
[POLTEAGEIST,1]
|
||||
FormName = Antique Form
|
||||
|
||||
@@ -33,10 +33,10 @@ You will need Ruby installed to run these scripts. The intention is to replace t
|
||||
|
||||
The .gitignore file lists the files that will not be included in this repo. These are:
|
||||
|
||||
* The Audio/, Graphics/ and Plugins/ folders and everything in them.
|
||||
* The Audio/, Graphics/, Plugins/ and Screenshots/ folders and everything in them.
|
||||
* Everything in the Data/ folder, except for:
|
||||
* The Data/Scripts/ folder and everything in there.
|
||||
* Scripts.rxdata (a special version that just loads the individual script files).
|
||||
* messages_core.dat, which contains common messages and is useful for translation projects.
|
||||
* A few files in the main project folder (two of the Game.xxx files, and the RGSS dll file).
|
||||
* A few files in the main project folder (two of the Game.xxx files, the RGSS dll file and errorlog.txt).
|
||||
* Temporary files.
|
||||
|
||||
@@ -15,10 +15,8 @@ module Scripts
|
||||
p "Scripts look like they're already extracted. Not doing so again."
|
||||
return
|
||||
end
|
||||
|
||||
create_directory(path)
|
||||
clear_directory(path)
|
||||
|
||||
folder_id = [1, 1] # Can only have two layers of folders
|
||||
file_id = 1
|
||||
level = 0 # 0=main path, 1=subfolder, 2=sub-subfolder
|
||||
@@ -29,7 +27,6 @@ module Scripts
|
||||
title = title_to_filename(title).strip
|
||||
script = Zlib::Inflate.inflate(script).delete("\r")
|
||||
next if title.empty? && script.empty?
|
||||
|
||||
section_name = nil
|
||||
if title[/\[\[\s*(.+)\s*\]\]$/] # Make a folder
|
||||
section_name = $~[1].strip
|
||||
@@ -70,10 +67,7 @@ module Scripts
|
||||
end
|
||||
|
||||
def self.createLoaderScripts(rxdata)
|
||||
# loader_scripts = File.open("Data/ScriptsLoader.rxdata", 'rb') { |f| Marshal.load(f) }
|
||||
# p loader_scripts
|
||||
txt = "x\x9C}SM\x8F\xDA0\x10\xBD#\xF1\x1F\x86,Rb-2\xCB\xB1\x95\xE8\x1E\xBAm\xD5S\xAB\x85\e\xA0\xC8$\x13p7\xD8\x91\xED\x94n\t\xFF\xBD\xB6C0\xE9\xD7\xC5\xF2\xCCx\xDE\xCC\xBCy\xBE\x83\xE5\x9Ek\xC8%j\x10\xD2\xC0Q\xAA\x17\xE0\x05\x98=\xC2\x8E\x1D\x10l\x10E\xA6^+\x83\xF9h8\x18\x0Er\xB4Q\xC52\xDC\xB2\xEC%UXIe\x86\x03\x00gz?\xCCa<\xA2W\x93f\xA5\x14\xD8{A\x91e\xFB\x134[\xD38\xBF\x8D\x18\xAA\xEB\xED(\x99\xAEO\xC9:\xBF'\xEB\xF3\x94\xC0)Z\xDD\x9D\xC6\xB3\xF3\xC6\x9E\xCF\x9F\x16\x8Bt\xF1\xFE\xF9\xF3\xD7\xE5b5\x9EQ#S\xBEY\xCD6\xE7\xE8\xEC\x10\xFC\xA1\xD0\xD4J\xB8\xDA\a\xD4\x9A\xED\x10\xEE!Z\x8B\xB5\x88\xEC%\xD4\xFE&\xB9H\xAC?\"\xC3\x01\x8A\xBC\eI1\xAE1\r\x83\xA1RR9XKF\x80\xA4\x9A\xFFDx7\x877\x0F\x0Fm\xEB\x1Fy\x89TV(\x92\xF8\x9ALK\xB9\x8B'\x10\x1Fc;\x054E\x03\x05=*n0\x19\x8FH\xDB,\xB4\x05!^vI\x8Ei#%l\xF9\x8E\xC2\x97\xDAT\xB5\x01.\xA0\x0F\xEAR\xB1\xD4x\x03\xE1]n\x8E\x9BaJ\xC9\xF2Tg\x8AWF\xA7\x85\x92\x87\xB4\x90e\x8E*\xA9\x98\xD9\x13\x97Q\xD8\xB6\xB5\x85\x98\xC3j\xE3m\x1F\xD7W\xFB\x89+ZH\xE5\x16\xD5&Y\x89\xB8I\xDA\xC2\x02\x7F\x18GL\x01\xF39\xC44\x86\xA6\xE9\xEE4n\x9F$\x9E\x98\x9C+\xCC\x8CT\xAF\x8F\x1E\xC5md\xEA\xD6Q\x10\x02\x8F]QZ\xD5z\x9F\x14\x04\xDE^\xFA\xEA\x1C\xD7\xD1:\xBF\xB6Z\e\x05\xD3u\xD7\xEB+\x93\xB9\x93_\xD8I\xBF\xE8\x04\"\x15\xB5+\xB1/\x1A\x8FB\xED\x8Cy\xB7\x93-\xEE\xB8h\xAF\xB6\xF2wV&\x0Eq\x02\x82\x97\x13h\xFBq:\xD3Y\x8D\xB0\xF0\xF4~\xE8d\x12Vz\x13\xA0\x02\x8FIPO\x0F\xA0K\xBA\x15\x97\xFB\x03\xC1\x9E\xFC\xF1\xCFH\xAF\xD2\xDF\xD4z%\xAC\xE3\xEDBq`\xEE\xE2\b\xDCy\xC7\x85\xC0\xFF\n'\x10\xE9}\xE4w\xE5\xFD39zb\x86M[^tD~\x01LYX\x94"
|
||||
|
||||
txt = "x\x9C}SM\x8F\x9B0\x10\xBDG\xCA\x7F\x18\xD8H\x8062\x9Bc\x0Fi\x0F\xDD\xB6\xEA\xA9\xD5&7H\x11\x1FC\xE2.\xB1\x91m\x9AnC\xFE{m\b8t\xDB^\x80\xF9z3\xF3\xE6q\a\xDB\x03\x95Pp\x94\xC0\xB8\x82\x13\x17\xCF@KP\a\x84}zD\xD0Ad\xB9x\xA9\x15\x16\xCE|6\x9F\x15\xA8\xA3\"\xCD1K\xF3\xE7D`\xCD\x85\x9A\xCF\x00\x8C\xD9\xF9a\r\v\x87\x8C&\xC9+\xCEp\x92A0\xCD\x0Fgh3\xD5\x1A\xBF\x8E(\"\x9B\xCC\xF1\xC3\xF8\xEC\xC7\xC5}\x10_\xC2\x00\xCEntw^\xAC.;\xFD|\xFA\xB4\xD9$\x9B\xF7O\x9F\xBFn7\xD1bE\x14O\xE8.Z\xED.\xEE\xC5 t\x0F\x81\xAA\x11\xCC\xF4>\xA2\x94\xE9\x1E\xE1\x1E\xDC\x98\xC5\xCC\xD5\x1F\xB6\xF7wN\x99\xAF\xFDn0\x9F!+\x86\x95DJ%&v1\x14\x82\v\x03\xAB\xC9\xB0\x90D\xD2_\bo\xD7\xF0\xE6\xE1\xA1\x1F\xFD#\xAD\x90\xF0\x1A\x99\xEF\x8D\xC5\xA4\xE2{o\t\xDE\xC9\xD3[@[\xB6P\x92\x93\xA0\n\xFD\x85\x13\xF4\xC3B\xDF\x10\xBC\xEDPd\x98V\x9CCF\xF7\x04\xBE4\xAAn\x14P\x06SPS\x8A\x95\xC4\e\x88\xCEe\xF6\xB8Y\xA6\xE2i\x91\xC8\\\xD0Z\xC9\xA4\x14\xFC\x98\x94\xBC*P\xF8u\xAA\x0E\x81\xA9(\xF5\xD8RC\xAC!\xDAuv\x17\x97\xA3\xFDH\x05)\xB90\x87\xEA\x8B\xB4D\xCC&}c\x86?\x95!\xA6\x84\xF5\x1A<\xE2A\xDB\x0E\xDF\xC4\xEBSt\xB4\xA3\xA6\xA0\x02s\xC5\xC5\xCB\xBB\x0E\xC7\xDC$4\a)\x83>olM\xEAF\x1E\xFC20\x95N\x19\x85\xDFb\x12\xEE\xFA\x1C\xBB\xF1u\xF0\xDB\\\x9D\x1A\x13\x91-B:d\e\x1E\xC6W\x9F/\xB5H\x1Dk\x9A\xB5&\v\xE5\xBC0\xBA\xB5\xC7\x9C\xCE\xBA\x04W\xB8\xFD-uF\xDB\xA1\x10MN1\x1C3\xC3=e\xC3\x88\xF8#\xAD|\x83\xB8\x04F\xAB\xE5\xB8\xAA@\x997\b\x9B\xEE.\x1F\x06}Y-\xDC\x04\b\xC3\x93oe7\x01\x18\x8AnUi~\x1Ek/_\xFD\xA0\xC1\xA4\xD3\xDFd\xFE\x8A\xB7\xEBU,sW\x87\xE5\xAEs\\\t\xFC\xAF\xE2,\x91\x9D/\xF8S\xB2\xFF,v\x1FS\x95\x86=/\xD2\r~\x03\x01\xDDe\xDF"
|
||||
File.open(rxdata, "wb") do |f|
|
||||
Marshal.dump([[62054200, "Main", txt]], f)
|
||||
end
|
||||
@@ -85,7 +79,6 @@ module Scripts
|
||||
p "Scripts.rxdata already has a bunch of scripts in it. Won't consolidate script files."
|
||||
return
|
||||
end
|
||||
|
||||
scripts = []
|
||||
aggregate_from_folder(path, scripts)
|
||||
# Save scripts to file
|
||||
@@ -99,11 +92,10 @@ module Scripts
|
||||
folders = []
|
||||
Dir.foreach(path) do |f|
|
||||
next if f == '.' || f == '..'
|
||||
|
||||
if File.directory?(path + "/" + f)
|
||||
folders.push(f)
|
||||
folders.push(f) if !f[/^\./]
|
||||
else
|
||||
files.push(f)
|
||||
files.push(f) if f[/\.rb$/i]
|
||||
end
|
||||
end
|
||||
# Aggregate individual script files into Scripts.rxdata
|
||||
@@ -187,7 +179,5 @@ module Scripts
|
||||
end
|
||||
end
|
||||
|
||||
#Scripts.dump("D:/Desktop/Scripts", "D:/Desktop/Main Essentials/Data/Scripts.rxdata")
|
||||
#Scripts.from_folder("D:/Desktop/Scripts", "D:/Desktop/Main Essentials/Data/Scripts.rxdata")
|
||||
#Scripts.dump
|
||||
Scripts.from_folder
|
||||
|
||||
@@ -15,10 +15,8 @@ module Scripts
|
||||
p "Scripts look like they're already extracted. Not doing so again."
|
||||
return
|
||||
end
|
||||
|
||||
create_directory(path)
|
||||
clear_directory(path)
|
||||
|
||||
folder_id = [1, 1] # Can only have two layers of folders
|
||||
file_id = 1
|
||||
level = 0 # 0=main path, 1=subfolder, 2=sub-subfolder
|
||||
@@ -29,7 +27,6 @@ module Scripts
|
||||
title = title_to_filename(title).strip
|
||||
script = Zlib::Inflate.inflate(script).delete("\r")
|
||||
next if title.empty? && script.empty?
|
||||
|
||||
section_name = nil
|
||||
if title[/\[\[\s*(.+)\s*\]\]$/] # Make a folder
|
||||
section_name = $~[1].strip
|
||||
@@ -70,10 +67,7 @@ module Scripts
|
||||
end
|
||||
|
||||
def self.createLoaderScripts(rxdata)
|
||||
# loader_scripts = File.open("Data/ScriptsLoader.rxdata", 'rb') { |f| Marshal.load(f) }
|
||||
# p loader_scripts
|
||||
txt = "x\x9C}SM\x8F\xDA0\x10\xBD#\xF1\x1F\x86,Rb-2\xCB\xB1\x95\xE8\x1E\xBAm\xD5S\xAB\x85\e\xA0\xC8$\x13p7\xD8\x91\xED\x94n\t\xFF\xBD\xB6C0\xE9\xD7\xC5\xF2\xCCx\xDE\xCC\xBCy\xBE\x83\xE5\x9Ek\xC8%j\x10\xD2\xC0Q\xAA\x17\xE0\x05\x98=\xC2\x8E\x1D\x10l\x10E\xA6^+\x83\xF9h8\x18\x0Er\xB4Q\xC52\xDC\xB2\xEC%UXIe\x86\x03\x00gz?\xCCa<\xA2W\x93f\xA5\x14\xD8{A\x91e\xFB\x134[\xD38\xBF\x8D\x18\xAA\xEB\xED(\x99\xAEO\xC9:\xBF'\xEB\xF3\x94\xC0)Z\xDD\x9D\xC6\xB3\xF3\xC6\x9E\xCF\x9F\x16\x8Bt\xF1\xFE\xF9\xF3\xD7\xE5b5\x9EQ#S\xBEY\xCD6\xE7\xE8\xEC\x10\xFC\xA1\xD0\xD4J\xB8\xDA\a\xD4\x9A\xED\x10\xEE!Z\x8B\xB5\x88\xEC%\xD4\xFE&\xB9H\xAC?\"\xC3\x01\x8A\xBC\eI1\xAE1\r\x83\xA1RR9XKF\x80\xA4\x9A\xFFDx7\x877\x0F\x0Fm\xEB\x1Fy\x89TV(\x92\xF8\x9ALK\xB9\x8B'\x10\x1Fc;\x054E\x03\x05=*n0\x19\x8FH\xDB,\xB4\x05!^vI\x8Ei#%l\xF9\x8E\xC2\x97\xDAT\xB5\x01.\xA0\x0F\xEAR\xB1\xD4x\x03\xE1]n\x8E\x9BaJ\xC9\xF2Tg\x8AWF\xA7\x85\x92\x87\xB4\x90e\x8E*\xA9\x98\xD9\x13\x97Q\xD8\xB6\xB5\x85\x98\xC3j\xE3m\x1F\xD7W\xFB\x89+ZH\xE5\x16\xD5&Y\x89\xB8I\xDA\xC2\x02\x7F\x18GL\x01\xF39\xC44\x86\xA6\xE9\xEE4n\x9F$\x9E\x98\x9C+\xCC\x8CT\xAF\x8F\x1E\xC5md\xEA\xD6Q\x10\x02\x8F]QZ\xD5z\x9F\x14\x04\xDE^\xFA\xEA\x1C\xD7\xD1:\xBF\xB6Z\e\x05\xD3u\xD7\xEB+\x93\xB9\x93_\xD8I\xBF\xE8\x04\"\x15\xB5+\xB1/\x1A\x8FB\xED\x8Cy\xB7\x93-\xEE\xB8h\xAF\xB6\xF2wV&\x0Eq\x02\x82\x97\x13h\xFBq:\xD3Y\x8D\xB0\xF0\xF4~\xE8d\x12Vz\x13\xA0\x02\x8FIPO\x0F\xA0K\xBA\x15\x97\xFB\x03\xC1\x9E\xFC\xF1\xCFH\xAF\xD2\xDF\xD4z%\xAC\xE3\xEDBq`\xEE\xE2\b\xDCy\xC7\x85\xC0\xFF\n'\x10\xE9}\xE4w\xE5\xFD39zb\x86M[^tD~\x01LYX\x94"
|
||||
|
||||
txt = "x\x9C}SM\x8F\x9B0\x10\xBDG\xCA\x7F\x18\xD8H\x8062\x9Bc\x0Fi\x0F\xDD\xB6\xEA\xA9\xD5&7H\x11\x1FC\xE2.\xB1\x91m\x9AnC\xFE{m\b8t\xDB^\x80\xF9z3\xF3\xE6q\a\xDB\x03\x95Pp\x94\xC0\xB8\x82\x13\x17\xCF@KP\a\x84}zD\xD0Ad\xB9x\xA9\x15\x16\xCE|6\x9F\x15\xA8\xA3\"\xCD1K\xF3\xE7D`\xCD\x85\x9A\xCF\x00\x8C\xD9\xF9a\r\v\x87\x8C&\xC9+\xCEp\x92A0\xCD\x0Fgh3\xD5\x1A\xBF\x8E(\"\x9B\xCC\xF1\xC3\xF8\xEC\xC7\xC5}\x10_\xC2\x00\xCEntw^\xAC.;\xFD|\xFA\xB4\xD9$\x9B\xF7O\x9F\xBFn7\xD1bE\x14O\xE8.Z\xED.\xEE\xC5 t\x0F\x81\xAA\x11\xCC\xF4>\xA2\x94\xE9\x1E\xE1\x1E\xDC\x98\xC5\xCC\xD5\x1F\xB6\xF7wN\x99\xAF\xFDn0\x9F!+\x86\x95DJ%&v1\x14\x82\v\x03\xAB\xC9\xB0\x90D\xD2_\bo\xD7\xF0\xE6\xE1\xA1\x1F\xFD#\xAD\x90\xF0\x1A\x99\xEF\x8D\xC5\xA4\xE2{o\t\xDE\xC9\xD3[@[\xB6P\x92\x93\xA0\n\xFD\x85\x13\xF4\xC3B\xDF\x10\xBC\xEDPd\x98V\x9CCF\xF7\x04\xBE4\xAAn\x14P\x06SPS\x8A\x95\xC4\e\x88\xCEe\xF6\xB8Y\xA6\xE2i\x91\xC8\\\xD0Z\xC9\xA4\x14\xFC\x98\x94\xBC*P\xF8u\xAA\x0E\x81\xA9(\xF5\xD8RC\xAC!\xDAuv\x17\x97\xA3\xFDH\x05)\xB90\x87\xEA\x8B\xB4D\xCC&}c\x86?\x95!\xA6\x84\xF5\x1A<\xE2A\xDB\x0E\xDF\xC4\xEBSt\xB4\xA3\xA6\xA0\x02s\xC5\xC5\xCB\xBB\x0E\xC7\xDC$4\a)\x83>olM\xEAF\x1E\xFC20\x95N\x19\x85\xDFb\x12\xEE\xFA\x1C\xBB\xF1u\xF0\xDB\\\x9D\x1A\x13\x91-B:d\e\x1E\xC6W\x9F/\xB5H\x1Dk\x9A\xB5&\v\xE5\xBC0\xBA\xB5\xC7\x9C\xCE\xBA\x04W\xB8\xFD-uF\xDB\xA1\x10MN1\x1C3\xC3=e\xC3\x88\xF8#\xAD|\x83\xB8\x04F\xAB\xE5\xB8\xAA@\x997\b\x9B\xEE.\x1F\x06}Y-\xDC\x04\b\xC3\x93oe7\x01\x18\x8AnUi~\x1Ek/_\xFD\xA0\xC1\xA4\xD3\xDFd\xFE\x8A\xB7\xEBU,sW\x87\xE5\xAEs\\\t\xFC\xAF\xE2,\x91\x9D/\xF8S\xB2\xFF,v\x1FS\x95\x86=/\xD2\r~\x03\x01\xDDe\xDF"
|
||||
File.open(rxdata, "wb") do |f|
|
||||
Marshal.dump([[62054200, "Main", txt]], f)
|
||||
end
|
||||
@@ -85,7 +79,6 @@ module Scripts
|
||||
p "Scripts.rxdata already has a bunch of scripts in it. Won't consolidate script files."
|
||||
return
|
||||
end
|
||||
|
||||
scripts = []
|
||||
aggregate_from_folder(path, scripts)
|
||||
# Save scripts to file
|
||||
@@ -99,11 +92,10 @@ module Scripts
|
||||
folders = []
|
||||
Dir.foreach(path) do |f|
|
||||
next if f == '.' || f == '..'
|
||||
|
||||
if File.directory?(path + "/" + f)
|
||||
folders.push(f)
|
||||
folders.push(f) if !f[/^\./]
|
||||
else
|
||||
files.push(f)
|
||||
files.push(f) if f[/\.rb$/i]
|
||||
end
|
||||
end
|
||||
# Aggregate individual script files into Scripts.rxdata
|
||||
@@ -187,7 +179,5 @@ module Scripts
|
||||
end
|
||||
end
|
||||
|
||||
#Scripts.dump("D:/Desktop/Scripts", "D:/Desktop/Main Essentials/Data/Scripts.rxdata")
|
||||
#Scripts.from_folder("D:/Desktop/Scripts", "D:/Desktop/Main Essentials/Data/Scripts.rxdata")
|
||||
Scripts.dump
|
||||
#Scripts.from_folder
|
||||
|
||||
@@ -1,49 +1,80 @@
|
||||
<body>
|
||||
<div id="map">
|
||||
<img name="map" src="Graphics/Pictures/mapRegion0.png" alt="" width="480" height="320"/>
|
||||
<div>
|
||||
<u>Town Map Generator</u>
|
||||
</div>
|
||||
<form name="mf" action="javascript:void(null)">
|
||||
<div>
|
||||
Map Filename (in Graphics/Pictures/): <input type="text" name="filename" value="mapRegion0.png"/>
|
||||
<input type="button" name="btnChange" value="Change"/><br/ >
|
||||
Square width: <input type="text" name="sqwidth" size="4" min="1" max="16" value="16"/>
|
||||
Square height: <input type="text" name="sqheight" size="4" min="1" max="16" value="16"/>
|
||||
<input type="button" name="btnRefresh" value="Refresh"/><br/ >
|
||||
Region Name: <input type="text" name="name" value="Sample Region"/>
|
||||
<input type="button" name="btnChange2" value="Change"/>
|
||||
</div>
|
||||
</form>
|
||||
<hr/>
|
||||
<form name="f" action="javascript:void(null)">
|
||||
<table>
|
||||
<tr>
|
||||
<td>Current Position:</td>
|
||||
<td><input type="text" name="curpos" readonly="readonly"/></td>
|
||||
<td>Filename:</td>
|
||||
<td><input type="text" name="filename" value="mapRegion0.png"/></td>
|
||||
<td><input type="button" name="btnChange" value="Change"/></td>
|
||||
<td>Name of the region graphic (in Graphics/UI/Town Map/)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Name:</td>
|
||||
<td><input type="text" name="locname"/><td>
|
||||
<td><input type="text" name="name" value="Sample Region"/></td>
|
||||
<td><input type="button" name="btnChange2" value="Change"/></td>
|
||||
<td>Name of the region</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Point of Interest:</td>
|
||||
<td><input type="text" name="poi"/><td>
|
||||
<td>Square width:</td>
|
||||
<td><input type="text" name="sqwidth" size="4" min="1" max="16" value="16"/></td>
|
||||
<td><input type="button" name="btnRefreshWidth" value="Refresh"/></td>
|
||||
<td>Width of each point in the Town Map (in pixels)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Fly Destination:</td>
|
||||
<td><input type="text" name="healing"/><td>
|
||||
<td>Square height:</td>
|
||||
<td><input type="text" name="sqheight" size="4" min="1" max="16" value="16"/></td>
|
||||
<td><input type="button" name="btnRefreshHeight" value="Refresh"/></td>
|
||||
<td>Height of each point in the Town Map (in pixels)</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<hr/>
|
||||
<div>
|
||||
<u>Edit point properties</u><br />
|
||||
Click on a point in the Town Map to edit its properties.
|
||||
</div>
|
||||
<div id="map">
|
||||
<img name="map" src="Graphics/UI/Town Map/mapRegion0.png" alt="" width="480" height="320"/>
|
||||
</div>
|
||||
<form name="f" action="javascript:void(null)">
|
||||
<table>
|
||||
<tr>
|
||||
<td>Co-ordinates:</td>
|
||||
<td><input type="text" name="curpos" readonly="readonly"/></td>
|
||||
<td>X and Y co-ordinates of this point in the Town Map (click in the map above)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Name:</td>
|
||||
<td><input type="text" name="locname"/></td>
|
||||
<td>Name of this location</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Landmark:</td>
|
||||
<td><input type="text" name="poi"/></td>
|
||||
<td>Name of a landmark found in this location</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Fly destination:</td>
|
||||
<td><input type="text" name="healing"/></td>
|
||||
<td>Map ID, X and Y tile co-ordinates the player will appear at when Flying to this location</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Switch:</td>
|
||||
<td><input type="text" name="swtch"/><td>
|
||||
<td><input type="text" name="swtch"/></td>
|
||||
<td>Number of a Game Switch that needs to be ON to see this point's name/landmark and to Fly to this location</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div>
|
||||
<input type="button" name="btnSave" value="Save" disabled="disabled"/>
|
||||
<input type="button" name="btnCancel" value="Cancel"/><br/ >
|
||||
Single section from townmap.txt (without section heading):<br/ >
|
||||
<hr/>
|
||||
<u>PBS file "town_map.txt" text for this region</u><br />
|
||||
<textarea name="data" rows="10" cols="70"></textarea><br/ >
|
||||
<input type="button" name="btnLoad" value="Load"/> (To load data into the editor)<br/ >
|
||||
Copy the data above into townmap.txt when you're done.
|
||||
<input type="button" name="btnLoad" value="Load into map"/>
|
||||
Apply the data in this box to the map above<br/ >
|
||||
When you're done, copy this text into "town_map.txt". Remember that it needs a section line (a number in square brackets).
|
||||
</div>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
@@ -188,13 +219,18 @@
|
||||
for(var i=0;i<lines.length;i++){
|
||||
lines[i]=lines[i].replace(/\s+$/,"")
|
||||
if(!/^\#/.test(lines[i])&&!/^\s*$/.test(lines[i])){
|
||||
esec=/^\s*\[\s*\d+\s*\]\s*$/.exec(lines[i])
|
||||
if(esec){
|
||||
continue;
|
||||
}
|
||||
e=/^\s*(\w+)\s*=\s*(.*)$/.exec(lines[i])
|
||||
if(!e){
|
||||
alert("Bad line syntax in line "+(i+1))
|
||||
}
|
||||
if(e[1]=="Filename"){
|
||||
o=document.getElementById("map")
|
||||
o.innerHTML='<img name="map" src="Graphics/Pictures/'+e[2]+'" alt="" width="480" height="320"/'+'>'
|
||||
o.innerHTML='<img name="map" src="Graphics/UI/Town Map/'+e[2]+'" alt="" width="480" height="320"/'+'>'
|
||||
document.mf.filename.value=e[2]
|
||||
} else if(e[1]=="Name"){
|
||||
document.mf.name.value=e[2]
|
||||
} else if(e[1]=="Point"){
|
||||
@@ -356,7 +392,7 @@
|
||||
showMapPoints()
|
||||
})
|
||||
attachEvent(document.mf.btnChange,"click",function(e){
|
||||
document.images.map.src="Graphics/Pictures/"+document.mf.filename.value
|
||||
document.images.map.src="Graphics/UI/Town Map/"+document.mf.filename.value
|
||||
genMapPoints()
|
||||
showMapPoints()
|
||||
})
|
||||
@@ -364,7 +400,12 @@
|
||||
genMapPoints()
|
||||
showMapPoints()
|
||||
})
|
||||
attachEvent(document.mf.btnRefresh,"click",function(e){
|
||||
attachEvent(document.mf.btnRefreshWidth,"click",function(e){
|
||||
choiceX=choiceY=-1
|
||||
document.f.curpos.value=""
|
||||
showMapPoints()
|
||||
})
|
||||
attachEvent(document.mf.btnRefreshHeight,"click",function(e){
|
||||
choiceX=choiceY=-1
|
||||
document.f.curpos.value=""
|
||||
showMapPoints()
|
||||
|
||||
Reference in New Issue
Block a user