diff --git a/game/modules/tome/data/birth/descriptors.lua b/game/modules/tome/data/birth/descriptors.lua index b77f20dd7cd57d787141093b9bf2303031d6c031..661cb873ac21d9ffd762ee31105bc85ef040d04e 100644 --- a/game/modules/tome/data/birth/descriptors.lua +++ b/game/modules/tome/data/birth/descriptors.lua @@ -210,6 +210,7 @@ load("/data/birth/races/human.lua") load("/data/birth/races/elf.lua") load("/data/birth/races/halfling.lua") load("/data/birth/races/dwarf.lua") +load("/data/birth/races/yeek.lua") load("/data/birth/races/orc.lua") load("/data/birth/races/troll.lua") --load("/data/birth/races/spider.lua") diff --git a/game/modules/tome/data/birth/races/yeek.lua b/game/modules/tome/data/birth/races/yeek.lua new file mode 100644 index 0000000000000000000000000000000000000000..31c695180050a3e25e7d4048e2e2a83d3dcd1df7 --- /dev/null +++ b/game/modules/tome/data/birth/races/yeek.lua @@ -0,0 +1,79 @@ +-- ToME - Tales of Maj'Eyal +-- 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 + +--------------------------------------------------------- +-- Yeeks -- +--------------------------------------------------------- +newBirthDescriptor{ + type = "race", + name = "Yeek", + desc = { + "Yeeks are a mysterious race native to the tropical island of Rel.", + "Although they are now nearly unheard of in Maj'Eyal, they spend many centuries as secret slaves to the halfling nation of Nargol.", + "They gained their freedom during the Age of Pyre and have since then followed 'The Way' - a unity of minds enforced by their powerful psionics.", + }, + descriptor_choices = + { + subrace = + { + __ALL__ = "disallow", + Yeek = "allow", + }, + }, + copy = { + faction = "the-way", + type = "humanoid", subtype="yeek", + size_category = 2, + default_wilderness = {28, 13}, + starting_zone = "trollmire", + starting_quest = "start-yeek", + starting_intro = "yeek", + resolvers.inscription("INFUSION:_REGENERATION", {cooldown=10, dur=5, heal=60}), + resolvers.inscription("INFUSION:_WILD", {cooldown=12, what={poison=true}, dur=4, power=14}), + }, + random_escort_possibilities = { {"trollmire", 2, 5}, {"ruins-kor-pul", 1, 4}, {"daikara", 1, 7}, {"old-forest", 1, 7}, {"dreadfell", 1, 8}, {"iron-throne", 1, 1}, }, +} + +--------------------------------------------------------- +-- Yeeks -- +--------------------------------------------------------- +newBirthDescriptor +{ + type = "subrace", + name = "Yeek", + desc = { + "Yeeks are a mysterious race native to the tropical island of Rel.", + "Although they are now nearly unheard of in Maj'Eyal, they spend many centuries as secret slaves to the halfling nation of Nargol.", + "They gained their freedom during the Age of Pyre and have since then followed 'The Way' - a unity of minds enforced by their powerful psionics.", + "They possess the #GOLD#Dominant Will#WHITE# talent which allows them temporarily subvert the mind of a lesser creature. When the effect ends the creature dies.", + "#GOLD#Stat modifiers:", + "#LIGHT_BLUE# * -3 Strength, -2 Dexterity, -5 Constitution", + "#LIGHT_BLUE# * +0 Magic, +6 Willpower, +4 Cunning", + "#GOLD#Life per level:#LIGHT_BLUE# 8", + "#GOLD#Experience penalty:#LIGHT_BLUE# --15%", + }, + inc_stats = { str=-3, con=-5, cun=4, wil=6, mag=0, dex=-2 }, + talents = { + [ActorTalents.T_YEEK_WILL]=1, + }, + copy = { + life_rating=8, + }, + experience = 0.85, +} diff --git a/game/modules/tome/data/birth/worlds.lua b/game/modules/tome/data/birth/worlds.lua index f198d45b883d9f6030130aad1d5b24da9f75ff6f..ba1fa93e1f2be8552d9a25cddaded245972e0595 100644 --- a/game/modules/tome/data/birth/worlds.lua +++ b/game/modules/tome/data/birth/worlds.lua @@ -61,6 +61,7 @@ local default_eyal_descriptors = { Elf = "allow", Dwarf = "allow", Halfling = "allow", + Yeek = function() return profile.mod.allow_build.yeek and "allow" or "disallow" end, Undead = function() return profile.mod.allow_build.undead and "allow" or "disallow" end, Construct = function() return profile.mod.allow_build.construct and "allow" or "disallow" end, }, diff --git a/game/modules/tome/data/factions.lua b/game/modules/tome/data/factions.lua index 128f95008295f8ba1e84258a623e9b35d413f740..62784aa15d4787aeea185d5d87e2ec83936db705 100644 --- a/game/modules/tome/data/factions.lua +++ b/game/modules/tome/data/factions.lua @@ -19,29 +19,30 @@ -- CSV export local src = [[ -,Enemies,Undead,Allied Kingdoms,Shalore,Thalore,Iron Throne,Angolwen,Dreadfell,,Temple of Creation|H,Water lair|H,Assassin lair|H,Rhalore,Zigur,,Sunwall|H,Orc Pride,,Sandworm Burrowers,Victim,,Sorcerers -Enemies,,,,,,,,,,,,,,,,,,,,,, -Undead,-1,,,,,,,,,,,,,,,,,,,,, -Allied Kingdoms,-1,-1,,,,,,,,,,,,,,,,,,,, -Shalore,-1,-1,0.5,,,,,,,,,,,,,,,,,,, -Thalore,-1,-1,0.7,0.2,,,,,,,,,,,,,,,,,, -Iron Throne,-1,-1,0.2,0.2,0.2,,,,,,,,,,,,,,,,, -Angolwen,-1,-1,,,,,,,,,,,,,,,,,,,, -Dreadfell,,-1,-1,-1,-1,-1,-1,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,,,, -Temple of Creation|H,,,,,,,,,,,,,,,,,,,,,, -Water lair|H,-1,,,,,,,,,-1,,,,,,,,,,,, -Assassin lair|H,,,,,,,,,,,,,,,,,,,,,, -Rhalore,-1,-1,-1,-1,-1,-1,-1,-1,,-1,-1,-1,,,,,,,,,, -Zigur,-1,-1,1,1,1,1,-1,-1,,,,,-1,,,,,,,,, -,,,,,,,,,,,,,,,,,,,,,, -Sunwall|H,-1,-1,,,,,,-1,,,,-1,-1,,,,,,,,, -Orc Pride,,-1,-1,-1,-1,-1,-1,-1,,,,,-1,-1,,-1,,,,,, -,,,,,,,,,,,,,,,,,,,,,, -Sandworm Burrowers,,,,,,,,,,,,,,,,,,,,,, -Victim,,,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,,,, -Sorcerers,,-1,-1,-1,-1,-1,-1,-1,,,,,-1,-1,,-1,1,,,,, +,Enemies,Undead,Allied Kingdoms,Shalore,Thalore,Iron Throne,The Way,Angolwen,Dreadfell,,Temple of Creation|H,Water lair|H,Assassin lair|H,Rhalore,Zigur,,Sunwall|H,Orc Pride,,Sandworm Burrowers,Victim,,Sorcerers +Enemies,,,,,,,,,,,,,,,,,,,,,,, +Undead,-1,,,,,,,,,,,,,,,,,,,,,, +Allied Kingdoms,-1,-1,,,,,,,,,,,,,,,,,,,,, +Shalore,-1,-1,0.5,,,,,,,,,,,,,,,,,,,, +Thalore,-1,-1,0.7,0.2,,,,,,,,,,,,,,,,,,, +Iron Throne,-1,-1,0.2,0.2,0.2,,,,,,,,,,,,,,,,,, +The Way,-1,-1,0,0,0,0,,,,,,,,,,,,,,,,, +Angolwen,-1,-1,,,,,,,,,,,,,,,,,,,,, +Dreadfell,,-1,-1,-1,-1,-1,-1,-1,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,, +Temple of Creation|H,,,,,,,,,,,,,,,,,,,,,,, +Water lair|H,-1,,,,,,,,,,-1,,,,,,,,,,,, +Assassin lair|H,,,,,,,,,,,,,,,,,,,,,,, +Rhalore,-1,-1,-1,-1,-1,-1,-1,-1,-1,,-1,-1,-1,,,,,,,,,, +Zigur,-1,-1,1,1,1,1,0.2,-1,-1,,,,,-1,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,, +Sunwall|H,-1,-1,,,,,,,-1,,,,-1,-1,,,,,,,,, +Orc Pride,,-1,-1,-1,-1,-1,-1,-1,-1,,,,,-1,-1,,-1,,,,,, +,,,,,,,,,,,,,,,,,,,,,,, +Sandworm Burrowers,,,,,,,,,,,,,,,,,,,,,,, +Victim,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,, +Sorcerers,,-1,-1,-1,-1,-1,-1,-1,-1,,,,,-1,-1,,-1,1,,,,, ]] local facts = {} diff --git a/game/modules/tome/data/talents/misc/misc.lua b/game/modules/tome/data/talents/misc/misc.lua index 4f2db5ebc3ac9aa26baa5c978f7e43c293a482fe..9a69c0a5caf7887fbea7705b0d97eeee0d70ea4f 100644 --- a/game/modules/tome/data/talents/misc/misc.lua +++ b/game/modules/tome/data/talents/misc/misc.lua @@ -286,3 +286,21 @@ newTalent{ The bonus will increase with the Willpower stat]]):format(10 + self:getWil(20)) end, } + +-- Yeek's power: temporary damage increase +newTalent{ + short_name = "YEEK_WILL", + name = "Dominant Will", + type = {"base/race", 1}, + no_energy = true, + cooldown = 50, + tactical = { ATTACK = 2 }, + action = function(self, t) + self:setEffect(self.EFF_ORC_FURY, 5, {power=10 + self:getWil(20)}) + return true + end, + info = function(self) + return ([[Summons your lust for blood and destruction, increasing all damage by %d%% for 5 turns. + The bonus will increase with the Willpower stat]]):format(10 + self:getWil(20)) + end, +} diff --git a/game/modules/tome/data/zones/arena/objects.lua b/game/modules/tome/data/zones/arena/objects.lua index 9c21b2f124d98d1bdae15af808f6620c6a757c54..fc0bc9f22a39c42ea023e59a84443c99f40d7655 100644 --- a/game/modules/tome/data/zones/arena/objects.lua +++ b/game/modules/tome/data/zones/arena/objects.lua @@ -62,7 +62,7 @@ newEntity{ define_as = "ORB_KNOWLEDGE", }, carrier = { - auto_id_mundane = 1, + auto_id = 1, }, } diff --git a/game/modules/tome/dialogs/UseTalents.lua b/game/modules/tome/dialogs/UseTalents.lua new file mode 100644 index 0000000000000000000000000000000000000000..0f39d9a3d3a5dc31421a33d78334364e05af377e --- /dev/null +++ b/game/modules/tome/dialogs/UseTalents.lua @@ -0,0 +1,216 @@ +-- TE4 - T-Engine 4 +-- 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 + +require "engine.class" +local Dialog = require "engine.ui.Dialog" +local TreeList = require "engine.ui.TreeList" +local ListColumns = require "engine.ui.ListColumns" +local Textzone = require "engine.ui.Textzone" +local TextzoneList = require "engine.ui.TextzoneList" +local Separator = require "engine.ui.Separator" + +module(..., package.seeall, class.inherit(Dialog)) + +function _M:init(actor) + self.actor = actor + actor.hotkey = actor.hotkey or {} + Dialog.init(self, "Use Talents: "..actor.name, game.w * 0.8, game.h * 0.8) + + self.c_tut = Textzone.new{width=math.floor(self.iw / 2 - 10), height=1, auto_height=true, no_color_bleed=true, text=[[ +You can bind a talent to a hotkey be pressing the corresponding hotkey while selecting a talent or by right-clicking on the talent. +Check out the keybinding screen in the game menu to bind hotkeys to a key (default is 1-0 plus control or shift). +]]} + self.c_desc = TextzoneList.new{width=math.floor(self.iw / 2 - 10), height=self.ih - self.c_tut.h - 20, scrollbar=true, no_color_bleed=true} + + self:generateList() + + local cols = { + {name="", width={40,"fixed"}, display_prop="char"}, + {name="Talent", width=80, display_prop="name"}, + {name="Status", width=20, display_prop="status"}, + {name="Hotkey", width={70,"fixed"}, display_prop="hotkey"}, + {name="Left Mouse", width={60,"fixed"}, display_prop=function(item) if item.talent == self.actor.auto_shoot_talent then return "LeftClick" else return "" end end}, + } + self.c_list = TreeList.new{width=math.floor(self.iw / 2 - 10), height=self.ih - 10, all_clicks=true, scrollbar=true, columns=cols, tree=self.list, fct=function(item, sel, button) self:use(item, button) end, select=function(item, sel) self:select(item) end} + self.c_list.cur_col = 2 + + self:loadUI{ + {left=0, top=0, ui=self.c_list}, + {right=0, top=self.c_tut.h + 20, ui=self.c_desc}, + {right=0, top=0, ui=self.c_tut}, + {hcenter=0, top=5, ui=Separator.new{dir="horizontal", size=self.ih - 10}}, + } + self:setFocus(self.c_list) + self:setupUI() + + self.key:addCommands{ + __TEXTINPUT = function(c) + if self.list and self.list.chars[c] then + self:use(self.list.chars[c]) + end + end, + } + self.key:addBinds{ + HOTKEY_1 = function() self:defineHotkey(1) end, + HOTKEY_2 = function() self:defineHotkey(2) end, + HOTKEY_3 = function() self:defineHotkey(3) end, + HOTKEY_4 = function() self:defineHotkey(4) end, + HOTKEY_5 = function() self:defineHotkey(5) end, + HOTKEY_6 = function() self:defineHotkey(6) end, + HOTKEY_7 = function() self:defineHotkey(7) end, + HOTKEY_8 = function() self:defineHotkey(8) end, + HOTKEY_9 = function() self:defineHotkey(9) end, + HOTKEY_10 = function() self:defineHotkey(10) end, + HOTKEY_11 = function() self:defineHotkey(11) end, + HOTKEY_12 = function() self:defineHotkey(12) end, + HOTKEY_SECOND_1 = function() self:defineHotkey(13) end, + HOTKEY_SECOND_2 = function() self:defineHotkey(14) end, + HOTKEY_SECOND_3 = function() self:defineHotkey(15) end, + HOTKEY_SECOND_4 = function() self:defineHotkey(16) end, + HOTKEY_SECOND_5 = function() self:defineHotkey(17) end, + HOTKEY_SECOND_6 = function() self:defineHotkey(18) end, + HOTKEY_SECOND_7 = function() self:defineHotkey(19) end, + HOTKEY_SECOND_8 = function() self:defineHotkey(20) end, + HOTKEY_SECOND_9 = function() self:defineHotkey(21) end, + HOTKEY_SECOND_10 = function() self:defineHotkey(22) end, + HOTKEY_SECOND_11 = function() self:defineHotkey(23) end, + HOTKEY_SECOND_12 = function() self:defineHotkey(24) end, + HOTKEY_THIRD_1 = function() self:defineHotkey(25) end, + HOTKEY_THIRD_2 = function() self:defineHotkey(26) end, + HOTKEY_THIRD_3 = function() self:defineHotkey(27) end, + HOTKEY_THIRD_4 = function() self:defineHotkey(28) end, + HOTKEY_THIRD_5 = function() self:defineHotkey(29) end, + HOTKEY_THIRD_6 = function() self:defineHotkey(30) end, + HOTKEY_THIRD_7 = function() self:defineHotkey(31) end, + HOTKEY_THIRD_8 = function() self:defineHotkey(31) end, + HOTKEY_THIRD_9 = function() self:defineHotkey(33) end, + HOTKEY_THIRD_10 = function() self:defineHotkey(34) end, + HOTKEY_THIRD_11 = function() self:defineHotkey(35) end, + HOTKEY_THIRD_12 = function() self:defineHotkey(36) end, + EXIT = function() game:unregisterDialog(self) end, + } +end + +function _M:defineHotkey(id) + if not self.actor.hotkey then return end + local item = self.list[self.c_list.sel] + if not item or not item.talent then return end + + self.actor.hotkey[id] = {"talent", item.talent} + self:simplePopup("Hotkey "..id.." assigned", self.actor:getTalentFromId(item.talent).name:capitalize().." assigned to hotkey "..id) + self.actor.changed = true +end + +function _M:select(item) + if item then + self.c_desc:switchItem(item, item.desc) + end +end + +function _M:use(item, button) + if not item or not item.talent then return end + + if button == "right" then + local list = { + {name="Unbind", what="unbind"}, + {name="Bind to left mouse click (on a target)", what="left"}, + } + for i = 1, 36 do list[#list+1] = {name="Hotkey "..i, what=i} end + Dialog:listPopup("Bind talent: "..item.name, "How do you want to bind this talent?", list, 400, 500, function(b) + if type(b.what) == "number" then + for i = 1, 36 do + if self.actor.hotkey[i] and self.actor.hotkey[i][1] == "talent" and self.actor.hotkey[i][2] == item.talent then self.actor.hotkey[i] = nil end + end + self.actor.hotkey[b.what] = {"talent", item.talent} + self:simplePopup("Hotkey "..b.what.." assigned", self.actor:getTalentFromId(item.talent).name:capitalize().." assigned to hotkey "..b.what) + elseif b.what == "left" then + self.actor.auto_shoot_talent = item.talent + self:simplePopup("Left mouse click assigned", self.actor:getTalentFromId(item.talent).name:capitalize().." assigned to left mouse click on an hostile target.") + elseif b.what == "unbind" then + if self.actor.auto_shoot_talent == item.talent then self.actor.auto_shoot_talent = nil end + for i = 1, 36 do + if self.actor.hotkey[i] and self.actor.hotkey[i][1] == "talent" and self.actor.hotkey[i][2] == item.talent then self.actor.hotkey[i] = nil end + end + end + self.c_list:drawTree() + self.actor.changed = true + end) + return + end + + game:unregisterDialog(self) + self.actor:useTalent(item.talent) +end + +function _M:generateList() + -- Makes up the list + local list = {} + list.chars = {} + local letter = 1 + for i, tt in ipairs(self.actor.talents_types_def) do + local cat = tt.type:gsub("/.*", "") + local where = #list + local added = false + local nodes = {} + + -- Find all talents of this school + for j, t in ipairs(tt.talents) do + if self.actor:knowTalent(t.id) and t.mode ~= "passive" then + local typename = "talent" + local status = tstring{{"color", "LIGHT_GREEN"}, "Active"} + if self.actor:isTalentCoolingDown(t) then status = tstring{{"color", "LIGHT_RED"}, self.actor:isTalentCoolingDown(t).." turns"} + elseif t.mode == "sustained" then status = self.actor:isTalentActive(t.id) and tstring{{"color", "YELLOW"}, "Sustaining"} or tstring{{"color", "LIGHT_GREEN"}, "Sustain"} end + nodes[#nodes+1] = { + char=self:makeKeyChar(letter), + name=t.name.." ("..typename..")", + status=status, + talent=t.id, + desc=self.actor:getTalentFullDescription(t), + color=function() return {0xFF, 0xFF, 0xFF} end, + hotkey=function(item) + for i = 1, 36 do if self.actor.hotkey[i] and self.actor.hotkey[i][1] == "talent" and self.actor.hotkey[i][2] == item.talent then + return "H.Key "..i.."" + end end + return "" + end, + } + list.chars[self:makeKeyChar(letter)] = nodes[#nodes] + added = true + letter = letter + 1 + end + end + + if added then + table.insert(list, where+1, { + char="", + name=tstring{{"font","bold"}, cat:capitalize().." / "..tt.name:capitalize(), {"font","normal"}}, + type=tt.type, + color=function() return {0x80, 0x80, 0x80} end, + status="", + desc=tt.description, + nodes=nodes, + hotkey="", + shown=true, + }) + end + + end + for i = 1, #list do list[i].id = i end + self.list = list +end diff --git a/ideas/factions.ods b/ideas/factions.ods index 4cb69b77129a2c844e4725ba2366151ca9920fbe..3a4de86885ad51183b6e79f74927c05e11098640 100644 Binary files a/ideas/factions.ods and b/ideas/factions.ods differ diff --git a/ideas/inscriptions.ods b/ideas/inscriptions.ods index cb0a55d0f156d34b75356c7f7140c82de133620c..c32c0d471216a9e41bf7355c7476c02b78ef0e9c 100644 Binary files a/ideas/inscriptions.ods and b/ideas/inscriptions.ods differ diff --git a/ideas/races.ods b/ideas/races.ods index b0ab206b1bad5f21567ce3ad793a2ef05fe3822c..c6f2dc281a15171197d52a390592d64a52ddb8f7 100644 Binary files a/ideas/races.ods and b/ideas/races.ods differ