feat(engine): add 6 modifier attrs to ChessAttrMap

This commit is contained in:
Joey Yakimowich-Payne 2026-04-18 22:04:21 -06:00
commit 0f3b28ba55
No known key found for this signature in database

View file

@ -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;