Skip to content

Commit

Permalink
Add Electro Shot animation
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisXV committed Dec 30, 2023
1 parent 32d247e commit 0da111e
Showing 1 changed file with 216 additions and 5 deletions.
221 changes: 216 additions & 5 deletions play.pokemonshowdown.com/src/battle-animations-moves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6954,7 +6954,7 @@ export const BattleMoveAnims: AnimTable = {
lick: {
anim: BattleOtherAnims.contactattack.anim,
},
vicegrip: {
visegrip: {
anim: BattleOtherAnims.contactattack.anim,
},
headbutt: {
Expand Down Expand Up @@ -22867,6 +22867,221 @@ export const BattleMoveAnims: AnimTable = {
},
prepareAnim: BattleOtherAnims.chargestatus.anim,
},
electroshot: {
anim(scene, [attacker, defender]) {
let xstep = (defender.x - attacker.x) / 5;
let ystep = (defender.x - 200 - attacker.x) / 5;
let zstep = (defender.z - attacker.z) / 5;

scene.backgroundEffect('#000000', 900, 0.5);

for (let i = 0; i < 5; i++) {
scene.showEffect('electroball', {
x: attacker.x + xstep * (i + 1),
y: (attacker.y + 200) + ystep * (i + 1),
z: attacker.z + zstep * (i + 1),
scale: 0.7,
opacity: 0.6,
time: 40 * i + 300,
}, {
opacity: 0,
time: 100 * i + 500,
}, 'linear', '', {filter: 'hue-rotate(120deg)'});
}

scene.showEffect('electroball', {
x: attacker.x,
y: attacker.y,
z: attacker.z,
scale: 0.75,
opacity: 0.6,
}, {
x: attacker.x,
y: attacker.y + 200,
z: attacker.z,
scale: 1.25,
opacity: 0,
time: 200,
}, 'decel', '', {filter: 'hue-rotate(120deg)'});
scene.showEffect('wisp', {
x: attacker.x,
y: attacker.y,
z: attacker.z,
scale: 1,
opacity: 0.6,
}, {
x: attacker.x,
y: attacker.y + 200,
z: attacker.z,
scale: 1.5,
opacity: 0,
time: 200,
}, 'decel');

scene.showEffect('electroball', {
x: attacker.x,
y: attacker.y + 200,
z: attacker.z,
scale: 0.4,
opacity: 0.6,
time: 300,
}, {
x: defender.x + 30,
y: defender.y + 30,
z: defender.z,
scale: 0.6,
opacity: 0.3,
time: 500,
}, 'linear', 'explode', {filter: 'hue-rotate(120deg)'});
scene.showEffect('electroball', {
x: attacker.x,
y: attacker.y + 200,
z: attacker.z,
scale: 0.4,
opacity: 0.6,
time: 375,
}, {
x: defender.x + 20,
y: defender.y - 30,
z: defender.z,
scale: 0.6,
opacity: 0.3,
time: 575,
}, 'linear', 'explode');
scene.showEffect('electroball', {
x: attacker.x,
y: attacker.y + 200,
z: attacker.z,
scale: 0.4,
opacity: 0.6,
time: 425,
}, {
x: defender.x - 10,
y: defender.y + 10,
z: defender.z,
scale: 0.6,
opacity: 0.3,
time: 625,
}, 'linear', 'explode');
scene.showEffect('electroball', {
x: attacker.x,
y: attacker.y + 200,
z: attacker.z,
scale: 0.4,
opacity: 0.6,
time: 450,
}, {
x: defender.x - 30,
y: defender.y,
z: defender.z,
scale: 0.6,
opacity: 0.3,
time: 650,
}, 'linear', 'explode', {filter: 'hue-rotate(120deg)'});
scene.showEffect('electroball', {
x: attacker.x,
y: attacker.y + 200,
z: attacker.z,
scale: 0.4,
opacity: 0.6,
time: 500,
}, {
x: defender.x + 10,
y: defender.y - 10,
z: defender.z,
scale: 0.6,
opacity: 0.3,
time: 700,
}, 'linear', 'explode', {filter: 'hue-rotate(120deg)'});
scene.showEffect('electroball', {
x: attacker.x,
y: attacker.y + 200,
z: attacker.z,
scale: 0.4,
opacity: 0.6,
time: 575,
}, {
x: defender.x - 20,
y: defender.y,
z: defender.z,
scale: 0.6,
opacity: 0.3,
time: 775,
}, 'linear', 'explode');
},
prepareAnim(scene, [attacker]) {
scene.showEffect('electroball', {
x: attacker.x - 60,
y: attacker.y + 40,
z: attacker.z,
scale: 0.7,
opacity: 0.7,
time: 0,
}, {
x: attacker.x,
y: attacker.y,
scale: 0.2,
opacity: 0.2,
time: 300,
}, 'linear', 'fade', {filter: 'hue-rotate(120deg)'});
scene.showEffect('electroball', {
x: attacker.x + 60,
y: attacker.y - 5,
z: attacker.z,
scale: 0.7,
opacity: 0.7,
time: 100,
}, {
x: attacker.x,
y: attacker.y,
scale: 0.2,
opacity: 0.2,
time: 300,
}, 'linear', 'fade', {filter: 'hue-rotate(120deg)'});
scene.showEffect('electroball', {
x: attacker.x - 30,
y: attacker.y + 60,
z: attacker.z,
scale: 0.7,
opacity: 0.7,
time: 100,
}, {
x: attacker.x,
y: attacker.y,
scale: 0.2,
opacity: 0.2,
time: 400,
}, 'linear', 'fade', {filter: 'hue-rotate(120deg)'});
scene.showEffect('electroball', {
x: attacker.x + 20,
y: attacker.y - 50,
z: attacker.z,
scale: 0.7,
opacity: 0.7,
time: 100,
}, {
x: attacker.x,
y: attacker.y,
scale: 0.2,
opacity: 0.2,
time: 400,
}, 'linear', 'fade', {filter: 'hue-rotate(120deg)'});
scene.showEffect('electroball', {
x: attacker.x - 70,
y: attacker.y - 50,
z: attacker.z,
scale: 0.7,
opacity: 0.7,
time: 200,
}, {
x: attacker.x,
y: attacker.y,
scale: 0.2,
opacity: 0.2,
time: 500,
}, 'linear', 'fade', {filter: 'hue-rotate(120deg)'});
},
},
solarblade: {
anim(scene, [attacker, defender]) {
let xstep = 0;
Expand Down Expand Up @@ -35896,7 +36111,3 @@ BattleMoveAnims['trailblaze'] = {anim: BattleMoveAnims['powerwhip'].anim};
BattleMoveAnims['tripledive'] = {anim: BattleMoveAnims['dive'].anim};
BattleMoveAnims['hydrosteam'] = {anim: BattleMoveAnims['steameruption'].anim};
BattleMoveAnims['psyblade'] = {anim: BattleMoveAnims['psychocut'].anim};
BattleMoveAnims['electroshot'] = {
anim: BattleMoveAnims['zapcannon'].anim,
prepareAnim: BattleOtherAnims.lightstatus.anim,
};

0 comments on commit 0da111e

Please sign in to comment.