diff --git a/game/engines/default/engine/ui/ListColumns.lua b/game/engines/default/engine/ui/ListColumns.lua index 576c7de887e96d837376d95f8c855bddd9e51374..f69a47574a9e60a641b2f61d4d948610322c6019 100644 --- a/game/engines/default/engine/ui/ListColumns.lua +++ b/game/engines/default/engine/ui/ListColumns.lua @@ -325,7 +325,7 @@ function _M:display(x, y, nb_keyframes, screen_x, screen_y) end if col.direct_draw then col.direct_draw(item, x, y, col.fw, self.fh) - else + elseif item._tex then if self.text_shadow then item._tex[j][1]:toScreenFull(x+1, y+1, col.fw, self.fh, item._tex[j][2], item._tex[j][3], 0, 0, 0, self.text_shadow) end item._tex[j][1]:toScreenFull(x, y, col.fw, self.fh, item._tex[j][2], item._tex[j][3]) end diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua index 24021b0cfbff6d508c109fe391f4e31f218ec3a8..9e840ec89590c4f1224d6d1da5daa5665d3328ab 100644 --- a/game/modules/tome/class/Game.lua +++ b/game/modules/tome/class/Game.lua @@ -1064,7 +1064,11 @@ function _M:display(nb_keyframes) -- self.mm_fbo:toScreen(0, 0, 200, 200, self.mm_fbo_shader.shad) -- else self.minimap_bg:toScreen(0, 0, 200, 200) - self.minimap_scroll_x, self.minimap_scroll_y = util.bound(self.player.x - 25, 0, map.w - 50), util.bound(self.player.y - 25, 0, map.h - 50) + if self.player.x then + self.minimap_scroll_x, self.minimap_scroll_y = util.bound(self.player.x - 25, 0, map.w - 50), util.bound(self.player.y - 25, 0, map.h - 50) + else + self.minimap_scroll_x, self.minimap_scroll_y = 0, 0 + end map:minimapDisplay(0, 0, self.minimap_scroll_x, self.minimap_scroll_y, 50, 50, 1) -- end diff --git a/game/modules/tome/class/interface/Combat.lua b/game/modules/tome/class/interface/Combat.lua index 1990efba0d3b31c4d6ecb636114eef8e2bdc2d0c..8e96cd3851d3a272dbcde660aff899a63f6dc0a0 100644 --- a/game/modules/tome/class/interface/Combat.lua +++ b/game/modules/tome/class/interface/Combat.lua @@ -453,7 +453,7 @@ function _M:attackTargetWith(target, weapon, damtype, mult, force_dam) if target:checkHit(self:combatAttack(weapon), target:combatPhysicalResist(), 0, 95, 10) and target:canBe("knockback") then target:knockback(self.x, self.y, self:attr("onslaught")) - target:crossTierEffect(target.EFF_OFFBALANCE, src:combatAttack()) + target:crossTierEffect(target.EFF_OFFBALANCE, self:combatAttack()) end if lt and lt:checkHit(self:combatAttack(weapon), lt:combatPhysicalResist(), 0, 95, 10) and lt:canBe("knockback") then lt:knockback(self.x, self.y, self:attr("onslaught")) @@ -1290,7 +1290,7 @@ end -- Get the number of free hands the actor has function _M:getFreeHands() - if not self:getInven("MAINHAND") or not self:getInven("OFFHAND") then return end + if not self:getInven("MAINHAND") or not self:getInven("OFFHAND") then return 0 end local weapon = self:getInven("MAINHAND")[1] local offweapon = self:getInven("OFFHAND")[1] if weapon and offweapon then return 0 end diff --git a/game/modules/tome/class/interface/PlayerLore.lua b/game/modules/tome/class/interface/PlayerLore.lua index a961668c6a99cceeba2060ecc5dcde4323e86482..9acbcc28dfffe78a6b71f9f51bcf9930445f5c4e 100644 --- a/game/modules/tome/class/interface/PlayerLore.lua +++ b/game/modules/tome/class/interface/PlayerLore.lua @@ -60,9 +60,9 @@ function _M:knownLore(lore) return self.lore_known[lore] and true or false end -function _M:getLore(lore) +function _M:getLore(lore, silent) self.additional_lore = self.additional_lore or {} - assert(self.lore_defs[lore] or self.additional_lore[lore], "bad lore id "..lore) + if not silent then assert(self.lore_defs[lore] or self.additional_lore[lore], "bad lore id "..lore) end return self.lore_defs[lore] or self.additional_lore[lore] end @@ -73,8 +73,9 @@ function _M:additionalLore(id, name, category, lore) self.additional_lore[id] = {id=id, name=name, category=category, lore=lore, order=self.additional_lore_nb + #self.lore_defs} end -function _M:learnLore(lore, nopopup) - local l = self:getLore(lore) +function _M:learnLore(lore, nopopup, silent) + local l = self:getLore(lore, silent) + if not l then return end local learnt = false if not self:knownLore(lore) or l.always_pop then game.logPlayer(self, "Lore found: #0080FF#%s", l.name) diff --git a/game/modules/tome/data/talents/psionic/focus.lua b/game/modules/tome/data/talents/psionic/focus.lua index 4f8db679f5c3d313612f6e22c01a13949a4ea996..d80b3f181e2f2226e9e2e28851b8a84e8a507b1a 100644 --- a/game/modules/tome/data/talents/psionic/focus.lua +++ b/game/modules/tome/data/talents/psionic/focus.lua @@ -50,6 +50,7 @@ newTalent{ end return val end + return 0 end }, range = function(self, t) local r = 5 diff --git a/game/modules/tome/data/talents/spells/stone-alchemy.lua b/game/modules/tome/data/talents/spells/stone-alchemy.lua index 03292069b97f1f6ef59d675fe7651c2c68f5df4d..16c1d66376834a2629abc2fd5685d468602db6e8 100644 --- a/game/modules/tome/data/talents/spells/stone-alchemy.lua +++ b/game/modules/tome/data/talents/spells/stone-alchemy.lua @@ -28,6 +28,7 @@ newTalent{ make_gem = function(self, t, base_define) local nb = rng.range(40, 80) local gem = game.zone:makeEntityByName(game.level, "object", "ALCHEMIST_" .. base_define) + if not gem then return end local s = {} while nb > 0 do @@ -42,6 +43,7 @@ newTalent{ local d d = self:showEquipInven("Use which gem?", function(o) return not o.unique and o.type == "gem" end, function(o, inven, item) if not o then return end local gem = t.make_gem(self, t, o.define_as) + if not gem then return end self:addObject(self.INVEN_INVEN, gem) self:removeObject(inven, item) game.logPlayer(self, "You create: %s", gem:getName{do_color=true, do_count=true}) diff --git a/game/modules/tome/data/zones/arena/npcs.lua b/game/modules/tome/data/zones/arena/npcs.lua index 460541cfc787a1a6628f41e11f28b973c2724368..86668f8372d75833e8f47d43b8565aca148f7861 100644 --- a/game/modules/tome/data/zones/arena/npcs.lua +++ b/game/modules/tome/data/zones/arena/npcs.lua @@ -416,6 +416,7 @@ newEntity{ name = "Fryjia Loren", resolvers.inscriptions(1, {"manasurge rune"}), resolvers.inscriptions(3, {"manasurge rune", "movement infusion", "wild infusion", "frozen spear rune"}), + body = { INVEN = 1000, QS_MAINHAND = 1, QS_OFFHAND = 1, MAINHAND = 1, OFFHAND = 1, FINGER = 2, NECK = 1, LITE = 1, BODY = 1, HEAD = 1, CLOAK = 1, HANDS = 1, BELT = 1, FEET = 1, TOOL = 1, QUIVER = 1 }, resolvers.equip{ {type="weapon", subtype="dagger", autoreq=true}, {type="weapon", subtype="dagger", autoreq=true}, @@ -475,6 +476,7 @@ newEntity{ name = "Riala Shalarak", summon = {{name = "wisp", number=3, hasxp=false}}, + body = { INVEN = 1000, QS_MAINHAND = 1, QS_OFFHAND = 1, MAINHAND = 1, OFFHAND = 1, FINGER = 2, NECK = 1, LITE = 1, BODY = 1, HEAD = 1, CLOAK = 1, HANDS = 1, BELT = 1, FEET = 1, TOOL = 1, QUIVER = 1 }, resolvers.equip{ {type="weapon", subtype="staff", autoreq=true}, {type="armor", subtype="cloth", autoreq=true} @@ -518,6 +520,7 @@ newEntity{ name = "Valfren Loren", ai_tactic = resolvers.tactic("tank"), resolvers.inscriptions(3, {}), + body = { INVEN = 1000, QS_MAINHAND = 1, QS_OFFHAND = 1, MAINHAND = 1, OFFHAND = 1, FINGER = 2, NECK = 1, LITE = 1, BODY = 1, HEAD = 1, CLOAK = 1, HANDS = 1, BELT = 1, FEET = 1, TOOL = 1, QUIVER = 1 }, resolvers.equip{ {type="weapon", subtype="battleaxe", autoreq=true, force_drop=true, tome_drops="boss"}, {type="armor", subtype="massive", autoreq=true, force_drop=true, tome_drops="boss"} @@ -563,6 +566,7 @@ newEntity{ name = "Rej Arkatis", ai_tactic = resolvers.tactic("melee"), resolvers.inscriptions(4, {"manasurge rune", "movement infusion", "regeneration infusion", "fire beam rune"}), + body = { INVEN = 1000, QS_MAINHAND = 1, QS_OFFHAND = 1, MAINHAND = 1, OFFHAND = 1, FINGER = 2, NECK = 1, LITE = 1, BODY = 1, HEAD = 1, CLOAK = 1, HANDS = 1, BELT = 1, FEET = 1, TOOL = 1, QUIVER = 1 }, resolvers.equip{ {type="weapon", subtype="dagger", autoreq=true, force_drop=true, tome_drops="boss"}, {type="weapon", subtype="dagger", autoreq=true, force_drop=true, tome_drops="boss"},