Merge branch 'master' into clear_battle_files

This commit is contained in:
DizzyEggg
2018-02-28 23:58:29 +01:00
47 changed files with 4727 additions and 4942 deletions

View File

@@ -3,9 +3,9 @@
// should they be included here or included individually by every file?
#include "constants/battle.h"
#include "battle_main.h"
#include "battle_util.h"
#include "battle_script_commands.h"
#include "battle_main.h"
#include "battle_ai_switch_items.h"
#include "battle_gfx_sfx_util.h"
#include "battle_util2.h"
@@ -66,29 +66,14 @@
#define MSG_DISPLAY 0x7
#define BATTLE_COMMUNICATION_ENTRIES_COUNT 0x8
#define MOVE_TARGET_SELECTED 0x0
#define MOVE_TARGET_DEPENDS 0x1
#define MOVE_TARGET_USER 0x2
#define MOVE_TARGET_RANDOM 0x4
#define MOVE_TARGET_x10 0x10
#define MOVE_TARGET_BOTH 0x8
#define MOVE_TARGET_FOES_AND_ALLY 0x20
#define MOVE_TARGET_OPPONENTS_FIELD 0x40
// defines for the u8 array gTypeEffectiveness
#define TYPE_EFFECT_ATK_TYPE(i)((gTypeEffectiveness[i + 0]))
#define TYPE_EFFECT_DEF_TYPE(i)((gTypeEffectiveness[i + 1]))
#define TYPE_EFFECT_MULTIPLIER(i)((gTypeEffectiveness[i + 2]))
// defines for the gTypeEffectiveness multipliers
#define TYPE_MUL_NO_EFFECT 0
#define TYPE_MUL_NOT_EFFECTIVE 5
#define TYPE_MUL_NORMAL 10
#define TYPE_MUL_SUPER_EFFECTIVE 20
// special type table Ids
#define TYPE_FORESIGHT 0xFE
#define TYPE_ENDTABLE 0xFF
#define MOVE_TARGET_SELECTED 0x0
#define MOVE_TARGET_DEPENDS 0x1
#define MOVE_TARGET_USER_OR_SELECTED 0x2
#define MOVE_TARGET_RANDOM 0x4
#define MOVE_TARGET_BOTH 0x8
#define MOVE_TARGET_USER 0x10
#define MOVE_TARGET_FOES_AND_ALLY 0x20
#define MOVE_TARGET_OPPONENTS_FIELD 0x40
#define BATTLE_BUFFER_LINK_SIZE 0x1000

View File

@@ -1,6 +1,30 @@
#ifndef GUARD_BATTLE_MAIN_H
#define GUARD_BATTLE_MAIN_H
struct TrainerMoney
{
u8 classId;
u8 value;
};
#define TYPE_NAME_LENGTH 6
#define ABILITY_NAME_LENGTH 12
// defines for the u8 array gTypeEffectiveness
#define TYPE_EFFECT_ATK_TYPE(i)((gTypeEffectiveness[i + 0]))
#define TYPE_EFFECT_DEF_TYPE(i)((gTypeEffectiveness[i + 1]))
#define TYPE_EFFECT_MULTIPLIER(i)((gTypeEffectiveness[i + 2]))
// defines for the gTypeEffectiveness multipliers
#define TYPE_MUL_NO_EFFECT 0
#define TYPE_MUL_NOT_EFFECTIVE 5
#define TYPE_MUL_NORMAL 10
#define TYPE_MUL_SUPER_EFFECTIVE 20
// special type table Ids
#define TYPE_FORESIGHT 0xFE
#define TYPE_ENDTABLE 0xFF
void CB2_InitBattle(void);
void BattleMainCB2(void);
void CB2_QuitRecordedBattle(void);
@@ -42,6 +66,12 @@ void RunBattleScriptCommands_PopCallbacksStack(void);
void RunBattleScriptCommands(void);
bool8 TryRunFromBattle(u8 battlerId);
extern const u8 gTypeEffectiveness[336];
extern const u8 gTypeNames[][TYPE_NAME_LENGTH + 1];
extern const struct TrainerMoney gTrainerMoneyTable[];
extern const u8 gAbilityNames[][ABILITY_NAME_LENGTH + 1];
extern const u8 *const gAbilityDescriptionPointers[];
extern const u8 gStatusConditionString_PoisonJpn[8];
extern const u8 gStatusConditionString_SleepJpn[8];
extern const u8 gStatusConditionString_ParalysisJpn[8];

