Skip to content
Snippets Groups Projects
Commit e6e17e94 authored by DarkGod's avatar DarkGod
Browse files

If the rod of recall somehow drops in an unreachable spot it gets added to the...

If the rod of recall somehow drops in an unreachable spot it gets added to the player's inventory directly
parent be0b5a76
No related branches found
No related tags found
No related merge requests found
......@@ -352,7 +352,16 @@ function _M:die(src, death_note)
if self.rank >= 4 and game.state:allowRodRecall() and not self:attr("no_rod_recall") then
local rod = game.zone:makeEntityByName(game.level, "object", "ROD_OF_RECALL")
if rod then
game.zone:addEntity(game.level, rod, "object", self.x, self.y)
-- If the player can move to the space the NPC died on, drop in the normal way
-- Else make absolutely sure they get the Rod of Recall by moving it to their inventory directly
if not game.player:canMove(self.x, self.y) then
game.zone:addEntity(game.level, rod, "object")
game.player:addObject(game.player:getInven("INVEN"), rod)
rod:identify(true)
else
game.zone:addEntity(game.level, rod, "object", self.x, self.y)
end
game.state:allowRodRecall(false)
if self.define_as == "THE_MASTER" then world:gainAchievement("FIRST_BOSS_MASTER", src)
elseif self.define_as == "GRAND_CORRUPTOR" then world:gainAchievement("FIRST_BOSS_GRAND_CORRUPTOR", src)
......
......@@ -35,12 +35,12 @@ _M:addEgoRule("object", function(dvalue, svalue, key, dst, src, rules, state)
-- If the special is a single special, wrap it to allow multiple.
if dvalue.fct then dvalue = {dvalue} end
if svalue.fct then svalue = {svalue} end
-- Save changes to the specials.
-- Update
dst[key] = dvalue
src[key] = svalue
-- Return false so we can let the normal table merge take care of
-- the rest.
return false
-- Recurse with always append
rules = table.clone(rules)
table.insert(rules, 1, table.rules.append)
return table.rules.recurse(dvalue, svalue, key, dst, src, rules, state)
end)
--- Called when the zone file is loaded
......@@ -64,7 +64,7 @@ function _M:doQuake(rad, x, y, check)
local w = game.level.map.w
local locs = {}
local ms = {}
core.fov.calc_circle(x, y, game.level.map.w, game.level.map.h, rad,
function(_, lx, ly) if not game.level.map:isBound(lx, ly) then return true end end,
function(_, tx, ty)
......
......@@ -143,7 +143,7 @@ newEntity{
newEntity{
power_source = {arcane=true},
name = "blighted ", prefix=true, instant_resolve=true,
keywords = {blighed=true},
keywords = {blighted=true},
level_range = {1, 50},
rarity = 9,
cost = 5,
......@@ -677,16 +677,15 @@ newEntity{
},
}
-- On use removed so it doesn't conflict with other on_uses (its pretty bad, they're really good)
newEntity{
power_source = {technique=true},
name = "archer's ", prefix=true, instant_resolve=true,
name = " of archery", suffix=true, instant_resolve=true,
keywords = {archer=true},
level_range = {30, 50},
greater_ego = 1,
rarity = 17,
cost = 35,
-- resolvers.charmt(Talents.T_STEADY_SHOT, 3, 20),
resolvers.charmt(Talents.T_STEADY_SHOT, 3, 20),
wielder = {
inc_stats = {
[Stats.STAT_DEX] = resolvers.mbonus_material(7, 2),
......
......@@ -74,7 +74,7 @@ newEntity{
combat_mentalresist = resolvers.mbonus_material(10, 5),
resists={
[DamageType.BLIGHT] = resolvers.mbonus_material(10, 5),
},
},
},
}
newEntity{
......@@ -104,6 +104,9 @@ newEntity{
combat_atk = resolvers.mbonus_material(8, 4),
combat_def = resolvers.mbonus_material(8, 4),
inc_stats = { [Stats.STAT_CUN] = resolvers.mbonus_material(8, 2) },
on_melee_hit = {
[DamageType.ITEM_TEMPORAL_ENERGIZE] = resolvers.mbonus_material(10, 10),
},
},
}
......
......@@ -66,7 +66,7 @@ newEntity{
combat_spellpower = resolvers.mbonus_material(3, 2),
},
resolvers.genericlast(function(e)
e.wielder.inc_damage[e.combat.damtype] = e.combat.dam
e.wielder.inc_damage[e.combat.element or e.combat.damtype] = e.combat.dam
if e.combat.of_breaching then
for d, v in pairs(e.wielder.inc_damage) do
e.wielder.resists_pen[d] = math.ceil(e.combat.dam/2)
......@@ -598,7 +598,7 @@ newEntity{
},
},
resolvers.genericlast(function(e)
e.wielder.inc_damage[e.combat.damtype] = e.combat.dam
e.wielder.inc_damage[e.combat.element or e.combat.damtype] = e.combat.dam
if e.combat.of_breaching then
for d, v in pairs(e.wielder.inc_damage) do
e.wielder.resists_pen[d] = math.ceil(e.combat.dam/2)
......
......@@ -68,7 +68,10 @@ newEntity{ define_as = "SUPREME_ARCHMAGE_LINANIIL",
{type="armor", subtype="cloth", autoreq=true, forbid_power_source={antimagic=true}, tome_drops="boss"},
},
talent_cd_reduction = {all=23},
talent_cd_reduction = {
all=23,
[Talents.T_DRACONIC_BODY] = -20,
},
resolvers.talents{
[Talents.T_AETHER_PERMEATION]=1,
[Talents.T_DRACONIC_BODY]=1,
......
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