Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/tests/test_Attack.js
Show First 20 Lines • Show All 194 Lines • ▼ Show 20 Lines | "attackData": { | ||||
"Bonuses": { | "Bonuses": { | ||||
"BonusCav": { | "BonusCav": { | ||||
"Classes": "Cavalry", | "Classes": "Cavalry", | ||||
"Multiplier": 3 | "Multiplier": 3 | ||||
} | } | ||||
} | } | ||||
}, | }, | ||||
"friendlyFire": false, | "friendlyFire": false, | ||||
"radius": 10, | "minRange": 0, | ||||
"maxRange": 10, | |||||
"shape": "Circular" | "shape": "Circular" | ||||
}); | }); | ||||
}); | }); | ||||
for (let className of ["Infantry", "Cavalry"]) | for (let className of ["Infantry", "Cavalry"]) | ||||
attackComponentTest(className, true, (attacker, cmpAttack, defender) => { | attackComponentTest(className, true, (attacker, cmpAttack, defender) => { | ||||
TS_ASSERT_EQUALS(cmpAttack.GetAttackEffectsData("Melee").Bonuses.BonusCav.Multiplier, 2); | TS_ASSERT_EQUALS(cmpAttack.GetAttackEffectsData("Melee").Bonuses.BonusCav.Multiplier, 2); | ||||
▲ Show 20 Lines • Show All 114 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator