Here's a quick patch that adds the Antimagic and Fungus trees (Zigur quest and Myssil-based Urkis quest) to the point planner.
Would be better if the Fungus tree could be made dependent on the Antimagic tree, but it works okay like this...
PS. 'Twould also be nice if the main code provided an is_spellcaster() function so that we don't have to maintain duplicate code...
Code:
diff --git a/overload/mod/dialogs/PointPlanDialog.lua b/overload/mod/dialogs/PointPlanDialog.lua
index f1789cf..9b0c128 100644
--- a/overload/mod/dialogs/PointPlanDialog.lua
+++ b/overload/mod/dialogs/PointPlanDialog.lua
@@ -61,6 +61,12 @@ local function has_done(tag)
game.player.addon.pointplanner.done[tag]
end
+-- Returns true if the specified player is a spellcaster
+-- (Logic duplicated from maps/wilderness/eyal.lua, for Zigur visibility)
+local function is_spellcaster(player)
+ return player:knowTalent(player.T_MANA_POOL) or player:knowTalent(player.T_VIM_POOL) or player:knowTalent(player.T_VIM_POOL) or player:knowTalent(player.T_NEGATIVE_POOL) or player:knowTalent(player.T_POSITIVE_POOL) or player:knowTalent(player.T_PARADOX_POOL) or player:attr("undead")
+end
+
-- All known sources of talent points or talent trees. Initially contains
-- only fixed sources; below we will add sources from escort quests.
-- Function fields:
@@ -136,6 +142,34 @@ local all_sources = {
end,
},
{
+ tag = 'antimagic',
+ desc = 'the Wild-Gift/Antimagic tree, from Zigur quest',
+ known = function()
+ -- per maps/wilderness/eyal.lua, only non-casters can see Zigur
+ return is_campaign("Maj'Eyal") and world:hasAchievement('ANTIMAGIC') and game.player and not is_spellcaster(game.player)
+ end,
+ done = function()
+ return game.player and game.player:knowTalentType('wild-gift/antimagic')
+ end,
+ use = function(p)
+ p:learnTalentType('wild-gift/antimagic', true)
+ end,
+ },
+ {
+ tag = 'antimagic_fungus',
+ desc = 'the Wild-Gift/Fungus tree, from Myssil quest',
+ known = function()
+ -- only non-casters can see Zigur
+ return is_campaign("Maj'Eyal") and world:hasAchievement('ANTIMAGIC') and game.player and not is_spellcaster(game.player)
+ end,
+ done = function()
+ return game.player and game.player:knowTalentType('wild-gift/fungus')
+ end,
+ use = function(p)
+ p:learnTalentType('wild-gift/fungus', false)
+ end,
+ },
+ {
tag = 'elixir_of_focus',
desc = [[2 class talent points from Agrimley's Elixir of Focus]],
known = function()