-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: hxtree <[email protected]>
- Loading branch information
Showing
8 changed files
with
160 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { Duration } from 'luxon'; | ||
import { ItemId } from './item'; | ||
import { StatusEffectId } from './status-effect'; | ||
import { EffectTag } from './tag.effect'; | ||
import { Attribute } from './attribute'; | ||
|
||
/** | ||
* What must be paid ahead of time to peform the action | ||
*/ | ||
export enum ActionCostTarget { | ||
// The cost of the action is paid by the performer | ||
PERFORMER = 'PERFORMER', | ||
|
||
// The cost of the action is paid by the target | ||
TARGET = 'TARGET', | ||
|
||
// The cost of the action is paid by the performer's inventory | ||
INVENTORY = 'INVENTORY', | ||
} | ||
|
||
export type ActionCostInventory = { | ||
remove: ItemId; // TODO what about stealable items? | ||
quanity: number; | ||
}; | ||
|
||
export type ActionCostStatusEffect = { | ||
add: StatusEffectId; | ||
chance?: number; | ||
duration?: Duration; | ||
tags?: Array<EffectTag>; | ||
}; | ||
|
||
// TODO: By holding button longer how can additional cost can be consumed for some skills. | ||
// e.g. min cost max cost? cost per second? | ||
|
||
export type ActionCostAttribute = { | ||
remove: Attribute; | ||
quantity: string; | ||
chance?: number; | ||
tags?: Array<EffectTag>; | ||
}; | ||
|
||
/** | ||
* Cost is the resource expenditure that must be given up by Target prior to | ||
* the action being able to be perform. | ||
*/ | ||
export type ActionCost = | ||
| ActionCostInventory | ||
| ActionCostStatusEffect | ||
| ActionCostAttribute; |
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,23 @@ | ||
/** | ||
* Enum representing possible targets for actions. | ||
* These area related to costs to peform an action but the impacts of the action | ||
*/ | ||
export enum ActionTarget { | ||
// An ally of the player | ||
ALLY = 'ALLY', | ||
|
||
// A region within the AOE map affecting all entities | ||
AREA = 'AREA', | ||
|
||
// Object or entity for interaction | ||
INTERACTION_OBJECT = 'INTERACTION_OBJECT', | ||
|
||
// The performers inventory or equipment | ||
INVENTORY = 'INVENTORY', | ||
|
||
// The player initiating the action | ||
PERFORMER = 'PERFORMER', | ||
|
||
// An opponent of the player | ||
OPPONENT = 'OPPONENT', | ||
} |
2 changes: 1 addition & 1 deletion
2
...ices/character-sheet/src/data/aoe-maps.ts → ...haracter-sheet/src/data/area-of-effect.ts
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,17 @@ | ||
/** | ||
* Represents proficiency levels for active and passive skills, determining their effectiveness. | ||
*/ | ||
export enum SkillLevel { | ||
LV1 = 'LV1', | ||
LV2 = 'LV2', | ||
LV3 = 'LV3', | ||
LV4 = 'LV4', | ||
LV5 = 'LV5', | ||
LV6 = 'LV6', | ||
LV7 = 'LV7', | ||
LV8 = 'LV8', | ||
LV9 = 'LV9', | ||
MAX = 'MAX', | ||
} | ||
|
||
// TODO : format skills as "Slash Lv.1" on frontend |
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 was deleted.
Oops, something went wrong.