remove client from deciding event stages wip
This commit is contained in:
parent
6371e02672
commit
2e1b298bbf
@ -75,8 +75,6 @@ function getObjects(resolution, stages, game, account) {
|
||||
function getSequence(resolution) {
|
||||
if (!resolution.event) 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) {
|
||||
case 'AllStages': return ['START_SKILL', 'END_SKILL', 'POST_SKILL'];
|
||||
|
||||
@ -67,8 +67,6 @@ function registerEvents(store) {
|
||||
// stop fetching the game state til animations are done
|
||||
const newRes = game.resolved.slice(currentGame.resolved.length);
|
||||
return eachSeries(newRes, (r, cb) => {
|
||||
if (['Disable', 'TargetKo'].includes(r.event[0])) return cb();
|
||||
|
||||
// convert server enum into anims keywords
|
||||
// todo make serersideonly
|
||||
const sequence = animations.getSequence(r);
|
||||
|
||||
@ -342,7 +342,7 @@ fn post_resolve(_skill: Skill, game: &mut Game, mut resolutions: Resolutions) ->
|
||||
};
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user