diff --git a/src/js/death.js b/src/js/death.js
new file mode 100644
index 0000000000000000000000000000000000000000..fa243db18c739c200f81e1fb0aced54634d28afd
--- /dev/null
+++ b/src/js/death.js
@@ -0,0 +1,4 @@
+globalThis.planDeath = function(slave, reason) {
+	slave.death = reason;
+	V.slaveDeath = 1;
+};
diff --git a/src/uncategorized/saLongTermEffects.tw b/src/uncategorized/saLongTermEffects.tw
index f5c27a6ae13105a0fd9d1a2c84f73f2d74cf89d7..43cd470162ab551dfdd975450505f499d58425e4 100644
--- a/src/uncategorized/saLongTermEffects.tw
+++ b/src/uncategorized/saLongTermEffects.tw
@@ -6476,19 +6476,16 @@
 			<<set _deathSeed += 200>>
 		<</if>>
 		<<if random(1,1000) > (400+_deathSeed)>>
-			<<set $slaves[$i].death = "health">>
-			<<set $slaveDeath = 1>>
+			<<run planDeath($slaves[$i], "health")>>
 		<</if>>
 		<<if ($slaves[$i].aphrodisiacs > 0 || $slaves[$i].inflationType == "aphrodisiac") && random(1,1000) > (200+_deathSeed)>>
-			<<set $slaves[$i].death = "OD">>
-			<<set $slaveDeath = 1>>
+			<<run planDeath($slaves[$i], "OD")>>
 		<</if>>
 	<</if>>
 	<<if $seeAge == 1>>
 		<<set _deathSeed = (($slaves[$i].health.health*2)-($slaves[$i].physicalAge*2)-($slaves[$i].chem*4)-($slaves[$i].addict*3))>>
 		<<if $slaves[$i].physicalAge >= Math.max((70+($slaves[$i].health.health/5)-($slaves[$i].addict)-($slaves[$i].chem/20)),50) && random(1,1000) > 800+_deathSeed>>
-			<<set $slaves[$i].death = "old">>
-			<<set $slaveDeath = 1>>
+			<<run planDeath($slaves[$i], "old")>>
 		<</if>>
 	<</if>>
 <</if>>