Pascal's Wager Wiki

Every weapon hit, spell, arrow and boss swing in Pascal's Wager goes through one function in the game's code. This page walks through it in the same order the game does. All the numbers below come from the game's own tables and scripts. The short version: (stat × move multiplier + move's flat power) × a defence factor between 0.3 and 1. After that, a chain of multipliers is applied: crit, back hit, guard, talents and difficulty. For the overall picture see Combat. The worked example uses Terrence.

Overview#

The game has three different damage formulas:

SourceFormula usedCan crit?Page
Attacks and skills (players and enemies), thrown weaponsRatio formula (this page)Yesthis page
Traps and hazards ("tricks")Classic def / (def + 100) reductionNobelow
Continuous ("period") moves such as lingering fields or beamsSame ratio formula, then × the frame time; no crit, back-hit, guard, move damage reduction or execution stepNothis page
Damage-over-time statuses (Bleed, Poison, ...)Fixed damage per tick × stacks, ignores defenceNoStatus effects#Damage over time formula
FallingPercentage of max healthNobelow

Most numbers in the data are per mille (thousandths): 1000 = 100%, 125 = 12.5%. The code applies "+X‰" bonuses as value × (1000 + X) / 1000.

Step by step: an attack hit#

1. Attack value#

attack = AttackStat[type] × BaseRate / 1000      (move multiplier)
attack = attack × (1 + RaceBonus / 1000)          (bonus vs Human / Beast / Sendril)
attack = attack + Attack                          (move's flat power)
  • AttackStat[type] is the attacker's attack stat for the move's damage type (Physical, Fire, Poison, Arcane, Dark or Pierce). See Damage types and resistances. All six playable heroes only have a Physical attack stat. Their Fire, Dark and Pierce attack stats are 0.
  • BaseRate is the move's multiplier from SkillData (800 = 80%). Hero moves range from 400 to 2500.
  • Attack is a flat amount added after the multiplier. Because of it, weak characters still deal reasonable damage with strong moves.
  • RaceBonus = HumanAdd × Human + BeastAdd × Beast + SendrilAdd × Sendril. The target's Human/Beast/Sendril flags are 0 or 1, and the bonuses come from trophy properties such as "Damage to Humans". A target with two flags (for example Human + Sendril, which 324 enemy placements have) gets both bonuses added together.
  • Thrown weapons (WeaponData) use the same steps with their own BaseRate (1000) and flat power (Param1) instead of the move's Attack (the throw move's own BaseRate also multiplies the stat part, inferred; it does not matter for heroes). Since heroes have no Fire or Pierce attack stat, a Throwing Knife always has a raw attack of exactly its flat 180.

2. Conditional trophy bonuses (player only, not thrown items)#

If you carry these trophies, your attack value is raised by their ‰:

TriggerLogic typeExample trophies (bonus)
Health is fullHPMaxAttackAdd (104)The Withered (+7%), Pale Egg (+10%)
Health at or below 50%HPHalfAttackAdd (105)Scarlet Egg (+10%), Figurine of Sorrowful Nun (+7.5%), Fanatical Sand (+15%)
You are in an abnormal sanity stateSanAttackAdd (121)Bloodthirsty Eye, Beastheart Stone, Glowing Crystal (+12.5% each)

