Skip to content

Commit

Permalink
Update move animations
Browse files Browse the repository at this point in the history
  • Loading branch information
SaintCoke committed Apr 1, 2018
1 parent 8994e9e commit af90322
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
19 changes: 19 additions & 0 deletions data/graphics.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@ var BattleEffects = {
url: 'ultra.png', // by Pokemon Showdown user Modeling Clay
w: 113, h: 165
},
hitmark: {
url: 'hitmarker.png', // by Pokemon Showdown user Ridaz
w: 100, h: 100
},
none: {
// this is for passing to battle.pos() and battle.posT() for CSS effects
w: 100, h: 100
Expand Down Expand Up @@ -2873,6 +2877,21 @@ var BattleOtherAnims = {
}
};
var BattleStatusAnims = {
hitmark: {
anim: function (battle, args) {
var attacker = args[0];
battle.showEffect('hitmark', {
x: attacker.x,
y: attacker.y,
z: attacker.z,
scale: 0.5,
opacity: 1
}, {
opacity: 0.5,
time: 250
}, 'linear', 'fade');
}
},
brn: {
anim: function (battle, args) {
var attacker = args[0];
Expand Down
Binary file added fx/hitmarker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions js/battle.js
Original file line number Diff line number Diff line change
Expand Up @@ -3485,6 +3485,12 @@ var Battle = (function () {
} else if (window.Config && Config.server && Config.server.afd && move.id === 'stealthrock') {
var srNames = ['Sneaky Pebbles', 'Sly Rubble', 'Subtle Sediment', 'Buried Bedrock', 'Camouflaged Cinnabar', 'Clandestine Cobblestones', 'Cloaked Clay', 'Concealed Ore', 'Covert Crags', 'Crafty Coal', 'Discreet Bricks', 'Disguised Debris', 'Espionage Pebbles', 'Furtive Fortress', 'Hush-Hush Hardware', 'Incognito Boulders', 'Invisible Quartz', 'Masked Minerals', 'Mischievous Masonry', 'Obscure Ornaments', 'Private Paragon', 'Secret Solitaire', 'Sheltered Sand', 'Surreptitious Sapphire', 'Undercover Ultramarine'];
this.message(pokemon.getName() + ' used <strong>' + srNames[Math.floor(Math.random() * srNames.length)] + '</strong>!');
} else if (window.Config && Config.server && Config.server.afd && move.id === 'extremespeed') {
var fastWords = ['H-Hayai', 'Masaka', 'Its fast']
this.message(pokemon.getName() + ' used <strong>' + move.name + '</strong>!');
this.message('<strong>' + fastWords[Math.floor(Math.random() * fastWords.length)] + '</strong>!');
} else if (window.Config && Config.server && Config.server.afd && move.id === 'aerialace') {
this.message(pokemon.getName() + ' used <strong>Tsubame Gaeshi</strong>!');
// } else if (window.Config && Config.server && Config.server.afd && (move.id === 'metronome' || move.id === 'sleeptalk' || move.id === 'assist')) {
// this.message(pokemon.getName() + ' used <strong>' + move.name + '</strong>!');
// var buttons = ["A", "B", "START", "SELECT", "UP", "DOWN", "LEFT", "RIGHT", "DEMOCRACY", "ANARCHY"];
Expand Down Expand Up @@ -4197,6 +4203,7 @@ var Battle = (function () {
var poke = this.getPokemon(args[1]);
for (var j = 1; !poke && j < 10; j++) poke = this.getPokemon(minors[i + j][0][1]);
if (poke) this.resultAnim(poke, 'Super-effective', 'bad');
if (!this.fastForward) BattleStatusAnims['hitmark'].anim(this, [poke.sprite]);
actions += "It's super effective" + (this.activeMoveIsSpread ? " on " + poke.getLowerName() : "") + "! ";
break;

Expand Down

0 comments on commit af90322

Please sign in to comment.