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

escort dev

git-svn-id: http://svn.net-core.org/repos/t-engine4@862 51575b47-30f0-44d4-a5cc-537603b46e54
parent 2ba104bd
No related branches found
No related tags found
No related merge requests found
......@@ -551,7 +551,8 @@ function _M:setupCommands()
[{"_d","ctrl"}] = function()
if config.settings.tome.cheat then
self.player:forceLevelup(50)
self:changeLevel(1, "eruan")
-- self:changeLevel(1, "eruan")
self.player:grantQuest("escort-duty")
end
end,
}
......
......@@ -25,14 +25,14 @@ kind = {}
name = ""
desc = function(self, who)
local desc = {}
desc[#desc+1] = "Escort"
desc[#desc+1] = "Escort the "..self.kind.name.." to the recall portal on level "..self.level_name.."."
return table.concat(desc, "\n")
end
on_grant = function(self, who)
self.on_grant = nil
local types = {
{ name="warrior",
{ name="lost warrior",
types = {
["technique/combat-training"] = 0.7,
["technique/combat-techniques-active"] = 0.7,
......@@ -47,7 +47,48 @@ on_grant = function(self, who)
[who.STAT_STR] = 2,
[who.STAT_DEX] = 1,
[who.STAT_CON] = 2,
}
},
actor = {
type = "humanoid", subtype = "human",
display = "@", color=colors.UMBER,
name = "lost warrior", faction = who.faction,
desc = [[He looks tired and wounded.]],
autolevel = "warrior",
ai = "summoned", ai_real = "dumb_talented_simple", ai_state = { talent_in=3, },
stats = { str=18, dex=13, mag=5, con=15 },
body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1, QUIVER=1 },
resolvers.equip{ {type="weapon", subtype="greatsword", autoreq=true} },
resolvers.talents{ [who.T_STUNNING_BLOW]=1, },
lite = 4,
rank = 2,
level_range = {game.level.level, game.level.level}, exp_worth = 0,
max_life = 50,
life_rating = 5,
combat_armor = 3, combat_def = 3,
summoner = who,
quest_id = self.id,
on_die = function(self, who)
game.logPlayer(game.player, "#LIGHT_RED#The %s is dead, quest failed!", self.name)
game.player:setQuestStatus(self.quest_id, engine.Quest.FAILED)
end,
},
},
}
self.kind = rng.table(types)
-- Spawn actor
local x, y = util.findFreeGrid(who.x, who.y, 10, true, {[engine.Map.ACTOR]=true})
if not x then return end
local npc = mod.class.NPC.new(self.kind.actor)
npc:resolve()
npc:resolve(nil, true)
game.zone:addEntity(game.level, npc, "actor", x, y)
-- Setup quest
self.name = "Escort: "..self.kind.name
self.level_name = game.level.level.." of "..game.zone.name
end
......@@ -603,7 +603,12 @@ int main(int argc, char *argv[])
shaders_active = GLEW_ARB_shader_objects;
fbo_active = GLEW_EXT_framebuffer_object || GLEW_ARB_framebuffer_object;
if (!multitexture_active) shaders_active = FALSE;
if (!GLEW_VERSION_2_1) fbo_active = FALSE;
if (!GLEW_VERSION_2_1)
{
multitexture_active = FALSE;
shaders_active = FALSE;
fbo_active = FALSE;
}
boot_lua(2, FALSE, argc, argv);
......
......@@ -30,6 +30,8 @@
#include "libtcod.h"
#include "noise.h"
extern bool shaders_active;
typedef struct
{
TCOD_noise_t noise;
......@@ -243,6 +245,8 @@ static float tilablenoise3d(noise_t *n, double ix, double iy, double iz, double
static int noise_texture3d(lua_State *L)
{
if (!shaders_active) return 0;
noise_t *n = (noise_t*)auxiliar_checkclass(L, "noise{core}", 1);
int w = luaL_checknumber(L, 2);
int h = luaL_checknumber(L, 3);
......
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