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

Teleport: Angolwen now works across wildernesses

fixes


git-svn-id: http://svn.net-core.org/repos/t-engine4@709 51575b47-30f0-44d4-a5cc-537603b46e54
parent 639e4593
No related branches found
No related tags found
No related merge requests found
......@@ -59,6 +59,8 @@ end
function _M:newTalent(t)
assert(t.name, "no talent name")
assert(t.type, "no or unknown talent type")
if type(t.type) == "string" then t.type = {t.type, 1} end
if not t.type[2] then t.type[2] = 1 end
t.short_name = t.short_name or t.name
t.short_name = t.short_name:upper():gsub("[ ]", "_")
t.mode = t.mode or "activated"
......
......@@ -123,6 +123,7 @@ function _M:newGame()
local birth = Birther.new(self.player, {"base", "difficulty", "world", "race", "subrace", "sex", "class", "subclass" }, function()
self.player.wild_x, self.player.wild_y = self.player.default_wilderness[1], self.player.default_wilderness[2]
self.player.last_wilderness = self.player.default_wilderness[3] or "wilderness"
self:changeLevel(1, self.player.starting_zone)
print("[PLAYER BIRTH] resolve...")
self.player:resolve()
......@@ -293,6 +294,7 @@ function _M:changeLevel(lev, zone)
-- Move back to old wilderness position
if self.zone.wilderness then
self.player:move(self.player.wild_x, self.player.wild_y, true)
self.player.last_wilderness = self.zone.short_name
else
if lev > old_lev then
self.player:move(self.level.ups[1].x, self.level.ups[1].y, true)
......
......@@ -52,7 +52,7 @@ newBirthDescriptor{
copy = {
faction = "orc-pride",
type = "humanoid", subtype="orc",
default_wilderness = {10, 39},
default_wilderness = {10, 39, "wilderness-arda-fareast"},
starting_zone = "wilderness-arda-fareast",
starting_quest = "start-dunadan",
starting_intro = "orc",
......
......@@ -46,7 +46,7 @@ newBirthDescriptor{
copy = {
faction = "orc-pride",
type = "humanoid", subtype="troll",
default_wilderness = {39, 17},
default_wilderness = {39, 17, "wilderness-arda-fareast"},
starting_zone = "tower-amon-sul",
starting_quest = "start-dunadan",
starting_intro = "dwarf",
......
......@@ -18,7 +18,7 @@
-- darkgod@te4.org
quickEntity('^', {name='blue mountains', display='^', color=colors.LIGHT_BLUE, image="terrain/mountain.png", block_move=true, block_sight=true})
quickEntity('<', {show_tooltip=true, name='portal to the wilds', display='<', color=colors.WHITE, change_level=1, change_zone="wilderness"})
quickEntity('<', {show_tooltip=true, name='portal to the wilds', display='<', color=colors.WHITE, change_level=1, change_zone=game.player.last_wilderness})
quickEntity('T', {name='tree', display='#', color=colors.LIGHT_GREEN, block_move=true, block_sight=true, image="terrain/tree.png"})
quickEntity('o', {name='fountain', display='~', color=colors.BLUE, block_move=true, image="terrain/river.png"})
quickEntity(' ', {name='grass', display='.', color=colors.LIGHT_GREEN, image="terrain/grass.png"})
......
......@@ -17,26 +17,25 @@
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
quickEntity('<', {show_tooltip=true, name="exit to the wilds", display='<', color={r=0, g=255, b=255}})
defineTile('.', "GRASS")
defineTile('#', "TREE")
defineTile('u', "GRASS", nil, "UKRUK")
defineTile('o', "GRASS", nil, "HILL_ORC_WARRIOR")
defineTile('O', "GRASS", nil, "HILL_ORC_ARCHER")
startx = 0
starty = 0
startx = 3
starty = 1
return {
[[...........O...###]],
[[..............####]],
[[.....oo.......####]],
[[....ouo......#####]],
[[....oo.....O######]],
[[...........#######]],
[[O......O..<#######]],
[[......############]],
[[....##############]],
[[..################]],
[[##################]],
[[###....##.O#######]],
[[##...ooo......####]],
[[#...ouoo......O###]],
[[#..oooo....O...###]],
[[#O..o..........###]],
[[#......O.......###]],
[[#.O.............##]],
[[##..#......#...###]],
[[#######...########]],
[[##################]],
}
......@@ -57,7 +57,7 @@ start_ambush = function(self, who)
end
end
-- Protect from other hits on the same turn
self:setEffect(self.EFF_BARRIER, 3, {power=1000000})
self:setEffect(self.EFF_DAMAGE_SHIELD, 3, {power=1000000})
local o, item, inven_id = who:findInAllInventories("Staff of Absorption")
who:removeObject(inven_id, item, true)
......@@ -84,5 +84,5 @@ killed_ukruk = function(self, who)
game.level.map(who.x, who.y, game.level.map.TERRAIN, game.zone.grid_list.UP_WILDERNESS)
self:setQuestStatus("staff-absorption", engine.Quest.COMPLETED, "survived-ukruk")
who:setQuestStatus("staff-absorption", engine.Quest.COMPLETED, "survived-ukruk")
end
......@@ -86,6 +86,7 @@ newTalent{
end
end)
if not first then return end
local targets = { first }
affected[first] = nil
local possible_targets = table.listify(affected)
......
......@@ -17,4 +17,5 @@
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
load("/data/general/grids/basic.lua")
load("/data/general/grids/forest.lua")
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