Commit Graph

5453 Commits

Author SHA1 Message Date
DizzyEggg
0c0b841a80
Remove debug item effect override (#3106) 2023-07-13 18:47:01 -04:00
sbird
cb66e8b770 [battle, fpmath] revert changes to Q_24_8 format 2023-07-13 23:43:02 +02:00
Eduardo Quezada D'Ottone
0efc9a29ad
Disabled species now default their graphics to SPECIES_NONE (#3116) 2023-07-12 20:11:07 -04:00
gruxor
5fd881a1b6 Remove unused macro to fix syntax highlights 2023-07-12 14:44:23 -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
sbird
6482279fa3 [battle, math] refactor damage calculation to use proper fp type and inlined multiplication 2023-07-07 18:51:23 +02:00
Eduardo Quezada
4405f79d24 Merge branch 'RHH/master' into RHH/upcoming 2023-07-06 13:15:06 -04:00
Eduardo Quezada
f21953f254 Merge remote-tracking branch 'pret/master' into RHH/master 2023-07-06 13:06:31 -04:00
DizzyEggg
9a09f1e3b9 Fix Roullout Fury Cutter AI power calc 2023-07-06 13:41:16 +02:00
Eduardo Quezada
b10b5fd9c3 EVERYTHING_CUSTOMIZED -> TRAINER_PARTY 2023-07-05 18:31:08 -04:00
Eduardo Quezada
e8487961c7 TrainerMonCustomized -> TrainerMon 2023-07-05 18:29:28 -04:00
Eduardo Quezada
b86184a4f6 Removed TrainerMonPtr 2023-07-05 18:23:18 -04:00
Eduardo Quezada
2f9e0ecd9f Removed uses of F_TRAINER_PARTY_EVERYTHING_CUSTOMIZED 2023-07-05 18:22:48 -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
Martin Griffin
eab4e32e2a
Shuffle implementation (#3097) 2023-07-05 19:46:40 +02:00
Eduardo Quezada
3dd7a2c09e Removed TrainerMonNoItemDefaultMoves 2023-07-04 21:29:58 -04:00
Eduardo Quezada
9c961b4fd5 Removed TrainerMonNoItemCustomMoves 2023-07-04 21:22:27 -04:00
Eduardo Quezada
1ef56f6ae1 Removed TrainerMonItemDefaultMoves 2023-07-04 21:16:47 -04:00
Eduardo Quezada
c201cae2ee Removed TrainerMonItemCustomMoves 2023-07-04 21:06:55 -04:00
Eduardo Quezada D'Ottone
862602233d
Gender differences sprites, part 3 (#3095) 2023-07-04 11:36:24 -04:00
ghoulslash
cc3a6d4d94
make special case ABILITYEFFECT_xx ids their own caseId switch cases to fix potential overlap with ability IDs 0xFF etc (#3083)
Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
2023-07-03 10:03:50 +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
SubzeroEclipse
23d51df7c0 Added Hisuian Sneasel 2023-07-01 11:16:31 +02:00
SubzeroEclipse
d202bdd09c Added even more gender difference sprites, 2/2 2023-07-01 10:25:17 +02:00
Eduardo Quezada
2c4a9b754d Merge branch 'RHH/master' into RHH/upcoming 2023-06-30 16:14:57 -04:00
SubzeroEclipse
0733e0908c Added even more gender difference sprites, 1/2 2023-06-30 10:40:46 +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
4c4365b0c1
Config for LGPE friendship stat boost (#2257)
* Config for LGPE friendship stat boost

* Separated Exp and Stat settings
2023-06-28 18:44:53 +02:00
Alex
20099274d8
Fix Clear Amulet visual bug + Tests (#3074)
* Fix Clear Amulet visual bug + Tests

TODO Tests, additional tests + Triple Kick pp bug

* Wonder Guard message, switch instead of if, misalignments
2023-06-28 12:26:03 -04:00
Eclipse
fc52414383
Added many more gender differences sprites (#3082)
Added sprites for the remaining Gen1 mons and a couple of evolutions.
2023-06-27 21:11:01 -04:00
Eclipse
a44af6f06f
Gender differences sprites, part 1 (#3070)
* Added some gender difference sprites
Added sprites for:
- Pikachu/Raichu
- Doduo/Dodrio
- Goldeen/Seaking
- Xatu
- Politoed
- Meditite/Medicham
- Gible/Gabite/Garchomp

NOTE: I had to tweak Doduo's palette file because it wasn't matching the normal one and a result Doduo's beak looked weird.

* Swapped Pikachu sprites
Replaced them with the ones provided by CyanSixFour because they looked better than the ones that I had.

* Added Gloom and Vileplume

* Fixed Pikachu forms
Edited the macros so that only base Pikachu would show different forms based on gender. Big thanks to AsparagusEduardo for helping with this.

* Swapped a few more sprites
Replaced Goldeen (female back), Politoad (female back), Medicham (female all) sprites with those provided by CyanSixFour because they looked better. Also tweaked my male Meditite back
2023-06-26 19:04:19 -04:00
PacFire
4b3b9b5e0a
Added icon for Clear Amulet (#3078)
* Update graphics.h

* Update item_icon_table.h

* Update items.h

* Add files via upload

added icon for clear amulet, shards still missing.

* Add files via upload

added clear amulet's palette

* Update graphics.h
2023-06-26 18:19:33 -04:00
Eduardo Quezada
f9bf91a2f0 Merge branch 'RHH/master' into RHH/upcoming 2023-06-26 18:09:53 -04:00
ghoulslash
c7e8edf19b
Easy Chat always shows words in uppercase (#3050) 2023-06-24 13:28:13 -04:00
Eduardo Quezada
ca1d9f5393 Merge branch 'RHH/master' into RHH/upcoming
# Conflicts:
#	include/battle_util.h
2023-06-21 15:01:14 -04:00
ghoulslash
7371a9e401
Add many gen 8 move animations (#2861)
* port many gen8 and 9 move anims from cfru

* fix thunder cage, shell smash, shelter anims. update anim credits

---------

Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
2023-06-21 13:19:54 -04:00
Pawkkie
62ae3b1df1
Fix bug due to variable overflow when AI chooses new Pokemon to send out (#3068) 2023-06-21 12:59:30 -04:00
Eduardo Quezada
6342da3b58 Merge remote-tracking branch 'RHH_origin/master' into RHH/upcoming 2023-06-20 15:41:30 -04:00
Eduardo Quezada D'Ottone
b01f7927cf
Fixed Sylveon's evolution method (#3048) 2023-06-19 16:17:51 -04:00
Eduardo Quezada D'Ottone
5128520291
Fixes Hisuian mon not evolving + Fixed regional mon not breeding correctly (#3047) 2023-06-19 16:16:55 -04:00
Eduardo Quezada D'Ottone
0d86ab0945
Gen. 9 Move Effects, 2nd batch (#2870) 2023-06-19 14:00:03 -04:00
LOuroboros
2bf88502a7 More corrections 2023-06-19 04:18:53 -03:00
LOuroboros
9896f20eb8 Applied fixes and corrections (Jun 2023) 2023-06-15 09:22:26 -03:00
LOuroboros
313f522622 Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-expansion into gen_9_move_effects_batch2 2023-06-13 05:44:37 -03:00
Eduardo Quezada
49ffd4a2e9 Easy Chat always shows words in uppercase 2023-06-06 10:55:42 -04:00
Eduardo Quezada
601a96f34a Fixes Hisuian mon not evolving + fixed regional mon not breeding correctly 2023-06-06 08:01:29 -04:00
Bassoonian
7bf34448e4 Rename GAME_STAT_FISHING_CAPTURES to GAME_STAT_FISHING_ENCOUNTERS 2023-06-05 14:15:07 +02:00
AgustinGDLV
d795256142 remove debug 2023-06-03 11:56:01 -07:00
AgustinGDLV
53fa7e524c allow for illegal abilities within tests 2023-06-03 11:32:54 -07:00
Eduardo Quezada
4c57b84cd9 Merge remote-tracking branch 'pret/master' into RHH/pr/sync/pret_20230602
# Conflicts:
#	graphics/pokemon/mawile/footprint.png
#	src/battle_gfx_sfx_util.c
#	src/fldeff_sweetscent.c
#	src/pokedex.c
2023-06-02 11:45:28 -04:00
Martin Griffin
412f6f5352
Separate build directory for tests and TESTING define (#3002)
* Separate build directory for tests and TESTING define

* fixup! Separate build directory for tests and TESTING define

* fixup! Separate build directory for tests and TESTING define

* fixup! Separate build directory for tests and TESTING define
2023-05-31 09:38:37 -04:00
GriffinR
5100eef017
Merge pull request #1890 from GriffinRichards/pal-macro
Add some missing palette macro use
2023-05-28 18:28:50 -04:00
ghoulslash
a929ae8b48
Replace launchtemplate and launchtask in battle anims (#2640)
* replace launchtemplate with createsprite using fix_launchtemplate.py

* tidy up script

* fix comment handing in fix_launchtemplate.py

* fix double comma after sprite template

* remove py script

* convert launchtask -> createvisualtask

* fix launchtask->createvisualtask issue

* fix ANIM_PAL ORs

* remove launchtemplate, launchtask macros

* fix pal macros in z moves

* fix bloom doom

* add F_PAL_ALL_BUT_DEF

* remove all ANIM_PAL_ usages

* devestating drake fix

* convert launchsoundtask and setblends

* Reworked CFRU macro PR

---------

Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
2023-05-27 17:32:53 -04:00
Eduardo Quezada D'Ottone
d0e6ea7612
Optimized battle gender checks (#3020)
* Optimized battle gender checks

* Apply suggestions from code review

Co-authored-by: AgustinGDLV <103095241+AgustinGDLV@users.noreply.github.com>

---------

Co-authored-by: AgustinGDLV <103095241+AgustinGDLV@users.noreply.github.com>
2023-05-27 17:23:02 -04:00
GriffinR
14f7e49099 Add some missing palette macro use 2023-05-25 15:09:16 -04:00
AgustinGDLV
5a8715e608 Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-expansion into castform_fix 2023-05-23 16:10:44 -07:00
AgustinGDLV
d4c7e5e559 changed B_WEATHER_FORM preproc to affect tables instead of function 2023-05-23 14:03:38 -07:00
Eduardo Quezada D'Ottone
f979013b7e
Disable Gen8+ Obedience Mechanics by default (#2980) 2023-05-21 16:57:43 -04:00
psf
9506b205e6
Changed 999999 in MaxMoney to MAX_MONEY constant (#3015) 2023-05-20 08:25:59 -04:00
LOuroboros
29d2d4202e
Evolution updates (#3009)
* Add Hisuian Sneasel's evolution to gEvolutionTable

* Updates
-Added EVO_ITEM_NIGHT, (it's like EVO_ITEM_DAY but nighttime specific)
-Added EVO_ITEM_HOLD (it's like the day based variations, but day agnostic)
-Turned the trade evo items into regular evolution items
-Ditched the config for the Razor Claw by request
-Updated every entry in gEvolutionTable for species that could only evolve via EVO_TRADE_ITEM to LA's standard

* Review corrections (extrapolations)

* Post Cherrypick corrections

* Corrected the description of EVO_ITEM_NIGHT

* Added a config for the new items' field-evolving functionality
2023-05-18 06:39:14 -04:00
AgustinGDLV
785b100693 Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-expansion into castform_fix 2023-05-16 16:29:38 -07:00
AgustinGDLV
0c182345bf reworked weather form reversion + added more tests 2023-05-16 16:24:25 -07:00
LOuroboros
49a9210e9d
Fixed typo in include/config/battle.h 2023-05-15 16:45:30 -03:00
ghoulslash
60710f823e merge w upcoming 2023-05-15 13:13:28 -04:00
Eduardo Quezada D'Ottone
2aca82300c
Merge branch 'upcoming' into mega_evo_issues 2023-05-14 22:33:01 -04:00
Bassoonian
c05404e772 Merge branch 'master' of https://github.com/pret/pokeemerald into rhhpretmerge 2023-05-12 13:48:52 +02:00
GriffinR
8b37b4292a Document DrawFootprint 2023-05-09 22:43:25 -04:00
Salem
fe5e59c910
Merge branch 'upcoming' into RHH/content/gen9SnowWeather 2023-05-07 17:27:58 +02:00
Martin Griffin
9cd13cc520 Fix USE_ITEM explicit targets 2023-05-07 07:50:41 +01:00
Eduardo Quezada D'Ottone
220b60f315
Detect memory leaks in tests (#2698) 2023-05-06 21:22:47 -04:00
Eduardo Quezada D'Ottone
c530eb2445
Add mirror herb (#2873) 2023-05-06 21:20:37 -04:00
Eduardo Quezada D'Ottone
84aed50c5b
Manually port daycare expansion to modern standards (#2963) 2023-05-06 21:03:05 -04:00
Eduardo Quezada D'Ottone
42445512ad
Battle Item Tests + critical fixes + new test macro (#2940) 2023-05-06 20:43:32 -04:00
GriffinR
dd65eddbdd
Merge pull request #1883 from GriffinRichards/doc-mod
Add some missing ARRAY_COUNT, make TV_SHOWS_COUNT depend on NUM_NORMAL_TVSHOW_SLOTS
2023-05-05 02:38:30 -04:00
AgustinGDLV
a5f28afe42 fixed Forecast and Flower Gift 2023-05-04 17:04:54 -07:00
CallmeEchoo
eb5b81684c refactored snow into damaging weather
this is necessary for ice body to properly work.
doesnt actually do any damage
2023-05-05 01:38:12 +02:00
Salem
a877266400
Merge branch 'upcoming' into RHH/content/gen9SnowWeather 2023-05-02 21:19:01 +02:00
CallmeEchoo
c5a73f59a4 ad suggested changes 2023-05-02 21:17:14 +02:00
Alex
dd43d62a12
Fixes Triple Dive effect (#2947) 2023-05-02 15:06:21 -04:00
Shae
ae2d5f7d1e
Weather related Ability tests, fix for Leaf Guard not preventing Rest. (#2957) 2023-05-02 14:08:05 -04:00
CallmeEchoo
6758f6ebe7 add some snow related tests 2023-05-02 16:25:26 +02:00
CallmeEchoo
0bf92943d4 spelling 2023-05-02 16:25:26 +02:00
CallmeEchoo
76721b16f8 add snow weather 2023-05-02 16:25:26 +02:00
ghoulslash
445e9c4b8b merge w upcoming 2023-05-01 12:05:07 -04:00
ghoulslash
8cce130643
Add Frostbite status (#2942) 2023-05-01 09:45:47 -04:00
Bassoonian
39b50d09dd Add missing CanGetFrostbite 2023-05-01 11:19:10 +02:00
Ultimate_Bob
32e63d8cc7
Don't copy opponent personality when swapping mon sprite during Mega Evolution (#2852)
Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
2023-04-30 21:15:03 -04:00
Alex
176c6750aa
Set new animations as default (#2964) 2023-04-30 10:02:18 -04:00
Bassoonian
8f75844ece Add Ability inheritance 2023-04-30 12:58:18 +02:00
Bassoonian
acf4529d8b Allow Egg Move transfer for non-eggs 2023-04-30 11:25:48 +02:00
Bassoonian
b53c913558 Manually port daycare expansion to modern standards 2023-04-29 18:16:36 +02:00
GriffinR
c2dad5ac44 Redefine TV_SHOWS_COUNT 2023-04-27 13:59:09 -04:00
Bassoonian
c279830892 Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-expansion into formbattlechangecontribution 2023-04-27 10:50:32 +02:00
Eduardo Quezada D'Ottone
408aa30aa7
Merge pull request #17 from AgustinGDLV/pr/castform_fix 2023-04-26 14:25:36 -04:00
Martin Griffin
4a0abc5129
Merge branch 'upcoming' into rhh-get-party 2023-04-26 12:12:03 +01:00
CallmeEchoo
a2809acfd1 fix gChosenMovePos not being assigned correctly for battle items
thanks griffin <3

Co-Authored-By: Martin Griffin <838573+mrgriffin@users.noreply.github.com>
2023-04-26 01:02:47 +02:00
Salem
78c4d07b23
Add Berserk Gene Item (#2893)
Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
2023-04-25 15:03:57 -04:00
Bassoonian
b1f75569a1
Merge branch 'upcoming' into rhhupcomingdev 2023-04-25 19:50:26 +02:00
Bassoonian
2aa4d2da38 Fix Ice Heal message 2023-04-25 19:38:47 +02:00
CallmeEchoo
632668e8b2 Merge branch 'battleItemFixes' into battleItemTests 2023-04-24 21:13:12 +02:00
ghoulslash
868838a87d
Add thunder cage case to trap anim IDs (#2941) 2023-04-24 14:35:42 -04:00
LOuroboros
a128192bfe Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-expansion into trainerSlideMsgUpdate 2023-04-24 09:36:09 -03:00
LOuroboros
330e85ba64 Updates
-Undeclared size for certain trainer slide-in variables at struct BattleStruct for reasons.
-Added a BattlerHPPercentage function to make HP threshold checks in ShouldDoTrainerSlide a bit more readable.
2023-04-24 09:34:11 -03:00
Bassoonian
a2bc21d902 Update battle_ai_util.h
Co-Authored-By: Salem <65783283+callmeechoo@users.noreply.github.com>
2023-04-24 14:05:35 +02:00
Bassoonian
f13c39d784 Thawing out for frostbite 2023-04-23 21:20:23 +02:00
Bassoonian
0b8d148c26 Let AI take Frostbite into account 2023-04-23 20:53:51 +02:00
Bassoonian
13f6acf9a1 General mechanics 2023-04-23 19:20:48 +02:00
ghoulslash
909a20c27a
Reset battle vars and flags after player whites out (#2875) 2023-04-23 08:42:52 -04:00
ghoulslash
594bc831d6
Adds define B_RESTORE_HELD_BATTLE_ITEMS following Gen9 (#2932) 2023-04-23 08:26:51 -04:00
Bassoonian
a561c6da6a Add config to Frostbite & allow it to be inflicted 2023-04-22 23:14:49 +02:00
Bassoonian
9c9a1fb831 Allow for healing with items 2023-04-22 19:18:10 +02:00
Bassoonian
f50bfb3770 Frostbite hurts at the end of the turn and halves SpA 2023-04-22 18:47:36 +02:00
Bassoonian
623e7c5f25 Add Frostbite status 2023-04-22 18:23:08 +02:00
Martin Griffin
c81a985b5b Fix USE_ITEM explicit targets 2023-04-20 21:45:16 +01:00
Martin Griffin
76f02774ea Detect memory leaks in tests
Can use KNOWN_LEAKING; to specify that a test is known to leak memory.

The location information is available in regular game builds. Thus it is
available for use in debugging leaks in-game too. In the future we
should consider replacing it with NULL if NDEBUG is defined. This is not
currently possible because the tests do not force NDEBUG to be
undefined.
2023-04-20 20:35:22 +01:00
citrusbolt
6c7f5881e4
Add two EV-related configs (#2825) 2023-04-20 10:05:32 -04:00
Alex
3aec63b8cf new define to restore items after battle 2023-04-20 15:08:42 +02:00
psf
d3fed5639b
Added config to enable NEW_ROCKS_PARTICLE (#2929)
Co-authored-by: LOuroboros <lunosouroboros@gmail.com>
2023-04-19 18:54:57 -04:00
Bassoonian
52ce399240
Fix TM reusability shortcomings (#2930) 2023-04-19 11:01:00 -04:00
LOuroboros
b09ab5a3ee Updated Triple Arrows' effect's code and tests yet again
Also added a function to get a move's secondaryEffectChance, meant to handle abilities, side statuses and the like that modify it.
2023-04-19 01:57:34 -03:00
Bassoonian
d5b36c7c60
Reusable TMs (#2903)
* Reusable TMs
* Forgot about Gen9 making TMs expendable again
* Change importance check based on Alex's suggestion
* Prevent items with importance from being bought more than once
* Change importance check to ghoul's suggestion
* Update include/config/item.h
Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>

---------

Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
2023-04-18 19:52:20 -04:00
Alex
76d0d8a94e
Fix battle message strings for stats (#2927)
* Fix battle message strings for stats
2023-04-18 22:02:51 +01:00
LOuroboros
2043380ee2 Oopsie 2023-04-18 10:34:39 -03:00
LOuroboros
28ce87f6d3 Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-expansion into gen_9_move_effects_batch2 2023-04-18 07:35:59 -03:00
LOuroboros
43a5aa09ef Corrections
-Optimized BattleScript_EffectTakeHeart
-Updated the checks for EFFECT_JUNGLE_HEALING and EFFECT_TAKE_HEART in AI_CheckBadMove
-Updated the code for MOVE_EFFECT_TRIPLE_ARROWS inside SetMoveEffect
2023-04-18 07:34:05 -03:00
Martin Griffin
aefe582596 GetSideParty/GetBattlerParty
Inline GetBattlerPartyData into its callers because its name is
confusing and we couldn't think of a better one.

This seems to fix a bug in one place where GetBattlerPartyData was being
used as if it had GetBattlerParty semantics.
2023-04-15 23:04:13 +01:00
AgustinGDLV
2eabcea86e
Battle Item Refactor (#2902)
* items that can be used in battle now use battlescripts
* removed ExecuteTableBasedItemEffect_
* taught AI how to use items, removed AI_itemtype/flag
* X-Items store stages raised in holdEffectParam
* USE_ITEM in tests
2023-04-14 19:25:50 +01:00
Eduardo Quezada
11beec62ee Merge branch 'RHH/upcoming' into RHH/pr/feature/formBattleChange
# Conflicts:
#	src/data/pokemon/evolution.h
#	src/field_poison.c
2023-04-14 11:31:02 -04:00
Eduardo Quezada
7c29a24110 Merge remote-tracking branch 'pret/master' into RHH/pr/sync/pretsync20230413 2023-04-13 17:05:48 -04:00
AgustinGDLV
86242c1c70
MOVE_REVIVAL_BLESSING Effect (#2883)
* implemented Revival Blessing
2023-04-12 01:14:25 +01:00
ghoulslash
e3ca217d64 rename IsBattlerAIControlled 2023-04-10 11:36:17 -04:00
ghoulslash
5f4bfd9bb4 Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-expansion into be/aiflag 2023-04-10 09:48:49 -04:00
Jaizu
0f958806ea Remove unused battle funcs 2023-04-10 14:39:14 +02:00
aaghaht
bd54c70020 Add PLA evo items 2023-04-10 10:47:31 +05:30
Eduardo Quezada D'Ottone
5c1efe9419
RandomElement for structured RNG (#2868) 2023-04-09 21:20:04 -04:00
Eduardo Quezada D'Ottone
1094861667
Modify "FillPartnerParty" to work with "Everything Customized" (#2889) 2023-04-08 13:02:47 -04:00
ghoulslash
ff2afb0eec
Fixed Comatose AI checks (#2866) 2023-04-07 09:27:28 -04:00
ghoulslash
c3e9f4b571
Added B_DOUBLE_WILD_REQUIRE_2_MONS to use of B_DOUBLE_WILD_CHANCE even when there is only one Pokémon in the party (#2878) 2023-04-07 09:26:22 -04:00
psf
59dfc7c3ad
Update include/config/battle.h
Took suggestions from https://github.com/rh-hideout/pokeemerald-expansion/pull/2875#discussion_r1160574308

Co-authored-by: LOuroboros <lunosouroboros@gmail.com>
2023-04-07 06:07:12 -07:00
Alex
bd4736cc97 initial commit
test multi battle

final

remove empty line
2023-04-06 20:56:44 +02:00
Bassoonian
50b5dba655 Fix string issue as requested by Jaizu 2023-04-06 10:13:32 +02:00
Bassoonian
dfee8a4759 OW Poison configs 2023-04-06 00:26:52 +02:00
Martin Griffin
35952cf7ad Clamp RandomPercentage to 0...100 2023-04-05 13:07:02 +01:00
psf
48f90a7155
Update explanation in include/config/battle.h
Changed the comment in include/config/battle.h per PR comment: https://github.com/rh-hideout/pokeemerald-expansion/pull/2878#discussion_r1154322931

Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
2023-04-01 14:12:50 -07:00
PSF
24df9823e8 In response to PR discussion, added new preproc config for developers to toggle Overworld_ResetBattleFlagsAndVars 2023-03-30 06:35:38 -07:00
pkmnsnfrn
6a7466c929 Added B_DOUBLE_WILD_REQUIRE_2_MONS to allow use of B_DOUBLE_WILD_CHANCE even when there is only one Pokémon in the party 2023-03-29 11:11:07 -07:00
Alex
8c4396ddaf Gen9 move tests batch2 2023-03-29 13:01:20 +02:00
PSF
686d42709a Added documentation on resetting battle flags and vars
Added Overworld_ResetBattleFlagsAndVars to Overworld_ResetStateAfterWhiteOut
2023-03-28 15:50:58 -07:00
ghoulslash
afc4b4cdee add mirror herb 2023-03-28 15:07:37 -04:00
ghoulslash
00d695ac2b add AI_FLAG_OMNISCIENT 2023-03-28 10:38:48 -04:00
LOuroboros
ed9e860400 Post cherrypick corrections and improvements
-Made BattleScript_EffectTakeHeart use modifybattlerstatstage
-Optimized usage of BattleScript_EffectInfernalParade
-Tweaked the way in which Triple Arrows' increased crit. hit chance is handled
-Optimized syntax for case MOVE_EFFECT_TRIPLE_ARROWS in SetMoveEffect
-Optimized case EFFECT_INFERNAL_PARADE in CalcMoveBasePower
 -Infernal Parade is not known to interact with Comatose, so Eduardo and I will extrapolate that here
-Added AI conditionals for some of the effects
-Made Triage notice Jungle Healing and moves that use its effect
2023-03-28 10:08:52 -03:00
AgustinGDLV
2017bee3f8 fixed Castform + Cherrim 2023-03-27 11:35:23 -07:00
Martin Griffin
7b306b6147 RandomElement for structured RNG
Converts Tri Attack and Dire Claw to use structured RNG.
2023-03-27 18:50:18 +01: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
0b8285737a Fixed Comatose AI checks 2023-03-27 09:19:48 -03:00
LOuroboros
000077f671 Implemented Axe Kick's effect 2023-03-26 20:05:30 -03:00
LOuroboros
8ae57dc912 Implemented Take Heart's effect 2023-03-26 20:05:13 -03:00
LOuroboros
05a34edb7d Implemented Infernal Parade's effect 2023-03-26 20:04:55 -03:00
LOuroboros
1595a66559 Implemented Triple Arrows' effect 2023-03-26 20:04:36 -03:00
ghoulslash
6574e01e73
Gen. 9 Move Effects, 1st batch (#2534) 2023-03-26 16:20:47 -04:00
ghoulslash
dc9f0b5107
Implement Customizable NPC Trainer Parties (#2733) 2023-03-26 09:32:51 -04:00
ghoulslash
5d71afd1c0
Add Gen IX items (#2838) 2023-03-26 07:29:14 -04:00
sbird
aea5d79aa2 [trainer_parties] implement fully customizable npc trainer parties
fix nature related bug, fix hash generation, add tests
2023-03-25 20:00:04 +01:00
Philipp AUER
4928911cd0
Speed up PASSES_RANDOMLY via structured RNG (#2720) 2023-03-24 15:16:29 +01:00
ghoulslash
dca6182ed2
remove assist array from battle struct (#2816) 2023-03-24 09:23:49 -04:00
GriffinR
6be9a79b8c
Merge pull request #1871 from GriffinRichards/doc-trendy-sayings
Document the trendy sayings word group
2023-03-24 08:05:51 -04:00
Zunawe
492422b6bd Fix scanner item flag name 2023-03-23 21:47:26 -07:00
Bassoonian
cd6d71cd01 Add most of the new item icons (Clear Amulet & Shards missing) 2023-03-24 00:50:06 +01:00
Bassoonian
e601719c91 Add new PLA form change items 2023-03-24 00:04:08 +01:00
Bassoonian
80d0efae0c Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-expansion into rhhupcomingdev 2023-03-23 23:04:23 +01:00
LOuroboros
7ce5c5fc66 Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-expansion into gen_9_move_effects_batch1 2023-03-23 06:27:09 -03:00
Eduardo Quezada D'Ottone
2658fe32c2
Removed ITEM_HAS_EFFECT (#2840) 2023-03-23 10:02:32 +01:00
GriffinR
8d67bebd51
Merge pull request #1869 from GriffinRichards/const-map
Treat map data as const
2023-03-22 13:00:06 -04:00
Eduardo Quezada
ef914a2fac Merge branch 'RHH/upcoming' into RHH/pr/feature/formBattleChange 2023-03-21 16:13:27 -03:00
Eduardo Quezada
51b716c9d9 Merge remote-tracking branch 'pret/master' into RHH/pr/sync/pret_20230319
# Conflicts:
#	data/battle_scripts_2.s
#	include/constants/battle_string_ids.h
#	include/constants/songs.h
#	src/battle_message.c
#	src/data/pokemon/species_info.h
2023-03-19 20:28:56 -03:00
Bassoonian
372c6a1afa Add new item variables and defines 2023-03-19 20:55:39 +01:00
LOuroboros
f4e8389779 Added Psyblade and Hydro Steam 2023-03-17 09:25:39 -03:00
Martin Griffin
89deda0416 Allow tests to override specific RNG calls 2023-03-15 13:39:17 +00:00
GriffinR
00e211a417
Merge pull request #1873 from AsparagusEduardo/pret/pr2/stringConversionIDE
Changed IDE macros to allow their use in compound literals without IDE errors
2023-03-15 03:00:01 -04:00
Eduardo Quezada
2cb54c49da Changed definitions of string conversion IDE macros to allow their use in compound literals without IDE errors 2023-03-14 15:38:18 -03:00
LOuroboros
aefd318945 Applied review suggestions and expanded usage of activateAfterFaint in Cmd_setmoveeffect 2023-03-14 11:43:52 -03:00
Eduardo Quezada
0a9ab96390 Added STANDARD_FRIENDSHIP constant to allow easier custom adjustments 2023-03-14 08:54:49 -03:00
GriffinR
0c380862d6 Document the trendy saying word group 2023-03-13 15:58:40 -04:00
Alex
aa29eced1f
Merge branch 'rh-hideout:upcoming' into PLA_missing_sprites 2023-03-13 17:46:53 +01:00
Eduardo Quezada
a0feaabef1 Merge branch 'RHH/upcoming' into RHH/pr/feature/formBattleChange 2023-03-12 15:53:32 -03:00
LOuroboros
6dbe772e27 Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-expansion into trainerSlideMsgUpdate 2023-03-10 18:23:33 -03:00
DizzyEggg
d695c76881 test for assist and removed assist array from battle struct 2023-03-08 22:11:28 +01: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
GriffinR
dbf757be88 Treat map data as const 2023-03-08 12:00:30 -05:00
LOuroboros
fdebc994d2 Updated Supreme Overlord's effect's code 2023-03-07 19:14:38 -03:00
DizzyEggg
f6089a0057 Mega Evolution after switching and based on speed 2023-03-07 22:34:57 +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 D'Ottone
81a80e566c
Refactor Mega Evolution indicator sprite (#2805) 2023-03-07 08:06:28 -03:00
DizzyEggg
e055456b7e
Fix Protean / Libero when AI calculates Damage (#2714)
* Fix Protean / Libero when AI calculates Damage

* fix ai changing types when calculating dmg
2023-03-07 09:34:26 +01:00
DizzyEggg
a04046dbb6
Add tests for Defog and fix Defog battle strings (#2737)
* start working on defog tests

* defog tests + improve terrain end battlescripts

* newline
2023-03-06 20:35:08 +01:00
DizzyEggg
306c4565a0 merge 2023-03-06 15:32:28 +01:00
DizzyEggg
d3d99c3f8c alpha omega indicator sprites use the same palete 2023-03-06 15:22:28 +01:00
GriffinR
bb078e0618
Merge pull request #1864 from AsparagusEduardo/pret/doc/songsComments
Document music usage to make it easier to search for a specific track
2023-03-05 15:29:38 -05:00
Eduardo Quezada
a6bd35ceab Review changes 2023-03-05 17:17:39 -03:00
ghoulslash
dec1b16138
Swallow/Spit Up Gen 5 Behavior and tests for Swallow/Spit Up/Stockpile (#2790) 2023-03-05 09:50:47 -05:00
GriffinR
ce6875817f
Merge pull request #1860 from GriffinRichards/metatile-labels
Format metatile_labels
2023-03-04 23:36:04 -05: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
Alex
487e26e700 fix enamorus_t + samuroutt sprite + conflicts 2023-03-02 11:05:59 +01:00
LOuroboros
ff15856820 Added yet another trainer slide condition
Now a trainer NPC can also say something before the first turn of a battle starts for good.
2023-03-02 06:16:44 -03:00
LOuroboros
fe735f9700 Applied review suggestions
-Merged EFFECT_CEASELESS_EDGE and EFFECT_STONE_AXE into EFFECT_HIT_SET_ENTRY_HAZARD

-Updated gDmgHazardsStringIds and relevant battle scripts. Can't say that I like it at all. String tables are stupid imo.

-Coupled Barb Barrage's effect in CalcMoveBasePower with Venoshock's
2023-03-02 01:39:44 -03:00
LOuroboros
23673c2e9d Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-expansion into gen_9_move_effects_batch1 2023-03-01 03:57:00 -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
3b27b602fd End of file 2023-02-28 00:09:43 -03:00
Eduardo Quezada
90021f3be6 Removed zMovePower field in gBattleMoves in favor of a function. 2023-02-27 23:49:43 -03:00
DizzyEggg
c92a65dc40 Add config for stockpile raising def stats 2023-02-27 21:09:02 +01:00
GriffinR
adf28c2f63
Merge pull request #1855 from GriffinRichards/doc-chat
Add/correct some union room chat documentation
2023-02-27 13:25:05 -05:00
GriffinR
8d88a38561
Merge pull request #1854 from GriffinRichards/constants-num-frames
Add MAX_MON_PIC_FRAMES, and trainer pic size constants
2023-02-27 13:16:49 -05:00
GriffinR
4a6ea87247
Merge pull request #1865 from AsparagusEduardo/pret/doc/species2
Renamed MON_DATA_SPECIES2 to MON_DATA_SPECIES_OR_EGG for clarity
2023-02-27 13:06:04 -05:00
DizzyEggg
3338a6b786 add messages for stockpile effects wear off 2023-02-27 12:31:29 +01:00
LOuroboros
a54a8d9b2a Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-expansion into trainerSlideMsgUpdate 2023-02-27 07:43:19 -03:00
AgustinGDLV
e537be76ea
Z-moves bypass protection (#2730) 2023-02-27 09:17:07 +01:00
DizzyEggg
919fb184fe
AI knows how to handle Illusion (#2726)
* AI knows how to handle Illusion
2023-02-27 09:12:52 +01:00
DizzyEggg
44d2cc7232
Fix bugs related to Trainer Slide messages (#2699)
* start working on trainer slides

* use cmd->nextInstr
2023-02-27 09:11:25 +01:00
LOuroboros
fe09f3e0d3 Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-expansion into trainerSlideMsgUpdate 2023-02-26 23:42:01 -03:00
DizzyEggg
4bdca43dbd refactor mega evolution indicator sprite 2023-02-26 12:51:35 +01:00
Zunawe
f376b71f7c Fix wrong route in item flag name 2023-02-25 13:48:39 -08:00
Eduardo Quezada
31ab56bceb Fixed footprint symbol names. 2023-02-25 09:23:34 -03:00
Eduardo Quezada
ca81d7a0f9 Forgot about Jangmo-o 2023-02-24 21:58:09 -03:00
Eduardo Quezada
bbefee6bd4 Use proper symbol styles for Hakamo-O and Kommo-O 2023-02-24 15:22:58 -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
Alex
48391d8eff Basculegion female form 2023-02-24 08:46:34 +01:00
Eduardo Quezada
d330ca051a Document music usage to make it easier to search for a specific track 2023-02-23 11:44:23 -03:00
Eduardo Quezada
f5aa3b8272 Document the 2 different sText_GotchaPkmnCaught 2023-02-23 11:43:40 -03:00
ghoulslash
827bf11307
Merge pull request #2660 from DizzyEggg/ace_voltswitch
Fix Volt Switch / Roar with ace pokemon
2023-02-23 09:20:18 -05:00
Alex
a870ec3c22 enamorus_t cry, basculegionf sprite, new typhlosion back sprite 2023-02-23 15:20:12 +01:00
DizzyEggg
dc83708443 Remove unused script BattleScript_TargetAbilityStatRaiseOnMoveEnd 2023-02-22 22:51:59 +01:00
Zunawe
60be59d18b Fix wrong route in hidden item flag name 2023-02-22 13:13:57 -08:00
Alex
1f694ae7ed missing pla sprites 2023-02-22 20:41:01 +01:00
DizzyEggg
877e3fd6af merge with upcoming 2023-02-22 19:27:42 +01:00
DizzyEggg
e0b76e98ff
Add MOVE_SHELL_TRAP Effect (#2716)
* implemented Shell Trap

Co-authored-by: AgustinGDLV <agustingomezdelavega@gmail.com>
2023-02-22 13:55:34 +00:00
DizzyEggg
31138455de remove unneeded VARIOUS_JUMP_IF_NO_VALID_TARGETS 2023-02-22 09:28:12 +01:00
Eduardo Quezada
5ca9213d07 Merge branch 'RHH/upcoming' into RHH/pr/feature/formBattleChange
# Conflicts:
#	src/battle_script_commands.c
2023-02-21 17:47:02 -03:00
DizzyEggg
61064ab07e Merge branch 'upcoming' into fix_abilities_empty_field 2023-02-21 16:22:26 +01:00
Martin Griffin
29c64c82f3 Test Red Card
Dragon Tail activates Red Card if the target does not switch.
2023-02-21 10:44:58 +00:00
Martin Griffin
afe09e9653 Test Dragon Tail
Remove the "But it failed!" message if the foe cannot be switched.
2023-02-21 10:43:57 +00:00
LOuroboros
24581426a1 Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-expansion into trainerSlideMsgUpdate 2023-02-21 04:46:28 -03:00
LOuroboros
3a91a5c930 Added new trainer slide-in msg conditions
Now they can say something:
-When their last Pokémon's HP is between 25% and 50%.
-When a critical hit is dealt to their first Pokémon for the first time.
-When a super effective hit is dealt to their first Pokémon for the first time.
-When a STAB move is used against (but doesn't faint) the opponent's Pokémon.
-When the Player's Pokémon's move doesn't affect the opponent's Pokémon.
-When they're about to trigger a Mega Evolution.
-When they're about to trigger a Z-Move.

Misc. changes:
-Split GetEnemyMonCount for readability's sake.
-Optimized the size allocated to trainerSlideLowHpMsgDone.
2023-02-21 04:40:02 -03:00
Zunawe
8f74a6777a Fix spelling mistake for item flag 2023-02-20 18:17:30 -08:00
DizzyEggg
03915524c5 Fix switch-in abilities activating on empty field 2023-02-20 12:42:06 +01:00
DizzyEggg
53180ebf87
Update Healing wish to gen5 / gen8 mechanics (#2708)
* Updated Healing Wish and added config
* Fixed Lunar Dance message

Co-authored-by: AgustinGDLV <agustingomezdelavega@gmail.com>
Co-authored-by: AgustinGDLV <103095241+AgustinGDLV@users.noreply.github.com>
Co-authored-by: Martin Griffin <martinrgriffin@gmail.com>
2023-02-20 11:25:43 +00:00
GriffinR
f888021c8f
Merge pull request #1857 from GriffinRichards/sync-mapjson
Sync mapjson
2023-02-19 20:48:13 -05:00
DizzyEggg
380af442c3
Fix buggy pokemon anims with Illusion (#2639)
* try illusion fix

* fix
2023-02-19 12:05:56 +01:00
Eduardo Quezada D'Ottone
ec343cef02
Config to have Shuckle make Berry Juice from Oran Berries (#2331)
* Removed unused ifdefs and made actually check for Z Power Ring

* Config to have Shuckle make Berry Juice from Oran Berries

* Ordered species-specific configs
2023-02-19 10:45:59 +01:00
DizzyEggg
66d2f253a1 merge with master 2023-02-17 15:43:15 +01:00