[svn] Manaburn damage
Posted: Tue Feb 21, 2012 7:28 pm
Untested, but it looks like manaburn damage does 2.6 times as much arcane damage as would be expected. For example, 10 manaburn damage would drain 20 mana and deal 26 arcane damage. This could be changed by adding something like before mana/vim/positive/negative is calculated.
Code: Select all
local dam = dam / 2.6
Code: Select all
newDamageType{
1968 name = "manaburn", type = "MANABURN",
1969 projector = function(src, x, y, type, dam)
1970 local target = game.level.map(x, y, Map.ACTOR)
1971 if target then
1972 local mana = dam * 2
1973 local vim = dam
1974 local positive = dam / 2
1975 local negative = dam / 2
1976
1977 mana = math.min(target:getMana(), mana)
1978 vim = math.min(target:getVim(), vim)
1979 positive = math.min(target:getPositive(), positive)
1980 negative = math.min(target:getNegative(), negative)
1981
1982 target:incMana(-mana)
1983 target:incVim(-vim)
1984 target:incPositive(-positive)
1985 target:incNegative(-negative)
1986
1987 local dam = math.max(mana, vim * 2, positive * 4, negative * 4) * 1.3
1988 return DamageType:get(DamageType.ARCANE).projector(src, x, y, DamageType.ARCANE, dam)
1989 end
1990 return 0
1991 end,
1992 }