diff --git a/game/engines/default/engine/ui/Base.lua b/game/engines/default/engine/ui/Base.lua index e23b2277fbeb9673e2811ddcfc8d17531377a51e..38c96c84827711e9273b6f033f4057dff6f5698a 100644 --- a/game/engines/default/engine/ui/Base.lua +++ b/game/engines/default/engine/ui/Base.lua @@ -157,3 +157,6 @@ end function _M:setTextShadow(v) self.text_shadow = v end + +function _M:positioned(x, y) +end diff --git a/game/engines/default/engine/ui/Dialog.lua b/game/engines/default/engine/ui/Dialog.lua index 24fa0240fdd24325eed4590853973140f2f427f0..92c67e7e7c5de6f5cac4b37d90ee7edee7ac1441 100644 --- a/game/engines/default/engine/ui/Dialog.lua +++ b/game/engines/default/engine/ui/Dialog.lua @@ -145,8 +145,8 @@ end title_shadow = true -function _M:init(title, w, h, x, y, alpha, font, showup) - self.title = assert(title, "no dialog title") +function _M:init(title, w, h, x, y, alpha, font, showup, skin) + self.title = title self.alpha = self.alpha or 255 if showup ~= nil then self.__showup = showup @@ -154,6 +154,7 @@ function _M:init(title, w, h, x, y, alpha, font, showup) self.__showup = 2 end self.color = self.color or {r=255, g=255, b=255} + if skin then self.ui = skin end local conf = self.ui_conf[self.ui] self.frame = self.frame or { @@ -175,6 +176,7 @@ function _M:init(title, w, h, x, y, alpha, font, showup) self.frame.oy2 = self.frame.oy2 or conf.frame_oy2 self.uis = {} + self.ui_by_ui = {} self.focus_ui = nil self.focus_ui_id = 0 @@ -191,8 +193,13 @@ function _M:resize(w, h, nogen) self.w, self.h = math.floor(w), math.floor(h) self.display_x = math.floor(self.force_x or (gamew - self.w) / 2) self.display_y = math.floor(self.force_y or (gameh - self.h) / 2) - self.ix, self.iy = 5, 8 + 3 + self.font_bold_h - self.iw, self.ih = w - 2 * 5, h - 8 - 8 - 3 - self.font_bold_h + if self.title then + self.ix, self.iy = 5, 8 + 3 + self.font_bold_h + self.iw, self.ih = w - 2 * 5, h - 8 - 8 - 3 - self.font_bold_h + else + self.ix, self.iy = 5, 8 + self.iw, self.ih = w - 2 * 5, h - 8 - 8 + end -- self.display_x = util.bound(self.display_x, 0, game.w - (self.w+self.frame.ox2)) -- self.display_y = util.bound(self.display_y, 0, game.h - (self.h+self.frame.oy2)) @@ -248,6 +255,7 @@ function _M:generate() end function _M:updateTitle(title) + if not title then return end local title = title if type(title)=="function" then title = title() end local tw, th = self.font_bold:size(title) @@ -262,11 +270,13 @@ end function _M:loadUI(t) if not t.no_reset then self.uis = {} + self.ui_by_ui = {} self.focus_ui = nil self.focus_ui_id = 0 end for i, ui in ipairs(t) do self.uis[#self.uis+1] = ui + self.ui_by_ui[ui.ui] = ui if not self.focus_ui and ui.ui.can_focus then self:setFocus(i) @@ -302,7 +312,8 @@ function _M:setupUI(resizex, resizey, on_resize, addmw, addmh) mw = mw + addw + 5 * 2 + (addmw or 0) -- print("===", mw, addw) - local tw, th = self.font_bold:size(self.title) + local tw, th = 0, 0 + if self.title then tw, th = self.font_bold:size(self.title) end mw = math.max(tw + 6, mw) mh = mh + addh + 5 + 22 + 3 + (addmh or 0) + th @@ -320,13 +331,27 @@ function _M:setupUI(resizex, resizey, on_resize, addmw, addmh) if not ui.absolute then ux, uy = self.ix, self.iy - if ui.top then uy = uy + ui.top - elseif ui.bottom then uy = uy + self.ih - ui.bottom - ui.ui.h - elseif ui.vcenter then uy = uy + math.floor(self.ih / 2) + ui.vcenter - ui.ui.h / 2 end + if ui.top then + if type(ui.top) == "table" then ui.top = self.ui_by_ui[ui.top].y end + uy = uy + ui.top + elseif ui.bottom then + if type(ui.bottom) == "table" then ui.bottom = self.ui_by_ui[ui.bottom].y end + uy = uy + self.ih - ui.bottom - ui.ui.h + elseif ui.vcenter then + if type(ui.vcenter) == "table" then ui.vcenter = self.ui_by_ui[ui.vcenter].y + ui.vcenter.h end + uy = uy + math.floor(self.ih / 2) + ui.vcenter - ui.ui.h / 2 + end - if ui.left then ux = ux + ui.left - elseif ui.right then ux = ux + self.iw - ui.right - ui.ui.w - elseif ui.hcenter then ux = ux + math.floor(self.iw / 2) + ui.hcenter - ui.ui.w / 2 end + if ui.left then + if type(ui.left) == "table" then ui.left = self.ui_by_ui[ui.left].x + ui.left.w end + ux = ux + ui.left + elseif ui.right then + if type(ui.right) == "table" then ui.right = self.ui_by_ui[ui.right].x end + ux = ux + self.iw - ui.right - ui.ui.w + elseif ui.hcenter then + if type(ui.hcenter) == "table" then ui.hcenter = self.ui_by_ui[ui.hcenter].x + ui.hcenter.w end + ux = ux + math.floor(self.iw / 2) + ui.hcenter - ui.ui.w / 2 + end else ux, uy = 0, 0 @@ -346,6 +371,7 @@ function _M:setupUI(resizex, resizey, on_resize, addmw, addmh) ui.y = uy ui.ui.mouse.delegate_offset_x = ux ui.ui.mouse.delegate_offset_y = uy + ui.ui:positioned(ux, uy, self.display_x + ux, self.display_y + uy) end self.setuped = true @@ -394,6 +420,11 @@ function _M:getUIElement(id) return self.uis[id] end +function _M:toggleDisplay(ui, show) + if not self.ui_by_ui[ui] then return end + self.ui_by_ui[ui].hidden = not show +end + function _M:moveFocus(v) local id = self.focus_ui_id local start = id or 1 @@ -514,13 +545,15 @@ function _M:toScreen(x, y, nb_keyframes) self:drawFrame(x, y, 1, 1, 1, self.frame.a) -- Title - if self.title_shadow then self.title_tex[1]:toScreenFull(x + (self.w - self.title_tex.w) / 2 + 3, y + 3, self.title_tex.w, self.title_tex.h, self.title_tex[2], self.title_tex[3], 0, 0, 0, 0.5) end - self.title_tex[1]:toScreenFull(x + (self.w - self.title_tex.w) / 2, y, self.title_tex.w, self.title_tex.h, self.title_tex[2], self.title_tex[3]) + if self.title then + if self.title_shadow then self.title_tex[1]:toScreenFull(x + (self.w - self.title_tex.w) / 2 + 3, y + 3, self.title_tex.w, self.title_tex.h, self.title_tex[2], self.title_tex[3], 0, 0, 0, 0.5) end + self.title_tex[1]:toScreenFull(x + (self.w - self.title_tex.w) / 2, y, self.title_tex.w, self.title_tex.h, self.title_tex[2], self.title_tex[3]) + end -- UI elements for i = 1, #self.uis do local ui = self.uis[i] - ui.ui:display(x + ui.x, y + ui.y, nb_keyframes, ox + ui.x, oy + ui.y) + if not ui.hidden then ui.ui:display(x + ui.x, y + ui.y, nb_keyframes, ox + ui.x, oy + ui.y) end end self:innerDisplay(x, y, nb_keyframes) diff --git a/game/engines/default/engine/ui/Dropdown.lua b/game/engines/default/engine/ui/Dropdown.lua new file mode 100644 index 0000000000000000000000000000000000000000..2982985e5c2d8fb5ec56b3bf038532028663bda5 --- /dev/null +++ b/game/engines/default/engine/ui/Dropdown.lua @@ -0,0 +1,96 @@ +-- TE4 - T-Engine 4 +-- 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 + +require "engine.class" +local Base = require "engine.ui.Base" +local Focusable = require "engine.ui.Focusable" +local List = require "engine.ui.List" +local Dialog = require "engine.ui.Dialog" + +--- A generic UI list dropdown box +module(..., package.seeall, class.inherit(Base, Focusable)) + +function _M:init(t) + self.text = t.text or "" + self.w = assert(t.width, "no dropdown width") + self.fct = assert(t.fct, "no dropdown fct") + self.list = assert(t.list, "no dropdown list") + self.nb_items = assert(t.nb_items, "no dropdown nb_items") + self.on_select = t.on_select + self.display_prop = t.display_prop or "name" + self.scrollbar = t.scrollbar + + Base.init(self, t) +end + +function _M:generate() + self.mouse:reset() + self.key:reset() + + -- Draw UI + self.h = self.font_h + 6 + self.height = self.h + + self.frame = self:makeFrame("ui/textbox", self.w, self.h) + self.frame_sel = self:makeFrame("ui/textbox-sel", self.w, self.h) + + -- Add UI controls + self.mouse:registerZone(0, 0, self.w, self.h, function(button, x, y, xrel, yrel, bx, by, event) + if event == "button" and button == "left" then self:showSelect() end + end) + self.key:addBind("ACCEPT", function() self:showSelect() end) +end + +function _M:positioned(x, y, sx, sy) + self.c_list = List.new{width=self.w, list=self.list, select=self.on_select, display_prop=self.display_prop, scrollbar=self.scrollbar, nb_items=self.nb_items, fct=function() + game:unregisterDialog(self.popup) + self.fct(self.c_list.list[self.c_list.sel]) + end} + self.popup = Dialog.new(nil, self.w, self.c_list.h, sx, sy + self.h, nil, nil, false, "simple") + self.popup.frame.a = 0.7 + self.popup:loadUI{{left=0, top=0, ui=self.c_list}} + self.popup:setupUI(true, true) + self.popup.key:addBind("EXIT", function() + game:unregisterDialog(self.popup) + self.c_list.sel = self.previous + self.fct(self.c_list.list[self.c_list.sel]) + end) +end + +function _M:showSelect() + self.previous = self.c_list.sel + game:registerDialog(self.popup) +end + +function _M:display(x, y, nb_keyframes) + if self.focused then + self:drawFrame(self.frame_sel, x, y) + else + self:drawFrame(self.frame, x, y) + if self.focus_decay then + self:drawFrame(self.frame_sel, x, y, 1, 1, 1, self.focus_decay / self.focus_decay_max_d) + self.focus_decay = self.focus_decay - nb_keyframes + if self.focus_decay <= 0 then self.focus_decay = nil end + end + end + + local item = self.c_list.list[self.c_list.sel] + if self.text_shadow then item._tex[1]:toScreenFull(x+1 + self.frame_sel.b4.w, y+1, self.c_list.fw, self.c_list.fh, item._tex[2], item._tex[3], 0, 0, 0, self.text_shadow) end + item._tex[1]:toScreenFull(x + self.frame_sel.b4.w, y, self.c_list.fw, self.c_list.fh, item._tex[2], item._tex[3]) +end diff --git a/game/engines/default/engine/ui/Textbox.lua b/game/engines/default/engine/ui/Textbox.lua index 9947f0dccf7c192f03d0a4ed9e7097956bb6ee78..20fbe9e845f9e65d8a3efc149a6f75516c95aa88 100644 --- a/game/engines/default/engine/ui/Textbox.lua +++ b/game/engines/default/engine/ui/Textbox.lua @@ -27,7 +27,9 @@ module(..., package.seeall, class.inherit(Base, Focusable)) function _M:init(t) self.title = assert(t.title, "no textbox title") self.text = t.text or "" + self.old_text = self.text self.hide = t.hide + self.on_change = t.on_change self.max_len = t.max_len or 999 self.fct = assert(t.fct, "no textbox fct") self.chars = assert(t.chars, "no textbox chars") @@ -82,7 +84,8 @@ function _M:generate() end end) self.key:addBind("ACCEPT", function() self.fct(self.text) end) - self.key:addIgnore("_ESCAPE", v) + self.key:addIgnore("_ESCAPE", true) + self.key:addIgnore("_TAV", true) self.key:addCommands{ _LEFT = function() self.cursor = util.bound(self.cursor - 1, 1, #self.tmp+1) self.scroll = util.scroll(self.cursor, self.scroll, self.max_display) self:updateText() end, _RIGHT = function() self.cursor = util.bound(self.cursor + 1, 1, #self.tmp+1) self.scroll = util.scroll(self.cursor, self.scroll, self.max_display) self:updateText() end, @@ -135,6 +138,8 @@ function _M:updateText() self.text_surf:erase(0, 0, 0, 0) self.text_surf:drawStringBlended(self.font_mono, text, 0, 0, 255, 255, 255, true) self.text_surf:updateTexture(self.text_tex) + if self.on_change and self.old_text ~= self.text then self.on_change(self.text) end + self.old_text = self.text end function _M:display(x, y, nb_keyframes) diff --git a/game/engines/default/engine/ui/TreeList.lua b/game/engines/default/engine/ui/TreeList.lua index 1eba2cf553e6862faecd60e3ec1d6af920fb7a33..b466308832a0094f48e0359713e0542a33227ba4 100644 --- a/game/engines/default/engine/ui/TreeList.lua +++ b/game/engines/default/engine/ui/TreeList.lua @@ -268,8 +268,8 @@ function _M:outputList() self.cur_col = self.cur_col or 1 end -function _M:treeExpand(v) - local item = self.list[self.sel] +function _M:treeExpand(v, item) + local item = item or self.list[self.sel] if not item then return end if v == nil then item.shown = not item.shown diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua index 17ce00e48cf64633fa1c9ad048eae10153e737c9..9f79a1341c14ba4feafd38763acd7438b415c59a 100644 --- a/game/modules/tome/class/Game.lua +++ b/game/modules/tome/class/Game.lua @@ -29,7 +29,7 @@ local Zone = require "engine.Zone" local Tiles = require "engine.Tiles" local Map = require "engine.Map" local Level = require "engine.Level" -local Birther = require "engine.Birther" +local Birther = require "mod.dialogs.Birther" local Astar = require "engine.Astar" local DirectPath = require "engine.DirectPath" local Shader = require "engine.Shader" @@ -164,6 +164,15 @@ function _M:isTainted() return (game.player and game.player.__cheated) and true or false end +--- Sets the player name +function _M:setPlayerName(name) + self.save_name = name + self.player_name = name + if self.party and self.party:findMember{main=true} then + self.party:findMember{main=true}.name = name + end +end + function _M:newGame() self.party = Party.new() local player = Player.new{name=self.player_name, game_ender=true} @@ -205,7 +214,7 @@ function _M:newGame() local nb_unlocks, max_unlocks = self:countBirthUnlocks() self.creating_player = true - local birth; birth = Birther.new("Character Creation: "..self.player.name.." ("..nb_unlocks.."/"..max_unlocks.." unlocked birth options)", self.player, {"base", "world", "difficulty", "race", "subrace", "sex", "class", "subclass" }, function() + local birth; birth = Birther.new("Character Creation ("..nb_unlocks.."/"..max_unlocks.." unlocked birth options)", self.player, {"base", "world", "difficulty", "race", "subrace", "sex", "class", "subclass" }, function() self.calendar = Calendar.new("/data/calendar_"..(self.player.calendar or "allied")..".lua", "Today is the %s %s of the %s year of the Age of Ascendancy of Maj'Eyal.\nThe time is %02d:%02d.", 122, 167, 11) self.player:check("make_tile") self.player.make_tile = nil @@ -267,7 +276,7 @@ function _M:newGame() if self.player.no_birth_levelup or __module_extra_info.no_birth_popup then birthend() else self.player:playerLevelup(birthend) end - end, quickbirth, 720, 500) + end, quickbirth, 800, 600) -- Load a full player instead of a simpler quickbirthing, if possible birth.quickBirth = function(b) diff --git a/game/modules/tome/class/NPC.lua b/game/modules/tome/class/NPC.lua index dd73ee0f63169e518d3349923e8f249aa844e491..552bd1dda18ba555c01f9f6214571c2e5ece0e3a 100644 --- a/game/modules/tome/class/NPC.lua +++ b/game/modules/tome/class/NPC.lua @@ -208,6 +208,8 @@ function _M:die(src) game.state:allowRodRecall(false) end end + -- Ok the player managed to kill a boss dont bother him with tutorial anymore + if self.rank >= 3.5 and not profile.mod.allow_build.tutorial_done then game:setAllowedBuild("tutorial_done") end return mod.class.Actor.die(self, src) end diff --git a/game/modules/tome/class/interface/PlayerStats.lua b/game/modules/tome/class/interface/PlayerStats.lua index e96f801477b19869fafb3d5a8b503b7b717e45d6..2ebf2ad857d8fdadbed4806d208c818e0556c67b 100644 --- a/game/modules/tome/class/interface/PlayerStats.lua +++ b/game/modules/tome/class/interface/PlayerStats.lua @@ -68,9 +68,13 @@ function _M:registerCharacterPlayed() end function _M:registerLoreFound(lore) - local pid = self:playerStatGetCharacterIdentifier(game.party:findMember{main=true}) - profile.mod.lore = profile.mod.lore or { lore={} } profile.mod.lore.lore[lore] = true profile:saveModuleProfile("lore", profile.mod.lore) end + +function _M:registerEscorts(status) + profile.mod.escorts = profile.mod.escorts or { saved=0, lost=0, betrayed=0, zigur=0 } + profile.mod.escorts[status] = profile.mod.escorts[status] + 1 + profile:saveModuleProfile("escorts", profile.mod.escorts) +end diff --git a/game/modules/tome/data/birth/classes/afflicted.lua b/game/modules/tome/data/birth/classes/afflicted.lua index 1cf3372520af0eb5fdb66a38408f560a58a64ad2..d249deb6780f89d89827bf49aade40afc3466616 100644 --- a/game/modules/tome/data/birth/classes/afflicted.lua +++ b/game/modules/tome/data/birth/classes/afflicted.lua @@ -20,6 +20,8 @@ newBirthDescriptor{ type = "class", name = "Afflicted", + locked = function() return profile.mod.allow_build.afflicted end, + locked_desc = "Some walk in shadow, alone, unloved, unwanted. What powers they wield may be mighty, but their names are forever cursed.", desc = { "Afflicted classes have been twisted by their association with evil forces.", "They can use these forces to their advantage, but at a cost...", @@ -29,8 +31,8 @@ newBirthDescriptor{ subclass = { __ALL__ = "disallow", - Cursed = function() return profile.mod.allow_build.afflicted_cursed and "allow" or "disallow" end, - Doomed = function() return profile.mod.allow_build.afflicted_doomed and "allow" or "disallow" end, + Cursed = "allow", + Doomed = "allow", }, }, copy = { @@ -40,6 +42,8 @@ newBirthDescriptor{ newBirthDescriptor{ type = "subclass", name = "Cursed", + locked = function() return profile.mod.allow_build.afflicted_cursed end, + locked_desc = "Affliction can run to the soul, and hatred can fill one's entire being. Overcome someone else's hated curse to know its dreaded meaning.", desc = { "Through ignorance, greed or folly the Cursed served some dark design and are now doomed to pay for their sins.", "Their only master now is the hatred they carry for every living thing.", @@ -82,6 +86,8 @@ newBirthDescriptor{ newBirthDescriptor{ type = "subclass", name = "Doomed", + locked = function() return profile.mod.allow_build.afflicted_doomed end, + locked_desc = "In shaded places in unknown lands thou must overcome thyself and see thy doom.", desc = { "The Doomed are fallen mages who once wielded powerful magic wrought by ambition and dark bargains.", "They now possess only a twisted shadow of that power as they struggle to keep it from consuming them.", diff --git a/game/modules/tome/data/birth/classes/chronomancer.lua b/game/modules/tome/data/birth/classes/chronomancer.lua index 3f40bc1b96efed62eaff21a72f4102938f98a68a..4272a6b7179446e7c240f94f618ffef52e03a56a 100644 --- a/game/modules/tome/data/birth/classes/chronomancer.lua +++ b/game/modules/tome/data/birth/classes/chronomancer.lua @@ -20,6 +20,8 @@ newBirthDescriptor{ type = "class", name = "Chronomancer", + locked = function() return profile.mod.allow_build.chronomancer end, + locked_desc = "Some do not walk upon the straight road others follow. Seek the hidden paths outside the normal course of life.", desc = { "With one foot literally in the past and one in the future, Chronomancers manipulate the present at a whim and wield a power that only bows to nature's own need to keep the balance. The wake in spacetime they leave behind them makes their own Chronomantic abilites that much stronger and that much harder to control. The wise Chronomancer learns to maintain the balance between his own thirst for cosmic power and the universe's need to flow undisturbed, for the hole he tears that amplifies his own abilities just may be the same hole that one day swallows him.", }, @@ -28,8 +30,8 @@ newBirthDescriptor{ subclass = { __ALL__ = "disallow", - ["Paradox Mage"] = function() return profile.mod.allow_build.chronomancer_paradox_mage and "allow" or "disallow" end, - ["Temporal Warden"] = function() return profile.mod.allow_build.chronomancer_temporal_warden and "allow" or "disallow" end, + ["Paradox Mage"] = "allow", + ["Temporal Warden"] = "allow", }, }, copy = { @@ -39,6 +41,8 @@ newBirthDescriptor{ newBirthDescriptor{ type = "subclass", name = "Paradox Mage", + locked = function() return profile.mod.allow_build.chronomancer_paradox_mage end, + locked_desc = "A hand may clap alone if it returns to clap itself. Search for the power in the paradox.", desc = { "A Paradox Mage studies the very fabric of spacetime, learning not just to bend it but shape it and remake it.", "Most Paradox Mages lack basic skills that others take for granted (like general fighting sense), but they make up for it through control of cosmic forces.", @@ -85,6 +89,8 @@ newBirthDescriptor{ newBirthDescriptor{ type = "subclass", name = "Temporal Warden", + locked = function() return profile.mod.allow_build.chronomancer_temporal_warden end, + locked_desc = "We preserve the past to protect the future. The hands of time are guarded by the arms of war.", desc = { "The Temporal Wardens have learned to blend archery, dual-weapon fighting, and chronomancy into a fearsome whole.", "Through their use of the chronomantic arts, the Temporal Wardens seek to control the battlefield while peppering their foes with arrows or engaging in hand-to-hand combat.", diff --git a/game/modules/tome/data/birth/classes/corrupted.lua b/game/modules/tome/data/birth/classes/corrupted.lua index 056be39b45a80afc0bc0fcdea1a29dc15c225781..01ea7b9c6ff13fb3d3ec6a42afd1b2b4e955dbe3 100644 --- a/game/modules/tome/data/birth/classes/corrupted.lua +++ b/game/modules/tome/data/birth/classes/corrupted.lua @@ -20,6 +20,8 @@ newBirthDescriptor{ type = "class", name = "Corrupter", + locked = function() return profile.mod.allow_build.corrupter end, + locked_desc = "Dark thoughts, black bloods, vile deeds... Those who spill their brethren's blood will find its power.", desc = { "Corrupters are touched by the mark of evil. They are a blight on the world. Working to promote the cause of evil, they serve their masters, or themselves become masters.", }, @@ -28,8 +30,8 @@ newBirthDescriptor{ subclass = { __ALL__ = "disallow", - Reaver = function() return profile.mod.allow_build.corrupter_reaver and "allow" or "disallow" end, - Corruptor = function() return profile.mod.allow_build.corrupter_corruptor and "allow" or "disallow" end, + Reaver = "allow", + Corruptor = "allow", }, }, copy = { @@ -40,6 +42,8 @@ newBirthDescriptor{ newBirthDescriptor{ type = "subclass", name = "Reaver", + locked = function() return profile.mod.allow_build.corrupter_reaver end, + locked_desc = "Reap thee the souls of thine enemies, and the powers of darkness shall enter thine flesh.", desc = { "Reavers are terrible foes, charging their enemies with a weapon in each hand.", "They can harness the blight of evil, infecting their foes with terrible contagious diseases while crushing their skulls with devastating combat techniques.", @@ -81,6 +85,8 @@ newBirthDescriptor{ newBirthDescriptor{ type = "subclass", name = "Corruptor", + locked = function() return profile.mod.allow_build.corrupter_corruptor end, + locked_desc = "Blight and depravity hold the greatest powers. Accept temptation and become one with corruption.", desc = { "A corruptor is a terrible foe, wielding dark magics that can sap the very soul of her target.", "They can harness the blight of evil, crushing souls, stealing life force to replenish themselves.", diff --git a/game/modules/tome/data/birth/classes/divine.lua b/game/modules/tome/data/birth/classes/divine.lua index 45c071b40a27923900cf0667494be7d3bc58101d..32a2d05490ea7071796e5de2c06b4734fd236918 100644 --- a/game/modules/tome/data/birth/classes/divine.lua +++ b/game/modules/tome/data/birth/classes/divine.lua @@ -20,6 +20,8 @@ newBirthDescriptor{ type = "class", name = "Divine", + locked = function() return profile.mod.allow_build.divine end, + locked_desc = "The magic of the heavens is known to but a few, and that knowledge has long passed east, forgotten.", desc = { "Divine classes are worshippers of various gods and entities.", "They include the worship of the Sun, the Moon, powerful spirits, ...", @@ -29,8 +31,8 @@ newBirthDescriptor{ subclass = { __ALL__ = "disallow", - ['Sun Paladin'] = function() return profile.mod.allow_build.divine_sun_paladin and "allow" or "disallow" end, - Anorithil = function() return profile.mod.allow_build.divine_anorithil and "allow" or "disallow" end, + ['Sun Paladin'] = "allow", + Anorithil = "allow", }, }, copy = { @@ -42,6 +44,8 @@ newBirthDescriptor{ newBirthDescriptor{ type = "subclass", name = "Sun Paladin", + locked = function() return profile.mod.allow_build.divine_sun_paladin end, + locked_desc = "The sun rises in the east in full glory, but you must look for it first amidst the darkest places.", desc = { "Sun Paladins hail from the Gates of Morning, the last bastion of the free people in the Far East.", "Their way of life is well represented by their motto 'The Sun is our giver, our purity, our essence. We carry the light into dark places, and against our strength none shall pass.'", @@ -87,6 +91,8 @@ newBirthDescriptor{ newBirthDescriptor{ type = "subclass", name = "Anorithil", + locked = function() return profile.mod.allow_build.divine_anorithil end, + locked_desc = "The balance of the heavens' powers is a daunting task. Mighty are those that stand in the twilight places, wielding both light and darkness in their mind.", desc = { "Anorithils hail from the Gates of Morning, the last bastion of the free people in the Far East.", "Their way of life is well represented by their motto 'We stand betwixt the Sun and Moon, where light and darkness meet. In the grey twilight we seek our destiny.'", diff --git a/game/modules/tome/data/birth/classes/mage.lua b/game/modules/tome/data/birth/classes/mage.lua index 477347d55d2c2d7187362b580d41280cd3b35442..1439d28ffb68ce41a17885e2c271e4fa7237c564 100644 --- a/game/modules/tome/data/birth/classes/mage.lua +++ b/game/modules/tome/data/birth/classes/mage.lua @@ -29,7 +29,7 @@ newBirthDescriptor{ { __ALL__ = "disallow", Alchemist = "allow", - Archmage = function() return profile.mod.allow_build.mage and "allow" or "disallow" end, + Archmage = "allow", }, }, copy = { @@ -42,6 +42,8 @@ newBirthDescriptor{ newBirthDescriptor{ type = "subclass", name = "Archmage", + locked = function() return profile.mod.allow_build.mage end, + locked_desc = "Hated, harrowed, hunted, hidden... Our ways are forbidden, but our cause is just. In our veiled valley we find solace from the world's wrath, free to study our arts. Only through charity and friendship can you earn our trust.", desc = { "An Archmage devotes his whole life to the study of magic above anything else.", "Most Archmagi lack basic skills that others take for granted (like general fighting sense), but they make up for it by their raw magical power.", diff --git a/game/modules/tome/data/birth/classes/psionic.lua b/game/modules/tome/data/birth/classes/psionic.lua index 4974f9db8e15fd625b67d1518d929b45493391ca..890ff9d6a0fddb4de605cf98e2f2dbe93d3af4f6 100644 --- a/game/modules/tome/data/birth/classes/psionic.lua +++ b/game/modules/tome/data/birth/classes/psionic.lua @@ -20,6 +20,8 @@ newBirthDescriptor{ type = "class", name = "Psionic", + locked = function() return profile.mod.allow_build.psionic end, + locked_desc = "Weakness of flesh can be overcome by mental prowess. Find the way and fight for the way to open the key to your mind.", desc = { "Psionics find their power within themselves. Their highly trained minds can harness energy from many different sources and manipulate it to produce physical effects.", }, @@ -28,7 +30,7 @@ newBirthDescriptor{ subclass = { __ALL__ = "disallow", - Mindslayer = function() return profile.mod.allow_build.psionic_mindslayer and "allow" or "disallow" end, + Mindslayer = "allow", }, }, copy = { @@ -40,6 +42,8 @@ newBirthDescriptor{ newBirthDescriptor{ type = "subclass", name = "Mindslayer", + locked = function() return profile.mod.allow_build.psionic_mindslayer end, + locked_desc = "A thought can inspire, a thought can kill. After centuries of oppression, years of imprisonment, a thought shall break us free and vengeance will strike from our darkest dreams.", desc = { "Mindslayers specialize in direct and brutal application of mental forces to their immediate surroundings.", "When Mindslayers do battle, they will most often be found in the thick of the fighting, vast energies churning around them and telekinetically-wielded weapons hewing nearby foes at the speed of thought.", diff --git a/game/modules/tome/data/birth/classes/warrior.lua b/game/modules/tome/data/birth/classes/warrior.lua index 15c289f278eed9c64a119ef51185d2b559554495..e7aefda99d5729368c32e3075d16c1a51978ed5a 100644 --- a/game/modules/tome/data/birth/classes/warrior.lua +++ b/game/modules/tome/data/birth/classes/warrior.lua @@ -30,7 +30,7 @@ newBirthDescriptor{ __ALL__ = "disallow", Fighter = "allow", Berserker = "allow", - Brawler = function() return profile.mod.allow_build.warrior_brawler and "allow" or "disallow" end, + Brawler = "allow", ["Arcane Blade"] = "allow", }, }, @@ -179,6 +179,8 @@ newBirthDescriptor{ newBirthDescriptor{ type = "subclass", name = "Brawler", + locked = function() return profile.mod.allow_build.warrior_brawler end, + locked_desc = "Though you may fight alone against many, destined to fight till you die, still you do not relent. In a ring of blood you learn that a pair of fists can face the world.", desc = { "The ravages of the Spellblaze stretched armies thin and left many unprotected. Not everyone could afford the luxury of a weapon.", "Without steel or iron, poor communities of all races turned to the strength of their own bodies for defense against the darkness.", diff --git a/game/modules/tome/data/birth/classes/wilder.lua b/game/modules/tome/data/birth/classes/wilder.lua index 8e6e910be6b304bb4aea43e2229225d0f085d956..5088d70c247f0248b4c275043a0b3355309a2912 100644 --- a/game/modules/tome/data/birth/classes/wilder.lua +++ b/game/modules/tome/data/birth/classes/wilder.lua @@ -20,6 +20,8 @@ newBirthDescriptor{ type = "class", name = "Wilder", + locked = function() return profile.mod.allow_build.wilder_wyrmic or profile.mod.allow_build.wilder_summoner or profile.mod.allow_build.wilder_stone_warden end, + locked_desc = "Natural abilities can go beyond mere skill. Experience the true powers of nature to learn of its amazing gifts.", desc = { "Wilders are one with nature, in one manner or another. There are as many different Wilders as there are aspects of nature.", "They can take on the aspects of creatures, summon creatures to them, feel the druidic call, ...", @@ -29,9 +31,9 @@ newBirthDescriptor{ subclass = { __ALL__ = "disallow", - Summoner = function() return profile.mod.allow_build.wilder_summoner and "allow" or "disallow" end, - Wyrmic = function() return profile.mod.allow_build.wilder_wyrmic and "allow" or "disallow" end, - ["Stone Warden"] = function(birth) return birth.descriptors_by_type.race and birth.descriptors_by_type.race.name == "Dwarf" and profile.mod.allow_build.wilder_stone_warden and "allow" or "disallow" end, + Summoner = "allow", + Wyrmic = "allow", + ["Stone Warden"] = "allow", }, }, copy = { @@ -41,6 +43,8 @@ newBirthDescriptor{ newBirthDescriptor{ type = "subclass", name = "Summoner", + locked = function() return profile.mod.allow_build.wilder_summoner end, + locked_desc = "Not all might comes from within. Hear the invocations of nature, hear its calling power. See that from without we can find our true strengths.", desc = { "Summoners never fight alone. They are always ready to summon one of their many minions to fight at their side.", "Summons can range from a combat hound to a fire drake.", @@ -84,6 +88,8 @@ newBirthDescriptor{ newBirthDescriptor{ type = "subclass", name = "Wyrmic", + locked = function() return profile.mod.allow_build.wilder_wyrmic end, + locked_desc = "Sleek, majestic, powerful... In the path of dragons we walk, and their breath is our breath. See their beating hearts with your eyes and taste their majesty between your teeth.", desc = { "Wyrmics are fighters who have learnt how to mimic some of the aspects of the dragons.", "They have access to talents normally belonging to the various kind of drakes.", @@ -128,6 +134,8 @@ newBirthDescriptor{ newBirthDescriptor{ type = "subclass", name = "Stone Warden", + locked = function() return profile.mod.allow_build.wilder_stone_warden and true or "hide" end, + locked_desc = "", desc = { "Stone Wardens are dwarves trained in both the eldritch arts and the worship of nature.", "While other races are stuck in their belief that arcane forces and natural forces are meant to oppose, dwarves have found a way to combine them in harmony.", diff --git a/game/modules/tome/data/birth/descriptors.lua b/game/modules/tome/data/birth/descriptors.lua index ef1da42a0c91ae88ba450bcc7eca9f935ea4b7d3..cdbd015df50eb0b3698a6356f88c02ee483638b8 100644 --- a/game/modules/tome/data/birth/descriptors.lua +++ b/game/modules/tome/data/birth/descriptors.lua @@ -39,8 +39,8 @@ newBirthDescriptor{ { Tutorial = "disallow", ["Maj'Eyal"] = "allow", - Infinite = function() return profile.mod.allow_build.campaign_infinite_dungeon and "allow" or "disallow" end, - Arena = function() return profile.mod.allow_build.campaign_arena and "allow" or "disallow" end, + Infinite = "allow", + Arena = "allow", Ents = "disallow", Spydre = "disallow", Orcs = "disallow", diff --git a/game/modules/tome/data/birth/races/construct.lua b/game/modules/tome/data/birth/races/construct.lua index 0275d7e7b6fec1b7de6a26899d19971712e173dc..5e74962344cc421f366bb8f525c6373362093836 100644 --- a/game/modules/tome/data/birth/races/construct.lua +++ b/game/modules/tome/data/birth/races/construct.lua @@ -23,6 +23,8 @@ newBirthDescriptor{ type = "race", name = "Construct", + locked = function() return profile.mod.allow_build.construct and true or "hide" end, + locked_desc = "", desc = { "Constructs are not natural creatures.", "The most usual contructs are golems, but they can vary in shape, form and abilities.", @@ -32,7 +34,7 @@ newBirthDescriptor{ subrace = { __ALL__ = "disallow", - ["Runic Golem"] = function() return profile.mod.allow_build.construct_runic_golem and "allow" or "disallow" end, + ["Runic Golem"] = "allow", }, }, random_escort_possibilities = { {"trollmire", 2, 3}, {"ruins-kor-pul", 1, 2}, {"daikara", 1, 5}, {"old-forest", 1, 5}, {"dreadfell", 1, 8}, {"reknor", 1, 1}, }, @@ -42,6 +44,8 @@ newBirthDescriptor { type = "subrace", name = "Runic Golem", + locked = function() return profile.mod.allow_build.construct_runic_golem and true or "hide" end, + locked_desc = "", desc = { "Runic Golems are creatures made of solid rock and animated using arcane forces.", "They can not be of any class, but they have many intrinsinc abilities.", diff --git a/game/modules/tome/data/birth/races/undead.lua b/game/modules/tome/data/birth/races/undead.lua index 16e81bc90b67c2d64ab8d593fe2f407899fbc390..4b36b57302a96c3963167032395cf28fab7b2298 100644 --- a/game/modules/tome/data/birth/races/undead.lua +++ b/game/modules/tome/data/birth/races/undead.lua @@ -23,6 +23,8 @@ newBirthDescriptor{ type = "race", name = "Undead", + locked = function() return profile.mod.allow_build.undead end, + locked_desc = "Grave strength, dread will, this flesh cannot stay still. Kings die, masters fall, we will outlast them all.", desc = { "Undead are humanoids (Humans, Elves, Dwarves, ...) that have been brought back to life by the corruption of dark magics.", "Undead can take many forms, from ghouls to vampires and liches.", @@ -32,10 +34,10 @@ newBirthDescriptor{ subrace = { __ALL__ = "disallow", - Ghoul = function() return profile.mod.allow_build.undead_ghoul and "allow" or "disallow" end, - Skeleton = function() return profile.mod.allow_build.undead_skeleton and "allow" or "disallow" end, - Vampire = function() return profile.mod.allow_build.undead_vampire and "allow" or "disallow" end, - Wight = function() return profile.mod.allow_build.undead_wight and "allow" or "disallow" end, + Ghoul = "allow", + Skeleton = "allow", + Vampire = "allow", + Wight = "allow", }, class = { @@ -64,6 +66,8 @@ newBirthDescriptor { type = "subrace", name = "Ghoul", + locked = function() return profile.mod.allow_build.undead_ghoul end, + locked_desc = "Slow to shuffle, quick to bite, learn from master, rule the night!", desc = { "Ghouls are dumb, but resilient, rotting undead creatures, making good fighters.", "They have access to #GOLD#special ghoul talents#WHITE# and a wide range of undead abilities:", @@ -113,6 +117,8 @@ newBirthDescriptor { type = "subrace", name = "Skeleton", + locked = function() return profile.mod.allow_build.undead_skeleton end, + locked_desc = "The marching bones, each step we rattle, but servants no more, we march to battle!", desc = { "Skeletons are animated bones, undead creatures both strong and dexterous.", "They have access to #GOLD#special skeleton talents#WHITE# and a wide range of undead abilities:", diff --git a/game/modules/tome/data/birth/races/yeek.lua b/game/modules/tome/data/birth/races/yeek.lua index b65617e639eecd060afe96e9568b265fd3849aa4..1d3e756410bc90bd4ab77633fc0025f20e34e150 100644 --- a/game/modules/tome/data/birth/races/yeek.lua +++ b/game/modules/tome/data/birth/races/yeek.lua @@ -23,6 +23,8 @@ newBirthDescriptor{ type = "race", name = "Yeek", + locked = function() return profile.mod.allow_build.yeek end, + locked_desc = "One race, one mind, one way. Our oppression shall end, and we shall inherit Eyal. Do not presume we are weak - our way is true, and only those who help us shall see our strength.", desc = { "Yeeks are a mysterious race of small humanoids native to the tropical island of Rel.", "Their body is covered with white fur and their disproportionate heads give them a ridiculous look.", @@ -59,6 +61,8 @@ newBirthDescriptor { type = "subrace", name = "Yeek", + locked = function() return profile.mod.allow_build.yeek end, + locked_desc = "One race, one mind, one way. Our oppression shall end, and we shall inherit Eyal. Do not presume we are weak - our way is true, and only those who help us shall see our strength.", desc = { "Yeeks are a mysterious race native to the tropical island of Rel.", "Although they are now nearly unheard of in Maj'Eyal, they spent many centuries as secret slaves to the Halfling nation of Nargol.", diff --git a/game/modules/tome/data/birth/worlds.lua b/game/modules/tome/data/birth/worlds.lua index 3645fb802825be512b4202c899b186e2e52c3336..6f50942fcef08edc89fbf7dff1f7a86051d115ae 100644 --- a/game/modules/tome/data/birth/worlds.lua +++ b/game/modules/tome/data/birth/worlds.lua @@ -27,9 +27,9 @@ local default_eyal_descriptors = function(add) Elf = "allow", Dwarf = "allow", Halfling = "allow", - Yeek = function() return profile.mod.allow_build.yeek and "allow" or "disallow" end, - Undead = function() return profile.mod.allow_build.undead and "allow" or "disallow" end, - Construct = function() return profile.mod.allow_build.construct and "allow" or "disallow" end, + Yeek = "allow", + Undead = "allow", + Construct = "allow", }, class = @@ -41,16 +41,12 @@ local default_eyal_descriptors = function(add) Archer = "allow", Rogue = "allow", Mage = "allow", - Divine = function() return profile.mod.allow_build.divine and "allow" or "disallow" end, - Wilder = function() return ( - profile.mod.allow_build.wilder_summoner or - profile.mod.allow_build.wilder_wyrmic - ) and "allow" or "disallow" - end, - Corrupter = function() return profile.mod.allow_build.corrupter and "allow" or "disallow" end, - Afflicted = function() return profile.mod.allow_build.afflicted and "allow" or "disallow" end, - Chronomancer = function() return profile.mod.allow_build.chronomancer and "allow" or "disallow" end, - Psionic = function() return profile.mod.allow_build.psionic and "allow" or "disallow" end, + Divine = "allow", + Wilder = "allow", + Corrupter = "allow", + Afflicted = "allow", + Chronomancer = "allow", + Psionic = "allow", }, } if add then table.merge(base, add) end @@ -79,6 +75,8 @@ newBirthDescriptor{ type = "world", name = "Infinite", display_name = "Infinite Dungeon: The Neverending Descent", + locked = function() return profile.mod.allow_build.campaign_infinite_dungeon end, + locked_desc = "Ever deeper, never ending, no reprieve, keep descending. In ruins old, through barred gate, once riddle solved, find thy fate.", desc = { "Play as your favorite race and class and venture into the infinite dungeon.", @@ -105,6 +103,8 @@ newBirthDescriptor{ type = "world", name = "Arena", display_name = "The Arena: Challenge of the Master", + locked = function() return profile.mod.allow_build.campaign_arena end, + locked_desc = "Blood spilled on sand, only the strong survive. Prove yourself worthy to enter.", desc = { "Play as a lone warrior facing the Arena's challenge!", @@ -135,6 +135,8 @@ newBirthDescriptor{ type = "world", name = "Orcs", display_name = "Orcs: The Rise to Power", + locked = function() return profile.mod.allow_build.campaign_orc and true or "hide" end, + locked_desc = "", desc = { "Baston!", @@ -153,7 +155,9 @@ newBirthDescriptor{ newBirthDescriptor{ type = "world", name = "Spydre", - display_name = "Spydrë: Legacy of Ungoliant", + display_name = "Spydrë: Thouch of the Spider", + locked = function() return profile.mod.allow_build.campaign_spidre and true or "hide" end, + locked_desc = "", desc = { "Spydrë is home to the essence of spiders. The mighty Ungoliant of Arda actually originated from this world.", @@ -171,29 +175,12 @@ newBirthDescriptor{ }, } -newBirthDescriptor{ - type = "world", - name = "Ents", - display_name = "Ents: The March of the Entwifes", - desc = - { - "", - }, - descriptor_choices = - { - race = - { - __ALL__ = "disallow", - Human = "allow", --- Spider = function() return profile.mod.allow_build.spider and "allow" or "disallow" end, - }, - }, -} - newBirthDescriptor{ type = "world", name = "Trolls", display_name = "Trolls: Pirates of the Kar'Haib", + locked = function() return profile.mod.allow_build.campaign_troll and true or "hide" end, + locked_desc = "", desc = { "", @@ -213,6 +200,8 @@ newBirthDescriptor{ type = "world", name = "Nagas", display_name = "Nagas: Guardians of the Tide", + locked = function() return profile.mod.allow_build.campaign_naga and true or "hide" end, + locked_desc = "", desc = { "", @@ -232,6 +221,8 @@ newBirthDescriptor{ type = "world", name = "Faeros", display_name = "Urthalath: Treason or the High Guards", + locked = function() return profile.mod.allow_build.campaign_faeros and true or "hide" end, + locked_desc = "", desc = { "", @@ -251,6 +242,8 @@ newBirthDescriptor{ type = "world", name = "Undeads", display_name = "Broken Oath: The Curse of Undeath", + locked = function() return profile.mod.allow_build.campaign_undead and true or "hide" end, + locked_desc = "", desc = { "", diff --git a/game/modules/tome/data/chats/escort-quest-start.lua b/game/modules/tome/data/chats/escort-quest-start.lua index 1ce59e7840906be78460f352fe5fe53a328c3d2f..86e8e4526fd002de7a5b6165caac027a46538a66 100644 --- a/game/modules/tome/data/chats/escort-quest-start.lua +++ b/game/modules/tome/data/chats/escort-quest-start.lua @@ -35,6 +35,7 @@ newChat{ id="welcome", }) end}, {"Go away; I do not help filthy arcane users!", action=function(npc, player) + game.player:registerEscorts("lost") npc:disappear() npc:removed() player:hasQuest(npc.quest_id).abandoned = true @@ -59,6 +60,7 @@ newChat{ id="welcome", }) end}, {"Go away; I do not care for the weak.", action=function(npc, player) + game.player:registerEscorts("lost") npc:disappear() npc:removed() player:hasQuest(npc.quest_id).abandoned = true diff --git a/game/modules/tome/data/chats/escort-quest.lua b/game/modules/tome/data/chats/escort-quest.lua index 9540236ee9925bead56cf0f62afe12192b543a9d..693d671047279bd438f10856a90a73fa0a5443ef 100644 --- a/game/modules/tome/data/chats/escort-quest.lua +++ b/game/modules/tome/data/chats/escort-quest.lua @@ -182,6 +182,8 @@ local reward = reward_types[npc.reward_type] local quest = game.player:hasQuest(npc.quest_id) if quest.to_zigur and reward.antimagic then reward = reward.antimagic reward.is_antimagic = true end +game.player:registerEscorts(quest.to_zigur and "zigur" or "saved") + local saves_name = { mind="mental", spell="spell", phys="physical"} local saves_tooltips = { mind="MENTAL", spell="SPELL", phys="PHYS"} diff --git a/game/modules/tome/data/general/npcs/sandworm.lua b/game/modules/tome/data/general/npcs/sandworm.lua index 953cd21ac995c9eab605d85373f73a7b8e9a3b4e..d5797bfe400babe7402f2d31159bc5451b49492d 100644 --- a/game/modules/tome/data/general/npcs/sandworm.lua +++ b/game/modules/tome/data/general/npcs/sandworm.lua @@ -71,6 +71,7 @@ newEntity{ base = "BASE_NPC_SANDWORM", newEntity{ base = "BASE_NPC_SANDWORM", name = "sand-drake", display = 'D', + type = "dragon", subtype = "sand", color={r=204,g=255,b=95}, desc = [[This unholy creature looks like a wingless dragon in shape, but resembles a sandworm in color.]], rarity = 5, diff --git a/game/modules/tome/data/gfx/shockbolt/npc/dragon_sand_sand_drake.png b/game/modules/tome/data/gfx/shockbolt/npc/dragon_sand_sand_drake.png new file mode 100644 index 0000000000000000000000000000000000000000..5986724a1e20b0e63897854011c7e8dbc4272a9f Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/npc/dragon_sand_sand_drake.png differ diff --git a/game/modules/tome/data/gfx/shockbolt/npc/humanoid_shalore_archmage_tarelion.png b/game/modules/tome/data/gfx/shockbolt/npc/humanoid_shalore_archmage_tarelion.png new file mode 100644 index 0000000000000000000000000000000000000000..4bb3fd4e245582183150ad0476b6b5100f32eafb Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/npc/humanoid_shalore_archmage_tarelion.png differ diff --git a/game/modules/tome/data/quests/escort-duty.lua b/game/modules/tome/data/quests/escort-duty.lua index bf9b3888ba9c26391cf1543a1a7337b59796db60..c07d7334291d82a5dbfa8bc1a023f8f876b39a54 100644 --- a/game/modules/tome/data/quests/escort-duty.lua +++ b/game/modules/tome/data/quests/escort-duty.lua @@ -330,6 +330,9 @@ on_grant = function(self, who) game.player:hasQuest(self.quest_id).killing_npc = who and who.name or "something" if who.resolveSource and who:resolveSource().player then world:gainAchievement("ESCORT_KILL", game.player) + game.player:registerEscorts("betrayed") + else + game.player:registerEscorts("lost") end end diff --git a/game/modules/tome/data/zones/town-angolwen/npcs.lua b/game/modules/tome/data/zones/town-angolwen/npcs.lua index 4e7558d5d5bc34e588487e73870ac93214aeadf7..867a79d2f3b10b41816160e0f789dc3b8c35a10f 100644 --- a/game/modules/tome/data/zones/town-angolwen/npcs.lua +++ b/game/modules/tome/data/zones/town-angolwen/npcs.lua @@ -89,7 +89,8 @@ newEntity{ define_as = "TARELION", display = "p", faction = "angolwen", name = "Archmage Tarelion", color=colors.CRIMSON, unique = true, - desc = [[A tall shalore elf, in a flowing robe.]], + resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_shalore_archmage_tarelion.png", display_h=2, display_y=-1}}}, + desc = [[A tall shalore elf, in a flowing robe, he looks calm and at peace but you can feel his tremendous power.]], level_range = {30, nil}, exp_worth = 2, rank = 4, size_category = 3,