...
|
...
|
@@ -172,52 +172,13 @@ newTalent{ |
172
|
172
|
-- Defense
|
173
|
173
|
----------------------------------------------------------------------
|
174
|
174
|
newTalent{
|
175
|
|
- name = "Repulsion",
|
|
175
|
+ name = "Shield Wall",
|
176
|
176
|
type = {"technique/shield-defense", 1},
|
177
|
177
|
require = techs_req1,
|
178
|
|
- points = 5,
|
179
|
|
- random_ego = "attack",
|
180
|
|
- cooldown = 10,
|
181
|
|
- stamina = 30,
|
182
|
|
- tactical = { ESCAPE = 2, DEFEND = 0.5 },
|
183
|
|
- on_pre_use = function(self, t, silent) if not self:hasShield() then if not silent then game.logPlayer(self, "You require a weapon and a shield to use this talent.") end return false end return true end,
|
184
|
|
- action = function(self, t)
|
185
|
|
- local shield = self:hasShield()
|
186
|
|
- if not shield then
|
187
|
|
- game.logPlayer(self, "You cannot use Repulsion without a shield!")
|
188
|
|
- return nil
|
189
|
|
- end
|
190
|
|
-
|
191
|
|
- for i = -1, 1 do for j = -1, 1 do
|
192
|
|
- local x, y = self.x + i, self.y + j
|
193
|
|
- if (self.x ~= x or self.y ~= y) and game.level.map:isBound(x, y) and game.level.map(x, y, Map.ACTOR) then
|
194
|
|
- local target = game.level.map(x, y, Map.ACTOR)
|
195
|
|
- if target:checkHit(self:combatAttack(shield.special_combat), target:combatPhysicalResist(), 0, 95, 5 - self:getTalentLevel(t) / 2) and target:canBe("knockback") then
|
196
|
|
- target:knockback(self.x, self.y, 2 + self:getTalentLevel(t))
|
197
|
|
- if target:canBe("stun") then target:setEffect(target.EFF_DAZED, 3 + self:getStr(8), {}) end
|
198
|
|
- else
|
199
|
|
- game.logSeen(target, "%s resists the knockback!", target.name:capitalize())
|
200
|
|
- end
|
201
|
|
- end
|
202
|
|
- end end
|
203
|
|
-
|
204
|
|
- return true
|
205
|
|
- end,
|
206
|
|
- info = function(self, t)
|
207
|
|
- return ([[Let all your foes pile up on your shield, then put all your strength in one mighty thrust and repel them all away %d grids.
|
208
|
|
- In addition all creature knocked back will also be dazed for %d turns.
|
209
|
|
- The distance increases with talent level and the daze with Strength.]]):format(math.floor(2 + self:getTalentLevel(t)), 3 + self:getStr(8))
|
210
|
|
- end,
|
211
|
|
-}
|
212
|
|
-
|
213
|
|
-newTalent{
|
214
|
|
- name = "Shield Wall",
|
215
|
|
- type = {"technique/shield-defense", 2},
|
216
|
|
- require = techs_req2,
|
217
|
178
|
mode = "sustained",
|
218
|
179
|
points = 5,
|
219
|
180
|
cooldown = 30,
|
220
|
|
- sustain_stamina = 50,
|
|
181
|
+ sustain_stamina = 30,
|
221
|
182
|
tactical = { DEFEND = 2 },
|
222
|
183
|
on_pre_use = function(self, t, silent) if not self:hasShield() then if not silent then game.logPlayer(self, "You require a weapon and a shield to use this talent.") end return false end return true end,
|
223
|
184
|
activate = function(self, t)
|
...
|
...
|
@@ -230,8 +191,7 @@ newTalent{ |
230
|
191
|
return {
|
231
|
192
|
stun = self:addTemporaryValue("stun_immune", 0.1 * self:getTalentLevel(t)),
|
232
|
193
|
knock = self:addTemporaryValue("knockback_immune", 0.1 * self:getTalentLevel(t)),
|
233
|
|
- atk = self:addTemporaryValue("combat_atk", -10),
|
234
|
|
- dam = self:addTemporaryValue("combat_dam", -10),
|
|
194
|
+ dam = self:addTemporaryValue("inc_damage", {[DamageType.PHYSICAL]=-20}),
|
235
|
195
|
def = self:addTemporaryValue("combat_def", 5 + (1 + self:getDex(4)) * self:getTalentLevel(t) + self:getTalentLevel(self.T_SHIELD_EXPERTISE) * 2),
|
236
|
196
|
armor = self:addTemporaryValue("combat_armor", 5 + (1 + self:getDex(4)) * self:getTalentLevel(t) + self:getTalentLevel(self.T_SHIELD_EXPERTISE)),
|
237
|
197
|
}
|
...
|
...
|
@@ -239,14 +199,13 @@ newTalent{ |
239
|
199
|
deactivate = function(self, t, p)
|
240
|
200
|
self:removeTemporaryValue("combat_def", p.def)
|
241
|
201
|
self:removeTemporaryValue("combat_armor", p.armor)
|
242
|
|
- self:removeTemporaryValue("combat_atk", p.atk)
|
243
|
|
- self:removeTemporaryValue("combat_dam", p.dam)
|
|
202
|
+ self:removeTemporaryValue("inc_damage", p.dam)
|
244
|
203
|
self:removeTemporaryValue("stun_immune", p.stun)
|
245
|
204
|
self:removeTemporaryValue("knockback_immune", p.knock)
|
246
|
205
|
return true
|
247
|
206
|
end,
|
248
|
207
|
info = function(self, t)
|
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.
|
|
208
|
+ return ([[Enter a protective battle stance, increasing defense by %d and armor by %d at the cost of -20%% physical damage. The defense and armor increase is based on dexterity.
|
250
|
209
|
It also grants resistance to stunning and knockback (%d%%).]]):format(
|
251
|
210
|
5 + (1 + self:getDex(4)) * self:getTalentLevel(t) + self:getTalentLevel(self.T_SHIELD_EXPERTISE)* 2,
|
252
|
211
|
5 + (1 + self:getDex(4)) * self:getTalentLevel(t) + self:getTalentLevel(self.T_SHIELD_EXPERTISE),
|
...
|
...
|
@@ -256,6 +215,45 @@ newTalent{ |
256
|
215
|
}
|
257
|
216
|
|
258
|
217
|
newTalent{
|
|
218
|
+ name = "Repulsion",
|
|
219
|
+ type = {"technique/shield-defense", 2},
|
|
220
|
+ require = techs_req2,
|
|
221
|
+ points = 5,
|
|
222
|
+ random_ego = "attack",
|
|
223
|
+ cooldown = 10,
|
|
224
|
+ stamina = 30,
|
|
225
|
+ tactical = { ESCAPE = 2, DEFEND = 0.5 },
|
|
226
|
+ on_pre_use = function(self, t, silent) if not self:hasShield() then if not silent then game.logPlayer(self, "You require a weapon and a shield to use this talent.") end return false end return true end,
|
|
227
|
+ action = function(self, t)
|
|
228
|
+ local shield = self:hasShield()
|
|
229
|
+ if not shield then
|
|
230
|
+ game.logPlayer(self, "You cannot use Repulsion without a shield!")
|
|
231
|
+ return nil
|
|
232
|
+ end
|
|
233
|
+
|
|
234
|
+ for i = -1, 1 do for j = -1, 1 do
|
|
235
|
+ local x, y = self.x + i, self.y + j
|
|
236
|
+ if (self.x ~= x or self.y ~= y) and game.level.map:isBound(x, y) and game.level.map(x, y, Map.ACTOR) then
|
|
237
|
+ local target = game.level.map(x, y, Map.ACTOR)
|
|
238
|
+ if target:checkHit(self:combatAttack(shield.special_combat), target:combatPhysicalResist(), 0, 95, 5 - self:getTalentLevel(t) / 2) and target:canBe("knockback") then
|
|
239
|
+ target:knockback(self.x, self.y, 2 + self:getTalentLevel(t))
|
|
240
|
+ if target:canBe("stun") then target:setEffect(target.EFF_DAZED, 3 + self:getStr(8), {}) end
|
|
241
|
+ else
|
|
242
|
+ game.logSeen(target, "%s resists the knockback!", target.name:capitalize())
|
|
243
|
+ end
|
|
244
|
+ end
|
|
245
|
+ end end
|
|
246
|
+
|
|
247
|
+ return true
|
|
248
|
+ end,
|
|
249
|
+ info = function(self, t)
|
|
250
|
+ return ([[Let all your foes pile up on your shield, then put all your strength in one mighty thrust and repel them all away %d grids.
|
|
251
|
+ In addition all creature knocked back will also be dazed for %d turns.
|
|
252
|
+ The distance increases with talent level and the daze with Strength.]]):format(math.floor(2 + self:getTalentLevel(t)), 3 + self:getStr(8))
|
|
253
|
+ end,
|
|
254
|
+}
|
|
255
|
+
|
|
256
|
+newTalent{
|
259
|
257
|
name = "Shield Expertise",
|
260
|
258
|
type = {"technique/shield-defense", 3},
|
261
|
259
|
require = techs_req3,
|
...
|
...
|
|