Page 1 of 1

[b42] remove Mind damage ct effects for bumps and on hits

Posted: Fri Oct 05, 2012 11:23 pm
by jenx
The code for mind damage applies to *ALL* mind damage, so if I put equipment that does 1 mind damage say when I'm hit, every npc has to save (my Mind POwer vs their Mental Save) or suffer brainlocking. Similarly, any weapon that does mind damage.

Code: Select all

newDamageType{
	name = "mind", type = "MIND", text_color = "#YELLOW#",
	projector = function(src, x, y, type, dam)
		local target = game.level.map(x, y, Map.ACTOR)
		if target then
			local mindpower, mentalresist, alwaysHit, crossTierChance
			if _G.type(dam) == "table" then dam, mindpower, mentalresist, alwaysHit, crossTierChance = dam.dam, dam.mindpower, dam.mentalresist, dam.alwaysHit, dam.crossTierChance end
			local hit_power = mindpower or src:combatMindpower()

			if alwaysHit or target:checkHit(hit_power, mentalresist or target:combatMentalResist(), 0, 95, 15) then
				if crossTierChance and rng.percent(crossTierChance) then
					target:crossTierEffect(target.EFF_BRAINLOCKED, src:combatMindpower())
				end
				return DamageType.defaultProjector(src, x, y, type, dam)
			else
				game.logSeen(target, "%s resists the mind attack!", target.name:capitalize())
				return DamageType.defaultProjector(src, x, y, type, dam / 2)
			end
		end
		return 0
	end,
	death_message = {"psyched", "mentally tortured", "mindraped"},
}
No other damage types have this, and it makes mind attacks from equipment for both player and npc too powerful in my view.

My suggestion is that it should be limited to mind damage from talents, such as the many doomed talents.

Re: [b42] remove Mind damage ct effects for bumps and on hit

Posted: Sat Oct 06, 2012 3:02 am
by HousePet
But crossTeirChance isn't defined on the weapon damage, so it has a 0% chance of happening.

Re: [b42] remove Mind damage ct effects for bumps and on hit

Posted: Sat Oct 06, 2012 4:02 am
by jenx
ah yes - my mistake. That's good to know!