View File

@@ -151,7 +151,7 @@
#define EFFECT_EARTHQUAKE 147
#define EFFECT_FUTURE_SIGHT 148
#define EFFECT_GUST 149
#define EFFECT_FLINCH_HIT_2 150 // STOMP ASTONISH EXTRASENSORY NEEDLE_ARM
#define EFFECT_FLINCH_MINIMIZE_HIT 150 // STOMP ASTONISH EXTRASENSORY NEEDLE_ARM
#define EFFECT_SOLARBEAM 151
#define EFFECT_THUNDER 152
#define EFFECT_TELEPORT 153

View File

@@ -91,7 +91,7 @@
#define FLAG_0x058 0x58
#define FLAG_0x059 0x59
#define FLAG_0x05A 0x5A
#define FLAG_0x05B 0x5B
#define FLAG_WATTSON_REMATCH_AVAILABLE 0x5B
#define FLAG_0x05C 0x5C
#define FLAG_0x05D 0x5D
#define FLAG_0x05E 0x5E
@@ -208,8 +208,8 @@
#define FLAG_0x0CD 0xCD
#define FLAG_0x0CE 0xCE
#define FLAG_0x0CF 0xCF
#define FLAG_0x0D0 0xD0
#define FLAG_0x0D1 0xD1
#define FLAG_GOT_BASEMENT_KEY_FROM_WATTSON 0xD0
#define FLAG_GOT_TM24_FROM_WATTSON 0xD1
#define FLAG_0x0D2 0xD2
#define FLAG_0x0D3 0xD3
#define FLAG_0x0D4 0xD4
@@ -912,8 +912,8 @@
#define FLAG_0x38D 0x38D
#define FLAG_0x38E 0x38E
#define FLAG_0x38F 0x38F
#define FLAG_0x390 0x390
#define FLAG_0x391 0x391
#define FLAG_SPRITEVIS_MAUVILLE_CITY_WATTSON 0x390
#define FLAG_SPRITEVIS_MAUVILLE_GYM_WATTSON 0x391
#define FLAG_0x392 0x392
#define FLAG_0x393 0x393
#define FLAG_0x394 0x394
@@ -961,7 +961,7 @@
#define FLAG_0x3BE 0x3BE
#define FLAG_0x3BF 0x3BF
#define FLAG_0x3C0 0x3C0
#define FLAG_0x3C1 0x3C1
#define FLAG_SPRITEVIS_SLATEPORT_MUSEUM_POPULATION 0x3C1
#define FLAG_0x3C2 0x3C2
#define FLAG_0x3C3 0x3C3
#define FLAG_0x3C4 0x3C4

