From 2a46d674d6a3b0191ef1356d1127a253e6aa0c16 Mon Sep 17 00:00:00 2001
From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54>
Date: Tue, 12 Oct 2010 23:46:28 +0000
Subject: [PATCH] Two new vaults Improved bonuses from talents in the passive
 combat techniques tree

git-svn-id: http://svn.net-core.org/repos/t-engine4@1511 51575b47-30f0-44d4-a5cc-537603b46e54
---
 game/modules/tome/class/interface/Combat.lua  |  2 +-
 .../tome/data/maps/vaults/lava_island.lua     | 50 +++++++++++++++++++
 game/modules/tome/data/maps/vaults/quiet.lua  | 48 ++++++++++++++++++
 .../modules/tome/data/rooms/greater_vault.lua |  2 +-
 .../talents/techniques/combat-techniques.lua  | 18 +++----
 .../data/talents/techniques/weaponshield.lua  |  2 +-
 game/modules/tome/data/zones/eruan/zone.lua   |  2 +-
 7 files changed, 111 insertions(+), 13 deletions(-)
 create mode 100644 game/modules/tome/data/maps/vaults/lava_island.lua
 create mode 100644 game/modules/tome/data/maps/vaults/quiet.lua

diff --git a/game/modules/tome/class/interface/Combat.lua b/game/modules/tome/class/interface/Combat.lua
index 5b2105ace4..9401a98442 100644
--- a/game/modules/tome/class/interface/Combat.lua
+++ b/game/modules/tome/class/interface/Combat.lua
@@ -343,7 +343,7 @@ function _M:attackTargetWith(target, weapon, damtype, mult)
 	if hitted and not target.dead and target:attr("equilibrium_regen_on_hit") then target:incEquilibrium(-target.equilibrium_regen_on_hit) end
 
 	-- Riposte!
