Commit graph

7 commits

Author SHA1 Message Date
ghoulslash
353727a805
Add createmon Script Cmd, Support for 2v1Wild Battles (#4688)
* add createmon and setwilddoubleflag script cmds to support createing mons at given player or enemy slots and setting up 2v1 battles

* give givemon macro PARTY_SIZE for tests

* style fixes

* add createmon test

---------

Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
2024-06-13 19:11:36 +02:00
Eduardo Quezada
1568b0a424
Pre-1.8 tweaks (#4275)
* Moved BERRY_MUTATION_CHANCE to include/config/overworld.h and renamed it to OW_BERRY_MUTATION_CHANCE

* Move level_caps.h to config folder

* Multiple EV/IV refered as EVs/IVs

* Disabled decap by default

* Level up learnsetst comments
2024-03-12 12:21:03 +01:00
LOuroboros
916e4814bd
Implemented Custom/Complex/Expanded GiveMon scripting command (#3924)
* Introducing an expanded givemon

* Added debug features to check a Pokémon's EV and IV

* Added a parameter to set a custom mon's gender

* Added a debug feature to clear the party

* Defined the EV/IV getters in gSpecials

* Added Gigantamax Factor toggle to givecustommon

* Updated Gigantamax Factor label in givecustommon macro

* Added tera type parameter to givecustommon

Misc. changes:
-Added a few harmless comments to CreateCustomMon for consistency reasons.

* Cleaned up the code inside CreateCustomMon a bit

Also updated the values assigned to the parameters of ScriptGiveCustomMon
This is temporary though. I'll probably end up turning them into 2byte parameters so they can be filled when the scripting command is called by using variables once I solve the bigger problem that the scripting command is currently facing.

* Foolproofed the Poké Ball check in CreateCustomMon

* Assigned a default gender to givecustommon
This solved the nasty issue by which the command wasn't working properly if you didn't fill in each parameter when calling givecustommon in a script.

* Reinforced the gender checks at CreateCustomMon

* Re-reinforced the gender checks at CreateCustomMon

* Compressed givecustommon and added tests

-Made givecustommon skip unspecified parameters.
-Added scripting variables support for every parameter.
-Added tests.

* Updated the default values of some ScriptGiveCustomMon parameters

* Replaced vanilla's givemon with givecustommon

Misc. Changes:
-Renamed CreateCustomMon to ScriptGiveMonParameterized.
 -The truth is that the function was never limited to creating the skeleton of a Pokémon like the actual CreateMon functions do, so that label was never correct. The function was always an expanded ScriptGiveMon.
-Moved the core functions to src/script_pokemon_util.c which is where they actually belong.
-Updated ScriptGiveMonParameterized a little to incorporateb changes that were applied to the original ScriptGiveMon, namely, Synchronize ability and form change handling.
-Introduced a new ScriptGiveMon to replace the original one.

* Corrected givecustommon tests

* Fixed the default IV values for the new givemon

* Updated DebugAction_Party_ClearParty for consistency with the other debug functions

* Updated the text strings used by the Check EV/IV debug features

---------

Co-authored-by: Martin Griffin <martinrgriffin@gmail.com>
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2024-02-08 09:11:13 +01:00
ultima-soul
939608f5b8 Merge branch 'master' of github.com:pret/pokeemerald into battle_engine_sync 2021-04-02 13:16:40 -07:00
GriffinR
1b8d405b5e Add missing include guard suffixes 2021-04-02 12:54:40 -04:00
Aaron B-D
b83a87c8e8 Added scripted double wild battles 2020-10-19 14:47:32 -04:00
GriffinR
3779422489 Split contest funcs from script_pokemon_util 2020-08-13 17:42:12 -04:00