diff --git a/game/engines/default/engine/Zone.lua b/game/engines/default/engine/Zone.lua index 32b0686fe23e66b048ec53c300e5a29409451ed1..31c14540f63b023ba93e54f5ce736a3055871d1d 100644 --- a/game/engines/default/engine/Zone.lua +++ b/game/engines/default/engine/Zone.lua @@ -81,14 +81,25 @@ function _M:updateBaseLevel() end end +function _M:getBaseName() + local name = self.short_name + local base = "/data" + local _, _, addon, rname = name:find("^([^+]+)%+(.+)$") + if addon and rname then + base = "/data-"..addon + name = rname + end + return base.."/zones/"..name.."/" +end + --- Loads basic entities lists local _load_zone = nil function _M:loadBaseLists() _load_zone = self - self.npc_list = self.npc_class:loadList("/data/zones/"..self.short_name.."/npcs.lua") - self.grid_list = self.grid_class:loadList("/data/zones/"..self.short_name.."/grids.lua") - self.object_list = self.object_class:loadList("/data/zones/"..self.short_name.."/objects.lua") - self.trap_list = self.trap_class:loadList("/data/zones/"..self.short_name.."/traps.lua") + self.npc_list = self.npc_class:loadList(self:getBaseName().."npcs.lua") + self.grid_list = self.grid_class:loadList(self:getBaseName().."grids.lua") + self.object_list = self.object_class:loadList(self:getBaseName().."objects.lua") + self.trap_list = self.trap_class:loadList(self:getBaseName().."traps.lua") _load_zone = nil end @@ -588,7 +599,7 @@ function _M:load(dynamic) local data = savefile_pipe:doLoad(game.save_name, "zone", nil, self.short_name) if not data and not dynamic then - local f, err = loadfile("/data/zones/"..self.short_name.."/zone.lua") + local f, err = loadfile(self:getBaseName().."zone.lua") if err then error(err) end setfenv(f, setmetatable({self=self, short_name=self.short_name}, {__index=_G})) data = f() @@ -603,7 +614,7 @@ function _M:load(dynamic) end for k, e in pairs(data) do self[k] = e end - self:onLoadZoneFile("/data/zones/"..self.short_name.."/") + self:onLoadZoneFile(self:getBaseName()) if self.on_loaded then self:on_loaded() end elseif not data and dynamic then data = dynamic diff --git a/game/engines/default/engine/version.lua b/game/engines/default/engine/version.lua index a51451912d3ce9e5f7fb3809b95525c4d6ff0441..a032dfc165f2f9c70270bfc5ce1fb6df1ec0c032 100644 --- a/game/engines/default/engine/version.lua +++ b/game/engines/default/engine/version.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org -- Engine Version -engine.version = {1,0,3,"te4",17} +engine.version = {1,0,4,"te4",17} engine.require_c_core = engine.version[5] engine.version_id = ("%s-%d_%d.%d.%d"):format(engine.version[4], engine.require_c_core, engine.version[1], engine.version[2], engine.version[3]) diff --git a/game/modules/example/init.lua b/game/modules/example/init.lua index 3d6b6e3ac6aa865c1e0e2e989d143d3d2cebbc9c..09d8e0e7a82f69316612f59fd27ab93306d1557d 100644 --- a/game/modules/example/init.lua +++ b/game/modules/example/init.lua @@ -22,8 +22,8 @@ long_name = "Example Module for T-Engine4" short_name = "example" author = { "DarkGod", "darkgod@te4.org" } homepage = "http://te4.org/modules:example" -version = {1,0,3} -engine = {1,0,3,"te4"} +version = {1,0,4} +engine = {1,0,4,"te4"} description = [[ This is *NOT* a game, just an example/template to make your own using the T-Engine4. ]] diff --git a/game/modules/example_realtime/init.lua b/game/modules/example_realtime/init.lua index ed3428939800cdc1fdfb96848faf139df1cd6801..eb31946d90fbe9c38cde483567f87d09b039afb3 100644 --- a/game/modules/example_realtime/init.lua +++ b/game/modules/example_realtime/init.lua @@ -22,8 +22,8 @@ long_name = "Realtime Example Module for T-Engine4" short_name = "example_realtime" author = { "DarkGod", "darkgod@te4.org" } homepage = "http://te4.org/modules:example" -version = {1,0,3} -engine = {1,0,3,"te4"} +version = {1,0,4} +engine = {1,0,4,"te4"} description = [[ This is *NOT* a game, just an example/template to make your own using the T-Engine4. ]] diff --git a/game/modules/tome/class/interface/Archery.lua b/game/modules/tome/class/interface/Archery.lua index 4724888671969b56368128a19bdcc8117aeaf3ab..ea899c67fe36ce28114c1df58d8e6d4159b65709 100644 --- a/game/modules/tome/class/interface/Archery.lua +++ b/game/modules/tome/class/interface/Archery.lua @@ -62,6 +62,9 @@ function _M:archeryAcquireTargets(tg, params) if offweapon then wtravel_speed = math.ceil(((weapon.travel_speed or 0) + (offweapon.travel_speed or 0)) / 2) end tg.speed = (tg.speed or 10) + (ammo.combat.travel_speed or 0) + (wtravel_speed or 0) + (self.travel_speed or 0) print("[PROJECTILE SPEED] ::", tg.speed) + + self:triggerHook{"Combat:archeryTargetKind", tg=tg, params=params, mode="target"} + local x, y = params.x, params.y if not x or not y then x, y = self:getTarget(tg) end if not x or not y then return nil end @@ -174,16 +177,16 @@ local function archery_projectile(tx, ty, tg, self, tmp) -- Does the blow connect? yes .. complex :/ if tg.archery.use_psi_archery then self.use_psi_combat = true end local atk, def = self:combatAttackRanged(weapon, ammo), target:combatDefenseRanged() - local dam, apr, armor = self:combatDamage(ammo), self:combatAPR(ammo), target:combatArmor() + local dam, apr, armor = self:combatDamage(ammo), self:combatAPR(ammo) + (weapon and weapon.apr or 0), target:combatArmor() atk = atk + (tg.archery.atk or 0) dam = dam + (tg.archery.dam or 0) + apr = apr + (tg.archery.apr or 0) print("[ATTACK ARCHERY] to ", target.name, " :: ", dam, apr, armor, "::", mult) -- If hit is over 0 it connects, if it is 0 we still have 50% chance local hitted = false local crit = false if self:checkHit(atk, def) and (self:canSee(target) or self:attr("blind_fight") or rng.chance(3)) then - apr = apr + (tg.archery.apr or 0) print("[ATTACK ARCHERY] raw dam", dam, "versus", armor, "with APR", apr) local pres = util.bound(target:combatArmorHardiness() / 100, 0, 1) @@ -487,6 +490,9 @@ function _M:archeryShoot(targets, talent, tg, params) tg.type = tg.type or weapon.tg_type or ammo.combat.tg_type or tg.type or "bolt" tg.talent = tg.talent or talent + params = params or {} + self:triggerHook{"Combat:archeryTargetKind", tg=tg, params=params, mode="fire"} + local dofire = function(weapon, targets) if not tg.range then tg.range=weapon.range or 6 end tg.display = tg.display or self:archeryDefaultProjectileVisual(realweapon, ammo) @@ -504,7 +510,7 @@ function _M:archeryShoot(targets, talent, tg, params) dofire(weapon, targets) elseif offweapon and targets.dual then dofire(weapon, targets.main) - dofire(offweapon, targets.off) + dofire(offweapon.combat, targets.off) else print("[SHOOT] error, mismatch between dual weapon/dual targets") end diff --git a/game/modules/tome/data/gfx/shockbolt/npc/humanoid_human_the_possessed.png b/game/modules/tome/data/gfx/shockbolt/npc/humanoid_human_the_possessed.png index cc268908645786e3a9ebcec043d3b87d72080be2..becea2974b9bb34bcc445d63202e7fd475b068f0 100644 Binary files a/game/modules/tome/data/gfx/shockbolt/npc/humanoid_human_the_possessed.png and b/game/modules/tome/data/gfx/shockbolt/npc/humanoid_human_the_possessed.png differ diff --git a/game/modules/tome/data/zones/maze/grids.lua b/game/modules/tome/data/zones/maze/grids.lua index 1ba0966de91829321b6882c78ac6adb912043820..c13215b0cebeb8be3396cf7ef3983d636202ae11 100644 --- a/game/modules/tome/data/zones/maze/grids.lua +++ b/game/modules/tome/data/zones/maze/grids.lua @@ -37,7 +37,7 @@ newEntity{ nice_editer = cracks_editer, block_move = function(self, x, y, who, act) if not who or not act or not who.player then return true end - require("engine.ui.Dialog"):yesnoLongPopup("Crack in the floor", "This area seems to have been hit by a huge tremor, breaking the floor in a huge crack.\nYou think you can jump to the level bellow.", 400, function(ret) if ret then + require("engine.ui.Dialog"):yesnoLongPopup("Crack in the floor", "This area appears to have been hit by a huge tremor, breaking the floor in a huge crack.\nYou think you can jump to the level below.", 400, function(ret) if ret then game:changeLevel(game.level.level + 1) end end, "Jump", "Stay") return true diff --git a/game/modules/tome/data/zones/maze/npcs.lua b/game/modules/tome/data/zones/maze/npcs.lua index d6a4097573d95eae3701e48b9d8a686781c76074..89fec0f50abf2998c5dd78eed1875512e4b01464 100644 --- a/game/modules/tome/data/zones/maze/npcs.lua +++ b/game/modules/tome/data/zones/maze/npcs.lua @@ -50,7 +50,7 @@ newEntity{ define_as = "HORNED_HORROR", name = "Horned Horror", display = "h", color=colors.VIOLET, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/horror_corrupted_horner_horror.png", display_h=2, display_y=-1}}}, - desc = [[A fearsome bull-headed monster, he swings a mighty axe as he curses all that defy him.]], + desc = [[Some horrible power has twisted this brutish minotaur into something altogether more terrifying. Huge tentacles undulate from its back as it clenches and unclenches its powerful fists.]], killer_message = "and revived as a mindless horror", level_range = {12, nil}, exp_worth = 2, max_life = 250, life_rating = 17, fixed_rating = true, @@ -101,7 +101,7 @@ newEntity{ define_as = "MINOTAUR_MAZE", name = "Minotaur of the Labyrinth", display = "H", color=colors.VIOLET, resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/giant_minotaur_minotaur_of_the_labyrinth.png", display_h=2, display_y=-1}}}, - desc = [[A fearsome bull-headed monster, he swings a mighty axe as he curses all that defy him.]], + desc = [[A fearsome bull-headed monster, he swings a mighty axe as he curses all who defy him.]], killer_message = "and hung on a wall-spike", level_range = {12, nil}, exp_worth = 2, max_life = 250, life_rating = 17, fixed_rating = true, diff --git a/game/modules/tome/data/zones/ruins-kor-pul/npcs.lua b/game/modules/tome/data/zones/ruins-kor-pul/npcs.lua index c2d41d5a5311b7768613636777306b58fd599fc3..3c42e47348f8516883e79364a82d414d23efc832 100644 --- a/game/modules/tome/data/zones/ruins-kor-pul/npcs.lua +++ b/game/modules/tome/data/zones/ruins-kor-pul/npcs.lua @@ -85,6 +85,7 @@ newEntity{ define_as = "SHADE", newEntity{ base = "BASE_NPC_THIEF", define_as = "THE_POSSESSED", allow_infinite_dungeon = true, name = "The Possessed", color=colors.VIOLET, + resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_human_the_possessed.png", display_h=2, display_y=-1}}}, desc = [[He is the leader of a gang of bandits that killed the Shade of Kor'Pul, however it is obvious the Shade was merely displaced. It is now possessing the corpse of his killer.]], killer_message = "and used as a new host", level_range = {7, nil}, exp_worth = 2, diff --git a/game/modules/tome/init.lua b/game/modules/tome/init.lua index fdffc2b1f364761e25a696ffefd4b596700a7f46..19a6de06a3020b423cc891638ce5448fdeff3e2a 100644 --- a/game/modules/tome/init.lua +++ b/game/modules/tome/init.lua @@ -22,8 +22,8 @@ long_name = "Tales of Maj'Eyal: Age of Ascendancy" short_name = "tome" author = { "DarkGod", "darkgod@te4.org" } homepage = "http://te4.org/" -version = {1,0,3} -engine = {1,0,3,"te4"} +version = {1,0,4} +engine = {1,0,4,"te4"} description = [[ Welcome to Maj'Eyal.