Differential D2270 Diff 20582 binaries/data/mods/public/simulation/components/tests/test_DeathDamage.js
Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/tests/test_DeathDamage.js
Show All 14 Lines | |||||
{ | { | ||||
if (value == "DeathDamage/Damage/Pierce" && ent == deadEnt) | if (value == "DeathDamage/Damage/Pierce" && ent == deadEnt) | ||||
return stat + 200; | return stat + 200; | ||||
return stat; | return stat; | ||||
}; | }; | ||||
let template = { | let template = { | ||||
"Shape": "Circular", | "Shape": "Circular", | ||||
"Range": 10.7, | "MaxRange": 10.7, | ||||
"FriendlyFire": "false", | "FriendlyFire": "false", | ||||
"Damage": { | "Damage": { | ||||
"Hack": 0.0, | "Hack": 0.0, | ||||
"Pierce": 15.0, | "Pierce": 15.0, | ||||
"Crush": 35.0 | "Crush": 35.0 | ||||
} | } | ||||
}; | }; | ||||
Show All 11 Lines | |||||
let pos = new Vector2D(3, 4.2); | let pos = new Vector2D(3, 4.2); | ||||
let result = { | let result = { | ||||
"type": "Death", | "type": "Death", | ||||
"attackData": effects, | "attackData": effects, | ||||
"attacker": deadEnt, | "attacker": deadEnt, | ||||
"attackerOwner": player, | "attackerOwner": player, | ||||
"origin": pos, | "origin": pos, | ||||
"radius": template.Range, | "minRange": 0, | ||||
"maxRange": template.MaxRange, | |||||
"shape": template.Shape, | "shape": template.Shape, | ||||
"friendlyFire": false | "friendlyFire": false | ||||
}; | }; | ||||
AttackHelper.CauseDamageOverArea = data => TS_ASSERT_UNEVAL_EQUALS(data, result); | AttackHelper.CauseDamageOverArea = data => TS_ASSERT_UNEVAL_EQUALS(data, result); | ||||
AttackHelper.GetPlayersToDamage = () => playersToDamage; | AttackHelper.GetPlayersToDamage = () => playersToDamage; | ||||
AddMock(deadEnt, IID_Position, { | AddMock(deadEnt, IID_Position, { | ||||
Show All 18 Lines |
Wildfire Games · Phabricator