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

foo

git-svn-id: http://svn.net-core.org/repos/t-engine4@1022 51575b47-30f0-44d4-a5cc-537603b46e54
parent 7ef40ca2
No related branches found
No related tags found
No related merge requests found
Showing
with 253 additions and 31 deletions
......@@ -274,7 +274,7 @@ function _M:leaveLevel(level, lev, old_lev)
end
end
function _M:changeLevel(lev, zone)
function _M:changeLevel(lev, zone, keep_old_lev)
if not self.player.game_ender then
game.logPlayer(self.player, "#LIGHT_RED#You may not change level without your own body!")
return
......@@ -287,6 +287,7 @@ function _M:changeLevel(lev, zone)
end
local old_lev = (self.level and not zone) and self.level.level or -1000
if keep_old_lev then old_lev = self.level.level end
if zone then
if self.zone then
self.zone:leaveLevel(false, lev, old_lev)
......@@ -578,7 +579,7 @@ function _M:setupCommands()
self.log("You can not go into the wilds with the following effects: %s", table.concat(stop, ", "))
else
-- Do not unpause, the player is allowed first move on next level
self:changeLevel(e.change_zone and e.change_level or self.level.level + e.change_level, e.change_zone)
self:changeLevel(e.change_zone and e.change_level or self.level.level + e.change_level, e.change_zone, e.keep_old_lev)
end
else
self.log("There is no way out of this level here.")
......
......@@ -59,9 +59,6 @@ newBirthDescriptor{
{type="potion", subtype="potion", name="potion of lesser healing", ego_chance=-1000},
{type="potion", subtype="potion", name="potion of cure poison", ego_chance=-1000},
{type="potion", subtype="potion", name="potion of cure poison", ego_chance=-1000},
{type="gem", name="fire opal"},
{type="gem", name="diamond"},
{type="jewelry", subtype="ring", name="mithril ring", ego_chance=-1000},
},
resolvers.generic(function(e)
e.hotkey[9] = {"inventory", "potion of lesser healing"}
......
......@@ -374,9 +374,11 @@ newDamageType{
-- Fireburn damage + repulsion; checks for spell power against physical resistance
newDamageType{
name = "fireknockback", type = "FIREKNOCKBACK",
name = "fire knockback", type = "FIREKNOCKBACK",
projector = function(src, x, y, type, dam, tmp)
local target = game.level.map(x, y, Map.ACTOR)
if _G.type(dam) ~= "table" then dam = {dam=dam, dist=3} end
tmp = tmp or {}
if target and not tmp[target] then
tmp[target] = true
DamageType:get(DamageType.FIREBURN).projector(src, x, y, DamageType.FIREBURN, dam.dam)
......
......@@ -39,6 +39,8 @@ loadIfNot("/data/general/objects/jewelry.lua")
loadIfNot("/data/general/objects/staves.lua")
loadIfNot("/data/general/objects/knifes.lua")
loadIfNot("/data/general/objects/whips.lua")
loadIfNot("/data/general/objects/swords.lua")
loadIfNot("/data/general/objects/2hswords.lua")
......
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
newEntity{
define_as = "BASE_WHIP",
slot = "MAINHAND", offslot = "OFFHAND",
type = "weapon", subtype="whip",
add_name = " (#COMBAT#)",
display = "|", color=colors.SLATE, image = resolvers.image_material("whip", "leather"),
encumber = 3,
rarity = 5,
metallic = true,
combat = { talented = "whip", damrange = 1.1, sound = "actions/melee", sound_miss = "actions/melee_miss",},
desc = [[Sharp, long, and deadly.]],
egos = "/data/general/objects/egos/weapon.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) },
}
......@@ -17,7 +17,7 @@
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
quickEntity('>', {always_remember = true, show_tooltip=true, name="Passage to the caverns", desc="A dark hole in the mountain", display='>', color=colors.GREY, notice = true, change_level=2, change_zone="valley-moon-caverns"})
quickEntity('>', {always_remember = true, show_tooltip=true, name="Passage to the caverns", desc="A dark hole in the mountain", display='>', color=colors.GREY, notice = true, change_level=2, change_zone="valley-moon-caverns", keep_old_lev=true})
defineTile('.', "GRASS")
defineTile('~', "POISON_DEEP_WATER")
defineTile('"', "GRASS", nil, nil, nil, {summon_limmir=true})
......
......@@ -60,7 +60,7 @@ start_search = function(self, who)
name="Cavern leading to the valley of the moon",
display='>', color=colors.GREY,
notice = true,
change_level=1, change_zone="valley-moon"
change_level=1, change_zone="valley-moon-caverns"
}
g:resolve() g:resolve(nil, true)
game.zone:addEntity(game.memory_levels["wilderness-arda-fareast-1"], g, "terrain", 48, 53)
......
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
load("/data/general/grids/basic.lua")
newEntity{
define_as = "UP_VALLEY",
name = "exit to the lost valley",
display = '<', color_r=255, color_g=0, color_b=255,
always_remember = true,
notice = true,
change_level = 3,
change_zone = "valley-moon",
}
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
load("/data/general/npcs/minor-demon.lua", rarity(0))
load("/data/general/npcs/all.lua", rarity(4, 35))
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
load("/data/general/objects/objects.lua")
newEntity{ base = "BASE_WAND",
define_as = "ROD_SPYDRIC_POISON",
name = "Rod of Spydric Poison", color=colors.LIGHT_GREEN, unique=true,
cost = 50,
elec_proof = true,
max_power = 75, power_regen = 1,
use_power = { name = "shoot a bolt of spyric poison", power = 25,
use = function(self, who)
local tg = {type="bolt", range=12, talent=t}
local x, y = who:getTarget(tg)
if not x or not y then return nil end
who:project(tg, x, y, engine.DamageType.SPYDRIC_POISON, {dam=200 + who:getMag() * 4, dur=6}, {type="slime"})
end
},
}
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
load("/data/general/traps/water.lua")
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
return {
name = "Caverns to the hidden valley",
level_range = {30, 40},
level_scheme = "player",
max_level = 2,
decay = {300, 800},
actor_adjust_level = function(zone, level, e) return zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2) end,
width = 70, height = 70,
all_remembered = true,
all_lited = true,
persistant = "zone",
-- Apply a darkish tint to all the map
color_shown = {0.7, 0.7, 0.7, 1},
color_obscure = {0.7*0.6, 0.7*0.6, 0.7*0.6, 1},
generator = {
map = {
class = "engine.generator.map.Cavern",
zoom = 16,
min_floor = 1200,
floor = "FLOOR",
wall = "WALL",
up = "UP",
down = "DOWN",
door = "FLOOR",
},
actor = {
class = "engine.generator.actor.Random",
nb_npc = {30, 40},
guardian = "UNGOLE",
},
object = {
class = "engine.generator.object.Random",
nb_object = {6, 9},
},
trap = {
class = "engine.generator.trap.Random",
nb_object = {0, 0},
},
},
levels =
{
[1] = {
generator = { map = {
up = "UP_WILDERNESS_FAR_EAST",
}, },
},
[2] = {
generator = { map = {
down = "UP_VALLEY",
force_last_stair = true,
}, },
},
},
}
......@@ -36,21 +36,28 @@ newEntity{ define_as = "CORRUPTED_BALROG",
instakill_immune = 1,
no_breath = 1,
move_others=true,
demon = 1,
on_melee_hit = { [DamageType.FIRE] = 50, [DamageType.LIGHT] = 30, },
body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 },
resolvers.equip{
{type="weapon", subtype="staff", autoreq=true},
{type="armor", subtype="light", autoreq=true},
{type="weapon", subtype="whip", defined="WHIP_GOTHMOG", autoreq=true},
},
resolvers.drops{chance=100, nb=3, {ego_chance=100} },
resolvers.talents{
[Talents.T_MANATHRUST]=4, [Talents.T_FREEZE]=4, [Talents.T_TIDAL_WAVE]=2,
[Talents.T_SWORD_MASTERY]=3, [Talents.T_STUNNING_BLOW]=1,
[Talents.T_FIREBEAM]=5,
[Talents.T_DARKNESS]=3,
[Talents.T_FLAME]=5,
[Talents.T_POISON_BREATH]=5,
[Talents.T_FIRE_BREATH]=5,
[Talents.T_RUSH]=5,
[Talents.T_WEAPON_COMBAT]=10,
},
autolevel = "warriormage",
ai = "dumb_talented_simple", ai_state = { talent_in=1, ai_move="move_astar" },
autolevel = "dexmage",
ai = "dumb_talented_simple", ai_state = { talent_in=2, ai_move="move_astar" },
on_die = function(self, who)
end,
......
......@@ -19,29 +19,29 @@
load("/data/general/objects/objects.lua")
-- Artifact, droped (and used!) by the Shade of Angmar
newEntity{ base = "BASE_STAFF",
define_as = "STAFF_ANGMAR", rarity=false,
name = "Angmar's Fall", unique=true,
desc = [[Made from the bones of of many creatures this staff glows with power. You can feel its evilness as you touch it.]],
require = { stat = { mag=25 }, },
cost = 5,
newEntity{ base = "BASE_WHIP",
define_as = "WHIP_GOTHMOG",
unided_name = "fiery whip",
name = "Whip of Gothmog, High Captain of the Balrogs", color=colors.PURPLE, unique = true,
desc = [[With this unbearably bright whip of flame, the Balrog Gothmog has become known for never having lost in combat.
But nothing lasts forever and he was finaly defeated by Echtelion in the First Age. His whip must have been by the other balrogs from its corpse.]],
require = { stat = { dex=48 }, },
cost = 250,
material_level = 5,
combat = {
dam = 10,
dam = resolvers.rngavg(40,45),
apr = 0,
physcrit = 1.5,
dammod = {mag=1.1},
physcrit = 9,
dammod = {dex=1},
damtype = DamageType.FIREKNOCKBACK,
},
wielder = {
esp = {["demon/minor"]=1, ["demon/major"]=1},
see_invisible = 2,
combat_spellpower = 7,
combat_spellcrit = 8,
},
carrier = {
inc_damage={
[DamageType.FIRE] = 4,
[DamageType.COLD] = 4,
[DamageType.ACID] = 4,
[DamageType.LIGHTNING] = 4,
[DamageType.BLIGHT] = 4,
[DamageType.BLIGHT] = 8,
},
},
}
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