diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index efc13d355d9a3aebc96b7c54814b401cebeb00aa..e7c53a8dda50b1db1b739a540d17ee7534ba5b5b 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -261,7 +261,7 @@ function _M:levelup() if not self.fixed_rating then rating = rng.range(math.floor(self.life_rating * 0.5), math.floor(self.life_rating * 1.5)) end - self.max_life = self.max_life + rating + self.max_life = self.max_life + rating + 5 + (self:knowTalent(self.T_IMPROVED_HEALTH_I) and 1 or 0) + (self:knowTalent(self.T_IMPROVED_HEALTH_II) and 1 or 0) + (self:knowTalent(self.T_IMPROVED_HEALTH_III) and 1 or 0) diff --git a/game/modules/tome/class/Grid.lua b/game/modules/tome/class/Grid.lua index e3574bd7823aac9c5496e83929c98bdf5dfcc3f8..5dc05e03f1bc141546f3f7f3769c73ca3cba881f 100644 --- a/game/modules/tome/class/Grid.lua +++ b/game/modules/tome/class/Grid.lua @@ -7,9 +7,9 @@ function _M:init(t, no_default) engine.Grid.init(self, t, no_default) end -function _M:block_move(x, y, e) +function _M:block_move(x, y, e, act) -- Open doors - if self.door_opened then + if self.door_opened and act then game.level.map(x, y, engine.Map.TERRAIN, game.zone.grid_list.DOOR_OPEN) return true end @@ -17,7 +17,7 @@ function _M:block_move(x, y, e) end function _M:tooltip() - local mx, my = core.mouse.get() - local tmx, tmy = game.level.map:getMouseTile(mx, my) - return tmx.."x"..tmy +-- local mx, my = core.mouse.get() +-- local tmx, tmy = game.level.map:getMouseTile(mx, my) +-- return tmx.."x"..tmy end diff --git a/game/modules/tome/class/interface/Combat.lua b/game/modules/tome/class/interface/Combat.lua index 536f3551fe664b19f4a880daf4a05c017b0832a8..8309ed9f5f733b98315f750615fba88b89d6ec19 100644 --- a/game/modules/tome/class/interface/Combat.lua +++ b/game/modules/tome/class/interface/Combat.lua @@ -120,19 +120,21 @@ function _M:attackTargetWith(target, weapon, damtype, mult) -- Does the blow connect? yes .. complex :/ local atk, def = self:combatAttack(weapon), target:combatDefense() local dam, apr, armor = self:combatDamage(weapon), self:combatAPR(weapon), target:combatArmor() - print("[ATTACK] with", weapon.name, " to ", target.name, " :: ", dam, apr, armor, "::", mult) + print("[ATTACK] 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 if self:checkHit(atk, def) then + print("[ATTACK] raw dam", dam, "versus", armor, "with APR", apr) local dam = math.max(0, dam - math.max(0, armor - apr)) local damrange = self:combatDamageRange(weapon) dam = rng.range(dam, dam * damrange) print("[ATTACK] after range", dam) local crit - dam = dam * mult dam, crit = self:physicalCrit(dam, weapon) print("[ATTACK] after crit", dam) + dam = dam * mult + print("[ATTACK] after mult", dam) if crit then game.logSeen(self, "%s performs a critical stike!", self.name:capitalize()) end DamageType:get(damtype).projector(self, target.x, target.y, damtype, math.max(0, dam)) hitted = true @@ -246,7 +248,7 @@ function _M:combatDamage(weapon) if weapon.dammod then for stat, mod in pairs(weapon.dammod) do if sub_con_to_str and stat == "str" then stat = "cun" end - add = add + (self:getStat(stat) - 10) * mod + add = add + (self:getStat(stat) - 10) * 0.7 * mod end end local talented_mod = self:combatCheckTraining(weapon) @@ -256,7 +258,7 @@ end --- Gets spellpower function _M:combatSpellpower(mod) mod = mod or 1 - return (self.combat_spellpower + self:getMag()) * mod + return (self.combat_spellpower + self:getMag() * 0.7) * mod end --- Gets spellcrit diff --git a/game/modules/tome/data/birth/rogue.lua b/game/modules/tome/data/birth/rogue.lua index 358e83f7cfe00f1ca682160ed6fd943017a32c04..038cd97207cf5eb42b115f31eaf1bc301d8d6474 100644 --- a/game/modules/tome/data/birth/rogue.lua +++ b/game/modules/tome/data/birth/rogue.lua @@ -37,8 +37,8 @@ newBirthDescriptor{ talents_types = { ["technique/dualweapon-attack"]={true, 0.3}, ["technique/dualweapon-training"]={true, 0.3}, - ["technique/combat-training-active"]={false, 0.3}, - ["technique/combat-training-passive"]={false, 0.3}, + ["technique/combat-techniques-active"]={true, 0.3}, + ["technique/combat-techniques-passive"]={true, 0.3}, ["technique/weapon-training"]={true, 0.3}, ["cunning/stealth"]={true, 0.3}, ["cunning/traps"]={false, 0.3}, @@ -69,8 +69,8 @@ newBirthDescriptor{ ["spell/conveyance"]={true, 0}, ["technique/dualweapon-attack"]={true, 0.2}, ["technique/dualweapon-training"]={true, 0.2}, - ["technique/combat-training-active"]={true, 0.2}, - ["technique/combat-training-passive"]={false, 0.2}, + ["technique/combat-techniques-active"]={true, 0.3}, + ["technique/combat-techniques-passive"]={true, 0.3}, ["technique/weapon-training"]={true, 0.2}, ["cunning/stealth"]={false, 0.3}, ["cunning/survival"]={true, 0.1}, diff --git a/game/modules/tome/data/birth/warrior.lua b/game/modules/tome/data/birth/warrior.lua index b01c4fcb09511fe3196bde6159027ca8b0f2454e..92f675dbbc576973e7986fbdf1e1a310211ba236 100644 --- a/game/modules/tome/data/birth/warrior.lua +++ b/game/modules/tome/data/birth/warrior.lua @@ -35,8 +35,8 @@ newBirthDescriptor{ ["technique/2hweapon-cripple"]={false, -0.1}, ["technique/dualweapon-attack"]={false, -0.1}, ["technique/dualweapon-training"]={false, -0.1}, - ["technique/combat-training-active"]={true, 0.3}, - ["technique/combat-training-passive"]={true, 0.3}, + ["technique/combat-techniques-active"]={true, 0.3}, + ["technique/combat-techniques-passive"]={true, 0.3}, ["technique/weapon-training"]={true, 0.3}, ["cunning/survival"]={true, 0}, ["cunning/dirty"]={false, 0}, @@ -72,8 +72,8 @@ newBirthDescriptor{ ["technique/2hweapon-cripple"]={false, 0.3}, ["technique/dualweapon-attack"]={false, -0.1}, ["technique/dualweapon-training"]={false, -0.1}, - ["technique/combat-training-active"]={true, 0.3}, - ["technique/combat-training-passive"]={true, 0.3}, + ["technique/combat-techniques-active"]={true, 0.3}, + ["technique/combat-techniques-passive"]={true, 0.3}, ["technique/weapon-training"]={true, 0.3}, ["cunning/survival"]={true, 0}, ["cunning/dirty"]={false, 0}, diff --git a/game/modules/tome/data/general/objects/2haxes.lua b/game/modules/tome/data/general/objects/2haxes.lua new file mode 100644 index 0000000000000000000000000000000000000000..ceea352862d394ec4471b4801d534820fb3be6cf --- /dev/null +++ b/game/modules/tome/data/general/objects/2haxes.lua @@ -0,0 +1,78 @@ +newEntity{ + define_as = "BASE_BATTLEAXE", + slot = "MAINHAND", + slot_forbid = "OFFHAND", + type = "weapon", subtype="battleaxe", + add_name = " (#COMBAT#)", + display = "/", color=colors.SLATE, + encumber = 3, + rarity = 3, + combat = { talented = "axe", damrange = 1.5 }, + desc = [[Massive two-handed battleaxes.]], + twohanded = true, +} + +newEntity{ base = "BASE_BATTLEAXE", + name = "iron battleaxe", + level_range = {1, 10}, + require = { stat = { str=11 }, }, + cost = 5, + combat = { + dam = resolvers.rngavg(6,12), + apr = 1, + physcrit = 4.5, + dammod = {str=1.2}, + }, +} + +newEntity{ base = "BASE_BATTLEAXE", + name = "steel battleaxe", + level_range = {10, 20}, + require = { stat = { str=16 }, }, + cost = 10, + combat = { + dam = resolvers.rngavg(15,23), + apr = 2, + physcrit = 5, + dammod = {str=1.2}, + }, +} + +newEntity{ base = "BASE_BATTLEAXE", + name = "dwarven-steel battleaxe", + level_range = {20, 30}, + require = { stat = { str=24 }, }, + cost = 15, + combat = { + dam = resolvers.rngavg(28,35), + apr = 2, + physcrit = 6.5, + dammod = {str=1.2}, + }, +} + +newEntity{ base = "BASE_BATTLEAXE", + name = "galvorn battleaxe", + level_range = {30, 40}, + require = { stat = { str=35 }, }, + cost = 25, + combat = { + dam = resolvers.rngavg(40,48), + apr = 3, + physcrit = 7.5, + dammod = {str=1.2}, + }, +} + +newEntity{ base = "BASE_BATTLEAXE", + name = "mithril battleaxe", + level_range = {40, 50}, + require = { stat = { str=48 }, }, + cost = 35, + combat = { + dam = resolvers.rngavg(54, 60), + apr = 4, + physcrit = 8, + dammod = {str=1.2}, + }, +} diff --git a/game/modules/tome/data/general/objects/egos/amulets.lua b/game/modules/tome/data/general/objects/egos/amulets.lua index 01153c9e2297d8521daba67e24f60648aa33b946..628963c3bb4a06894cd8588238af6f436fd0dd50 100644 --- a/game/modules/tome/data/general/objects/egos/amulets.lua +++ b/game/modules/tome/data/general/objects/egos/amulets.lua @@ -27,28 +27,32 @@ newEntity{ wielder = {}, resolvers.generic(function(e) local tts = { - "physical/2hweapon", - "physical/dualweapon", - "physical/shield", - "physical/weapon-training", - "physical/combat-training", - - "cunning/stealth", - "cunning/traps", "cunning/dirty", + "cunning/stealth", + "cunning/survival", - "spell/arcane", - "spell/fire", - "spell/earth", - "spell/water", "spell/air", + "spell/arcane", "spell/conveyance", - "spell/nature", - "spell/meta", "spell/divination", - "spell/temporal", - "spell/phantasm", + "spell/earth", + "spell/fire", + "spell/meta", + "spell/nature", "spell/necromancy", + "spell/phantasm", + "spell/temporal", + "spell/water", + + "technique/2hweapon-cripple", + "technique/2hweapon-offense", + "technique/combat-techniques-active", + "technique/combat-techniques-passive", + "technique/combat-training", + "technique/dualweapon-attack", + "technique/dualweapon-training", + "technique/shield-defense", + "technique/shield-offense", } local tt = tts[rng.range(1, #tts)] diff --git a/game/modules/tome/data/general/objects/heavy-boots.lua b/game/modules/tome/data/general/objects/heavy-boots.lua new file mode 100644 index 0000000000000000000000000000000000000000..c255cad8fb26259d91e5f34b508a2da944f3efba --- /dev/null +++ b/game/modules/tome/data/general/objects/heavy-boots.lua @@ -0,0 +1,42 @@ +local Talents = require "engine.interface.ActorTalents" + +newEntity{ + define_as = "BASE_HEAVY_BOOTS", + slot = "HEAD", + type = "armor", subtype="feet", + display = "]", color=colors.SLATE, + require = { talent = { Talents.T_HEAVY_ARMOUR_TRAINING }, }, + encumber = 3, + rarity = 7, + desc = [[Heavy boots, with metal strips at the toes, heels and other vulnerable parts, to better protect the wearer's feet from harm.]], +} + +newEntity{ base = "BASE_HEAVY_BOOTS", + name = "pair of iron boots", + level_range = {1, 20}, + cost = 5, + wielder = { + combat_armor = 3, + fatigue = 2, + }, +} + +newEntity{ base = "BASE_HEAVY_BOOTS", + name = "pair of dwarven-steel boots", + level_range = {20, 40}, + cost = 7, + wielder = { + combat_armor = 4, + fatigue = 3, + }, +} + +newEntity{ base = "BASE_HEAVY_BOOTS", + name = "pair of mithril boots", + level_range = {40, 50}, + cost = 10, + wielder = { + combat_armor = 5, + fatigue = 4, + }, +} diff --git a/game/modules/tome/data/general/objects/helms.lua b/game/modules/tome/data/general/objects/helms.lua new file mode 100644 index 0000000000000000000000000000000000000000..37a9d72b850cf4ce7e80d99aef71150afaf998eb --- /dev/null +++ b/game/modules/tome/data/general/objects/helms.lua @@ -0,0 +1,42 @@ +local Talents = require "engine.interface.ActorTalents" + +newEntity{ + define_as = "BASE_HELM", + slot = "HEAD", + type = "armor", subtype="head", + display = "]", color=colors.SLATE, + require = { talent = { Talents.T_HEAVY_ARMOUR_TRAINING }, }, + encumber = 3, + rarity = 7, + desc = [[A large helmet that can protect the entire head. Ventilation and bad vision can be a problem, however.]], +} + +newEntity{ base = "BASE_HELM", + name = "iron helm", + level_range = {1, 20}, + cost = 5, + wielder = { + combat_armor = 3, + fatigue = 5, + }, +} + +newEntity{ base = "BASE_HELM", + name = "dwarven-steel helm", + level_range = {20, 40}, + cost = 7, + wielder = { + combat_armor = 4, + fatigue = 4, + }, +} + +newEntity{ base = "BASE_HELM", + name = "mithril helm", + level_range = {40, 50}, + cost = 10, + wielder = { + combat_armor = 5, + fatigue = 5, + }, +} diff --git a/game/modules/tome/data/general/objects/leather-boots.lua b/game/modules/tome/data/general/objects/leather-boots.lua new file mode 100644 index 0000000000000000000000000000000000000000..7f9232333ac319b367857e851f9932ebaf80af64 --- /dev/null +++ b/game/modules/tome/data/general/objects/leather-boots.lua @@ -0,0 +1,39 @@ +newEntity{ + define_as = "BASE_LEATHER_BOOT", + slot = "BODY", + type = "armor", subtype="feet", + display = "]", color=colors.UMBER, + encumber = 2, + rarity = 6, + desc = [[A pair of boots made of leather.]], +} + +newEntity{ base = "BASE_LEATHER_BOOT", + name = "pair of rough leather boots", + level_range = {1, 20}, + cost = 2, + wielder = { + combat_armor = 1, + fatigue = 1, + }, +} + +newEntity{ base = "BASE_LEATHER_BOOT", + name = "pair of hardened leather boots", + level_range = {20, 40}, + cost = 4, + wielder = { + combat_armor = 3, + fatigue = 3, + }, +} + +newEntity{ base = "BASE_LEATHER_BOOT", + name = "pair of drakeskin leather boots", + level_range = {40, 50}, + cost = 7, + wielder = { + combat_armor = 5, + fatigue = 5, + }, +} diff --git a/game/modules/tome/data/general/objects/leather-caps.lua b/game/modules/tome/data/general/objects/leather-caps.lua new file mode 100644 index 0000000000000000000000000000000000000000..551cfcd8d0c58884ccd4b6ed9dc2e2d5bfcb7e0f --- /dev/null +++ b/game/modules/tome/data/general/objects/leather-caps.lua @@ -0,0 +1,39 @@ +newEntity{ + define_as = "BASE_LEATHER_CAP", + slot = "BODY", + type = "armor", subtype="head", + display = "]", color=colors.UMBER, + encumber = 2, + rarity = 6, + desc = [[A cap made of leather.]], +} + +newEntity{ base = "BASE_LEATHER_CAP", + name = "rough leather cap", + level_range = {1, 20}, + cost = 2, + wielder = { + combat_armor = 1, + fatigue = 1, + }, +} + +newEntity{ base = "BASE_LEATHER_CAP", + name = "hardened leather cap", + level_range = {20, 40}, + cost = 4, + wielder = { + combat_armor = 3, + fatigue = 3, + }, +} + +newEntity{ base = "BASE_LEATHER_CAP", + name = "drakeskin leather cap", + level_range = {40, 50}, + cost = 7, + wielder = { + combat_armor = 5, + fatigue = 5, + }, +} diff --git a/game/modules/tome/data/general/objects/objects.lua b/game/modules/tome/data/general/objects/objects.lua index 58d15d1c9e8f23026319ef6807c07a5f84042d47..162f093b07571e0717165d903956e58806dd0d9b 100644 --- a/game/modules/tome/data/general/objects/objects.lua +++ b/game/modules/tome/data/general/objects/objects.lua @@ -10,12 +10,16 @@ load("/data/general/objects/jewelry.lua") -- Weapons load("/data/general/objects/staves.lua") +load("/data/general/objects/knifes.lua") + load("/data/general/objects/swords.lua") load("/data/general/objects/2hswords.lua") -load("/data/general/objects/knifes.lua") + --load("/data/general/objects/maces.lua") load("/data/general/objects/2hmaces.lua") + --load("/data/general/objects/axes.lua") +load("/data/general/objects/2haxes.lua") -- Armours load("/data/general/objects/shields.lua") @@ -24,5 +28,12 @@ load("/data/general/objects/light-armors.lua") load("/data/general/objects/heavy-armors.lua") load("/data/general/objects/massive-armors.lua") +-- Head, feet, hands, ... +load("/data/general/objects/leather-caps.lua") +load("/data/general/objects/helms.lua") +load("/data/general/objects/leather-boots.lua") +load("/data/general/objects/heavy-boots.lua") +--load("/data/general/objects/gloves.lua") + -- Artifacts load("/data/general/objects/world-artifacts.lua") diff --git a/game/modules/tome/data/general/objects/scrolls.lua b/game/modules/tome/data/general/objects/scrolls.lua index 952bb4f614dac9d2614b60affa0b5d7310094302..c8d4e165d47f782426e0fe6420974701b6122683 100644 --- a/game/modules/tome/data/general/objects/scrolls.lua +++ b/game/modules/tome/data/general/objects/scrolls.lua @@ -17,7 +17,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=false, radius=15}, self.x, self.y, DamageType.LIGHT, 1) + who:project({type="ball", range=0, friendlyfire=false, radius=15}, who.x, who.y, DamageType.LIGHT, 1) game.logSeen(who, "%s reads a %s!", who.name:capitalize(), self:getName()) return "destroy", true end} @@ -109,8 +109,8 @@ newEntity{ base = "BASE_SCROLL", cost = 5, use_simple = { name="detect enemies within a certain range", use = function(self, who) - local rad = 15 + self:getMag(20) - self:setEffect(self.EFF_SENSE, 2, { + local rad = 15 + who:getMag(20) + who:setEffect(who.EFF_SENSE, 2, { range = rad, actor = 1, }) diff --git a/game/modules/tome/data/general/objects/world-artifacts.lua b/game/modules/tome/data/general/objects/world-artifacts.lua index e314d6a38735242779cbdc3e6a3e4ef320be2e91..b0b668b30ddb85d455a6e2a20e3330c98e0225ca 100644 --- a/game/modules/tome/data/general/objects/world-artifacts.lua +++ b/game/modules/tome/data/general/objects/world-artifacts.lua @@ -1,13 +1,12 @@ +local Stats = require "engine.interface.ActorStats" + -- This file describes artifact not bound to a special location, they can be found anywhere -newEntity{ +newEntity{ base = "BASE_STAFF", unique = true, - slot = "MAINHAND", - type = "weapon", subtype="staff", name = "Staff of Destruction", unided_name = "ash staff", level_range = {20, 25}, - display = "\\", color=colors.VIOLET, - encumber = 6, + color=colors.VIOLET, rarity = 100, desc = [[This unique looking staff is carved with runes of destruction.]], cost = 5000, @@ -24,37 +23,88 @@ newEntity{ }, } -newEntity{ +newEntity{ base = "BASE_RING", + unique = true, + name = "Ring of Ulmo", color = colors.LIGHT_BLUE, + unided_name = "sea-blue ring", + desc = [[This azure ring seems to be always moist to the touch.]], + level_range = {10, 20}, + rarity = 150, + cost = 5000, + + max_power = 60, power_regen = 1, + use_power = { name = "summon a tidal wave", power = 60, + use = function(self, who) + local duration = 7 + local radius = 1 + local dam = 20 + -- Add a lasting map effect + game.level.map:addEffect(who, + who.x, who.y, duration, + DamageType.WAVE, dam, + radius, + 5, nil, + engine.Entity.new{alpha=100, display='', color_br=30, color_bg=60, color_bb=200}, + function(e) + e.radius = e.radius + 1 + end, + false + ) + game.logSeen(who, "%s brandishes the %s, calling forth the might of the oceans!", who.name:capitalize(), self:getName()) + end + }, + wielder = { + inc_stats = { [Stats.STAT_WIL] = 4, [Stats.STAT_CON] = 3 }, + max_mana = 20, + max_stamina = 20, + resists = { + [DamageType.COLD] = 25, + [DamageType.NATURE] = 10, + }, + }, +} + +newEntity{ base = "BASE_LITE", unique = true, - slot = "LITE", - type = "jewelry", subtype="lite", name = "Phial of Galadriel", unided_name = "glowing phial", level_range = {1, 10}, - display = "~", color=colors.YELLOW, + color=colors.YELLOW, encumber = 1, rarity = 100, desc = [[A small crystal phial, with the light of Earendil's Star contained inside. Its light is imperishable, and near it darkness cannot endure.]], cost = 2000, + 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) + game.logSeen(who, "%s brandishes the %s and banishes all shadows!", who.name:capitalize(), self:getName()) + end + }, wielder = { lite = 4, }, } -newEntity{ +newEntity{ base = "BASE_LITE", unique = true, - slot = "LITE", - type = "jewlery", subtype="lite", name = "Arkenstone of Thrain", unided_name = "great jewel", level_range = {20, 30}, - display = "~", color=colors.YELLOW, + color=colors.YELLOW, encumber = 1, rarity = 250, desc = [[A great globe seemingly filled with moonlight, the famed Heart of the Mountain, which splinters the light that falls upon it into a thousand glowing shards.]], cost = 4000, + max_power = 150, power_regen = 1, + use_power = { name = "map surroundings", power = 100, + use = function(self, who) + who:magicMap(20) + game.logSeen(who, "%s brandishes the %s which glitters in all directions!", who.name:capitalize(), self:getName()) + end + }, wielder = { lite = 5, }, diff --git a/game/modules/tome/data/talents/techniques/2hweapon.lua b/game/modules/tome/data/talents/techniques/2hweapon.lua index fe0b52a7f86a495847a704e126f42ba3abd6d646..f4c2362161ee480d1ad6ac65bc329658b6e874f5 100644 --- a/game/modules/tome/data/talents/techniques/2hweapon.lua +++ b/game/modules/tome/data/talents/techniques/2hweapon.lua @@ -123,7 +123,7 @@ newTalent{ end self.combat_physcrit = self.combat_physcrit + 100 - local speed, hit = self:attackTargetWith(target, weapon.combat, nil, 2 + self:getTalentLevel(t) / 5) + local speed, hit = self:attackTargetWith(target, weapon.combat, nil, 1.4 + self:getTalentLevel(t) / 6) if self:getTalentLevel(t) >= 4 then self.combat_dam = self.combat_dam - inc @@ -145,7 +145,7 @@ newTalent{ end, info = function(self, t) return ([[Tries to perform a killing blow doing %d%% weapon damage, granting automatic critical hit. If the target ends up with low enough life it might be instantly killed. - At level 4 it drains all remaining stamina and uses it to increase the blow damage.]]):format(100 * (2 + self:getTalentLevel(t) / 5)) + At level 4 it drains all remaining stamina and uses it to increase the blow damage.]]):format(100 * (1.4 + self:getTalentLevel(t) / 6)) end, } @@ -170,7 +170,7 @@ newTalent{ local x, y, target = self:getTarget(tg) if not x or not y or not target then return nil end if math.floor(core.fov.distance(self.x, self.y, x, y)) > 1 then return nil end - local speed, hit = self:attackTargetWith(target, weapon.combat, nil, 1.5 + self:getTalentLevel(t) / 10) + local speed, hit = self:attackTargetWith(target, weapon.combat, nil, 1.2 + self:getTalentLevel(t) / 10) -- Try to stun ! if hit then @@ -184,7 +184,7 @@ newTalent{ return true end, info = function(self, t) - return ([[Hits the target with your weapon doing %d%% damage, if the atatck hits, the target is stunned.]]):format(100 * (1.5 + self:getTalentLevel(t) / 10)) + return ([[Hits the target with your weapon doing %d%% damage, if the atatck hits, the target is stunned.]]):format(100 * (1.2 + self:getTalentLevel(t) / 10)) end, } @@ -278,7 +278,7 @@ newTalent{ local x, y, target = self:getTarget(tg) if not x or not y or not target then return nil end if math.floor(core.fov.distance(self.x, self.y, x, y)) > 1 then return nil end - local speed, hit = self:attackTargetWith(target, weapon.combat, nil, 2 + self:getTalentLevel(t) / 10) + local speed, hit = self:attackTargetWith(target, weapon.combat, nil, 1.4 + self:getTalentLevel(t) / 10) -- Try to stun ! if hit then @@ -292,6 +292,6 @@ newTalent{ return true end, info = function(self, t) - return ([[Hits the target with a mighty blow to the legs doing %d%% weapon damage, if the attack hits, the target is unable to move for %d turns.]]):format(100 * (2 + self:getTalentLevel(t) / 10), 2+self:getTalentLevel(t)) + return ([[Hits the target with a mighty blow to the legs doing %d%% weapon damage, if the attack hits, the target is unable to move for %d turns.]]):format(100 * (1.4 + self:getTalentLevel(t) / 10), 2+self:getTalentLevel(t)) end, } diff --git a/game/modules/tome/data/talents/techniques/dualweapon.lua b/game/modules/tome/data/talents/techniques/dualweapon.lua index 499460ed2c3e24a7fb57145b9303f03185958679..4b8cca3a9315c10da1434371a2ce07cc43fdb295 100644 --- a/game/modules/tome/data/talents/techniques/dualweapon.lua +++ b/game/modules/tome/data/talents/techniques/dualweapon.lua @@ -101,7 +101,7 @@ newTalent{ if math.floor(core.fov.distance(self.x, self.y, x, y)) > 1 then return nil end -- First attack with offhand - local speed, hit = self:attackTargetWith(target, offweapon.combat, nil, 1.8 + self:getTalentLevel(t) / 10) + local speed, hit = self:attackTargetWith(target, offweapon.combat, nil, 1.2 + self:getTalentLevel(t) / 10) -- Second attack with mainhand if hit then @@ -112,13 +112,13 @@ newTalent{ end -- Attack after the stun, to benefit from backstabs - self:attackTargetWith(target, weapon.combat, nil, 1.8 + self:getTalentLevel(t) / 10) + self:attackTargetWith(target, weapon.combat, nil, 1.2 + self:getTalentLevel(t) / 10) end return true end, info = function(self, t) - return ([[Hit wit your offhand weapon for %d%% damage, if the attack hits the target is stunned and you hit it with your mainhand weapon.]]):format(100 * (1.8 + self:getTalentLevel(t) / 10)) + return ([[Hit wit your offhand weapon for %d%% damage, if the attack hits the target is stunned and you hit it with your mainhand weapon.]]):format(100 * (1.2 + self:getTalentLevel(t) / 10)) end, } @@ -140,14 +140,14 @@ newTalent{ local x, y, target = self:getTarget(tg) if not x or not y or not target then return nil end if math.floor(core.fov.distance(self.x, self.y, x, y)) > 1 then return nil end - self:attackTarget(target, nil, 1.8 + self:getTalentLevel(t) / 10, true) - self:attackTarget(target, nil, 1.8 + self:getTalentLevel(t) / 10, true) - self:attackTarget(target, nil, 1.8 + self:getTalentLevel(t) / 10, true) + self:attackTarget(target, nil, 0.8 + self:getTalentLevel(t) / 10, true) + self:attackTarget(target, nil, 0.8 + self:getTalentLevel(t) / 10, true) + self:attackTarget(target, nil, 0.8 + self:getTalentLevel(t) / 10, true) return true end, info = function(self, t) - return ([[Lashes out a flurry of blows, hitting your target three times with each weapons for %d%% damage.]]):format(100 * (1.8 + self:getTalentLevel(t) / 10)) + return ([[Lashes out a flurry of blows, hitting your target three times with each weapons for %d%% damage.]]):format(100 * (0.8 + self:getTalentLevel(t) / 10)) end, } @@ -196,7 +196,7 @@ newTalent{ end, info = function(self, t) return ([[Attack your foes in a frontal arc doing %d%% weapon damage and making your targets bleed for %d each turn for %d turns.]]): - format(100 * (1.4 + self:getTalentLevel(t) / 10), self:getDex() * 0.5, 3 + self:getTalentLevel(t)) + format(100 * (1.2 + self:getTalentLevel(t) / 10), self:getDex() * 0.5, 3 + self:getTalentLevel(t)) end, } diff --git a/game/modules/tome/data/talents/techniques/weaponshield.lua b/game/modules/tome/data/talents/techniques/weaponshield.lua index 385e310c9b32af1060fc86884cfa9745abb3dd14..4f9e4a30042f4f0fa1a5a22e9e4b52afcd402804 100644 --- a/game/modules/tome/data/talents/techniques/weaponshield.lua +++ b/game/modules/tome/data/talents/techniques/weaponshield.lua @@ -12,7 +12,7 @@ newTalent{ action = function(self, t) local shield = self:hasShield() if not shield then - game.logPlayer(self, "You cannot use Shield Bash without a shield!") + game.logPlayer(self, "You cannot use Shield Pummel without a shield!") return nil end @@ -71,11 +71,11 @@ newTalent{ if math.floor(core.fov.distance(self.x, self.y, x, y)) > 1 then return nil end -- First attack with weapon - self:attackTarget(target, nil, 1.5 + self:getTalentLevel(t) / 10, true) + self:attackTarget(target, nil, 0.8 + self:getTalentLevel(t) / 10, true) -- Second attack with shield - self:attackTargetWith(target, shield.special_combat, nil, 1.5 + (self:getTalentLevel(t) + self:getTalentLevel(self.T_SHIELD_EXPERTISE) / 2) / 10) + self:attackTargetWith(target, shield.special_combat, nil, 0.8 + (self:getTalentLevel(t) + self:getTalentLevel(self.T_SHIELD_EXPERTISE) / 2) / 10) -- Third attack with shield - local speed, hit = self:attackTargetWith(target, shield.special_combat, nil, 1.5 + (self:getTalentLevel(t) + self:getTalentLevel(self.T_SHIELD_EXPERTISE)) / 10) + local speed, hit = self:attackTargetWith(target, shield.special_combat, nil, 0.8 + (self:getTalentLevel(t) + self:getTalentLevel(self.T_SHIELD_EXPERTISE)) / 10) -- Try to stun ! if hit then @@ -90,7 +90,7 @@ newTalent{ end, info = function(self, t) return ([[Hits the target with your weapon and two shield strikes doing %d%% damage, trying to overpower your target. - If the last attack hits, the target is knocked back.]]):format(100 * (1.5 + (self:getTalentLevel(t) + self:getTalentLevel(self.T_SHIELD_EXPERTISE) / 2) / 10)) + If the last attack hits, the target is knocked back.]]):format(100 * (0.8 + (self:getTalentLevel(t) + self:getTalentLevel(self.T_SHIELD_EXPERTISE) / 2) / 10)) end, } @@ -114,13 +114,13 @@ newTalent{ if math.floor(core.fov.distance(self.x, self.y, x, y)) > 1 then return nil end -- First attack with shield - local speed, hit = self:attackTargetWith(target, shield.special_combat, nil, 1.8 + (self:getTalentLevel(t) + self:getTalentLevel(self.T_SHIELD_EXPERTISE) / 2) / 10) + local speed, hit = self:attackTargetWith(target, shield.special_combat, nil, 1 + (self:getTalentLevel(t) + self:getTalentLevel(self.T_SHIELD_EXPERTISE) / 2) / 10) -- Second & third attack with weapon if hit then self.combat_physcrit = self.combat_physcrit + 1000 - self:attackTarget(target, nil, 1.8 + self:getTalentLevel(t) / 10, true) - self:attackTarget(target, nil, 1.8 + self:getTalentLevel(t) / 10, true) + self:attackTarget(target, nil, 1 + self:getTalentLevel(t) / 10, true) + self:attackTarget(target, nil, 1 + self:getTalentLevel(t) / 10, true) self.combat_physcrit = self.combat_physcrit - 1000 end @@ -128,7 +128,7 @@ newTalent{ end, info = function(self, t) return ([[Hits the target with shield doing %d%% damage. If it hits you follow up with 2 weapon strikes which are automatic crits.]]): - format(100 * (1.8 + (self:getTalentLevel(t) + self:getTalentLevel(self.T_SHIELD_EXPERTISE) / 2) / 10)) + format(100 * (1 + (self:getTalentLevel(t) + self:getTalentLevel(self.T_SHIELD_EXPERTISE) / 2) / 10)) end, } diff --git a/game/modules/tome/data/zones/maze/npcs.lua b/game/modules/tome/data/zones/maze/npcs.lua index 4eefa763a3b83d5d688bad6c2e438c3c23d8ebde..792da9c8fd937f3b26f340b82be2cfcd69518e6d 100644 --- a/game/modules/tome/data/zones/maze/npcs.lua +++ b/game/modules/tome/data/zones/maze/npcs.lua @@ -1,33 +1,39 @@ load("/data/general/npcs/vermin.lua") +load("/data/general/npcs/rodent.lua") load("/data/general/npcs/canine.lua") -load("/data/general/npcs/troll.lua") load("/data/general/npcs/snake.lua") load("/data/general/npcs/ooze.lua") load("/data/general/npcs/jelly.lua") local Talents = require("engine.interface.ActorTalents") --- The boss of trollshaws, no "rarity" field means it will not be randomly generated -newEntity{ define_as = "TROLL_BILL", - type = "giant", subtype = "troll", unique = true, - name = "Bill the Stone Troll", - display = "T", color=colors.VIOLET, - desc = [[Big, brawny, powerful and with a taste for hobbit. He has friends called Bert and Tom. - He is wielding a small tree trunk and towering toward you. - He should have turned to stone long ago, how could he still walk?!]], - level_range = {7, 10}, exp_worth = 2, +-- The boss of the maze, no "rarity" field means it will not be randomly generated +newEntity{ define_as = "MINOTAUR_MAZE", + type = "giant", subtype = "minotaur", unique = true, + name = "Minotaur of the Labyrinth", + display = "H", color=colors.VIOLET, + desc = [[A fearsome bull-headed monster, he swings a mighty axe as he curses all that defy him.]], + level_range = {12, 18}, exp_worth = 2, max_life = 250, life_rating = 17, fixed_rating = true, - max_stamina = 85, - stats = { str=25, dex=10, cun=8, mag=10, con=20 }, + max_stamina = 200, + stats = { str=25, dex=10, cun=8, mag=20, wil=20, con=20 }, body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 }, - equipment = resolvers.equip{ {type="weapon", subtype="greatmaul", defined="GREATMAUL_BILL_TRUNK"}, }, - drops = resolvers.drops{chance=100, nb=3, {ego_chance=100} }, + equipment = resolvers.equip{ + {type="weapon", subtype="battleaxe"}, + {type="armor", subtype="head", defined="HELM_OF_HAMMERHAND"}, + }, + drops = resolvers.drops{chance=100, nb=5, {ego_chance=100} }, talents = resolvers.talents{ - [Talents.T_STAMINA_POOL]=1, [Talents.T_STUN]=2, [Talents.T_KNOCKBACK]=1, + [Talents.T_STAMINA_POOL]=1, + [Talents.T_WARSHOUT]=1, + [Talents.T_STUNNING_BLOW]=1, + [Talents.T_SUNDER_ARMOUR]=1, + [Talents.T_SUNDER_ARMS]=1, + [Talents.T_CRUSH]=1, }, autolevel = "warrior", - ai = "dumb_talented_simple", ai_state = { talent_in=4, }, + ai = "dumb_talented_simple", ai_state = { talent_in=1, }, } diff --git a/game/modules/tome/data/zones/maze/objects.lua b/game/modules/tome/data/zones/maze/objects.lua index 8db31735bbd23c29e5c8d4c2c265962ac7c71426..cc68c49cb2933ca1e8d0e9090bc94f940e3ce8ab 100644 --- a/game/modules/tome/data/zones/maze/objects.lua +++ b/game/modules/tome/data/zones/maze/objects.lua @@ -1,20 +1,21 @@ load("/data/general/objects/objects.lua") --- Artifact, droped (and used!) by Bill the Stone Troll +local Stats = require"engine.interface.ActorStats" -newEntity{ base = "BASE_GREATMAUL", - define_as = "GREATMAUL_BILL_TRUNK", - name = "Bill's Tree Trunk", unique=true, - require = { stat = { str=25 }, }, - cost = 5, - combat = { - dam = 30, - apr = 7, - physcrit = 1.5, - dammod = {str=1.3}, - damrange = 1.7, - }, +-- Artifact, droped (and used!) by the Minautaur +newEntity{ base = "BASE_HELM", + define_as = "HELM_OF_HAMMERHAND", + name = "Steel Helm of Hammerhand", unique=true, + desc = [[A great helm as steady as the heroes of the Westdike. Mighty were the blows of Helm, the Hammerhand!]], + require = { level=11, }, + cost = 20, wielder = { + combat_armor = 3, + fatigue = 8, + inc_stats = { [Stats.STAT_STR] = 3, [Stats.STAT_CON] = 3, [Stats.STAT_WIL] = 4 }, + combat_physresist = 7, + combat_mentalresist = 7, + combat_spellresist = 7, }, } diff --git a/game/modules/tome/data/zones/maze/zone.lua b/game/modules/tome/data/zones/maze/zone.lua index 67fc0357e98c2f606a5a69b26c4e74a7d841fc7f..a928ce68692563ca6a34438809b497b4db0931b9 100644 --- a/game/modules/tome/data/zones/maze/zone.lua +++ b/game/modules/tome/data/zones/maze/zone.lua @@ -19,7 +19,7 @@ return { class = "engine.generator.actor.Random", nb_npc = {20, 30}, adjust_level = {-1, 2}, - guardian = "TROLL_BILL", + guardian = "MINOTAUR_MAZE", }, object = { class = "engine.generator.object.Random", diff --git a/game/modules/tome/data/zones/old-forest/npcs.lua b/game/modules/tome/data/zones/old-forest/npcs.lua index 9735af1ab46fbc8f4370890f7fdce96bfbb8465f..7b8f96580345476baf3ac8b83d08b005507ff36e 100644 --- a/game/modules/tome/data/zones/old-forest/npcs.lua +++ b/game/modules/tome/data/zones/old-forest/npcs.lua @@ -9,7 +9,7 @@ local Talents = require("engine.interface.ActorTalents") -- The boss of trollshaws, no "rarity" field means it will not be randomly generated newEntity{ define_as = "OLD_MAN_WILLOW", - type = "giant", subtype = "ent", unique = true, + type = "giant", subtype = "huorn", unique = true, name = "Old Man Willow", display = "#", color=colors.OLIVE_DRAB, desc = [[The ancient grey willow tree, ruler of the Old Forest. He despises @@ -17,7 +17,7 @@ newEntity{ define_as = "OLD_MAN_WILLOW", Enormous it looked, its sprawling branches going up like racing arms with may long-fingered hands, its knotted and twisted trunk gaping in wide fissures that creaked faintly as the boughs moved."]], - level_range = {7, 10}, exp_worth = 2, + level_range = {12, 18}, exp_worth = 2, max_life = 200, life_rating = 17, fixed_rating = true, max_stamina = 85, max_mana = 200, @@ -27,7 +27,7 @@ newEntity{ define_as = "OLD_MAN_WILLOW", body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 }, equipment = resolvers.equip{ {type="armor", subtype="shield", defined="OLD_MAN_WILLOW_SHIELD"}, }, - drops = resolvers.drops{chance=100, nb=3, {ego_chance=100} }, + drops = resolvers.drops{chance=100, nb=5, {ego_chance=100} }, talents = resolvers.talents{ [Talents.T_STAMINA_POOL]=1, [Talents.T_STUN]=2, diff --git a/game/modules/tome/data/zones/old-forest/objects.lua b/game/modules/tome/data/zones/old-forest/objects.lua index 33aaef3ef084436c110be194d5b2600fd129a1f7..8ee32809634d507e7496f8eeb462d7f21bb6a8d4 100644 --- a/game/modules/tome/data/zones/old-forest/objects.lua +++ b/game/modules/tome/data/zones/old-forest/objects.lua @@ -5,6 +5,7 @@ load("/data/general/objects/objects.lua") newEntity{ base = "BASE_SHIELD", define_as = "OLD_MAN_WILLOW_SHIELD", name = "Old Man's Willow Barkwood", unique=true, + desc = [[The barkwood of the Old Man's Willow, made into roughtly the shape of a shield.]], require = { stat = { str=25 }, }, cost = 20, diff --git a/game/modules/tome/data/zones/tower-amon-sul/objects.lua b/game/modules/tome/data/zones/tower-amon-sul/objects.lua index fcb879de0b1f6237fc0fb4e6d557e91a5634ea58..cd1f9347928f61e098a8e7a41b3966fa79dfac80 100644 --- a/game/modules/tome/data/zones/tower-amon-sul/objects.lua +++ b/game/modules/tome/data/zones/tower-amon-sul/objects.lua @@ -4,6 +4,7 @@ load("/data/general/objects/objects.lua") newEntity{ base = "BASE_STAFF", define_as = "STAFF_ANGMAR", rarity=false, name = "Angmar's Fall", unique=true, + desc = [[Made from the bones of of many creatures this staff glows with power. You can feel its evilness as you touch it.]], require = { stat = { mag=25 }, }, cost = 5, combat = { diff --git a/game/modules/tome/data/zones/trollshaws/objects.lua b/game/modules/tome/data/zones/trollshaws/objects.lua index 8db31735bbd23c29e5c8d4c2c265962ac7c71426..6c9e07dc1c398a2d0d44febb26ce7a6b55e8b373 100644 --- a/game/modules/tome/data/zones/trollshaws/objects.lua +++ b/game/modules/tome/data/zones/trollshaws/objects.lua @@ -5,6 +5,7 @@ load("/data/general/objects/objects.lua") newEntity{ base = "BASE_GREATMAUL", define_as = "GREATMAUL_BILL_TRUNK", name = "Bill's Tree Trunk", unique=true, + desc = [[This ia big nasty looking tree trunk that Bill was using as a weapon. It could still serve this purpose, should you be strong enough to wield it!]], require = { stat = { str=25 }, }, cost = 5, combat = { diff --git a/ideas/zones.ods b/ideas/zones.ods index dd93e8bfa647bba439392bab9a5fd931047c57da..933e16047a0e018dc590cb8113e4c59892e87356 100644 Binary files a/ideas/zones.ods and b/ideas/zones.ods differ diff --git a/src/map.c b/src/map.c index 7d56dc7ecbc5a4a6c354c9cc7606424ccf214d14..7237aa737008bb234f2ea464b6326e27a1cd4de7 100644 --- a/src/map.c +++ b/src/map.c @@ -107,6 +107,7 @@ static int map_set_grid(lua_State *L) GLuint *o = lua_isnil(L, 6) ? NULL : (GLuint*)auxiliar_checkclass(L, "gl{texture}", 6); GLuint *a = lua_isnil(L, 7) ? NULL : (GLuint*)auxiliar_checkclass(L, "gl{texture}", 7); + if (x < 0 || y < 0 || x >= map->w || y >= map->h) return 0; map->grids_terrain[x][y] = g ? *g : 0; map->grids_trap[x][y] = t ? *t : 0; map->grids_actor[x][y] = a ? *a : 0; @@ -121,6 +122,7 @@ static int map_set_seen(lua_State *L) int y = luaL_checknumber(L, 3); bool v = lua_toboolean(L, 4); + if (x < 0 || y < 0 || x >= map->w || y >= map->h) return 0; map->grids_seens[x][y] = v; return 0; } @@ -132,6 +134,7 @@ static int map_set_remember(lua_State *L) int y = luaL_checknumber(L, 3); bool v = lua_toboolean(L, 4); + if (x < 0 || y < 0 || x >= map->w || y >= map->h) return 0; map->grids_remembers[x][y] = v; return 0; } @@ -143,6 +146,7 @@ static int map_set_lite(lua_State *L) int y = luaL_checknumber(L, 3); bool v = lua_toboolean(L, 4); + if (x < 0 || y < 0 || x >= map->w || y >= map->h) return 0; map->grids_lites[x][y] = v; return 0; }