3913
include/data/battle_moves.h Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,247 @@
#ifndef POKEEMERALD_DATA_TEXT_ABILITIES_H
#define POKEEMERALD_DATA_TEXT_ABILITIES_H
static const u8 gNoneAbilityDescription[] = _("No special ability.");
static const u8 gStenchAbilityDescription[] = _("Helps repel wild POKéMON.");
static const u8 gDrizzleAbilityDescription[] = _("Summons rain in battle.");
static const u8 gSpeedBoostAbilityDescription[] = _("Gradually boosts SPEED.");
static const u8 gBattleArmorAbilityDescription[] = _("Blocks critical hits.");
static const u8 gSturdyAbilityDescription[] = _("Negates 1-hit KO attacks.");
static const u8 gDampAbilityDescription[] = _("Prevents self-destruction.");
static const u8 gLimberAbilityDescription[] = _("Prevents paralysis.");
static const u8 gSandVeilAbilityDescription[] = _("Ups evasion in a sandstorm.");
static const u8 gStaticAbilityDescription[] = _("Paralyzes on contact.");
static const u8 gVoltAbsorbAbilityDescription[] = _("Turns electricity into HP.");
static const u8 gWaterAbsorbAbilityDescription[] = _("Changes water into HP.");
static const u8 gObliviousAbilityDescription[] = _("Prevents attraction.");
static const u8 gCloudNineAbilityDescription[] = _("Negates weather effects.");
static const u8 gCompoundEyesAbilityDescription[] = _("Raises accuracy.");
static const u8 gInsomniaAbilityDescription[] = _("Prevents sleep.");
static const u8 gColorChangeAbilityDescription[] = _("Changes type to foes move.");
static const u8 gImmunityAbilityDescription[] = _("Prevents poisoning.");
static const u8 gFlashFireAbilityDescription[] = _("Powers up if hit by fire.");
static const u8 gShieldDustAbilityDescription[] = _("Prevents added effects.");
static const u8 gOwnTempoAbilityDescription[] = _("Prevents confusion.");
static const u8 gSuctionCupsAbilityDescription[] = _("Firmly anchors the body.");
static const u8 gIntimidateAbilityDescription[] = _("Lowers the foes ATTACK.");
static const u8 gShadowTagAbilityDescription[] = _("Prevents the foes escape.");
static const u8 gRoughSkinAbilityDescription[] = _("Hurts to touch.");
static const u8 gWonderGuardAbilityDescription[] = _("“Super effective” hits.");
static const u8 gLevitateAbilityDescription[] = _("Not hit by GROUND attacks.");
static const u8 gEffectSporeAbilityDescription[] = _("Leaves spores on contact.");
static const u8 gSynchronizeAbilityDescription[] = _("Passes on status problems.");
static const u8 gClearBodyAbilityDescription[] = _("Prevents ability reduction.");
static const u8 gNaturalCureAbilityDescription[] = _("Heals upon switching out.");
static const u8 gLightningRodAbilityDescription[] = _("Draws electrical moves.");
static const u8 gSereneGraceAbilityDescription[] = _("Promotes added effects.");
static const u8 gSwiftSwimAbilityDescription[] = _("Raises SPEED in rain.");
static const u8 gChlorophyllAbilityDescription[] = _("Raises SPEED in sunshine.");
static const u8 gIlluminateAbilityDescription[] = _("Encounter rate increases.");
static const u8 gTraceAbilityDescription[] = _("Copies special ability.");
static const u8 gHugePowerAbilityDescription[] = _("Raises ATTACK.");
static const u8 gPoisonPointAbilityDescription[] = _("Poisons foe on contact.");
static const u8 gInnerFocusAbilityDescription[] = _("Prevents flinching.");
static const u8 gMagmaArmorAbilityDescription[] = _("Prevents freezing.");
static const u8 gWaterVeilAbilityDescription[] = _("Prevents burns.");
static const u8 gMagnetPullAbilityDescription[] = _("Traps STEEL-type POKéMON.");
static const u8 gSoundproofAbilityDescription[] = _("Avoids sound-based moves.");
static const u8 gRainDishAbilityDescription[] = _("Slight HP recovery in rain.");
static const u8 gSandStreamAbilityDescription[] = _("Summons a sandstorm.");
static const u8 gPressureAbilityDescription[] = _("Raises foes PP usage.");
static const u8 gThickFatAbilityDescription[] = _("Heat-and-cold protection.");
static const u8 gEarlyBirdAbilityDescription[] = _("Awakens quickly from sleep.");
static const u8 gFlameBodyAbilityDescription[] = _("Burns the foe on contact.");
static const u8 gRunAwayAbilityDescription[] = _("Makes escaping easier.");
static const u8 gKeenEyeAbilityDescription[] = _("Prevents loss of accuracy.");
static const u8 gHyperCutterAbilityDescription[] = _("Prevents ATTACK reduction.");
static const u8 gPickupAbilityDescription[] = _("May pick up items.");
static const u8 gTruantAbilityDescription[] = _("Moves only every two turns.");
static const u8 gHustleAbilityDescription[] = _("Trades accuracy for power.");
static const u8 gCuteCharmAbilityDescription[] = _("Infatuates on contact.");
static const u8 gPlusAbilityDescription[] = _("Powers up with MINUS.");
static const u8 gMinusAbilityDescription[] = _("Powers up with PLUS.");
static const u8 gForecastAbilityDescription[] = _("Changes with the weather.");
static const u8 gStickyHoldAbilityDescription[] = _("Prevents item theft.");
static const u8 gShedSkinAbilityDescription[] = _("Heals the body by shedding.");
static const u8 gGutsAbilityDescription[] = _("Ups ATTACK if suffering.");
static const u8 gMarvelScaleAbilityDescription[] = _("Ups DEFENSE if suffering.");
static const u8 gLiquidOozeAbilityDescription[] = _("Draining causes injury.");
static const u8 gOvergrowAbilityDescription[] = _("Ups GRASS moves in a pinch.");
static const u8 gBlazeAbilityDescription[] = _("Ups FIRE moves in a pinch.");
static const u8 gTorrentAbilityDescription[] = _("Ups WATER moves in a pinch.");
static const u8 gSwarmAbilityDescription[] = _("Ups BUG moves in a pinch.");
static const u8 gRockHeadAbilityDescription[] = _("Prevents recoil damage.");
static const u8 gDroughtAbilityDescription[] = _("Summons sunlight in battle.");
static const u8 gArenaTrapAbilityDescription[] = _("Prevents fleeing.");
static const u8 gVitalSpiritAbilityDescription[] = _("Prevents sleep.");
static const u8 gWhiteSmokeAbilityDescription[] = _("Prevents ability reduction.");
static const u8 gPurePowerAbilityDescription[] = _("Raises ATTACK.");
static const u8 gShellArmorAbilityDescription[] = _("Blocks critical hits.");
static const u8 gCacophonyAbilityDescription[] = _("Avoids sound-based moves.");
static const u8 gAirLockAbilityDescription[] = _("Negates weather effects.");
const u8 gAbilityNames[][ABILITY_NAME_LENGTH + 1] =
{
_("-------"),
_("STENCH"),
_("DRIZZLE"),
_("SPEED BOOST"),
_("BATTLE ARMOR"),
_("STURDY"),
_("DAMP"),
_("LIMBER"),
_("SAND VEIL"),
_("STATIC"),
_("VOLT ABSORB"),
_("WATER ABSORB"),
_("OBLIVIOUS"),
_("CLOUD NINE"),
_("COMPOUNDEYES"),
_("INSOMNIA"),
_("COLOR CHANGE"),
_("IMMUNITY"),
_("FLASH FIRE"),
_("SHIELD DUST"),
_("OWN TEMPO"),
_("SUCTION CUPS"),
_("INTIMIDATE"),
_("SHADOW TAG"),
_("ROUGH SKIN"),
_("WONDER GUARD"),
_("LEVITATE"),
_("EFFECT SPORE"),
_("SYNCHRONIZE"),
_("CLEAR BODY"),
_("NATURAL CURE"),
_("LIGHTNINGROD"),
_("SERENE GRACE"),
_("SWIFT SWIM"),
_("CHLOROPHYLL"),
_("ILLUMINATE"),
_("TRACE"),
_("HUGE POWER"),
_("POISON POINT"),
_("INNER FOCUS"),
_("MAGMA ARMOR"),
_("WATER VEIL"),
_("MAGNET PULL"),
_("SOUNDPROOF"),
_("RAIN DISH"),
_("SAND STREAM"),
_("PRESSURE"),
_("THICK FAT"),
_("EARLY BIRD"),
_("FLAME BODY"),
_("RUN AWAY"),
_("KEEN EYE"),
_("HYPER CUTTER"),
_("PICKUP"),
_("TRUANT"),
_("HUSTLE"),
_("CUTE CHARM"),
_("PLUS"),
_("MINUS"),
_("FORECAST"),
_("STICKY HOLD"),
_("SHED SKIN"),
_("GUTS"),
_("MARVEL SCALE"),
_("LIQUID OOZE"),
_("OVERGROW"),
_("BLAZE"),
_("TORRENT"),
_("SWARM"),
_("ROCK HEAD"),
_("DROUGHT"),
_("ARENA TRAP"),
_("VITAL SPIRIT"),
_("WHITE SMOKE"),
_("PURE POWER"),
_("SHELL ARMOR"),
_("CACOPHONY"),
_("AIR LOCK"),
};
const u8 *const gAbilityDescriptionPointers[] =
{
gNoneAbilityDescription,
gStenchAbilityDescription,
gDrizzleAbilityDescription,
gSpeedBoostAbilityDescription,
gBattleArmorAbilityDescription,
gSturdyAbilityDescription,
gDampAbilityDescription,
gLimberAbilityDescription,
gSandVeilAbilityDescription,
gStaticAbilityDescription,
gVoltAbsorbAbilityDescription,
gWaterAbsorbAbilityDescription,
gObliviousAbilityDescription,
gCloudNineAbilityDescription,
gCompoundEyesAbilityDescription,
gInsomniaAbilityDescription,
gColorChangeAbilityDescription,
gImmunityAbilityDescription,
gFlashFireAbilityDescription,
gShieldDustAbilityDescription,
gOwnTempoAbilityDescription,
gSuctionCupsAbilityDescription,
gIntimidateAbilityDescription,
gShadowTagAbilityDescription,
gRoughSkinAbilityDescription,
gWonderGuardAbilityDescription,
gLevitateAbilityDescription,
gEffectSporeAbilityDescription,
gSynchronizeAbilityDescription,
gClearBodyAbilityDescription,
gNaturalCureAbilityDescription,
gLightningRodAbilityDescription,
gSereneGraceAbilityDescription,
gSwiftSwimAbilityDescription,
gChlorophyllAbilityDescription,
gIlluminateAbilityDescription,
gTraceAbilityDescription,
gHugePowerAbilityDescription,
gPoisonPointAbilityDescription,
gInnerFocusAbilityDescription,
gMagmaArmorAbilityDescription,
gWaterVeilAbilityDescription,
gMagnetPullAbilityDescription,
gSoundproofAbilityDescription,
gRainDishAbilityDescription,
gSandStreamAbilityDescription,
gPressureAbilityDescription,
gThickFatAbilityDescription,
gEarlyBirdAbilityDescription,
gFlameBodyAbilityDescription,
gRunAwayAbilityDescription,
gKeenEyeAbilityDescription,
gHyperCutterAbilityDescription,
gPickupAbilityDescription,
gTruantAbilityDescription,
gHustleAbilityDescription,
gCuteCharmAbilityDescription,
gPlusAbilityDescription,
gMinusAbilityDescription,
gForecastAbilityDescription,
gStickyHoldAbilityDescription,
gShedSkinAbilityDescription,
gGutsAbilityDescription,
gMarvelScaleAbilityDescription,
gLiquidOozeAbilityDescription,
gOvergrowAbilityDescription,
gBlazeAbilityDescription,
gTorrentAbilityDescription,
gSwarmAbilityDescription,
gRockHeadAbilityDescription,
gDroughtAbilityDescription,
gArenaTrapAbilityDescription,
gVitalSpiritAbilityDescription,
gWhiteSmokeAbilityDescription,
gPurePowerAbilityDescription,
gShellArmorAbilityDescription,
gCacophonyAbilityDescription,
gAirLockAbilityDescription,
};
#endif // POKEEMERALD_DATA_TEXT_ABILITIES_H

