So. Is it possible to make custom spell, that gives caster +n protection for some duration? In other words, exactly like original Shield spell, except that +25 flat bonus is replaced with some other number?
I downloaded original game asset pack and it states:
Code: Select all
onCast = "shield",
I downloaded Multiple magic schools spells pack and inside is a function called shield, which:
Code: Select all
onCast = function(champion, x, y, direction, elevation, skillLevel)
...
spells_functions.script.addConditionValue("protective_shield", duration, not champion:hasTrait("aura") and champion:getOrdinal())
spells_functions.script.setConditionIcons("protective_shield", "shield")
end
Code: Select all
local c = party.party:getChampionByOrdinal(ordinal)
c:setConditionValue(condition, c:getConditionValue(condition)+duration)
To make the question more general, are all conditions hard-coded and if not, how to make custom conditions?