Commit 2e32796615aa5988ef60937c1c5f7ccbe1dfa671

Authored by DarkGod
1 parent ba5001db

Added an unlock for Stone Wardens (yes you need to do it as a Dwarf)

... ... @@ -2647,6 +2647,7 @@ unlocks_list = {
2647 2647 wilder_wyrmic = "Class: Wyrmic",
2648 2648 wilder_summoner = "Class: Summoner",
2649 2649 wilder_oozemancer = "Class: Oozemancer",
  2650 + wilder_stone_warden = "Class: Stone Warden",
2650 2651
2651 2652 corrupter_reaver = "Class: Reaver",
2652 2653 corrupter_corruptor = "Class: Corruptor",
... ...
... ... @@ -234,6 +234,8 @@ newBirthDescriptor{
234 234 newBirthDescriptor{
235 235 type = "subclass",
236 236 name = "Stone Warden",
  237 + locked = function() return profile.mod.allow_build.wilder_stone_warden end,
  238 + locked_desc = "The Spellblaze's scars may be starting to heal,\nbut little can change how the partisans feel.\nNature and arcane could bridge their divide -\nand when it comes down to it, gold won't take sides...",
237 239 desc = {
238 240 "Stone Wardens are dwarves trained in both the eldritch arts and the worship of nature.",
239 241 "While other races are stuck in their belief that arcane forces and natural forces are meant to oppose, dwarves have found a way to combine them in harmony.",
... ...
... ... @@ -217,6 +217,20 @@ function _M:finish()
217 217 t.on_levelup_close(self.actor, t, lvl, old_lvl, lvl_raw, old_lvl_raw, true)
218 218 end
219 219 end
  220 +
  221 + if self.actor.player then
  222 + if self.actor.descriptor and self.actor.descriptor.race == "Dwarf" then
  223 + local count_nature, count_spell = 0, 0
  224 + for tid, lev in pairs(self.actor.talents) do
  225 + local t = self.actor:getTalentFromId(tid)
  226 + if t and t.is_spell then count_spell = count_spell + lev end
  227 + if t and t.is_nature then count_nature = count_nature + lev end
  228 + end
  229 + if count_nature >= 10 and count_spell >= 10 then
  230 + game:setAllowedBuild("wilder_stone_warden", true)
  231 + end
  232 + end
  233 + end
220 234 return true
221 235 end
222 236
... ...