Gen 4+ moves get contest effects (#319)

* Add contest move effects

* Fix constants and also fix some laughable combo coding

* comment usum moves for cleaner merge

* clean up gitignore

* revert gitignore

* also revert moves.h because I'm bad at reading messages

* add some missing effects because the spreadsheet I sourced is bad
This commit is contained in:
MandL27 2020-04-13 09:05:10 -04:00 committed by GitHub
parent cb5b673f8a
commit 2c9ee80004
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 2887 additions and 371 deletions

View File

@ -69,68 +69,90 @@ enum
enum
{
COMBO_STARTER_RAIN_DANCE = 1,
COMBO_STARTER_RAGE,
COMBO_STARTER_FOCUS_ENERGY,
COMBO_STARTER_HYPNOSIS,
COMBO_STARTER_ENDURE,
COMBO_STARTER_HORN_ATTACK,
COMBO_STARTER_SWORDS_DANCE,
COMBO_STARTER_STOCKPILE,
COMBO_STARTER_SUNNY_DAY,
COMBO_STARTER_REST,
COMBO_STARTER_VICE_GRIP,
COMBO_STARTER_DEFENSE_CURL,
COMBO_STARTER_CHARGE,
COMBO_STARTER_ROCK_THROW,
COMBO_STARTER_YAWN,
COMBO_STARTER_SCARY_FACE,
COMBO_STARTER_POWDER_SNOW,
COMBO_STARTER_LOCK_ON,
COMBO_STARTER_SOFT_BOILED,
COMBO_STARTER_MEAN_LOOK,
COMBO_STARTER_SCRATCH,
COMBO_STARTER_GROWTH,
COMBO_STARTER_HAIL,
COMBO_STARTER_SANDSTORM,
COMBO_STARTER_BELLY_DRUM,
COMBO_STARTER_MIND_READER,
COMBO_STARTER_DRAGON_BREATH,
COMBO_STARTER_DRAGON_RAGE,
COMBO_STARTER_DRAGON_DANCE,
COMBO_STARTER_SURF,
COMBO_STARTER_DIVE,
COMBO_STARTER_STRING_SHOT,
COMBO_STARTER_LEER,
COMBO_STARTER_TAUNT,
COMBO_STARTER_CHARM,
COMBO_STARTER_HARDEN,
COMBO_STARTER_SING,
COMBO_STARTER_EARTHQUAKE,
COMBO_STARTER_DOUBLE_TEAM,
COMBO_STARTER_CURSE,
COMBO_STARTER_SWEET_SCENT,
COMBO_STARTER_SLUDGE,
COMBO_STARTER_SLUDGE_BOMB,
COMBO_STARTER_THUNDER_PUNCH,
COMBO_STARTER_POUND = 1,
COMBO_STARTER_FIRE_PUNCH,
COMBO_STARTER_ICE_PUNCH,
COMBO_STARTER_PECK,
COMBO_STARTER_METAL_SOUND,
COMBO_STARTER_MUD_SPORT,
COMBO_STARTER_WATER_SPORT,
COMBO_STARTER_BONE_CLUB,
COMBO_STARTER_BONEMERANG,
COMBO_STARTER_BONE_RUSH,
COMBO_STARTER_THUNDER_PUNCH,
COMBO_STARTER_SCRATCH,
COMBO_STARTER_VICE_GRIP,
COMBO_STARTER_SWORDS_DANCE,
COMBO_STARTER_SAND_ATTACK,
COMBO_STARTER_MUD_SLAP,
COMBO_STARTER_FAKE_OUT,
COMBO_STARTER_PSYCHIC,
COMBO_STARTER_KINESIS,
COMBO_STARTER_HORN_ATTACK,
COMBO_STARTER_LEER,
COMBO_STARTER_SING,
COMBO_STARTER_SURF,
COMBO_STARTER_PECK,
COMBO_STARTER_LEECH_SEED,
COMBO_STARTER_GROWTH,
COMBO_STARTER_STRING_SHOT,
COMBO_STARTER_DRAGON_RAGE,
COMBO_STARTER_ROCK_THROW,
COMBO_STARTER_EARTHQUAKE,
COMBO_STARTER_TOXIC,
COMBO_STARTER_CONFUSION,
COMBO_STARTER_POUND,
COMBO_STARTER_PSYCHIC,
COMBO_STARTER_HYPNOSIS,
COMBO_STARTER_RAGE,
COMBO_STARTER_DOUBLE_TEAM,
COMBO_STARTER_HARDEN,
COMBO_STARTER_DEFENSE_CURL,
COMBO_STARTER_FOCUS_ENERGY,
COMBO_STARTER_SMOG,
COMBO_STARTER_CALM_MIND
COMBO_STARTER_SLUDGE,
COMBO_STARTER_BONE_CLUB,
COMBO_STARTER_KINESIS,
COMBO_STARTER_SOFT_BOILED,
COMBO_STARTER_BONEMERANG,
COMBO_STARTER_REST,
COMBO_STARTER_MIND_READER,
COMBO_STARTER_CURSE,
COMBO_STARTER_POWDER_SNOW,
COMBO_STARTER_SCARY_FACE,
COMBO_STARTER_BELLY_DRUM,
COMBO_STARTER_SLUDGE_BOMB,
COMBO_STARTER_MUD_SLAP,
COMBO_STARTER_BONE_RUSH,
COMBO_STARTER_LOCK_ON,
COMBO_STARTER_SANDSTORM,
COMBO_STARTER_ENDURE,
COMBO_STARTER_CHARM,
COMBO_STARTER_MEAN_LOOK,
COMBO_STARTER_HEAL_BELL,
COMBO_STARTER_DRAGON_BREATH,
COMBO_STARTER_SWEET_SCENT,
COMBO_STARTER_RAIN_DANCE,
COMBO_STARTER_SUNNY_DAY,
COMBO_STARTER_FAKE_OUT,
COMBO_STARTER_STOCKPILE,
COMBO_STARTER_HAIL,
COMBO_STARTER_CHARGE,
COMBO_STARTER_TAUNT,
COMBO_STARTER_REVENGE,
COMBO_STARTER_YAWN,
COMBO_STARTER_DIVE,
COMBO_STARTER_MUD_SPORT,
COMBO_STARTER_METAL_SOUND,
COMBO_STARTER_WATER_SPORT,
COMBO_STARTER_CALM_MIND,
COMBO_STARTER_DRAGON_DANCE,
COMBO_STARTER_PAYBACK,
COMBO_STARTER_LUCKY_CHANT,
COMBO_STARTER_WORRY_SEED,
COMBO_STARTER_DRAGON_RUSH,
COMBO_STARTER_BRAVE_BIRD,
COMBO_STARTER_THUNDER_FANG,
COMBO_STARTER_ICE_FANG,
COMBO_STARTER_FIRE_FANG,
COMBO_STARTER_ATTACK_ORDER,
COMBO_STARTER_DEFEND_ORDER,
COMBO_STARTER_HEAL_ORDER,
COMBO_STARTER_SCALD,
COMBO_STARTER_DRAGON_TAIL,
COMBO_STARTER_HYPERSPACE_HOLE,
COMBO_STARTER_THOUSAND_ARROWS,
COMBO_STARTER_THOUSAND_WAVES,
COMBO_STARTER_HYPERSPACE_FURY,
COMBO_STARTER_SHADOW_BONE
};
enum

View File

@ -1,12 +1,13 @@
#ifndef GUARD_CONTEST_EFFECT_H
#define GUARD_CONTEST_EFFECT_H
#define MAX_COMBO_MOVES 5
struct ContestMove
{
u8 effect;
u8 contestCategory:3;
u8 comboStarterId;
u8 comboMoves[4];
u8 comboMoves[MAX_COMBO_MOVES];
};
struct ContestEffect

View File

@ -59,19 +59,22 @@ static s16 RoundUp(s16);
bool8 AreMovesContestCombo(u16 lastMove, u16 nextMove)
{
u8 nextMoveComboMoves[4];
u8 lastMoveComboStarterId = gContestMoves[lastMove].comboStarterId;
nextMoveComboMoves[0] = gContestMoves[nextMove].comboMoves[0];
nextMoveComboMoves[1] = gContestMoves[nextMove].comboMoves[1];
nextMoveComboMoves[2] = gContestMoves[nextMove].comboMoves[2];
nextMoveComboMoves[3] = gContestMoves[nextMove].comboMoves[3];
if (lastMoveComboStarterId == 0)
{
return FALSE;
else if (lastMoveComboStarterId == nextMoveComboMoves[0] || lastMoveComboStarterId == nextMoveComboMoves[1] || lastMoveComboStarterId == nextMoveComboMoves[2] || lastMoveComboStarterId == nextMoveComboMoves[3])
return gComboStarterLookupTable[lastMoveComboStarterId];
}
else
{
int i;
for (i = 0; i < MAX_COMBO_MOVES; i++)
{
if (lastMoveComboStarterId == gContestMoves[nextMove].comboMoves[i])
return TRUE;
}
return FALSE;
}
}
// A highly appealing move.
@ -424,7 +427,7 @@ static void ContestEffect_MakeFollowingMonsNervous(void)
for (i = 0; i < 4; i++)
{
if (eContestantStatus[i].hasJudgesAttention && sub_80DE1E8(i))
oddsMod[i] = gComboStarterLookupTable[gContestMoves[eContestantStatus[i].prevMove].comboStarterId] * 10;
oddsMod[i] = gContestMoves[eContestantStatus[i].prevMove].comboStarterId == 0 ? 0 : 10;
else
oddsMod[i] = 0;
oddsMod[i] -= (eContestantStatus[i].condition / 10) * 10;

File diff suppressed because it is too large Load Diff