Commit graph

444 commits

Author SHA1 Message Date
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
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
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
Eduardo Quezada
afb1efe0d3 Merge branch '_RHH/master' into _RHH/upcoming
# Conflicts:
#	src/battle_controller_player_partner.c
2024-01-28 18:11:44 -03:00
Bassoonian
e995927d13
Add extra key item bag space checks (#4066)
* Fix 4019

* I am exceedingly brilliant in my failure to build before pushing
2024-01-26 21:11:04 +01: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
Bassoonian
1662dc3478
Merge branch 'upcoming' into berryexpansion 2023-12-29 14:32:10 +01:00
kittenchilly
28f17772ec
Implement Pokemon Box Link functionality (#3837)
* Implement Pokemon Box Link functionality

* Update item_use.c

* Update item_use.c

* Can only use box link if the map allows escape

* Revert "Can only use box link if the map allows escape"

This reverts commit be5b46b6c4.

* Overworld_IsEscapingAllowed

---------

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2023-12-28 11:47:00 +01:00
Bassoonian
9be8fed52c Fix string with duplicate berry berry 2023-12-24 22:59:43 +01:00
Bassoonian
1e0b895ecb Add missing check to prevents water grinding 2023-12-08 01:05:54 +01:00
Bassoonian
9d09b367a0 Refactor growth time and add six stage toggle 2023-12-07 13:22:01 +01:00
Bassoonian
c8d356a3f1 Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-expansion into berryexpansion 2023-12-07 12:18:50 +01:00
Bassoonian
8e43b7d696 Debug Berry functions 2023-12-06 21:08:09 +01:00
Bassoonian
3e1c04cc26 Allow pests and weeds interaction 2023-12-05 22:13:21 +01:00
Bassoonian
36befdcdf8 Add moisture clock, weeds and pest generation 2023-12-05 21:54:17 +01:00
Bassoonian
ddcd0dbb78 Weeds and Pests strings 2023-12-05 20:02:11 +01:00
Bassoonian
6da03e6cf0 Add Berry color and drain rate 2023-12-05 02:16:22 +01:00
Bassoonian
0d70d9951d Put Mulch behind config 2023-12-04 00:33:25 +01:00
Bassoonian
45e19d22fa Remove lost comment 2023-12-03 13:22:58 +01:00
Bassoonian
b02b3d074f Add Mulch effects 2023-12-03 13:17:34 +01:00
psf
2b1d36db46
Fix issue where Sky Battles cause upcoming not to compile when debug menu is turned off (#3617)
* Moved Sky Battle error message outside of debug.inc
https://github.com/rh-hideout/pokeemerald-expansion/issues/3615\#issue-2015546179

* Update data/scripts/debug.inc

Made changes from Jasper's review

625f007741

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

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2023-11-29 23:08:36 +01:00
Bassoonian
a517e14c06 Berry Mutations 2023-11-29 13:26:43 +01:00
psf
493478e94b
Added support for XY's Sky Battles (#2950)
* Original implementation from Phlayne

* Moved Sky Battle Flag / Var into a config

* Optimized existing code and fixed existing bugs

Added error message for when sky battle var and flag are not set
Merged CanDoSkyBattle and PrepareSkyBattle into one special

* Added compatibility for Gen7+

* Commented out Volt Crash from banned moves

* Cleaned up debug scripts from testing

* Fixed bug where player did not white out even if they had no healthy Pokémon and only an egg
Zeroed out both Sky Battle configs

* Removed extra include from src/field_specials.c
Removed extra line break in src/battle_script_commands.c

* Added FLAG_DISABLED_IN_SKY_BATTLE
Added FLAG_DISABLED_IN_SKY_BATTLE to appropriate moves

* Changed DoesSkyBattleCancelCurrentMove to look at move flags

* Fixed alignment and spacing in battle_moves.h

* Added FLAG_DISABLED_IN_SKY_BATTLE to Sticky Web

* Added FLAG_DISABLED_IN_SKY_BATTLE to Steel Roller

* Disabled the ability to change Battle Terrain when Sky Battle is happening
Stopped Ceaseless Edge from spawning Spikes when Sky Battle is happening
Added B_SKY_BATTLE_STRICT_MECHANICS config

* Fixed bug with SKY_BATTLE_STRICT_MECHANICS where conditions were not consistently being applied

* Add rulesVariants to the BattleStruct
Added skyBattle check in AllocateBattleResources

* Replaced B_FLAG_SKY_BATTLE checks with rulesVariants.skyBattle checks

* Fixed debug script

* Reverted include/config/battle.h

* Fixed spacing and placement of functions

* Fixed debug script omission
Fixed bug where Spikes did not set from Ceaseless Edge and Stone Axe

* Added FLAG_DISABLED_IN_SKY_BATTLE to Psychic Terrain

* Addressed DizzyEgg PR feedback

* Forgot a file in last commit

* Addressed feedback from DizzyEggg

* Address Lunos' PR feedback

* Update specials.inc

Added an empty line at the end of data/specials.inc

* Fixed spacing

* Apply suggestions from code review

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

* Updated skyBattleBanned and HandleBattleVariantEndParty to use correct names

* Removed STRICT_MOVES and STRICT_MECHANICS

* Fixed minor spacing issues with merge

* Merged in upcoming

* Implemented feedback from Jasper
5da6117d1b

---------

Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
2023-11-26 16:59:44 +01:00
psf
8d6cb9692a
Improved Repel / Lure Menu (#3594)
* First draft of repel lure

* Updated all lure and repel scripts

* Optimized inc file

* Updated y coord

* optimized sprays.c

* Removed spray.inc

* Updated cosnt use

* Removed dead repel and lure code

* Updated debug for testing

* testing new inc file

* turn on debug and options

* playground generated inc file without ifs

* pory generated inc with ifdef complete

* Updated spray.c with new inc

* reverted item config

* Reverted event scripts

* Reverted event scripts

* Revert config

* Added testing scripts for debug

* Added back specials

* reverted debug scripts

* Updated use of constants

* Addressed tabs > spaces feedback
https://github.com/rh-hideout/pokeemerald-expansion/pull/3594\#discussion_r1402917676

* Updated constant names to avoid confusion
Made inc file changes
https://github.com/rh-hideout/pokeemerald-expansion/pull/3594\#pullrequestreview-1746418044

* Updated constant name of NUM_SPRAY_TYPES to NUM_SPRAY_STRENGTH to be more accurate
2023-11-23 21:31:33 +01:00
Martin Griffin
3fc47d137a
Defines for Expansion version number (#3454) 2023-11-10 08:08:36 -03:00
Eduardo Quezada D'Ottone
1a6acad3cf
Added Match Call to togglable options in debug menu (#3489)
* Added Match Call to togglable options in debug menu

* Added badge flags to Cheat Start

* Fixed potential Fly and badge flag mismatch using the debug options

* Added Fly flags to Cheat Start
2023-10-30 16:13:32 +01:00
Eduardo Quezada
661becc3b6 Merge branch 'RHH/upcoming' into RHH/pr/upcoming/debugCleanup2
# Conflicts:
#	src/debug.c
2023-10-30 08:05:14 -03:00
Eduardo Quezada
8e0991475c Incorporated upstream fixes 2023-10-27 11:04:10 -03:00
Alex
cb38f3bee6
Fixes legendary backgrounds (#3464)
* Fixes legendary backgrounds

* missed one

* forgot break
2023-10-25 17:06:25 +02:00
Martin Griffin
1110d0aeb9
ROM space on debug menu (#3453) 2023-10-23 17:12:17 -03:00
Eduardo Quezada
a34e0f6f6f Debug menu cleanup 2023-10-07 23:04:36 -03:00
DizzyEggg
662dd7d2c6
Fix give daycare egg option giving buggy eggs (#3335) 2023-09-22 12:20:00 -03:00
Eduardo Quezada
0d5b00aaf2 Merge remote-tracking branch 'pret/master' into RHH/pr/upcoming/pret_20230829
# Conflicts:
#	README.md
#	data/battle_ai_scripts.s
#	data/battle_scripts_1.s
#	data/maps/BattleFrontier_Lounge7/scripts.inc
#	include/battle_anim.h
#	include/battle_message.h
#	include/constants/items.h
#	src/battle_ai_script_commands.c
#	src/battle_ai_switch_items.c
#	src/battle_anim_throw.c
#	src/battle_anim_utility_funcs.c
#	src/battle_controller_link_opponent.c
#	src/battle_controller_link_partner.c
#	src/battle_controller_opponent.c
#	src/battle_controller_player.c
#	src/battle_controller_player_partner.c
#	src/battle_controller_recorded_opponent.c
#	src/battle_controller_recorded_player.c
#	src/battle_controller_wally.c
#	src/battle_gfx_sfx_util.c
#	src/battle_message.c
#	src/battle_script_commands.c
#	src/battle_util.c
#	src/data/party_menu.h
#	src/data/pokemon/tmhm_learnsets.h
#	src/daycare.c
#	src/field_specials.c
#	src/hall_of_fame.c
#	src/party_menu.c
#	src/pokemon.c
#	src/tv.c
2023-08-31 14:28:01 -04:00
GriffinR
b248791f47
Merge pull request #1904 from GriffinRichards/temp-alias
Add temp flag and var aliases
2023-08-11 15:45:00 -04:00
Martin Griffin
912a80e27a
Reference TMs and HMs by move instead of number (#1732) 2023-08-09 10:51:01 -04:00
GriffinR
866c32a735 Add temp var aliases 2023-08-04 14:17:28 -04:00
GriffinR
6d4dadd7b5 Add temp flag aliases 2023-08-03 15:55:06 -04:00
LOuroboros
cd5f997ee3
Added a debug feature to hatch eggs (#3155) 2023-07-21 12:06:05 +02:00
Eduardo Quezada D'Ottone
6fec0e4dd1
Ported TheXaman's latest changes to the Debug Menu (#2815)
* Added option for generating incrementing pokemon in pc boxes

# Conflicts:
#	src/debug.c

* added submenu arrows, increased menu high to full screen

# Conflicts:
#	src/debug.c

* combined flags and vars into one submenu

# Conflicts:
#	src/debug.c

* added new window to flags/vars showing the current state and added submenu indicator

# Conflicts:
#	src/debug.c

* added alligned arrows for debug submenus

# Conflicts:
#	src/debug.c

* used {CLEAR_TO X} instead of manual spaces

# Conflicts:
#	src/debug.c

* renamed gDebugText to proper sDebugText

# Conflicts:
#	src/debug.c

* added Fill submenu, added fill function for PC items and all bag pockets  @LOuroboros

# Conflicts:
#	src/debug.c

* put cheat start into utility

# Conflicts:
#	src/debug.c

* put fill submenu into main menu

# Conflicts:
#	src/debug.c

* tiny fix

* renaming and reordering

# Conflicts:
#	src/debug.c

* Added reset pokedex flags for @AsparagusEduardo

* made flag toggle list dynamic

# Conflicts:
#	src/debug.c

* initial battle debug menu WIP

# Conflicts:
#	src/debug.c
#	src/wild_encounter.c

* fix visual bug

* added battle start

# Conflicts:
#	include/debug.h
#	src/battle_ai_script_commands.c

* Added faster way to add initial movesets to mon

* Added waiting music for the slow box filling

* Simplified the call to scripts

* Simplified debug scripts

* Disabled Battle Test for now

* Fixed personality on fast PC fill being always 0

* Removed BATTLE_ENGINE instances + added AI_FLAG_COUNT

* Added missing return TRUE

* Sets nickname

* Changed how GetSpeciesName to how it's used upstream

---------

Co-authored-by: TheXaman <48356183+TheXaman@users.noreply.github.com>
2023-07-18 09:17:03 +02:00
Eduardo Quezada D'Ottone
84d9cd0396
Fixed compile issue when disabling overworld debug menu (#3024) 2023-05-24 08:24:44 -04:00
LOuroboros
580a09e367 Updated DebugAction_Util_CheckSaveBlock 2023-05-20 15:40:36 -03:00
Eduardo Quezada
7c29a24110 Merge remote-tracking branch 'pret/master' into RHH/pr/sync/pretsync20230413 2023-04-13 17:05:48 -04:00
GriffinR
0c380862d6 Document the trendy saying word group 2023-03-13 15:58:40 -04:00
LOuroboros
f06c040bca Updated the debug menu
-Updated the text string used by Debug_FlagsNotSetMessage.
-Renamed Debug_FlagsNotSetMessage to Debug_FlagsNotSetOverworldConfigMessage.
-Added an equivalent for the battle config file called Debug_FlagsNotSetBattleConfigMessage,
-DEBUG_FLAG_NO_COLLISION -> OW_FLAG_NO_COLLISION
 -And moved it to include/config/overworld.h, because at the end of the day it's still an overworld flag just like the other 2 already in that file.
-Corrected miswritten preproc config in DebugAction_Flags_CatchingOnOff.
-Updated the comment that describes the effect of DEBUG_OVERWORLD_MENU reducing the number of characters a tiny bit and fixing a typo.
2023-03-08 15:27:22 -03:00
Eduardo Quezada D'Ottone
b3ffc9d1c4
Set link tutorial as complete when using Cheat Start (#2802) 2023-03-06 09:29:34 +01:00
Eduardo Quezada
9917f5cc8b Merge remote-tracking branch 'pret/master' into RHH/sync/pret_20230303
# Conflicts:
#	Makefile
#	include/constants/pokemon.h
#	include/pokemon.h
#	make_tools.mk
#	src/battle_ai_script_commands.c
#	src/battle_controllers.c
#	src/battle_main.c
#	src/battle_script_commands.c
#	src/party_menu.c
#	src/pokemon.c
#	src/trade.c
#	src/trainer_pokemon_sprites.c
2023-03-03 11:00:50 -03:00
Eduardo Quezada
96865f66af Updated term to modernFatefulEncounter 2023-02-11 22:36:42 -03:00
Eduardo Quezada
6da5e0a280 Rename eventLegal to fatefulEncounter 2023-02-11 17:13:53 -03:00
Eduardo Quezada
ada47831aa Fixed reusable repels/lures function forcefully using items while menu config is on 2023-01-04 00:00:13 -03:00
Eduardo Quezada
3172273c73 Merge remote-tracking branch 'RHH_origin/upcoming' into RHH/pr/feature/Lures
# Conflicts:
#	src/pokemon.c
2022-10-30 12:16:09 -03:00