Skip to content
Snippets Groups Projects
Commit bcf587b2 authored by dg's avatar dg
Browse files

Fixes psionic randbosses

Fixes Arena bosses


git-svn-id: http://svn.net-core.org/repos/t-engine4@4672 51575b47-30f0-44d4-a5cc-537603b46e54
parent 2c198a8a
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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)
......
......@@ -50,6 +50,7 @@ newTalent{
end
return val
end
return 0
end },
range = function(self, t)
local r = 5
......
......@@ -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})
......
......@@ -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"},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment