mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
add stuff cheeks
This commit is contained in:
parent
4ca6d76160
commit
ab529b4e89
@ -368,6 +368,30 @@ gBattleScriptsForMoveEffects:: @ 82D86A8
|
||||
.4byte BattleScript_EffectSleepHit
|
||||
.4byte BattleScript_EffectAttackerDefenseDownHit
|
||||
.4byte BattleScript_EffectBodyPress
|
||||
.4byte BattleScript_EffectStuffCheeks
|
||||
|
||||
BattleScript_EffectStuffCheeks::
|
||||
attackcanceler
|
||||
attackstring
|
||||
ppreduce
|
||||
jumpifnotberry BS_ATTACKER, BattleScript_ButItFailed
|
||||
attackanimation
|
||||
waitanimation
|
||||
BattleScript_StuffCheeksEatBerry:
|
||||
setbyte sBERRY_OVERRIDE, TRUE
|
||||
orword gHitMarker, HITMARKER_NO_ANIMATIONS
|
||||
consumeberry BS_ATTACKER
|
||||
bicword gHitMarker, HITMARKER_NO_ANIMATIONS
|
||||
setbyte sBERRY_OVERRIDE, FALSE
|
||||
setstatchanger STAT_DEF, 2, FALSE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_StuffCheeksEnd
|
||||
setgraphicalstatchangevalues
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_StuffCheeksEnd @ cant raise def
|
||||
playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_StuffCheeksEnd:
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectAttackerDefenseDownHit:
|
||||
setmoveeffect MOVE_EFFECT_DEF_MINUS_1 | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN
|
||||
@ -5985,6 +6009,10 @@ BattleScript_SelectingNotAllowedMoveGravity::
|
||||
printselectionstring STRINGID_GRAVITYPREVENTSUSAGE
|
||||
endselectionscript
|
||||
|
||||
BattleScript_SelectingNotAllowedStuffCheeks::
|
||||
printselectionstring STRINGID_STUFFCHEEKSCANTSELECT
|
||||
endselectionscript
|
||||
|
||||
BattleScript_SelectingNotAllowedBelch::
|
||||
printselectionstring STRINGID_BELCHCANTSELECT
|
||||
endselectionscript
|
||||
|
@ -295,6 +295,7 @@ extern const u8 BattleScript_ProteanActivates[];
|
||||
extern const u8 BattleScript_DazzlingProtected[];
|
||||
extern const u8 BattleScript_MoveUsedPsychicTerrainPrevents[];
|
||||
extern const u8 BattleScript_MoveUsedPowder[];
|
||||
extern const u8 BattleScript_SelectingNotAllowedStuffCheeks[];
|
||||
extern const u8 BattleScript_SelectingNotAllowedBelch[];
|
||||
extern const u8 BattleScript_SelectingNotAllowedBelchInPalace[];
|
||||
extern const u8 BattleScript_PsychicSurgeActivates[];
|
||||
|
@ -352,6 +352,7 @@
|
||||
#define EFFECT_SLEEP_HIT 346
|
||||
#define EFFECT_ATTACKER_DEFENSE_DOWN_HIT 347
|
||||
#define EFFECT_BODY_PRESS 348
|
||||
#define EFFECT_STUFF_CHEEKS 349
|
||||
|
||||
#define NUM_BATTLE_MOVE_EFFECTS 350
|
||||
|
||||
|
@ -570,8 +570,9 @@
|
||||
#define STRINGID_MICLEBERRYACTIVATES 566
|
||||
#define STRINGID_PKMNSHOOKOFFTHETAUNT 567
|
||||
#define STRINGID_PKMNGOTOVERITSINFATUATION 568
|
||||
#define STRINGID_STUFFCHEEKSCANTSELECT 569
|
||||
|
||||
#define BATTLESTRINGS_COUNT 569
|
||||
#define BATTLESTRINGS_COUNT 570
|
||||
|
||||
// The below IDs are all indexes into battle message tables,
|
||||
// used to determine which of a set of messages to print.
|
||||
|
@ -792,21 +792,17 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
|
||||
if (!BattlerStatCanRise(battlerAtk, AI_DATA->atkAbility, STAT_ATK) || !HasMoveWithSplit(battlerAtk, SPLIT_PHYSICAL))
|
||||
score -= 10;
|
||||
break;
|
||||
case EFFECT_DEFENSE_UP_2:
|
||||
if (move == MOVE_STUFF_CHEEKS && ItemId_GetPocket(gBattleMons[battlerAtk].item) != POCKET_BERRIES)
|
||||
score -= 10;
|
||||
case EFFECT_STUFF_CHEEKS:
|
||||
if (ItemId_GetPocket(gBattleMons[battlerAtk].item) != POCKET_BERRIES)
|
||||
return 0; // cannot even select
|
||||
//fallthrough
|
||||
case EFFECT_DEFENSE_UP:
|
||||
case EFFECT_DEFENSE_UP_2:
|
||||
case EFFECT_DEFENSE_UP_3:
|
||||
case EFFECT_DEFENSE_CURL:
|
||||
if (!BattlerStatCanRise(battlerAtk, AI_DATA->atkAbility, STAT_DEF))
|
||||
score -= 10;
|
||||
break;
|
||||
case EFFECT_SPEED_UP:
|
||||
case EFFECT_SPEED_UP_2:
|
||||
if (!BattlerStatCanRise(battlerAtk, AI_DATA->atkAbility, STAT_SPEED))
|
||||
score -= 10;
|
||||
break;
|
||||
case EFFECT_SPECIAL_ATTACK_UP:
|
||||
case EFFECT_SPECIAL_ATTACK_UP_2:
|
||||
case EFFECT_SPECIAL_ATTACK_UP_3:
|
||||
|
@ -696,9 +696,11 @@ static const u8 sText_CanActFaster[] = _("{B_ATK_NAME_WITH_PREFIX} can act faste
|
||||
static const u8 sText_MicleBerryActivates[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} boosted the accuracy of its\nnext move using {B_LAST_ITEM}!");
|
||||
static const u8 sText_PkmnShookOffTheTaunt[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} shook off\nthe taunt!");
|
||||
static const u8 sText_PkmnGotOverItsInfatuation[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} got over\nits infatuation!");
|
||||
static const u8 sText_StuffCheeksCantSelect[] = _("Stuff Cheeks cannot be\nselected without a Berry!\p");
|
||||
|
||||
const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
||||
{
|
||||
[STRINGID_STUFFCHEEKSCANTSELECT - 12] = sText_StuffCheeksCantSelect,
|
||||
[STRINGID_PKMNGOTOVERITSINFATUATION - 12] = sText_PkmnGotOverItsInfatuation,
|
||||
[STRINGID_PKMNSHOOKOFFTHETAUNT - 12] = sText_PkmnShookOffTheTaunt,
|
||||
[STRINGID_MICLEBERRYACTIVATES - 12] = sText_MicleBerryActivates,
|
||||
|
@ -1708,6 +1708,21 @@ u8 TrySetCantSelectMoveBattleScript(void)
|
||||
limitations++;
|
||||
}
|
||||
}
|
||||
|
||||
if (move == MOVE_STUFF_CHEEKS && ItemId_GetPocket(gBattleMons[gActiveBattler].item) != POCKET_BERRIES)
|
||||
{
|
||||
gCurrentMove = move;
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_PALACE)
|
||||
{
|
||||
gPalaceSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingNotAllowedBelchInPalace;
|
||||
gProtectStructs[gActiveBattler].palaceUnableToUseMove = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
gSelectionBattleScripts[gActiveBattler] = BattleScript_SelectingNotAllowedStuffCheeks;
|
||||
limitations++;
|
||||
}
|
||||
}
|
||||
|
||||
gPotentialItemEffectBattler = gActiveBattler;
|
||||
if (HOLD_EFFECT_CHOICE(holdEffect) && *choicedMove != 0 && *choicedMove != 0xFFFF && *choicedMove != move)
|
||||
@ -1791,6 +1806,8 @@ u8 CheckMoveLimitations(u8 battlerId, u8 unusableMoves, u8 check)
|
||||
unusableMoves |= gBitTable[i];
|
||||
else if (gDisableStructs[battlerId].throatChopTimer && gBattleMoves[gBattleMons[battlerId].moves[i]].flags & FLAG_SOUND)
|
||||
unusableMoves |= gBitTable[i];
|
||||
else if (gBattleMons[battlerId].moves[i] == MOVE_STUFF_CHEEKS && ItemId_GetPocket(gBattleMons[gActiveBattler].item) != POCKET_BERRIES)
|
||||
unusableMoves |= gBitTable[i];
|
||||
}
|
||||
return unusableMoves;
|
||||
}
|
||||
|
@ -10771,7 +10771,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
|
||||
|
||||
[MOVE_STUFF_CHEEKS] =
|
||||
{
|
||||
.effect = EFFECT_DEFENSE_UP_2,
|
||||
.effect = EFFECT_STUFF_CHEEKS,
|
||||
.power = 0,
|
||||
.type = TYPE_NORMAL,
|
||||
.accuracy = 0,
|
||||
|
Loading…
Reference in New Issue
Block a user