Fixed ruin resolution cast

This commit is contained in:
Mashy
2019-05-08 13:19:51 +10:00
parent af03d37404
commit 54b7757e2a
5 changed files with 28 additions and 24 deletions
-1
View File
@@ -51,7 +51,6 @@ function GameCryp(props) {
const {
cryp,
resolution,
activeSkill,
setActiveCryp,
selectSkillTarget,
+6 -8
View File
@@ -221,7 +221,7 @@ function getCombatSequence(event) {
// Skip combat animations depending on event type, expandable in future
const dotTicks = ['DecayTick', 'CorruptionTick', 'TriageTick', 'SiphonTick', 'StrangleTick'];
if (['Skill'].includes(event[0])) return ['START_SKILL', 'END_SKILL'];
if (['Skill', 'AoeSkill'].includes(event[0])) return ['START_SKILL', 'END_SKILL'];
if (['Immunity'].includes(event[0])) return ['START_SKILL', 'POST_SKILL'];
if (['Removal'].includes(event[0])) return ['POST_SKILL'];
@@ -235,12 +235,9 @@ function getCombatSequence(event) {
&& (event[1].skill === 'Reflect')) return ['POST_SKILL'];
if (['Effect'].includes(event[0])
&& ((event[1].skill === 'Decay' && event[1].effect === 'Wither')
|| event[1].skill === 'Ruin'
|| event[1].skill === 'Taunt'
|| event[1].skill === 'Strangling'
|| event[1].skill === 'Parry')) return ['POST_SKILL'];
if (event[0] === 'Effect'
&& (['Ruin', 'Taunt', 'Strangling', 'Parry'].includes(event[1].skill)
|| (event[1].skill === 'Decay' && event[1].effect === 'Wither'))) return ['POST_SKILL'];
if (['Damage'].includes(event[0])
&& ((event[1].skill === 'Chaos' && event[1].colour === 'RedDamage')
@@ -257,6 +254,7 @@ function getCombatSequence(event) {
function getCombatText(cryp, resolution) {
if (!resolution) return '';
const [type, event] = resolution.event;
const source = cryp.id === resolution.source.id;
const target = cryp.id === resolution.target.id;
@@ -333,7 +331,7 @@ function getCombatText(cryp, resolution) {
if (postSkill && target) return `+${red}R ${blue}B`;
}
if (type === 'Skill') {
if (type === 'Skill' || type === 'AoeSkill') {
const { skill } = event;
if (startSkill && source) return `${skill}`;
if (endSkill && target) return `${skill}`;