Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/Attack.js
Show First 20 Lines • Show All 448 Lines • ▼ Show 20 Lines | Attack.prototype.GetAttackStrengths = function(type) | ||||
let applyMods = damageType => | let applyMods = damageType => | ||||
ApplyValueModificationsToEntity("Attack/" + type + splash + "/" + damageType, +(template[damageType] || 0), this.entity); | ApplyValueModificationsToEntity("Attack/" + type + splash + "/" + damageType, +(template[damageType] || 0), this.entity); | ||||
if (type == "Capture") | if (type == "Capture") | ||||
return { "value": applyMods("Value") }; | return { "value": applyMods("Value") }; | ||||
let ret = {}; | let ret = {}; | ||||
for (let damageType of DamageTypes.GetTypes()) | for (let damageType in template) | ||||
if (DamageTypes.GetTypes().some(x => x == damageType)) | |||||
ret[damageType] = applyMods(damageType); | ret[damageType] = applyMods(damageType); | ||||
wraitii: Worked perfectly fine before. | |||||
return ret; | return ret; | ||||
}; | }; | ||||
Attack.prototype.GetSplashDamage = function(type) | Attack.prototype.GetSplashDamage = function(type) | ||||
{ | { | ||||
if (!this.template[type].Splash) | if (!this.template[type].Splash) | ||||
return false; | return false; | ||||
▲ Show 20 Lines • Show All 246 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
Worked perfectly fine before.