146 Commits

Author SHA1 Message Date
Bassoonian
f7cbe4853b
Add type enum (#8054) 2025-10-27 16:41:22 +00:00
grintoul
95c2a6e2b6
Multibattle testing system (#7257)
Co-authored-by: hedara90 <90hedara@gmail.com>
Co-authored-by: Martin Griffin <martinrgriffin@gmail.com>
2025-10-24 15:00:23 +02:00
Bassoonian
fbd702e3a4
Some more documentation and cleanup (#8020) 2025-10-23 20:14:38 +02:00
FosterProgramming
ca53ccb55e
Fix shiny stars being freed before shiny animation was played (#7917)
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2025-10-11 19:54:51 +02:00
FosterProgramming
2156651313
No bag use flag changed to a varable (#7780)
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2025-10-01 14:51:09 +02:00
AlexOn1ine
1131b205f2 conflicts 2025-08-28 14:09:38 +02:00
RavePossum
2fbf45d057
Restore X item friendship increase (#7583) 2025-08-26 22:17:30 +02:00
Linathan
9faa5294ce
Wild Pokémon animate after breaking out of Poké Ball (#7339) 2025-08-01 18:14:42 +02:00
Nephrite
a1e67572b6
Replaces STATUS2 usage with volatiles in code (#7262)
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2025-07-11 22:53:49 +02:00
cawtds
59350cc32f
Increase party action limit (#7119) 2025-06-24 15:15:04 +02:00
Eduardo Quezada
cf7f15faac
Untangle InitBtlControllers functions (#6748) 2025-06-22 16:21:37 +02:00
Eduardo Quezada
b094b70dc5
More battle controller function consolidation. (#6877) 2025-06-21 10:59:41 +02:00
Alex
d33651bfd0
Battle controller pret documentation (#7029) 2025-06-02 14:22:11 +02:00
AlexOn1ine
f4c64a2d79 conflicts 2025-05-30 19:20:32 +02:00
cawtds
1e32cf278c
fix battle controller macros (#7021) 2025-05-30 16:31:38 +02:00
AlexOn1ine
b90fdd1b3c Master to upcoming merge 2025-05-26 10:41:11 +02:00
Hedara
2b92ba315a Merge commit '59d315734d8c5f5b3b2f16f3299355aa99f5f483' into pret-merge
Conflicts:
	include/battle_anim.h
	include/battle_controllers.h
	include/battle_gfx_sfx_util.h
	include/battle_interface.h
	include/battle_main.h
	include/battle_script_commands.h
	include/battle_util.h
	include/easy_chat.h
	include/event_object_movement.h
	include/field_effect.h
	include/field_effect_helpers.h
	include/field_player_avatar.h
	include/intro.h
	include/item_use.h
	include/metatile_behavior.h
	include/move_relearner.h
	include/pokedex.h
	include/pokemon.h
	include/pokemon_icon.h
	include/roamer.h
	include/script_pokemon_util.h
	include/sprite.h
	include/text.h
	include/wild_encounter.h
	src/battle_controllers.c
2025-05-24 20:38:21 +02:00
Hedara
950dbe7897 Merge commit '16357c7' into pret-merge
Conflicts:
	include/battle.h
	include/battle_controllers.h
	include/battle_script_commands.h
	include/contest.h
	include/list_menu.h
	src/battle_controllers.c
	src/battle_gfx_sfx_util.c
	src/battle_main.c
	src/battle_message.c
	src/battle_tower.c
	src/berry_crush.c
	src/contest.c
	src/ereader_helpers.c
	src/evolution_scene.c
	src/hall_of_fame.c
	src/mauville_old_man.c
	src/mystery_gift_menu.c
	src/pokedex.c
	src/pokenav_conditions_search_results.c
	src/pokenav_menu_handler_gfx.c
	src/pokenav_ribbons_list.c
	src/rom_header_gf.c
	src/union_room.c
	src/union_room_battle.c
	src/union_room_player_avatar.c
2025-05-24 19:22:31 +02:00
Bassoonian
59d315734d
Update header files to match source files (#2143) 2025-05-19 09:18:04 +01:00
Bassoonian
16357c7e29
Streamline pointer notation (#2139) 2025-05-16 12:04:44 +01:00
AlexOn1ine
33607529cd conflicts 2025-05-16 10:46:32 +02:00
Hedara
49906a81f7 Merge commit 'c39ef1a03002a7af94' into pret-merge
Conflicts:
	src/battle_ai_switch_items.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_safari.c
	src/battle_controller_wally.c
	src/battle_controllers.c
	src/battle_main.c
	src/battle_script_commands.c
	src/battle_util.c
	src/battle_util2.c
	src/pokemon.c
2025-05-15 17:31:50 +02:00
Bassoonian
e42890e954
Consolidates a bunch of battle controller functions (#6838) 2025-05-15 11:26:18 +02:00
Bassoonian
2394195123
Remove non-existent functions from header files (#6825) 2025-05-13 10:52:45 +02:00
Alex
2044bea883
Rename battlerId to battler for consistency (#2126) 2025-05-09 12:43:23 +01:00
DavidJCobb
0f17e70371 Shorter names for engine/controller communication enum members 2025-05-02 00:01:15 -04:00
hedara90
d1aa49cca3
Remove compressed palettes (#6455) 2025-04-26 22:58:40 +02:00
DavidJCobb
7ee3043c58 Update battle_controllers.h
typo
2025-04-26 11:47:48 -04:00
DavidJCobb
2864408060 Tweaks to documentation comments 2025-04-26 11:40:14 -04:00
DavidJCobb
b4ee45f3e8 Renamed BATTLELINKMSGTYPE_ to BATTLELINKCOMMTYPE_
I want to avoid the word "message" since PRET has already chosen "battle message" as the term for predefined strings usable in the battle scripts and UI.

I was considering the term "battle link packet" instead, but the library for wireless communications already uses the word "packet" even though GBATEK does not. I'm going with "battle link communication type" instead. For this particular context, I don't think we need a compound noun ("X type"); the singular noun "type" is fine enough.
2025-04-26 11:37:20 -04:00
DavidJCobb
8f5c1a452d Update battle_controllers.h
Simplified macros.
2025-04-26 01:33:17 -04:00
DavidJCobb
2738d11b0f Additional fixes to last few commits
ROM now compiles, but it's not comparing as equal...
2025-04-26 01:00:16 -04:00
DavidJCobb
a4370ffcde gBattleControllerExecFlags bits now identified via helper macros
Created "exposition" macros to describe operations performed on gBattleControllerExecFlags. Updated the battle engine internals to use them, to more clearly document how battle link communications actually work.
2025-04-26 00:45:03 -04:00
DavidJCobb
9dc48899d3 BUFFER_A/B -> BATTLELINKMSGTYPE; link send/recv. task data names
Replaced the BUFFER_A and BUFFER_B constants with the BATTLELINKMSGTYPE enum, which also identifies the "controller becoming idle" message type.

Named the task data for the link send task and the link receive task. Added macros to functions related to those tasks, for legibility.
2025-04-26 00:13:42 -04:00
GriffinR
709cfa1c9a
Merge pull request #2014 from Bassoonian/battleterrain
Rename battle terrain to environment
2025-04-13 19:32:06 -04:00
Bassoonian
6a70f4f390
Turn battle string ids into enums (#6594) 2025-04-13 16:12:30 +02:00
psf
b109aa0c92
Cleaned up Trainer Slides, added automated Trainer Slide tests, add new Enemy Critical Hit Slide (#6018) 2025-01-23 16:28:33 +01:00
hedara90
7c6c9120ea
Ewram and unused function cleanup sweep (#6019)
Co-authored-by: Hedara <hedara90@gmail.com>
2025-01-15 14:07:12 +01:00
Eduardo Quezada
15a034a1d9
Fixed multiple transform/form change graphical issues (#6005) 2025-01-12 09:49:19 +01:00
psf
b6299ac4ce
Fix a display issue with B_SHOW_TYPES (#5201)
* Moved HandleInputChooseTarget and ShowEntireFieldTargets to non-static and added them as cases to ShouldHideTypeIcon

* Made ShouldHideTypeIcon easier to parse

* Made ShouldHideTypeIcon a for loop

* Fixed identation

* Made showTypesControllerFuncs a static const array per https://github.com/rh-hideout/pokeemerald-expansion/pull/5201\#discussion_r1730336265
2024-08-26 15:16:56 -04:00
psf
d1183f4b8a
Add B_SHOW_TYPES and cleaned up IsDoubleBattle (#5131)
* First attempt at a port

* Slightly broken but working

* Got images working and opponent palettes

* half finished compressed spritesheet approach instead

* fix the palettes (smh)

* fix hflip, and a lot of clean-up

* Add B_SHOW_TYPES

* Got Illusion working

* Add num type enum

* Updated function to get type

* Fixed type icon position and cleaned up functions

* Updated illusions and Tera handling

* Added BATTLE_TYPE_IS_SINGLE and DOUBLE

* Removed IS_BATTLE_TYPE_SINGLE

* Implemented BATTLE_TYPE_IS_DOUBLE across repo

* Removed SIDE macro

* Updated config

* Deprecated battler alive macro

* Reindented file

* Added exceptions for 2v1

* Replaced Fainted check with Null check

* Added functionality for only types of caught mons

* UseDoubleBattleCoords updated

* Added ShouldFlipTypeIcon

* Renamed TryLoadTypeIcon

* Refactored functions

* Refactored functions

* Refactored functions

* Refactored functions

* Renamed SEEN to CAUGHT

* Reset config

* Added useSecondPalette and isOrdinary to gTypesInfo

* Further simplified secondPalette and isOrdinary

* Changed isordinary to isSpecialCase

* Renamed to useSecondTypeIconPalette

* Fixed Stellar type interactions

* fixed spacing

* fixed include/config/battle.h

* fixed

* fixed include/config/general.h

* changed type1 and type2

* Moved IsDoubleBattle to include.battle.h
Removed BATTLE_TYPE_IS_DOUBLE
Removed IS_DOUBLE_BATTLE

* Changed IsBattlerFainted to IsBattlerAlive

* Removed IsBattlerNull

* Moved GetBattlerData to be inline

* Renamed GetMonDefensiveTeraType

* Removed IsIllusionActive

* Fixed identation

* found one last isDoubleBattle hold out

* fixed redundant brackets

* Fixed spacing for B_SHOW_TYPES

* Update src/battle_script_commands.c

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>

* Fixed padding

* Reindent file and refactored GetTypeIconHideMovement

* Update include/data.h

---------

Co-authored-by: RavePossum <ravepossum@proton.me>
Co-authored-by: Frank <fdeblasio1004@gmail.com>
Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2024-08-11 17:55:51 +02:00
pkmnsnfrn
5635f94036 More changes from typeX to types[X] 2024-08-07 11:35:45 -07:00
Bassoonian
cb4e687917 Merge branch 'master' of https://github.com/pret/pokeemerald into pretmergeforpsf 2024-08-07 19:05:46 +02:00
psf
312749dd31
Changed type1 and type2 to be consistent (#2021)
* Changed type1 and type2 in gBattleMons to match gSpeciesInfo
* Changed monType1 and monType2 to monTypes to match gSpeciesInfo
2024-08-07 06:44:03 +01:00
Bassoonian
003bd54600 Rename battle terrain to environment 2024-07-13 12:02:18 +02:00
AgustinGDLV
9797640dff
Gimmick Refactor (#4449)
* consolidated gimmick checks, triggers, communication, and activation; updated test runner

* fixed improper use of .usableGimmick

* cleaning up battle_dynamax.c, changing function args to u32s

* fixed '#ifdef TESTING' causing errors

* updated z-moves to use gimmick interface, pared down redundancies; no AI/tests

* added support for z-moves in tests, consolidated gimmick fields

* removed ShouldUseMaxMove and .usingMaxMove

* renamed TryChangeZIndicator, updated z move display

* added several z-move tests and fixed various z-move interactions; fixed z-move category calc

* fixed useless battler arg in GetTypeBasedZMove

* added basic test check for bad Z-Move or Mega usage

* reworked test runner gimmick functionality; added support for Ultra Burst + Z-Move to test Light That Burns the Sky

* fixed gimmick test logic; fixed damage category override

* fixed mega rayquaza test fail

* consolidated gimmick indicator logic; added graphics to gGimmicksInfo

* removed TeraData struct

* reimplemented AI logic for Z-Moves; no changes

* updated Z-Move and Ultra Burst trigger gfx

* added testrunner check for multiple gimmick use

* fixed duplicate z-move call in test

* reorganized data/graphics/gimmicks.h

* added signature Z-Move ability tests; implemented Guardian of Alola

* fixed bad test update

* fixed Thousand Arrows not affecting Tera Flying; clean-up

* fixed -ate tests

* fixed tera tests

* fixed tera tests really

* fixed last batch of tests

* fixed -ate mega test again

* code review

* code review pt.2

* tweaked CanTera again

* dynamax flag only required for player
2024-06-22 22:25:40 +02: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
AgustinGDLV
84a9d4ffcf
Terastallization (#4110)
* wrote foundational terastal tests

* implemented baseline test-only Tera functionality; modified GetBattlerType + STAB calculations, misc. changes to some moves

* added tests and func. for Stellar type, more tests for Tera Blast

* more tests for Stellar type, Conversion fixes, Color Change + Conversion2 future proof

* implemented tera blast, expanded stellar type func., fixed tests

* last set of Tera/Tera Blast tests for checklist, protean fix

* implemented in-battle Terastallization, WIP stellar indicator and tera animation

* fixed bad merge

* expanded NUMBER_OF_MON_TYPES, cut down on TYPE_STELLAR hackiness, added Stellar type to summary

* fixed type indicators

* added tera logic to AI

* implemented code review changes, added B_TERA_ORB_NO_COST

* updated AI to calc damage with Tera when applicable; minor rework to AI gimmick handling

* fixed Tera Blast split choice occuring when not Terastallized

* fixed Tera Blast using Last Respects BP calcs

* added tera type to TrainerMon, code review tweaks
2024-04-24 11:17:46 +02: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
Alex
4cb03d4add
Adds Raging Bull and various fixes (#3552)
* Adds Raging Bull and various fixes

* fix compiling on abgcc

* syrup bomb anim fix

* sticky syrup anim in link battles

* fix sticky syrup in link battles

* fix battler index

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2023-11-19 17:45:58 +01:00