remove client from deciding event stages wip

This commit is contained in:
Mashy 2019-10-23 12:08:21 +10:00
parent 6371e02672
commit 2e1b298bbf
3 changed files with 1 additions and 5 deletions

View File

@ -75,8 +75,6 @@ function getObjects(resolution, stages, game, account) {
function getSequence(resolution) { function getSequence(resolution) {
if (!resolution.event) return []; if (!resolution.event) return [];
if (resolution.event[0] === 'Inversion') return []; if (resolution.event[0] === 'Inversion') return [];
if (['TargetKo', 'Ko'].includes(resolution.event[0])) return [];
if (['Skill', 'AoeSkill'].includes(resolution.event[0])) return ['START_SKILL', 'END_SKILL'];
switch (resolution.stages) { switch (resolution.stages) {
case 'AllStages': return ['START_SKILL', 'END_SKILL', 'POST_SKILL']; case 'AllStages': return ['START_SKILL', 'END_SKILL', 'POST_SKILL'];

View File

@ -67,8 +67,6 @@ function registerEvents(store) {
// stop fetching the game state til animations are done // stop fetching the game state til animations are done
const newRes = game.resolved.slice(currentGame.resolved.length); const newRes = game.resolved.slice(currentGame.resolved.length);
return eachSeries(newRes, (r, cb) => { return eachSeries(newRes, (r, cb) => {
if (['Disable', 'TargetKo'].includes(r.event[0])) return cb();
// convert server enum into anims keywords // convert server enum into anims keywords
// todo make serersideonly // todo make serersideonly
const sequence = animations.getSequence(r); const sequence = animations.getSequence(r);

View File

@ -342,7 +342,7 @@ fn post_resolve(_skill: Skill, game: &mut Game, mut resolutions: Resolutions) ->
}; };
if target.is_ko() { if target.is_ko() {
resolutions.push(Resolution::new(&source, &target).event(Event::Ko())); resolutions.push(Resolution::new(&source, &target).event(Event::Ko()).stages(EventStages::PostOnly));
target.effects.clear(); target.effects.clear();
} }