forked from DizzyEggg/pokeemerald
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* consolidated gimmick checks, triggers, communication, and activation; updated test runner * fixed improper use of .usableGimmick * cleaning up battle_dynamax.c, changing function args to u32s * fixed '#ifdef TESTING' causing errors * updated z-moves to use gimmick interface, pared down redundancies; no AI/tests * added support for z-moves in tests, consolidated gimmick fields * removed ShouldUseMaxMove and .usingMaxMove * renamed TryChangeZIndicator, updated z move display * added several z-move tests and fixed various z-move interactions; fixed z-move category calc * fixed useless battler arg in GetTypeBasedZMove * added basic test check for bad Z-Move or Mega usage * reworked test runner gimmick functionality; added support for Ultra Burst + Z-Move to test Light That Burns the Sky * fixed gimmick test logic; fixed damage category override * fixed mega rayquaza test fail * consolidated gimmick indicator logic; added graphics to gGimmicksInfo * removed TeraData struct * reimplemented AI logic for Z-Moves; no changes * updated Z-Move and Ultra Burst trigger gfx * added testrunner check for multiple gimmick use * fixed duplicate z-move call in test * reorganized data/graphics/gimmicks.h * added signature Z-Move ability tests; implemented Guardian of Alola * fixed bad test update * fixed Thousand Arrows not affecting Tera Flying; clean-up * fixed -ate tests * fixed tera tests * fixed tera tests really * fixed last batch of tests * fixed -ate mega test again * code review * code review pt.2 * tweaked CanTera again * dynamax flag only required for player
- Loading branch information
1 parent
2640bcd
commit 9797640
Showing
53 changed files
with
2,207 additions
and
2,657 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#ifndef GUARD_BATTLE_GIMMICK_H | ||
#define GUARD_BATTLE_GIMMICK_H | ||
|
||
enum Gimmick | ||
{ | ||
GIMMICK_NONE, | ||
GIMMICK_MEGA, | ||
GIMMICK_ULTRA_BURST, | ||
GIMMICK_Z_MOVE, | ||
GIMMICK_DYNAMAX, | ||
GIMMICK_TERA, | ||
GIMMICKS_COUNT, | ||
}; | ||
|
||
struct GimmickInfo | ||
{ | ||
const struct SpritePalette *triggerPal; // trigger gfx data | ||
const struct SpriteSheet *triggerSheet; | ||
const struct SpriteTemplate *triggerTemplate; | ||
const struct SpritePalette *indicatorPal; // indicator gfx data | ||
const struct SpriteSheet *indicatorSheet; | ||
bool32 (*CanActivate)(u32 battler); | ||
void (*ActivateGimmick)(u32 battler); | ||
}; | ||
|
||
void AssignUsableGimmicks(void); | ||
bool32 CanActivateGimmick(u32 battler, enum Gimmick gimmick); | ||
bool32 IsGimmickSelected(u32 battler, enum Gimmick gimmick); | ||
void SetActiveGimmick(u32 battler, enum Gimmick gimmick); | ||
enum Gimmick GetActiveGimmick(u32 battler); | ||
bool32 ShouldTrainerBattlerUseGimmick(u32 battler, enum Gimmick gimmick); | ||
bool32 HasTrainerUsedGimmick(u32 battler, enum Gimmick gimmick); | ||
void SetGimmickAsActivated(u32 battler, enum Gimmick gimmick); | ||
|
||
void ChangeGimmickTriggerSprite(u32 spriteId, u32 animId); | ||
void CreateGimmickTriggerSprite(u32 battler); | ||
bool32 IsGimmickTriggerSpriteActive(void); | ||
void HideGimmickTriggerSprite(void); | ||
void DestroyGimmickTriggerSprite(void); | ||
|
||
void LoadIndicatorSpritesGfx(void); | ||
u32 GetIndicatorTileTag(u32 battler); | ||
u32 GetIndicatorPalTag(u32 battler); | ||
void UpdateIndicatorVisibilityAndType(u32 healthboxId, bool32 invisible); | ||
void UpdateIndicatorOamPriority(u32 healthboxId, u32 oamPriority); | ||
void UpdateIndicatorLevelData(u32 healthboxId, u32 level); | ||
void CreateIndicatorSprite(u32 battler); | ||
|
||
extern const struct GimmickInfo gGimmicksInfo[]; | ||
|
||
#endif |
Oops, something went wrong.