make critical hit messages bold

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

Moderator: Moderator

Post Reply
Message
Author
tiger_eye
Perspiring Physicist
Posts: 889
Joined: Thu Feb 17, 2011 5:20 am

make critical hit messages bold

#1 Post by tiger_eye »

Canderel suggested to make critical hit messages be bold. I tried this out, and I agree it looks better. Here is a simple patch to do this:

Code: Select all

Index: game/modules/tome/class/interface/Combat.lua
===================================================================
--- game/modules/tome/class/interface/Combat.lua	(revision 3922)
+++ game/modules/tome/class/interface/Combat.lua	(working copy)
@@ -254,7 +254,7 @@
 			print("[ATTACK] after inc by type", dam)
 		end
 
-		if crit then game.logSeen(self, "%s performs a critical strike!", self.name:capitalize()) end
+		if crit then game.logSeen(self, "#{bold}#%s performs a critical strike!#{normal}#", self.name:capitalize()) end
 		DamageType:get(damtype).projector(self, target.x, target.y, damtype, math.max(0, dam))
 		hitted = true
 	else
@@ -763,7 +763,7 @@
 	if rng.percent(chance) then
 		dam = dam * (1.5 + (self.combat_critical_power or 0) / 100)
 		crit = true
-		game.logSeen(self, "%s's spell attains critical power!", self.name:capitalize())
+		game.logSeen(self, "#{bold}#%s's spell attains critical power!#{normal}#", self.name:capitalize())
 
 		if self:attr("mana_on_crit") then self:incMana(self:attr("mana_on_crit")) end
 
Index: game/modules/tome/class/interface/Archery.lua
===================================================================
--- game/modules/tome/class/interface/Archery.lua	(revision 3922)
+++ game/modules/tome/class/interface/Archery.lua	(working copy)
@@ -151,7 +151,7 @@
 		dam = dam * mult
 		print("[ATTACK ARCHERY] after mult", dam)
 
-		if crit then game.logSeen(self, "%s performs a critical strike!", self.name:capitalize()) end
+		if crit then game.logSeen(self, "#{bold}#%s performs a critical strike!#{normal}#", self.name:capitalize()) end
 		DamageType:get(damtype).projector(self, target.x, target.y, damtype, math.max(0, dam))
 		game.level.map:particleEmitter(target.x, target.y, 1, "archery")
 		hitted = true
Attachments
bold_criticals.txt
(1.73 KiB) Downloaded 105 times

Post Reply