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

snow giants

typos
attack destroying items now have a chance based on damage done


git-svn-id: http://svn.net-core.org/repos/t-engine4@766 51575b47-30f0-44d4-a5cc-537603b46e54
parent cfe195b4
No related branches found
No related tags found
No related merge requests found
Showing
with 168 additions and 11 deletions
......@@ -1071,7 +1071,7 @@ function _M:addedToLevel(level, x, y)
-- Find an actor with that filter
local m = game.zone:makeEntity(game.level, "actor", filter)
if m and m:canMove(x, y) then game.zone:addEntity(game.level, m, "actor", x, y)
else m:removed() end
elseif m then m:removed() end
end
end
self.make_escort = nil
......
......@@ -42,7 +42,7 @@ newChat{ id="orcs",
text = [[Orcs! Ah! Well then this is your lucky day, this whole continent is filled with Orcs. They have united themselves as the Orc Pride and rumours speak of some powerful masters.
They roam the lands freely, ever assaulting us.
@playername@ you are welcome to the Gates of Morning, should you prove to be trustful.
There is a cavern full of spiders just to he north, we can not stand against both them and the Orc Pride.
There is a cavern full of spiders just to the north, we can not stand against both them and the Orc Pride.
Please go there and destroy the source of infestation.]],
answers = {
{"I will my Lady.", action=function(npc, player) player:grantQuest("spydric-infestation") end},
......
......@@ -82,7 +82,7 @@ local function tryDestroy(who, inven, dam, destroy_prop, proof_prop, msg)
local o = inven[i]
if o[destroy_prop] and not o[proof_prop] then
for j, test in ipairs(o[destroy_prop]) do
if realdam >= test[1] and rng.percent(test[2]) then
if dam >= test[1] and rng.percent(test[2]) then
game.logPlayer(who, msg, o:getName{do_color=true, no_count=true})
local obj = who:removeObject(inven, i)
obj:removed()
......
......@@ -31,6 +31,7 @@ newEntity{
can_pass = {pass_wall=1},
does_block_move = true,
block_sight = true,
air_level = -20,
dig = "ROCKY_GROUND",
}
......
......@@ -134,7 +134,7 @@ newEntity{ base = "BASE_NPC_ANT",
}
newEntity{ base = "BASE_NPC_ANT",
name = "giant acid ant", color=colors.BLACK,
name = "giant acid ant", color=colors.DARK_GREY,
desc = "It's a large black ant. Its porous skin oozes acid.",
level_range = {15, 50}, exp_worth = 1,
rarity = 4,
......
......@@ -88,7 +88,7 @@ newEntity{ base = "BASE_NPC_JELLY",
}
newEntity{ base = "BASE_NPC_JELLY",
name = "black jelly", color=colors.BLACK,
name = "black jelly", color=colors.DARK_GREY,
desc = "A strange black blob on the dungeon floor.",
level_range = {1, 25}, exp_worth = 1,
rarity = 4,
......
-- 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
local Talents = require("engine.interface.ActorTalents")
newEntity{
define_as = "BASE_NPC_SNOW_GIANT",
type = "giant", subtype = "ice",
display = "P", color=colors.WHITE,
combat = { dam=resolvers.rngavg(15,20), atk=15, apr=15, dammod={str=0.8} },
body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 },
resolvers.drops{chance=100, nb=1, {type="money"} },
infravision = 20,
life_rating = 12,
max_stamina = 90,
rank = 2,
size_category = 4,
autolevel = "warrior",
ai = "dumb_talented_simple", ai_state = { ai_target="target_player_radius", sense_radius=6, talent_in=3, },
energy = { mod=1 },
stats = { str=20, dex=8, mag=6, con=16 },
resists = { [DamageType.PHYSICAL] = 20, [DamageType.FIRE] = 50, },
no_breath = 1,
confusion_immune = 1,
poison_immune = 1,
}
newEntity{ base = "BASE_NPC_SNOW_GIANT",
name = "snow giant", color=colors.WHITE,
desc = [[A towering creature, humanoid but huge. It wield a giant maul and does not look friendly.]],
level_range = {10, 50}, exp_worth = 1,
rarity = 5,
max_life = resolvers.rngavg(100,120),
combat_armor = 0, combat_def = 0,
on_melee_hit = {[DamageType.COLD]=resolvers.mbonus(15, 5)},
melee_project = {[DamageType.COLD]=resolvers.mbonus(15, 5)},
resolvers.talents{ [Talents.T_MIND_DISRUPTION]=2, },
}
newEntity{ base = "BASE_NPC_SNOW_GIANT",
name = "snow giant thunderer", color=colors.LIGHT_BLUE,
desc = [[A towering creature, humanoid but huge. It wield a giant maul and does not look friendly. Lightning crackles over its body.]],
level_range = {14, 50}, exp_worth = 1,
rarity = 7,
max_life = resolvers.rngavg(100,120),
combat_armor = 0, combat_def = 0,
on_melee_hit = {[DamageType.COLD]=resolvers.mbonus(15, 5)},
melee_project = {[DamageType.COLD]=resolvers.mbonus(15, 5)},
autolevel = "warriormage",
resolvers.talents{ [Talents.T_LIGHTNING]=3, [Talents.T_CHAIN_LIGHTNING]=3, },
}
newEntity{ base = "BASE_NPC_SNOW_GIANT",
name = "snow giant boulder thrower", color=colors.LIGHT_UMBER,
desc = [[A towering creature, humanoid but huge. It wield a giant maul and does not look friendly.]],
level_range = {15, 50}, exp_worth = 1,
rarity = 7,
max_life = resolvers.rngavg(100,120),
combat_armor = 0, combat_def = 0,
on_melee_hit = {[DamageType.COLD]=resolvers.mbonus(15, 5)},
melee_project = {[DamageType.COLD]=resolvers.mbonus(15, 5)},
resolvers.talents{ [Talents.T_THROW_BOULDER]=3, },
}
newEntity{ base = "BASE_NPC_SNOW_GIANT",
name = "snow giant chieftain", color=colors.AQUAMARINE,
desc = [[A towering creature, humanoid but huge. It wield a giant maul and does not look friendly.]],
level_range = {15, 50}, exp_worth = 1,
rarity = 13,
rank = 3,
max_life = resolvers.rngavg(150,170),
combat_armor = 12, combat_def = 12,
on_melee_hit = {[DamageType.COLD]=resolvers.mbonus(15, 10)},
melee_project = {[DamageType.COLD]=resolvers.mbonus(15, 10)},
resolvers.talents{ [Talents.T_KNOCKBACK]=3, [Talents.T_STUN]=3, },
make_escort = {
{type="giant", subtype="ice", number=3},
},
resolvers.drops{chance=100, nb=1, {ego_chance=10} },
}
......@@ -27,11 +27,11 @@ newEntity{
combat = { dam=resolvers.rngavg(15,20), atk=15, apr=15, dammod={str=0.8} },
body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 },
resolvers.drops{chance=20, nb=1, {} },
resolvers.drops{chance=100, nb=1, {type="money"} },
resolvers.drops{chance=60, nb=1, {type="money"} },
resolvers.drops{chance=40, nb=1, {type="money"} },
can_pass = {pass_wall=20},
move_project = {[DamageType.DIG]=1},
infravision = 20,
life_rating = 12,
......@@ -44,16 +44,42 @@ newEntity{
energy = { mod=1 },
stats = { str=20, dex=8, mag=6, con=16 },
resists = { [DamageType.PHYSICAL] = 20, [DamageType.FIRE] = 50, },
no_breath = 1,
confusion_immune = 1,
poison_immune = 1,
}
newEntity{ base = "BASE_NPC_XORN",
name = "Umber Hulk", color=colors.UMBER,
name = "umber hulk", color=colors.LIGHT_UMBER,
desc = [[This bizarre creature has glaring eyes and large mandibles capable of slicing through rock.]],
level_range = {10, 50}, exp_worth = 1,
rarity = 12,
max_life = resolvers.rngavg(100,120),
combat_armor = 15, combat_def = 0,
combat_armor = 12, combat_def = 0,
move_project = {[DamageType.DIG]=1},
resolvers.talents{ [Talents.T_MIND_DISRUPTION]=2, },
}
newEntity{ base = "BASE_NPC_XORN",
name = "xorn", color=colors.UMBER,
desc = [[A huge creature of the element Earth. Able to merge with its element, it has four huge arms protruding from its enormous torso.]],
level_range = {15, 50}, exp_worth = 1,
rarity = 12,
max_life = resolvers.rngavg(130,140),
combat_armor = 15, combat_def = 10,
combat = { damtype=DamageType.ACID },
resolvers.talents{ [Talents.T_CONSTRICT]=4, },
}
newEntity{ base = "BASE_NPC_XORN",
name = "xaren", color=colors.SLATE,
desc = [[It is a tougher relative of the Xorn. Its hide glitters with metal ores.]],
level_range = {15, 50}, exp_worth = 1,
rarity = 12,
max_life = resolvers.rngavg(130,140),
combat_armor = 15, combat_def = 10,
combat = { damtype=DamageType.ACID },
resolvers.talents{ [Talents.T_CONSTRICT]=4, [Talents.T_RUSH]=2, },
}
......@@ -72,7 +72,7 @@ newEntity{ define_as = "ORB_MANY_WAYS",
display = "*", color=colors.VIOLET,
encumber = 1,
desc = [[The orb projects images of distance places, some that seem to not be of this world, switching rapidly.
If used near an portal it could probably activate it.]],
If used near a portal it could probably activate it.]],
max_power = 50, power_regen = 1,
use_power = { name = "activate a portal", power = 25,
......
......@@ -24,7 +24,7 @@ newEntity{
display = "_", color=colors.WHITE,
encumber = 0.7,
use_sound = "talents/spell_generic",
elec_destroy = 20,
elec_destroy = {{10,1}, {20,2}, {40,5}, {60,10}, {120,20}},
desc = [[Magical wands are made by powerful alchemists to store spells. Anybody can use them to release the spells.]],
-- egos = "/data/general/objects/egos/wands.lua", egos_chance = resolvers.mbonus(10, 5),
}
......@@ -578,3 +578,27 @@ newTalent{
The damage will increase with the Dexterity stat]]):format(20 + (self:getDex() * self:getTalentLevel(t)) * 0.3)
end,
}
newTalent{
name = "Throw Boulder",
type = {"wild-gift/other", },
points = 5,
equilibrium = 5,
cooldown = 3,
tactical = {
ATTACK = 10,
},
range = 20,
action = function(self, t)
local tg = {type="ball", range=self:getTalentRange(t), radius=1, talent=t}
local x, y = self:getTarget(tg)
if not x or not y then return nil end
self:project(tg, x, y, DamageType.PHYSKNOCKBACK, {dist=3+self:getTalentLevelRaw(t), dam=self:spellCrit(12 + self:getStr(50) * self:getTalentLevel(t))}, {type="archery"})
game:playSoundNear(self, "talents/ice")
return true
end,
info = function(self, t)
return ([[Throws a huge boulder at a target, damaging it for %0.2f and knocking it back.
The damage will increase with the Strength stat]]):format(12 + self:getStr(50) * self:getTalentLevel(t))
end,
}
......@@ -18,6 +18,8 @@
-- darkgod@te4.org
load("/data/general/npcs/xorn.lua")
load("/data/general/npcs/canine.lua", function(e) if e.rarity then e.rarity = e.rarity * 2 end end)
load("/data/general/npcs/snow-giant.lua")
local Talents = require("engine.interface.ActorTalents")
......
......@@ -270,6 +270,7 @@ static int lua_fovcache_set(lua_State *L)
int y = luaL_checknumber(L, 3);
bool opaque = lua_toboolean(L, 4);
if (x < 0 || y < 0 || x >= cache->w || y >= cache->h) return 0;
cache->cache[x + y * cache->w] = opaque;
return 0;
......
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