Commit 75c2471ae04cfe3646dd0947dfd5269ee976bbb4
1 parent
18778494
De-activating Willful Tormenter will also disable other sustains until the max vim is > 0
git-svn-id: http://svn.net-core.org/repos/t-engine4@5140 51575b47-30f0-44d4-a5cc-537603b46e54
Showing
1 changed file
with
11 additions
and
0 deletions
... | ... | @@ -33,6 +33,17 @@ newTalent{ |
33 | 33 | end, |
34 | 34 | deactivate = function(self, t, p) |
35 | 35 | self:removeTemporaryValue("max_vim", p.vim) |
36 | + | |
37 | + while self:getMaxVim() < 0 do | |
38 | + local l = {} | |
39 | + for tid, _ in pairs(self.sustain_talents) do | |
40 | + local t = self:getTalentFromId(tid) | |
41 | + if t.sustain_vim then l[#l+1] = tid end | |
42 | + end | |
43 | + if #l == 0 then break end | |
44 | + self:forceUseTalent(rng.table(l), {ignore_energy=true, no_equilibrium_fail=true, no_paradox_fail=true}) | |
45 | + end | |
46 | + | |
36 | 47 | return true |
37 | 48 | end, |
38 | 49 | info = function(self, t) | ... | ... |
-
Please register or login to post a comment