Commit Graph

5969 Commits

Author SHA1 Message Date
BuffelSaft
4861f2eea2
Merge pull request #1755 from ghoulslash/prankster_fix
Fix protect struct fields being set during ai calcs
2021-10-16 17:59:30 +13:00
BuffelSaft
791f4164a2 Fix PP being checked when HITMARKER_NO_PPDEDUCT is set
This fixes multi target moves and seems like it should be done anyway,
2021-10-16 17:31:27 +13:00
BuffelSaft
b5293cc3e2 Fix multi target moves
Only run CANCELLER_PRANKSTER when moving to the next target of a multi target move. If more cancellers are needed they can be added/moved after CANCELLER_PRANKSTER.
2021-10-16 17:04:36 +13:00
ghoulslash
1f176242aa add missing func definition 2021-10-15 16:06:50 -04:00
ghoulslash
c077091dbf small fixes, check GetCatchingBattler's semi-invulnerability 2021-10-15 14:57:26 -04:00
ghoulslash
b94f710c80 Merge branch 'battle_engine' of https://github.com/rh-hideout/pokeemerald-expansion into ballthrow 2021-10-15 14:49:37 -04:00
Eduardo Quezada D'Ottone
16f97f4b48
Merge pull request #1746 from ghoulslash/sand_spit
Fix sand spit + primal weather
2021-10-15 12:11:53 -03:00
Eduardo Quezada D'Ottone
0a090616ef
Merge pull request #1765 from ghoulslash/shell_smash
Shell Smash Animation
2021-10-15 12:09:06 -03:00
ghoulslash
883a249836 config for catching semi-invulnerable mons 2021-10-15 09:20:32 -04:00
LOuroboros
2bf8022673 Changed how SIDE_STATUS_RETALIATE is cleared 2021-10-15 07:30:05 -03:00
LOuroboros
3a25bce185 Turned Retaliate's effect into a side status 2021-10-15 06:03:48 -03:00
LOuroboros
1f97198267 Oops, I forgot to take the opponent's side into account 2021-10-15 05:02:14 -03:00
Eduardo Quezada D'Ottone
21837b659a
Merge branch 'battle_engine' into bug_bite 2021-10-14 19:46:50 -03:00
Eduardo Quezada D'Ottone
9b20fd4a07
Merge pull request #1748 from ghoulslash/memento
Fix memento Gen 7 fail condition
2021-10-14 18:27:01 -03:00
ghoulslash
85ce72a4d0 add shell smash anim 2021-10-14 10:47:39 -04:00
BuffelSaft
fc6e8f598c Merge branch 'battle_engine' into battle_bond 2021-10-14 16:24:59 +13:00
BuffelSaft
bb8d0e3d6b Fix Battle Bond
Battle Bond Greninja transforms only after a KO, and doesn't revert when switched out.
2021-10-14 16:18:11 +13:00
Eduardo Quezada D'Ottone
d689842689
Merge pull request #1657 from ghoulslash/rototiller
Rototiller Fix + MOVE_TARGET_ALL_BATTLERS
2021-10-13 22:45:50 -03:00
ghoulslash
7f2efb6619 format fixes, fix healing berries from printing message at full hp 2021-10-13 18:40:45 -04:00
ghoulslash
a3d2bdc9cf merge with be 2021-10-13 18:30:53 -04:00
ghoulslash
5108d173fc fix protect struct fields being set during ai calcs 2021-10-13 10:11:02 -04:00
ghoulslash
b447d582cd fix terrain timer decrementing and bg changing with anims disabled 2021-10-13 09:04:03 -04:00
ghoulslash
3248bd796a add quick draw 2021-10-12 21:49:18 -04:00
ghoulslash
f9272a89fa add mirror armor check to two-stage stat decrease effects 2021-10-12 21:09:27 -04:00
ghoulslash
996301d5d3 add mirror armor 2021-10-12 18:04:34 -04:00
ghoulslash
c0f3b7c3b4 record abilities from wandering spirit 2021-10-12 11:58:37 -04:00
ghoulslash
bbd09fdcf7 add wandering spirit 2021-10-12 10:32:51 -04:00
ghoulslash
11626d5043 fix memento fail condition 2021-10-12 07:53:28 -04:00
ghoulslash
791a899eed fix sand spit + primal weather 2021-10-11 21:29:08 -04:00
ghoulslash
e66820e646
Merge pull request #1744 from AsparagusEduardo/BE_configHiddenPow
Setting for pre-Gen6 Hidden Power Damage.
2021-10-11 15:13:16 -04:00
LOuroboros
6c550cd749 Implemented Retaliate's effect 2021-10-11 03:19:21 -03:00
ghoulslash
6212a3c431
Merge pull request #1703 from AsparagusEduardo/fix_ConfuseBerries
Fixed confuse berries affecting the wrong battler.
2021-10-10 20:21:03 -04:00
ghoulslash
06bcfea3b8 merge with be 2021-10-10 19:56:33 -04:00
ghoulslash
fcada4fcad handle rototiller + prankster 2021-10-10 19:54:17 -04:00
Eduardo Quezada D'Ottone
c3f8b77d82 Setting for pre-Gen6 Hidden Power Damage. 2021-10-10 20:26:38 -03:00
Eduardo Quezada D'Ottone
3f51132af2
Merge pull request #1733 from ghoulslash/substitute_fix
Fix DoesSubstituteBlockMove calls
2021-10-10 18:53:44 -03:00
Eduardo Quezada D'Ottone
7798468ce9
Merge pull request #1738 from BuffelSaft/safety-googles
Fix Safety Googles
2021-10-10 18:34:20 -03:00
Eduardo Quezada D'Ottone
01f563cb5e Fix infinite loop 2021-10-10 08:46:31 -03:00
BuffelSaft
8a7e6379b6
Merge pull request #1732 from ghoulslash/perish_song
Fix Soundproof cancelling out user's Perish Song
2021-10-10 22:55:20 +13:00
Eduardo Quezada D'Ottone
cf6e3873b4 Moved Electrified to Status4. 2021-10-10 01:13:23 -03:00
Eduardo Quezada D'Ottone
3add4d6a17 Added some status3 options to debug menu 2021-10-10 00:46:59 -03:00
Eduardo Quezada D'Ottone
4572e62669 Gen 5 Scald effect 2021-10-09 23:56:07 -03:00
Eduardo Quezada D'Ottone
903c4cbf68 Config for Blizzard + Hail 2021-10-09 23:52:37 -03:00
Eduardo Quezada D'Ottone
004f705607
Merge pull request #1549 from ghoulslash/last_ball
add last used ball
2021-10-09 17:27:28 -03:00
LOuroboros
2120545649 Oopsie 2021-10-09 01:07:27 -03:00
LOuroboros
91a68cd5db Implemented Primal Reversion 2021-10-09 00:36:41 -03:00
BuffelSaft
274e964d91 Fix Safety Googles
Fix typo and update gLastUsedItem before calling the safety goggles battle script.
2021-10-09 15:05:01 +13:00
ghoulslash
db0d9f6235 sound moves targeting user not blocked by own soundproof 2021-10-08 08:22:49 -04:00
BuffelSaft
fbc4d7584e
Merge pull request #1610 from LOuroboros/primalAbilities
Implement Desolate Land, Primordial Sea and Delta Stream
2021-10-08 20:01:09 +13:00
LOuroboros
359da5313e Handled some edge cases
Gastro Acid, Worry Seed, Simple Beam, Core Enforcer and Transform
2021-10-07 01:53:20 -03:00
LOuroboros
7548e74013 Forgot to clear the primal weathers in some places 2021-10-07 00:43:23 -03:00
ghoulslash
1afc43a0e8 fix DoesSubstituteBlockMove calls 2021-10-06 15:30:44 -04:00
ghoulslash
5f5df066d6 fix perish song + soundproof 2021-10-06 15:18:42 -04:00
ghoulslash
4aeadd96c9 merge with be 2021-10-06 14:49:23 -04:00
ghoulslash
11f4f0f08e update move data to those that target all battlers 2021-10-06 14:41:48 -04:00
ghoulslash
391cfabcac merge with be 2021-10-06 14:31:21 -04:00
ghoulslash
33d19d4e34 syntax fix 2021-10-06 14:19:15 -04:00
ghoulslash
3d24fd5f30 last ball defaults to first bag pocket item 2021-10-06 13:56:04 -04:00
ghoulslash
ee3a2c97ee Merge branch 'battle_engine' of https://github.com/rh-hideout/pokeemerald-expansion into last_ball 2021-10-06 13:54:40 -04:00
ghoulslash
1ad8448532 remove saveblock field 2021-10-06 13:54:33 -04:00
ghoulslash
4382420dd2 merge with be 2021-10-06 13:32:59 -04:00
ghoulslash
471eab40c8
Merge pull request #1729 from rh-hideout/ai_dynamic_move_types
AI handles dynamic move types
2021-10-06 09:34:08 -04:00
ghoulslash
1f4844c7f5
Merge pull request #1710 from AsparagusEduardo/BE_Struggle
Implemented modern effect of struggle with config
2021-10-06 09:27:10 -04:00
ghoulslash
2a45d9041c
Merge pull request #1716 from AsparagusEduardo/fix_Howl
Updated sound flags for Howl and Heal Bell
2021-10-06 09:25:57 -04:00
ghoulslash
5959eac924
Merge pull request #1705 from AsparagusEduardo/fix_UnnerveResist
Fix Unnerve not canceling out type resist berries.
2021-10-06 09:22:34 -04:00
ghoulslash
245ef1ad2d
Merge pull request #1715 from AsparagusEduardo/BE_ShadowTag
Config for Shadow Tag vs Shadow Tag
2021-10-06 09:02:58 -04:00
ghoulslash
1ec8b84492
Merge pull request #1727 from rh-hideout/simple_beam
Fix Simple Beam
2021-10-06 09:00:19 -04:00
ghoulslash
5bf236fc0d
Merge pull request #1712 from AsparagusEduardo/fix_stickyHold
Fix instances where Gastro Acid is not affecting the ability
2021-10-06 08:55:46 -04:00
LOuroboros
2b32581c14 Fixed infinite loop 2021-10-06 09:27:33 -03:00
LOuroboros
a646c3311b Another set of fixes
The ability pop up is supposed to show as weather changing abilities try but fail to activate.
2021-10-06 08:20:50 -03:00
LOuroboros
0f2cc99f45 WEATHER_STRONG_WINDS modifier fix
MulByTypeEffectiveness was the right answer all along.
I also added a short pause to BattleScript_AttackWeakenedByStrongWinds before STRINGID_ATTACKWEAKENEDBSTRONGWINDS is printed.
2021-10-06 07:33:54 -03:00
LOuroboros
b93c746a49 Reverted comment after the previous commit 2021-10-06 06:04:56 -03:00
LOuroboros
dc451167d1 More fixes
-Removed ability popup when Strong Winds weakens a SE Flying-type move
-Went back to the way I handled the dmg calculation for that originally
-Made sure to try to clear the primal weathers in a couple of other battle scripts
-Allowed Drought, Drizzle, Sand Stream and Snow Warning to activate but fail if WEATHER_STRONG_WINDS is in effect.
2021-10-06 05:54:28 -03:00
BuffelSaft
38b816ccdd AI handles dynamic move types
This will make the AI account for the type of moves like Weather Ball, Hidden Power and Revelation Dance when considering abilities that make the useless. E.g. Water-type Hidden Power vs. Storm Drain.
2021-10-06 21:53:30 +13:00
BuffelSaft
a48dec2e31
Merge pull request #1721 from AsparagusEduardo/fix_TrumpCard
Fixed Trump Card's damage check
2021-10-06 15:55:21 +13:00
BuffelSaft
1b663feafb
Merge pull request #1722 from AsparagusEduardo/fix_HeatCrash
Fixed Heat Crash's power table name
2021-10-06 15:39:09 +13:00
BuffelSaft
a6198e5d46 Fix Simple Beam
- No longer freezes the game
- Now fails if the target already has simple
- Explicitly checks and changes the target's ability instead of gActiveBattler's ability
2021-10-06 15:30:52 +13:00
Eduardo Quezada D'Ottone
92f0f6f820 Fixed Psychic Fangs power 2021-10-04 20:20:00 -03:00
Eduardo Quezada D'Ottone
4ab8c95207 Fixed Heat Crash's power table name 2021-10-04 20:17:43 -03:00
Eduardo Quezada D'Ottone
b3167b7d53 Fixed Trump Card's damage check 2021-10-04 19:40:36 -03:00
LOuroboros
dcefb523f8 Tweaks and fixes
-Fixed the Flying-type checks of WEATHER_STRONG_WINDS.
-Fixed the order of actions involving the printing of STRINGID_ATTACKWEAKENEDBSTRONGWINDS.
2021-10-04 08:12:41 -03:00
BuffelSaft
142a83ca96
Merge pull request #1708 from AsparagusEduardo/fix_SleepTalk
Fixed Sleep talk being canceled by the user being asleep..
2021-10-04 00:35:00 +13:00
LOuroboros
64a45d8f48 Tweaked trytoclearprimalweather
Made it so it won't actually try to clear a primal weather if a Pokémon with Desolate Land, Primordial Sea or Delta Stream is present on the field.
2021-10-03 08:24:54 -03:00
LOuroboros
b85b3094c8 Merge branch 'battle_engine' of https://github.com/rh-hideout/pokeemerald-expansion into primalAbilitiesDev 2021-10-03 07:05:56 -03:00
Eduardo Quezada D'Ottone
b5e0a07932
Merge pull request #1704 from LOuroboros/battle_bond
Implemented Battle Bond
2021-10-02 20:07:35 -03:00
Eduardo Quezada D'Ottone
76bdbf164e Updated sound flags for Howl and Heal Bell 2021-10-02 20:00:00 -03:00
Eduardo Quezada D'Ottone
978f73475b Config for Shadow Tag vs Shadow Tag 2021-10-02 19:01:11 -03:00
Eduardo Quezada D'Ottone
2d5da7852c Fixed Yawn + Vital Spirit + Gastro Acid 2021-10-02 18:44:04 -03:00
Eduardo Quezada D'Ottone
9d64a26625 Fix preasure + Gastro Acid 2021-10-02 18:31:09 -03:00
Eduardo Quezada D'Ottone
a22a456268 Fixed heal bell + soundproof + gastro acid 2021-10-02 18:21:02 -03:00
Eduardo Quezada D'Ottone
b29f5c801f Fixed Gastro Acid's effect on Early Bird 2021-10-02 18:16:14 -03:00
Eduardo Quezada D'Ottone
ebe5e03998 Added Gen 8 abilities affected by Mold Breaker 2021-10-02 17:07:29 -03:00
Eduardo Quezada D'Ottone
8d54e5666d Fixed waking up from uproar 2021-10-02 17:05:23 -03:00
Eduardo Quezada D'Ottone
5abb0c0dfe Fixed perish song + soundproof + gastro acid 2021-10-02 16:48:45 -03:00
Eduardo Quezada D'Ottone
6208995606 Fixed Run Away. 2021-10-02 15:52:55 -03:00
Eduardo Quezada D'Ottone
9aee8cbea5 Fixed Sticky Hold not being negated by Gastro Acid when stealing and switching items 2021-10-02 14:47:38 -03:00
Eduardo Quezada D'Ottone
57ea20bc6d Implemented modern effect of struggle with config 2021-10-02 13:32:36 -03:00
LOuroboros
a18b9c5b32 Quick tweaks
-Use the species name for sText_AttackerBecameAshSpecies
-Make Battle Bond not activate if the opposing party doesn't have 2 members or more.
2021-10-02 11:21:11 -03:00
Eduardo Quezada D'Ottone
63c6e73eb8 Fixed Sleep talk being canceled by the user being asleep.. 2021-10-02 09:38:43 -03:00
Eduardo Quezada D'Ottone
16d032e99d Fix Unnerve not canceling out type resist berries. 2021-10-02 02:01:34 -03:00
BuffelSaft
57d2e21117 Merge branch 'battle_engine' of https://github.com/rh-hideout/pokeemerald into shields-down 2021-10-02 15:51:48 +13:00
BuffelSaft
611da31ae3 Fix form ID check
The six here should be a seven, and replacing it with this function call is better than hard-coding it.
2021-10-02 15:51:16 +13:00
LOuroboros
c464b1b5dd STRINGID_ATTACKERBECAMEASHGRENINJA -> STRINGID_ATTACKERBECAMEASHSPECIES 2021-10-01 23:12:59 -03:00
LOuroboros
f3ded43a88 Implemented Battle Bond 2021-10-01 22:49:17 -03:00
Eduardo Quezada D'Ottone
f616760fc9
Merge pull request #1349 from LOuroboros/gulp_missile
Implemented Gulp Missile
2021-10-01 16:53:51 -03:00
LOuroboros
43e73ac576 Fixed Safari Zone 2021-10-01 05:25:25 -03:00
LOuroboros
0389dbf9f2 More fixes
-Removed IsBattlerAlive check for case ABILITY_GULP_MISSILE in ABILITYEFFECT_MOVE_END_ATTACKER. Turns out Cramorant can change form even on single wild battles.
-Added a check for IsBattlerAlive in the case ABILITY_GULP_MISSILE of ABILITYEFFECT_MOVE_END, because otherwise, for whatever reason, the user was trying to trigger the Gulping effect even in its base form.
-Set the stat to change for the Gulping effect from within the battle script. The rest of the effect is handled there, so may as well.
-Fixed the check for case ABILITY_GULP_MISSILE in ABILITYEFFECT_MOVE_END_ATTACKER. Apparently, a silent species change was happening because of the order of the checks. Thanks to AsparagusEduardo for pointing this one out.
-Fixed the secondary effect of a target's Gulp Missile affecting an attacker that has fainted.
-Fixed the Defense reduction of the Gulping effect bypassing Clear Body.
2021-09-29 23:18:22 -03:00
LOuroboros
e783cde387 Another small condition fix and small optimization
-Checking for IsBattlerAlive is incorrect because Gulp Missile's counterattack should happen even if Cramorant faints.
-Made the code a bit more readable.
2021-09-27 21:33:19 -03:00
LOuroboros
ceffaa4e76 Another condition fix
I accidentally broke Gulp Missile's interaction with the user's Dive, lol.
2021-09-27 20:12:32 -03:00
LOuroboros
a49ea33dd0 A lot of fixes
-Fixed Gulp Missile's activation. Its effects were happening even if the conditions weren't actually met in battle.
-Fixed Gulp Missile activating if the only/last target has already fainted.
-Fixed Gulp Missile's Gorging animation, though it still uses Tackle's.
-Fixed Gulp Missile's Gorging attack affecting an opponent with Magic Guard.
-Fixed Gulp Missile changing Cramorant's form if Surf failed.
2021-09-27 08:57:09 -03:00
ghoulslash
761006a164 merge with be 2021-09-26 19:19:32 -04:00
Eduardo Quezada D'Ottone
b4e456aeca
Merge pull request #1607 from BuffelSaft/mega-icon
Move mega indicator for lv 100 mons
2021-09-26 17:40:36 -03:00
LOuroboros
1b039062da Merge branch 'battle_engine' of https://github.com/rh-hideout/pokeemerald-expansion into gulp_missile 2021-09-25 22:20:34 -03:00
Syreldar
4c05520bf3 Fixed Retaliate's naming. 2021-09-24 16:02:26 +02:00
LOuroboros
8a2921ef71 Completed Black Sludge's effect 2021-09-24 07:01:48 -03:00
Eduardo Quezada D'Ottone
e87c170db0 Merge branch 'BattleEngine' into booleanStandard
# Conflicts:
#	src/battle_main.c
#	src/battle_script_commands.c
2021-09-23 18:20:35 -03:00
Eduardo Quezada D'Ottone
13a464ffa4
Merge pull request #1673 from ghoulslash/gen8_move_effects
Gen8 move effects Fixes
2021-09-23 18:04:20 -03:00
ghoulslash
2f69748e0d merge with be 2021-09-23 14:38:01 -04:00
ghoulslash
94ec25319f syntax fixes. Use BlocksPrankster for perish song battle script 2021-09-23 14:35:37 -04:00
ghoulslash
8a9d28d97f
Update src/battle_util.c
Co-authored-by: ultima-soul <33333039+ultima-soul@users.noreply.github.com>
2021-09-23 12:21:36 -06:00
ghoulslash
2cea541b2a
Update src/battle_script_commands.c
Co-authored-by: ultima-soul <33333039+ultima-soul@users.noreply.github.com>
2021-09-23 12:21:26 -06:00
ghoulslash
3925c07c1a fix l graphic 2021-09-23 13:20:32 -04:00
ghoulslash
33972b5493 merge with be 2021-09-23 12:04:13 -04:00
ghoulslash
3f34fec42f change last ball graphic based on config. replace saveblock field with ewram field 2021-09-23 12:03:01 -04:00
Eduardo Quezada D'Ottone
d084d2a68d Merge branch 'BattleEngine' into booleanStandard
# Conflicts:
#	include/battle.h
#	src/battle_main.c
#	src/battle_script_commands.c
2021-09-22 23:42:00 -03:00
Eduardo Quezada D'Ottone
075c0299a1 Better names for Micle and Custap flags 2021-09-22 23:29:26 -03:00
Eduardo Quezada D'Ottone
380e1e470c Applied use of TRUE and FALSE for flags. 2021-09-22 23:29:00 -03:00
ghoulslash
6ec1a74948 Merge branch 'battle_engine' of https://github.com/rh-hideout/pokeemerald-expansion into gen8_move_effects 2021-09-22 21:51:45 -04:00
ghoulslash
936f2c7bcb fix eject pack weak armor special case 2021-09-22 21:51:37 -04:00
Eduardo Quezada D'Ottone
2c66aa84b6
Merge pull request #1378 from ghoulslash/gen8_move_effects
Several Gen 8 Move Effects
2021-09-22 22:48:29 -03:00
ghoulslash
9bf2ffe459 fix lash out stat fell 2021-09-22 21:15:02 -04:00
ghoulslash
d738297f24 merge with be 2021-09-22 16:26:09 -04:00
ghoulslash
3559a1b8e6 fix prankster + magic coat 2021-09-22 16:09:23 -04:00
ghoulslash
a10a8714fc
Merge pull request #1672 from rh-hideout/revert-1671-scaldThawConfig
Revert "Scald thaw flag config for Gen 5"
2021-09-22 11:48:29 -06:00
ghoulslash
f7b90bab93
Merge pull request #1670 from SBird1337/ai/expected-value
[ai] use expected value move dmg calculation
2021-09-22 10:15:37 -06:00
sbird
303e31ae25 [ai] use expected value to simulate EFFECT_PSYWAVE 2021-09-22 18:05:58 +02:00
ghoulslash
8cc0bb6ac0
Merge pull request #1652 from BuffelSaft/multi-hit-resist-berry
Fix multihit moves vs damage reducing berries
2021-09-22 09:42:53 -06:00
ghoulslash
a01690cd57
Merge pull request #1665 from BuffelSaft/download
Fix Download
2021-09-22 09:40:48 -06:00
Eduardo Quezada D'Ottone
707d49242e
Revert "Scald thaw flag config for Gen 5" 2021-09-22 12:31:23 -03:00
ghoulslash
fb17176a26
Merge pull request #1667 from AsparagusEduardo/fix_IllusionEgg
Adds missing check for Egg in Illusion
2021-09-22 09:01:31 -06:00
ghoulslash
c5eeab88dc
Merge pull request #1671 from AsparagusEduardo/scaldThawConfig
Scald thaw flag config for Gen 5
2021-09-22 09:01:11 -06:00
ghoulslash
1309eea8ec Merge branch 'battle_engine' of https://github.com/rh-hideout/pokeemerald-expansion into gen8_move_effects 2021-09-22 09:43:48 -04:00
ghoulslash
13062b5a8f fix lash out, obstruct, and decorate 2021-09-22 09:43:40 -04:00
Eduardo Quezada D'Ottone
53d985eedd Scald thaw flag config for <Gen 5 2021-09-22 10:29:32 -03:00
ghoulslash
fc84ebbd3e redo prankster checks to handle assist 2021-09-22 08:06:42 -04:00
sbird
0ee13418dc [ai] use expected value move dmg calculation 2021-09-22 13:15:43 +02:00
BuffelSaft
35af7a9cc1 Fix Foul Play
if != else if. Pretty sure I broke this when adding Body Press.
2021-09-22 15:44:13 +12:00
Eduardo Quezada D'Ottone
b65b27c0dd Adds missing check for Egg in Illusion 2021-09-22 00:20:34 -03:00
Eduardo Quezada D'Ottone
9a72178fa2
Merge pull request #1548 from StubbornOne/battle_engine
Add Telepathy's damage prevention effect
2021-09-21 23:02:41 -03:00
Eduardo Quezada D'Ottone
7571d56140
Applied Egg's implementation of telepathy 2021-09-21 22:57:05 -03:00