42 Commits

Author SHA1 Message Date
Martin Griffin
3ad66028e9
Backwards-compatible BoxPokémon Refactor (#3438)
* Check progress in non-battle PARAMETRIZEd tests

* Overworld Script Tests

* Backward-compatible BoxPokemon Refactor

Reuses space that contains zeros to provide space for:
- HP/status in the box
- 12-character nicknames
- Up to 63 PokéBalls
- Shininess separate from PID
- Hidden Nature
- Hyper Training
- Dynamax Level
- Gigantamax Factor
- Terastallization Types
- Shadow

Implements:
- OW_PC_HEAL to switch between Gen7- and Gen8+ behavior
- Nature Mints
- Dynamax Candy
- Hyper Training commands (canhypertrain/hypertrain)
- Gigantamax Factor commands (hasgigantamaxfactor/togglegigantamaxfactor)
- Terastallization Type on the summary screen
- Prevents Gigantamax Factor Pokémon from evolving into a species without a Gigantamax form

* fixup! Backward-compatible BoxPokemon Refactor

* displaydexinfo fix from Jasper
2023-12-27 17:48:17 +01:00
tertu
fb28ce50ae
Optional high-quality RNG (#3780)
High-quality RNG, behind the HQ_RANDOM flag, enabled by default

Makes the shuffle test error a bit more tolerant
2023-12-22 17:39:15 +00:00
psf
493478e94b
Added support for XY's Sky Battles (#2950)
* Original implementation from Phlayne

* Moved Sky Battle Flag / Var into a config

* Optimized existing code and fixed existing bugs

Added error message for when sky battle var and flag are not set
Merged CanDoSkyBattle and PrepareSkyBattle into one special

* Added compatibility for Gen7+

* Commented out Volt Crash from banned moves

* Cleaned up debug scripts from testing

* Fixed bug where player did not white out even if they had no healthy Pokémon and only an egg
Zeroed out both Sky Battle configs

* Removed extra include from src/field_specials.c
Removed extra line break in src/battle_script_commands.c

* Added FLAG_DISABLED_IN_SKY_BATTLE
Added FLAG_DISABLED_IN_SKY_BATTLE to appropriate moves

* Changed DoesSkyBattleCancelCurrentMove to look at move flags

* Fixed alignment and spacing in battle_moves.h

* Added FLAG_DISABLED_IN_SKY_BATTLE to Sticky Web

* Added FLAG_DISABLED_IN_SKY_BATTLE to Steel Roller

* Disabled the ability to change Battle Terrain when Sky Battle is happening
Stopped Ceaseless Edge from spawning Spikes when Sky Battle is happening
Added B_SKY_BATTLE_STRICT_MECHANICS config

* Fixed bug with SKY_BATTLE_STRICT_MECHANICS where conditions were not consistently being applied

* Add rulesVariants to the BattleStruct
Added skyBattle check in AllocateBattleResources

* Replaced B_FLAG_SKY_BATTLE checks with rulesVariants.skyBattle checks

* Fixed debug script

* Reverted include/config/battle.h

* Fixed spacing and placement of functions

* Fixed debug script omission
Fixed bug where Spikes did not set from Ceaseless Edge and Stone Axe

* Added FLAG_DISABLED_IN_SKY_BATTLE to Psychic Terrain

* Addressed DizzyEgg PR feedback

* Forgot a file in last commit

* Addressed feedback from DizzyEggg

* Address Lunos' PR feedback

* Update specials.inc

Added an empty line at the end of data/specials.inc

* Fixed spacing

* Apply suggestions from code review

Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>

* Updated skyBattleBanned and HandleBattleVariantEndParty to use correct names

* Removed STRICT_MOVES and STRICT_MECHANICS

* Fixed minor spacing issues with merge

* Merged in upcoming

* Implemented feedback from Jasper
5da6117d1b

---------

Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
2023-11-26 16:59:44 +01:00
sbird
3a0759d458 [doc] fix misnamed dma <--> aslr 2022-09-07 14:37:03 +02:00
Eduardo Quezada
13672680b0 void pointer standarized 2022-07-29 10:52:35 -04:00
GriffinR
159bb37bbe
Merge branch 'master' into fix_saveblock_reorder 2021-11-13 23:19:57 -05:00
ProjectRevoTPP
9d3345a6d6 Enforce structs to enforce save block order for modern toolchains. 2021-11-13 21:41:16 -05:00
GriffinR
adf773f1ed Document remainder of save.c 2021-11-08 19:45:14 -05:00
GriffinR
7f3c529935 Document record mixing mail swap 2021-10-24 15:49:19 -04:00
GriffinR
4efa6c882a Continue misc link documentation, rename reset_save_heap 2021-10-05 23:37:54 -04:00
GriffinR
8c6e89e994 Bit shifts from hex to decimal 2021-03-30 17:38:09 -04:00
GriffinR
82cb741d8b Standardize EVENT_OBJECT to OBJECT_EVENT 2019-11-20 23:12:51 -05:00
GriffinR
ec3e86f1d2 Standardize Event Object to Object Event 2019-11-20 22:55:44 -05:00
PikalaxALT
306ce048ad Move gflib srcs and headers to gflib subdir 2019-09-08 21:07:54 -04:00
PikalaxALT
b839c21307 Fix/suppress warnings when building with gcc-8 2019-06-26 16:42:57 -04:00
Marcus Huderle
cf917a8733 Decompile berry_powder.c 2019-03-24 14:50:16 -05:00
Phlosioneer
5886f82ef5 Merge branch 'master' into extern-cleanup 2019-03-08 02:45:26 -05:00
Phlosioneer
ee69426838 Eliminate more externs 2019-03-02 02:44:02 -05:00
Phlosioneer
a7e5852f1d More minor fixes 2019-03-01 01:49:11 -05:00
Phlosioneer
66f0616a2d I guess I'm documenting Trainer Hill now 2019-02-27 21:31:05 -05:00
DizzyEggg
c0bc01d301 Move some vars to C 2019-01-13 13:15:23 +01:00
Marcus Huderle
d59f5a8e56 Misc overworld documentation 2018-12-27 16:52:13 -06:00
DizzyEggg
ecee02816d Merge with master 2018-12-20 22:53:08 +01:00
nullableVoidPtr
3909b6408c Fix alloc.c as per #386, define INVALID_ constants and rename malloc to alloc as per #325
Some of the INVALID_ are likely erroneously placed, due to lack of documentation
2018-12-06 09:44:08 +08:00
DizzyEggg
7ce3473b0e Clean up save related files 2018-11-18 19:37:18 +01:00
Diegoisawesome
97bbb326b8 GameClear nonsense 2018-10-20 19:53:41 -05:00
DizzyEggg
1e9143e0b2 merge union room with master 2018-07-22 13:14:58 +02:00
Marcus Huderle
aa9a45c16f Rebrand 'map object' and 'field object' to 'event object' 2018-06-11 19:11:48 -05:00
DizzyEggg
dbb9cdd424 more link stuff 2018-06-04 12:07:32 +02:00
DizzyEggg
fd40e93cb5 clear item, save and load save files 2018-04-29 14:21:59 +02:00
DizzyEggg
94b47c0686 decompile overworld 2018-02-14 00:58:22 +01:00
camthesaxman
601ec28721 remove explicit memcpy and add HEAP_SIZE constant 2018-01-06 00:35:48 -06:00
camthesaxman
462a0030ae match MoveSaveBlocks_ResetHeap 2018-01-06 00:17:31 -06:00
DizzyEggg
44abbae60b nerge with master, fix conflicts 2017-12-16 01:08:55 +01:00
camthesaxman
00896cb3b5 rename rng.c to random.c and rom4.c to overworld.c 2017-12-05 12:27:33 -06:00
ProjectRevoTPP
e6bcfee668 Encyprtion 2017-11-27 15:20:10 -05:00
ProjectRevoTPP
9644f44982 finish load_save.c 2017-11-22 21:06:30 -05:00
ProjectRevoTPP
161a37809b nonmatching MoveSaveBlocks_ResetHeap (i tried...) 2017-11-21 21:25:01 -05:00
PikalaxALT
16f2e40576 Fix naming conflicts 2017-09-17 23:42:44 -04:00
DizzyEggg
1680fc0b81 start start menu decomp 2017-09-05 13:01:24 +02:00
DizzyEggg
2702b0ec9b decomp calc dmg and clean up battle ai 2017-09-04 21:43:13 +02:00
DizzyEggg
92892d140a begin load_save.c 2017-09-04 18:26:39 +02:00