feat(combat): add the Slice 0.6 action and event-type enum members
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
// Only ATTACK is implemented in Slice 0.3. Future slices add HEAVY_STRIKE,
|
||||
// SHIELD_BASH, DEFEND, POTION, FLEE as real members with their own
|
||||
// CombatEngineService cases — do not add them here until their behavior ships.
|
||||
export enum CombatAction {
|
||||
ATTACK = 'ATTACK',
|
||||
HEAVY_STRIKE = 'HEAVY_STRIKE',
|
||||
SHIELD_BASH = 'SHIELD_BASH',
|
||||
DEFEND = 'DEFEND',
|
||||
POTION = 'POTION',
|
||||
}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
export enum CombatEventType {
|
||||
DAMAGE = 'DAMAGE',
|
||||
HEAL = 'HEAL',
|
||||
DEFEND = 'DEFEND',
|
||||
TELEGRAPH = 'TELEGRAPH',
|
||||
INTERRUPT = 'INTERRUPT',
|
||||
COMBAT_WON = 'COMBAT_WON',
|
||||
COMBAT_LOST = 'COMBAT_LOST',
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ describe('CombatController', () => {
|
||||
it('rejects an unknown action value', async () => {
|
||||
await request(app.getHttpServer())
|
||||
.post('/api/combats/combat-1/actions')
|
||||
.send({ action: 'HEAVY_STRIKE' })
|
||||
.send({ action: 'FLEE' })
|
||||
.expect(400);
|
||||
|
||||
expect(performAction).not.toHaveBeenCalled();
|
||||
|
||||
Reference in New Issue
Block a user