feat(engine): add 6 modifier attrs to ChessAttrMap
This commit is contained in:
parent
a442e54d79
commit
0f3b28ba55
1 changed files with 15 additions and 0 deletions
|
|
@ -49,10 +49,25 @@ export interface ChessAttrMap {
|
|||
// Custom rule attributes (from RULES.md presets)
|
||||
Hp: number;
|
||||
PoisonedSquare: boolean;
|
||||
// Modifier profile attributes
|
||||
HpBonus: number;
|
||||
RangeBonus: number;
|
||||
DirectionAdditions: readonly string[];
|
||||
CaptureFlags: number;
|
||||
PromotionOverride: PieceType | "disabled";
|
||||
DamageResistance: number;
|
||||
}
|
||||
|
||||
export type ChessAttrKey = keyof ChessAttrMap;
|
||||
|
||||
/** Capture behavior bitflags for the CaptureFlags modifier attribute. */
|
||||
export const CaptureFlag = {
|
||||
CAN_CAPTURE_OWN: 1,
|
||||
CANNOT_BE_CAPTURED: 2,
|
||||
EN_PASSANT: 4,
|
||||
} as const;
|
||||
export type CaptureFlag = typeof CaptureFlag[keyof typeof CaptureFlag];
|
||||
|
||||
/** A typed chess fact triple. */
|
||||
export interface ChessFact<K extends ChessAttrKey = ChessAttrKey> {
|
||||
readonly id: EntityId;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue