284 Commits

Author SHA1 Message Date
adrianrfreedman f7d15f0cfd Add NUM_TRAINERTYPES and assert the TrainerTypes table length (#1268) 2026-09-29 09:47:32 -04:00
Rangi cb752f33fd Change unused battle command and unused tileset anims labels to match pokegold-spaceworld (#1262) 2026-06-28 13:02:18 -04:00
Narishma-gb cbafcfea64 Add some comments/constants, minor fixes (#1255) 2026-06-08 13:33:11 -04:00
Rangi 1c1bc6b31f Remove the spurious WEATHER_*_END constants
These were probably a mistake from confusing two consecutive
pointer tables, `.WeatherMessages` and `.WeatherEndedMessages`,
with one long table
2026-06-07 21:32:02 -04:00
MichailTalReborn 983c33b5c9 Document bug: AI does not discourage Nightmare if the player has any status condition (#1242) 2026-03-12 11:44:29 -04:00
Jordan Moore 2bbb15675d Replace magic numbers with constants in engine/battle/ai/switch.asm (#1216) 2025-12-29 18:48:23 -05:00
SourApple e286a5f098 Bug: AI use of Full Heal or Full Restore does not cure Attack or Speed drops from burn or paralysis
Co-authored-by: Rangi <35663410+Rangi42@users.noreply.github.com>
2025-12-14 16:04:26 -05:00
Rangi a55bc33d67 Use features of RGBDS 1.0.0 (#1204)
- Use single-quoted character literals or `CHARVAL` when you need
  a character's numeric value; using strings as numbers is deprecated
- Use `?` to silence a node in warning/error location backtraces
- Use `===` and `!==` instead of `STRCMP`, and `++` instead of `STRCAT`
- Use `__SCOPE__` instead of checking for `..` and `.` separately
- Use `#string` instead of `"{string}"`
- All programs (rgbasm, rgblink, rgbfix, rgbgfx) support `-W` warnings
- `rgbgfx --colors dmg` is short for `rgbgfx --colors dmg=e4`
2025-11-12 15:43:54 -05:00
Rangi42 5abf8d01fb Update hardware.inc to 5.1.0 2025-06-30 12:47:36 -04:00
Rangi 4c540aa43b Replace hardware_constants.asm with the community-standard hardware.inc 5.0 (#1186) 2025-06-23 09:11:33 -04:00
Rangi efceed1338 Use offsets from ANIM_* constants for wBattleAfterAnim (formerly wNumHits) (#1184) 2025-05-31 15:07:56 -04:00
Rangi fd2af282b6 Add a CANNOT_MOVE constant (#1182) 2025-05-31 15:07:34 -04:00
Hannabart Pekopon 34aae0d20f Added bug fix for: "Cautious" AI may fail to discourage residual moves (#1178) 2025-05-31 15:07:23 -04:00
Jordan Moore 86a87a355e Remove "skip" prefix from AI move score labels (#1163) 2024-12-29 15:31:50 -05:00
Hannabart Pekopon 3f686e67da Correct wrong and misleading comments about enemy trainer AI (#1149) 2024-12-26 08:59:18 -05:00
Rangi 61c9ba5f6c Use RGBDS 0.9.0 (#1159) 2024-12-25 21:24:37 -05:00
Jordan Moore d323aa83dd Rename checkcurl to checkrollout 2024-12-25 12:17:14 +01:00
Rangi42 cbfd48b8d1 Use SERIAL_RNS_LENGTH in _BattleRandom 2024-12-21 21:04:21 -05:00
Rangi42 e1e7cbd838 Bit 7 of wJumptableIndex is often JUMPTABLE_EXIT_F 2024-12-02 12:16:30 -05:00
Sylvie 644bd42fb0 Identify more bit flags (#1153) 2024-11-29 19:29:30 -05:00
Rangi42 961fad9e15 Fix AI_Smart_Curse labels
Fixes #1130
2024-10-17 17:12:19 -04:00
vulcandth 9ae05312d6 Use NUM_TRAINER_ATTRIBUTES const in AI scoring Layers 2024-07-27 21:58:54 -05:00
Rangi42 4f57e96f31 Consolidate the duplicate stat level data files 2024-06-12 13:13:58 -04:00
Rangi42 b81e339f33 Use constants for VBlank handlers 2024-05-22 21:02:55 -04:00
Idain 4432df05cb Add more assert cases in the codebase (#1115)
* Add assert for FACING_GRASS_1 and FACING_GRASS_2

* Add more assert cases

* Add assert for HP bar colors

* Assert LINK_NULL == 0

* Fix assert syntax

* Add asserts for WILD_BATTLE == 1

* Add additional WILD assert

- I need to sleep more...

* Revert asserts for WILD_BATTLE and LINK_NULL

* Commit suggested changes

* Add more assert cases

* Fix syntax error
2024-04-27 12:17:07 -05:00
SnorlaxMonster b9dce73573 Rename MON_ID to MON_OT_ID (#1114)
* Rename MON_ID to MON_TRAINER_ID

The constant name MON_ID implies it relates to the ID number of the
Pokémon itself. However, it actually refers to the Trainer ID number of
the Pokémon's Original Trainer. Renaming it to MON_TRAINER_ID makes it
substantially more clear what its purpose is.

The original definition of MON_ID is preserved in macros/legacy.asm

* Remove MON_ID from macros/legacy.asm

Co-authored-by: Sylvie <35663410+Rangi42@users.noreply.github.com>

* Apply rename to missed file

* Rename to `MON_OT_ID`

---------

Co-authored-by: SnorlaxMonster <snorlaxmonster@users.noreply.github.com>
Co-authored-by: Sylvie <35663410+Rangi42@users.noreply.github.com>
Co-authored-by: vulcandth <vulcandth@gmail.com>
2024-04-27 12:16:34 -05:00
xCrystal 5be9856f3a In labels, stick to Place for text without delay, and Print for text with letter delay (#1078) 2024-01-07 14:06:40 +01:00
xCrystal bd6ceec193 Improve some innacurate function names, labels, and comments (#1078)
[https://github.com/pret/pokecrystal/issues/1078#issue-1869550979 and https://github.com/pret/pokecrystal/issues/1078#issuecomment-1696394371]
2024-01-07 13:36:05 +01:00
Rangi42 804fa846e0 Fix bug doc formatting 2024-01-01 21:47:57 -05:00
SoupPotato 184c53e8ca Document SFX_RUN does not play correctly when a wild Pokemon flees from battle (#1099)
Co-authored-by: SoupPotato <22991349+SoupPotato@users.noreply.github.com>
2024-01-01 20:25:30 -06:00
Idain 3866716980 Use proper constant for battle stats (#1088) 2023-10-23 14:06:04 -05:00
Idain 5db85badf8 Replace hardcoded numbers for stats (#1073) 2023-08-21 10:53:32 -05:00
Idain 6926900f0f Document fix about AI item pointer overflowing (#1066) 2023-08-10 13:29:03 -04:00
SatoMew 768b3bdec1 Improve mobile-related labels (#1061) 2023-07-26 19:59:00 -05:00
SnorlaxMonster c931b98a81 Rename BATTLETYPE_SHINY to BATTLETYPE_FORCESHINY (#1058)
* Rename BATTLETYPE_SHINY to BATTLETYPE_FORCED_SHINY

The name BATTLETYPE_SHINY gave the impression that it applied to all
battles with Shiny Pokémon, rather than merely battles with forced
Shiny Pokémon (i.e. Red Gyarados only).

* Rename to BATTLETYPE_FORCESHINY

Align name of BATTLETYPE with BATTLETYPE_FORCEITEM

---------

Co-authored-by: SnorlaxMonster <snorlaxmonster@users.noreply.github.com>
2023-07-26 19:51:34 -05:00
Idain 94df3c5aa3 Replace magic numbers with TILE_WIDTH (#1056)
* Replace magic numbers with TILE_WIDTH

* Address more instances
2023-07-26 19:50:16 -05:00
vulcandth 25e12c9391 wUnlockedUnowns engine_flag constants (#1025) 2022-12-26 13:14:10 -05:00
vulcandth b232b4be5f Bug: PRZ and BRN stat reductions don't apply to switched Pokémon (#1021)
Co-authored-by: Rangi <35663410+Rangi42@users.noreply.github.com>
2022-12-01 16:54:01 -05:00
Idain a9869f1896 Replace hardcoded wMonType constants (#1011) 2022-09-28 19:51:39 -05:00
Rangi f7507b7782 $f -> BATTLEACTION_FORFEIT
(thanks, Vulcandth)
2022-09-23 23:10:24 -04:00
Idain bc4fec0694 Fix AI_Smart_Rage comment (#988) 2022-08-21 22:39:08 -05:00
Rangi 07e8efee7e Fix some whitespace 2022-08-07 00:38:08 -04:00
Colton G. Rushton 145d8dd5c2 wVirtualOAM -> wShadowOAM and hTransferVirtualOAM -> hTransferShadowOAM (#971) 2022-07-09 17:18:22 -04:00
vulcandth ef9b9bb437 Clean up bugs commented in the source code (#912)
Co-authored-by: Rangi <remy.oukaour+rangi42@gmail.com>
2022-07-09 16:12:02 -05:00
vulcandth 5f0597e944 Rename SLP to SLP_MASK (#918)
Co-authored-by: Rangi <35663410+Rangi42@users.noreply.github.com>
2022-06-17 22:25:56 -04:00
vulcandth 73c020074e Remove redundant comments referencing labels (#921) 2022-06-06 17:34:54 -04:00
vulcandth 3648afda16 RGBDS syntax updates (#905)
New MACRO and DEF syntax
2022-06-06 17:25:42 -04:00
vulcandth a4d346cc8c Improved Virtual Console patch identifiers (#907) 2022-06-06 17:22:48 -04:00
Idain b06cfe78fd Use NUM_BATTLE_STATS instead of raw numbers 2022-04-06 10:28:18 +00:00
vulcandth 31c3c94d64 Build the Virtual Console patch with make crystal11_vc (#882)
Fixes #813
2022-03-12 18:34:04 -05:00