diff --git a/game/engines/default/engine/interface/ActorInventory.lua b/game/engines/default/engine/interface/ActorInventory.lua index 07697a82f47df1855aa837882805e6d1f47a7a50..a7c4c1195329ff2d43592abc5979ee51751a9c9e 100644 --- a/game/engines/default/engine/interface/ActorInventory.lua +++ b/game/engines/default/engine/interface/ActorInventory.lua @@ -97,8 +97,8 @@ function _M:addObject(inven_id, o) -- Do whatever is needed when wearing this object if inven.worn then - o:check("on_wear", self) self:onWear(o) + o:check("on_wear", self) end self:onAddObject(o) @@ -164,8 +164,8 @@ function _M:removeObject(inven, item, no_unstack) -- Do whatever is needed when takingoff this object if inven.worn then - o:check("on_takeoff", self) self:onTakeoff(o) + o:check("on_takeoff", self) end self:onRemoveObject(o) diff --git a/game/modules/tome/data/damage_types.lua b/game/modules/tome/data/damage_types.lua index 6f03443379eb2201288fcf0268ba4f32a3c989db..29505b3fdbb52132befd0b11c66506c0a6fede32 100644 --- a/game/modules/tome/data/damage_types.lua +++ b/game/modules/tome/data/damage_types.lua @@ -567,6 +567,18 @@ newDamageType{ end, } +-- Physical damage + bleeding % of it +newDamageType{ + name = "physical + bleeding", type = "PHYSICALBLEED", + projector = function(src, x, y, type, dam) + local realdam = DamageType:get(DamageType.PHYSICAL).projector(src, x, y, DamageType.PHYSICAL, dam) + local target = game.level.map(x, y, Map.ACTOR) + if realdam > 0 and target and target:canBe("cut") then + target:setEffect(target.EFF_CUT, 5, {src=src, power=dam * 0.1}) + end + end, +} + -- Slime damage newDamageType{ name = "slime", type = "SLIME", diff --git a/game/modules/tome/data/general/encounters/arda-west.lua b/game/modules/tome/data/general/encounters/arda-west.lua index 8ead0fc8cb8486873adf9116a5fa7458ac7fcb0a..4c06c238aa7e743ffb4ea02c15448f445898adcc 100644 --- a/game/modules/tome/data/general/encounters/arda-west.lua +++ b/game/modules/tome/data/general/encounters/arda-west.lua @@ -127,7 +127,7 @@ newEntity{ newEntity{ name = "Ancient Elven Ruins", type = "harmless", subtype = "special", unique = true, - level_range = {20, 30}, + level_range = {30, 40}, rarity = 8, coords = {{ x=0, y=0, w=100, h=100}}, on_encounter = function(self, who) diff --git a/game/modules/tome/data/general/objects/objects.lua b/game/modules/tome/data/general/objects/objects.lua index 7dde15d8224587ddcb18d992f3e03c43e58be7e9..690551e29180b55615c3c4d7f806ec5a39fc89c1 100644 --- a/game/modules/tome/data/general/objects/objects.lua +++ b/game/modules/tome/data/general/objects/objects.lua @@ -82,3 +82,4 @@ loadIfNot("/data/general/objects/mounts.lua") -- Artifacts loadIfNot("/data/general/objects/world-artifacts.lua") loadIfNot("/data/general/objects/quest-artifacts.lua") +loadIfNot("/data/general/objects/special-artifacts.lua") diff --git a/game/modules/tome/data/general/objects/special-artifacts.lua b/game/modules/tome/data/general/objects/special-artifacts.lua new file mode 100644 index 0000000000000000000000000000000000000000..3463e11443f4ed34db96dc58ad15c7e5a8ed2ae1 --- /dev/null +++ b/game/modules/tome/data/general/objects/special-artifacts.lua @@ -0,0 +1,44 @@ +-- 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 Stats = require "engine.interface.ActorStats" +local Talents = require "engine.interface.ActorTalents" + +-- This file describes artifacts not bound to a special location or quest, but still special(they do not get randomly generated) +newEntity{ base = "BASE_WARAXE", + unique = true, + define_as = "WARAXE_DRAMBORLEG", rarity = false, unided_name = "razor sharp war axe", + name = "Dramborleg, the waraxe of Tuor", color = colors.LIGHT_BLUE, + desc = [[The mighty axe of Tuor can cleave through armor like the sharpest swords, yet hit with all the impact of a heavy club. its name means 'Thudder Sharp'.]], + require = { stat = { str=42 }, }, + material_level = 5, + combat = { + dam = 58, + apr = 16, + physcrit = 7, + dammod = {str=1}, + damrange = 1.4, + damtype = DamageType.PHYSICALBLEED, + }, + wielder = { + inc_stats = { [Stats.STAT_STR] = 4, [Stats.STAT_DEX] = 4, }, + see_invisible = 5, + inc_damage = { [DamageType.PHYSICAL]=10 }, + }, +} diff --git a/game/modules/tome/data/general/objects/world-artifacts.lua b/game/modules/tome/data/general/objects/world-artifacts.lua index aa1197a4282034428608538fbee89a20c0257490..b1f22d3fc67b25c4dd5408528a724329da85d5e6 100644 --- a/game/modules/tome/data/general/objects/world-artifacts.lua +++ b/game/modules/tome/data/general/objects/world-artifacts.lua @@ -783,6 +783,37 @@ newEntity{ base = "BASE_WAND", }, } +newEntity{ base = "BASE_BATTLEAXE", + unique = true, + unided_name = "crude iron battle axe", + name = "Crude Iron Battle Axe of Durin the Deathless", color = colors.GREY, + desc = [[Made in times before the dwarves learned beautiful craftsmanship from the noldor, the rough appearance of this axe belies its great power. Only dwarves may harness its true strength, however.]], + require = { stat = { str=50 }, }, + rarity = 300, + material_level = 1, + combat = { + dam = 68, + apr = 7, + physcrit = 10, + dammod = {str=1.3}, + }, + wielder = { + inc_stats = { [Stats.STAT_CON] = 2, [Stats.STAT_DEX] = 2, }, + combat_def = 6, combat_armor = 6, + inc_damage = { [DamageType.PHYSICAL]=10 }, + stun_immune = 0.5, + knockback_immune = 0.5, + }, + on_wear = function(self, who) + if who.descriptor and who.descriptor.race == "Dwarf" then + self.wielded._special1 = who:addTemporaryValue("inc_stats", { [Stats.STAT_CON] = 4, [Stats.STAT_DEX] = 4, }) + self.wielded._special2 = who:addTemporaryValue("stun_immune", 0.5) + self.wielded._special2 = who:addTemporaryValue("knockback_immune", 0.5) + game.logPlayer(who, "#LIGHT_BLUE#You feel as surge of power as you wield the axe of your ancestors!") + end + end, +} + --[=[ newEntity{ unique = true, diff --git a/game/modules/tome/data/timed_effects.lua b/game/modules/tome/data/timed_effects.lua index 6f5f79ab385be3af97948c2d3cbcaece7d4d1e0a..888e72e442f0579ce776118236740607fe681c7f 100644 --- a/game/modules/tome/data/timed_effects.lua +++ b/game/modules/tome/data/timed_effects.lua @@ -903,7 +903,7 @@ newEffect{ newEffect{ name = "ROTTING_DISEASE", desc = "Rotting Disease", - long_desc = function(self, eff) return ("The target is infected by a disease, reducing its constitution by %d and doing %0.2f blight damage per turn."):format(eff.power) end, + long_desc = function(self, eff) return ("The target is infected by a disease, reducing its constitution by %d and doing %0.2f blight damage per turn."):format(eff.con, eff.dam) end, type = "disease", status = "detrimental", parameters = {}, @@ -925,7 +925,7 @@ newEffect{ newEffect{ name = "DECREPITUDE_DISEASE", desc = "Decrepitude Disease", - long_desc = function(self, eff) return ("The target is infected by a disease, reducing its dexterity by %d and doing %0.2f blight damage per turn."):format(eff.power) end, + long_desc = function(self, eff) return ("The target is infected by a disease, reducing its dexterity by %d and doing %0.2f blight damage per turn."):format(eff.dex, eff.dam) end, type = "disease", status = "detrimental", parameters = {}, @@ -947,7 +947,7 @@ newEffect{ newEffect{ name = "WEAKNESS_DISEASE", desc = "Weakness Disease", - long_desc = function(self, eff) return ("The target is infected by a disease, reducing its strength by %d and doing %0.2f blight damage per turn."):format(eff.power) end, + long_desc = function(self, eff) return ("The target is infected by a disease, reducing its strength by %d and doing %0.2f blight damage per turn."):format(eff.str, eff.dam) end, type = "disease", status = "detrimental", parameters = {}, @@ -969,7 +969,7 @@ newEffect{ newEffect{ name = "EPIDEMIC", desc = "Epidemic", - long_desc = function(self, eff) return ("The target is infected by a disease, doing %0.2f blight damage per turn.\nEach non-disease blight damage done to it will spread the disease."):format(eff.power) end, + long_desc = function(self, eff) return ("The target is infected by a disease, doing %0.2f blight damage per turn.\nEach non-disease blight damage done to it will spread the disease."):format(eff.dam) end, type = "disease", status = "detrimental", parameters = {}, diff --git a/game/modules/tome/data/zones/ancient-elven-ruins/npcs.lua b/game/modules/tome/data/zones/ancient-elven-ruins/npcs.lua index 55a76529018f5f0b61cd3859a14f4bb90e1df614..c50be614e48c1a3458b55112c6af7e36f9e69b80 100644 --- a/game/modules/tome/data/zones/ancient-elven-ruins/npcs.lua +++ b/game/modules/tome/data/zones/ancient-elven-ruins/npcs.lua @@ -33,7 +33,7 @@ newEntity{ define_as = "GREATER_MUMMY_LORD", name = "Greater Mummy Lord", display = "Z", color=colors.VIOLET, desc = [[The wrappings of this mummy radiates with so much power it feels like wind is blowing from it.]], - level_range = {20, 35}, exp_worth = 2, + level_range = {30, 45}, exp_worth = 2, max_life = 250, life_rating = 21, fixed_rating = true, max_stamina = 200, max_mana = 200, @@ -53,18 +53,18 @@ newEntity{ define_as = "GREATER_MUMMY_LORD", drops = resolvers.drops{chance=100, nb=4, {ego_chance=100} }, resolvers.talents{ - [Talents.T_SHIELD_PUMMEL]=3, - [Talents.T_ASSAULT]=3, - [Talents.T_OVERPOWER]=3, - [Talents.T_BLINDING_SPEED]=3, - [Talents.T_SWORD_MASTERY]=4, - [Talents.T_WEAPON_COMBAT]=5, - - [Talents.T_FREEZE]=3, - [Talents.T_ICE_STORM]=3, - [Talents.T_INVISIBILITY]=3, - - [Talents.T_ROTTING_DISEASE]=3, + [Talents.T_SHIELD_PUMMEL]=5, + [Talents.T_ASSAULT]=4, + [Talents.T_OVERPOWER]=5, + [Talents.T_BLINDING_SPEED]=4, + [Talents.T_SWORD_MASTERY]=6, + [Talents.T_WEAPON_COMBAT]=8, + + [Talents.T_FREEZE]=4, + [Talents.T_ICE_STORM]=4, + [Talents.T_INVISIBILITY]=4, + + [Talents.T_ROTTING_DISEASE]=5, }, instakill_immune = 1, diff --git a/game/modules/tome/data/zones/ancient-elven-ruins/objects.lua b/game/modules/tome/data/zones/ancient-elven-ruins/objects.lua index f87b0fab8bd13c6809f00b0cc2328523286a72e8..c2ca78ef1470a2453b1f3fb8a14e9221014a6aba 100644 --- a/game/modules/tome/data/zones/ancient-elven-ruins/objects.lua +++ b/game/modules/tome/data/zones/ancient-elven-ruins/objects.lua @@ -20,15 +20,15 @@ load("/data/general/objects/objects.lua") load("/data/general/objects/mummy-wrappings.lua") --- Artifact, droped (and used!) by the Shade of Angmar newEntity{ base = "BASE_LONGSWORD", define_as = "LONGSWORD_RINGIL", rarity=false, unided_name = "glittering longsword", name = "Ringil, the glittering sword of Fingolfin", unique=true, desc = [[The sword of Fingolfin, said to have glittered like ice. With it he wounded Morgoth in single combat after the Dagor Bragollach.]], - require = { stat = { str=25 }, }, + require = { stat = { str=35 }, }, cost = 2000, + material_level = 5, combat = { - dam = 38, + dam = 45, apr = 10, physcrit = 10, dammod = {str=1}, @@ -47,7 +47,7 @@ newEntity{ base = "BASE_LONGSWORD", local tg = {type="ball", range=0, radius=4, friendlyfire=false} who:project(tg, who.x, who.y, engine.DamageType.ICE, 10 + (who:getMag() + who:getWil()) / 2, {type="freeze"}) game:playSoundNear(who, "talents/ice") - game.logSeen(who, "%s invokes the power of his icy sword!", who.name:capitalize()) + game.logSeen(who, "%s invokes the power of Ringil!", who.name:capitalize()) return true end }, diff --git a/game/modules/tome/data/zones/ancient-elven-ruins/zone.lua b/game/modules/tome/data/zones/ancient-elven-ruins/zone.lua index 4ffd767655348330a7a96e2d8fc350b7a56eb26e..f51c6392c7c3a52816175a0f9c0e40618bdd24de 100644 --- a/game/modules/tome/data/zones/ancient-elven-ruins/zone.lua +++ b/game/modules/tome/data/zones/ancient-elven-ruins/zone.lua @@ -19,7 +19,7 @@ return { name = "Elven Ruins", - level_range = {18, 25}, + level_range = {33, 38}, level_scheme = "player", max_level = 3, decay = {300, 800},