[svn] Manaburn damage

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
lukep
Sher'Tul Godslayer
Posts: 1712
Joined: Mon Mar 14, 2011 10:32 am
Location: Canada

[svn] Manaburn damage

#1 Post by lukep »

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

Code: Select all

local dam = dam / 2.6
before mana/vim/positive/negative is calculated.

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 }
Some of my tools for helping make talents:
Melee Talent Creator
Annotated Talent Code (incomplete)

edge2054
Retired Ninja
Posts: 3756
Joined: Fri May 28, 2010 4:38 pm

Re: [svn] Manaburn damage

#2 Post by edge2054 »

The numbers are basically copy-pasted from Mana Clash. They might be high but the expectation is every point of mana burned deals 1.3 arcane damage and that the effect burns twice it's value.

If it needs to be normalized for ease of understanding and balance on egos I would do it like this...

First the values on Mana Clash have been changed. The amount of damage it does is no longer 1.3*Drain. To compensate for the damage loss I made the talent hit, which gives it more tactical usage since casters tend to hide in the back, and lowered the cooldown to six.

Code: Select all

newTalent{
	name = "Mana Clash",
	type = {"wild-gift/antimagic", 4},
	require = gifts_req4,
	points = 5,
	equilibrium = 10,
	cooldown = 6,
	range = 10,
	tactical = { ATTACK = { ARCANE = 3 } },
	direct_hit = true,
	requires_target = true,
	target = function(self, t)
		return {type="hit", range=self:getTalentRange(t), talent=t}
	end,
	action = function(self, t)
		local tg = self:getTalentTarget(t)
		local x, y, target = self:getTarget(tg)
		if not x or not y then return nil end
		self:project(tg, x, y, function(px, py)
			local target = game.level.map(px, py, Map.ACTOR)
			if not target then return end

			local base = self:combatTalentMindDamage(t, 40, 460)
			DamageType:get(DamageType.MANABURN).projector(self, px, py, DamageType.MANABURN, base)
		end, nil, {type="slime"})
		game:playSoundNear(self, "talents/heal")
		return true
	end,
	info = function(self, t)
		local base = self:combatTalentMindDamage(t, 40, 460)
		local mana = base
		local vim = base / 2
		local positive = base / 4
		local negative = base / 4

		return ([[Drain %d mana, %d vim, %d positive and negative energies from your target, triggering a chain reaction that explodes in a burst of arcane damage.
		The damage done is equal to 100%% of the mana drained, 200%% of the vim drained, or 400%% of the positive or negative energy drained, whichever is higher.
		The effect will increase with your Mindpower.]]):
		format(mana, vim, positive, negative)
	end,
}
Then I adjusted the values on Mana Burn so that the mana burn damage type players see will be both the Arcane Damage done and the Mana drained.

Code: Select all

newDamageType{
	name = "manaburn", type = "MANABURN",
	projector = function(src, x, y, type, dam)
		local target = game.level.map(x, y, Map.ACTOR)
		if target then
			local mana = dam
			local vim = dam / 2
			local positive = dam / 4
			local negative = dam / 4

			mana = math.min(target:getMana(), mana)
			vim = math.min(target:getVim(), vim)
			positive = math.min(target:getPositive(), positive)
			negative = math.min(target:getNegative(), negative)

			target:incMana(-mana)
			target:incVim(-vim)
			target:incPositive(-positive)
			target:incNegative(-negative)

			local dam = math.max(mana, vim * 2, positive * 4, negative * 4)
			return DamageType:get(DamageType.ARCANE).projector(src, x, y, DamageType.ARCANE, dam)
		end
		return 0
	end,
}

Post Reply