Electroweb animation

This commit is contained in:
DizzyEggg 2019-04-01 14:43:18 +02:00
parent 944dc4f6bf
commit 14a34b002a
5 changed files with 36 additions and 1 deletions

View File

@ -283,3 +283,8 @@
.macro jumpretfalse ptr:req
jumpreteq FALSE, \ptr
.endm
.macro jumpifdoublebattle ptr:req
createvisualtask AnimTask_IsDoubleBattle, 0
jumprettrue \ptr
.endm

View File

@ -2264,6 +2264,29 @@ Move_WORK_UP:
end
Move_ELECTROWEB:
loadspritegfx ANIM_TAG_SPIDER_WEB
loadspritegfx ANIM_TAG_WEB_THREAD
loadspritegfx ANIM_TAG_SPARK_2
monbg ANIM_DEF_PARTNER
delay 0
createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_SPIDER_WEB, 0, 6, 6, RGB(31, 30, 1)
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 5, 1, 2, 0, 9, RGB_BLACK
waitforvisualfinish
monbgprio_28 ANIM_TARGET
waitforvisualfinish
playsewithpan SE_W081B, SOUND_PAN_TARGET
createsprite gUnknown_08596A2C, ANIM_ATTACKER, 2, 0, 0
waitforvisualfinish
clearmonbg ANIM_DEF_PARTNER
delay 1
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 5, 1, 2, 9, 0, RGB_BLACK
@ ElectricityEffect looks ugly against both opponents, to do later
jumpifdoublebattle Move_ELECTROWEB_Wait
call ElectricityEffect
Move_ELECTROWEB_Wait:
waitforvisualfinish
end
Move_WILD_CHARGE:

View File

@ -1059,3 +1059,9 @@ static void sub_8117FD0(u8 taskId)
DestroyTask(taskId);
}
}
void AnimTask_IsDoubleBattle(u8 taskId)
{
gBattleAnimArgs[7] = (IsDoubleBattle() && !IsContest());
DestroyAnimVisualTask(taskId);
}

View File

@ -317,6 +317,7 @@ void sub_811067C(struct Sprite *sprite)
{
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL | BLDCNT_EFFECT_BLEND);
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(16, 0));
SetAverageBattlerPositions(gBattleAnimTarget, FALSE, &sprite->pos1.x, &sprite->pos1.y);
if (GetBattlerSide(gBattleAnimAttacker))
sprite->pos1.x -= gBattleAnimArgs[0];
else

View File

@ -1294,7 +1294,7 @@ void sub_810B55C(u8 taskId)
bool8 sub_810B614(struct Task *task, u8 taskId)
{
u8 spriteId = CreateSprite(&gUnknown_085956C0, task->data[13], task->data[14], task->data[12]);
if (spriteId != MAX_SPRITES)
{
gSprites[spriteId].callback = sub_810B684;