Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/tests/test_Attack.js
Show First 20 Lines • Show All 102 Lines • ▼ Show 20 Lines | "Ranged": { | ||||
} | } | ||||
} | } | ||||
} | } | ||||
}, | }, | ||||
"Capture": { | "Capture": { | ||||
"Capture": 8, | "Capture": 8, | ||||
"MaxRange": 10, | "MaxRange": 10, | ||||
}, | }, | ||||
"Slaughter": {} | "Slaughter": {}, | ||||
"StatusEffect": { | |||||
"ApplyStatus": { | |||||
"StatusInternalName": { | |||||
"StatusName": "StatusShownName", | |||||
"StatusTooltip": "StatusTooltip", | |||||
"Duration": 5000, | |||||
"Stackability": "Stacks", | |||||
"Modifiers": { | |||||
"SE": { | |||||
"Paths": { | |||||
"_string": "Health/Max" | |||||
}, | |||||
"Affects": { | |||||
"_string": "Unit" | |||||
}, | |||||
"Add": 10 | |||||
} | |||||
} | |||||
} | |||||
}, | |||||
"MinRange": 10, | |||||
Stan: strings | |||||
Not Done Inline ActionsStill accurate, as it's nice to having warnings in test when you forget +values :) Stan: Still accurate, as it's nice to having warnings in test when you forget +values :) | |||||
"MaxRange": 80 | |||||
} | |||||
}); | }); | ||||
let defender = ++entityID; | let defender = ++entityID; | ||||
AddMock(defender, IID_Identity, { | AddMock(defender, IID_Identity, { | ||||
"GetClassesList": () => [defenderClass], | "GetClassesList": () => [defenderClass], | ||||
"HasClass": className => className == defenderClass | "HasClass": className => className == defenderClass | ||||
}); | }); | ||||
▲ Show 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetAttackEffectsData("Ranged", true), { | ||||
"Bonuses": { | "Bonuses": { | ||||
"BonusCav": { | "BonusCav": { | ||||
"Classes": "Cavalry", | "Classes": "Cavalry", | ||||
"Multiplier": 3 | "Multiplier": 3 | ||||
} | } | ||||
} | } | ||||
}); | }); | ||||
TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetAttackEffectsData("StatusEffect"), { | |||||
"ApplyStatus": { | |||||
"StatusInternalName": { | |||||
"StatusName": "StatusShownName", | |||||
"StatusTooltip": "StatusTooltip", | |||||
"Duration": 5000, | |||||
"Interval": 0, | |||||
"Stackability": "Stacks", | |||||
"Modifiers": { | |||||
"SE": { | |||||
"Paths": { | |||||
"_string": "Health/Max" | |||||
}, | |||||
"Affects": { | |||||
"_string": "Unit" | |||||
}, | |||||
"Add": 10 | |||||
} | |||||
} | |||||
} | |||||
} | |||||
}); | |||||
TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetTimers("Ranged"), { | TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetTimers("Ranged"), { | ||||
"prepare": 300, | "prepare": 300, | ||||
"repeat": 500 | "repeat": 500 | ||||
}); | }); | ||||
TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetRepeatTime("Ranged"), 500); | TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetRepeatTime("Ranged"), 500); | ||||
▲ Show 20 Lines • Show All 145 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
strings