diff --git a/game/engines/default/engine/PlayerProfile.lua b/game/engines/default/engine/PlayerProfile.lua index b0a811f3435445e1608b506f8b7f0507a3657523..555bf074ae647ceb47a4329820c97ced35fb9308 100644 --- a/game/engines/default/engine/PlayerProfile.lua +++ b/game/engines/default/engine/PlayerProfile.lua @@ -457,7 +457,8 @@ function _M:eventPushCode(e) if not f then -- core.profile.pushOrder("o='GetNews'") else - pcall(f) + local ok, err = pcall(f) + if config.settings.cheat then print(ok, err) end end end diff --git a/game/engines/default/engine/interface/PlayerDumpJSON.lua b/game/engines/default/engine/interface/PlayerDumpJSON.lua index 712b84dfd85320fe2ca4a95cd1eff226cce437c5..54576c01c62b5daf63384be6eaee1fc1965c8e67 100644 --- a/game/engines/default/engine/interface/PlayerDumpJSON.lua +++ b/game/engines/default/engine/interface/PlayerDumpJSON.lua @@ -36,6 +36,7 @@ end --- Call this when a character is saved to upload data to te4.org function _M:saveUUID(do_charball) + if game:isTainted() then return end if not self.__te4_uuid then -- Try to grab an UUID even after char reg if self.allow_late_uuid and not game:isTainted() then self:getUUID() end diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua index af61c96b815d9b7ab15c090f7c797386d5c205ea..5282599487d0962653f094b58d47d666c2715c3b 100644 --- a/game/modules/tome/class/Game.lua +++ b/game/modules/tome/class/Game.lua @@ -1115,9 +1115,22 @@ function _M:setupCommands() end end end end, [{"_g","ctrl"}] = function() if config.settings.cheat then --- for id, _ in pairs(game.party.__ingredients_def) do game.party:collectIngredient(id, rng.range(1, 3)) end - local m = game.zone:makeEntity(game.level, "actor", {random_elite=true}, nil, true) - game.zone:addEntity(game.level, m, "actor", game.player.x,game.player.y-1) + savefile_pipe:ignoreSaveToken(true) + local ep = savefile_pipe:doLoad("reaver", "entity", "engine.CharacterBallSave", "reaver") + savefile_pipe:ignoreSaveToken(false) + for a, _ in pairs(ep.members) do + if a.__CLASSNAME == "mod.class.Player" then + mod.class.NPC.castAs(a) + engine.interface.ActorAI.init(a, a) + a.ai = "tactical" + a.ai_state = {talent_in=1} + a.no_drops = true + a.energy.value = 0 + a.player = nil + a.faction = "enemies" + game.zone:addEntity(game.level, a, "actor", game.player.x, game.player.y-1) + end + end end end, [{"_f","ctrl"}] = function() if config.settings.cheat then self.player.quests["love-melinda"] = nil diff --git a/game/modules/tome/class/Object.lua b/game/modules/tome/class/Object.lua index 586e977e5680d1072cc4085b77e72500e9ec3bf3..df1932a8a3e9a8d0e3aecdb8385f5a02f45eb30e 100644 --- a/game/modules/tome/class/Object.lua +++ b/game/modules/tome/class/Object.lua @@ -292,7 +292,9 @@ function _M:getTextualDesc(compare_with) if self.quest then desc:add({"color", "VIOLET"},"[Plot Item]", {"color", "LAST"}, true) end - desc:add(("Type: %s / %s"):format(rawget(self, 'type') or "unknown", rawget(self, 'subtype') or "unknown"), true) + desc:add(("Type: %s / %s"):format(rawget(self, 'type') or "unknown", rawget(self, 'subtype') or "unknown")) + if self.material_level then desc:add(" ; tier ", tostring(self.material_level)) end + desc:add(true) if self.slot_forbid == "OFFHAND" then desc:add("It must be held with both hands.", true) end desc:add(true) diff --git a/game/modules/tome/class/uiset/Minimalist.lua b/game/modules/tome/class/uiset/Minimalist.lua index 72a8030fefc24d43dff8ee556787d87e091b0f5a..2e7ec9d874f96f0c7f237a42bdc797b91c6571b0 100644 --- a/game/modules/tome/class/uiset/Minimalist.lua +++ b/game/modules/tome/class/uiset/Minimalist.lua @@ -1065,7 +1065,7 @@ function _M:buffOrientStep(orient, bx, by, scale, x, y, w, h) return x, y end -function _M:handleEffect(player, eff_id, e, p, x, y, hs, bx, by, is_first, scale) +function _M:handleEffect(player, eff_id, e, p, x, y, hs, bx, by, is_first, scale, allow_remove) local dur = p.dur + 1 if not self.tbuff[eff_id..":"..dur] then @@ -1078,6 +1078,7 @@ function _M:handleEffect(player, eff_id, e, p, x, y, hs, bx, by, is_first, scale else desc = ("#{bold}##GOLD#%s\n(%s: %s)#WHITE##{normal}#\n"):format(name, e.type, eff_subtype)..e.long_desc(player, p) end + if allow_remove then desc = desc.."\n---\nRight click to cancel early." end local txt = nil if e.decrease > 0 then @@ -1095,6 +1096,13 @@ function _M:handleEffect(player, eff_id, e, p, x, y, hs, bx, by, is_first, scale -- Move handle if not self.locked and bx >= self.mhandle_pos.buffs.x and bx <= self.mhandle_pos.buffs.x + move_handle[6] and by >= self.mhandle_pos.buffs.y and by <= self.mhandle_pos.buffs.y + move_handle[7] then self:uiMoveResize("buffs", button, mx, my, xrel, yrel, bx, by, event) end end + if allow_remove and event == "button" and button == "right" then + Dialog:yesnoPopup(name, "Really cancel "..name.."?", function(ret) + if ret then + player:removeEffect(eff_id) + end + end) + end game.tooltip_x, game.tooltip_y = 1, 1; game:tooltipDisplayAtMap(game.w, game.h, desc) end @@ -1176,13 +1184,13 @@ function _M:displayBuffs(scale, bx, by) for eff_id, p in pairs(good_e) do local e = player.tempeffect_def[eff_id] - self:handleEffect(player, eff_id, e, p, x, y, hs, bx, by, is_first, scale) + self:handleEffect(player, eff_id, e, p, x, y, hs, bx, by, is_first, scale, true) is_first = false x, y = self:buffOrientStep(orient, bx, by, scale, x, y, hs, hs) end for eff_id, p in pairs(bad_e) do local e = player.tempeffect_def[eff_id] - self:handleEffect(player, eff_id, e, p, x, y, hs, bx, by, is_first, scale) + self:handleEffect(player, eff_id, e, p, x, y, hs, bx, by, is_first, scale, false) is_first = false x, y = self:buffOrientStep(orient, bx, by, scale, x, y, hs, hs) end diff --git a/game/modules/tome/data/general/objects/world-artifacts.lua b/game/modules/tome/data/general/objects/world-artifacts.lua index b209db671ff26369a4c533d438257e1886015ed5..446261e349a8631c3c65c2ef60995f01d9153d6d 100644 --- a/game/modules/tome/data/general/objects/world-artifacts.lua +++ b/game/modules/tome/data/general/objects/world-artifacts.lua @@ -1767,6 +1767,34 @@ newEntity{ base = "BASE_LEATHER_BELT", }, } +newEntity{ base = "BASE_LEATHER_BELT", + power_source = {arcane=true}, + unique = true, + name = "Nienna's Memory", image = "object/artifact/belt_girdle_of_preservation.png", + unided_name = "crackling belt", + desc = [[Ages ago this belt was worn by Linaniil herself in her youth, using its power she shielded herself from the Spellblaze rain of fire, but naught could she do for your sister Nienna.]], + color = colors.GOLD, + level_range = {20, 30}, + rarity = 200, + cost = 450, + material_level = 3, + wielder = { + inc_stats = { [Stats.STAT_CUN] = 2, [Stats.STAT_WIL] = 5, }, + confusion_immune = 0.3, + stun_immune = 0.3, + mana_on_crit = 3, + }, + max_power = 20, power_regen = 1, + use_power = { name = "generate a personnal shield", power = 20, + use = function(self, who) + who:setEffect(who.EFF_DAMAGE_SHIELD, 10, {power=100 + self:getMag(250)}) + game:playSoundNear(who, "talents/arcane") + game.logSeen(who, "%s invokes the memory of Nienna!", who.name:capitalize()) + return {id=true, used=true} + end + }, +} + newEntity{ base = "BASE_LEATHER_BELT", power_source = {nature=true}, unique = true, diff --git a/ideas/lost-land-poosh.lua b/ideas/lost-land-poosh.lua index 2cda50e006a04ca7aea9944661e95308c952217f..f122e78390070ffd7daae4c8b9a24750f64bba2d 100644 --- a/ideas/lost-land-poosh.lua +++ b/ideas/lost-land-poosh.lua @@ -166,6 +166,6 @@ game:onLevelLoad("wilderness-1", function(wzone, level) game.zone:addEntity(game.level, g, "terrain", x, y) print("Poosh portal added") end) -local msg = "Message from #GOLD#DarkGod#WHITE#: Today we celebrate the 10000 days of total ToME4 playtime! This is over 27 years and a half.\nTo celebrate this you should find on your worldmap a new portal to the lost land of Poosh where you will see some new creatures and might find a useful item too!\nThank you all and have great fun!\n\nPS: Oh and do not forget to vote for ToME4 on http://te4.org/vote ! :)\n\nPS2: If you liked this special event, please say so in the forums I may do more later!" +local msg = "Message from #GOLD#DarkGod#WHITE#: Today we celebrate hum .. something. Well I just wanted to give an other round of the fabled .... LOST LAND OF POOSH! Enjoy!" game.log(msg) -require("engine.ui.Dialog"):simpleLongPopup("10000 days played!", msg, 500) +require("engine.ui.Dialog"):simpleLongPopup("Poosh?!", msg, 500) diff --git a/ideas/todo b/ideas/todo index 4d48d3abf9527aba44ec3f7d64ee2474b80b76d5..25c8cdb39707fbd55728b58e53cc7d340dc97429 100644 --- a/ideas/todo +++ b/ideas/todo @@ -2,5 +2,6 @@ * PIC TALENTS AT LVL 45 FOR HIGH STAT, CLASS DEPENDANT * redo shops * make low level more fun -* "automatic" storage of various ingredients, replace alch quest * auto-leveling for beginners/lazy +* md5sum saves & save it online to check local tempering +* donator's fight club