diff --git a/game/engine/Birther.lua b/game/engine/Birther.lua index 7485ba9156ad31fb4d7a3404615815fd8b0c12f5..940c215a590d1550a73235714f65fc50a606571e 100644 --- a/game/engine/Birther.lua +++ b/game/engine/Birther.lua @@ -130,14 +130,19 @@ function _M:selectType(type) print("[BIRTHER] selecting type", type) for i, d in ipairs(self.birth_descriptor_def[type]) do local allowed = true + print("[BIRTHER] checking allowance for ", d.name) for j, od in ipairs(self.descriptors) do if od.descriptor_choices[type] then local what = util.getval(od.descriptor_choices[type][d.name]) or util.getval(od.descriptor_choices[type].__ALL__) if what and what == "allow" then allowed = true - elseif what and what == "never" then + elseif what and (what == "never" or what == "disallow") then allowed = false + elseif what and what == "forbid" then + allowed = nil end + print("[BIRTHER] test against ", od.name, "=>", what, allowed) + if allowed == nil then break end end end diff --git a/game/modules/tome/data/birth/classes/archer.lua b/game/modules/tome/data/birth/classes/archer.lua index ee62a3b4faa91b353dbeaa4d3445531e6c2e4b03..8156a9f5a114f504418f92f58d477f53abe0e4f4 100644 --- a/game/modules/tome/data/birth/classes/archer.lua +++ b/game/modules/tome/data/birth/classes/archer.lua @@ -27,7 +27,7 @@ newBirthDescriptor{ { subclass = { - __ALL__ = "never", + __ALL__ = "disallow", Archer = "allow", Slinger = "allow", }, diff --git a/game/modules/tome/data/birth/classes/divine.lua b/game/modules/tome/data/birth/classes/divine.lua index eb90c10c6a2bf9ebc9ee8ade1acc77132962f52a..13e44b8d6530a120b53eadae60f66bb590794e37 100644 --- a/game/modules/tome/data/birth/classes/divine.lua +++ b/game/modules/tome/data/birth/classes/divine.lua @@ -28,9 +28,9 @@ newBirthDescriptor{ { subclass = { - __ALL__ = "never", - ['Sun Paladin'] = function() return profile.mod.allow_build.divine_sun_paladin and "allow" or "never" end, - Anorithil = function() return profile.mod.allow_build.divine_anorithil and "allow" or "never" end, + __ALL__ = "disallow", + ['Sun Paladin'] = function() return profile.mod.allow_build.divine_sun_paladin and "allow" or "disallow" end, + Anorithil = function() return profile.mod.allow_build.divine_anorithil and "allow" or "disallow" end, }, }, copy = { diff --git a/game/modules/tome/data/birth/classes/mage.lua b/game/modules/tome/data/birth/classes/mage.lua index c4c7d7190ee3507e74edd7a60ec893ed6662754c..379cc8aa3ab0127f4d7f9305f07b10a11af3cd69 100644 --- a/game/modules/tome/data/birth/classes/mage.lua +++ b/game/modules/tome/data/birth/classes/mage.lua @@ -28,7 +28,7 @@ newBirthDescriptor{ { subclass = { - __ALL__ = "never", + __ALL__ = "disallow", Archmage = "allow", -- Necromancer = "allow", }, diff --git a/game/modules/tome/data/birth/classes/rogue.lua b/game/modules/tome/data/birth/classes/rogue.lua index 4bfa5c02d7f4805369a46f3c457589706249d77a..394a0d68578ec720966083f8f2db1ebce0a8a46d 100644 --- a/game/modules/tome/data/birth/classes/rogue.lua +++ b/game/modules/tome/data/birth/classes/rogue.lua @@ -27,7 +27,7 @@ newBirthDescriptor{ { subclass = { - __ALL__ = "never", + __ALL__ = "disallow", Rogue = "allow", Shadowblade = "allow", }, diff --git a/game/modules/tome/data/birth/classes/warrior.lua b/game/modules/tome/data/birth/classes/warrior.lua index db1b15a63d5cadbccb8402b715870886c32fe00d..690142da50b20c5e6bf735acbbc6b75dbb3faca0 100644 --- a/game/modules/tome/data/birth/classes/warrior.lua +++ b/game/modules/tome/data/birth/classes/warrior.lua @@ -27,7 +27,7 @@ newBirthDescriptor{ { subclass = { - __ALL__ = "never", + __ALL__ = "disallow", Fighter = "allow", Berserker = "allow", ["Arcane Blade"] = "allow", diff --git a/game/modules/tome/data/birth/classes/wilder.lua b/game/modules/tome/data/birth/classes/wilder.lua index c8b58dfd1b4447ce0cf311dada39e19b8f0f8495..680011259e5db019f936de745a245adf14afd61c 100644 --- a/game/modules/tome/data/birth/classes/wilder.lua +++ b/game/modules/tome/data/birth/classes/wilder.lua @@ -28,9 +28,9 @@ newBirthDescriptor{ { subclass = { - __ALL__ = "never", - Summoner = function() return profile.mod.allow_build.wilder_summoner and "allow" or "never" end, - Wyrmic = function() return profile.mod.allow_build.wilder_wyrmic and "allow" or "never" end, + __ALL__ = "disallow", + Summoner = function() return profile.mod.allow_build.wilder_summoner and "allow" or "disallow" end, + Wyrmic = function() return profile.mod.allow_build.wilder_wyrmic and "allow" or "disallow" end, }, }, copy = { diff --git a/game/modules/tome/data/birth/descriptors.lua b/game/modules/tome/data/birth/descriptors.lua index dbf666d0cebb375156530b981e95018240e59b39..2a7443a3f93242d54ad3a6e16c60b4f7c7e80b9f 100644 --- a/game/modules/tome/data/birth/descriptors.lua +++ b/game/modules/tome/data/birth/descriptors.lua @@ -29,13 +29,14 @@ newBirthDescriptor{ { world = { + Tutorial = "disallow", Arda = "allow", - ["Spydrë"] = function() return profile.mod.allow_build.world_spydre and "allow" or "never" end, + ["Spydrë"] = function() return profile.mod.allow_build.world_spydre and "allow" or "disallow" end, }, subclass = { -- Nobdoy can be a sun paladin but humans & elves - ['Sun Paladin'] = "never", + ['Sun Paladin'] = "disallow", }, }, talents = {}, @@ -68,14 +69,22 @@ newBirthDescriptor{ --------------- Difficulties newBirthDescriptor{ type = "difficulty", - name = "Easy", + name = "Tutorial", desc = { - "Easy game setting", + "Tutorial mode, start with a simplified character and discover the game in a simple quest.", "All damage done to the player reduced by 20%", "All healing for the player increased by 10%", "No achievements possible.", }, + descriptor_choices = + { + world = + { + __ALL__ = "disallow", + Tutorial = "allow", + } + }, copy = { resolvers.generic(function() game.difficulty = game.DIFFICULTY_EASY end) }, } newBirthDescriptor{ diff --git a/game/modules/tome/data/birth/races/dwarf.lua b/game/modules/tome/data/birth/races/dwarf.lua index 585850bc6e132ec9bad667a0ad43d28ae54529b9..71767694ef45423765fb45735db9837e0985b0fc 100644 --- a/game/modules/tome/data/birth/races/dwarf.lua +++ b/game/modules/tome/data/birth/races/dwarf.lua @@ -32,12 +32,12 @@ newBirthDescriptor{ { subrace = { - __ALL__ = "never", + __ALL__ = "disallow", Dwarf = "allow", }, sex = { - __ALL__ = "never", + __ALL__ = "disallow", Male = "allow", }, }, diff --git a/game/modules/tome/data/birth/races/elf.lua b/game/modules/tome/data/birth/races/elf.lua index 0eaec837ccf65c4bbd40d1344d5096205918124f..9f193659ffe16a922d158cdaf105b26a658758e6 100644 --- a/game/modules/tome/data/birth/races/elf.lua +++ b/game/modules/tome/data/birth/races/elf.lua @@ -34,7 +34,7 @@ newBirthDescriptor{ { Nandor = "allow", Avari = "allow", - __ALL__ = "never", + __ALL__ = "disallow", }, subclass = { diff --git a/game/modules/tome/data/birth/races/hobbit.lua b/game/modules/tome/data/birth/races/hobbit.lua index 57fbda53e037008c7ae852ec65337423d485e7a2..3f0657ff883fdb8f659689bcbcd2db136eb54632 100644 --- a/game/modules/tome/data/birth/races/hobbit.lua +++ b/game/modules/tome/data/birth/races/hobbit.lua @@ -32,7 +32,7 @@ newBirthDescriptor{ { subrace = { - __ALL__ = "never", + __ALL__ = "disallow", Hobbit = "allow", }, }, diff --git a/game/modules/tome/data/birth/races/human.lua b/game/modules/tome/data/birth/races/human.lua index a3bcd05cde49fd8850a654b1fb3599f1b49bcaff..1bc3e8bf99ae0f833f60faaa9a8df01ee598c894 100644 --- a/game/modules/tome/data/birth/races/human.lua +++ b/game/modules/tome/data/birth/races/human.lua @@ -34,7 +34,7 @@ newBirthDescriptor{ ["Dúnadan"] = "allow", Rohirrim = "allow", Beorning = "allow", - __ALL__ = "never", + __ALL__ = "disallow", }, subclass = { diff --git a/game/modules/tome/data/birth/races/orc.lua b/game/modules/tome/data/birth/races/orc.lua index bf9324b904675d04c3c7970caa6d35ba32c0173b..3b5bfc4946ed618fc36c638d8d23866947cb1f14 100644 --- a/game/modules/tome/data/birth/races/orc.lua +++ b/game/modules/tome/data/birth/races/orc.lua @@ -32,17 +32,17 @@ newBirthDescriptor{ { subrace = { - __ALL__ = "never", + __ALL__ = "disallow", Orc = "allow", }, sex = { - __ALL__ = "never", + __ALL__ = "disallow", Male = "allow", }, class = { - Mage = "never", + Mage = "disallow", }, }, stats = { str=4, con=1, wil=2, mag=-2, dex=-2 }, diff --git a/game/modules/tome/data/birth/races/troll.lua b/game/modules/tome/data/birth/races/troll.lua index 69924d7d715320e4f8e9a3b6ed06d60b260c97f9..7c5615494ffbabe3150ab803ef532739ddfa56d6 100644 --- a/game/modules/tome/data/birth/races/troll.lua +++ b/game/modules/tome/data/birth/races/troll.lua @@ -30,12 +30,12 @@ newBirthDescriptor{ { subrace = { - __ALL__ = "never", + __ALL__ = "disallow", Troll = "allow", }, sex = { - __ALL__ = "never", + __ALL__ = "disallow", Male = "allow", }, }, diff --git a/game/modules/tome/data/birth/races/undead.lua b/game/modules/tome/data/birth/races/undead.lua index fe3e28ade10a3793fbe6d6beac809078d9800c35..a7b1868d14ca708eab1a837dbcc01713f62252d2 100644 --- a/game/modules/tome/data/birth/races/undead.lua +++ b/game/modules/tome/data/birth/races/undead.lua @@ -31,15 +31,15 @@ newBirthDescriptor{ { subrace = { - __ALL__ = "never", - Ghoul = function() return profile.mod.allow_build.undead_ghoul and "allow" or "never" end, - Skeleton = function() return profile.mod.allow_build.undead_skeleton and "allow" or "never" end, - Vampire = function() return profile.mod.allow_build.undead_vampire and "allow" or "never" end, - Wight = function() return profile.mod.allow_build.undead_wight and "allow" or "never" end, + __ALL__ = "disallow", + Ghoul = function() return profile.mod.allow_build.undead_ghoul and "allow" or "disallow" end, + Skeleton = function() return profile.mod.allow_build.undead_skeleton and "allow" or "disallow" end, + Vampire = function() return profile.mod.allow_build.undead_vampire and "allow" or "disallow" end, + Wight = function() return profile.mod.allow_build.undead_wight and "allow" or "disallow" end, }, class = { - Divine = "never", + Divine = "disallow", }, }, copy = { @@ -66,7 +66,7 @@ newBirthDescriptor { sex = { - __ALL__ = "never", + __ALL__ = "disallow", Male = "allow", }, }, @@ -111,7 +111,7 @@ newBirthDescriptor { sex = { - __ALL__ = "never", + __ALL__ = "disallow", Male = "allow", }, }, diff --git a/game/modules/tome/data/birth/worlds.lua b/game/modules/tome/data/birth/worlds.lua index 1fec0f382413c1fa54ae57f4a1852a27051bf6bd..de083125ad56924f1f63a48ce8aebfb39ca6560f 100644 --- a/game/modules/tome/data/birth/worlds.lua +++ b/game/modules/tome/data/birth/worlds.lua @@ -33,30 +33,66 @@ newBirthDescriptor{ { race = { - __ALL__ = "never", + __ALL__ = "disallow", Human = "allow", Elf = "allow", Dwarf = "allow", Hobbit = "allow", - Orc = function() return profile.mod.allow_build.orc and "allow" or "never" end, - Troll = function() return profile.mod.allow_build.troll and "allow" or "never" end, - Undead = function() return profile.mod.allow_build.undead and "allow" or "never" end, + Orc = function() return profile.mod.allow_build.orc and "allow" or "disallow" end, + Troll = function() return profile.mod.allow_build.troll and "allow" or "disallow" end, + Undead = function() return profile.mod.allow_build.undead and "allow" or "disallow" end, }, class = { __ALL__ = "allow", - Mage = function() return profile.mod.allow_build.mage and "allow" or "never" end, - Divine = function() return profile.mod.allow_build.divine and "allow" or "never" end, + Mage = function() return profile.mod.allow_build.mage and "allow" or "disallow" end, + Divine = function() return profile.mod.allow_build.divine and "allow" or "disallow" end, Wilder = function() return ( profile.mod.allow_build.wilder_summoner or profile.mod.allow_build.wilder_wyrmic - ) and "allow" or "never" + ) and "allow" or "disallow" end, }, }, } +newBirthDescriptor{ + type = "world", + name = "Tutorial", + desc = + { + "The tutorial will explain the basics of the game to get you started.", + }, + on_select = function() + setAuto("subclass", false) + setAuto("subrace", false) + end, + descriptor_choices = + { + race = + { + __ALL__ = "forbid", + Human = "allow", + }, + subrace = + { + __ALL__ = "forbid", + ["Dúnadan"] = "allow", + }, + class = + { + __ALL__ = "forbid", + Warrior = "allow", + }, + subclass = + { + __ALL__ = "forbid", + Fighter = "allow", + }, + }, +} + newBirthDescriptor{ type = "world", name = "Spydrë", @@ -70,9 +106,9 @@ newBirthDescriptor{ { race = { - __ALL__ = "never", + __ALL__ = "disallow", Human = "allow", --- Spider = function() return profile.mod.allow_build.spider and "allow" or "never" end, +-- Spider = function() return profile.mod.allow_build.spider and "allow" or "disallow" end, }, }, } diff --git a/game/modules/tome/data/zones/sandworm-lair/objects.lua b/game/modules/tome/data/zones/sandworm-lair/objects.lua index 78b9de6a5059fc62299cb6995a12424be8850bb0..bd20152ce4b962dbbc0a7a1ce906ef016584d130 100644 --- a/game/modules/tome/data/zones/sandworm-lair/objects.lua +++ b/game/modules/tome/data/zones/sandworm-lair/objects.lua @@ -31,9 +31,11 @@ newEntity{ use_simple = { name="consume the heart", use = function(self, who) game.logPlayer(who, "#00FFFF#You consume the heart and feel the knowledge of this very old creature fills you!") who.unused_stats = who.unused_stats + 3 - who.unused_talents = who.unused_talents + 2 + who.unused_talents = who.unused_talents + 1 + who.unused_skills = who.unused_skills + 1 game.logPlayer(who, "You have %d stat point(s) to spend. Press G to use them.", who.unused_stats) game.logPlayer(who, "You have %d talent point(s) to spend. Press G to use them.", who.unused_talents) + game.logPlayer(who, "You have %d skill point(s) to spend. Press G to use them.", who.unused_skills) who:learnTalentType("wild-gift/sand-drake", false) game.logPlayer(who, "You are transformed by the heart of the Queen!.")