diff --git a/game/engine/dialogs/GameMenu.lua b/game/engine/dialogs/GameMenu.lua index db489ed64b244c876e63d4f77a9bcfb153648f45..fc2d4342d9c40ccc94e1117a0f6a6f9233f7c6db 100644 --- a/game/engine/dialogs/GameMenu.lua +++ b/game/engine/dialogs/GameMenu.lua @@ -35,6 +35,7 @@ function _M:init(actions) __TEXTINPUT = function(c) if c:find("^[a-z]$") then self.sel = util.bound(1 + string.byte(c) - string.byte('a'), 1, #self.list) + self.changed = true self:use() end end, diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index bfe3d465609c753897e8eccd5dea363be53b58a3..2a9945fdf596242fcda6ffa746140ccd1759aab9 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -91,8 +91,11 @@ function _M:init(t, no_default) t.esp = t.esp or {range=10} + t.talent_cd_reduction = t.talent_cd_reduction or {} + t.on_melee_hit = t.on_melee_hit or {} t.melee_project = t.melee_project or {} + t.ranged_project = t.ranged_project or {} t.can_pass = t.can_pass or {} t.move_project = t.move_project or {} t.can_breath = t.can_breath or {} @@ -1010,10 +1013,12 @@ end -- @param t the talent to cooldown function _M:startTalentCooldown(t) if not t.cooldown then return end + local cd = t.cooldown + if self.talent_cd_reduction[t.id] then cd = cd - self.talent_cd_reduction[t.id] end if t.type[1]:find("^spell/") then - self.talents_cd[t.id] = math.ceil(t.cooldown * (1 - self.spell_cooldown_reduction or 0)) + self.talents_cd[t.id] = math.ceil(cd * (1 - self.spell_cooldown_reduction or 0)) else - self.talents_cd[t.id] = t.cooldown + self.talents_cd[t.id] = cd end self.changed = true end diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua index 5455b97a02b4287a93e1068144c70024ad18b7c0..10a933d670ce387d487e43989c9a4e7f14ff297c 100644 --- a/game/modules/tome/class/Game.lua +++ b/game/modules/tome/class/Game.lua @@ -651,17 +651,19 @@ function _M:setupCommands() CHANGE_LEVEL = function() local e = self.level.map(self.player.x, self.player.y, Map.TERRAIN) if self.player:enoughEnergy() and e.change_level then + if self.player:attr("never_move") then self.log("You can not currently leave the level.") return end + local stop = {} for eff_id, p in pairs(game.player.tmp) do local e = game.player.tempeffect_def[eff_id] if e.status == "detrimental" then stop[#stop+1] = e.desc end end - if not e.change_zone or (#stop > 0 and e.change_zone:find("^wilderness")) or #stop == 0 then + if e.change_zone and #stop > 0 and e.change_zone:find("^wilderness") then + self.log("You can not go into the wilds with the following effects: %s", table.concat(stop, ", ")) + else -- Do not unpause, the player is allowed first move on next level self:changeLevel(e.change_zone and e.change_level or self.level.level + e.change_level, e.change_zone) - else - self.log("You can not go into the wilds with the following effects: %s", table.concat(stop, ", ")) end else self.log("There is no way out of this level here.") diff --git a/game/modules/tome/class/Object.lua b/game/modules/tome/class/Object.lua index 293e21ae360e1ee5e6f3a421e335a223e8ca1570..d24b1e975399f8f89d569e80d5f67ef53743e1b0 100644 --- a/game/modules/tome/class/Object.lua +++ b/game/modules/tome/class/Object.lua @@ -154,7 +154,7 @@ end --- Gets the full textual desc of the object without the name and requirements function _M:getTextualDesc() - local desc = {} + local desc = {} desc[#desc+1] = ("Type: %s / %s"):format(self.type, self.subtype) @@ -190,7 +190,15 @@ function _M:getTextualDesc() for typ, dam in pairs(w.melee_project) do rs[#rs+1] = ("%d %s"):format(dam, DamageType.dam_def[typ].name) end - desc[#desc+1] = ("Damage on hit: %s."):format(table.concat(rs, ',')) + desc[#desc+1] = ("Damage on hit(melee): %s."):format(table.concat(rs, ',')) + end + + if w.ranged_project then + local rs = {} + for typ, dam in pairs(w.ranged_project) do + rs[#rs+1] = ("%d %s"):format(dam, DamageType.dam_def[typ].name) + end + desc[#desc+1] = ("Damage on hit(ranged): %s."):format(table.concat(rs, ',')) end if w.on_melee_hit then @@ -245,6 +253,14 @@ function _M:getTextualDesc() desc[#desc+1] = ("Increases talent masteries: %s."):format(table.concat(tms, ',')) end + if w.talent_cd_reduction then + local tcds = {} + for tid, cd in pairs(w.talent_cd_reduction) do + tcds[#tcds+1] = ("%s (%d)"):format(Talents.talents_def[tid].name, cd) + end + desc[#desc+1] = ("Reduces talent cooldowns: %s."):format(table.concat(tcds, ',')) + end + if w.combat_physresist then desc[#desc+1] = ("Increases physical resistance: %s."):format(w.combat_physresist) end if w.combat_spellresist then desc[#desc+1] = ("Increases spell resistance: %s."):format(w.combat_spellresist) end if w.combat_mentalresist then desc[#desc+1] = ("Increases mental resistance: %s."):format(w.combat_mentalresist) end @@ -312,7 +328,7 @@ function _M:getDesc() if reqs then desc[#desc+1] = reqs end - + if self.encumber then desc[#desc+1] = ("#67AD00#%0.2f Encumbrance."):format(self.encumber) end diff --git a/game/modules/tome/class/interface/Combat.lua b/game/modules/tome/class/interface/Combat.lua index 7f401026bfa6ca24657fdcd9e1860f1682249244..f022acf1bd8f266117af2a5baa4cf1d92d724412 100644 --- a/game/modules/tome/class/interface/Combat.lua +++ b/game/modules/tome/class/interface/Combat.lua @@ -213,6 +213,13 @@ function _M:archeryShoot(damtype, mult, on_hit, tg, params) game.logSeen(target, "%s misses %s.", self.name:capitalize(), target.name) end + -- Ranged project + if hitted and not target.dead then for typ, dam in pairs(self.ranged_project) do + if dam > 0 then + DamageType:get(typ).projector(self, target.x, target.y, typ, dam) + end + end end + ret.speed = self:combatSpeed(weapon) ret.hitted = hitted end diff --git a/game/modules/tome/data/birth/classes/mage.lua b/game/modules/tome/data/birth/classes/mage.lua index a7647fc5ed8906d9c00db82b5f9fbeb0c19a2ec1..9ffc304aeef4cb59ae479bb7ccd1626b32aca1fb 100644 --- a/game/modules/tome/data/birth/classes/mage.lua +++ b/game/modules/tome/data/birth/classes/mage.lua @@ -161,7 +161,7 @@ newBirthDescriptor{ ["spell/arcane"]={true, 0.2}, ["spell/fire"]={true, 0.3}, ["spell/wildfire"]={true, 0.4}, - ["spell/air"]={true, 0.2}, + ["spell/earth"]={true, 0.2}, ["spell/phantasm"]={true, 0.3}, ["spell/temporal"]={false, 0.3}, ["spell/meta"]={false, 0.3}, diff --git a/game/modules/tome/data/general/objects/bows.lua b/game/modules/tome/data/general/objects/bows.lua index a74381c5b80ac82070256fd0ad897e4820683133..9460b2a2684ad51b828e5fc6bb2f1aa9b8fc51a2 100644 --- a/game/modules/tome/data/general/objects/bows.lua +++ b/game/modules/tome/data/general/objects/bows.lua @@ -28,6 +28,7 @@ newEntity{ combat = { talented = "bow", damrange = 1.4, sound = "actions/arrow", sound_miss = "actions/arrow",}, archery = "bow", desc = [[Longbows are used to shoot arrows at your foes.]], + egos = "/data/general/objects/egos/bow.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) }, } newEntity{ base = "BASE_LONGBOW", @@ -104,6 +105,7 @@ newEntity{ archery_ammo = "bow", desc = [[Arrows are used with bows to pierce your foes to death.]], generate_stack = resolvers.rngavg(100,200), + egos = "/data/general/objects/egos/ammo.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) }, stacking = true, } diff --git a/game/modules/tome/data/general/objects/egos/ammo.lua b/game/modules/tome/data/general/objects/egos/ammo.lua new file mode 100644 index 0000000000000000000000000000000000000000..438fed4c24e6d485ce8c2cc845355c3f661d8532 --- /dev/null +++ b/game/modules/tome/data/general/objects/egos/ammo.lua @@ -0,0 +1,82 @@ +-- 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 + +newEntity{ + name = "flaming ", prefix=true, instant_resolve=true, + level_range = {1, 50}, + rarity = 5, + wielder = { + ranged_project={[DamageType.FIRE] = resolvers.mbonus_material(25, 4, function(e, v) return v * 0.1 * 0.64 end)}, + }, +} +newEntity{ + name = "icy ", prefix=true, instant_resolve=true, + level_range = {15, 50}, + rarity = 5, + wielder = { + ranged_project={[DamageType.ICE] = resolvers.mbonus_material(15, 4, function(e, v) return v * 0.1 * 0.7 end)}, + }, +} +newEntity{ + name = "acidic ", prefix=true, instant_resolve=true, + level_range = {1, 50}, + rarity = 5, + wielder = { + ranged_project={[DamageType.ACID] = resolvers.mbonus_material(25, 4, function(e, v) return v * 0.1 * 0.7 end)}, + }, +} +newEntity{ + name = "shocking ", prefix=true, instant_resolve=true, + level_range = {1, 50}, + rarity = 5, + wielder = { + ranged_project={[DamageType.LIGHTNING] = resolvers.mbonus_material(25, 4, function(e, v) return v * 0.1 * 0.7 end)}, + }, +} +newEntity{ + name = "poisonous ", prefix=true, instant_resolve=true, + level_range = {1, 50}, + rarity = 5, + wielder = { + ranged_project={[DamageType.POISON] = resolvers.mbonus_material(45, 6, function(e, v) return v * 0.1 * 0.5 end)}, + }, +} + +newEntity{ + name = "slime-covered ", prefix=true, instant_resolve=true, + level_range = {10, 50}, + rarity = 5, + wielder = { + ranged_project={[DamageType.SLIME] = resolvers.mbonus_material(45, 6, function(e, v) return v * 0.1 * 0.9 end)}, + }, +} +newEntity{ + name = "elemental ", prefix=true, instant_resolve=true, + level_range = {35, 50}, + rarity = 25, + cost = 35, + wielder = { + ranged_project={ + [DamageType.FIRE] = resolvers.mbonus_material(25, 4, function(e, v) return v * 0.1 * 0.7 end), + [DamageType.ICE] = resolvers.mbonus_material(15, 4, function(e, v) return v * 0.1 * 0.7 end), + [DamageType.ACID] = resolvers.mbonus_material(25, 4, function(e, v) return v * 0.1 * 0.7 end), + [DamageType.LIGHTNING] = resolvers.mbonus_material(25, 4, function(e, v) return v * 0.1 * 0.7 end), + }, + }, +} diff --git a/game/modules/tome/data/general/objects/egos/bow.lua b/game/modules/tome/data/general/objects/egos/bow.lua new file mode 100644 index 0000000000000000000000000000000000000000..eff3742f09483ece73d573a1c56e1eb303d7773a --- /dev/null +++ b/game/modules/tome/data/general/objects/egos/bow.lua @@ -0,0 +1,89 @@ +-- 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") +local Stats = require("engine.interface.ActorStats") + +newEntity{ + name = " of power", suffix=true, instant_resolve=true, + level_range = {1, 50}, + rarity = 3, + cost = 6, + combat={apr = resolvers.mbonus_material(15, 1, function(e, v) return v * 0.3 end)}, +} + +newEntity{ + name = "mighty ", prefix=true, instant_resolve=true, + level_range = {1, 50}, + rarity = 3, + cost = 4, + wielder = { + inc_damage={ [DamageType.PHYSICAL] = resolvers.mbonus_material(25, 8, function(e, v) return v * 0.8 end), }, + }, +} + +newEntity{ + name = "steady ", prefix=true, instant_resolve=true, + level_range = {20, 50}, + rarity = 9, + cost = 10, + wielder = { + talent_cd_reduction={[Talents.T_STEADY_SHOT]=1}, + }, +} + +newEntity{ + name = " of dexterity", suffix=true, instant_resolve=true, + level_range = {20, 50}, + rarity = 7, + cost = 7, + wielder = { + inc_stats = { [Stats.STAT_DEX] = resolvers.mbonus_material(6, 2, function(e, v) return v * 3 end) }, + }, +} + +newEntity{ + name = " of speed", suffix=true, instant_resolve=true, + level_range = {20, 50}, + rarity = 7, + cost = 7, + combat={physspeed = -0.1}, +} + +newEntity{ + name = " of great speed", suffix=true, instant_resolve=true, + level_range = {40, 50}, + rarity = 10, + cost = 60, + combat={physspeed = -0.2}, +} + +newEntity{ + name = "sindar ", prefix=true, instant_resolve=true, + level_range = {30, 50}, + rarity = 24, + cost = 40, + wielder = { + talent_cd_reduction={ + [Talents.T_STEADY_SHOT]=1, + [Talents.T_PINNING_SHOT]=1, + [Talents.T_VOLLEY_OF_ARROWS]=2, + }, + inc_damage={ [DamageType.PHYSICAL] = resolvers.mbonus_material(14, 8, function(e, v) return v * 0.8 end), }, + }, +} diff --git a/game/modules/tome/data/general/objects/egos/helm.lua b/game/modules/tome/data/general/objects/egos/helm.lua new file mode 100644 index 0000000000000000000000000000000000000000..900f5a6e998573501eb2f97af72c23914f50a69f --- /dev/null +++ b/game/modules/tome/data/general/objects/egos/helm.lua @@ -0,0 +1,29 @@ +-- 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 +--[[ +newEntity{ + name = " of rage", suffix=true, instant_resolve=true, + level_range = {20, 50}, + rarity = 5, + cost = 6, + wielder = { + resists={[DamageType.FIRE] = resolvers.mbonus_material(30, 10, function(e, v) return v * 0.15 end)}, + }, +} +]] \ No newline at end of file diff --git a/game/modules/tome/data/general/objects/egos/sling.lua b/game/modules/tome/data/general/objects/egos/sling.lua new file mode 100644 index 0000000000000000000000000000000000000000..2538a4a66e1140c9ed76a723a8590d0b1fbeff7a --- /dev/null +++ b/game/modules/tome/data/general/objects/egos/sling.lua @@ -0,0 +1,89 @@ +-- 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") +local Stats = require("engine.interface.ActorStats") + +newEntity{ + name = " of power", suffix=true, instant_resolve=true, + level_range = {1, 50}, + rarity = 3, + cost = 6, + combat={apr = resolvers.mbonus_material(15, 1, function(e, v) return v * 0.3 end)}, +} + +newEntity{ + name = "mighty ", prefix=true, instant_resolve=true, + level_range = {1, 50}, + rarity = 3, + cost = 4, + wielder = { + inc_damage={ [DamageType.PHYSICAL] = resolvers.mbonus_material(25, 8, function(e, v) return v * 0.8 end), }, + }, +} + +newEntity{ + name = "steady ", prefix=true, instant_resolve=true, + level_range = {20, 50}, + rarity = 9, + cost = 10, + wielder = { + talent_cd_reduction={[Talents.T_STEADY_SHOT]=1}, + }, +} + +newEntity{ + name = " of dexterity", suffix=true, instant_resolve=true, + level_range = {20, 50}, + rarity = 7, + cost = 7, + wielder = { + inc_stats = { [Stats.STAT_DEX] = resolvers.mbonus_material(6, 2, function(e, v) return v * 3 end) }, + }, +} + +newEntity{ + name = " of speed", suffix=true, instant_resolve=true, + level_range = {20, 50}, + rarity = 7, + cost = 7, + combat={physspeed = -0.1}, +} + +newEntity{ + name = " of great speed", suffix=true, instant_resolve=true, + level_range = {40, 50}, + rarity = 10, + cost = 60, + combat={physspeed = -0.2}, +} + +newEntity{ + name = "hobbit ", prefix=true, instant_resolve=true, + level_range = {30, 50}, + rarity = 24, + cost = 40, + wielder = { + talent_cd_reduction={ + [Talents.T_STEADY_SHOT]=1, + [Talents.T_PINNING_SHOT]=1, + [Talents.T_MULTISHOT]=2, + }, + inc_damage={ [DamageType.PHYSICAL] = resolvers.mbonus_material(14, 8, function(e, v) return v * 0.8 end), }, + }, +} diff --git a/game/modules/tome/data/general/objects/helms.lua b/game/modules/tome/data/general/objects/helms.lua index 80f594853b2681406dba100e4bfd8bb83501c5b1..a8034d71ef2d79d7234704bd8cc0a0f3e9e67bda 100644 --- a/game/modules/tome/data/general/objects/helms.lua +++ b/game/modules/tome/data/general/objects/helms.lua @@ -30,6 +30,7 @@ newEntity{ rarity = 7, metallic = true, desc = [[A large helmet that can protect the entire head. Ventilation and bad vision can be a problem, however.]], + egos = "/data/general/objects/egos/helm.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) }, } newEntity{ base = "BASE_HELM", diff --git a/game/modules/tome/data/general/objects/slings.lua b/game/modules/tome/data/general/objects/slings.lua index 21a6fe0ee77cfc9b9e22ceb70ea862170a979565..c1bf3faf5462273bc17e028664d5bd9832afdf4a 100644 --- a/game/modules/tome/data/general/objects/slings.lua +++ b/game/modules/tome/data/general/objects/slings.lua @@ -27,6 +27,7 @@ newEntity{ combat = { talented = "sling", sound = "actions/arrow", sound_miss = "actions/arrow", }, archery = "sling", desc = [[Slings are used to shoot pebbles at your foes.]], + egos = "/data/general/objects/egos/sling.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) }, } newEntity{ base = "BASE_SLING", @@ -103,6 +104,7 @@ newEntity{ archery_ammo = "sling", desc = [[Shots are used with slings to pummel your foes to death.]], generate_stack = resolvers.rngavg(100,200), + egos = "/data/general/objects/egos/ammo.lua", egos_chance = { prefix=resolvers.mbonus(40, 5), suffix=resolvers.mbonus(40, 5) }, stacking = true, } diff --git a/game/modules/tome/data/general/objects/world-artifacts.lua b/game/modules/tome/data/general/objects/world-artifacts.lua index 390e9621ae86b280bce82272726732f291a76a84..014fb86a55e7a0356f3a76d689b4559114a4f1e6 100644 --- a/game/modules/tome/data/general/objects/world-artifacts.lua +++ b/game/modules/tome/data/general/objects/world-artifacts.lua @@ -219,3 +219,23 @@ newEntity{ return "destroy", true end}, } + +newEntity{ base = "BASE_LONGBOW", + name = "Gondor-Tree Longbow", unided_name = "glowing elven-wood longbow", unique=true, + level_range = {40, 50}, + rarity = 200 + require = { stat = { dex=36 }, }, + cost = 800, + material_level = 5, + combat = { + range = 18, + physspeed = 0.7, + apr = 12, + }, + wielder = { + inc_damage={ [DamageType.PHYSICAL] = 12, }, + lite = 1, + inc_stats = { [Stats.STAT_DEX] = 5, [Stats.STAT_WIL] = 4, }, + ranged_project={[DamageType.LIGHT] = 30}, + }, +} diff --git a/game/modules/tome/data/maps/towns/bree.lua b/game/modules/tome/data/maps/towns/bree.lua index a474a480f9018595ead97236544558b504c01c63..e8ba4be935d767195addda72d7b2de323e237a2c 100644 --- a/game/modules/tome/data/maps/towns/bree.lua +++ b/game/modules/tome/data/maps/towns/bree.lua @@ -26,7 +26,7 @@ quickEntity('C', {name='dark pit', display='#', color=colors.LIGHT_DARK, block_m quickEntity('T', {name='tree', display='#', color=colors.LIGHT_GREEN, block_move=true, block_sight=true, image="terrain/grass.png", add_displays = {mod.class.Grid.new{image="terrain/tree_alpha1.png"}}}) quickEntity(' ', {name='forest', display='#', color=colors.GREEN, block_move=true, block_sight=true, image="terrain/grass.png", add_displays = {mod.class.Grid.new{image="terrain/tree_alpha1.png"}}}) quickEntity('V', {name='river', display='~', color=colors.BLUE, block_move=true, image="terrain/river.png"}) -quickEntity('O', {name='cooblestone road', display='.', color=colors.WHITE, image="terrain/stone_road1.png"}) +quickEntity('O', {name='cobblestone road', display='.', color=colors.WHITE, image="terrain/stone_road1.png"}) quickEntity('.', {name='road', display='.', color=colors.WHITE, image="terrain/stone_road1.png"}) quickEntity(',', {name='dirt', display='.', color=colors.LIGHT_UMBER, image="terrain/sand.png"}) quickEntity('-', {name='grass', display='.', color=colors.LIGHT_GREEN, image="terrain/grass.png"}) diff --git a/game/modules/tome/data/maps/towns/gates-of-morning.lua b/game/modules/tome/data/maps/towns/gates-of-morning.lua index 556b73a0cc1bfb5f866ed2f39ee7f9cf606c4f9f..96aa67c2d0de2ff879c0167fcee8c5f7519b4f28 100644 --- a/game/modules/tome/data/maps/towns/gates-of-morning.lua +++ b/game/modules/tome/data/maps/towns/gates-of-morning.lua @@ -27,7 +27,7 @@ quickEntity('#', {name='wall', display='#', color=colors.WHITE, block_move=true, quickEntity('T', {name='tree', display='#', color=colors.LIGHT_GREEN, block_move=true, block_sight=true, image="terrain/grass.png", add_displays = {mod.class.Grid.new{image="terrain/tree_alpha2.png"}}}) quickEntity('P', {name='palm tree', display='#', color=colors.LIGHT_GREEN, back_color={r=163,g=149,b=42}, image="terrain/palmtree.png", block_move=true}) quickEntity('~', {name='river', display='~', color=colors.BLUE, block_move=true, image="terrain/river.png", add_displays = mod.class.Grid:makeWater(true)}) -quickEntity('O', {name='cooblestone road', display='.', color=colors.WHITE, image="terrain/stone_road1.png"}) +quickEntity('O', {name='cobblestone road', display='.', color=colors.WHITE, image="terrain/stone_road1.png"}) quickEntity(':', {name='sand', display='.', color={r=203,g=189,b=72}, back_color={r=163,g=149,b=42}, image="terrain/sand.png", can_encounter="desert", equilibrium_level=-10}) quickEntity('-', {name='grass', display='.', color=colors.LIGHT_GREEN, image="terrain/grass.png"}) quickEntity('^', {name='hills', display='^', color=colors.SLATE, image="terrain/mountain.png", block_move=true, block_sight=true}) diff --git a/game/modules/tome/data/maps/towns/minas-tirith.lua b/game/modules/tome/data/maps/towns/minas-tirith.lua index ff2864216dab6b6df7655a415137ef2f1610b1de..3ed8eabc5f8af7de5ed7469e244e230f36dd73b4 100644 --- a/game/modules/tome/data/maps/towns/minas-tirith.lua +++ b/game/modules/tome/data/maps/towns/minas-tirith.lua @@ -24,7 +24,7 @@ quickEntity('t', {name='brick roof chimney', display='#', color=colors.LIGHT_RED quickEntity('C', {name='dark pit', display='#', color=colors.LIGHT_DARK, block_move=true, block_sight=true}) quickEntity('T', {name='tree', display='#', color=colors.LIGHT_GREEN, block_move=true, block_sight=true, image="terrain/tree.png"}) quickEntity('V', {name='river', display='~', color=colors.BLUE, block_move=true, image="terrain/river.png"}) -quickEntity('O', {name='cooblestone road', display='.', color=colors.WHITE, image="terrain/stone_road1.png"}) +quickEntity('O', {name='cobblestone road', display='.', color=colors.WHITE, image="terrain/stone_road1.png"}) quickEntity(' ', {name='grass', display='.', color=colors.LIGHT_GREEN, image="terrain/grass.png"}) quickEntity('-', {name='grass', display='.', color=colors.LIGHT_GREEN, image="terrain/grass.png"}) quickEntity('#', {name='wall', display='#', color=colors.WHITE, block_move=true, block_sight=true, image="terrain/wood_wall1.png"}) diff --git a/game/modules/tome/data/maps/wilderness/arda-west.lua b/game/modules/tome/data/maps/wilderness/arda-west.lua index b40e389f8984f8fe9d4c8cfd2e76c1304974d4ca..bfe0ad3601c7a374d43b997aaf561f7902b1980f 100644 --- a/game/modules/tome/data/maps/wilderness/arda-west.lua +++ b/game/modules/tome/data/maps/wilderness/arda-west.lua @@ -55,7 +55,7 @@ quickEntity('G', {show_tooltip=true, name="Passageway into Carn Dûm",display='> quickEntity('H', {show_tooltip=true, name='Mount Doom (Orodruin)', display='>', color=colors.RED, back_color=colors.LIGHT_DARK, image="terrain/volcano1.png", notice = true, change_level=1, change_zone="mount-doom"}) quickEntity('1', {show_tooltip=true, name="Bree (Town)", desc="A quiet town at the crossroads of the north", display='*', color={r=255, g=255, b=255}, back_color=colors.DARK_GREEN, image="terrain/town1.png", notice = true, change_level=1, change_zone="town-bree"}) -quickEntity('2', {show_tooltip=true, name="Minas Tirith (Town)", desc="Captical city of the Reunited-Kingdom and Gondor ruled by High King Eldarion", display='*', color={r=255, g=255, b=255}, back_color=colors.DARK_GREEN, image="terrain/town1.png", notice = true, change_level=1, change_zone="town-minas-tirith"}) +quickEntity('2', {show_tooltip=true, name="Minas Tirith (Town)", desc="Capital city of the Reunited-Kingdom and Gondor ruled by High King Eldarion", display='*', color={r=255, g=255, b=255}, back_color=colors.DARK_GREEN, image="terrain/town1.png", notice = true, change_level=1, change_zone="town-minas-tirith"}) -- Angolwen is only know from the start to mages if game.player.descriptor.class == "Mage" then diff --git a/game/modules/tome/data/talents/spells/explosives.lua b/game/modules/tome/data/talents/spells/explosives.lua index f195113427b6c5541afad71b69f076129ee74a05..6df0b2006822278746fe2d9a300fc6a213b7f1a8 100644 --- a/game/modules/tome/data/talents/spells/explosives.lua +++ b/game/modules/tome/data/talents/spells/explosives.lua @@ -179,6 +179,7 @@ newTalent{ local x, y = self:getTarget(tg) if not x or not y then return nil end + self:removeObject(self:getInven("QUIVER"), 1) ammo = self:removeObject(self:getInven("QUIVER"), 1) if not ammo then return end diff --git a/game/modules/tome/data/talents/spells/fire-alchemy.lua b/game/modules/tome/data/talents/spells/fire-alchemy.lua index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..2f421a7ebdd37b0b78c73aee2ba9b8667a9d013f 100644 --- a/game/modules/tome/data/talents/spells/fire-alchemy.lua +++ b/game/modules/tome/data/talents/spells/fire-alchemy.lua @@ -0,0 +1,138 @@ +-- 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 + +newTalent{ + name = "Heat", + type = {"spell/fire-alchemy", 1}, + require = spells_req1, + points = 5, + mana = 5, + cooldown = 20, + action = function(self, t) + self:showEquipInven("Try to extract gems from which metallic item?", function(o) return o.metallic and (o.material_level or 1) <= self:getTalentLevelRaw(t) end, function(o, inven, item) + self:removeObject(inven, item) + + local level = o.material_level or 1 + local gem = game.zone:makeEntity(game.level, "object", {type="gem", special=function(e) return e.material_level == level end}, nil, true) + if gem then + self:addObject(self.INVEN_INVEN, gem) + game.logPlayer(self, "You extract: %s", gem:getName{do_color=true, do_count=true}) + end + return true + end) + return true + end, + info = function(self, t) + return ([[Extract magical gems from metal weapons and armours, the higher your skill the higher level items you can work with.]]) + end, +} + +newTalent{ + name = "Smoke Bomb", + type = {"spell/fire-alchemy", 2}, + require = spells_req2, + points = 5, + mana = 80, + cooldown = 100, + action = function(self, t) + self:showInventory("Use which gem?", self:getInven("INVEN"), function(gem) return gem.type == "gem" and gem.material_level <= self:getTalentLevelRaw(t) end, function(gem, gem_item) + self:showInventory("Imbue which armour?", self:getInven("INVEN"), function(o) return o.type == "armor" and o.slot == "BODY" and not o.been_imbued end, function(o, item) + self:removeObject(self:getInven("INVEN"), gem_item) + o.wielder = o.wielder or {} + table.mergeAdd(o.wielder, gem.imbue_powers) + o.been_imbued = true + game.logPlayer(self, "You imbue your %s with %s.", o:getName{do_colour=true, no_count=true}, gem:getName{do_colour=true, no_count=true}) + end) + end) + return true + end, + info = function(self, t) + return ([[Imbue an body armour with a gem, granting it additional powers. + You can only imbue items once, and it is permanent.]]) + end, +} +newTalent{ + name = "Body of Fire", + type = {"spell/fire-alchemy",3}, + require = spells_req3, + cooldown = 20, + mana = 20, + points = 5, + range = 1, + action = function(self, t) + local ammo = self:hasAlchemistWeapon() + if not ammo or ammo:getNumber() < 5 then + game.logPlayer(self, "You need to ready 2 alchemist gems in your quiver.") + return + end + + local tg = {type="bolt", range=self:getTalentRange(t), nolock=true, talent=t} + local x, y = self:getTarget(tg) + if not x or not y then return nil end + local _ _, x, y = self:canProject(tg, x, y) + + for i = 1, 5 do self:removeObject(self:getInven("QUIVER"), 1) end + local power = math.floor(4 + self:combatSpellpower(0.06) * self:getTalentLevel(t)) + self:probabilityTravel(x, y, power) + game:playSoundNear(self, "talents/arcane") + return true + end, + info = function(self, t) + return ([[Crush 5 alchemists gems into dust to mark an impassable terrain, you immediately enter it and appear on the other side of the obstacle. + Works up to %d grids away.]]): + format(math.floor(4 + self:combatSpellpower(0.06) * self:getTalentLevel(t))) + end, +} + +newTalent{ + name = "Magma Pool", + type = {"spell/fire-alchemy",4}, + require = spells_req4, + points = 5, + mana = 80, + cooldown = 15, + range = function(self, t) + if self:getTalentLevel(t) < 3 then return 1 + else return math.floor(self:getTalentLevel(t)) end + end, + action = function(self, t) + local tg = {type="beam", range=self:getTalentRange(t), talent=t} + if self:getTalentLevel(t) >= 3 then tg.type = "beam" end + local x, y = self:getTarget(tg) + if not x or not y then return nil end + self:project(tg, x, y, function(tx, ty) + local target = game.level.map(tx, ty, Map.ACTOR) + if not target then return end + + if target:checkHit(self:combatSpellpower(), target:combatSpellResist(), 0, 95, 10) and target:canBe("stone") and target:canBe("instakill") then + target:setEffect(target.EFF_STONED, math.floor((3 + self:getTalentLevel(t)) / 1.5), {}) + game.level.map:particleEmitter(tx, ty, 1, "archery") + end + end) + game:playSoundNear(self, "talents/earth") + return true + end, + info = function(self, t) + return ([[Touch your foe and turn it into stone for %d turns. + Stoned creatures are unable to act or regen life and are very brittle. + If a stoned creature is hit by an attack that deals more than 30%% of its life it will shatter and be destroyed. + Stoned creatures are highly resistant to fire and lightning and somewhat resistant to physical attacks. + At level 3 it will become a beam.]]):format(math.floor((3 + self:getTalentLevel(t)) / 1.5)) + end, +} diff --git a/ideas/classes.ods b/ideas/classes.ods index 1a8943c80a4bd32d39622ad07a5b0e70e020a294..510e4c6cbb25c102bb566395953945349f16bf29 100644 Binary files a/ideas/classes.ods and b/ideas/classes.ods differ diff --git a/ideas/crafting.ods b/ideas/crafting.ods index c8e23c871496918e33dbaefce3d6573b495de7d6..457d450b33ac84a1fd694c6b31b0711624c3620b 100644 Binary files a/ideas/crafting.ods and b/ideas/crafting.ods differ