Commit 6d558c72e54a84e08b2863757cc8c0c35a7ba120

Authored by Lisa Greene
1 parent 3749125a

Rework capstone warcries talent

... ... @@ -3454,20 +3454,37 @@ newTalent{
3454 3454 }
3455 3455
3456 3456 newTalent{
3457   - name = "Second Wind",
  3457 + name = "Battle Cry",
3458 3458 type = {"technique/other", 1},
3459 3459 points = 5,
3460   - cooldown = 50,
3461   - no_energy = true,
3462   - tactical = { STAMINA = 2 },
3463   - getStamina = function(self, t) return 10 + self:combatTalentLimit(t, 2, .5, 1.3)*(self:getStr() + self:getWil()) end,
  3460 + cooldown = 30,
  3461 + stamina = 20,
  3462 + range = 0,
  3463 + radius = function(self, t) return math.min(12, math.floor(self:combatTalentScale(t, 4, 8))) end,
  3464 + target = function(self, t)
  3465 + return {type="cone", range=self:getTalentRange(t), radius=self:getTalentRadius(t), selffire=false}
  3466 + end,
  3467 + getSavesRed = function(self, t) return math.floor(self:combatTalentScale(t, 10, 30)) end,
  3468 + getBleedRed = function(self, t) return math.min(100, math.floor(self:combatTalentScale(t, 33, 59))) end,
  3469 + requires_target = true,
  3470 + tactical = { DISABLE = 2 },
3464 3471 action = function(self, t)
3465   - self:incStamina(t.getStamina(self, t))
  3472 + local tg = self:getTalentTarget(t)
  3473 + local x, y = self:getTarget(tg)
  3474 + if not x or not y then return nil end
  3475 + self:project(tg, x, y, function(px, py)
  3476 + local target = game.level.map(px, py, Map.ACTOR)
  3477 + if not target then return end
  3478 + target:setEffect(target.EFF_BATTLE_CRY, 7, {power=t.getSavesRed(self, t), bleed=t.getBleedRed(self, t), apply_power=self:combatPhysicalpower()})
  3479 + end)
  3480 + game.level.map:particleEmitter(self.x, self.y, self:getTalentRadius(t), "directional_shout", {life=12, size=5, tx=x-self.x, ty=y-self.y, distorion_factor=0.1, radius=self:getTalentRadius(t), nb_circles=8, rm=0.8, rM=1, gm=0.8, gM=1, bm=0.1, bM=0.2, am=0.6, aM=0.8})
3466 3481 return true
3467 3482 end,
3468 3483 info = function(self, t)
3469   - return ([[Take a deep breath to recover %d stamina. The stamina recovery improves with your Strength and Willpower.]]):
3470   - format(t.getStamina(self, t))
  3484 + return ([[Your battle cry shatters the will of your foes within a radius of %d, lowering their defense and all saves by %d and their bleed resist by %d%% for 7 turns, making them more vulnerable.
  3485 + All evasion and concealment bonuses are also disabled.
  3486 + The chance to hit increases with your Physical Power.]]):
  3487 + tformat(self:getTalentRadius(t), t.getSavesRed(self,t), t.getBleedRed(self,t))
3471 3488 end,
3472 3489 }
3473 3490
... ...
... ... @@ -113,7 +113,7 @@ newTalent{
113 113 end
114 114 },
115 115 getHealPercent = function(self,t) return self:combatTalentLimit(t, 50, 3.5, 17.5) end, -- Limit <50%
116   - getDuration = function(self, t) return math.floor(self:combatTalentLimit(t, 10, 3, 6, true)) end, -- Limit < 10
  116 + getDuration = function(self, t) return math.floor(self:combatTalentLimit(t, 11, 3, 7, true)) end, -- Limit <= 10
