diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua index 290156ef4e926a2cde797442fc4fb8a6d4c1b7d4..1f6508d6a095cfdca5d3c43126359c030b17fb37 100644 --- a/game/modules/tome/class/Game.lua +++ b/game/modules/tome/class/Game.lua @@ -325,7 +325,12 @@ function _M:loaded() -- Increases zone level for higher difficulties if not zone.__applied_difficulty then zone.__applied_difficulty = true - if self.difficulty == self.DIFFICULTY_INSANE then + if self.difficulty == self.DIFFICULTY_NIGHTMARE then + zone.base_level_range = table.clone(zone.level_range, true) + zone.specific_base_level.object = -10 -zone.level_range[1] + zone.level_range[1] = zone.level_range[1] * 1.2 + 10 + zone.level_range[2] = zone.level_range[2] * 1.2 + 10 + elseif self.difficulty == self.DIFFICULTY_INSANE then zone.base_level_range = table.clone(zone.level_range, true) zone.specific_base_level.object = -10 -zone.level_range[1] zone.level_range[1] = zone.level_range[1] * 2 + 10 diff --git a/game/modules/tome/class/GameState.lua b/game/modules/tome/class/GameState.lua index c4045864b5c5de83df4545bd1bcd59d08cf10a2e..25b67014c0a494b6a97e394ddc047b74fc849ffd 100644 --- a/game/modules/tome/class/GameState.lua +++ b/game/modules/tome/class/GameState.lua @@ -144,7 +144,11 @@ function _M:zoneCheckBackupGuardian() if self.allow_backup_guardians[game.zone.short_name] then local data = self.allow_backup_guardians[game.zone.short_name] game.zone.base_level = data.new_level - if game.difficulty == game.DIFFICULTY_INSANE then + if game.difficulty == game.DIFFICULTY_NIGHTMARE then + game.zone.base_level_range = table.clone(game.zone.level_range, true) + game.zone.specific_base_level.object = -10 -game.zone.base_level + game.zone.base_level = game.zone.base_level * 1.2 + 10 + elseif game.difficulty == game.DIFFICULTY_INSANE then game.zone.base_level_range = table.clone(game.zone.level_range, true) game.zone.specific_base_level.object = -10 -game.zone.base_level game.zone.base_level = game.zone.base_level * 2 + 10 diff --git a/game/modules/tome/class/NPC.lua b/game/modules/tome/class/NPC.lua index 130279e8b7334a74a7a10e2383b6c1e340a3b38f..188dcb5dfe980c34d5131dec215075e81203ea35 100644 --- a/game/modules/tome/class/NPC.lua +++ b/game/modules/tome/class/NPC.lua @@ -336,7 +336,12 @@ end --- Call when added to a level -- Used to make escorts and such function _M:addedToLevel(level, x, y) - if game.difficulty == game.DIFFICULTY_INSANE and not game.party:hasMember(self) then + if game.difficulty == game.DIFFICULTY_NIGHTMARE and not game.party:hasMember(self) then + -- Increase talent level + for tid, lev in pairs(self.talents) do + self:learnTalent(tid, true, math.ceil(lev / 2)) + end + elseif game.difficulty == game.DIFFICULTY_INSANE and not game.party:hasMember(self) then -- Increase talent level for tid, lev in pairs(self.talents) do self:learnTalent(tid, true, lev) diff --git a/game/modules/tome/data/birth/descriptors.lua b/game/modules/tome/data/birth/descriptors.lua index 743d3cfaa4f49298405e1f87d2e78c594798db7b..b8f2b42ebea7af7b675d22b171d670bde0badbed 100644 --- a/game/modules/tome/data/birth/descriptors.lua +++ b/game/modules/tome/data/birth/descriptors.lua @@ -162,7 +162,7 @@ newBirthDescriptor{ selection_default = true, desc = { - "#GOLD##{bold}#Adventure mode#WHITE##{normal}#", + "#GOLD##{bold}#Normal mode#WHITE##{normal}#", "Provides the normal level of chalenges.", }, descriptor_choices = @@ -174,13 +174,34 @@ newBirthDescriptor{ __game_difficulty = 2, }, } +newBirthDescriptor{ + type = "difficulty", + name = "Nightmare", + desc = + { + "#GOLD##{bold}#Nightmare mode#WHITE##{normal}#", + "Unfair game setting", + "All zone levels increased by 20% + 10", + "All creatures talent levels increased by 50%", + }, + descriptor_choices = + { + race = { ["Tutorial Human"] = "forbid", }, + class = { ["Tutorial Adventurer"] = "forbid", }, + }, + copy = { + __game_difficulty = 3, + }, +} newBirthDescriptor{ type = "difficulty", name = "Insane", + locked = function() return profile.mod.allow_build.difficulty_insane end, + locked_desc = "Easy is for the weak! Normal is for the weak! Nightmare is too easy! Bring on the true pain!", desc = { "#GOLD##{bold}#Insane mode#WHITE##{normal}#", - "Absolutely unfair game setting", + "Absolutely unfair game setting, you are really mentally ill to play this mode!", "All zone levels increased by 100% + 10", "All creatures talent levels increased by 100%", "Player rank is normal instead of elite", diff --git a/game/modules/tome/data/quests/high-peak.lua b/game/modules/tome/data/quests/high-peak.lua index 22aff439b5da1f1e6b29959a90da70a3fbfabe84..1441c3899464ea7153b0005cb755afcdfb7f0c95 100644 --- a/game/modules/tome/data/quests/high-peak.lua +++ b/game/modules/tome/data/quests/high-peak.lua @@ -122,6 +122,7 @@ function win(self, how) end game:setAllowedBuild("adventurer", true) + if game.difficulty == game.DIFFICULTY_NIGHTMARE then game:setAllowedBuild("difficulty_insane", true) end local p = game:getPlayer(true) p.winner = how diff --git a/game/modules/tome/data/talents/spells/enhancement.lua b/game/modules/tome/data/talents/spells/enhancement.lua index d34bb27dcfed984134dd8c292327772cc1d93ceb..d476c558a36b2d37774ad012d21106b71d431505 100644 --- a/game/modules/tome/data/talents/spells/enhancement.lua +++ b/game/modules/tome/data/talents/spells/enhancement.lua @@ -104,7 +104,7 @@ newTalent{ info = function(self, t) local icedamage = t.getIceDamage(self, t) local icedamageinc = t.getIceDamageIncrease(self, t) - return ([[Engulfs your hands (and weapons) in a sheath of lightnings, dealing %d lightning damage per melee attack and increasing all lightning damage by %d%%. + return ([[Engulfs your hands (and weapons) in a sheath of lightnings, dealing %d lightning damage with a chance to daze per melee attack and increasing all lightning damage by %d%%. Each hit will also regenerate %0.2f mana. The effects will increase with your Spellpower.]]): format(damDesc(self, DamageType.LIGHTNING, icedamage), icedamageinc, self:getTalentLevel(t) / 3) diff --git a/game/modules/tome/data/texts/unlock-difficulty_insane.lua b/game/modules/tome/data/texts/unlock-difficulty_insane.lua new file mode 100644 index 0000000000000000000000000000000000000000..73326d29a64262c75c64ef5f513f1e748400663c --- /dev/null +++ b/game/modules/tome/data/texts/unlock-difficulty_insane.lua @@ -0,0 +1,33 @@ +-- ToME - Tales of Maj'Eyal +-- Copyright (C) 2009, 2010, 2011 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 + +return "New game difficulty mode: #LIGHT_GREEN#Insane", +[[You won the game on Nightmare mode, you are a big tought player. +You thought you had seen it all, done it all... + +But no! If nightmare mode couldnt bring you down, Insane mode will! + +Insane features:#YELLOW# +- all zone levels increased by 100% + 10 +- all creatures talent levels increased by 100% +- player rank is normal instead of elite +- player can earn Insane version of achievements if also playing in Roguelike permadeath mode. + +#WHITE#May you suffer many fun and unfair deaths! +]] diff --git a/game/modules/tome/data/zones/golem-graveyard/grids.lua b/game/modules/tome/data/zones/golem-graveyard/grids.lua index 55aba640d2d7b6285d42971931c5a92b82099321..01f5d0c8274f4ab482c73f1e7b75ecc4f8ad0756 100644 --- a/game/modules/tome/data/zones/golem-graveyard/grids.lua +++ b/game/modules/tome/data/zones/golem-graveyard/grids.lua @@ -39,7 +39,9 @@ Someone foolish has tried to reconstruct it, but it seems like it misses an eye if eye then require("engine.ui.Dialog"):yesnoPopup("Atamathon", "It seems that your "..eye:getName{do_color=true}.." is made to fit inside the empty eye socket of Atamathon. This is probably very unwise.", function(ret) if not ret then return end - if game.difficulty == game.DIFFICULTY_INSANE then + if game.difficulty == game.DIFFICULTY_NIGHTMARE then + game.zone.base_level = 50 * 1.2 + 10 + elseif game.difficulty == game.DIFFICULTY_INSANE then game.zone.base_level = 50 * 2 + 10 else game.zone.base_level = 50