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

fix harkorzun

git-svn-id: http://svn.net-core.org/repos/t-engine4@1951 51575b47-30f0-44d4-a5cc-537603b46e54
parent 81c5e998
No related branches found
No related tags found
No related merge requests found
......@@ -704,10 +704,10 @@ function _M:setupCommands()
end,
[{"_g","ctrl"}] = function()
if config.settings.tome.cheat then
-- local m = game.zone:makeEntityByName(game.level, "actor", "TEST")
-- game.zone:addEntity(game.level, m, "actor", game.player.x, game.player.y+1)
self:changeLevel(1, "charred-scar")
game.player:magicMap(50)
local m = game.zone:makeEntityByName(game.level, "actor", "TEST")
game.zone:addEntity(game.level, m, "actor", game.player.x, game.player.y+1)
-- self:changeLevel(1, "charred-scar")
-- game.player:magicMap(50)
-- self.player:grantQuest("anti-antimagic")
end
end,
......
......@@ -71,7 +71,7 @@ newEntity{ base = "BASE_NPC_GHOST",
}
newEntity{ base = "BASE_NPC_GHOST",
name = "dreadmaster", color=colors.YELLOW, image="npc/dreadmaster.png", define_as = "TEST",
name = "dreadmaster", color=colors.YELLOW, image="npc/dreadmaster.png",
desc = [[It is an unlife of power almost unequalled. An affront to existence, its very touch abuses and disrupts the flow of life, and its unearthly limbs, of purest black, crush rock and flesh with ease.]],
level_range = {32, nil}, exp_worth = 1,
rarity = 15,
......
......@@ -85,7 +85,7 @@ newEntity{ base = "BASE_NPC_XORN",
resolvers.talents{ [Talents.T_CONSTRICT]=4, [Talents.T_RUSH]=2, },
}
newEntity{ base = "BASE_NPC_XORN",
newEntity{ base = "BASE_NPC_XORN", define_as="TEST",
name = "The Fragmented Essence of Harkor'Zun", color=colors.VIOLET, unique=true,
desc = [[Fragmented essence... maybe it'd be best if it stayed fragmented.]],
level_range = {17, nil}, exp_worth = 0,
......@@ -97,11 +97,12 @@ newEntity{ base = "BASE_NPC_XORN",
combat = { damtype=DamageType.ACID },
stun_immune = 1,
can_pass = {pass_wall=0}, -- We restore it after generation, to amke sure it does not birth in walls
-- Come in 5!
on_added_to_level = function(self)
self.add_max_life = self.max_life * 0.2
local all = {[self]=true}
local all = {self}
for i = 1, 4 do
local x, y = util.findFreeGrid(self.x, self.y, 15, true, {[engine.Map.ACTOR]=true})
if x and y then
......@@ -109,15 +110,18 @@ newEntity{ base = "BASE_NPC_XORN",
m.on_added_to_level = nil
m.x, m.y = nil, nil
game.zone:addEntity(game.level, m, "actor", x, y)
all[m] = true
all[#all+1] = m
end
end
for m, _ in pairs(all) do m.all_fragments = all end
for _, m in ipairs(all) do
m.all_fragments = all
m.can_pass = {pass_wall=20} -- Restore passwall
end
end,
on_die = function(self, who)
local nb_alive = 0
-- Buf others
for m, _ in pairs(self.all_fragments) do
for _, m in ipairs(self.all_fragments) do
if not m.dead then
nb_alive = nb_alive + 1
game.logSeen(self, "#AQUAMARINE#%s absorbs the energy of the destroyed fragment!", self.name)
......@@ -129,7 +133,7 @@ newEntity{ base = "BASE_NPC_XORN",
-- Only one left?
if nb_alive == 1 then
local x, y
for m, _ in pairs(self.all_fragments) do
for _, m in ipairs(self.all_fragments) do
if not m.dead then x, y = m.x, m.y; m:die(who) end
end
local m = game.zone:makeEntityByName(game.level, "actor", "FULL_HARKOR_ZUN")
......
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