117 117 action = function(self, t)
118 118 self:setEffect(self.EFF_UNSTOPPABLE, t.getDuration(self, t), {hp_per_kill=t.getHealPercent(self,t)})
119 119 return true
... ...
... ... @@ -117,49 +117,64 @@ newTalent{
117 117 getPower = function(self, t) return self:combatTalentScale(t, 8.5, 21.65) end,
118 118 action = function(self, t)
119 119 self:setEffect(self.EFF_BATTLE_SHOUT, t.getDur(self,t), {power=t.getPower(self, t)})
120   - self:removeEffectsFilter({type="physical", status="detrimental", ignore_crosstier=true}, t.getClear(self,t))
  120 + self:removeEffectsFilter(self, {type="physical", status="detrimental", ignore_crosstier=true}, t.getClear(self,t))
121 121
122 122 return true
123 123 end,
124 124 info = function(self, t)
125   - return ([[Bolster yourself with a mighty battle shout, boosting your life and stamina by %0.1f%% for %d turns and curing yourself of up to %d random physical effects.
  125 + return ([[Bolster yourself with a mighty battle shout, boosting your maximum life and stamina by %0.1f%% for %d turns and curing yourself of up to %d random physical effects.
126 126 When the effect ends, the additional life and stamina will be lost.]]):
127 127 tformat(t.getPower(self, t), t.getDur(self, t), t.getClear(self, t))
128 128 end,
129 129 }
130 130
131 131 newTalent{
132   - name = "Battle Cry",
133   - type = {"technique/warcries", 4},
  132 + name = "Second Wind",
  133 + type = {"technique/warcries",4},
134 134 require = techs_req4,
135 135 points = 5,
136   - cooldown = 30,
137   - stamina = 20,
138   - range = 0,
139   - radius = function(self, t) return math.min(12, math.floor(self:combatTalentScale(t, 4, 8))) end,
140   - target = function(self, t)
141   - return {type="cone", range=self:getTalentRange(t), radius=self:getTalentRadius(t), selffire=false}
142   - end,
143   - getSavesRed = function(self, t) return math.floor(self:combatTalentScale(t, 10, 30)) end,
144   - getBleedRed = function(self, t) return math.min(100, math.floor(self:combatTalentScale(t, 33, 59))) end,
145   - requires_target = true,
146   - tactical = { DISABLE = 2 },
  136 + stamina = 40,
  137 + cooldown = 40,
  138 + fixed_cooldown = true,
  139 + tactical = { BUFF = function(self, t, aitarget)
  140 + local maxcount, maxlevel = t.getTalentCount(self, t), t.getMaxLevel(self, t)
  141 + local count, tt = 0, nil
  142 + for tid, _ in pairs(self.talents_cd) do
  143 + tt = self:getTalentFromId(tid)
  144 + if tt.type[1]:find("^technique/") and not tt.fixed_cooldown and tt.type[2] <= maxlevel then
  145 + count = count + 1
  146 + end
  147 + if count >= maxcount then break end
  148 + end
  149 + return count ^.5
  150 + end },
  151 + getTalentCount = function(self, t) return math.floor(self:combatTalentScale(t, 2, 6.5)) end,
  152 + getMaxLevel = function(self, t) return math.floor(self:getTalentLevel(t)) end,
147 153 action = function(self, t)
148   - local tg = self:getTalentTarget(t)
149   - local x, y = self:getTarget(tg)
150   - if not x or not y then return nil end
151   - self:project(tg, x, y, function(px, py)
152   - local target = game.level.map(px, py, Map.ACTOR)
153   - if not target then return end
154   - target:setEffect(target.EFF_BATTLE_CRY, 7, {power=t.getSavesRed(self, t), bleed=t.getBleedRed(self, t), apply_power=self:combatPhysicalpower()})
155   - end)
156   - game.level.map:particleEmitter(self.x, self.y, self:getTalentRadius(t), "directional_shout", {life=12, size=5, tx=x-self.x, ty=y-self.y, distorion_factor=0.1, radius=self:getTalentRadius(t), nb_circles=8, rm=0.8, rM=1, gm=0.8, gM=1, bm=0.1, bM=0.2, am=0.6, aM=0.8})
  154 + local nb = t.getTalentCount(self, t)
  155 + local maxlev = t.getMaxLevel(self, t)
  156 + local tids = {}
  157 + for tid, _ in pairs(self.talents_cd) do
  158 + local tt = self:getTalentFromId(tid)
  159 + if not tt.fixed_cooldown then
  160 + if tt.type[2] <= maxlev and tt.type[1]:find("^technique/") then
  161 + tids[#tids+1] = tid
  162 + end
  163 + end
  164 + end
  165 + for i = 1, nb do
  166 + if #tids == 0 then break end
  167 + local tid = rng.tableRemove(tids)
  168 + self.talents_cd[tid] = nil
  169 + end
  170 + self.changed = true
  171 + game:playSoundNear(self, "talents/spell_generic2")
157 172 return true
158 173 end,
159 174 info = function(self, t)
160   - return ([[Your battle cry shatters the will of your foes within a radius of %d, lowering their defense and all their saves by %d and their bleed resist by %d%% for 7 turns, making them more vulnerable.
161   - All evasion and concealment bonuses are also disabled.
162   - The chance to hit increases with your Physical Power.]]):
163   - tformat(self:getTalentRadius(t), t.getSavesRed(self,t), t.getBleedRed(self,t))
  175 + local talentcount = t.getTalentCount(self, t)
  176 + local maxlevel = t.getMaxLevel(self, t)
  177 + return ([[Your mastery over combat allows you to reset the cooldown of up to %d of your techniques (that don't have a fixed cooldown) of tier %d or less.]]):
  178 + format(talentcount, maxlevel)
164 179 end,
165 180 }
\ No newline at end of file
... ...