diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua index 5a02966ecfb0d810d1589fe3fc41c142282b4246..290156ef4e926a2cde797442fc4fb8a6d4c1b7d4 100644 --- a/game/modules/tome/class/Game.lua +++ b/game/modules/tome/class/Game.lua @@ -1880,6 +1880,8 @@ function _M:setAllowedBuild(what, notify) if notify then self.state:checkDonation() -- They gained someting nice, they could be more receptive self:registerDialog(require("mod.dialogs.UnlockDialog").new(what)) + + if type(unlocks_list[what]) == "string" then self.party.on_death_show_achieved[#self.party.on_death_show_achieved+1] = "Unlocked: "..unlocks_list[what] end end return true @@ -1926,55 +1928,56 @@ function _M:placeRandomLoreObject(define, zone) end end ---- Returns the current number of birth unlocks and the max -function _M:countBirthUnlocks() - local nb = 0 - local max = 0 - local list = { - birth_transmo_chest = true, - birth_zigur_sacrifice = true, +unlocks_list = { + birth_transmo_chest = "Birth option: Transmogrification Chest", + birth_zigur_sacrifice = "Birth option: Zigur sacrifice", - campaign_infinite_dungeon = true, - campaign_arena = true, + campaign_infinite_dungeon = "Campaign: Infinite Dungeon", + campaign_arena = "Campaign: The Arena", - undead_ghoul = true, - undead_skeleton = true, - yeek = true, + undead_ghoul = "Race: Ghoul", + undead_skeleton = "Race: Skeleton", + yeek = "Race: Yeek", - mage = true, - mage_tempest = true, - mage_geomancer = true, - mage_pyromancer = true, - mage_cryomancer = true, - mage_necromancer = true, + mage = "Class: Archmage", + mage_tempest = "Class tree: Storm", + mage_geomancer = "Class tree: Stone", + mage_pyromancer = "Class tree: Wildfire", + mage_cryomancer = "Class tree: uttercold", + mage_necromancer = "Class: Necromancer", - rogue_marauder = true, - rogue_poisons = true, + rogue_marauder = "Class: Marauder", + rogue_poisons = "Class tree: Poisons", - divine_anorithil = true, - divine_sun_paladin = true, + divine_anorithil = "Class: Anorithil", + divine_sun_paladin = "Class: Sun Paladin", - wilder_wyrmic = true, - wilder_summoner = true, + wilder_wyrmic = "Class: Wyrmic", + wilder_summoner = "Class: Summoner", - corrupter_reaver = true, - corrupter_corruptor = true, + corrupter_reaver = "Class: Reaver", + corrupter_corruptor = "Class: Corruptor", - afflicted_cursed = true, - afflicted_doomed = true, + afflicted_cursed = "Class: Cursed", + afflicted_doomed = "Class: Doomed", - chronomancer_temporal_warden = true, - chronomancer_paradox_mage = true, + chronomancer_temporal_warden = "Class: Temporal Warden", + chronomancer_paradox_mage = "Class: Paradox Mage", - psionic_mindslayer = true, - psionic_solipsist = true, + psionic_mindslayer = "Class: Mindslayer", + psionic_solipsist = "Class: Solipsist", - warrior_brawler = true, + warrior_brawler = "Class: Brawler", - adventurer = true, - } + adventurer = "Class: Adventurer", +} + +--- Returns the current number of birth unlocks and the max +function _M:countBirthUnlocks() + local nb = 0 + local max = 0 - for name, _ in pairs(list) do + for name, _ in pairs(self.unlocks_list) do max = max + 1 if profile.mod.allow_build[name] then nb = nb + 1 end end diff --git a/game/modules/tome/class/Object.lua b/game/modules/tome/class/Object.lua index 6be99c1a11656bcf4b85f3dff68cd2ea7583bbde..ac97cdfb99ce3dd38c10b9c9bb4aaadc71ecb496 100644 --- a/game/modules/tome/class/Object.lua +++ b/game/modules/tome/class/Object.lua @@ -1044,7 +1044,7 @@ function _M:getTextualDesc(compare_with) compare_unarmed[i] = compare_with[i].wielder or {} end - if (w and w.combat or can_combat_unarmed) and game.player:knowTalent(game.player.T_EMPTY_HAND) then + if (w and w.combat or can_combat_unarmed) and (game.player:knowTalent(game.player.T_EMPTY_HAND) or game.player:attr("show_gloves_combat")) then desc:add({"color","YELLOW"}, "When used to modify unarmed attacks:", {"color", "LAST"}, true) compare_tab = { dam=1, atk=1, apr=0, physcrit=0, physspeed =0.6, dammod={str=1}, damrange=1.1 } desc_combat(w, compare_unarmed, "combat", compare_tab) diff --git a/game/modules/tome/class/Party.lua b/game/modules/tome/class/Party.lua index 14fc503946874b5b5fb541c806d6a055590cb20e..1aab983223f21d2cb059d29ee9843853e17f806c 100644 --- a/game/modules/tome/class/Party.lua +++ b/game/modules/tome/class/Party.lua @@ -38,6 +38,7 @@ function _M:init(t, no_default) self.members = {} self.m_list = {} self.energy = {value = 0, mod=100000} -- "Act" every tick + self.on_death_show_achieved = {} end function _M:addMember(actor, def) diff --git a/game/modules/tome/class/World.lua b/game/modules/tome/class/World.lua index 5261f0aabc0ddc3963d09d925ef6a519dc014130..e1b52c6c6028608191dfc3a298294f2c7bbc7dfc 100644 --- a/game/modules/tome/class/World.lua +++ b/game/modules/tome/class/World.lua @@ -57,5 +57,8 @@ function _M:gainAchievement(id, src, ...) if game.permadeath == game.PERMADEATH_INFINITE then id = "EXPLORATION_"..id end if game.difficulty == game.DIFFICULTY_INSANE and game.permadeath == game.PERMADEATH_ONE then id = "INSANE_"..id end + local knew = self.achieved[id] + mod.class.interface.WorldAchievements.gainAchievement(self, id, src, ...) + if not knew and self.achieved[id] then game.party.on_death_show_achieved[#game.party.on_death_show_achieved+1] = "Gained new achievement: "..a.name end end diff --git a/game/modules/tome/data/general/objects/world-artifacts.lua b/game/modules/tome/data/general/objects/world-artifacts.lua index b05a88ecdeadf3cb6c5163c1226f7f6e15c09a53..c30e76e4268ce425f67a30fa6ae91dc56fd0556e 100644 --- a/game/modules/tome/data/general/objects/world-artifacts.lua +++ b/game/modules/tome/data/general/objects/world-artifacts.lua @@ -4782,8 +4782,8 @@ newEntity{ base = "BASE_SHIELD", --Thanks SageAcrin! local burst = {type="cone", range=0, radius=4, force_target=target, selffire=false,} who:project(burst, target.x, target.y, engine.DamageType.COLD, 30) - game.level.map:particleEmitter(target.x, target.y, burst.radius, "breath_ice", {radius=burst.radius, tx=target.x-who.x, ty=target.y-who.y}) - game.logSeen(who, "A burst of chilling water launches from your shield to %s!", who.name:capitalize()) + game.level.map:particleEmitter(target.x, target.y, burst.radius, "breath_cold", {radius=burst.radius, tx=target.x-who.x, ty=target.y-who.y}) + game.logSeen(who, "A burst of chilling water launches from %s's shield to %s!", who.name:capitalize(), target.name:capitalize()) end end, } diff --git a/game/modules/tome/data/talents/uber/str.lua b/game/modules/tome/data/talents/uber/str.lua index 8c47d7e5d432a8df9775f646a9c0884f1a73a950..97a13ef07d6f9a066dfaf5930a7ef267bc812477 100644 --- a/game/modules/tome/data/talents/uber/str.lua +++ b/game/modules/tome/data/talents/uber/str.lua @@ -22,9 +22,11 @@ uberTalent{ mode = "passive", on_learn = function(self, t) self:attr("unharmed_attack_on_hit", 1) + self:attr("show_gloves_combat", 1) end, on_unlearn = function(self, t) self:attr("unharmed_attack_on_hit", -1) + self:attr("show_gloves_combat", -1) end, info = function(self, t) return ([[Each time you make a melee attack you have 100%% chances to do an additional unarmed strike, if using weapons and 60%% chances if already fighting unarmed.]]) diff --git a/game/modules/tome/dialogs/DeathDialog.lua b/game/modules/tome/dialogs/DeathDialog.lua index 318d12fbb55748c38222c705c6ebb5ff828cb108..2b1dcf71c5f9685ebf6e6f0f50a065922ffca366 100644 --- a/game/modules/tome/dialogs/DeathDialog.lua +++ b/game/modules/tome/dialogs/DeathDialog.lua @@ -37,10 +37,16 @@ function _M:init(actor) if self.dont_show then return end if not config.settings.cheat then game:saveGame() end - self.c_desc = Textzone.new{width=self.iw, auto_height=true, text=[[You have #LIGHT_RED#died#LAST#! + local text = [[You have #LIGHT_RED#died#LAST#! Death in ToME is usually permanent, but if you have a means of resurrection it will be proposed in the menu below. You can dump your character data to a file to remember her/him forever, or you can exit and try once again to survive in the wilds! -]]} +]] + + if #game.party.on_death_show_achieved > 0 then + text = text.."#LIGHT_GREEN#During your game you#WHITE#:\n* "..table.concat(game.party.on_death_show_achieved, "\n* ") + end + + self.c_desc = Textzone.new{width=self.iw, auto_height=true, text=text} self.c_list = List.new{width=self.iw, nb_items=#self.list, list=self.list, fct=function(item) self:use(item) end} self:loadUI{