Commit e4217207911ec8557c5be721af632620d1ba4163

Authored by DarkGod
2 parents eed6b328 ea406299

Merge branch 'deeprock-fix' into 'master'

Update Deeprock Form

to always remove levels in Volcano and Throw Boulder (even if you unlearn Volcanic Rock/ Boulder Rock while the effect is active)

See merge request !706
... ... @@ -4322,7 +4322,8 @@ newEffect{
4322 4322 on_lose = function(self, err) return _t"#Target# is abandoned by the Stone's power.", _t"-Deeprock Form" end,
4323 4323 activate = function(self, eff)
4324 4324 if self:knowTalent(self.T_VOLCANIC_ROCK) then
4325   - self:learnTalent(self.T_VOLCANO, true, self:getTalentLevelRaw(self.T_VOLCANIC_ROCK) * 2, {no_unlearn=true})
  4325 + eff.volcano = self:getTalentLevelRaw(self.T_VOLCANIC_ROCK)
  4326 + self:learnTalent(self.T_VOLCANO, true, eff.volcano * 2, {no_unlearn=true})
4326 4327 self:effectTemporaryValue(eff, "talent_cd_reduction", {[self.T_VOLCANO] = 15})
4327 4328
4328 4329 local t = self:getTalentFromId(self.T_VOLCANIC_ROCK)
... ... @@ -4332,7 +4333,8 @@ newEffect{
4332 4333 end
4333 4334
4334 4335 if self:knowTalent(self.T_BOULDER_ROCK) then
4335   - self:learnTalent(self.T_THROW_BOULDER, true, self:getTalentLevelRaw(self.T_BOULDER_ROCK) * 2, {no_unlearn=true})
  4336 + eff.boulder = self:getTalentLevelRaw(self.T_BOULDER_ROCK)
  4337 + self:learnTalent(self.T_THROW_BOULDER, true, eff.boulder * 2, {no_unlearn=true})
4336 4338
4337 4339 local t = self:getTalentFromId(self.T_BOULDER_ROCK)
4338 4340 eff.natureDam, eff.naturePen = t.getDam(self, t), t.getPen(self, t)
... ... @@ -4370,8 +4372,8 @@ newEffect{
4370 4372 game.level.map:updateMap(self.x, self.y)
4371 4373 end,
4372 4374 deactivate = function(self, eff)
4373   - if self:knowTalent(self.T_VOLCANIC_ROCK) then self:unlearnTalent(self.T_VOLCANO, self:getTalentLevelRaw(self.T_VOLCANIC_ROCK) * 2) end
4374   - if self:knowTalent(self.T_BOULDER_ROCK) then self:unlearnTalent(self.T_THROW_BOULDER, self:getTalentLevelRaw(self.T_BOULDER_ROCK) * 2) end
  4375 + if eff.volcano then self:unlearnTalent(self.T_VOLCANO, eff.volcano * 2) end
  4376 + if eff.boulder then self:unlearnTalent(self.T_THROW_BOULDER, eff.boulder * 2) end
4375 4377
4376 4378 self.replace_display = nil
4377 4379 self:removeAllMOs()
... ...