Commit Graph

346 Commits

Author SHA1 Message Date
Eduardo Quezada
9144b36ac1 Merge remote-tracking branch 'pret/master' into RHH/upcoming
# Conflicts:
#	include/graphics.h
#	src/anim_mon_front_pics.c
#	src/data/graphics/pokemon.h
#	src/data/pokemon/level_up_learnsets.h
#	src/data/pokemon/pokedex_text.h
#	src/data/pokemon_graphics/still_front_pic_table.h
#	src/wild_encounter.c
2023-09-26 08:13:49 -03:00
kittenchilly
4a3ee0db7f
Implement Exp Charm and unevolved Exp multipliers + Exp formula fixes (#3301)
Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
2023-09-14 15:37:57 -03:00
citrusbolt
d31b168522 Add blockBoxRS field to struct BoxPokemon 2023-09-05 06:17:10 -06:00
DizzyEggg
a7615f9649 remove almost all usage of active battler 2023-08-30 11:21:10 +02:00
LOuroboros
9d6953cc63
Removed the sTMHMMoves array and made TMs/HMs read moves from their secondaryId item field (#3243)
* Deleted sTMHMMoves array, TMs/HMs read moves from their secondaryId item field now
The unused "registrability" variable has been removed in order to preserve the size of the gItems array after turning the secondaryId variable into a u16.
* Made ItemIdToBattleMoveId return ITEM_NONE if an item that is not a TM/HM is passed through it
* Renamed IsMoveHm to IsMoveHM
2023-08-21 12:49:17 +01:00
Martin Griffin
b3295d1cfb
Reverted BattleMove power to u8 (#3187) 2023-08-02 12:20:11 +01:00
Eduardo Quezada
f94efa94e1 Merge branch 'RHH/master' into RHH/upcoming 2023-08-02 01:18:07 -04:00
Martin Griffin
0e5c78aeb6 Merge remote-tracking branch 'pret/master' into 'rhh/master' 2023-07-25 19:49:18 +01:00
Martin Griffin
b53cca1a06
Declarations for 2- and 3-argument GetMonData (#1756)
* Type-safe GetMonData/GetBoxMonData

* Comments
2023-07-24 09:57:37 -04: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
43ad1a4d3b
Unified multi-strike move flags (#3126)
* Unified twoStrikes and threeStrikes flags into strikeCount

* Decreased strikeCount max from 255 to 15.
2023-07-18 09:07:14 +02:00
SonikkuA-DatH
6382640f8a
Castform, Cherrim Sun, Spinda, and Spheal Graphical Tweaks (#3127)
* Casrform graphics. Palette changes, edited backs, and 2 Frame anims

* Castform Graphics

* Cherrim graphics, and Castform redefinitions

* Spheal and Spinda Graphic edits. Spheal mouth adjustment, Spinda 2 frame and palette

* Revised Spinda Spot drawing function, removed tabs

* Animations for Castform forms, Spinda, Cherrim Sun, and Spheal set

* Spacing

* Forgot shiny pal. Fixed

* Delete .vs directory

* remove vs ref
2023-07-14 11:45:40 -04:00
Eduardo Quezada
240f41fc58 Reverted BattleMove power to u8
Nothing was using it, despite what the comment suggested
2023-07-14 10:53:40 -04:00
Eduardo Quezada
3aaa89ce71 Changed all instances of gSpeciesNames so that it uses GetSpeciesName 2023-07-07 14:37:51 -04:00
Eduardo Quezada
adfc0af372 Mon graphics are now loaded depending on their availability
- If it has a female sprite/palette, it's loaded.
- If it the species is enabled and it has a sprite/palette, it's loaded.
- Otherwise, load the SPECIES_NONE graphics.
2023-07-07 14:36:30 -04:00
ghoulslash
1a53154324
Beat Up AI Damage Calc (#3104)
* add specific AI dmg calc for new beat up

* beat up ai calc optimizations

---------

Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
2023-07-05 20:59:42 +02:00
Eduardo Quezada D'Ottone
1fa9a05470
Convert move flags and bans into GCC bitfields (#2952)
* Slicing moves to new bitfield

* Wind moves to new bitfield

* Two-strike moves to new bitfield

* Forgot to add flagTwoStrikes to battle_moves.h

* Removed "flag" from field names

* FLAG_HIT_IN_SUBSTITUTE and FLAG_THAW_USER

* Airborne moves

* FLAG_POWDER, FLAG_TARGET_ABILITY_IGNORED and FLAG_DANCE

* FLAG_BALLISTIC and FLAG_PROTECTION_MOVE

* Fixed missing uses of MOVE_UNAVAILABLE in battle_ai_util.c

* FLAG_SOUND

* FLAG_DMG_UNDERGROUND and FLAG_DMG_UNDERWATER

* FLAG_DMG_MINIMIZE

* Cleanup

* FLAG_STAT_STAGES_IGNORED

* Updated Pollen Puff's ballistic flag

* FLAG_STRONG_JAW_BOOST and FLAG_MEGA_LAUNCHER_BOOST

* thaw

* FLAG_THREE_STRIKES

* FLAG_IRON_FIST_BOOST

* FLAG_RECKLESS_BOOST

* FLAG_HIGH_CRIT

* Removed empty flags

* Moves that fail when called by Me First + added missing Shell Trap

* Moves that fail when Gravity is active

* Better names for banned fields

* Moves that fail when called by Instruct

* Cleanup

* Contact Moves + Fixed Wandering Spirit skipping contact checks

* Inverted FLAG_PROTECT_AFFECTED so that there's a flag for moves that SKIP protect.

* Simplified B_MOVE_FLAGS configs

* FORBIDDEN_METRONOME

* Renamed hitsPastSubstitute to ignoresSubstitute

* FORBIDDEN_PARENTAL_BOND

* Struggle uncallable by Metronome

* FORBIDDEN_MIMIC

* FLAG_KINGS_ROCK_AFFECTED

* Made a single config for move flags

* Macro for checking move flags

* FLAG_MAGIC_COAT_AFFECTED

* Fixed HasMagicCoatAffectedMove

* FLAG_SNATCH_AFFECTED

* Removed unused EFFECT_FLINCH_MINIMIZE_HIT

* Fixed Stench/King's Rock interaction

* Removed sMovesNotAffectedByStench in favor of checking move effects

* Removed EFFECT_TWISTER, which was a repeat of EFFECT_FLINCH_HIT

* Changed Gen2 configs to less than Gen 3

* FORBIDDEN_SLEEP_TALK

* Cleanup

* Inverted FLAG_MIRROR_MOVE_AFFECTED

* FLAG_SHEER_FORCE_BOOST

* Ordered

* FORBIDDEN_ASSIST and FORBIDDEN_COPYCAT

* Removed TestMoveFlags and TestMoveFlagsInMoveset + flags field

* Fixed Triple Arrows test
2023-07-03 10:01:59 +02:00
Eduardo Quezada D'Ottone
81e59ace25
Cleaned up remaining Castform hack stuff (#3063)
* Removed gCastformFrontSpriteCoords

* Removed sCastformElevations and IsCastformForm

* Removed sCastformBackSpriteYCoords and castformPalette in BattleStruct

* Scrubbed unused BS commands

* Removed B_ANIM_CASTFORM_CHANGE and BattleForm constants

* Removed redundant function in Pokémon Debug menu

* Removed handling in animation scripts

* Removed gBattleMonForms

* Reduced MAX_MON_PIC_FRAMES to 2

* Removed Castform/Cherrim makefile stuff

* Fixed weather form change tests not checking species.

* Fixed Castform palettes after Lunos' PR
2023-06-30 09:58:07 +02:00
Eduardo Quezada D'Ottone
84aed50c5b
Manually port daycare expansion to modern standards (#2963) 2023-05-06 21:03:05 -04:00
ghoulslash
8cce130643
Add Frostbite status (#2942) 2023-05-01 09:45:47 -04:00
Bassoonian
acf4529d8b Allow Egg Move transfer for non-eggs 2023-04-30 11:25:48 +02:00
Bassoonian
a561c6da6a Add config to Frostbite & allow it to be inflicted 2023-04-22 23:14:49 +02:00
Eduardo Quezada
3888b10769 Merge branch 'RHH/upcoming' into RHH/pr/feature/formBattleChange
# Conflicts:
#	src/data/pokemon/form_change_table_pointers.h
#	src/data/pokemon/form_change_tables.h
2023-03-27 10:55:38 -03:00
Eduardo Quezada D'Ottone
2658fe32c2
Removed ITEM_HAS_EFFECT (#2840) 2023-03-23 10:02:32 +01:00
Eduardo Quezada
4625a46748 Merge branch 'RHH/upcoming' into RHH/pr/feature/formBattleChange
# Conflicts:
#	src/battle_interface.c
#	src/battle_main.c
#	src/battle_script_commands.c
#	src/battle_util.c
2023-03-07 11:26:33 -03: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
GriffinR
ec89e519f9
Merge pull request #1858 from AsparagusEduardo/pret/doc/fateful
Rename eventLegal to modernFatefulEncounter
2023-02-28 11:48:34 -05:00
Eduardo Quezada
90021f3be6 Removed zMovePower field in gBattleMoves in favor of a function. 2023-02-27 23:49:43 -03:00
Eduardo Quezada
079ca8ab29 Renamed MON_DATA_SPECIES2 to MON_DATA_SPECIES_OR_EGG for clarification 2023-02-24 07:53:02 -03:00
Eduardo Quezada
f4f8ab6ee9 Merge branch 'RHH/upcoming' into RHH/pr/feature/formBattleChange 2023-02-16 17:06:49 -03:00
Eduardo Quezada
dbd02d3a56 Clarified Champion Ribbon's description to avoid being interpreted as needing to beat the champion in both RSE and FRLG. 2023-02-15 14:06:42 -03:00
Eduardo Quezada
bd54990333 Review changes 2023-02-15 13:56:11 -03:00
Eduardo Quezada
a937b3221a Documented Ribbons 2023-02-11 23:16:24 -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
DizzyEggg
0048e59e05 Fix SpeciesInfo struct offsets 2023-02-08 22:08:12 +01:00
Eduardo Quezada
101ea6522d Merge branch 'RHH/upcoming' into RHH/pr/feature/formBattleChange
# Conflicts:
#	src/battle_util.c
2023-02-02 17:56:13 -03:00
Martin Griffin
f1b9872bf0 Test moves, items, and abilities in battle
Thank you to SBird for providing mgba-rom-test binaries and Spikes/Toxic
Spikes tests!

Co-authored-by: sbird <sbird@no.tld>
2023-02-01 13:53:57 +00:00
Eduardo Quezada
3288309c43 Merge remote-tracking branch 'RHH_origin/upcoming' into RHH/pr/feature/formBattleChange
# Conflicts:
#	src/battle_script_commands.c
2023-01-25 19:57:19 -03: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
Eduardo Quezada
ac4825ad28 Merge branch 'RHH/upcoming' into RHH/pr/feature/formBattleChange
# Conflicts:
#	src/battle_util.c
2023-01-13 11:50:47 -03:00
Bassoonian
333917941b Add PLA+ obedience mechanics (with config) 2023-01-11 08:15:57 +01:00
Eduardo Quezada
ca46c22533 Removed SpeciesInfo array defines 2023-01-04 08:14:34 -03:00
Eduardo Quezada
1580f892a5 Merge branch 'RHH/upcoming' into RHH/pr/feature/formBattleChange
# Conflicts:
#	include/constants/pokemon.h
#	src/battle_script_commands.c
2022-12-19 18:53:26 -03:00
Eduardo Quezada
9d1149c423 Merge branch 'RHH/upcoming' into RHH/pr/sync/pretmerge_20221124
# Conflicts:
#	src/pokemon.c
2022-11-29 17:40:09 -03:00
Eduardo Quezada
e858b4e709 Merge remote-tracking branch 'pret/master' into RHH/pr/sync/pretmerge_20221124
# Conflicts:
#	include/battle.h
#	src/battle_ai_script_commands.c
#	src/battle_ai_switch_items.c
#	src/battle_dome.c
#	src/battle_main.c
#	src/battle_pike.c
#	src/battle_script_commands.c
#	src/battle_tower.c
#	src/data/pokemon/species_info.h
#	src/pokemon.c
2022-11-24 15:36:00 -03:00
Eduardo Quezada
7327be6f9e Made Types and Egg Groups into arrays 2022-11-22 17:05:25 -03:00
Eduardo Quezada
011ec16f1e Organized conffig files into their own folder and cleaned up 2022-11-14 11:03:49 -03:00
Eduardo Quezada
42f8e8c114 Multiple refactors
- Added a general GetBattleFormChangeTargetSpecies instead of getting specific ones for Mega Evolution and Primal Reversion.
- Added FORM_CHANGE_BATTLE_HP_PERCENT, to replace ShouldChangeFormHpBased.
- Cleaned ifdefs for hold effects.
- Finally removed UndoMegaEvolution.
- FORM_CHANGE_FAINT and FORM_CHANGE_BATTLE_END restore to the first form before a battle form change if species isn't specified.
- When changing from a form with more HP to one with less, now current HP is kept to fix Zygarde edge case. (Will likely need to be reworked for Dynamax, as it behaves differently)
- Uses DoesSpeciesUseHoldItemToChangeForm in CanBattlerGetOrLoseItem.
2022-11-05 20:00:12 -03:00
Eduardo Quezada
15c12af2cf Using TryBattleFormChange in place of certain TryFormChange 2022-11-01 23:50:26 -03:00