From 21b2d0f52f861a1da326c0c22881022ba5c48b53 Mon Sep 17 00:00:00 2001
From: DarkGod <darkgod@net-core.org>
Date: Mon, 6 Jan 2020 22:50:32 +0100
Subject: [PATCH] Madness mode starts with more gold and HP. But don't worry
 you'll die anyway

---
 game/modules/tome/class/Game.lua             | 6 ++++++
 game/modules/tome/data/birth/descriptors.lua | 3 +++
 2 files changed, 9 insertions(+)

diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua
index 8dad0b8e72..89823d2bbd 100644
--- a/game/modules/tome/class/Game.lua
+++ b/game/modules/tome/class/Game.lua
@@ -236,6 +236,12 @@ function _M:newGame()
 			self.player.__created_in_version = game.__mod_info.version_name..(beta and "-"..beta or "")
 		end
 
+		if self.player.max_life_bonus then
+			self.player.max_life = self.player.max_life + self.player.max_life_bonus
+			self.player.life = self.player.life + self.player.max_life_bonus
+			self.player.max_life_bonus = nil
+		end
+
 		self.player:recomputeGlobalSpeed()
 		self:rebuildCalendar()
 
diff --git a/game/modules/tome/data/birth/descriptors.lua b/game/modules/tome/data/birth/descriptors.lua
index 298b5d1af5..e890ed361d 100644
--- a/game/modules/tome/data/birth/descriptors.lua
+++ b/game/modules/tome/data/birth/descriptors.lua
@@ -278,6 +278,7 @@ newBirthDescriptor{
 		"All enemies have 200% more life",
 		"Rare creatures are far more frequent and random bosses start to appear",
 		"Stairs can not be used for 9 turns after a kill.",
+		"Player starts with 100 more life and 500 gold, but trust us, you'll need it!",
 		"Player is being hunted! Randomly all foes in a radius will get a feeling of where she/he is",
 		"Player can earn Madness version of achievements if also playing in Roguelike or Adventure permadeath mode.",
 	},
@@ -292,6 +293,8 @@ newBirthDescriptor{
 	copy = {
 		instakill_immune = 1,
 		__game_difficulty = 5,
+		money = 500,
+		max_life_bonus = 100,
 	},
 	game_state = {
 		default_random_rare_chance = 3,
-- 
GitLab