← All scenarios
CARD-004autoAttack

Weapon-type condition — Sword Mastery '+20 ATK only while wielding swords'

Tests the weaponType condition predicate. The same Effect is active on the attacker for both variants; in one, attacker wields a sword (bonus applies); in the other, a dagger (bonus does not). Effect is in activeEffects either way — the library decides based on weapon at calc time.

conditionalModifierweaponTypePredicatepassiveEffect
Action
autoAttack
Auto-attack in expected mode
mode
expected
context.mapType
pve

Actors

Swordsman with Sword Mastery 10
player · swordsman · Lv50
attacker
Primary stats
str
60
agi
40
vit
40
int
1
dex
30
luk
10
Equipment
  • mainhand: test_weapon · sword_1h · +4 · ATK 80
Active effects
  • sword_mastery_lv10(1 modifier)
Test dummy
monster · Lv50
defender
formlessneutral 1mediumnormal
HP 999999 / 999999
Hard DEF 20
Hard MDEF 0
Expected output
From the scenario fixture. Numerical values marked as null are placeholders pending rAthena verification.

This scenario contains a DELIBERATE BUG in the condition shown above (uses 'and' instead of 'or') to test that your engine produces 'always false' for mutually-exclusive AND predicates. The corrected version of this card would use 'or' with sword_1h/sword_2h operands, OR the schema could be extended to allow weaponType to accept an array. For now, this scenario verifies: (a) library doesn't crash on impossible conditions, (b) bonus never applies, (c) damage equals the no-bonus case for both variants. Then add CARD-004b with the corrected condition.

Show full expected JSON
{
  "propertyAssertions": [
    "damage(sword) == damage(dagger) (the buggy AND never matches)",
    "library does not error or panic on impossible AND"
  ]
}

Computed: DamageResult

Server-evaluated by calculatePhysicalDamage() from @ro/core.

Outcome
hit
1 hit · 241 damage
241
Pipeline breakdown
D-003 steps 2–13
WeaponratioATK116
× size × skill116
× (1 + 0.0% ATK%)116
+ StatusATK (130)246
× 1.00 element246
× (1 + 0.0% race/elem/size/class)246
crit none246
− 0 hard DEF246
− 5 soft DEF241
× (1 − 0.0% taken%)241
+ MasteryATK (0)241
floor + min(1)241
Inputs
From attacker / defender ResolvedStats
StatusATK130
WeaponATK116
EquipATK0
MasteryATK0
Size mult1.00×
Element mult1.00×
Race%0.0%
Element%0.0%
Size%0.0%
Class%0.0%
Taken%0.0%

Hits (1): hit 241

Variant matrix · 2 cells

Each cell re-applies the variant's overrides to the base scenario and re-runs the same pipeline that produced the single result above.

Sweep over weaponType
Highest in row is highlighted emerald; lowest rose. Hover any cell to see the full variant label.
sword_1hdagger
241212
Property assertions
Pattern-matched checks from the scenario's expected. ⊙ marks assertions the parser doesn't recognize (the raw string is shown so devs can verify by eye).
  • damage(sword) == damage(dagger) (the buggy AND never matches)
  • library does not error or panic on impossible AND