Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/globalscripts/Templates.js
Show First 20 Lines • Show All 168 Lines • ▼ Show 20 Lines | if (template.Resistance.Entity) | ||||
if (template.Resistance.Entity.Damage) | if (template.Resistance.Entity.Damage) | ||||
{ | { | ||||
ret.resistance.Damage = {}; | ret.resistance.Damage = {}; | ||||
for (let damageType in template.Resistance.Entity.Damage) | for (let damageType in template.Resistance.Entity.Damage) | ||||
ret.resistance.Damage[damageType] = getEntityValue("Resistance/Entity/Damage/" + damageType); | ret.resistance.Damage[damageType] = getEntityValue("Resistance/Entity/Damage/" + damageType); | ||||
} | } | ||||
if (template.Resistance.Entity.Capture) | if (template.Resistance.Entity.Capture) | ||||
ret.resistance.Capture = getEntityValue("Resistance/Entity/Capture"); | ret.resistance.Capture = getEntityValue("Resistance/Entity/Capture"); | ||||
if (template.Resistance.Entity.ApplyStatus) | |||||
// ToDo: Resistance against StatusEffects. | { | ||||
ret.resistance.ApplyStatus = {}; | |||||
for (let statusEffect in template.Resistance.Entity.ApplyStatus) | |||||
ret.resistance.ApplyStatus[statusEffect] = { | |||||
"blockChance": getEntityValue("Resistance/Entity/ApplyStatus/" + statusEffect + "/BlockChance"), | |||||
"duration": getEntityValue("Resistance/Entity/ApplyStatus/" + statusEffect + "/Duration") | |||||
}; | |||||
} | |||||
} | } | ||||
} | } | ||||
let getAttackEffects = (temp, path) => { | let getAttackEffects = (temp, path) => { | ||||
let effects = {}; | let effects = {}; | ||||
if (temp.Capture) | if (temp.Capture) | ||||
effects.Capture = getEntityValue(path + "/Capture"); | effects.Capture = getEntityValue(path + "/Capture"); | ||||
▲ Show 20 Lines • Show All 377 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator