Commit fb1ed2335588e1407e3caf2054bf50a0a9ebbe01

Authored by dg
1 parent 2e9e0c1d

Shield Wall does gradual stun&knockback resist


git-svn-id: http://svn.net-core.org/repos/t-engine4@2664 51575b47-30f0-44d4-a5cc-537603b46e54
... ... @@ -227,18 +227,13 @@ newTalent{
227 227 return nil
228 228 end
229 229
230   - local stun, knock
231   - if self:getTalentLevel(t) >= 5 then
232   - stun = self:addTemporaryValue("stun_immune", 1)
233   - knock = self:addTemporaryValue("knockback_immune", 1)
234   - end
235 230 return {
  231 + stun = self:addTemporaryValue("stun_immune", 0.1 * self:getTalentLevel(t))
  232 + knock = self:addTemporaryValue("knockback_immune", 0.1 * self:getTalentLevel(t))
236 233 atk = self:addTemporaryValue("combat_atk", -10),
237 234 dam = self:addTemporaryValue("combat_dam", -10),
238 235 def = self:addTemporaryValue("combat_def", 5 + (1 + self:getDex(4)) * self:getTalentLevel(t) + self:getTalentLevel(self.T_SHIELD_EXPERTISE) * 2),
239 236 armor = self:addTemporaryValue("combat_armor", 5 + (1 + self:getDex(4)) * self:getTalentLevel(t) + self:getTalentLevel(self.T_SHIELD_EXPERTISE)),
240   - stun = stun,
241   - knock = knock
242 237 }
243 238 end,
244 239 deactivate = function(self, t, p)
... ... @@ -246,15 +241,16 @@ newTalent{
246 241 self:removeTemporaryValue("combat_armor", p.armor)
247 242 self:removeTemporaryValue("combat_atk", p.atk)
248 243 self:removeTemporaryValue("combat_dam", p.dam)
249   - if p.stun then self:removeTemporaryValue("stun_immune", p.stun) end
250   - if p.knock then self:removeTemporaryValue("knockback_immune", p.knock) end
  244 + self:removeTemporaryValue("stun_immune", p.stun)
  245 + self:removeTemporaryValue("knockback_immune", p.knock)
251 246 return true
252 247 end,
253 248 info = function(self, t)
254 249 return ([[Enter a protective battle stance, increasing defense by %d and armor by %d at the cost of 10 attack and 10 damage. The defense and armor increase is based on dexterity.
255   - At level 5 it also makes you immune to stunning and knockback.]]):format(
  250 + It also grants resistance to stunning and knockback (%d%%).]]):format(
256 251 5 + (1 + self:getDex(4)) * self:getTalentLevel(t) + self:getTalentLevel(self.T_SHIELD_EXPERTISE)* 2,
257   - 5 + (1 + self:getDex(4)) * self:getTalentLevel(t) + self:getTalentLevel(self.T_SHIELD_EXPERTISE)
  252 + 5 + (1 + self:getDex(4)) * self:getTalentLevel(t) + self:getTalentLevel(self.T_SHIELD_EXPERTISE),
  253 + 0.1 * self:getTalentLevel(t), 0.1 * self:getTalentLevel(t)
258 254 )
259 255 end,
260 256 }
... ...