View File

@@ -14,8 +14,6 @@ extern struct MonCoords gTrainerFrontPicCoords[];
extern const u8 gSpeciesNames[][POKEMON_NAME_LENGTH + 1];
extern const u8 gMoveNames[][13];
extern const u8 gAbilityNames[][13];
extern const u8 gTypeNames[][7];
extern struct CompressedSpriteSheet gUnknown_0831C620;
extern struct CompressedSpritePalette gUnknown_0831C628;
extern const struct SpriteTemplate gUnknown_0831C688;

View File

@@ -0,0 +1,87 @@
#ifndef GUARD_TRAINER_REMATCH_H
#define GUARD_TRAINER_REMATCH_H
enum {
REMATCH_ROSE,
REMATCH_ANDRES,
REMATCH_DUSTY,
REMATCH_LOLA,
REMATCH_RICKY,
REMATCH_LILA_AND_ROY,
REMATCH_CRISTIN,
REMATCH_BROOKE,
REMATCH_WILTON,
REMATCH_VALERIE,
REMATCH_CINDY,
REMATCH_THALIA,
REMATCH_JESSICA,
REMATCH_WINSTON,
REMATCH_STEVE,
REMATCH_TONY,
REMATCH_NOB,
REMATCH_KOJI,
REMATCH_FERNANDO,
REMATCH_DALTON,
REMATCH_BERNIE,
REMATCH_ETHAN,
REMATCH_JOHN_AND_JAY,
REMATCH_JEFFREY,
REMATCH_CAMERON,
REMATCH_JACKI,
REMATCH_WALTER,
REMATCH_KAREN,
REMATCH_JERRY,
REMATCH_ANNA_AND_MEG,
REMATCH_ISABEL,
REMATCH_MIGUEL,
REMATCH_TIMOTHY,
REMATCH_SHELBY,
REMATCH_CALVIN,
REMATCH_ELLIOT,
REMATCH_ISAIAH,
REMATCH_MARIA,
REMATCH_ABIGAIL,
REMATCH_DYLAN,
REMATCH_KATELYN,
REMATCH_BENJAMIN,
REMATCH_PABLO,
REMATCH_NICOLAS,
REMATCH_ROBERT,
REMATCH_LAO,
REMATCH_CYNDY,
REMATCH_MADELINE,
REMATCH_JENNY,
REMATCH_DIANA,
REMATCH_AMY_AND_LIV,
REMATCH_ERNEST,
REMATCH_CORY,
REMATCH_EDWIN,
REMATCH_LYDIA,
REMATCH_ISAAC,
REMATCH_GABRIELLE,
REMATCH_CATHERINE,
REMATCH_JACKSON,
REMATCH_HALEY,
REMATCH_JAMES,
REMATCH_TRENT,
REMATCH_SAWYER,
REMATCH_KIRA_AND_DAN,
REMATCH_WALLY_3,
REMATCH_ROXANNE,
REMATCH_BRAWLY,
REMATCH_WATTSON,
REMATCH_FLANNERY,
REMATCH_NORMAN,
REMATCH_WINONA,
REMATCH_TATE_AND_LIZA,
REMATCH_JUAN,
REMATCH_SIDNEY,
REMATCH_PHOEBE,
REMATCH_GLACIA,
REMATCH_DRAKE,
REMATCH_WALLACE
};
void UpdateGymLeaderRematch(void);
#endif //GUARD_TRAINER_REMATCH_H

View File

@@ -468,6 +468,7 @@ extern struct Pokemon gEnemyParty[PARTY_SIZE];
extern struct SpriteTemplate gUnknown_0202499C;
extern struct PokemonStorage* gPokemonStoragePtr;
extern const struct BattleMove gBattleMoves[];
extern const u8 gFacilityClassToPicIndex[];
extern const u8 gFacilityClassToTrainerClass[];
extern const struct BaseStats gBaseStats[];