Module:Attacks: Difference between revisions

Update effect definitions for v1.1 (still WIP)
(Fix reference to GameData module)
(Update effect definitions for v1.1 (still WIP))
Line 22: Line 22:
},
},
["Poison"] = {
["Poison"] = {
["type"] = 'DOT',
{ ["effectType"] = 'Poison' },
["subtype"] = 'Poison'
{ ["effectType"] = 'DeadlyPoison' }
},
},
["Slow"] = {
["Slow"] = {
Line 37: Line 37:
},
},
["Frostburn"] = {
["Frostburn"] = {
["type"] = 'Modifier',
["effectType"] = 'Frostburn'
["modifiers"] = {
["include"] = { 'increasedFrostburn', 'increasedAttackIntervalPercent' }
}
},
},
["Mark of Death"] = {
["Mark of Death"] = {
Line 49: Line 46:
},
},
["Affliction"] = {
["Affliction"] = {
["type"] = 'Modifier',
{ ["effectType"] = 'Affliction' },
["modifiers"] = {
{
["include"] = { 'decreasedMaxHitpoints' }
["type"] = 'Modifier',
["modifiers"] = {
["include"] = { 'increasedAfflictionChance' }
}
},
{
["type"] = 'Modifier',
["modifiers"] = {
["include"] = { 'decreasedMaxHitpoints' }
}
}
}
},
},
Line 69: Line 75:
["subtype"] = 'Regen'
["subtype"] = 'Regen'
}
}
-- TODO Implement curses
}
}


Line 137: Line 144:
if effectDefn.type ~= effect.type then
if effectDefn.type ~= effect.type then
-- Effect's type doesn't match that of the effect definition
-- Effect's type doesn't match that of the effect definition
return false
elseif (effectDefn.effectType ~= nil and (effect.effectType == nil or effect.effectType ~= effectDefn.effectType)) then
return false
return false
elseif (effectDefn.subtype ~= nil and (effect.subtype == nil or effect.subtype ~= effectDefn.subtype))
elseif (effectDefn.subtype ~= nil and (effect.subtype == nil or effect.subtype ~= effectDefn.subtype))