Commit graph

20 commits

Author SHA1 Message Date
Nephrite
46b67355a5 Merge remote-tracking branch 'rhh/upcoming' into battlemove_refactored 2024-02-26 14:23:53 +09:00
Nephrite
174c6fc999 Renamed "MoveHasMoveEffect" functions 2024-02-26 14:21:38 +09:00
Alex
7694628296
Adds Powerful status move flag (#4125)
* Adds Powerful status move flag

* fix flag

* fixed final issues

* review changes
2024-02-18 15:05:08 +01:00
LOuroboros
a64e1c63c1
Move data unification (#3999)
* Made gBattleMoves handle the InGame name and description of battle moves
No more multiple arrays in separate, individual files.

Note:
-Keep an eye on Task_LearnedMove.

* Reintroduced move names

Misc:
-Fixed Trick-or-Treat and Light of Ruin's expanded names.
-Introduced a new field for Z-Move names, and a constant for their name length.
-Added a few TODOs to GetBattleMoveName.
-Updated GetMaxMoveName and GetZMoveName. There's no reason not to let GetBattleMoveName handle everything on its own.

* Updated GetBattleMoveName to handle Z-Move Names

Misc:
-Removed pointless TODO about MOVE_NAME_LENGTH.
 -The compiler doesn't allow to have a move name with a value higher than MOVE_NAME_LENGTH, therefore it's pointless to worry about it.

* Fixed a couple of expanded move names

* Removed zMoveName variable of struct BattleMove and extended the name variable's size

* Ditched no longer used MOVE_NAME_LENGTH constant

* Corrected the names of the max moves
I should have done this after updating the size of the name variable of the struct BattleMove, but I didn't think about it at all until Cancer Fairy indirectly gave me the idea.

* Fixed U-turn's name

* Brought back MOVE_NAME_LENGTH
I think it doesn't make sense to have a Z_MOVE_NAME_LENGTH because the length in question is used for all battle moves, not just the Z-Moves.

* Introduced a union for Move/Z-Move names in the struct BattleMove

* Fixed the union for gBattleMoves move names
Also updated GetBattleMoveName to properly handle Max Move names.
Also also renamed the "zMoveName" variable to "bigMoveName" which better reflects its purpose. Z-Move names weren't the only thing it covered, since it also handles Max Move names.

* Removed deprecated GetZMoveName and GetMaxMoveName

* Reintroduced mention to gMoveNames in sGFRomHeader

* Fixed move names and ported move descriptions

* Fused the struct ContestMove into the struct BattleMove

* Removed no longer used Z_MOVE_NAME_LENGTH constant

* Renamed the struct BattleMove's bigMoveName variable and introduced macros to prettify move names

* Reintroduced the contest parameters for Pokémon moves

* Renamed gBattleMoves to gMovesInfo
This is consistent with gSpeciesInfo, the array that contains most of the species data.

* Renamed the BattleMove struct to MovesInfo
This is consistent with the struct SpeciesInfo, which contains the variables used by the gSpeciesInfo array.

* Removed empty lines separating battle params from contest params in gMovesInfo

* Renamed MovesInfo to MoveInfo

* Added Cancer Fairy's HANDLE_EXPANDED_MOVE_NAME macro
Used to handle moves with expanded names in a more comfortable manner.
Also fixed Trick-or-Treat's expanded name.

* Renamed GetBattleMoveName to GetMoveName

* Added a comment pointing out that the shared move descriptions are shared move descriptions

* Re-aligned one of the escape characters of CHECK_MOVE_FLAG

* Renamed the battle_moves.h file to moves_info.h instead for consistency's sake

* Applied Eduardo's adjustments

* Using compound string for regular move names as well, saving 1180 bytes and making their use consistent
* Move description formatting

* Updated Pursuit test after merge

* Renamed the BATTLE_CATEGORY constants to DAMAGE_CATEGORY

---------

Co-authored-by: Nephrite <thechurchofcage@gmail.com>
Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
2024-01-29 08:51:32 -03:00
Eduardo Quezada D'Ottone
6d1d6a5d5f
Fixed test battle move category assumptions (#4051)
* Fixed move category assumptions

* Update test/battle/ai_check_viability.c

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-01-24 10:43:57 +01:00
Nephrite
a76e3c70ba Applied more review fixes 2024-01-12 03:02:48 +09:00
Nephrite
67e76f2b59 Some more review fixes + Fling fix
Not the ideal solution but Fling now has a hardcoded check for Shield Dust and acts accordingly - a better long term solution inolves making a bunch of reusable MOVE_EFFECTS and rejigging attackcanceler but I didn't feel like doing that today...
2024-01-11 00:27:06 +09:00
Nephrite
25f0179628 Review changes
Numerous AI updates and test fixes; added a test for Aura Wheel
2024-01-10 00:55:43 +09:00
Nephrite
9dfa0d264f Merge branch 'upcoming' into secondary_effects_overhaul 2023-12-30 23:54:01 +09:00
Nephrite
b6da1a1e1d Tweaked helper functions 2023-12-30 17:42:53 +09:00
Bassoonian
872ddf32c6
The Indigo Disk Moves (#3704)
* Draft Indigo Disk move data

* Add basic defines (flags, targets and priority missing)

* Update move flags

* Temper Flare is Stomping Tantrum

* Forgot to push, please squash :D

* Fix failing tests
2023-12-28 12:21:52 +01:00
Nephrite
77c722ea09 Obsoleted 22 more effects
Also added a better way of calculating battle_tv score properly; to do: Make it Rain
2023-12-27 17:43:20 +09:00
Nephrite
b0b9883625 Removed unused effects + fixed tests + removed secondaryEffectChance
To do: remaining moves that make use of `secondaryEffectChance` field
2023-12-25 12:53:15 +09:00
Nephrite
cda445c2f5 Merge remote-tracking branch 'rhh/upcoming' into secondary_effects_overhaul_rebase 2023-12-25 12:19:38 +09:00
Nephrite
31b3337cda Updated moves that raise the target's own stats
Modified tests to use MoveHasMoveEffect
2023-12-24 23:52:08 +09:00
Nephrite
460eeff3e5 All moves (I think) that hit and lower a stat
Includes Grav Apple - test that checks the AI can see its power bump needs fixing
2023-11-28 16:17:11 +09:00
Alex
be42d4eafb
Increase score of secondary effects only at 100% chance (#3583)
Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2023-11-21 11:30:20 +01:00
Nephrite
41202a964a Initial struct change + paralysis test
Works great
2023-11-19 03:20:33 +09:00
Alex
e79583be63
Remove function GetMoveDamageResult (#3536)
* Remove function GetMoveDamageResult

* fix test

* test clean up

---------

Co-authored-by: DizzyEggg <jajkodizzy@wp.pl>
2023-11-09 20:53:14 +01:00
Alex
64ba52d214
Remove redundant AI score increases (#3504)
* Remove redundant AI score increases

* review applied

* fix score
2023-10-31 13:41:22 +01:00