remove tiers from skill anim

This commit is contained in:
Mashy
2019-06-19 16:58:05 +10:00
parent 0310b1b3df
commit d232402c49
2 changed files with 67 additions and 15 deletions
+26 -15
View File
@@ -6,6 +6,8 @@ const Strike = require('./anims/strike');
const AttackCharge = require('./anims/attack.charge');
const { removeTier } = require('../utils');
const colours = {
red: '#a52a2a',
green: '#1FF01F',
@@ -13,30 +15,39 @@ const colours = {
purple: '#A25AC1',
yellow: '#d1c86a',
cyan: '#6AD1BF',
white: '#FFFFFF',
};
function animations(props) {
const { combatTextClass, combatText, stage, player, construct } = props;
const anim = text => {
if (stage === 'START_SKILL') {
switch (text) {
case 'StrikeI': return <AttackCharge id={construct.id} team={player} colour={colours.red}/>;
case 'HealI': return <AttackCharge id={construct.id} team={player} colour={colours.green}/>;
case 'BlastI': return <AttackCharge id={construct.id} team={player} colour={colours.blue}/>;
case 'ChaosI': return <AttackCharge id={construct.id} team={player} colour={colours.purple}/>;
case 'SlayI': return <AttackCharge id={construct.id} team={player} colour={colours.yellow}/>;
case 'SiphonI': return <AttackCharge id={construct.id} team={player} colour={colours.cyan}/>;
default: return <AttackCharge id={construct.id} team={player} colour="#a52a2a"/>;
const skill = removeTier(text);
switch (skill) {
// Attack Base
case 'Attack': return <AttackCharge id={construct.id} team={player} colour={colours.white}/>;
case 'Strike': return <AttackCharge id={construct.id} team={player} colour={colours.red}/>;
case 'Heal': return <AttackCharge id={construct.id} team={player} colour={colours.green}/>;
case 'Blast': return <AttackCharge id={construct.id} team={player} colour={colours.blue}/>;
case 'Chaos': return <AttackCharge id={construct.id} team={player} colour={colours.purple}/>;
case 'Slay': return <AttackCharge id={construct.id} team={player} colour={colours.yellow}/>;
case 'Siphon': return <AttackCharge id={construct.id} team={player} colour={colours.cyan}/>;
// Stun Base
// Block Base
// Buff Base
// Debuff Base
default: return text;
}
} else if (stage === 'END_SKILL') {
const skill = removeTier(text);
switch (skill) {
case 'Attack': return <Attack id={construct.id} stage={stage} team={player}/>;
case 'StrikeI': return <Strike id={construct.id} stage={stage} team={player}/>;
default: return text;
}
}
switch (text) {
case 'Attack': return <Attack id={construct.id} stage={stage} team={player}/>;
case 'StrikeI': return <Strike id={construct.id} stage={stage} team={player}/>;
default: return text;
}
return text;
};
if (combatText) {