Commit graph

807 commits

Author SHA1 Message Date
Eduardo Quezada
3d05961dd5 getdirectiontoface macro 2024-05-29 15:52:21 -04:00
Eduardo Quezada
d1e2f620b8 Proper macro capitalization 2024-05-29 14:40:53 -04:00
Eduardo Quezada
021074cd2e Merge branch '_RHH/upcoming' into _RHH/pr/upcoming/merrpFollowers
# Conflicts:
#	src/data/graphics/pokemon.h
#	src/data/pokemon/species_info.h
#	src/data/pokemon/species_info/gen_1_families.h
#	src/data/pokemon/species_info/gen_2_families.h
#	src/data/pokemon/species_info/gen_4_families.h
#	src/data/pokemon/species_info/gen_5_families.h
#	src/data/pokemon/species_info/gen_8_families.h
2024-05-28 14:28:33 -04:00
hedara90
d999092689
Upgraded Dragon Darts Animation (#4620)
* Upgraded Dragon Darts Animation

* Fixed Dragon Darts not workin in link battles

* Apply suggestions from code review

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

---------

Co-authored-by: Hedara <hedara90@gmail.com>
Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-05-28 10:17:52 +02:00
Eduardo Quezada
80b193280d Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	src/battle_main.c
#	src/data/item_icon_table.h
#	src/data/pokemon/species_info/gen_9_families.h
2024-05-27 10:13:42 -04:00
cawtds
474f929c02
Fix dire hit being used on incorrect target (#4626)
* fix getboxmondata for evolutiontracker if compiled with agbcc

* fix dire hit being used on incorrect battler
2024-05-26 00:06:55 +02:00
Eduardo Quezada
25567070d6 Moved callfuncs to general macros folder + added comments + removed unused "emote" macro 2024-05-22 13:52:26 -04:00
cawtds
b73e33618d
Fix status curing of full restore when used on party member (#4603)
* fix getboxmondata for evolutiontracker if compiled with agbcc

* fixed full restore curing status condition when used in battle on party member with missing hp
added more full restore tests

* formatting, removed unused
2024-05-20 00:25:03 +02:00
Eduardo Quezada
6eba5bcb80 Merge branch '_RHH/upcoming' into _RHH/pr/upcoming/merrpFollowers 2024-05-16 17:31:46 -04:00
Eduardo Quezada
3219a48adf Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	src/battle_script_commands.c
2024-05-13 11:00:12 -04:00
Alex
56cee80fbf
Explosion and Mind Blown / Steel Beam refactor (CFRU port) (#4516)
* Explosion and Mind Blown / Steel Beam refactor (CFRU port)

* forgot ndebug

* Restored EFFECT_MIND_BLOWN

* requested changes

---------

Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
2024-05-12 11:41:18 -04:00
Eduardo Quezada
be37820bd9 Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	src/battle_script_commands.c
2024-05-11 19:53:19 -04:00
Abbie Potter
da3d715f3b
Punchier tera animation (#4507)
* Punchier tera animation

* Removed testing comments

* Replaced VARIOUS_APPLY_TERASTALLIZATION with callnative

* Remove redundant arg from applyterastallization
2024-05-07 07:59:52 -04:00
BlueAnthem37510
2d7c79e860
Gulp missile not triggering on faint fix and added form change type (#4502)
* Cramorant faint fix and add form change type

* Fixed formatting, renamed form change type, changed various to callnative

* Fix oops broke everything except gulp missile

* Improved condition order

* remove extra line

* whitespace and alignment

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

* whitespace and alignment

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

* whitespace and alignment

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

* whitespace and alignment

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

* whitespace and alignment

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

* whitespace and alignment

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

* Added requested changes

---------

Co-authored-by: BlueAnthem37510 <a@a.com>
Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
2024-05-07 06:44:17 -04:00
Eduardo Quezada
35a76248d1 Merge branch '_RHH/upcoming' into _RHH/pr/upcoming/merrpFollowers
# Conflicts:
#	src/data/pokemon/species_info/gen_4_families.h
2024-05-06 16:03:29 -04:00
Bassoonian
c5552f53da
checkteratype setteratype (#4460) 2024-04-30 00:12:34 +02:00
kittenchilly
d58e6517f8
Add abilities Tera Shift, Tera Shell, and Teraform Zero (#4418)
* Add abilities Tera Shift, Tera Shell, and Teraform Zero

* Address reviews

* Tests and misc cleanup

* Fix alignments

* Update battle_script_commands.c

* New tests and fix behavior

* Address more reviews

* Update battle_util.c
2024-04-27 19:52:31 +02:00
Eduardo Quezada
d42de03ddc Merge branch '_RHH/master' into _RHH/upcoming 2024-04-25 12:37:31 -04:00
Alex
6f538d840c
Combine weather set commands (#4434)
* Combine Weather set commands

* further tests

* minor error

* update test names
2024-04-24 14:10:25 -04:00
Alex
81a73deb76
Fixes Quash (#4419)
* Fixes Quash

* Update test/battle/move_effect/quash.c

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

* Update test/battle/move_effect/quash.c

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

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-04-21 15:40:35 +02:00
Eduardo Quezada
3d9c7732f6 Merge branch '_RHH/upcoming' into _RHH/pr/upcoming/merrpFollowers
# Conflicts:
#	include/event_object_movement.h
#	src/data.c
#	src/data/graphics/pokemon.h
#	src/data/pokemon/species_info/gen_4_families.h
2024-04-20 13:23:14 -04:00
Alex
3c85089428
Fixes Gulp Missile Dive / Power Herb interaction (#4371)
* Fixed Cramorant Dive / Power Herb interaction

* remove file

* leftover
2024-04-09 10:32:11 +02:00
DizzyEggg
46e6324fe2
Fix White Herb Known Failing tests (#4258)
* Fix White Herb Known Failing tests

* get out agbcc

* remove unneeded white herb test
2024-03-29 17:43:05 +01:00
Eduardo Quezada
39ed85635f Merge remote-tracking branch '_RHH_origin/upcoming' into _RHH/pr/upcoming/merrpFollowers
# Conflicts:
#	include/data.h
#	src/data/graphics/pokemon.h
#	src/data/pokemon/species_info.h
#	src/data/pokemon/species_info/gen_1_families.h
#	src/data/pokemon/species_info/gen_2_families.h
#	src/data/pokemon/species_info/gen_3_families.h
#	src/data/pokemon/species_info/gen_4_families.h
#	src/data/pokemon/species_info/gen_5_families.h
#	src/data/pokemon/species_info/gen_6_families.h
#	src/data/pokemon/species_info/gen_7_families.h
#	src/data/pokemon/species_info/gen_8_families.h
2024-03-17 23:41:23 -03:00
LOuroboros
64b7cfeb29
Upgrading the debug menu's 'Poison Party' (#4235)
* Upgrading the debug menu's 'Poison Party'

* Optimized the 'No Pokémon' check in Debug_EventScript_InflictStatus1

* Killed a pointless function call in Script_SetStatus1

* Added Frostbite support to ¡inflict status1'
2024-03-01 19:55:54 +01:00
Eduardo Quezada
ead108d28e Merge branch '_RHH/upcoming' into _RHH/pr/upcoming/merrpFollowers
# Conflicts:
#	src/data/graphics/pokemon.h
2024-02-19 13:49:10 -03:00
Alex
cd596fdd80
Adds Tidy Up + minor Dragon Cheer follow up (#4136)
* Adds Tidy Up + minor Dragon Cheer follow up

* improve tidy up script

* Add IncreaseTidyUpScore function

* remove useless calls

* 2 small tests and a correction for IncreasyTidyUpScore
2024-02-18 20:00:36 +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
Eduardo Quezada
502a56efd1 Merge branch '_RHH/upcoming' into _RHH/pr/upcoming/merrpFollowers
# Conflicts:
#	include/global.h
#	src/data.c
#	src/data/pokemon/species_info/gen_7.h
2024-02-13 20:35:05 -03: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
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
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
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
Nephrite
65c508d193
Secondary effects overhaul minor follow-up (#4062)
* settwoturnstring command

* Unified two-turn attacks and Meteor Beam

To do: Solar Beam

* Solar Beam

Also fixed various function, removed EFFECT_GUST (who knows why that exists?)

* Updated Solar Beam + tests

* Redid two turn move + animations logic

Removed pointless various function; to do: remove Skull Bash, fix AI test

* Removed now-pointless flag

* Removed Skull Bash

And temporarily commented out failing AI tests

* Removed Sky Uppercut effect

Not sure when or why this was ever necessary

* Removed BattleScript_EffectSemiInvulnerable

Now uses BattleScript_EffectTwoTurnsAttack. Kept the effect; used the argument field to determine which STATUS3 such moves should apply but added a function to jump over weather checks in BattleScript_EffectTwoTurnsAttack if the current move is semi-invulnerable (since the instant-fire weather check and STATUS3 use the same field)

* Applied review changes

* Replaced VARIOUS with callnative

Tried to fix test but couldn't :/ wtf is going on

* Fixed one AI test

Cant fix the other...

* Added KNOWN_FAILING to failing AI tests

Separated them out into their own test

* Optimised script, overhauled charge turn string setting

Condensed multiple confusing macros into one, jumpifweathercheckchargeeffects. Script now tweaked and trimmed, string ids for charge turns now added to argument along with status3 (thanks to compression macro) and instant-fire-weather for semi-invulnerable and two-turn moves respectively. Also introduced a savedStringId in gBattleScripting to make string selection work.

* Unified two turn move tests + minor corrections

* Added semi-invulnerable move tests

Set the Razor Wind test to known failing - something to do with its animation?

---------

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2024-02-04 23:02:59 +01:00
Eduardo Quezada D'Ottone
b898a65891
Fixed Gigantamax Factor not changing form (#4108)
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2024-02-01 19:26:30 -03:00
Bassoonian
ccfebe5e05
Adds missing evolution methods (#4087)
* Add evolution tracker to BoxMon struct

* Add "use move 20 times, then lv up" evolution method

* Add recoil tracker

* Reduce to 9 bits

* Fix agbcc complaint

* Put MOVEEND_CLEAR_BITS at the end

* Remove battle argument from tryupdaterecoiltrackker

* Add null checks

* Fix upcoming merge

* Add requested formatting changes

* Condense evolution check into a single function for easier customisation later

* Incorporate review requests

* Update src/pokedex_plus_hgss.c

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

---------

Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
2024-02-01 18:35:38 -03:00
ZnogyroP
71b49a114f
Adds move Upper Hand (#4085)
* Remove non-existent tilesets from label comments and alphabetize

* Fixed braces style

* gbagfx bit depth upconversion fix

* jsonproc: filter out every non-alphanumeric character

* fix(linking): link gflib/malloc.c at top of EWRAM in ld_script_modern.ld

* Adds move Upper Hand

* Requested changes

- Tabs / spaces where proper
- HitFromAtkString -> HitFromAccCheck
- Actually compiles now lol
- Moved assumes into relevant tests
- Cleaned up the check for TryUpperHand

* Fixed || positioning

* Update upper_hand.c

* Revert "Merge remote-tracking branch 'upstream/master' into upper-hand"

This reverts commit b21275dfe9, reversing
changes made to 89b1ad1ea1.

* AI logic and conflicts solved

* Test fix

* Fix Sheer Force test

* Requested changes

* Requested changes

* Update battle_script_commands.c

---------

Co-authored-by: GriffinR <griffin.g.richards@gmail.com>
Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
Co-authored-by: Sierraffinity <sierra@domoreaweso.me>
Co-authored-by: sbird <sbird@no.tld>
2024-02-01 12:23:58 +01:00
Eduardo Quezada
ddc752eb14 Merge branch '_RHH/upcoming' into _RHH/pr/upcoming/merrpFollowers
# Conflicts:
#	asm/macros/event.inc
#	data/field_effect_scripts.s
#	data/maps/BattleFrontier_BattleTowerLobby/scripts.inc
#	data/script_cmd_table.inc
#	graphics/pokemon/castform/sunny/anim_front.png
#	graphics/pokemon/castform/sunny/normal.pal
#	include/battle_util.h
#	include/constants/event_object_movement.h
#	include/constants/field_effects.h
#	src/battle_controller_player.c
#	src/battle_util.c
#	src/data/object_events/movement_action_func_tables.h
#	src/data/object_events/object_event_pic_tables.h
#	src/data/trainer_graphics/back_pic_anims.h
#	src/daycare.c
#	src/event_object_movement.c
#	src/field_effect_helpers.c
#	src/load_save.c
#	src/scrcmd.c
#	src/trainer_see.c
2024-01-17 18:11:35 -03:00
psf
bf8b09b1b6
Item Ball refactor / Pluralize item names for giveitem and finditem (#3942)
* Emptied out item_ball_scripts
Added GetObjectEventTrainerRangeFromTemplate
Added Common_EventScript_FindItem

* Replaced trainer_sight_or_berry_tree_id with item constant
Replaced scripts with Common_EventScript_FindItem

* Renamed to GetItemBallIdAndAmountFromTemplate
Moved to item_ball.c

* Updated ObjectEventTemplate

* Updated inc files to support plural item names

* Refactored CopyItemNameHandlePlural to handle all items

* Change failsafe in GetItemBallIdFromTemplate to be ITEM_NONE + 1 instead of ITEMS_COUNT

* Converted spaces to tabs
https://github.com/rh-hideout/pokeemerald-expansion/pull/3942\#discussion_r1446415663
https://github.com/rh-hideout/pokeemerald-expansion/pull/3942\#discussion_r1446415525
https://github.com/rh-hideout/pokeemerald-expansion/pull/3942\#discussion_r1446415409
https://github.com/rh-hideout/pokeemerald-expansion/pull/3942\#discussion_r1446415130

* Added warning on object_event macro to prevent silent failure
Reverted global.fieldmap to original state, per feedback

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-01-14 21:35:45 +01:00
Nephrite
c4616739d8 Merge remote-tracking branch 'rhh/upcoming' into secondary_effects_overhaul 2024-01-11 00:35:35 +09:00
Nephrite
daeba066e0 Fixed SetMoveEffect + Sheer Force 2024-01-02 05:51:40 +09:00
DizzyEggg
b83b1f7e88
Merge branch 'upcoming' into feature/dynmulti-expansion 2023-12-30 22:41:59 +01:00
Nephrite
9dfa0d264f Merge branch 'upcoming' into secondary_effects_overhaul 2023-12-30 23:54:01 +09:00
Nephrite
ff51eb2b6c Removed unused move effects, various ids, and one script command 2023-12-30 20:35:48 +09:00
Nephrite
e34373effc Renamed seteffectwithchance to setadditionaleffects
Function no longer has ability to apply effects from moveEffect - for that, seteffectprimary or secondary is now recommended. Removed EFFECT_RAMPAGE, updated a few tests
2023-12-30 20:29:09 +09:00
Nephrite
be2e3cf056 Updated primary/secondary macros
Makes things just a little easier to keep track of where move effects are being set and run
2023-12-30 19:41:03 +09:00
Nephrite
e7de08eca2 Unified Sonic Boom & Dragon Rage
Not really in scope, but what the hell
2023-12-30 15:40:50 +09:00
Martin Griffin
ab900e38df Merge remote-tracking branch 'rhh/master' into upcoming 2023-12-29 19:48:21 +00:00
Nephrite
39773c0659 Burn Up and Double Shock
Both working by applying an additional effect; added a generic "jumpifnotcurrentmoveargtype" type command to make it possible, relpacing secret power's function
2023-12-29 12:44:38 +09:00
kittenchilly
94a650a203
Add Fillet Away + Belly Drum tweaks (#3616)
* Add Fillet Away

* Fillet Away and Belly Drum tests

* More tests

* Update fillet_away.c

* Update fillet_away.c

* Newlines

* Update battle_scripts_1.s

* Update belly_drum.c

* Address reviews

* Fix order

* Swords Dance assume

* Update belly_drum.c

* Try some stuff

* Fix hp not being halved in certain cases

* Update battle_scripts_1.s

* AI stuff
2023-12-28 23:27:09 +01:00