Damage types

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

Moderator: Moderator

Post Reply
Message
Author
Final Master
Sher'Tul
Posts: 1022
Joined: Fri May 21, 2010 8:16 pm
Location: Inside the minds of all
Contact:

Damage types

#1 Post by Final Master »

During talk on IRC about various things, the need/usefulness of a random blind damage type came up. Edge coded this up in a jiffy.

Code: Select all

newDamageType{
	name = "Random Blind", type = "RANDOM_BLIND",
	projector = function(src, x, y, type, dam)
		local target = game.level.map(x, y, Map.ACTOR)
		if target and rng.percent(10) then
			if target:checkHit(src:combatAttackDex(), target:combatPhysicalResist(), 0, 95, 15) and target:canBe("blind") then
				target:setEffect(target.EFF_BLINDED, 4, {})
			else
				game.logSeen(target, "%s resists!", target.name:capitalize())
			end
		end
	end,
}
I would recommend any further damage type changes/ideas to be posted here with code.
Final Master's Character Guides
Final Master's Guide to the Arena
Edge: Final Master... official Tome 4 (thread) necromancer.
Zonk: I'd rather be sick than on fire! :D

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: Damage types

#2 Post by yufra »

You should change the duration of the effect (currently 4) to use the "dam" argument passed in to be more flexible. Actually, just take a closer look at the RANDOM_CONFUSION damage type and change the EFF_CONFUSED to EFF_BLINDED.
<DarkGod> lets say it's intended

Post Reply