Skip to main content

Doom Sword

Every attack is a critical hit.

Taking any damage instantly kills the player.

Implementation​

We use DoomSword_Attack as the Effect Attribute Stat.

DoomSwordAttack — Float Stat Effect (MAS)
Float Stat Effect (MAS): DoomSwordAttack
Processor Id:Standard_Float
Attributes:Everything
Target Stat:Health
Value:-5
Attribute Stat Keys [0]:Attack
Attribute Stat Keys [1]:DoomSword_Attack

This Stat has a CritRate relation with a value of 1.

DoomSword_Attack — Stat (Clamped Float)
Stat (Clamped Float): DoomSword_Attack
Stat Key:DoomSword / FloatClamped / Attack
Relation: CriticalRate_Applying:DoomSword_CritRate
DoomSword_CritRate — Stat (Clamped Float)
Stat (Clamped Float): DoomSword_CritRate
Stat Key:DoomSword / FloatClamped / CritRate
Default:1
Max:1

Since the CritProcessor sums the CritRate and CritMultiplier values from all Attribute Stats, the CritRate reaches 1, causing every attack to be a critical hit.

For the instant-death mechanic, we use a CounterEffect Stat injected into the Health Stat with negative Effect values being tracked.

DieOnDamage — Stat (CounterEffect Signed)
Stat (CounterEffect Signed): DieOnDamage
Stat Key:DoomSword / CounterEffect / DieOnDamage
Redirection Target:Modifier Source
Redirected Effect Source:Modifier Source
Targeting Environment Id:Default
Trigger On:Applied
Incoming Effect Sign:Negative
Default: DieOnDamage
Int Stat Effect (BS): DieByCurse
Target Stat:Default / IntClamped / Dead
Value:1

When the player takes damage, the CounterEffect detects the negative Effect and triggers the die Effect.

DieByCurse — Int Stat Effect (BS)
Int Stat Effect (BS): DieByCurse
Target Stat:Dead
Value:1