-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
515 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import type GameService from '../GameService'; | ||
import type { Player } from '../PlayersService'; | ||
import type { SuccessArgs } from './types'; | ||
|
||
export interface PreAffect { | ||
check(params: { initiator: Player, target: Player, game: GameService}): SuccessArgs | void | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { SuccessArgs } from '@/arena/Constuructors/types'; | ||
|
||
export function formatCause(cause: SuccessArgs) { | ||
switch (cause.actionType) { | ||
case 'skill': | ||
return `_${cause.action}_ *${cause.initiator}*: 📖${cause.exp}`; | ||
default: | ||
return `_${cause.action}_ *${cause.initiator}*`; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`disarm target should be disarmed if initiator has more dex 1`] = ` | ||
[ | ||
{ | ||
"action": "🥊 Обезоруживание", | ||
"actionType": "skill", | ||
"exp": 20, | ||
"initiator": "alias", | ||
"msg": undefined, | ||
"target": "asperiores", | ||
}, | ||
{ | ||
"action": "attack", | ||
"actionType": "phys", | ||
"cause": { | ||
"action": "🥊 Обезоруживание", | ||
"actionType": "skill", | ||
"exp": 0, | ||
"initiator": "alias", | ||
"msg": undefined, | ||
"target": "asperiores", | ||
}, | ||
"initiator": "asperiores", | ||
"message": undefined, | ||
"target": "alias", | ||
"weapon": { | ||
"code": "a100", | ||
}, | ||
}, | ||
] | ||
`; | ||
|
||
exports[`disarm target should not be disarmed if initiator has less dex 1`] = ` | ||
[ | ||
{ | ||
"action": "🥊 Обезоруживание", | ||
"actionType": "skill", | ||
"initiator": "explicabo", | ||
"message": "SKILL_FAIL", | ||
"target": "repellat", | ||
}, | ||
{ | ||
"action": "attack", | ||
"actionType": "phys", | ||
"dmg": 11, | ||
"dmgType": "physical", | ||
"exp": 88, | ||
"hp": -3, | ||
"initiator": "repellat", | ||
"target": "explicabo", | ||
"weapon": { | ||
"code": "a100", | ||
}, | ||
}, | ||
] | ||
`; |
Oops, something went wrong.