remove tiers from skill anim
This commit is contained in:
parent
0310b1b3df
commit
d232402c49
@ -6,6 +6,8 @@ const Strike = require('./anims/strike');
|
|||||||
|
|
||||||
const AttackCharge = require('./anims/attack.charge');
|
const AttackCharge = require('./anims/attack.charge');
|
||||||
|
|
||||||
|
const { removeTier } = require('../utils');
|
||||||
|
|
||||||
const colours = {
|
const colours = {
|
||||||
red: '#a52a2a',
|
red: '#a52a2a',
|
||||||
green: '#1FF01F',
|
green: '#1FF01F',
|
||||||
@ -13,30 +15,39 @@ const colours = {
|
|||||||
purple: '#A25AC1',
|
purple: '#A25AC1',
|
||||||
yellow: '#d1c86a',
|
yellow: '#d1c86a',
|
||||||
cyan: '#6AD1BF',
|
cyan: '#6AD1BF',
|
||||||
|
white: '#FFFFFF',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
function animations(props) {
|
function animations(props) {
|
||||||
const { combatTextClass, combatText, stage, player, construct } = props;
|
const { combatTextClass, combatText, stage, player, construct } = props;
|
||||||
|
|
||||||
const anim = text => {
|
const anim = text => {
|
||||||
if (stage === 'START_SKILL') {
|
if (stage === 'START_SKILL') {
|
||||||
switch (text) {
|
const skill = removeTier(text);
|
||||||
case 'StrikeI': return <AttackCharge id={construct.id} team={player} colour={colours.red}/>;
|
switch (skill) {
|
||||||
case 'HealI': return <AttackCharge id={construct.id} team={player} colour={colours.green}/>;
|
// Attack Base
|
||||||
case 'BlastI': return <AttackCharge id={construct.id} team={player} colour={colours.blue}/>;
|
case 'Attack': return <AttackCharge id={construct.id} team={player} colour={colours.white}/>;
|
||||||
case 'ChaosI': return <AttackCharge id={construct.id} team={player} colour={colours.purple}/>;
|
case 'Strike': return <AttackCharge id={construct.id} team={player} colour={colours.red}/>;
|
||||||
case 'SlayI': return <AttackCharge id={construct.id} team={player} colour={colours.yellow}/>;
|
case 'Heal': return <AttackCharge id={construct.id} team={player} colour={colours.green}/>;
|
||||||
case 'SiphonI': return <AttackCharge id={construct.id} team={player} colour={colours.cyan}/>;
|
case 'Blast': return <AttackCharge id={construct.id} team={player} colour={colours.blue}/>;
|
||||||
|
case 'Chaos': return <AttackCharge id={construct.id} team={player} colour={colours.purple}/>;
|
||||||
default: return <AttackCharge id={construct.id} team={player} colour="#a52a2a"/>;
|
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') {
|
||||||
switch (text) {
|
const skill = removeTier(text);
|
||||||
|
switch (skill) {
|
||||||
case 'Attack': return <Attack id={construct.id} stage={stage} team={player}/>;
|
case 'Attack': return <Attack id={construct.id} stage={stage} team={player}/>;
|
||||||
case 'StrikeI': return <Strike id={construct.id} stage={stage} team={player}/>;
|
case 'StrikeI': return <Strike id={construct.id} stage={stage} team={player}/>;
|
||||||
default: return text;
|
default: return text;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
return text;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (combatText) {
|
if (combatText) {
|
||||||
|
|||||||
@ -376,6 +376,46 @@ function randomPoints(numPoints, radius, width, height) {
|
|||||||
return points;
|
return points;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const removeTier = skill => {
|
||||||
|
if (skill.includes('Strike')) return 'Strike';
|
||||||
|
if (skill.includes('Heal')) return 'Heal';
|
||||||
|
if (skill.includes('Blast')) return 'Blast';
|
||||||
|
if (skill.includes('Chaos')) return 'Chaos';
|
||||||
|
if (skill.includes('Slay')) return 'Slay';
|
||||||
|
if (skill.includes('Siphon')) return 'Siphon';
|
||||||
|
|
||||||
|
if (skill.includes('Snare')) return 'Snare';
|
||||||
|
if (skill.includes('Purge')) return 'Purge';
|
||||||
|
if (skill.includes('Silence')) return 'Silence';
|
||||||
|
if (skill.includes('Curse')) return 'Curse';
|
||||||
|
if (skill.includes('Decay')) return 'Decay';
|
||||||
|
if (skill.includes('Invert')) return 'Invert';
|
||||||
|
|
||||||
|
if (skill.includes('Taunt')) return 'Taunt';
|
||||||
|
if (skill.includes('Triage')) return 'Triage';
|
||||||
|
if (skill.includes('Scatter')) return 'Scatter';
|
||||||
|
if (skill.includes('Haste')) return 'Haste';
|
||||||
|
if (skill.includes('Impurity')) return 'Impurity';
|
||||||
|
if (skill.includes('Amplify')) return 'Amplify';
|
||||||
|
|
||||||
|
if (skill.includes('Parry')) return 'Parry';
|
||||||
|
if (skill.includes('Purify')) return 'Purify';
|
||||||
|
if (skill.includes('Corrupt')) return 'Corrupt';
|
||||||
|
if (skill.includes('Clutch')) return 'Clutch';
|
||||||
|
if (skill.includes('Reflect')) return 'Reflect';
|
||||||
|
if (skill.includes('Recharge')) return 'Recharge';
|
||||||
|
|
||||||
|
if (skill.includes('Bash')) return 'Bash';
|
||||||
|
if (skill.includes('Sleep')) return 'Sleep';
|
||||||
|
if (skill.includes('Ruin')) return 'Ruin';
|
||||||
|
if (skill.includes('Throw')) return 'Throw';
|
||||||
|
if (skill.includes('Hex')) return 'Hex';
|
||||||
|
if (skill.includes('Banish')) return 'Banish';
|
||||||
|
|
||||||
|
return skill;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
stringSort,
|
stringSort,
|
||||||
convertItem,
|
convertItem,
|
||||||
@ -388,4 +428,5 @@ module.exports = {
|
|||||||
COLOURS,
|
COLOURS,
|
||||||
TARGET_COLOURS,
|
TARGET_COLOURS,
|
||||||
randomPoints,
|
randomPoints,
|
||||||
|
removeTier,
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user