diff --git a/game/engine/Zone.lua b/game/engine/Zone.lua index 14d094d2d2fd6d3dc294bceb214774acf7154a48..17eb274a66086cf839b7b2e170b77e9a3818281a 100644 --- a/game/engine/Zone.lua +++ b/game/engine/Zone.lua @@ -488,7 +488,7 @@ function _M:newLevel(level_data, lev, old_lev, game) -- Check for connectivity from entrance to exit local a = Astar.new(map, game:getPlayer()) print("[LEVEL GENERATION] checking entrance to exit A*", ux, uy, "to", dx, dy) - if ux and uy and dx and dy and (ux ~= dx or uy ~= dy) and not a:calc(ux, uy, dx, dy) then + if ux and uy and dx and dy and (ux ~= dx or uy ~= dy) and not spot.no_level_connectivity and not a:calc(ux, uy, dx, dy) then print("Level unconnected, no way from entrance to exit", ux, uy, "to", dx, dy) level:removed() return self:newLevel(level_data, lev, old_lev, game) diff --git a/game/modules/tome/class/interface/Combat.lua b/game/modules/tome/class/interface/Combat.lua index cb944d0e62f0e12eb48211121a82c6a1186942b9..a85b382029d7a17a4dc884ed6d314a03817e468d 100644 --- a/game/modules/tome/class/interface/Combat.lua +++ b/game/modules/tome/class/interface/Combat.lua @@ -181,6 +181,7 @@ function _M:archeryShoot(damtype, mult, on_hit, tg, params) local atk, def = self:combatAttack(weapon), target:combatDefense() local dam, apr, armor = self:combatDamage(ammo), self:combatAPR(ammo), target:combatArmor() print("[ATTACK] to ", target.name, " :: ", dam, apr, armor, "::", mult) + if not self:canSee(target) then atk = atk / 3 end -- If hit is over 0 it connects, if it is 0 we still have 50% chance local hitted = false @@ -262,6 +263,7 @@ function _M:attackTargetWith(target, weapon, damtype, mult) -- Does the blow connect? yes .. complex :/ local atk, def = self:combatAttack(weapon), target:combatDefenseRanged() + if not self:canSee(target) then atk = atk / 3 end local dam, apr, armor = self:combatDamage(weapon), self:combatAPR(weapon), target:combatArmor() print("[ATTACK] to ", target.name, " :: ", dam, apr, armor, "::", mult) diff --git a/game/modules/tome/data/damage_types.lua b/game/modules/tome/data/damage_types.lua index 69060956c59a30a596a256caf35b9427edebfb2e..5c2fb759d2ce20cd7e577b23dafbc378a81cdfca 100644 --- a/game/modules/tome/data/damage_types.lua +++ b/game/modules/tome/data/damage_types.lua @@ -144,14 +144,19 @@ newDamageType{ end, } --- Light up the room +-- Lite up the room newDamageType{ - name = "light", type = "LIGHT", text_color = "#YELLOW#", + name = "lite", type = "LITE", text_color = "#YELLOW#", projector = function(src, x, y, type, dam) game.level.map.lites(x, y, true) end, } +-- Light damage +newDamageType{ + name = "light", type = "LIGHT", text_color = "#YELLOW#", +} + -- Darkness damage newDamageType{ name = "darkness", type = "DARKNESS", text_color = "#DARK_GREY#", diff --git a/game/modules/tome/data/general/npcs/sunwall-human.lua b/game/modules/tome/data/general/npcs/sunwall-human.lua new file mode 100644 index 0000000000000000000000000000000000000000..8dece106191af0abfab154e5fdca6c04036c59c7 --- /dev/null +++ b/game/modules/tome/data/general/npcs/sunwall-human.lua @@ -0,0 +1,57 @@ +-- 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_SUNWALL_HUMAN", + type = "humanoid", subtype = "human", + display = "p", color=colors.WHITE, + faction = "sunwall", + + combat = { dam=resolvers.rngavg(1,2), atk=2, apr=0, dammod={str=0.4} }, + + body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1, QUIVER=1 }, + resolvers.drops{chance=20, nb=1, {} }, + + life_rating = 10, + rank = 2, + size_category = 3, + + open_door = true, + + autolevel = "warrior", + ai = "dumb_talented_simple", ai_state = { talent_in=3, }, + energy = { mod=1 }, + stats = { str=12, dex=8, mag=6, con=10 }, +} + +newEntity{ base = "BASE_NPC_SUNWALL_HUMAN", + name = "human sun-paladin", color=colors.GOLD, + desc = [[A human in a shiny plate armour.]], + level_range = {1, 50}, exp_worth = 1, + rarity = 6, + max_life = resolvers.rngavg(70,80), + resolvers.equip{ + {type="weapon", subtype="longsword", autoreq=true}, + {type="armor", subtype="shield", autoreq=true}, + {type="armor", subtype="heavy", autoreq=true}, + }, + resolvers.talents{ [Talents.T_HEAVY_ARMOUR_TRAINING]=1, [Talents.T_PERFECT_STRIKE]=1, }, +} diff --git a/game/modules/tome/data/general/npcs/swarm.lua b/game/modules/tome/data/general/npcs/swarm.lua index b639e35a2b450b492b428b1c5d06c88053abc3fa..893e6c63720fc2c481d14c46397c9b56a29de6a8 100644 --- a/game/modules/tome/data/general/npcs/swarm.lua +++ b/game/modules/tome/data/general/npcs/swarm.lua @@ -54,7 +54,7 @@ newEntity{ base = "BASE_NPC_INSECT", max_life = resolvers.rngavg(1,3), combat = { dam=2, atk=15, apr=20 }, - resolvers.talents{ [Talents.T_SPORE_POISON]=1 }, + resolvers.talents{ [Talents.T_BITE_POISON]=1 }, } newEntity{ base = "BASE_NPC_INSECT", @@ -65,7 +65,7 @@ newEntity{ base = "BASE_NPC_INSECT", max_life = resolvers.rngavg(3,5), combat = { dam=5, atk=15, apr=20 }, - resolvers.talents{ [Talents.T_SPORE_POISON]=2 }, + resolvers.talents{ [Talents.T_BITE_POISON]=2 }, } newEntity{ base = "BASE_NPC_INSECT", @@ -77,5 +77,5 @@ newEntity{ base = "BASE_NPC_INSECT", combat = { dam=10, atk=15, apr=20 }, can_multiply = 4, - resolvers.talents{ [Talents.T_SPORE_POISON]=3 }, + resolvers.talents{ [Talents.T_BITE_POISON]=3 }, } diff --git a/game/modules/tome/data/general/objects/scrolls.lua b/game/modules/tome/data/general/objects/scrolls.lua index 5adccb34b05d44aaa9a0adc71816237611010e4e..de16eed58f45322ef7e326eca7315087bd30af14 100644 --- a/game/modules/tome/data/general/objects/scrolls.lua +++ b/game/modules/tome/data/general/objects/scrolls.lua @@ -37,7 +37,7 @@ newEntity{ base = "BASE_SCROLL", cost = 1, use_simple = { name="light up the surrounding area", use = function(self, who) - who:project({type="ball", range=0, friendlyfire=true, radius=15}, who.x, who.y, engine.DamageType.LIGHT, 1) + who:project({type="ball", range=0, friendlyfire=true, radius=15}, who.x, who.y, engine.DamageType.LITE, 1) game.logSeen(who, "%s reads a %s!", who.name:capitalize(), self:getName()) return "destroy", true end} diff --git a/game/modules/tome/data/general/objects/world-artifacts.lua b/game/modules/tome/data/general/objects/world-artifacts.lua index f4c90e41a0ff390987fd0ad55758dbd23cb7723a..9aab483bc5815918d5731e567531d96e642fdcfe 100644 --- a/game/modules/tome/data/general/objects/world-artifacts.lua +++ b/game/modules/tome/data/general/objects/world-artifacts.lua @@ -122,7 +122,7 @@ newEntity{ base = "BASE_LITE", max_power = 15, power_regen = 1, use_power = { name = "call light", power = 10, use = function(self, who) - who:project({type="ball", range=0, friendlyfire=false, radius=20}, who.x, who.y, DamageType.LIGHT, 1) + who:project({type="ball", range=0, friendlyfire=false, radius=20}, who.x, who.y, DamageType.LITE, 1) game.logSeen(who, "%s brandishes the %s and banishes all shadows!", who.name:capitalize(), self:getName()) end }, diff --git a/game/modules/tome/data/talents/spells/phantasm.lua b/game/modules/tome/data/talents/spells/phantasm.lua index 8035bd18754f94844fe15da9a4e91d9621d21b70..bd0ab5243cb005373e9fbfa91ab6ad3d41124a5b 100644 --- a/game/modules/tome/data/talents/spells/phantasm.lua +++ b/game/modules/tome/data/talents/spells/phantasm.lua @@ -26,7 +26,7 @@ newTalent{ cooldown = 14, action = function(self, t) local tg = {type="ball", range=0, friendlyfire=true, radius=5 + self:getTalentLevel(t), talent=t} - self:project(tg, self.x, self.y, DamageType.LIGHT, 1) + self:project(tg, self.x, self.y, DamageType.LITE, 1) if self:getTalentLevel(t) >= 3 then tg.friendlyfire = false self:project(tg, self.x, self.y, DamageType.BLIND, 3 + self:getTalentLevel(t)) diff --git a/game/special/mainmenu/dialogs/EnterName.lua b/game/special/mainmenu/dialogs/EnterName.lua index 12077cc0634c66acf805f83d65b11284e5f1c501..caa1f7b4abce8894750f4f339dd51b2f06d02e08 100644 --- a/game/special/mainmenu/dialogs/EnterName.lua +++ b/game/special/mainmenu/dialogs/EnterName.lua @@ -56,7 +56,7 @@ function _M:init(runmod) -- And now run it! _G.game:run() else - engine.Dialog:simplePopup("Error", "Character name must be between 3 and 25 characters.") + engine.Dialog:simplePopup("Error", "Character name must be between 2 and 25 characters.") end end, _BACKSPACE = function() diff --git a/ideas/zones.ods b/ideas/zones.ods index 9afddee9c77d11c2fc8c8c5b03bcbec34964a8ef..df9d01592cae44af27a8f253b0a8d819096e632b 100644 Binary files a/ideas/zones.ods and b/ideas/zones.ods differ