Skip to content
Snippets Groups Projects
Commit 0483d02e authored by DarkGod's avatar DarkGod
Browse files

Call of the Crypt level 5 effect can only sustain at most one mage and one archer

parent c94d9195
No related branches found
No related tags found
No related merge requests found
......@@ -216,8 +216,19 @@ newTalent{
if self.__call_crypt_count == 3 then
self.__call_crypt_count = 0
if self:getTalentLevel(t) >= 5 then
local stats = necroArmyStats(self)
local pos = rng.tableRemove(possible_spots)
if pos then necroSetupSummon(self, rng.percent(50) and t.minions_list.skel_mage or t.minions_list.skel_m_archer, pos.x, pos.y, lev, nil, true) end
local kind = nil
if not stats.has_skeleton_mage and stats.has_skeleton_archer then
kind = t.minions_list.skel_mage
elseif stats.has_skeleton_mage and not stats.has_skeleton_archer then
kind = t.minions_list.skel_m_archer
elseif not stats.has_skeleton_mage and not stats.has_skeleton_archer then
kind = rng.percent(50) and t.minions_list.skel_mage or t.minions_list.skel_m_archer
else
kind = t.minions_list.a_skel_warrior
end
if pos and kind then necroSetupSummon(self, kind, pos.x, pos.y, lev, nil, true) end
end
end
end
......@@ -231,7 +242,7 @@ newTalent{
return ([[Call upon the battle fields of old to collect bones and fuse them with souls, combining them to create skeletal minions to do your bidding.
Up to %d skeleton warriors of level %d are summoned. Up to %d skeletons can be controlled at once.
At level 3 the summons become armoured skeletons warriors.
At level 5 every 3 summoned warriors a free skeleton mage or skeleton archer is also created (without costing a soul).
At level 5 every 3 summoned warriors a free skeleton mage or skeleton archer is also created (without costing a soul). You can only sustain one mage and one archer at most in your army, in which case the free minion will be an armoured skeleton warrior.
#GREY##{italic}#Skeleton minions come in fewer numbers than ghoul minions but are generaly more durable.#{normal}#
]]):tformat(t:_getNb(self), math.max(1, self.level + t:_getLevel(self)), t:_getMax(self, true))
......
......@@ -126,7 +126,11 @@ function necroArmyStats(self)
if not game.party or not game.party:hasMember(self) then
for _, act in pairs(game.level.entities) do if act.summoner == self and act.necrotic_minion then
stats.nb = stats.nb + 1
if act.skeleton_minion then stats.nb_skeleton = stats.nb_skeleton + 1 end
if act.skeleton_minion then
stats.nb_skeleton = stats.nb_skeleton + 1
if act.skeleton_minion == "mage" then stats.has_skeleton_mage = true end
if act.skeleton_minion == "archer" then stats.has_skeleton_archer = true end
end
if act.ghoul_minion then stats.nb_ghoul = stats.nb_ghoul + 1 end
if act.lord_of_skulls then stats.lord_of_skulls = act end
if act.is_bone_giant then stats.bone_giant = act end
......@@ -136,7 +140,11 @@ function necroArmyStats(self)
else
for act, _ in pairs(game.party.members) do if act.summoner == self and act.necrotic_minion then
stats.nb = stats.nb + 1
if act.skeleton_minion then stats.nb_skeleton = stats.nb_skeleton + 1 end
if act.skeleton_minion then
stats.nb_skeleton = stats.nb_skeleton + 1
if act.skeleton_minion == "mage" then stats.has_skeleton_mage = true end
if act.skeleton_minion == "archer" then stats.has_skeleton_archer = true end
end
if act.ghoul_minion then stats.nb_ghoul = stats.nb_ghoul + 1 end
if act.lord_of_skulls then stats.lord_of_skulls = act end
if act.is_bone_giant then stats.bone_giant = act end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment