Bug Bite
This commit is contained in:
parent
32aeba21e0
commit
76c5287629
9 changed files with 33 additions and 4 deletions
|
@ -1074,7 +1074,7 @@ AI_CheckViability:
|
|||
end
|
||||
|
||||
AI_CV_Hazards:
|
||||
if_ability AI_TARGET, ABILITY_MAGIC_BOUNCE,
|
||||
if_ability AI_TARGET, ABILITY_MAGIC_BOUNCE, AI_CV_StealthRockEnd
|
||||
is_first_turn_for AI_USER
|
||||
if_equal 0, AI_CV_StealthRockEnd
|
||||
score +2
|
||||
|
@ -3248,7 +3248,7 @@ AI_TryToFaint_End:
|
|||
end
|
||||
AI_TryToFaint_IsInDanger:
|
||||
get_how_powerful_move_is
|
||||
if not_equal MOVE_MOST_POWERFUL Score_Minus1
|
||||
if_not_equal MOVE_MOST_POWERFUL, Score_Minus1
|
||||
score +1
|
||||
goto AI_TryToFaint_End
|
||||
|
||||
|
|
|
@ -354,6 +354,11 @@ gBattleScriptsForMoveEffects:: @ 82D86A8
|
|||
.4byte BattleScript_EffectMagneticFlux
|
||||
.4byte BattleScript_EffectGearUp
|
||||
.4byte BattleScript_EffectIncinerate
|
||||
.4byte BattleScript_EffectBugBite
|
||||
|
||||
BattleScript_EffectBugBite:
|
||||
setmoveeffect MOVE_EFFECT_BUG_BITE | MOVE_EFFECT_CERTAIN
|
||||
goto BattleScript_EffectHit
|
||||
|
||||
BattleScript_EffectIncinerate:
|
||||
setmoveeffect MOVE_EFFECT_INCINERATE | MOVE_EFFECT_CERTAIN
|
||||
|
@ -363,6 +368,11 @@ BattleScript_MoveEffectIncinerate::
|
|||
printstring STRINGID_INCINERATEBURN
|
||||
waitmessage 0x40
|
||||
return
|
||||
|
||||
BattleScript_MoveEffectBugBite::
|
||||
printstring STRINGID_BUGBITE
|
||||
waitmessage 0x40
|
||||
return
|
||||
|
||||
BattleScript_EffectCoreEnforcer:
|
||||
setmoveeffect MOVE_EFFECT_CORE_ENFORCER | MOVE_EFFECT_CERTAIN
|
||||
|
|
|
@ -322,5 +322,6 @@ extern const u8 BattleScript_ItemHurtRet[];
|
|||
extern const u8 BattleScript_ToxicOrb[];
|
||||
extern const u8 BattleScript_FlameOrb[];
|
||||
extern const u8 BattleScript_MoveEffectIncinerate[];
|
||||
extern const u8 BattleScript_MoveEffectBugBite[];
|
||||
|
||||
#endif // GUARD_BATTLE_SCRIPTS_H
|
||||
|
|
|
@ -331,6 +331,7 @@
|
|||
#define MOVE_EFFECT_CORE_ENFORCER 0x42
|
||||
#define MOVE_EFFECT_THROAT_CHOP 0x43
|
||||
#define MOVE_EFFECT_INCINERATE 0x44
|
||||
#define MOVE_EFFECT_BUG_BITE 0x45
|
||||
#define MOVE_EFFECT_AFFECTS_USER 0x4000
|
||||
#define MOVE_EFFECT_CERTAIN 0x8000
|
||||
|
||||
|
|
|
@ -342,5 +342,6 @@
|
|||
#define EFFECT_MAGNETIC_FLUX 336
|
||||
#define EFFECT_GEAR_UP 337
|
||||
#define EFFECT_INCINERATE 338
|
||||
#define EFFECT_BUG_BITE 339
|
||||
|
||||
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
||||
|
|
|
@ -538,6 +538,7 @@
|
|||
#define STRINGID_AIRBALLOONFLOAT 534
|
||||
#define STRINGID_AIRBALLOONPOP 535
|
||||
#define STRINGID_INCINERATEBURN 536
|
||||
#define STRINGID_BUGBITE 537
|
||||
|
||||
#define BATTLESTRINGS_COUNT 530
|
||||
|
||||
|
|
|
@ -663,9 +663,11 @@ static const u8 sText_TargetAteItem[] = _("{B_DEF_NAME_WITH_PREFIX} ate its {B_L
|
|||
static const u8 sText_AirBalloonFloat[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} floats in the air\nwith its {B_LAST_ITEM}!");
|
||||
static const u8 sText_AirBalloonPop[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_LAST_ITEM} popped!");
|
||||
static const u8 sText_IncinerateBurn[] = _("{B_EFF_NAME_WITH_PREFIX}'s {B_LAST_ITEM}\nwas burnt up!");
|
||||
static const u8 sText_BugBite[] = _("{B_ATK_NAME_WITH_PREFIX} stole and ate\n{B_EFF_NAME_WITH_PREFIX}'s {B_LAST_ITEM}!");
|
||||
|
||||
const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
||||
{
|
||||
[STRINGID_BUGBITE - 12] = sText_BugBite,
|
||||
[STRINGID_INCINERATEBURN - 12] = sText_IncinerateBurn,
|
||||
[STRINGID_AIRBALLOONPOP - 12] = sText_AirBalloonPop,
|
||||
[STRINGID_AIRBALLOONFLOAT - 12] = sText_AirBalloonFloat,
|
||||
|
|
|
@ -2890,6 +2890,19 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||
gBattlescriptCurrInstr = BattleScript_MoveEffectIncinerate;
|
||||
}
|
||||
break;
|
||||
case MOVE_EFFECT_BUG_BITE:
|
||||
if ((gBattleMons[gEffectBattler].item >= FIRST_BERRY_INDEX && gBattleMons[gEffectBattler].item <= LAST_BERRY_INDEX)
|
||||
&& GetBattlerAbility(gEffectBattler) != ABILITY_STICKY_HOLD)
|
||||
{
|
||||
gLastUsedItem = gBattleMons[gEffectBattler].item;
|
||||
gBattleMons[gEffectBattler].item = 0;
|
||||
gActiveBattler = gEffectBattler;
|
||||
BtlController_EmitSetMonData(0, REQUEST_HELDITEM_BATTLE, 0, 2, &gBattleMons[gEffectBattler].item);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||
gBattlescriptCurrInstr = BattleScript_MoveEffectBugBite;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5117,7 +5117,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
|
|||
|
||||
[MOVE_PLUCK] =
|
||||
{
|
||||
.effect = EFFECT_PLACEHOLDER, // Needs a custom move effect (Bug Bite and Pluck should have the same move effect)
|
||||
.effect = EFFECT_BUG_BITE,
|
||||
.power = 60,
|
||||
.type = TYPE_FLYING,
|
||||
.accuracy = 100,
|
||||
|
@ -6311,7 +6311,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
|
|||
|
||||
[MOVE_BUG_BITE] =
|
||||
{
|
||||
.effect = EFFECT_PLACEHOLDER, // Needs a custom move effect (Bug Bite and Pluck should have the same move effect)
|
||||
.effect = EFFECT_BUG_BITE,
|
||||
.power = 60,
|
||||
.type = TYPE_BUG,
|
||||
.accuracy = 100,
|
||||
|
|
Loading…
Reference in a new issue