Updated Dream Eater/Liquid Ooze's interaction to Gen 5 standards (#7528)
This commit is contained in:
parent
de6c9c6176
commit
a9d5c2cd28
@ -2835,13 +2835,6 @@ BattleScript_AlreadyAsleep::
|
||||
setmoveresultflags MOVE_RESULT_FAILED
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_WasntAffected::
|
||||
pause B_WAIT_TIME_SHORT
|
||||
printstring STRINGID_PKMNWASNTAFFECTED
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
setmoveresultflags MOVE_RESULT_FAILED
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_CantMakeAsleep::
|
||||
pause B_WAIT_TIME_SHORT
|
||||
printfromtable gUproarAwakeStringIds
|
||||
@ -2886,44 +2879,10 @@ BattleScript_MaxHp50Recoil::
|
||||
|
||||
BattleScript_EffectDreamEater::
|
||||
attackcanceler
|
||||
jumpifsubstituteblocks BattleScript_DreamEaterNoEffect
|
||||
jumpifstatus BS_TARGET, STATUS1_SLEEP, BattleScript_DreamEaterWorked
|
||||
jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_DreamEaterWorked
|
||||
BattleScript_DreamEaterNoEffect:
|
||||
attackstring
|
||||
ppreduce
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
goto BattleScript_WasntAffected
|
||||
BattleScript_DreamEaterWorked:
|
||||
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
|
||||
attackstring
|
||||
ppreduce
|
||||
critcalc
|
||||
damagecalc
|
||||
adjustdamage
|
||||
attackanimation
|
||||
waitanimation
|
||||
effectivenesssound
|
||||
hitanimation BS_TARGET
|
||||
waitstate
|
||||
healthbarupdate BS_TARGET
|
||||
datahpupdate BS_TARGET
|
||||
critmessage
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
resultmessage
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
jumpifstatus3 BS_ATTACKER, STATUS3_HEAL_BLOCK, BattleScript_DreamEaterTryFaintEnd
|
||||
setdrainedhp
|
||||
manipulatedamage DMG_BIG_ROOT
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
jumpifmovehadnoeffect BattleScript_DreamEaterTryFaintEnd
|
||||
printstring STRINGID_PKMNENERGYDRAINED
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_DreamEaterTryFaintEnd:
|
||||
tryfaintmon BS_TARGET
|
||||
goto BattleScript_MoveEnd
|
||||
jumpifsubstituteblocks BattleScript_DoesntAffectTargetAtkString
|
||||
jumpifstatus BS_TARGET, STATUS1_SLEEP, BattleScript_HitFromAccCheck
|
||||
jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_HitFromAccCheck
|
||||
goto BattleScript_DoesntAffectTargetAtkString
|
||||
|
||||
BattleScript_EffectMirrorMove::
|
||||
attackcanceler
|
||||
@ -9168,7 +9127,7 @@ BattleScript_EjectPackActivates::
|
||||
jumpifcantswitch BS_SCRIPTING, BattleScript_EjectButtonEnd
|
||||
goto BattleScript_EjectPackActivate_Ret
|
||||
|
||||
BattleScript_DarkTypePreventsPrankster::
|
||||
BattleScript_DoesntAffectTargetAtkString::
|
||||
attackstring
|
||||
ppreduce
|
||||
pause B_WAIT_TIME_SHORT
|
||||
|
||||
@ -428,7 +428,7 @@ Spaces in pattern match newlines (\n, \l, and \p) in the message.
|
||||
Often used to check that a battler took its turn but it failed, e.g.:
|
||||
```
|
||||
MESSAGE("Wobbuffet used Dream Eater!");
|
||||
MESSAGE("The opposing Wobbuffet wasn't affected!");
|
||||
MESSAGE("It doesn't affect the opposing Wobbuffet…");
|
||||
```
|
||||
|
||||
### `STATUS_ICON`
|
||||
|
||||
@ -426,7 +426,7 @@ extern const u8 BattleScript_MentalHerbCureEnd2[];
|
||||
extern const u8 BattleScript_TerrainPreventsEnd2[];
|
||||
extern const u8 BattleScript_MistyTerrainPrevents[];
|
||||
extern const u8 BattleScript_ElectricTerrainPrevents[];
|
||||
extern const u8 BattleScript_DarkTypePreventsPrankster[];
|
||||
extern const u8 BattleScript_DoesntAffectTargetAtkString[];
|
||||
extern const u8 BattleScript_GulpMissileGorging[];
|
||||
extern const u8 BattleScript_GulpMissileGulping[];
|
||||
extern const u8 BattleScript_GulpMissileFormChange[];
|
||||
|
||||
@ -131,7 +131,8 @@
|
||||
#define B_SKIP_RECHARGE GEN_LATEST // In Gen1, recharging moves such as Hyper Beam skip the recharge if the target gets KO'd
|
||||
#define B_ENCORE_TARGET GEN_LATEST // In Gen5+, encored moves are allowed to choose a target
|
||||
#define B_TIME_OF_DAY_HEALING_MOVES GEN_LATEST // In Gen2, Morning Sun, Moonlight, and Synthesis heal twice as much HP based off the time of day. Also changes how much they heal. Evening affects Moonlight.
|
||||
// If OW_TIMES_OF_DAY is set to Gen 3, then Morning Sun is boosted during the day.
|
||||
// If OW_TIMES_OF_DAY is set to Gen 3, then Morning Sun is boosted during the day.
|
||||
#define B_DREAM_EATER_LIQUID_OOZE GEN_LATEST // In Gen5+, Dream Eater is affected by Liquid Ooze.
|
||||
|
||||
// Ability settings
|
||||
#define B_GALE_WINGS GEN_LATEST // In Gen7+ requires full HP to trigger.
|
||||
|
||||
@ -9,7 +9,7 @@ enum __attribute__((packed)) BattleMoveEffects
|
||||
EFFECT_ABSORB,
|
||||
EFFECT_EXPLOSION,
|
||||
EFFECT_MISTY_EXPLOSION, // Same as EFFECT_EXPLOSION but it's boosted on Misty Terrain
|
||||
EFFECT_DREAM_EATER,
|
||||
EFFECT_DREAM_EATER, // Same as EFFECT_ABSORB but it can only be used on sleeping targets
|
||||
EFFECT_MIRROR_MOVE,
|
||||
EFFECT_ATTACK_UP,
|
||||
EFFECT_DEFENSE_UP,
|
||||
|
||||
@ -41,7 +41,6 @@ enum StringID
|
||||
STRINGID_PKMNMADESLEEP,
|
||||
STRINGID_PKMNALREADYASLEEP,
|
||||
STRINGID_PKMNALREADYASLEEP2,
|
||||
STRINGID_PKMNWASNTAFFECTED,
|
||||
STRINGID_PKMNWASPOISONED,
|
||||
STRINGID_PKMNPOISONEDBY,
|
||||
STRINGID_PKMNHURTBYPOISON,
|
||||
|
||||
@ -28,6 +28,7 @@ enum GenConfigTag
|
||||
GEN_STEAL_WILD_ITEMS,
|
||||
GEN_SNOW_WARNING,
|
||||
GEN_ALLY_SWITCH_FAIL_CHANCE,
|
||||
GEN_DREAM_EATER_LIQUID_OOZE,
|
||||
GEN_CONFIG_COUNT
|
||||
};
|
||||
|
||||
|
||||
@ -31,6 +31,7 @@ static const u8 sGenerationalChanges[GEN_CONFIG_COUNT] =
|
||||
[GEN_STEAL_WILD_ITEMS] = B_STEAL_WILD_ITEMS,
|
||||
[GEN_SNOW_WARNING] = B_SNOW_WARNING,
|
||||
[GEN_ALLY_SWITCH_FAIL_CHANCE] = B_ALLY_SWITCH_FAIL_CHANCE,
|
||||
[GEN_DREAM_EATER_LIQUID_OOZE] = B_DREAM_EATER_LIQUID_OOZE,
|
||||
};
|
||||
|
||||
#if TESTING
|
||||
|
||||
@ -434,7 +434,7 @@
|
||||
* Spaces in pattern match newlines (\n, \l, and \p) in the message.
|
||||
* Often used to check that a battler took its turn but it failed, e.g.:
|
||||
* MESSAGE("Wobbuffet used Dream Eater!");
|
||||
* MESSAGE("The opposing Wobbuffet wasn't affected!");
|
||||
* MESSAGE("It doesn't affect the opposing Wobbuffet…");
|
||||
*
|
||||
* STATUS_ICON(battler, status1 | none: | sleep: | poison: | burn: | freeze: | paralysis:, badPoison:)
|
||||
* Causes the test to fail if the battler's status is not changed to the
|
||||
|
||||
@ -200,7 +200,6 @@ const u8 *const gBattleStringsTable[STRINGID_COUNT] =
|
||||
[STRINGID_PKMNMADESLEEP] = COMPOUND_STRING("{B_SCR_NAME_WITH_PREFIX}'s {B_BUFF1} made {B_EFF_NAME_WITH_PREFIX2} sleep!"), //not in gen 5+, ability popup
|
||||
[STRINGID_PKMNALREADYASLEEP] = COMPOUND_STRING("{B_DEF_NAME_WITH_PREFIX} is already asleep!"),
|
||||
[STRINGID_PKMNALREADYASLEEP2] = COMPOUND_STRING("{B_ATK_NAME_WITH_PREFIX} is already asleep!"),
|
||||
[STRINGID_PKMNWASNTAFFECTED] = COMPOUND_STRING("{B_DEF_NAME_WITH_PREFIX} wasn't affected!"), //not in gen 5+, ability popup
|
||||
[STRINGID_PKMNWASPOISONED] = COMPOUND_STRING("{B_EFF_NAME_WITH_PREFIX} was poisoned!"),
|
||||
[STRINGID_PKMNPOISONEDBY] = COMPOUND_STRING("{B_EFF_NAME_WITH_PREFIX} was poisoned by {B_SCR_NAME_WITH_PREFIX2}'s {B_BUFF1}!"), //not in gen 5+, ability popup
|
||||
[STRINGID_PKMNHURTBYPOISON] = COMPOUND_STRING("{B_ATK_NAME_WITH_PREFIX} was hurt by its poisoning!"),
|
||||
|
||||
@ -6066,6 +6066,7 @@ static void Cmd_moveend(void)
|
||||
switch (moveEffect)
|
||||
{
|
||||
case EFFECT_ABSORB:
|
||||
case EFFECT_DREAM_EATER:
|
||||
if (!(gStatuses3[gBattlerAttacker] & STATUS3_HEAL_BLOCK)
|
||||
&& gBattleStruct->moveDamage[gBattlerTarget] > 0
|
||||
&& IsBattlerAlive(gBattlerAttacker))
|
||||
@ -6075,18 +6076,19 @@ static void Cmd_moveend(void)
|
||||
|
||||
gHitMarker |= HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_IGNORE_DISGUISE;
|
||||
effect = TRUE;
|
||||
if (GetBattlerAbility(gBattlerTarget) == ABILITY_LIQUID_OOZE)
|
||||
if ((moveEffect == EFFECT_DREAM_EATER && GetGenConfig(GEN_DREAM_EATER_LIQUID_OOZE) < GEN_5)
|
||||
|| GetBattlerAbility(gBattlerTarget) != ABILITY_LIQUID_OOZE)
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ABSORB;
|
||||
BattleScriptCall(BattleScript_EffectAbsorb);
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleStruct->moveDamage[gBattlerAttacker] *= -1;
|
||||
gHitMarker |= HITMARKER_PASSIVE_DAMAGE;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ABSORB_OOZE;
|
||||
BattleScriptCall(BattleScript_EffectAbsorbLiquidOoze);
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ABSORB;
|
||||
BattleScriptCall(BattleScript_EffectAbsorb);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case EFFECT_FINAL_GAMBIT:
|
||||
|
||||
@ -1194,7 +1194,7 @@ void PrepareStringBattle(enum StringID stringId, u32 battler)
|
||||
SET_STATCHANGER(STAT_SPEED, 1, FALSE);
|
||||
}
|
||||
|
||||
if ((stringId == STRINGID_ITDOESNTAFFECT || stringId == STRINGID_PKMNWASNTAFFECTED || stringId == STRINGID_PKMNUNAFFECTED))
|
||||
if ((stringId == STRINGID_ITDOESNTAFFECT || stringId == STRINGID_PKMNUNAFFECTED))
|
||||
TryInitializeTrainerSlideEnemyMonUnaffected(gBattlerTarget);
|
||||
|
||||
BtlController_EmitPrintString(battler, B_COMM_TO_CONTROLLER, stringId);
|
||||
@ -3046,7 +3046,7 @@ bool32 CanAbilityBlockMove(u32 battlerAtk, u32 battlerDef, u32 abilityAtk, u32 a
|
||||
if (option == RUN_SCRIPT && !IsSpreadMove(GetBattlerMoveTargetType(battlerAtk, move)))
|
||||
CancelMultiTurnMoves(battlerAtk, SKY_DROP_ATTACKCANCELLER_CHECK); // Don't cancel moves that can hit two targets bc one target might not be protected
|
||||
|
||||
battleScriptBlocksMove = BattleScript_DarkTypePreventsPrankster;
|
||||
battleScriptBlocksMove = BattleScript_DoesntAffectTargetAtkString;
|
||||
}
|
||||
|
||||
// Check def partner ability
|
||||
|
||||
@ -140,9 +140,9 @@ SINGLE_BATTLE_TEST("Liquid Ooze causes leech seed victim to faint before seeder"
|
||||
|
||||
SINGLE_BATTLE_TEST("Liquid Ooze causes Dream Eater users to lose HP instead of heal (Gen 5+)")
|
||||
{
|
||||
KNOWN_FAILING;
|
||||
s16 damage;
|
||||
GIVEN {
|
||||
WITH_CONFIG(GEN_DREAM_EATER_LIQUID_OOZE, GEN_5);
|
||||
ASSUME(GetMoveEffect(MOVE_SPORE) == EFFECT_NON_VOLATILE_STATUS);
|
||||
ASSUME(GetMoveNonVolatileStatus(MOVE_SPORE) == MOVE_EFFECT_SLEEP);
|
||||
ASSUME(GetMoveEffect(MOVE_DREAM_EATER) == EFFECT_DREAM_EATER);
|
||||
@ -167,6 +167,7 @@ SINGLE_BATTLE_TEST("Liquid Ooze does not cause Dream Eater users to lose HP inst
|
||||
{
|
||||
s16 damage;
|
||||
GIVEN {
|
||||
WITH_CONFIG(GEN_DREAM_EATER_LIQUID_OOZE, GEN_3);
|
||||
ASSUME(GetMoveEffect(MOVE_SPORE) == EFFECT_NON_VOLATILE_STATUS);
|
||||
ASSUME(GetMoveNonVolatileStatus(MOVE_SPORE) == MOVE_EFFECT_SLEEP);
|
||||
ASSUME(GetMoveEffect(MOVE_DREAM_EATER) == EFFECT_DREAM_EATER);
|
||||
|
||||
@ -33,7 +33,7 @@ SINGLE_BATTLE_TEST("Dream Eater fails on awake targets")
|
||||
TURN { MOVE(player, MOVE_DREAM_EATER); }
|
||||
} SCENE {
|
||||
MESSAGE("Wobbuffet used Dream Eater!");
|
||||
MESSAGE("The opposing Wobbuffet wasn't affected!");
|
||||
MESSAGE("It doesn't affect the opposing Wobbuffet…");
|
||||
}
|
||||
}
|
||||
|
||||
@ -88,7 +88,7 @@ SINGLE_BATTLE_TEST("Dream Eater fails if the target is behind a Substitute (Gen
|
||||
TURN { MOVE(opponent, MOVE_DREAM_EATER); }
|
||||
} SCENE {
|
||||
MESSAGE("The opposing Wobbuffet used Dream Eater!");
|
||||
MESSAGE("Wobbuffet wasn't affected!");
|
||||
MESSAGE("It doesn't affect Wobbuffet…");
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user