-	if not hitted and not target.dead and not evaded and not target:attr("stunned") and not target:attr("dazed") and not target:attr("stoned") and target:knowTalent(target.T_RIPOSTE) and rng.percent(target:getTalentLevel(target.T_RIPOSTE) * (5 + target:getDex(5)) then
+	if not hitted and not target.dead and not evaded and not target:attr("stunned") and not target:attr("dazed") and not target:attr("stoned") and target:knowTalent(target.T_RIPOSTE) and rng.percent(target:getTalentLevel(target.T_RIPOSTE) * (5 + target:getDex(5))) then
 		game.logSeen(self, "%s ripostes!", target.name:capitalize())
 		target:attackTarget(self, nil, nil, true)
 	end
diff --git a/game/modules/tome/data/maps/vaults/lava_island.lua b/game/modules/tome/data/maps/vaults/lava_island.lua
new file mode 100644
index 0000000000..bfa2c07e8c
--- /dev/null
+++ b/game/modules/tome/data/maps/vaults/lava_island.lua
@@ -0,0 +1,50 @@
+-- ToME - Tales of Middle-Earth
+-- Copyright (C) 2009, 2010 Nicolas Casalini
+--
+-- This program is free software: you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation, either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
+--
+-- Nicolas Casalini "DarkGod"
+-- darkgod@te4.org
+
+setStatusAll{no_teleport=true}
+
+rotates = {"default", "90", "180", "270", "flipx", "flipy"}
+
+defineTile('.', "SAND")
+defineTile('~', "LAVA_FLOOR")
+defineTile('#', "SANDWALL_STABLE")
+defineTile('T', "PALMTREE")
+
+defineTile('1', "SAND", nil, {random_filter={name="fire imp", add_levels=4}})
+defineTile('2', "SAND", nil, {random_filter={name="quasit", add_levels=4}})
+defineTile('U', "SAND", nil, {random_filter={name="uruivellas", add_levels=12}})
+defineTile('$', "SAND", {random_filter={name="mithril ring",ego_chance=100}})
+
+return {
+[[..T............T.TT.]],
+[[T..T..~.........~.TT]],
+[[T.~....~~..1...~....]],
+[[....~.2..~.~.~~.2..T]],
+[[..1..~~~~.~.~~~.....]],
+[[..~~...~~~~~~~..~~..]],
+[[....~..~~####~~~.1..]],
+[[...2.~~~##$U##~~~~..]],
+[[...~~..~~####~~~....]],
+[[.....~~~~~~~~~..1...]],
+[[..2....~..~..~~....T]],
+[[T...~~~.~...2.~.....]],
+[[...~......~....~..1T]],
+[[T.T...1..........~TT]],
+[[TT.TT...........TTTT]],
+}
diff --git a/game/modules/tome/data/maps/vaults/quiet.lua b/game/modules/tome/data/maps/vaults/quiet.lua
new file mode 100644
index 0000000000..ba6ca3a775
--- /dev/null
+++ b/game/modules/tome/data/maps/vaults/quiet.lua
@@ -0,0 +1,48 @@
+-- ToME - Tales of Middle-Earth
+-- Copyright (C) 2009, 2010 Nicolas Casalini
+--
+-- This program is free software: you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation, either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
+--
+-- Nicolas Casalini "DarkGod"
+-- darkgod@te4.org
+
+setStatusAll{no_teleport=true}
+
+startx = 9
+starty = 12
+
+rotates = {"default", "90", "180", "270", "flipx", "flipy"}
+
+defineTile('.', "FLOOR")
+defineTile('X', "HARDWALL")
+defineTile('+', "DOOR")
+
+defineTile('^', "FLOOR", nil, nil, {random_filter={name="summoning alarm"}})
+defineTile('$', "FLOOR", {random_filter={add_levels=5, ego_chance=40}})
+
+return {
+[[XXXXXXXXXXXXXXXXXXX]],
+[[X.....^.$$$.^.....X]],
+[[X.....^.....^.....X]],
+[[X....XX^^^^^XX....X]],
+[[X....XX.....XX....X]],
+[[X....XX.....XX....X]],
+[[X....$X.....X$....X]],
+[[X....XX.....XX....X]],
+[[X....XX.....XX....X]],
+[[X....XX.....XX....X]],
+[[X....^.......^....X]],
+[[X....^.......^....X]],
+[[XXXXXXXXX+XXXXXXXXX]],
+}
diff --git a/game/modules/tome/data/rooms/greater_vault.lua b/game/modules/tome/data/rooms/greater_vault.lua
index 9157c2d6d5..bcafb53cc0 100644
--- a/game/modules/tome/data/rooms/greater_vault.lua
+++ b/game/modules/tome/data/rooms/greater_vault.lua
@@ -19,7 +19,7 @@
 
 local max_w, max_h = 50, 50
 local list = {
-	"double-t", "crypt", "treasure1", "diggers", "hillbert_curve",
+	"double-t", "crypt", "treasure1", "diggers", "hillbert_curve", "quiet",
 }
 
 return function(gen, id, lev, old_lev)
diff --git a/game/modules/tome/data/talents/techniques/combat-techniques.lua b/game/modules/tome/data/talents/techniques/combat-techniques.lua
index 0f838eae3f..0c969df9a4 100644
--- a/game/modules/tome/data/talents/techniques/combat-techniques.lua
+++ b/game/modules/tome/data/talents/techniques/combat-techniques.lua
@@ -136,13 +136,13 @@ newTalent{
 	mode = "passive",
 	points = 5,
 	on_learn = function(self, t)
-		self.stamina_regen = self.stamina_regen + 0.2
+		self.stamina_regen = self.stamina_regen + 0.5
 	end,
 	on_unlearn = function(self, t)
-		self.stamina_regen = self.stamina_regen - 0.2
+		self.stamina_regen = self.stamina_regen - 0.5
 	end,
 	info = function(self, t)
-		return ([[Your combat focus allows you to regenerate stamina faster (+%0.2f stamina/turn).]]):format(self:getTalentLevelRaw(t) / 5)
+		return ([[Your combat focus allows you to regenerate stamina faster (+%0.2f stamina/turn).]]):format(self:getTalentLevelRaw(t) / 2)
 	end,
 }
 
@@ -153,13 +153,13 @@ newTalent{
 	mode = "passive",
 	points = 5,
 	on_learn = function(self, t)
-		self.life_regen = self.life_regen + 0.2
+		self.life_regen = self.life_regen + 1
 	end,
 	on_unlearn = function(self, t)
-		self.life_regen = self.life_regen - 0.2
+		self.life_regen = self.life_regen - 1
 	end,
 	info = function(self, t)
-		return ([[Your combat focus allows you to regenerate life faster (+%0.2f life/turn).]]):format(self:getTalentLevelRaw(t) / 5)
+		return ([[Your combat focus allows you to regenerate life faster (+%0.2f life/turn).]]):format(self:getTalentLevelRaw(t))
 	end,
 }
 
@@ -170,13 +170,13 @@ newTalent{
 	mode = "passive",
 	points = 5,
 	on_learn = function(self, t)
-		self.combat_spellresist = self.combat_spellresist + 4
+		self.combat_spellresist = self.combat_spellresist + 6
 	end,
 	on_unlearn = function(self, t)
-		self.combat_spellresist = self.combat_spellresist - 4
+		self.combat_spellresist = self.combat_spellresist - 6
 	end,
 	info = function(self, t)
-		return ([[Rigorous training allows you to be more resistant to some spell effects. (+%d spell save).]]):format(self:getTalentLevelRaw(t) * 4)
+		return ([[Rigorous training allows you to be more resistant to some spell effects. (+%d spell save).]]):format(self:getTalentLevelRaw(t) * 6)
 	end,
 }
 
diff --git a/game/modules/tome/data/talents/techniques/weaponshield.lua b/game/modules/tome/data/talents/techniques/weaponshield.lua
index c887248b59..5bfda09386 100644
--- a/game/modules/tome/data/talents/techniques/weaponshield.lua
+++ b/game/modules/tome/data/talents/techniques/weaponshield.lua
@@ -68,7 +68,7 @@ newTalent{
 	mode = "passive",
 	points = 5,
 	info = function(self, t)
-		return ([[When you block/avoid a melee blow you have a %d%% chance to get a free, automatic melee attack against your foe. Your chances increase with dexterity.]]):format(self:getTalentLevel(t) * (5 + self:getDex(5))
+		return ([[When you block/avoid a melee blow you have a %d%% chance to get a free, automatic melee attack against your foe. Your chances increase with dexterity.]]):format(self:getTalentLevel(t) * (5 + self:getDex(5)))
 	end,
 }
 
diff --git a/game/modules/tome/data/zones/eruan/zone.lua b/game/modules/tome/data/zones/eruan/zone.lua
index be6b9b79d8..af6663abd7 100644
--- a/game/modules/tome/data/zones/eruan/zone.lua
+++ b/game/modules/tome/data/zones/eruan/zone.lua
@@ -48,7 +48,7 @@ return {
 
 			nb_rooms = {0,0,0,0,1},
 			rooms = {"greater_vault"},
-			greater_vaults_list = {"dragon_lair"},
+			greater_vaults_list = {"dragon_lair", "lava_island"},
 			lite_room_chance = 100,
 		},
 		actor = {
-- 
GitLab