Display number of times monster killed in tooltip

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

Moderator: Moderator

Post Reply
Message
Author
Shoob
Reaper
Posts: 1535
Joined: Mon Jan 22, 2007 6:31 pm
Location: East of the sun, west of the moon

Display number of times monster killed in tooltip

#1 Post by Shoob »

New NPC.lua tooltip function

Code: Select all

function _M:tooltip(x, y, seen_by)
	local str = mod.class.Actor.tooltip(self, x, y, seen_by)
	if not str then return end
	local killed = (game.player.all_kills[self.name] or 0)

	return str..([[
Killed: %d

Target: %s
UID: %d]]):format(
	killed,
	self.ai_target.actor and self.ai_target.actor.name or "none",
	self.uid)
end
Oliphant am I, and I never lie.

darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Display number of times monster killed in tooltip

#2 Post by darkgod »

Good idea, done
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

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

Re: Display number of times monster killed in tooltip

#3 Post by Final Master »

I like this very much.
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: Display number of times monster killed in tooltip

#4 Post by yufra »

There should be a newline character in front of the "Killed by you"... it currently is tacked onto the last effect.
<DarkGod> lets say it's intended

Post Reply