17,101
edits
Tag: Undo |
(Improve curse description generation) |
||
Line 307: | Line 307: | ||
if spell.description ~= nil then | if spell.description ~= nil then | ||
return Shared.applyTemplateData(spell.description, p._getSpellTemplateData(spell)) | return Shared.applyTemplateData(spell.description, p._getSpellTemplateData(spell)) | ||
elseif spell.modifiers | elseif spell.modifiers ~= nil then | ||
return Modifiers.getModifiersText(spell.modifiers, false, inline) | |||
elseif spell.effectID ~= nil then | |||
local effect = GameData.getEntityByID('combatEffects', spell.effectID) | |||
if effect ~= nil and effect.statGroups ~= nil then | |||
for _, statGroup in ipairs(effect.statGroups) do | |||
if statGroup.modifiers ~= nil then | |||
return 'Enemies are inflicted with:<br>' .. Modifiers.getModifiersText(statGroup.modifiers or {}, false, inline) | |||
end | |||
end | end | ||
end | end | ||
return | return '' | ||
elseif spell.specialAttackID ~= nil or spell.specialAttack ~= nil then | elseif spell.specialAttackID ~= nil or spell.specialAttack ~= nil then | ||
local spAtt = Attacks.getAttackByID(spell.specialAttackID or spell.specialAttack) | local spAtt = Attacks.getAttackByID(spell.specialAttackID or spell.specialAttack) |