Commit b2629b226936a21656f957eb358c6920d8f5b5c2

Authored by Otowa Kotori
1 parent 60fd8374

Split the effect of Brutalized and Stunned

This allows Brutalize reduce enemy's' `cut_immune` with out checking stun immune
... ... @@ -40,10 +40,11 @@ newTalent{
40 40 local hit = self:attackTarget(target, nil, t.getDamage(self, t), true)
41 41
42 42 if hit then
  43 + target:setEffect(target.EFF_BRUTALIZED, t.getDuration(self, t), {apply_power=self:combatPhysicalpower()})
43 44 if target:canBe("stun") then
44   - target:setEffect(target.EFF_BRUTALIZED, t.getDuration(self, t), {apply_power=self:combatPhysicalpower()})
  45 + target:setEffect(target.EFF_STUNNED, t.getDuration(self, t), {apply_power=self:combatPhysicalpower()})
45 46 else
46   - game.logSeen(target, "%s resists the brutality!", target.name:capitalize())
  47 + game.logSeen(target, "%s resists the stun!", target.name:capitalize())
47 48 end
48 49 end
49 50
... ...
... ... @@ -4338,35 +4338,17 @@ newEffect{
4338 4338 newEffect{
4339 4339 name = "Brutalized", image = "effects/stunned.png",
4340 4340 desc = _t"Brutalized",
4341   - long_desc = function(self, eff) return ("The target is brutally stunned, reducing damage by 50%%, movement speed by 50%%, bleed resist by 50%%, and halving talent cooldown."):tformat() end,
  4341 + long_desc = function(self, eff) return ("The target is brutalized, reducing bleed resist by 50%%."):tformat() end,
4342 4342 type = "physical",
4343   - subtype = { stun=true },
  4343 + subtype = { },
4344 4344 status = "detrimental",
4345 4345 parameters = { },
4346   - on_gain = function(self, err) return _t"#Target# is stunned by the brutal strike!", _t"+Brutalized" end,
4347   - on_lose = function(self, err) return _t"#Target# is not stunned anymore.", _t"-Brutalized" end,
  4346 + on_gain = function(self, err) return _t"#Target# is brutalized!", _t"+Brutalized" end,
  4347 + on_lose = function(self, err) return _t"#Target# is not brutalized anymore.", _t"-Brutalized" end,
4348 4348 activate = function(self, eff)
4349   - eff.tmpid = self:addTemporaryValue("stunned", 1)
4350   - eff.lockid = self:addTemporaryValue("half_talents_cooldown", 1)
4351   - eff.speedid = self:addTemporaryValue("movement_speed", -0.5)
4352   - eff.bleedid = self:addTemporaryValue("cut_immune", -0.5)
4353   -
4354   - local tids = {}
4355   - for tid, lev in pairs(self.talents) do
4356   - local t = self:getTalentFromId(tid)
4357   - if t and not self.talents_cd[tid] and t.mode == "activated" and not t.innate and util.getval(t.no_energy, self, t) ~= true then tids[#tids+1] = t end
4358   - end
4359   - for i = 1, 3 do
4360   - local t = rng.tableRemove(tids)
4361   - if not t then break end
4362   - self:startTalentCooldown(t.id, 1)
4363   - end
4364   - end,
4365   - deactivate = function(self, eff)
4366   - self:removeTemporaryValue("stunned", eff.tmpid)
4367   - self:removeTemporaryValue("half_talents_cooldown", eff.lockid)
4368   - self:removeTemporaryValue("movement_speed", eff.speedid)
4369   - self:removeTemporaryValue("cut_immune", eff.bleedid)
4370   - end,
  4349 + self:effectTemporaryValue(eff, "cut_immune", -0.5)
  4350 + end,
  4351 + deactivate = function(self, eff)
  4352 + end,
4371 4353 }
4372 4354
... ...