Commit 2d6444988ed354645bca78faa7ad7f9eedf03a8a

Authored by Lisa Greene
1 parent a5015742

Make Pace Yourself not actively detrimental

... ... @@ -79,15 +79,15 @@ newTalent {
79 79 mode = "sustained",
80 80 points = 5,
81 81 cooldown = 10,
82   - sustain_stamina = 0,
  82 + sustain_stamina = 15,
83 83 no_energy = true,
84 84 require = techs_strdex_req2,
85   - tactical = { STAMINA = 2 },
  85 + tactical = { DEFENSE = 2 },
86 86 random_ego = "utility",
87 87 activate = function(self, t)
88 88 local ret = {}
89 89 self:talentTemporaryValue(ret, "global_speed_add", -t.getSlow(self, t))
90   - self:talentTemporaryValue(ret, "fatigue", -t.getReduction(self, t))
  90 + self:talentTemporaryValue(ret, "flat_damage_armor", {all = t.getReduction(self, t)})
91 91 if core.shader.active(4) then
92 92 self:talentParticles(ret, {type="shader_shield", args={toback=true, size_factor=1, img="pace_yourself_shieldwall"}, shader={type="rotatingshield", noup=2.0, time_factor=2500, appearTime=0.2}})
93 93 self:talentParticles(ret, {type="shader_shield", args={toback=false, size_factor=1, img="pace_yourself_shieldwall"}, shader={type="rotatingshield", noup=1.0, time_factor=2500, appearTime=0.2}})
... ... @@ -99,13 +99,34 @@ newTalent {
99 99 return self:combatTalentLimit(t, 0, 0.15, .05)
100 100 end,
101 101 getReduction = function(self, t)
102   - return self:combatTalentScale(t, 10, 30)
  102 + return self:combatScale(self:combatDefense() * self:getTalentLevel(t), 5, 10, 30, 450)
  103 + end,
  104 + getBlockChance = function(self, t)
  105 + return self:combatTalentLimit(t, 100, 25, 55)
  106 + end,
  107 + callbackOnTakeDamageBeforeResists = function(self, t, src, x, y, type, dam, tmp)
  108 + local shield = self:hasShield()
  109 + local chance = t.getBlockChance(self, t)
  110 + if not shield or not self:knowTalent(self.T_BLOCK) then return end
  111 + local eff = self:hasEffect(self.EFF_BLOCKING)
  112 + local t2 = self:getTalentFromId(self.T_BLOCK)
  113 + local bt, bt_string = t2.getBlockedTypes(self, t2)
  114 + local bv = t2.getBlockValue(self, t2)
  115 + if not bt[type] then return end -- ignore types we can't block
  116 + if rng.percent(chance) and dam > bv/4 and not self:isTalentCoolingDown(t2) and not eff then
  117 + self:forceUseTalent(self.T_BLOCK, {ignore_energy=true})
  118 + return {dam=dam}
  119 + end
103 120 end,
104 121 info = function(self, t)
105 122 local slow = t.getSlow(self, t) * 100
106 123 local reduction = t.getReduction(self, t)
107   - return ([[Control your movements to conserve your energy. While this talent is activated, you are globally slowed by %0.1f%%, and your fatigue is decreased by %d%% (to a minimum of 0%%).]])
108   - :tformat(slow, reduction)
  124 + chance = t.getBlockChance(self, t)
  125 + return ([[Control your movements to increase your defenses. This allows you to shrug off minor damage and, if you have a shield equipped, preemptively Block in reaction to incoming damage.
  126 + While this talent is activated, you are globally slowed by %0.1f%% and all damage you take is reduced by a flat %0.1f.
  127 + If you have a shield equipped and Block is not on cooldown, any blockable damage that is greater than 25%% of your block value (before resistances) will have a %d%% chance to instantly activate Block.
  128 + The flat damage reduction will increase with your defense.]])
  129 + :tformat(slow, reduction, chance)
109 130 end,
110 131 }
111 132
... ...