Comatose
This commit is contained in:
parent
7051f261d1
commit
b15f0b3bb3
3 changed files with 26 additions and 5 deletions
|
@ -2000,6 +2000,7 @@ BattleScript_EffectSleep::
|
|||
jumpifsubstituteblocks BattleScript_ButItFailed
|
||||
jumpifstatus BS_TARGET, STATUS1_SLEEP, BattleScript_AlreadyAsleep
|
||||
jumpifcantmakeasleep BattleScript_CantMakeAsleep
|
||||
jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_LeafGuardProtects
|
||||
jumpifflowerveil BattleScript_FlowerVeilProtects
|
||||
jumpifability BS_TARGET_SIDE, ABILITY_SWEET_VEIL, BattleScript_SweetVeilProtects
|
||||
jumpifleafguard BattleScript_LeafGuardProtects
|
||||
|
@ -2189,6 +2190,7 @@ BattleScript_EffectDreamEater::
|
|||
attackcanceler
|
||||
jumpifsubstituteblocks BattleScript_DreamEaterNoEffect
|
||||
jumpifstatus BS_TARGET, STATUS1_SLEEP, BattleScript_DreamEaterWorked
|
||||
jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_DreamEaterWorked
|
||||
BattleScript_DreamEaterNoEffect:
|
||||
attackstring
|
||||
ppreduce
|
||||
|
@ -2499,6 +2501,7 @@ BattleScript_EffectToxic::
|
|||
attackstring
|
||||
ppreduce
|
||||
jumpifability BS_TARGET, ABILITY_IMMUNITY, BattleScript_ImmunityProtected
|
||||
jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_LeafGuardProtects
|
||||
jumpifflowerveil BattleScript_FlowerVeilProtects
|
||||
jumpifleafguard BattleScript_LeafGuardProtects
|
||||
jumpifsubstituteblocks BattleScript_ButItFailed
|
||||
|
@ -2556,6 +2559,7 @@ BattleScript_EffectRest::
|
|||
attackstring
|
||||
ppreduce
|
||||
jumpifstatus BS_ATTACKER, STATUS1_SLEEP, BattleScript_RestIsAlreadyAsleep
|
||||
jumpifability BS_ATTACKER, ABILITY_COMATOSE, BattleScript_RestIsAlreadyAsleep
|
||||
jumpifcantmakeasleep BattleScript_RestCantSleep
|
||||
trysetrest BattleScript_AlreadyAtFullHp
|
||||
pause 0x20
|
||||
|
@ -2826,6 +2830,7 @@ BattleScript_EffectPoison::
|
|||
attackstring
|
||||
ppreduce
|
||||
jumpifability BS_TARGET, ABILITY_IMMUNITY, BattleScript_ImmunityProtected
|
||||
jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_LeafGuardProtects
|
||||
jumpifflowerveil BattleScript_FlowerVeilProtects
|
||||
jumpifleafguard BattleScript_LeafGuardProtects
|
||||
jumpifsubstituteblocks BattleScript_ButItFailed
|
||||
|
@ -2849,6 +2854,7 @@ BattleScript_EffectParalyze:
|
|||
attackstring
|
||||
ppreduce
|
||||
jumpifability BS_TARGET, ABILITY_LIMBER, BattleScript_LimberProtected
|
||||
jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_LeafGuardProtects
|
||||
jumpifflowerveil BattleScript_FlowerVeilProtects
|
||||
jumpifleafguard BattleScript_LeafGuardProtects
|
||||
jumpifsubstituteblocks BattleScript_ButItFailed
|
||||
|
@ -3141,6 +3147,7 @@ BattleScript_EffectPainSplit::
|
|||
|
||||
BattleScript_EffectSnore::
|
||||
attackcanceler
|
||||
jumpifability BS_ATTACKER, ABILITY_COMATOSE, BattleScript_SnoreIsAsleep
|
||||
jumpifstatus BS_ATTACKER, STATUS1_SLEEP, BattleScript_SnoreIsAsleep
|
||||
attackstring
|
||||
ppreduce
|
||||
|
@ -3194,6 +3201,7 @@ BattleScript_EffectSketch::
|
|||
|
||||
BattleScript_EffectSleepTalk::
|
||||
attackcanceler
|
||||
jumpifability BS_ATTACKER, ABILITY_COMATOSE, BattleScript_SleepTalkIsAsleep
|
||||
jumpifstatus BS_ATTACKER, STATUS1_SLEEP, BattleScript_SleepTalkIsAsleep
|
||||
attackstring
|
||||
ppreduce
|
||||
|
@ -3345,6 +3353,7 @@ BattleScript_EffectNightmare::
|
|||
jumpifsubstituteblocks BattleScript_ButItFailed
|
||||
jumpifstatus2 BS_TARGET, STATUS2_NIGHTMARE, BattleScript_ButItFailed
|
||||
jumpifstatus BS_TARGET, STATUS1_SLEEP, BattleScript_NightmareWorked
|
||||
jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_NightmareWorked
|
||||
goto BattleScript_ButItFailed
|
||||
BattleScript_NightmareWorked::
|
||||
attackanimation
|
||||
|
@ -4079,6 +4088,7 @@ BattleScript_EffectWillOWisp::
|
|||
jumpifstatus BS_TARGET, STATUS1_BURN, BattleScript_AlreadyBurned
|
||||
jumpiftype BS_TARGET, TYPE_FIRE, BattleScript_NotAffected
|
||||
jumpifability BS_TARGET, ABILITY_WATER_VEIL, BattleScript_WaterVeilPrevents
|
||||
jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_LeafGuardProtects
|
||||
jumpifflowerveil BattleScript_FlowerVeilProtects
|
||||
jumpifleafguard BattleScript_LeafGuardProtects
|
||||
jumpifstatus BS_TARGET, STATUS1_ANY, BattleScript_ButItFailed
|
||||
|
@ -4343,6 +4353,7 @@ BattleScript_EffectYawn::
|
|||
ppreduce
|
||||
jumpifability BS_TARGET, ABILITY_VITAL_SPIRIT, BattleScript_PrintBankAbilityMadeIneffective
|
||||
jumpifability BS_TARGET, ABILITY_INSOMNIA, BattleScript_PrintBankAbilityMadeIneffective
|
||||
jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_PrintBankAbilityMadeIneffective
|
||||
jumpifflowerveil BattleScript_FlowerVeilProtects
|
||||
jumpifleafguard BattleScript_LeafGuardProtects
|
||||
jumpifsubstituteblocks BattleScript_ButItFailed
|
||||
|
|
|
@ -2148,7 +2148,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||
for (gActiveBattler = 0;
|
||||
gActiveBattler < gBattlersCount && !(gBattleMons[gActiveBattler].status2 & STATUS2_UPROAR);
|
||||
gActiveBattler++)
|
||||
{}
|
||||
;
|
||||
}
|
||||
else
|
||||
gActiveBattler = gBattlersCount;
|
||||
|
@ -2159,6 +2159,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||
break;
|
||||
if (GetBattlerAbility(gEffectBattler) == ABILITY_VITAL_SPIRIT
|
||||
|| GetBattlerAbility(gEffectBattler) == ABILITY_INSOMNIA
|
||||
|| GetBattlerAbility(gEffectBattler) == ABILITY_COMATOSE
|
||||
|| IsAbilityOnSide(gEffectBattler, ABILITY_SWEET_VEIL)
|
||||
|| IsFlowerVeilProtected(gEffectBattler)
|
||||
|| IsLeafGuardProtected(gEffectBattler))
|
||||
|
@ -2205,6 +2206,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||
if (gBattleMons[gEffectBattler].status1)
|
||||
break;
|
||||
if (GetBattlerAbility(gEffectBattler) == ABILITY_IMMUNITY
|
||||
|| GetBattlerAbility(gEffectBattler) == ABILITY_COMATOSE
|
||||
|| IsFlowerVeilProtected(gEffectBattler)
|
||||
|| IsLeafGuardProtected(gEffectBattler))
|
||||
break;
|
||||
|
@ -2244,6 +2246,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||
if (IS_BATTLER_OF_TYPE(gEffectBattler, TYPE_FIRE))
|
||||
break;
|
||||
if (GetBattlerAbility(gEffectBattler) == ABILITY_WATER_VEIL
|
||||
|| GetBattlerAbility(gEffectBattler) == ABILITY_COMATOSE
|
||||
|| IsFlowerVeilProtected(gEffectBattler)
|
||||
|| IsLeafGuardProtected(gEffectBattler))
|
||||
break;
|
||||
|
@ -2262,6 +2265,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||
if (noSunCanFreeze == 0)
|
||||
break;
|
||||
if (GetBattlerAbility(gEffectBattler) == ABILITY_MAGMA_ARMOR
|
||||
|| GetBattlerAbility(gEffectBattler) == ABILITY_COMATOSE
|
||||
|| IsFlowerVeilProtected(gEffectBattler)
|
||||
|| IsLeafGuardProtected(gEffectBattler))
|
||||
break;
|
||||
|
@ -2307,6 +2311,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||
if (IS_BATTLER_OF_TYPE(gEffectBattler, TYPE_ELECTRIC))
|
||||
break;
|
||||
if (GetBattlerAbility(gEffectBattler) == ABILITY_LIMBER
|
||||
|| GetBattlerAbility(gEffectBattler) == ABILITY_COMATOSE
|
||||
|| IsFlowerVeilProtected(gEffectBattler)
|
||||
|| IsLeafGuardProtected(gEffectBattler))
|
||||
break;
|
||||
|
@ -2350,6 +2355,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||
if (!IS_BATTLER_OF_TYPE(gEffectBattler, TYPE_POISON) && !IS_BATTLER_OF_TYPE(gEffectBattler, TYPE_STEEL))
|
||||
{
|
||||
if (GetBattlerAbility(gEffectBattler) == ABILITY_IMMUNITY
|
||||
|| GetBattlerAbility(gEffectBattler) == ABILITY_COMATOSE
|
||||
|| IsFlowerVeilProtected(gEffectBattler)
|
||||
|| IsLeafGuardProtected(gEffectBattler))
|
||||
break;
|
||||
|
@ -11674,7 +11680,8 @@ static void Cmd_trygetbaddreamstarget(void)
|
|||
{
|
||||
if (GetBattlerSide(gBattlerTarget) == badDreamsMonSide)
|
||||
continue;
|
||||
if (gBattleMons[gBattlerTarget].status1 & STATUS1_SLEEP && IsBattlerAlive(gBattlerTarget))
|
||||
if ((gBattleMons[gBattlerTarget].status1 & STATUS1_SLEEP || GetBattlerAbility(gBattlerTarget) == ABILITY_COMATOSE)
|
||||
&& IsBattlerAlive(gBattlerTarget))
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -3056,7 +3056,10 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA
|
|||
gDisableStructs[gBattlerAttacker].truantCounter ^= 1;
|
||||
break;
|
||||
case ABILITY_BAD_DREAMS:
|
||||
if (gBattleMons[BATTLE_OPPOSITE(battler)].status1 & STATUS1_SLEEP || gBattleMons[BATTLE_OPPOSITE(battler)].status1 & STATUS1_SLEEP)
|
||||
if (gBattleMons[battler].status1 & STATUS1_SLEEP
|
||||
|| gBattleMons[BATTLE_OPPOSITE(battler)].status1 & STATUS1_SLEEP
|
||||
|| GetBattlerAbility(battler) == ABILITY_COMATOSE
|
||||
|| GetBattlerAbility(BATTLE_OPPOSITE(battler)) == ABILITY_COMATOSE)
|
||||
{
|
||||
BattleScriptPushCursorAndCallback(BattleScript_BadDreamsActivates);
|
||||
effect++;
|
||||
|
@ -5214,7 +5217,7 @@ static u16 CalcMoveBasePower(u16 move, u8 battlerAtk, u8 battlerDef)
|
|||
basePower = gNaturalGiftTable[ITEM_TO_BERRY(gBattleMons[battlerAtk].item)].power;
|
||||
break;
|
||||
case EFFECT_WAKE_UP_SLAP:
|
||||
if (gBattleMons[battlerDef].status1 & STATUS1_SLEEP)
|
||||
if (gBattleMons[battlerDef].status1 & STATUS1_SLEEP || GetBattlerAbility(battlerDef) == ABILITY_COMATOSE)
|
||||
basePower *= 2;
|
||||
break;
|
||||
case EFFECT_SMELLINGSALT:
|
||||
|
@ -5225,7 +5228,7 @@ static u16 CalcMoveBasePower(u16 move, u8 battlerAtk, u8 battlerDef)
|
|||
basePower = 120 * gBattleMons[battlerDef].hp / gBattleMons[battlerDef].maxHP;
|
||||
break;
|
||||
case EFFECT_HEX:
|
||||
if (gBattleMons[battlerDef].status1 & STATUS1_ANY)
|
||||
if (gBattleMons[battlerDef].status1 & STATUS1_ANY || GetBattlerAbility(battlerDef) == ABILITY_COMATOSE)
|
||||
basePower *= 2;
|
||||
break;
|
||||
case EFFECT_ASSURANCE:
|
||||
|
|
Loading…
Reference in a new issue