The same idea exists for defence when you are the target (see Damage types and resistances#Ways to change resistances).

3. Defence factor#

defence = target's resistance stat for the move's DefenceType
r = attack / defence
if defence = 0:      factor = 1
elif r > 10:         factor = 1 - 1/r
elif r > 1:          factor = (2r + 7) / 30
else:                factor = 0.3
damage = attack × factor × distanceFactor     (at least 1)
attack ÷ defence≤ 11.52357102050
Damage dealt (% of attack)30%33.3%36.7%43.3%56.7%70%90%95%98%

The curve has no jumps (30% at r = 1 and 90% at r = 10 from both sides). It is piecewise: flat at 30% up to r = 1, a straight line between r = 1 and r = 10, then it creeps towards 100%.

distanceFactor is used only by moves that have a DamageDisMin/DamageDisMax falloff, such as Viola's gunshots (the ranges differ per move: 3-12 m, 3-15 m, 4-20 m and so on). The measured distance is first multiplied by the target model's HitDisRate. The factor is 1 up to the minimum distance and 0 beyond the maximum (the shot then still deals the minimum hit of 1 before the later multipliers, so 2 if it crits, lands from behind or hits a weak point; it gives only 1 Rage and 1 Power, and does no poise, weakness or sanity damage). In between it follows a quarter circle, sqrt(1 - x²), where x is how far you are between min and max. At halfway you still deal 87%.

4. Critical hit#

If the move can crit and the roll succeeds (or the hit is a guaranteed crit), damage is multiplied by 1 + CritDamage/1000. Talents and the target's crit resistance adjust this. Details on Critical hits.

5. Back hits, guards and parries#

  • Hit from behind (any move, not just a backstab): damage × BackGuardBreak × target BackDamageRate. Most hero moves have BackGuardBreak 1.25 (556 of the 742 move rows of heroes 10001-10007, which includes The First Messenger), 95 have 2, 87 have 0 and 4 have 1. Every model in the game has BackDamageRate 1. A move with BackGuardBreak 0 therefore deals no damage from behind. A back hit also ignores the target's guard. See Backstab.
  • Blocked or "hit-hand" (deflected) from the front: damage is scaled by clamp(GuardDamageRatio × (GuardBreak − Guard) / Guard, 0, 1), so a hit whose guard-break value does not exceed the guard value deals 0. A broken guard uses GuardBreakDamageRatio (1 for every model) instead, and a failed block (guard 0, or guard break at least 3.5x the guard) still uses GuardDamageRatio, which is 0 for Norwood and Elena: their failed blocks stagger them without costing health. A "parry-grade" block (block parameter above 1) halves the result again. Blocked or deflected hits still deal their full weakness damage (only poise damage is cancelled). The thresholds, the stamina cost and the examples are on Guarding#How a blocked hit is resolved; the deflect rules are on Parry and counter.

6. Damage-reduction moves#

Some moves have a DamageSub value that reduces damage the user takes. It is only active during the move's armoured ("SkillToughness") window, not for the whole animation: the game loads it when the armour window opens and clears it when it closes. It is applied after the guard step and does not depend on the attack's type. It does not reduce continuous-move damage, traps or statuses.

CharacterMoves (SkillIndex/combo)Damage taken during the armour window
NorwoodCoffin ultimate moves and potion use (15-18, 26, 112, 113; which index is which move is inferred)−50%
JeroldSkillIndex 1 and 2, combos 1-2 (his light-attack rows; exact moves inferred)−75%
Treasure Thieves (20055)moves 3, 20-24−90%
Terror Obsession (20045)moves 11/3-4, 12/1-3−60% to −90%
The First Fallen: Handel (20053)moves 13, 20, 21−20%, −50%, −80%
Other enemies (models 20024, 20025, 20026, 20035, 20048, 20051)one move each−70% to −90%

Talents can add to this (see Talents): Norwood's "Coffin of Chained Soul: Fortress" (+15% per level) and the "Health Potion: Toughness" talents of Norwood, Jerold and Elena (+20%). The same reduction also lowers the weakness damage you take.

7. After-defence multipliers (in order)#

  1. Executions against a target that has an "execution damage up" status: +that status's ‰.
  2. Benita in an abnormal sanity state: +15% below 50% health. Below 30% health, the talent "Bloodthirsty Instinct" doubles this bonus to +30% (the +1000‰ talent value is applied to the 150‰ bonus).
  3. Talent bonus for this move (SkillDamageAdd): for example Terrence's "Backstab: Enhanced" and "Execution: Enhanced" (+7% per level), Viola's "Light Combo: Enhanced" (+10% per level) and Benita's "Rhythm: Punishment" (+5% per level).
  4. Weak point: ×(1 + WeakDamageMultiplier), so ×2 on almost every model, ×6 on Edith and ×2.1 on Fused Sprenger. The per-boss table of damage, poise and Resilience multipliers is in Poise and stagger.
  5. Flat damage bonus: Benita's shield-burst move adds all of her current shields to the hit as flat damage (see Hidden mechanics).

8. Difficulty and the Egg#

These apply only when the player is the one being hit:

ConditionMultiplier on damage you take
Casual difficulty×0.65 (×0.5 in the cloud demo build)
Carrying the Egg of the Bearer (item 10018)×0.5
Both×0.325

Normal and Hard (the code calls it Expert, difficulty id 3) do not change damage at all: the battle difficulty is clamped so that anything above Normal is treated as Normal (BattleData.SetDifficulty). Hard only matters in Arcade mode, where it picks a separate set of enemy stat rows. Higher New Game Plus journeys make enemies stronger through their level and stats; no separate damage multiplier was found in the damage code (see New Game Plus). Everything else Casual changes (Poise, Stamina, guideposts) is outside this formula; see Difficulty#What each level changes.

9. Rounding, shields and death#

The final damage is rounded up (ceil). It is then taken first from your skill shield, then from your trophy shield, and only then from your health (see Shields and protection). If health would reach 0 and you have a "no death" status, you are left at 1 HP instead and the status is used up (the stacking variant loses one stack per save). Damage flagged as MustDeath (The First Messenger's moves 27-30, model 10006) skips that protection.

In story mode outside the maze, characters on your team other than your own hero take no health or sanity damage at all, and nobody takes damage after your hero has died or while the game has stopped attacks (for example during cutscenes, inferred).

Worked example: Terrence vs. a club-wielding enemy#

Terrence with his starting attributes has Physical attack 59, Crit rate 34‰, Crit damage 201‰, Physical defence 63 and 849 HP. The first enemy of the game (model 20001, internal name 棒子怪, a Human, story monster 1001) has Physical defence 43, 248 HP and attack 92 on the first journey (enemy level 1).

Terrence's first light attack (SkillData 10001 / 1 / 1: BaseRate 800, Attack 61, Physical):

StepCalculationResult
Attack59 × 800/1000 + 61108.2
Ratio108.2 / 432.516
Defence factor(2 × 2.516 + 7) / 300.401
Damage108.2 × 0.40143.4 → 44
Same hit, critical43.4 × 1.20152.1 → 53
Same hit, from behind43.4 × 1.2554.25 → 55

It takes 6 normal hits to kill the 248-HP enemy. The third light attack (Attack 74) deals 52.

On the second journey (enemy level 30: defence 144, 678 HP), the same 108.2 attack gives a ratio of only 0.75, so the defence factor bottoms out at 0.3: 33 damage per hit and 21 hits to kill. This shows why levelling attack matters so much in New Game Plus.

The enemy's first light attack on Terrence (SkillData 20001 / 1 / 1: BaseRate 1000, Attack 133):

StepCalculationResult
Attack92 × 1000/1000 + 133225
Ratio, factor225 / 63 = 3.57 → (7.14 + 7) / 300.471
Damage (Normal)225 × 0.471106.1 → 107
Casual106.1 × 0.6569
With Egg of the Bearer106.1 × 0.554

On the second journey the same swing comes from a level-30 enemy with attack 390: 523 / 63 = 8.3 → factor 0.787 → 412 damage, almost half of Terrence's starting health.

Traps and hazards#

Traps, environmental hazards and other "tricks" (DamageTrickCommon) use a different, gentler formula:

damage = TrickDamage × (1 - defence / (defence + 100))

With Terrence's 63 Physical defence a trap deals 61.3% of its listed damage. Traps cannot crit. If you are mid-parry ("hit-hand") the same guard step as for attacks applies. Casual and the Egg still reduce them. If the hero is Norwood in an abnormal sanity state, the trap code halves his non-physical resistance again, on top of the −50% his Lunatic state already applies to those stats. A trap therefore sees only 25% of his normal Fire/Poison/Arcane/Dark resistance (for example 32 → 8, so he takes 93% of a Fire trap's damage instead of 76%). The "Adapt to Abnormality" talents soften both halvings. This follows from the code; it has not been tested in game.

Fall damage#

Falls of up to 3.5 m are free. Above that you lose (h² − 12.25) / 68 of (max HP + skill shield + trophy shield), capped at 100%:

Fall height4 m5 m6 m7 m8 m≥ 8.96 m
Damage (% of max HP + shields)5.5%18.8%34.9%54.0%76.1%100% (death)

Hidden mechanics#

  • Defence can never cut damage below 30% of the attack value. If the attack is weaker than the target's defence, every hit deals a flat 30%, however much more defence the target stacks. Against a well-armoured target, raising your attack does nothing until the attack value passes the defence value.
  • Flat move power matters early, multipliers late. Each move adds its own flat Attack (61 for Terrence's first slash) on top of the stat-based part, so at low levels most of your damage comes from the move itself.
  • Back hits are not only backstabs. Any normal attack that lands from behind gets ×1.25 (or ×2 on some moves) and goes straight through a guard; a few moves (BackGuardBreak 0) deal nothing. The full table over all 1,958 move rows is in Backstab.
  • Hitting several weak points with one swing counts each one. The game runs the full damage calculation once for every weak-point hitbox the attack touches, each at ×2. A wide swing across two weak points deals four times normal damage. Weak points are defined in each model's Unity configuration, not in the tables. Fused Sprenger's weak point is only enabled once a particular story quest is complete (or in the maze boss and boss time-challenge modes), when its glowing piece of gear is shown. Each pass also repeats the side effects: see the next entry.
  • "Damage to Humans/Beasts/Sendrils" only boosts the stat part of a hit. The race bonus multiplies attack stat × BaseRate before the move's flat Attack is added. A +24% Human-damage trophy (the highest random roll) raises Terrence's first light attack only from 108.2 to 119.5 attack (+10.5%); after the defence curve it deals 51 instead of 44 against the first club enemy. Heroes have no Fire or Pierce attack stat, so race bonuses do nothing for thrown weapons.
  • Conditional trophy bonuses add up. Equipped trophies that share a logic type add their values before the bonus is applied: Bloodthirsty Eye + Beastheart Stone + Glowing Crystal give +37.5% attack in an abnormal sanity state. The exception is trophies flagged NoOverlay (the low-health rage trophies), where only the highest value counts. "Full health" and "≤ 50% health" bonuses never apply together.
  • Lunatic states change your stats, and so your damage. In an abnormal sanity state, Terrence gains Physical attack, Viola gains crit damage, and Norwood and Jerold lose resistance. The per-hero numbers and the "Adapt to Abnormality" talents are in Abnormal state#Effects by hero (and Lunatic state for the second stage).
  • Each weak point repeats the whole hit. Because the full calculation runs once per weak-point hitbox, a swing across two weak points also gives you Rage and Power twice, drains your sanity twice and deals poise and weakness damage twice. The weak-point multipliers are in Poise and stagger.
  • Race bonuses use the absolute value. The helper that applies "+X‰" bonuses (MathHelper.addValuePermil) takes the absolute value of X, so a negative bonus would still increase damage. No shipped item has a negative value.
  • "Night's Embrace" turns targets into Sendrils. While a target has one of Jerold's Sendril mark statuses (10101/10102) and is not already a Sendril, this trophy treats it as a Sendril for your damage-vs-race bonuses: a Human or Beast becomes a Sendril only, but a target that is both Human and Beast keeps its Human flag and gains the Sendril flag.
  • Benita's shield burst. One of Benita's moves (SkillSP2, second hit) removes all of her shields and adds their total as flat damage to that hit, after every multiplier.
  • Some moves ignore defence entirely. A move whose DefenceType is 0 ("Other") makes the target's defence 0, so the factor is 1. Among hero moves these are mostly guard and dodge actions (Terrence's guard 11/x, Elena's single-sword guard, Viola's reload and aim actions, dodges). Heals use the same type but go through the healing path instead.
  • Dealing damage drains your sanity. In story mode (outside the Dark Forest), each hit you land costs sanity in proportion to the share of the enemy's health removed (SanDamage × damage / enemy max HP). The talent type SanAttackSub reduces it. See Sanity#Damage costs sanity (campaign).
  • Lifesteal is computed on the final pre-rounding damage. Benita's draining moves (SuckHp 1000 to 1500‰, i.e. 100% to 150% of damage dealt), the trophies Father's Love, Glory and Basilisk's Epiphany (+5% to +10%), and the "Discipline"-type trophies that instead cost you 5% to 12% of damage dealt as health all use the damage before the difficulty multiplier and before shields.
  • Sanity-collapse doubles are glass cannons (inferred). Hostile hero copies created with the "SanMonster" monster type get their max HP halved and their Physical attack doubled (SanMonsterHp 500, SanMonsterPhysicDamage 2000, applied as value × ‰ / 1000). They are spawned from your own hero list at your hero's level; They also lose 14 Poise (Poise and stagger); the trigger is described on Lunatic state.

Sources#

  • reference/lua_src/luascript/logic/playervalue/animalbase_value.lua:2066-2107 (DamageCommon, weak-point loop), :79-235 (InitPropertyBase: SanMonster multipliers, StoryMonsterProperty added to base stats), :2109-2807 (DamageCommonEach: attack, defence, crit, back/guard, multipliers), :2808-2900 (periodic damage)
  • animalbase_value.lua:1714-1798 (GetAttackType, GetAttackAdd, GetAttackBase, GetAttackBaseRatio), :1800-1840 (defence lookup), :1884-1905 (DamageDrop), :1915-2044 (DamageTrickCommon), :976-1085 (SubPropertyCommon: shields, NoDeath), :792-807 (GetSkillDamageSub), :3097-3157 (SuckHp, casual ratios)
  • reference/lua_src/luascript/logic/player/animalbase.lua:16697-16751 (CalculateDamage, sanity drain), :1673-1683 (weak colliders), logic/player/hero20034.lua:35-48, logic/player/hero10003.lua:368-376, logic/playervalue/hero10003_value.lua:123-128
  • reference/lua_src/luascript/common/mathhelper.lua:193-238; logic/battle/battledata.lua:18-22 (difficulty ids 1/2/3; GameText UI_COMMON_GAMEMODE_HARDCORE = "Hard" for id 3, the code name is Expert)
  • Adversarial review additions: animalbase_value.lua:302-330 (GetPropertyMax includes lunatic/status diffs, rounded up), :408-446 and :533-552 (lunatic stat changes), :976-1060 (team immunity in story mode, NoDeath stacks), :1946-1955 (second Norwood halving in traps), :2406-2425 (weakness damage not cancelled by blocks), :2531-2557 (failed block still uses GuardDamageRatio), :3045-3073 (GuardAdd status = guard 999); logic/player/animalbase.lua:3977-3988 (DamageSub only during the SkillToughness window), :7465-7485 (failed block zeroes poise); logic/battle/battledata.lua:124-131 (difficulty clamped to Normal); structdata/ms_arcademonsterproperty.lua:26-40 + es_arcademonsterproperty.lua (Level 2/3 rows); structdata/fs_trophyequiplist.lua:235-256 (logic params summed unless NoOverlay); hero10001_define.lua:27-28, hero10005_define.lua:167; es_skilldata.lua DamageSub rows of 20024-20055; es_trophyrandomproperty.lua PropertyType 35-37 (50-240); recomputed in build/wiki/scripts/refute_damage/check1.py-check3.py
  • reference/lua_src/gamedata/playerdefine/animalbase_value_define.lua:6-28, gamedata/playerdefine/animalbase_define.lua:239-241, hero10003_define.lua:79-81, hero10004_define.lua:53
  • reference/lua_src/luascript/structdata/ms_itemdata.lua:68-92 (trophy logic types), :112 (NoobItem = 10018), structdata/fs_itemlist.lua:127-135, logic/battle/battledata.lua:18-22
  • es_skilldata.lua: rows HeroId 10001 SkillIndex 1 combos 1-3, 20001 / 1 / 1; DamageSub, BackGuardBreak, DamageDisMin/Max, SuckHp, MustDeath columns (all hero rows)
  • es_herodata.lua: BackDamageRate, WeakDamageMultiplier (20027, 20034, 20055), GuardDamageRatio (10004, 10007)
  • es_weapondata.lua: rows 30001-30013; es_trophydata.lua: LogicType/LogicParam rows 60020, 60024, 60034, 60045, 60047, 60048, 60052, 60063, 60066, 60089, 67001-67003; es_herotalent.lua: 11205, 11207, 12102, 13110, 13410, 14109, 14308, 15307, 17307
  • Hero and enemy stats (re-derived with structdata/fs_herodata.lua:560-608): computed from es_heropropertydata.lua, es_heroattributedata.lua, es_enemyattributedata.lua, es_storymonster.lua (StoryId 1, StoryMonsterId 1001, Level_1-4 = 1/30/60/73) and es_storymonsterproperty.lua (build/wiki/data/attributes/base_stats.json, build/wiki/data/combat/enemy_stats.json)
Categories:Combat