diff --git a/client/src/animations.utils.jsx b/client/src/animations.utils.jsx
index 559de717..c563e597 100644
--- a/client/src/animations.utils.jsx
+++ b/client/src/animations.utils.jsx
@@ -12,7 +12,7 @@ function getObjects(resolution, stages, game, account) {
if (!resolution) return none();
if (!resolution.target) return none();
- const [, event] = resolution.event;
+ const [type, event] = resolution.event;
if (!event || !event.skill) return none();
const playerTeam = game.players.find(t => t.id === account.id);
@@ -22,6 +22,14 @@ function getObjects(resolution, stages, game, account) {
const sourceIsPlayer = playerTeamIds.includes(resolution.source.id);
const targetIsPlayer = playerTeamIds.includes(resolution.target.id);
+ const targetting = () => {
+ if (type === 'AoeSkill') {
+ if (targetIsPlayer) return playerTeamIds;
+ return otherTeamIds;
+ }
+ return [resolution.target.id];
+ };
+
const sameTeam = (sourceIsPlayer && targetIsPlayer) || (!sourceIsPlayer && !targetIsPlayer);
let y = 0;
if (!sameTeam) y = targetIsPlayer ? 1 : -1;
@@ -29,7 +37,7 @@ function getObjects(resolution, stages, game, account) {
const i = sourceIsPlayer
? playerTeamIds.findIndex(c => c === resolution.source.id)
: otherTeamIds.findIndex(c => c === resolution.source.id);
-
+
const j = targetIsPlayer
? playerTeamIds.findIndex(c => c === resolution.target.id)
: otherTeamIds.findIndex(c => c === resolution.target.id);
@@ -56,11 +64,10 @@ function getObjects(resolution, stages, game, account) {
const animTarget = {
skill,
- constructId: resolution.target.id,
+ constructId: targetting(),
player: playerTeamIds.includes(resolution.target.id),
direction,
};
-
return {
animSource,
animTarget,
@@ -109,11 +116,11 @@ function getFocusTargets(resolution, game) {
if (type === 'AoeSkill') {
const targetTeam = game.players.find(t => t.constructs.find(c => c.id === target));
const targetTeamIds = targetTeam.constructs.map(c => c.id);
- if (source !== target) return targetTeamIds.push(source);
+ if (source !== target) targetTeamIds.push(source);
return targetTeamIds;
}
if (source !== target) return [source, target];
- return target;
+ return [target];
}
function getText(resolution, sequence) {
diff --git a/client/src/components/animations.jsx b/client/src/components/animations.jsx
index 5e0cd1c9..9e1a4e80 100644
--- a/client/src/components/animations.jsx
+++ b/client/src/components/animations.jsx
@@ -64,7 +64,7 @@ class ConstructAnimation extends Component {
constructId,
} = animTarget;
- if (construct.id !== constructId) return false;
+ if (!constructId.includes(construct.id)) return false;
// find target animation
const chooseAnim = (skill) => {
diff --git a/client/src/components/anims/block.jsx b/client/src/components/anims/block.jsx
index 42f98bb6..5ea544a8 100644
--- a/client/src/components/anims/block.jsx
+++ b/client/src/components/anims/block.jsx
@@ -27,15 +27,9 @@ class Block extends Component {
xmlns="http://www.w3.org/2000/svg"
transform="rotate(180)"
viewBox="0 0 256 256">
-
-
-
+
+
+
);
}
diff --git a/client/src/components/anims/buff.jsx b/client/src/components/anims/buff.jsx
index b43a3726..e49e556f 100644
--- a/client/src/components/anims/buff.jsx
+++ b/client/src/components/anims/buff.jsx
@@ -22,7 +22,7 @@ class Buff extends Component {
return (