import "./ac.js"; import type { ACBuilder } from "./ac.js"; import "./dc.js"; import type { DCBuilder } from "./dc.js"; import type { RollBuilder } from "./roll.js"; import type { SaveBuilder } from "./save.js"; export declare const fullAttack: import("./attack.js").AttackBuilder; export declare const fullAttackExprExpected = "(d20 + 5 AC 10) * (2d6) crit (4d6)"; export declare const fullAttackWithCrit: import("./attack.js").AttackBuilder; export declare const fullAttackWithCritExprExpected = "(d20 + 5 AC 10) * (2d6) crit (5d6)"; export declare const fullAttackWithCritAndMiss: import("./attack.js").AttackBuilder; export declare const fullAttackWithCritAndMissExprExpected = "(d20 + 5 AC 10) * (2d6) crit (4d6) miss (5)"; export declare const basicDamageRoll: RollBuilder; export declare const basicDamageRollExprExpected = "1d6 + 3"; /** Basic 2d6 + 3 damage roll * For multiple dice, you need to use roll(). */ export declare const basic2d6Plus3: RollBuilder; export declare const basic2d6Plus3ExprExpected = "2d6 + 3"; /** Rollling 2 x (1d6+3) */ export declare const basicShorthandD6Plus3Roll: RollBuilder; export declare const basicShorthandD6Plus3RollExprExpected = "2d6 + 6"; /** Same as above using no shorthand */ export declare const another2d6Plus3: RollBuilder; export declare const another2d6Plus3ExprExpected = "2d6 + 3"; /** Same as above using the shorthand factory signature */ export declare const basicShorthandRoll: RollBuilder; export declare const basicShorthandRollExprExpected = "2d6 + 3"; /** Same as above using the shorthand factory signature */ export declare const basicShorthandD6Roll: RollBuilder; export declare const basicShorthandD6RollExprExpected = "2d6 + 3"; /** Using die shortcuts without roll() */ export declare const shortcutDie: RollBuilder; export declare const shortcutDieExprExpected = "1d8 + 2"; /** Flat modifier only (no dice) * You can also use roll.flat(n) if you prefer. * Many methods take pure numbers, so this may not even be needed in many cases. * */ export declare const flatFive: RollBuilder; export declare const flatFiveExprExpected = "5"; /** Negative base dice */ export declare const negativeBaseDieInline: RollBuilder; export declare const negativeBaseDieInlineExprExpected = "-1d8"; /** Negative base dice explicit */ export declare const negativeBaseDie: RollBuilder; export declare const negativeBaseDieExprExpected = "-1d8"; /** Subtracting a bonus die via negative roll part. * Useful for effects like Bane */ export declare const subtractBonusDie: RollBuilder; export declare const subtractBonusDieExprExpected = "d20 - 1d4"; /** A single d20 roll */ export declare const singleD20: RollBuilder; export declare const singleD20ExprExpected = "d20"; /** Adding a bunch */ export declare const addAWholeBunch: RollBuilder; export declare const addAWholeBunchExprExpected = "1d20 + 1d12 + 1d10 + 1d8 + 1d6"; /** Subtracting a bunch */ export declare const subtractAWholeBunch: RollBuilder; export declare const subtractAWholeBunchExprExpected = "-1d20 - 1d12 - 1d10 - 1d8 + 1d6"; export declare const addingMultipleConstants: RollBuilder; export declare const addingMultipleConstantsExprExpected = "1d6 + 6"; export declare const realisticChaining: RollBuilder; export declare const realisticChainingExprExpected = "2d8 + 3d6 + 4"; /** Halfling die using the `roll.hd20()` shorthand */ export declare const halflingD20Shorthand: RollBuilder; export declare const halflingD20ShorthandExprExpected = "hd20"; /** Halfling die shorthand: d20 reroll 1. */ export declare const halflingD20: RollBuilder; export declare const halflingD20ExprExpected = "hd20"; /** Halfling die with advantage. */ export declare const halflingAdv: RollBuilder; export declare const halflingAdvExprExpected = "hd20 > hd20"; /** Reroll 1s and 2s on 2d6. */ export declare const twoD6Reroll12: RollBuilder; export declare const twoD6Reroll12ExprExpected = "2(d6 reroll d2)"; /** Minimum 2 on a d6. */ export declare const min2OnD6: RollBuilder; export declare const min2OnD6ExprExpected = "2>d6"; /** Keep highest 3 of 4d6. */ export declare const kh3Of4d6: RollBuilder; export declare const kh3Of4d6ExprExpected = "4kh3(1d6)"; /** Keep lowest 2 of 4d8. */ export declare const kl2Of4d8: RollBuilder; export declare const kl2Of4d8ExprExpected = "4kl2(1d8)"; /** Advantage on d20. */ export declare const advD20: RollBuilder; export declare const advD20ExprExpected = "d20 > d20"; /** Disadvantage on d20. */ export declare const disD20: RollBuilder; export declare const disD20ExprExpected = "d20 < d20"; /** Advantage on hd20. */ export declare const advHd20: RollBuilder; export declare const advHd20ExprExpected = "hd20 > hd20"; /** Complex chain: 2d6 + 1d8 + 4(d4 reroll 1) + 5 * Note that reroll(1) applies to the immediate roll before it. */ export declare const complexDamage: RollBuilder; export declare const complexDamageExprExpected = "4(d4 reroll 1) + 1d8 + 2d6 + 5"; /** Double dice (useful for crit damage duplication) */ export declare const doubledD8: RollBuilder; export declare const doubledD8ExprExpected = "2d8 + 5"; /** * Best-of example. * Roll a set of dice and take the highest N dice rolls. */ export declare const bestOfExample: RollBuilder; export declare const bestOfExampleExprExpected = "4kh3(1d6)"; /** Double a d6 roll, resulting in 2d6. */ export declare const doubleD6: RollBuilder; export declare const doubleD6ExprExpected = "2d6"; /** Double a d6+1 roll, resulting in 2d6+2. Note that modifiers are also doubled. */ export declare const doubleD6Plus1: RollBuilder; export declare const doubleD6Plus1ExprExpected = "2d6 + 2"; /** Double a 2d6 roll, resulting in 4d6. */ export declare const double2d6: RollBuilder; export declare const double2d6ExprExpected = "4d6"; /** Double a 2d6+3 roll, resulting in 4d6+6. */ export declare const double2d6plus3: RollBuilder; export declare const double2d6plus3ExprExpected = "4d6 + 6"; /** Triple a complex roll of 1d8+1d4+2, resulting in 3d8+3d4+6. */ export declare const tripleComplexRoll: RollBuilder; export declare const tripleComplexRollExprExpected = "3d8 + 3d4 + 6"; /** * Basic attack check: d20 + 7 vs AC 15. * Returns an ACBuilder; use `onHit()` to attach damage. */ export declare const basicAttackCheck: ACBuilder; export declare const basicAttackCheckExprExpected = "(d20 + 7 AC 15)"; /** Attack with bless (bonus-to-hit via 1d4). */ export declare const blessedAttack: ACBuilder; export declare const blessedAttackExprExpected = "(d20 + 7 + 1d4 AC 15)"; /** Elven Accuracy (3d20 keep highest) attack to-hit. */ export declare const elvenAccuracyAttack: ACBuilder; export declare const elvenAccuracyAttackExprExpected = "(d20 > d20 > d20 + 8 AC 18)"; /** * Full attack: to-hit check multiplied by effects. * - Hit: 2d6 + 4 * - Crit: default doubling of hit dice if not explicitly provided */ export declare const basicAttack: ReturnType; export declare const basicAttackExprExpected = "(d20 + 6 AC 16) * (2d6 + 4) crit (4d6 + 4)"; /** Attack with explicit crit and miss effects; crits on 19–20. */ export declare const detailedAttack: ReturnType; export declare const detailedAttackExprExpected = "(d20 + 9 AC 17) * (1d12 + 5) xcrit2 (2d12 + 5) miss (0)"; /** Attack where all hits become crits (natural 1s still miss). */ export declare const alwaysCritsAttack: ReturnType; export declare const alwaysCritsAttackExprExpected = "d20 + 5 * (1d8) crit (2d8)"; /** Attack that always hits and always crits (no misses at all). */ export declare const alwaysHitsAlwaysCrits: ReturnType; export declare const alwaysHitsAlwaysCritsExprExpected = "d20 * (1d8) crit (2d8)"; /** * Basic save: d20 + 5 vs DC 15; on failure, take 3d6. * Use `saveHalf()` to apply half damage on success. */ export declare const basicSaveCheck: DCBuilder; export declare const basicSaveCheckExprExpected = "(d20 + 5 DC 15)"; /** Save with failure effect (no half on success). */ export declare const saveFailOnly: SaveBuilder; export declare const saveFailOnlyExprExpected = "(d20 + 5 DC 15) * (3d6)"; /** Save that deals half damage on success. */ export declare const saveHalf: SaveBuilder; export declare const saveHalfExprExpected = "(d20 + 5 DC 15) * (3d6) save half"; /** Save at disadvantage (apply before turning into DC builder). */ export declare const disadvantagedSave: DCBuilder; export declare const disadvantagedSaveExprExpected = "(d20 < d20 DC 14)"; /** Example of resolving save PMFs and weights from structured computation. */ export declare function resolveSaveExample(): { pmfMean: number; weights: { [key: string]: number; } & { success: number; fail: number; }; }; export declare const factoryOverload: RollBuilder; export declare const factoryOverloadExprExpected = "4d4 + 1"; export declare function analyzeRoll(builder: RollBuilder, threshold?: number): { expr: string; min: number; max: number; mean: number; pAtLeastThreshold: number; }; /** * Summarizes a single attack using DiceQuery utilities. * Returns DPR, hit/crit odds, and per-outcome damage stats. */ export declare function analyzeAttack(attack: ReturnType): { expr: string; dpr: number; pNonCritHit: number; pCrit: number; pHitOrCrit: number; hitDamage: { min: number; max: number; avg: number; count: number; }; critDamage: { min: number; max: number; avg: number; count: number; }; }; /** * Compares three variants of the same attack: disadvantage, normal, advantage. */ export declare function compareAdvantageStates(baseToHit: number, ac: number, damage: RollBuilder): { normal: { dpr: number; pHitOrCrit: number; pCrit: number; }; advantage: { dpr: number; pHitOrCrit: number; pCrit: number; }; disadvantage: { dpr: number; pHitOrCrit: number; pCrit: number; }; }; /** * Demonstrates multi-attack aggregation (e.g., two swings) with combined DPR and crit odds. */ export declare function analyzeTwoAttacks(attack: ReturnType): { expr: string; attacks: number; dpr: number; pAtLeastOneCrit: number; pAtLeastOneHitOrCrit: number; }; /** * Compares a blessed attack (bonus-to-hit d4) to the same attack without bless. */ export declare function blessWhatIf(baseToHit: number, ac: number, damage: RollBuilder): { normal: { dpr: number; pHitOrCrit: number; }; blessed: { dpr: number; pHitOrCrit: number; }; lift: { dpr: number; pHitOrCrit: number; }; }; export declare function analyzeSave(save: SaveBuilder): { expr: string; resolved: { mean: number; weights: { [key: string]: number; } & { success: number; fail: number; }; }; query: { mean: number; pFail: number; pHalf: number; }; }; export declare function demoAnalyses(): { advCompare: { normal: { dpr: number; pHitOrCrit: number; pCrit: number; }; advantage: { dpr: number; pHitOrCrit: number; pCrit: number; }; disadvantage: { dpr: number; pHitOrCrit: number; pCrit: number; }; }; basicAtk: { expr: string; dpr: number; pNonCritHit: number; pCrit: number; pHitOrCrit: number; hitDamage: { min: number; max: number; avg: number; count: number; }; critDamage: { min: number; max: number; avg: number; count: number; }; }; twoSwings: { expr: string; attacks: number; dpr: number; pAtLeastOneCrit: number; pAtLeastOneHitOrCrit: number; }; blessCompare: { normal: { dpr: number; pHitOrCrit: number; }; blessed: { dpr: number; pHitOrCrit: number; }; lift: { dpr: number; pHitOrCrit: number; }; }; complexRoll: { expr: string; min: number; max: number; mean: number; pAtLeastThreshold: number; }; saveInfo: { expr: string; resolved: { mean: number; weights: { [key: string]: number; } & { success: number; fail: number; }; }; query: { mean: number; pFail: number; pHalf: number; }; }; }; //# sourceMappingURL=example.d.ts.map