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

The temporal rift bosses now are blood linked

git-svn-id: http://svn.net-core.org/repos/t-engine4@2554 51575b47-30f0-44d4-a5cc-537603b46e54
parent 3c43addd
No related branches found
No related tags found
No related merge requests found
......@@ -121,6 +121,18 @@ newEntity{ define_as = "ABOMINATION_RANTHA",
end,
}
local twin_take_hit = function(self, value, src)
value = mod.class.Actor.onTakeHit(self, value, src)
value = value / 2
if value > 0 then
local o = self.brother.onTakeHit
self.brother.onTakeHit = nil
self.brother:takeHit(value, src)
self.brother.onTakeHit = o
end
return value
end
newEntity{ base="BASE_NPC_HORROR", define_as = "CHRONOLITH_TWIN",
name = "Chronolith Twin", color=colors.VIOLET, unique = true,
subtype = "temporal",
......@@ -158,7 +170,10 @@ newEntity{ base="BASE_NPC_HORROR", define_as = "CHRONOLITH_TWIN",
autolevel = "warriormage",
ai = "dumb_talented_simple", ai_state = { talent_in=2, ai_move="move_astar" },
onTakeHit = twin_take_hit,
on_die = function(self, who)
self.brother = nil
game.player:resolveSource():setQuestStatus("temporal-rift", engine.Quest.COMPLETED, "twin")
end,
}
......@@ -200,7 +215,10 @@ newEntity{ base="BASE_NPC_HORROR", define_as = "CHRONOLITH_CLONE",
autolevel = "warriormage",
ai = "dumb_talented_simple", ai_state = { talent_in=2, ai_move="move_astar" },
onTakeHit = twin_take_hit,
on_die = function(self, who)
self.brother = nil
game.player:resolveSource():setQuestStatus("temporal-rift", engine.Quest.COMPLETED, "clone")
end,
}
......@@ -134,10 +134,12 @@ return {
Dialog:simplePopup("Temporal Rift", "The peace of this place has been disturbed.")
game.level.shown_warning = true
local m = game.zone:makeEntityByName(game.level, "actor", "CHRONOLITH_TWIN")
game.zone:addEntity(game.level, m, "actor", 26, 8)
local m = game.zone:makeEntityByName(game.level, "actor", "CHRONOLITH_CLONE")
game.zone:addEntity(game.level, m, "actor", 29, 8)
local m1 = game.zone:makeEntityByName(game.level, "actor", "CHRONOLITH_TWIN")
game.zone:addEntity(game.level, m1, "actor", 26, 8)
local m2 = game.zone:makeEntityByName(game.level, "actor", "CHRONOLITH_CLONE")
game.zone:addEntity(game.level, m2, "actor", 29, 8)
m1.brother = m2
m2.brother = m1
end
end,
......
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