From dd272590e4d18e3a6f31c6c06cae9adb5df67d45 Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Tue, 23 Aug 2011 14:15:55 +0000 Subject: [PATCH] Fixed tactical AI infos on some AOE talents git-svn-id: http://svn.net-core.org/repos/t-engine4@4229 51575b47-30f0-44d4-a5cc-537603b46e54 --- game/engines/default/engine/Game.lua | 4 ++-- game/modules/tome/data/talents/cursed/slaughter.lua | 1 + game/modules/tome/data/talents/spells/water.lua | 2 ++ game/modules/tome/data/talents/techniques/2hweapon.lua | 1 + src/core_lua.c | 1 + 5 files changed, 7 insertions(+), 2 deletions(-) diff --git a/game/engines/default/engine/Game.lua b/game/engines/default/engine/Game.lua index c81ecc4466..a28a6f4312 100644 --- a/game/engines/default/engine/Game.lua +++ b/game/engines/default/engine/Game.lua @@ -367,10 +367,10 @@ end function _M:setResolution(res, force) local r = available_resolutions[res] if force and not r then - local _, _, w, h = res:find("([0-9][0-9][0-9]+)x([0-9][0-9][0-9]+)") + local _, _, w, h, f = res:find("([0-9][0-9][0-9]+)x([0-9][0-9][0-9]+)(.*)") w = tonumber(w) h = tonumber(h) - if w and h then r = {w, h, false} end + if w and h then r = {w, h, f==" Fullscreen" and true or false} end end if not r then return false, "unknown resolution" end diff --git a/game/modules/tome/data/talents/cursed/slaughter.lua b/game/modules/tome/data/talents/cursed/slaughter.lua index 135b4343f4..bb8b0d9cbd 100644 --- a/game/modules/tome/data/talents/cursed/slaughter.lua +++ b/game/modules/tome/data/talents/cursed/slaughter.lua @@ -63,6 +63,7 @@ newTalent{ random_ego = "attack", cooldown = 15, hate = 0.2, + requires_target = true, action = function(self, t) if not self:hasAxeWeapon() and not self:hasCursedWeapon() then game.logPlayer(self, "You cannot use %s without an axe or a cursed weapon!", t.name) diff --git a/game/modules/tome/data/talents/spells/water.lua b/game/modules/tome/data/talents/spells/water.lua index 21fdd4ac79..f0c4a460df 100644 --- a/game/modules/tome/data/talents/spells/water.lua +++ b/game/modules/tome/data/talents/spells/water.lua @@ -103,6 +103,7 @@ newTalent{ tactical = { ESCAPE = 2, ATTACKAREA = 1, DISABLE = 1 }, direct_hit = true, range = 0, + requires_target = true, radius = function(self, t) return 1 + 0.5 * t.getDuration(self, t) end, @@ -149,6 +150,7 @@ newTalent{ tactical = { ATTACKAREA = 2 }, range = 0, radius = 3, + requires_target = true, target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), selffire=false} end, diff --git a/game/modules/tome/data/talents/techniques/2hweapon.lua b/game/modules/tome/data/talents/techniques/2hweapon.lua index 6cca1dfd54..4014bb5c42 100644 --- a/game/modules/tome/data/talents/techniques/2hweapon.lua +++ b/game/modules/tome/data/talents/techniques/2hweapon.lua @@ -29,6 +29,7 @@ newTalent{ tactical = { ATTACKAREA = 3 }, range = 0, radius = 1, + requires_target = true, target = function(self, t) return {type="ball", range=self:getTalentRange(t), selffire=false, radius=self:getTalentRadius(t)} end, diff --git a/src/core_lua.c b/src/core_lua.c index d67bc0f6c7..004fd5bb14 100644 --- a/src/core_lua.c +++ b/src/core_lua.c @@ -1649,6 +1649,7 @@ static int sdl_set_window_size(lua_State *L) int h = luaL_checknumber(L, 2); bool fullscreen = lua_toboolean(L, 3); + printf("Setting resolution to %dx%d (%s)\n", w, h, fullscreen ? "fullscreen" : "windowed"); do_resize(w, h, fullscreen); lua_pushboolean(L, TRUE); -- GitLab