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

Teleport: Angolwen is not instant anymore

git-svn-id: http://svn.net-core.org/repos/t-engine4@1581 51575b47-30f0-44d4-a5cc-537603b46e54
parent 0de6afff
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,7 @@ newEntity{
slot = "MAINHAND",
slot_forbid = "OFFHAND",
type = "weapon", subtype="staff",
twohanded = true,
add_name = " (#COMBAT_DAMTYPE#)",
display = "\\", color=colors.LIGHT_RED, image = resolvers.image_material("staff", "wood"),
encumber = 5,
......
......@@ -112,7 +112,7 @@ remove_materials = function(self, player)
end
open_orthanc = function(self, player)
self:removeMaterials(player)
self:remove_materials(player)
-- Reveal entrances
local g = mod.class.Grid.new{
......@@ -131,7 +131,7 @@ open_orthanc = function(self, player)
end
ask_east = function(self, player)
self:removeMaterials(player)
self:remove_materials(player)
-- Swap the orbs! Tricky bastard!
local orb_o, orb_item, orb_inven_id = player:findInAllInventories("Orb of Many Ways")
......@@ -146,6 +146,6 @@ ask_east = function(self, player)
end
tannen_tower = function(self, player)
game:changeLevel(1, "tannen-tower")
game:changeLevel(4, "tannen-tower")
player:setQuestStatus(self.id, engine.Quest.COMPLETED, "trapped")
end
......@@ -143,12 +143,13 @@ newTalent{
return
end
game:changeLevel(1, "town-angolwen")
self:setEffect(self.EFF_TELEPORT_ANGOLWEN, 40, {})
return true
end,
info = [[Allows a mage to teleport to the secret town of Angolwen.
You have studied the magic arts there and have been granted a special portal spell to teleport there.
Nobody must learn about this spell and so it should never be used while seen by any creatures.]]
Nobody must learn about this spell and so it should never be used while seen by any creatures.
The spell will take time to activate, you must be out of sight of any creature when you cast it and when the teleportation takes effect.]]
}
-- Dunadan's power, a "weak" regeneration
......
......@@ -1764,6 +1764,36 @@ newEffect{
end,
}
newEffect{
name = "TELEPORT_ANGOLWEN",
desc = "Teleport: Angolwen",
long_desc = function(self, eff) return "The target is awaiting to be recalled back to Angolwen." end,
type = "magical",
status = "beneficial",
parameters = { },
activate = function(self, eff)
end,
deactivate = function(self, eff)
local seen = false
-- Check for visible monsters, only see LOS actors, so telepathy wont prevent it
core.fov.calc_circle(self.x, self.y, 20, function(_, x, y) return game.level.map:opaque(x, y) end, function(_, x, y)
local actor = game.level.map(x, y, game.level.map.ACTOR)
if actor and actor ~= self then seen = true end
end, nil)
if seen then
game.log("There are creatures that could be watching you; you cannot take the risk to teleport to Angolwen.")
return
end
if self:canBe("worldport") then
game.logPlayer(self, "You are yanked out of this place!")
game:changeLevel(1, "town-angolwen")
else
game.logPlayer(self, "Space restabilizes around you.")
end
end,
}
newEffect{
name = "RESOLVE",
desc = "Resolve",
......
......@@ -57,12 +57,12 @@ newEntity{
on_move = function(self, x, y, who)
if who == game.player then
require("engine.ui.Dialog"):yesnoPopup("Back and there again", "Enter the portal back to Middle-earth? (Warning loot Draebor first)", function(ret)
if ret then
if not ret then
who.wild_x, who.wild_y = 72, 23
game:changeLevel(1, "wilderness")
game.logPlayer(who, "#VIOLET#You enter the swirling portal and in the blink of an eye you are back to Middle-earth, on the eastern side of the Mirkwood forest.")
end
end, "Enter", "Stay")
end, "Stay", "Enter")
end
end,
}
......@@ -49,7 +49,7 @@ newEntity{ define_as = "DRAEBOR",
body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 },
resolvers.drops{chance=100, nb=4, {ego_chance=100} },
-- resolvers.drops{chance=100, nb=1, {defined="ATHAME_WEST"} },
resolvers.drops{chance=100, nb=1, {defined="BOOTS_OF_PHASING"} },
summon = {
{type="demon", number=1, hasxp=false},
......
......@@ -21,56 +21,30 @@ load("/data/general/objects/objects.lua")
local Stats = require "engine.interface.ActorStats"
-- Artifact, droped (and used!) by Bill the Stone Troll
newEntity{ base = "BASE_GREATMAUL",
define_as = "GREATMAUL_BILL_TRUNK",
name = "Bill's Tree Trunk", unique=true,
desc = [[This is a big nasty looking tree trunk that Bill was using as a weapon. It could still serve this purpose, should you be strong enough to wield it!]],
require = { stat = { str=25 }, },
newEntity{ base = "BASE_LEATHER_BOOT",
define_as = "BOOTS_OF_PHASING",
unique = true,
name = "Shifting Boots",
unided_name = "pair of shifting boots",
desc = [[Those leather boots can make anybody as annoying as their former possessor, Draebor.]],
color = colors.BLUE,
rarity = false,
metallic = false,
cost = 5,
combat = {
dam = 30,
apr = 7,
physcrit = 1.5,
dammod = {str=1.3},
damrange = 1.7,
},
cost = 200,
material_level = 5,
wielder = {
combat_armor = 1,
combat_def = 7,
fatigue = 2,
talents_types_mastery = { ["spell/temporal"] = 0.1 },
inc_stats = { [Stats.STAT_CUN] = 8, [Stats.STAT_DEX] = 4, },
},
}
for i = 1, 5 do
newEntity{ base = "BASE_SCROLL",
define_as = "NOTE"..i,
name = "tattered paper scrap", lore="trollshaws-note-"..i,
desc = [[A paper scrap, left by an adventurer.]],
rarity = false,
is_magic_device = false,
encumberance = 0,
}
end
newEntity{ base = "BASE_SHIELD",
define_as = "SANGUINE_SHIELD",
unided_name = "bloody shield",
name = "Sanguine Shield", unique=true,
desc = [["Though tarnished and spattered with blood, the emblem of the sun still manages to shine through on this shield.]],
require = { stat = { str=39 }, },
cost = 120,
special_combat = {
dam = 40,
physcrit = 9,
dammod = {str=1.2},
},
wielder = {
inc_stats = { [Stats.STAT_CON] = 5, },
fatigue = 19,
resists = { [DamageType.BLIGHT] = 25, },
life_regen = 5,
},
max_power = 40, power_regen = 1,
use_power = { name = "blink to a nearby random location", power = 22, use = function(self, who)
game.level.map:particleEmitter(who.x, who.y, 1, "teleport")
who:teleportRandom(who.x, who.y, 10 + who:getMag(5))
game.level.map:particleEmitter(who.x, who.y, 1, "teleport")
game.logSeen(who, "%s uses %s!", who.name:capitalize(), self:getName{no_count=true})
return nil, true
end}
}
......@@ -40,6 +40,7 @@ newEntity{ define_as = "SHADE_OF_ANGMAR",
max_stamina = 85,
rank = 4,
size_category = 3,
undead = 1,
infravision = 20,
stats = { str=16, dex=12, cun=14, mag=25, con=16 },
instakill_immune = 1,
......@@ -77,6 +78,7 @@ newEntity{ define_as = "ANGMAR_FURY",
infravision = 20,
stats = { str=16, dex=12, cun=14, mag=25, con=16 },
undead = 1,
no_breath = 1,
stone_immune = 1,
confusion_immune = 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