fix resolutions skill checks

This commit is contained in:
ntr 2019-05-30 20:22:54 +10:00
parent d6432965b3
commit ea04192897
2 changed files with 16 additions and 14 deletions

View File

@ -119,13 +119,15 @@ function registerEvents(store) {
}
function setInstance(v) {
const { account, ws } = store.getState();
const { account, ws, instance } = store.getState();
if (v) {
ws.startInstanceStateTimeout(v.id);
store.dispatch(actions.setNav('vbox'));
const first = v.players.find(p => p.id === account.id).constructs[0];
store.dispatch(actions.setActiveConstruct(first));
if (!instance || v.id !== instance.id) {
store.dispatch(actions.setNav('vbox'));
const first = v.players.find(p => p.id === account.id).constructs[0];
store.dispatch(actions.setActiveConstruct(first));
}
}
return store.dispatch(actions.setInstance(v));
}

View File

@ -313,26 +313,26 @@ function getCombatSequence(event) {
if (['Removal'].includes(event[0])) return ['POST_SKILL'];
if (['Healing'].includes(event[0])
&& (event[1].skill === 'Slay'
|| event[1].skill === 'SiphonTick'
|| event[1].skill === 'Purify'
|| event[1].skill === 'Sleep')) return ['POST_SKILL'];
&& (event[1].skill.includes('Slay')
|| event[1].skill.includes('SiphonTick')
|| event[1].skill.includes('Purify')
|| event[1].skill.includes('Sleep'))) return ['POST_SKILL'];
if (['Recharge'].includes(event[0])
&& (event[1].skill === 'Reflect')) return ['POST_SKILL'];
&& (event[1].skill.includes('Reflect'))) 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'];
|| (event[1].skill.includes('Decay') && event[1].effect === 'Wither'))) return ['POST_SKILL'];
if (['Power'].includes(event[0])
&& ((event[1].skill === 'Chaos' && event[1].colour === 'Red')
|| event[1].skill === 'Silence'
|| event[1].skill === 'Snare')) return ['POST_SKILL'];
&& ((event[1].skill.includes('Chaos') && event[1].colour === 'Red')
|| event[1].skill.includes('Silence')
|| event[1].skill.includes('Snare'))) return ['POST_SKILL'];
if (['Ko'].includes(event[0])
|| (event[1].skill === 'Throw' && event[1].effect === 'Vulnerable')) return ['POST_SKILL'];
|| (event[1].skill.includes('Throw') && event[1].effect === 'Vulnerable')) return ['POST_SKILL'];
if (dotTicks.includes(event[1].skill)) return ['END_SKILL', 'POST_SKILL'];
return ['START_SKILL', 'END_SKILL', 'POST_SKILL'];