Feat: current turn damage netcode
This commit is contained in:
@@ -20,6 +20,21 @@ export const effectMappings = {
|
|||||||
operation: effect.amount,
|
operation: effect.amount,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
[CardEffects.DAMAGE]: (
|
||||||
|
game: Document<Game> & Game,
|
||||||
|
effect: Effect,
|
||||||
|
_player: Player,
|
||||||
|
_card: Card,
|
||||||
|
eventEmitter: EventEmitter2,
|
||||||
|
) => {
|
||||||
|
game.currentTurn.damage += effect.amount;
|
||||||
|
eventEmitter.emit('sse.game.' + game._id.toHexString(), {
|
||||||
|
type: 'currentTurn.updateDamage',
|
||||||
|
damage: game.currentTurn.damage,
|
||||||
|
operation: effect.amount,
|
||||||
|
});
|
||||||
|
},
|
||||||
} as Record<
|
} as Record<
|
||||||
CardEffects,
|
CardEffects,
|
||||||
(
|
(
|
||||||
|
|||||||
Reference in New Issue
Block a user