Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/abilities/Abolished.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ export default (G) => {
},
activate(path, args) {
let ability = this;
ability.end();

let target = arrayUtils.last(path).creature;
let projectileInstance = G.animations.projectile(
Expand All @@ -134,9 +133,15 @@ export default (G) => {
);
target.takeDamage(damage);

ability.end();
this.destroy();
}, sprite); // End tween.onComplete
},
getAnimationData: function () {
return {
duration: 425,
};
},
},
// Wild Fire
{
Expand Down
12 changes: 10 additions & 2 deletions src/ability.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,16 @@ export class Ability {
this.creature.facePlayerDefault();

// Force creatures to face towards their target
if (args[0] instanceof Creature) {
this.creature.faceHex(args[0]);
if (args[0]) {
if (args[0] instanceof Creature) {
this.creature.faceHex(args[0]);
} else if (args[0] instanceof Array) {
for (var argument of args[0]) {
if (argument instanceof Creature || argument.creature) {
this.creature.faceHex(argument);
}
}
}
}
// Play animations and sounds only for active abilities
if (this.getTrigger() === 'onQuery') {
Expand Down