Commit graph

256 commits

Author SHA1 Message Date
ghoulslash
d695a6240d
Convert settotemboost command to callnative (#5418)
* settotemboost use callnative

* Update src/battle_main.c

---------

Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2024-09-22 11:25:42 +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
Bassoonian
1e0b895ecb Add missing check to prevents water grinding 2023-12-08 01:05:54 +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
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
b02b3d074f Add Mulch effects 2023-12-03 13:17:34 +01:00
Alex
d1a69d7e04
fix new line (#3621) 2023-11-30 20:01:21 -03:00
psf
fe16a2cdee
Port pokefirered's Vs. Seeker to pokeemerald (#3256)
* First version of Vs. Seeker

* Update movement.inc

98f7e9978d (r1306721924)

* Update field_effect_scripts.s

https://github.com/rh-hideout/pokeemerald-expansion/pull/3256/files#r1306722004

* Update field_effect_scripts.s

https://github.com/rh-hideout/pokeemerald-expansion/pull/3256/files#r1306722024

* Update item_use.h

https://github.com/rh-hideout/pokeemerald-expansion/pull/3256/files#r1306722401

* Update movement_action_func_tables.h

https://github.com/rh-hideout/pokeemerald-expansion/pull/3256/files#r1306722828

* Update event_object_movement.c

https://github.com/rh-hideout/pokeemerald-expansion/pull/3256/files#r1306722887

* Update overworld.c

https://github.com/rh-hideout/pokeemerald-expansion/pull/3256/files#r1306723396

* Update vs_seeker.h

https://github.com/rh-hideout/pokeemerald-expansion/pull/3256/files#r1306724158

* Update vs_seeker.c

Addressed some cleanup comments from SBird

* Update UpdateRandomTrainerRematches
Fixed typo in ClearAllTrainerRematchStates
Fixed types in GetRematchableTrainerLocalId

* Updated UseVsSeekerEffect_2

* Updated UseVsSeekerEffect_3

* Updated UseVsSeekerEffect_4

* Fixed bug that allowed Vs Seeker to be used indoors in correct places
Moved VsSeeker function declarations into header

* Refactored FieldUseFunc_VsSeeker

* Added curly braces to else case in FieldUseFunc_VsSeeker

* renamed data[x] in Task_ResetObjectsRematchWantedState

* Refactored Task_ResetObjectsRematchWantedState

* Refactored VsSeekerResetObjectMovementAfterChargeComplete

* Refactored ResetMovementOfRematchableTrainers

* Refactored GatherNearbyTrainerInfo

* Refactored Task_VsSeeker_3

* CanUseVsSeeker

* Refactored GetVsSeekerResponseInArea

* GetCurVsSeekerResponse refactored

* Cleaned up GetTrainerFlagFromScript

* Gave sensible names to Task_VsSeeker

* Fixed two bugs where player would not have the right gfx state after using VsSeeker on a Bike or Underwater

* Renamed UseVsSeeker Functions

* Added I_VS_SEEKER_CHARGING to make Vs. Seeker broken until flag is assigned
Removed extra VsSeeker animation code

* Addressed PR feedback

* Fixed issue with building non-modern

* Refactored GetRunningBehaviorFromGraphicsId and renamed to GetResponseMovementTypeFromTrainerGraphicsId

* Addresses Lunos's PR feedback: https://github.com/rh-hideout/pokeemerald-expansion/pull/3256\#pullrequestreview-1623547850
Removed the check to see if a map was not indoors to improve readability
Made IsValidLocationForVsSeeker into a static function

* Added changes in response to Jasper's feedback
https://github.com/rh-hideout/pokeemerald-expansion/pull/3256\#pullrequestreview-1725276522

* Updated with Edu's discord feedback https://discord.com/channels/419213663107416084/1135040810082123907/1176872015085453392

* Removed ifdef tags around the repo unless needed
b5dc744ced
2023-11-26 18:58: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
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
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
b62e5aa72e Merge remote-tracking branch 'pret/master' into RHH/sync/pret_20230214
# Conflicts:
#	src/battle_main.c
#	src/field_specials.c
#	src/trade.c
2023-02-15 14:11:03 -03:00
Eduardo Quezada
bd54990333 Review changes 2023-02-15 13:56:11 -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
GriffinR
9003966fcc Misc field_specials cleanup 2023-02-01 11:48:55 -05:00
Eduardo Quezada
7774c9727d Merge remote-tracking branch 'pret/master' into RHH/pr/sync/pret_20230125
# Conflicts:
#	tools/mapjson/mapjson.cpp
2023-01-25 20:28:55 -03:00
GriffinR
29c1af50ca Fix Best Streak stat name 2023-01-20 11:25:04 -05:00
Eduardo Quezada
749225ace1 Matching merge from upstream pret
# Conflicts:
#	graphics/interface/menu_info.png
#	include/pokemon.h
#	src/battle_ai_switch_items.c
#	src/battle_anim_mons.c
#	src/battle_anim_water.c
#	src/battle_controller_opponent.c
#	src/battle_gfx_sfx_util.c
#	src/battle_main.c
#	src/battle_pike.c
#	src/battle_script_commands.c
#	src/data/pokemon/species_info.h
#	src/pokemon.c
#	src/pokemon_summary_screen.c
2023-01-20 12:31:54 -03:00
GriffinR
483c3d5c13 Document wonder news 2022-11-22 02:17:03 -05:00
crater-git
9f16d1dd12 Fixed battle frontier tutors (for real this time) 2022-08-27 22:45:10 -04:00
Eduardo Quezada
231727d02b Merge remote-tracking branch 'RHH/pokemon_expansion' into RHH_masterMerge
# Conflicts:
#	asm/macros/event.inc
#	data/specials.inc
#	include/constants/species.h
#	src/data/pokemon/base_stats.h
2022-07-22 23:33:04 -04:00
AgustinGDLV
54163240d8 implemented toggelable cancellation / multi-evo 2022-05-08 20:55:29 -07:00
ultima-soul
3ed51d6d91 Merge branch 'master' of github.com:pret/pokeemerald into battle_engine_sync 2021-11-21 10:40:26 -08:00
GriffinR
71605556ab Clean up braille_puzzles 2021-10-30 11:59:14 -04:00
GriffinR
6dc3c9864c
Merge pull request #1520 from GriffinRichards/doc-random
Document random remaining symbols
2021-10-24 23:43:17 -04:00
GriffinR
7590bacec1 Label remaining symbols in field_specials 2021-10-18 02:14:29 -04:00
GriffinR
db8ce5d7f9 Clean up mauville_old_man, drop ScrSpecial prefix 2021-10-18 01:09:41 -04:00
GriffinR
3cd27acbea Document wonder news 2021-10-17 02:09:31 -04:00
GriffinR
845a5e99cc General mystery gift documentation, finish mystery gift client/server/scripts 2021-10-16 23:35:17 -04:00
GriffinR
c02001c46d Document mystery gift link scripts, general mystery gift 2021-10-15 12:05:06 -04:00
GriffinR
a2655ba9ab
Merge branch 'master' into doc-union 2021-10-07 16:10:35 -04:00
GriffinR
dfdcfc1568 Document remaining functions in cable_club 2021-08-15 16:22:15 -04:00
ultima-soul
02c9e040df Merge branch 'master' of github.com:pret/pokeemerald into battle_engine_sync 2021-08-11 16:33:10 -07:00
GriffinR
06351bf63c Remove address comments 2021-07-20 15:18:31 -04:00
ultima-soul
56fc420187 Merge branch 'master' of github.com:pret/pokeemerald into battle_engine_sync 2021-04-28 21:34:30 -07:00
GriffinR
f7a699c686
Merge pull request #1421 from GriffinRichards/doc-tvrecordmix
Document TV
2021-04-29 00:25:01 -04:00
GriffinR
aad090e154 Document TV 2021-04-26 12:35:35 -04:00
GriffinR
bc9fc38254 Misc contest cleanup 2021-04-22 15:51:04 -04:00
GriffinR
dbe24f0baa Clean up contest_painting 2021-04-21 20:04:12 -04: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
86856098a3 Document Dewford Trend 2021-03-31 16:08:42 -04:00
ultima-soul
5bab9474dc Merge branch 'master' of github.com:pret/pokeemerald into battle_engine_sync 2021-03-22 23:08:19 -07:00
GriffinR
55a40b901f Label battle tower link script 2021-03-04 19:30:19 -06:00
Deokishisu
7b2bf8c7e2 Rename obedient/fatefulEncounter to eventLegal
Per discussion on pret, `obedient`/`fatefulEncounter` has been renamed to `eventLegal`, and all related functions and constants have been modified with this in mind.

Additionally, fixed some whitespace alignment issues in `script_cmd_table.h`, `pokemon.h`, and `tv.c` from the last commit.
2021-02-15 14:54:35 -05:00
Deokishisu
b89c3e901e Fix giftRibbons Field in SaveBlock1 & Relabel Gift Ribbons in pokemon.h
The giftRibbons field has been split out into proper subfields. The new ExternalEvent structs deal with interconnectivity between external games/peripherals and Emerald, such as PokéCoupon storage and the flag for receiving Wishmaker Jirachi.

The giftRibbon fields in `PokemonSubstruct3` have also been renamed to their appropriate ribbons, and commented with distribution info if applicable. The previous `fatefulEncounter` field was actually filler, and relabeled as such, while the obedient bit was renamed `fatefulEncounter`. All relevant constants and functions dealing with the Pokémon data structure were renamed with these changes in mind.
2021-02-15 11:40:16 -05:00