From b29e996b183233071c4db1850a1a8b2b2ddfc428 Mon Sep 17 00:00:00 2001
From: DarkGod <darkgod@net-core.org>
Date: Tue, 5 Nov 2019 18:26:17 +0100
Subject: [PATCH] Shadow Senses allows you to always see your own shadows, even
 when blinded

---
 game/modules/tome/class/Actor.lua  | 4 ++++
 game/modules/tome/class/Player.lua | 4 +++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua
index 3d65160294..b8d3c0beff 100644
--- a/game/modules/tome/class/Actor.lua
+++ b/game/modules/tome/class/Actor.lua
@@ -6987,6 +6987,10 @@ function _M:canSeeNoCache(actor, def, def_pct)
 		end
 	end
 
+	if actor.is_doomed_shadow and self:knowTalent(self.T_SHADOW_SENSES) then
+		return true, 100
+	end
+
 	-- Blindness means can't see anything
 	if self:attr("blind") then
 
diff --git a/game/modules/tome/class/Player.lua b/game/modules/tome/class/Player.lua
index 8476cee5a8..da5c50c6f0 100644
--- a/game/modules/tome/class/Player.lua
+++ b/game/modules/tome/class/Player.lua
@@ -631,10 +631,12 @@ function _M:playerFOV()
 		local range = self:getTalentRange(t)
 		local sqsense = range * range
 
-		for shadow, _ in pairs(game.party.members) do if shadow.is_doomed_shadow and not shadow.dead then
+		for shadow, _ in pairs(game.party.members) do if shadow.is_doomed_shadow and not shadow.dead and shadow.x then
 			local arr = shadow.fov.actors_dist
 			local tbl = shadow.fov.actors
 			local act
+			game.level.map:apply(shadow.x, shadow.y, 0.6)
+			game.level.map:applyExtraLite(shadow.x, shadow.y)
 			for i = 1, #arr do
 				act = arr[i]
 				if act and not act.dead and act.x and tbl[act] and shadow:canSee(act) and tbl[act].sqdist <= sqsense then
-- 
GitLab