From 000753ec38e72a3f9b6b80cac296196c57ab0442 Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Wed, 22 Jun 2011 11:42:45 +0000 Subject: [PATCH] plop git-svn-id: http://svn.net-core.org/repos/t-engine4@3705 51575b47-30f0-44d4-a5cc-537603b46e54 --- game/modules/tome/data/birth/classes/none.lua | 43 +++++++++++++++++++ game/modules/tome/data/birth/descriptors.lua | 6 +++ .../tome/data/birth/races/construct.lua | 2 +- game/modules/tome/dialogs/Birther.lua | 3 ++ 4 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 game/modules/tome/data/birth/classes/none.lua diff --git a/game/modules/tome/data/birth/classes/none.lua b/game/modules/tome/data/birth/classes/none.lua new file mode 100644 index 0000000000..f2abc9af35 --- /dev/null +++ b/game/modules/tome/data/birth/classes/none.lua @@ -0,0 +1,43 @@ +-- ToME - Tales of Maj'Eyal +-- Copyright (C) 2009, 2010, 2011 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 + +newBirthDescriptor{ + type = "class", + name = "None", + desc = { + "Your race can not select a class, it has its own powers.", + }, + descriptor_choices = + { + subclass = + { + __ALL__ = "disallow", + None = "allow", + }, + }, +} + +newBirthDescriptor{ + type = "subclass", + name = "None", + desc = { + "Your race can not select a class, it has its own powers.", + }, + not_on_random_boss = true, +} diff --git a/game/modules/tome/data/birth/descriptors.lua b/game/modules/tome/data/birth/descriptors.lua index 4e0e481e77..aebf5a0b8c 100644 --- a/game/modules/tome/data/birth/descriptors.lua +++ b/game/modules/tome/data/birth/descriptors.lua @@ -56,6 +56,11 @@ newBirthDescriptor{ -- Nobody can be a sun paladin but elves ['Anorithil'] = "disallow", }, + class = + { + -- Specific to some races + None = "disallow", + }, }, talents = {}, experience = 1.0, @@ -246,3 +251,4 @@ load("/data/birth/classes/corrupted.lua") load("/data/birth/classes/afflicted.lua") load("/data/birth/classes/chronomancer.lua") load("/data/birth/classes/psionic.lua") +load("/data/birth/classes/none.lua") diff --git a/game/modules/tome/data/birth/races/construct.lua b/game/modules/tome/data/birth/races/construct.lua index 913f70a1c0..dbe6ee0109 100644 --- a/game/modules/tome/data/birth/races/construct.lua +++ b/game/modules/tome/data/birth/races/construct.lua @@ -65,7 +65,7 @@ newBirthDescriptor class = { __ALL__ = "disallow", - Warrior = "allow", + None = "allow", }, subclass = { diff --git a/game/modules/tome/dialogs/Birther.lua b/game/modules/tome/dialogs/Birther.lua index 8651b73942..69e80faf51 100644 --- a/game/modules/tome/dialogs/Birther.lua +++ b/game/modules/tome/dialogs/Birther.lua @@ -569,6 +569,9 @@ function _M:generateClasses() if self.descriptors_by_type.difficulty == "Tutorial" then self:classUse(tree[1], 1) self:classUse(tree[1].nodes[1], 2) + elseif tree[1].id == "None" then + self:classUse(tree[1], 1) + self:classUse(tree[1].nodes[1], 2) end end end -- GitLab