null animTarget bug

This commit is contained in:
Mashy 2019-09-20 16:44:14 +10:00
parent 7cd6a0979c
commit 1d778ecc17
2 changed files with 2 additions and 3 deletions

View File

@ -87,12 +87,12 @@ function registerEvents(store) {
); );
} }
return setTimeout(() => { return setTimeout(() => {
const animSkill = anims.animTarget ? removeTier(anims.animTarget.skill) : false;
store.dispatch(actions.setAnimSource(null)); store.dispatch(actions.setAnimSource(null));
store.dispatch(actions.setAnimTarget(null)); store.dispatch(actions.setAnimTarget(null));
store.dispatch(actions.setAnimText(null)); store.dispatch(actions.setAnimText(null));
store.dispatch(actions.setAnimFocus([])); store.dispatch(actions.setAnimFocus([]));
if (!sequence.includes('END_SKILL' && anims.animTarget) if (!sequence.includes('END_SKILL') || (animSkill && ['Banish', 'Invert'].includes(animSkill))) return cb();
|| ['Banish', 'Invert'].includes(removeTier(anims.animTarget.skill))) return cb();
return true; return true;
}, timeout); }, timeout);
}, err => { }, err => {

View File

@ -250,6 +250,5 @@ module.exports = {
TARGET_COLOURS, TARGET_COLOURS,
randomPoints, randomPoints,
removeTier, removeTier,
itemSpeed,
match, match,
}; };