Commit graph

14613 commits

Author SHA1 Message Date
Alex
7ab23cf426
Sets neutral nature and ability 0 as default in trainer control (#4172)
* Sets neutral nature and ability 0 as default in trainer control

* add config to generate a random ability

* minor correction

* move config to battle.h

* fixed compiling
2024-02-18 15:02:58 +01:00
Ultimate_Bob
d608af5662
Copy null terminator when decapping player name. (#4206) 2024-02-18 10:24:21 +01:00
Alex
d102467d8d
AI PR 4036 follow up (#4199) 2024-02-16 19:18:43 +01:00
Eduardo Quezada D'Ottone
fcc2839346
Fixed missing Z-Move power override (#4201) 2024-02-16 19:18:26 +01:00
Eduardo Quezada
ebe13ffc3c Merge branch '_RHH/master' into _RHH/upcoming 2024-02-16 11:30:01 -03:00
MelonSpeedruns
20a3d91de7
Fixed Basculegion Back Sprite Offset & Greninja forms animations (#4198) 2024-02-15 15:56:32 -03:00
LOuroboros
1f349e0fb9
Renamed NUM_ABILITY_VANILLA to NUM_ABILITY_PERSONALITY (#4196) 2024-02-15 15:22:25 +01:00
Bassoonian
6a61e6525e
Fix height call (#4195) 2024-02-15 13:07:31 +01:00
psf
cc22fef6c8
- Fixes Seedot and Lotad House to give measurements based on the unit system and decimal seperator chosen by the developer. (#4193)
- Created `ConvertMonHeightToString` and `ConvertMonWeightToString` for developers to use
2024-02-15 10:23:11 +01:00
cmy2008
ab2260a81e
Deleted a space (#4194) 2024-02-15 10:21:35 +01:00
Martin Griffin
c21ab741f7
randompercentage, randomelement (#4189)
'randompercentage X' sets VAR_RESULT to TRUE X% of the time, or FALSE
100-X% of the time.

'randomelement X, Y, ...' sets VAR_RESULT to one of X, Y, ... with equal
probability.
2024-02-15 08:07:28 +01:00
LOuroboros
eb7ddeb66c
Updated the way in which ScriptGiveMonParameterized and ScrCmd_givemon chooe a default ability (#4192)
* Updated the way in which ScrCmd_givemon and ScriptGiveMon assign a default ability
When an abilityNum is not assigned in a call to givemon performed inside of an overworld script, ScriptGiveMonParameterized will make sure to generate an abilityNum of 0 or 1 in the same way vanilla does it; by defaulting to 0, and then tweaking it based on the least relevant bit of the Pokémon's personality.
ScriptGiveMon will set the default ability of a Pokémon in the same way now too, because even though it was rewritten in #3924, it should ideally produce a Pokémon in a similar way than vanilla does it.

* Removed pointless abilityNum setup in ScriptGiveMonParameterized
2024-02-15 08:01:34 +01:00
psf
7f6e1e2aea
Add configs for measurement systems and decimal separators (#4183)
* Allow developers to choose metric or imperial, and their decimal seperator of choice for Pokédex entries
- Creates  which cleans up the existing implementing of printing height and weight to the pokedex
- Developers can choose to use metric or imperial units of measurement in the Pokédex
- - Developers can choose to use any character as a decimal seperator in the Pokédex
- Allows users to define units and decimal seperators independently
- Fixes a bug in Lotad / Seedot house

* Fixed compilation issue with agbcc

* Updated to include HGSS Dex and address PR Feedback
2024-02-14 10:17:23 +01:00
ghoulslash
ce99db0086
Generic Starting Battle Status Variable (#4176)
* setup generic starting battle status variable, ABILITYEFFECT_SWITCH_IN_STATUSES

* fix B_ANIM_TAILWIND, assign to starting statuses, and change B_VAR_STARTING_STATUS check for only the variable and not trainers

* Update src/battle_main.c

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>

* Update src/battle_util.c

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>

* Update src/battle_util.c

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>

* style fixes

* General_Room naims play SE

* fix sText_BizarreArenaCreated

---------

Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-02-14 10:05:37 +01:00
LOuroboros
e73c58ed2e
Made EFFECT_WRING_OUT read the max power from the move's argument field (#4180)
* Made EFFECT_WRING_OUT read the max power from the move's argument field

* Renamed EFFECT_WRING_OUT to EFFECT_VARY_POWER_BASED_ON_HP
2024-02-12 22:39:15 +01:00
Nopinou
de0f94406a
Add shouldDynamax & shouldTerastal bits to TrainerMon (#4169) 2024-02-11 21:36:35 +01:00
Alex
3598a18703
Adds config for Soundproof change during Uproar status (#4174) 2024-02-11 10:40:30 +01:00
Bassoonian
d1b3d1c2c3
Pret merge 2024/02/10 (#4173) 2024-02-11 00:05:31 +01:00
Eduardo Quezada
ec83b11354 Merge branch '_pret/master' into _RHH/pr/upcoming/pret_20240210
# Conflicts:
#	gflib/malloc.c
2024-02-10 18:05:20 -03:00
Eduardo Quezada
1720e1b129 Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	data/battle_scripts_2.s
#	src/data/pokemon/species_info/gen_9.h
2024-02-10 17:53:32 -03:00
Alex
97e4aa514a
Reverted Intrepid Sword and Dauntless Shield field unification (#4171)
* Reverts back Intrepid Sword and Dauntless Shield field unification

* fixes
2024-02-10 16:15:21 -03:00
Bassoonian
fed5c6fa7a
Analogously fix Supersweet Syrup interaction (#4170) 2024-02-10 18:43:46 +01:00
Bassoonian
b4fa0b1bf0
Clean up space/tabs difference (#4163) 2024-02-10 14:43:14 -03:00
Alex
b7d77099b5
Fixes Opportunist accumulating stat changes (#4168)
* Fixes Opportunist accumulating stat changes

* move memset to TurnValuesCleanUp

* Update test/battle/ability/opportunist.c

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-02-10 18:18:29 +01:00
Martin Griffin
311d732359
Save-compatible SaveBlock3 (#4112)
* SaveBlock3 in sector footers

* Update load_save.c

Since mgriffin is currently not available I took the liberty to edit the file. Hope it's fine.

* SaveBlock3 in debug menu (#3)

---------

Co-authored-by: DizzyEggg <jajkodizzy@wp.pl>
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
Co-authored-by: psf <77138753+pkmnsnfrn@users.noreply.github.com>
2024-02-10 18:14:36 +01:00
MartyKen
81fdfdd90b
PLA aux item sprites (#4160)
* PLA aux item sprites

* Sprite sharing
2024-02-10 18:08:09 +01:00
Eduardo Quezada D'Ottone
8b871b7eb4
Fixed Disguise not ending the battle in the correct form (#4167)
* Fixed Disguise not ending the battle in the correct form

* Added TODO comments
2024-02-10 17:13:46 +01:00
Eduardo Quezada D'Ottone
af95a09961
Last Respects effect + Fixed Supreme Overlord (#4151)
* Last Respects effect + Fixed Supreme Overlord

* Fixed ability pop-up happening when there's no fainted party members

* Fixed Supreme Overlord counting faints during the battle instead of fainted party

* Removed invalid test.

* Converted GetSupremeOverlordModifier to an inline function

* Created inline functions to obtain faint counters

* Fixed erroneous implemenation and tests
2024-02-10 10:58:41 +01:00
ghoulslash
5496115f92
replace AI_GetMoveEffectiveness with AI_DATA->effectiveness checks in AI_CanStatus funcs (#4166)
Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
2024-02-10 09:09:11 +01:00
Eduardo Quezada D'Ottone
0f312e3f76
Fixed Ogerpon shiny palettes (#4165) 2024-02-09 22:51:36 +01:00
Eduardo Quezada
67f1772f1e Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	src/battle_util.c
#	test/battle/item_effect/heal_and_cure_status.c
2024-02-09 17:02:56 -03:00
Eduardo Quezada D'Ottone
6da1be01a9
Added Indigo Disk cries (#4164) 2024-02-09 19:46:09 +01:00
ghoulslash
f873c6f93b
A batch of gen 9 move anims (#4145) 2024-02-09 09:52:59 -05:00
Hungry Pickle
47abc33c84
Fixes Stench ability triggering on non-damaging attacks (#4159)
* Fixes Stench ability triggering on non-damaging attacks

* adds stench ability test

* added stench ability test for partner pokemon

---------

Co-authored-by: HungryPickle <beardybirdy@gmail.com>
2024-02-09 15:35:40 +01:00
Alex
e89f8e00ed
Fixes Hit Escape moves interaction with hold effects and switch in ab… (#4091)
* Fixes Hit Escape moves interaction with hold effects and switch in abilities

* leftover

* fix spelling

* fix desc.
2024-02-09 14:00:42 +01:00
DizzyEggg
31ac151e29
Fix Full Restore / Antidote not reseting Toxic Counter (#4135)
* Fix Full Restore / Antidote not reseting Toxic Counter

* Update battle_scripts_2.s

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-02-09 13:58:16 +01:00
Bassoonian
15f30d646e
Add MON_TYPES and MON_EGG_GROUPS (#4154)
* Add MON_TYPE macro

* Add MON_EGG_GROUP macro

* Rename as requested by Edu

* Fix alignment after rename
2024-02-08 17:20:15 -03:00
Eduardo Quezada D'Ottone
ce97984d80
Updated teacheable learnests to Indigo Disk data (#4155)
* Updated teacheable learnests to Indigo Disk data

* Adjusted titles to indicate where to modify the moves
2024-02-08 17:27:26 +01:00
ghoulslash
d2690278b0
Implement ghoul's save block branch (#4113)
Implement ghoul's save block branch
2024-02-08 10:54:15 -05:00
Eduardo Quezada
ec803054e6 Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	src/battle_main.c
#	src/battle_util.c
#	test/battle/hold_effect/kee_berry.c
2024-02-08 12:19:51 -03:00
Bassoonian
5d5cc76a2c
Teachable learnset helper mechanics (#3856)
* Teachable learnset helper mechanics

* Rename folder and python script

* Some teachable learnset work

* Update PoryMoves file labels

* Add header and make custom json

* Include found moves in output file

* Update SV file to latest version

* Don't run if there are no jsons to be found

* Add Basculin duplication in json

* Add universal move support to

* Ignore and skip Mew

* Integrate tool in Makefile

* Condense Basculin learnsets

* Split Oinkologne for easier generation

* Add Deoxys' XD move tutor data

* Add missing Darumaka/Yamask Galarian SwSh TMs

* Add TID species to sv.json

* Update sv.json to The Indigo Disk data

* Add Python install instructions

* Fix Makefile

* Expand header with more information

* Add config to allow disabling the learnset helper

* Update include/config/pokemon.h

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

* Don't crash if the config is missing

---------

Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
2024-02-08 11:32:48 -03:00
ghoulslash
4bfe6d3c6d
Merge branch 'upcoming' into ghoulsaveblock 2024-02-08 08:37:57 -05:00
MartyKen
51cbf92ed0
Lvl up learnsets by generation (#4049)
* Lvl up learnsets by generation

I think the title sums it up pretty nicely

* Update level_up_learnsets.h

forgot some newer pokemon

* divided the learnset file into generations

* Separated learnsets by generation

Separated the learnsets by generation, added a bit more documentation in the config file

* Update src/pokemon.c

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

* Update include/config/pokemon.h

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

---------

Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
2024-02-08 09:02:02 -03: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
Bassoonian
f1ff524d4e
Merge branch 'upcoming' into ghoulsaveblock 2024-02-08 00:06:35 +01:00
ZnogyroP
06f1f67903 Use shaketargetbasedonmovepowerordmg 2024-02-07 16:15:03 -05:00
ZnogyroP
e295d7346a Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-expansion into battle-anims 2024-02-07 16:10:00 -05:00
Alex
452432533a
Kee berry (#4149)
* Fixes Kee Berry

* new line

* Fix fix

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-02-07 15:42:22 +01:00
Nephrite
8d4c3a8acb
Two turn moves tweaks (#4150)
* Two turn move tweaks

Fixed comment bug and added CheckIfCanFireTwoTurnMoveNow function

* Renamed `tryfiretwoturnmovenowcheckeffect` macro
2024-02-07 15:42:05 +01:00
Alex
02e4154f0c
Electro Shot Animation (#4148)
Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-02-07 11:26:23 +01:00