diff --git a/game/engine/LogDisplay.lua b/game/engine/LogDisplay.lua index 1d7f7f0ea4257c1a46bd944e3b910bf58fe30d92..52189729a9ab2fc796b4acda68d34b18353bf6d6 100644 --- a/game/engine/LogDisplay.lua +++ b/game/engine/LogDisplay.lua @@ -68,6 +68,18 @@ function _M:empty() self.changed = true end +--- Get Last Lines From Log +-- @param number number of lines to retrieve +function _M:getLines(number) + local from = number + if from > #self.log then from = #self.log end + local lines = { } + for i = from, 1, -1 do + lines[#lines+1] = self.log[i] + end + return lines +end + function _M:display() -- If nothing changed, return the same surface as before if not self.changed then return self.surface end diff --git a/game/modules/tome/data/talents/spells/alchemy.lua b/game/modules/tome/data/talents/spells/alchemy.lua index 3ade657dceaab38a7d2c37a34a8ee25ae3b7bea6..5ed5bdb580df8b6e646e7ea07a33b2fb275662fb 100644 --- a/game/modules/tome/data/talents/spells/alchemy.lua +++ b/game/modules/tome/data/talents/spells/alchemy.lua @@ -17,45 +17,6 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -newTalent{ - name = "Create Alchemist Gems", - type = {"spell/alchemy-base", 1}, - require = spells_req1, - points = 1, - range = function(self, t) - return math.ceil(5 + self:getDex(12)) - end, - mana = 30, - make_gem = function(self, t, base_define) - local nb = rng.range(40, 80) - local gem = game.zone:makeEntityByName(game.level, "object", "ALCHEMIST_" .. base_define) - - local s = {} - while nb > 0 do - s[#s+1] = gem:clone() - nb = nb - 1 - end - for i = 1, #s do gem:stack(s[i]) end - - return gem - end, - action = function(self, t) - self:showEquipInven("Use which gem?", function(o) return o.type == "gem" end, function(o, inven, item) - local gem = t.make_gem(self, t, o.define_as) - self:addObject(self.INVEN_INVEN, gem) - self:removeObject(inven, item) - game.logPlayer(self, "You create: %s", gem:getName{do_color=true, do_count=true}) - return true - end) - game:playSoundNear(self, "talents/arcane") - return true - end, - info = function(self, t) - return ([[Carve %d to %d alchemist gems out of natural gems. - Alchemists gems are used for lots of other spells.]]):format(40, 80) - end, -} - newTalent{ name = "Throw Bomb", type = {"spell/alchemy", 1}, diff --git a/game/modules/tome/data/talents/spells/spells.lua b/game/modules/tome/data/talents/spells/spells.lua index 5d4c8993c985238d474b234528bf5306a08f9833..3328ee664dbd28b38faa7c1e2b1dbbae6873ca27 100644 --- a/game/modules/tome/data/talents/spells/spells.lua +++ b/game/modules/tome/data/talents/spells/spells.lua @@ -32,12 +32,12 @@ newTalentType{ type="spell/phantasm", name = "phantasm", description = "Control newTalentType{ type="spell/enhancement", name = "enhancement", description = "Magical enhancement of your body." } -- Alchemist spells -newTalentType{ type="spell/alchemy-base", name = "alchemy", hide = true, description = "Manipulate gems to turn them into explosive magical bombs." } newTalentType{ type="spell/alchemy", name = "alchemy", description = "Manipulate gems to turn them into explosive magical bombs." } newTalentType{ type="spell/infusion", name = "infusion", description = "Infusion your gem bombs with the powers of the elements." } newTalentType{ type="spell/golemancy-base", name = "golemancy", hide = true, description = "Learn to craft and upgrade your golem." } newTalentType{ type="spell/golemancy", name = "golemancy", description = "Learn to craft and upgrade your golem." } newTalentType{ type="spell/advanced-golemancy", name = "advanced-golemancy", description = "Advanced golem operations." } +newTalentType{ type="spell/gemology-base", name = "gemology", hide = true, description = "Manipulate gems, imbue their powers into other objects." } newTalentType{ type="spell/gemology", name = "gemology", generic = true, description = "Manipulate gems, imbue their powers into other objects." } newTalentType{ type="spell/herbalism", name = "herbalism", generic = true, description = "Herbs lore." } newTalentType{ type="spell/staff-combat", name = "staff combat", generic = true, description = "Harness the power of magical staves." } diff --git a/game/modules/tome/data/talents/spells/staff-combat.lua b/game/modules/tome/data/talents/spells/staff-combat.lua index f55fa89f3f9932e5e7adddb0c2c2f1085bfea033..ab59f2aa4fa25cd41e6cd632988ada74c47a4d4e 100644 --- a/game/modules/tome/data/talents/spells/staff-combat.lua +++ b/game/modules/tome/data/talents/spells/staff-combat.lua @@ -96,7 +96,7 @@ newTalent{ end, info = function(self, t) return ([[Adopt a defensive posture, reducing your staff attack power by %d and increasing your defense by %d.]]): - format(self:combatTalentSpellDamage(t, 20, 230) / 2, self:combatTalentSpellDamage(t, 20, 230)) + format(self:combatTalentSpellDamage(t, 10, 20) / 2, self:combatTalentSpellDamage(t, 10, 20)) end, } diff --git a/game/modules/tome/dialogs/CharacterSheet.lua b/game/modules/tome/dialogs/CharacterSheet.lua index 36e05b8087bd312b80f22708131f55a3cf5fc88d..bac53159018b7c924a7f0aae312ab4cfa2d36f71 100644 --- a/game/modules/tome/dialogs/CharacterSheet.lua +++ b/game/modules/tome/dialogs/CharacterSheet.lua @@ -266,9 +266,9 @@ function _M:dump() nl(makelabel("Spellpower", game.player:combatSpellpower() .."")) nnl(("%-32s"):format(makelabel("Armor", game.player:combatArmor() .. ""))) nl(makelabel("Spell Crit", game.player:combatSpellCrit() .."%")) - nnl(("%-32s"):format(makelabel("Class", game.player:combatDefense() .. ""))) + nnl(("%-32s"):format(makelabel("Defense", game.player:combatDefense() .. ""))) nl(makelabel("Spell Speed", game.player:combatSpellSpeed() .."")) - nnl(("%-32s"):format(makelabel("Class", game.player:combatDefenseRanged() .. ""))) + nnl(("%-32s"):format(makelabel("Ranged Defense", game.player:combatDefenseRanged() .. ""))) nl() nl() @@ -406,6 +406,12 @@ function _M:dump() end end + nl() + nl(" [Last Messages]") + nl() + + nl(table.concat(game.logdisplay:getLines(40), "\r"):gsub("#.-#", " ")) + fff:close() Dialog:simplePopup("Character dump complete", "File: "..fs.getRealPath(file)) diff --git a/ideas/crafting.ods b/ideas/crafting.ods index 5ae6ffd6b1fc12042dcccf9e4b17a68f29da6a18..5774851514091b57580956816d3f054a899e69c2 100644 Binary files a/ideas/crafting.ods and b/ideas/crafting.ods differ