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

All new ideas for the upcoming releases of ToME 4.x.x should be discussed here

Moderator: Moderator

Post Reply
Message
Author
jenx
Sher'Tul Godslayer
Posts: 2263
Joined: Mon Feb 14, 2011 11:16 pm

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

#1 Post 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.
MADNESS rocks

HousePet
Perspiring Physicist
Posts: 6215
Joined: Sun Sep 09, 2012 7:43 am

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

#2 Post by HousePet »

But crossTeirChance isn't defined on the weapon damage, so it has a 0% chance of happening.
My feedback meter decays into coding. Give me feedback and I make mods.

jenx
Sher'Tul Godslayer
Posts: 2263
Joined: Mon Feb 14, 2011 11:16 pm

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

#3 Post by jenx »

ah yes - my mistake. That's good to know!
MADNESS rocks

Post Reply