Skip to content
Snippets Groups Projects
Commit 1d379e9e authored by dg's avatar dg
Browse files

Roll With It now also grants a 200% movement speed buff

Giant Leap requirement changed to 50000 damage with any weapon
Windblade requirement changed to 50000 damage with dualweapons
Massive Blow requirement changed to 50000 damage with a two handed weapon
You Shall Be My Weapon! requirement changed to only check size


git-svn-id: http://svn.net-core.org/repos/t-engine4@5924 51575b47-30f0-44d4-a5cc-537603b46e54
parent c19f6d0e
No related branches found
No related tags found
No related merge requests found
......@@ -92,7 +92,7 @@ function _M:init(t, no_default)
self.last_learnt_talents = self.last_learnt_talents or { class={}, generic={} }
self.puuid = self.puuid or util.uuid()
self.damage_log = self.damage_log or {}
self.damage_log = self.damage_log or {weapon={}}
end
function _M:onBirth(birther)
......
......@@ -393,6 +393,16 @@ local function archery_projectile(tx, ty, tg, self, tmp)
target:knockback(self.x, self.y, math.ceil(math.log(dam)))
end
-- Roll with it
if hitted and target:attr("knockback_on_hit") and not target.turn_procs.roll_with_it and rng.percent(util.bound(dam, 0, 100)) then
local ox, oy = self.x, self.y
game:onTickEnd(function()
target:knockback(ox, oy, 1)
if not target:hasEffect(target.EFF_WILD_SPEED) then target:setEffect(target.EFF_WILD_SPEED, 1, {power=200}) end
end)
target.turn_procs.roll_with_it = true
end
self.use_psi_combat = false
end
......
......@@ -327,6 +327,13 @@ function _M:attackTargetWith(target, weapon, damtype, mult, force_dam)
damtype = damtype or (weapon and weapon.damtype) or DamageType.PHYSICAL
mult = mult or 1
local mode = "other"
if self:hasShield() then mode = "shield"
elseif self:hasTwoHandedWeapon() then mode = "twohanded"
elseif self:hasDualWeapon() then mode = "dualwield"
end
self.turn_procs.weapon_type = {kind=weapon.talented, mode=mode}
-- Does the blow connect? yes .. complex :/
local atk, def = self:combatAttack(weapon), target:combatDefense()
......@@ -771,7 +778,10 @@ function _M:attackTargetWith(target, weapon, damtype, mult, force_dam)
-- Roll with it
if hitted and target:attr("knockback_on_hit") and not target.turn_procs.roll_with_it and rng.percent(util.bound(dam, 0, 100)) then
local ox, oy = self.x, self.y
game:onTickEnd(function() target:knockback(ox, oy, 1) end)
game:onTickEnd(function()
target:knockback(ox, oy, 1)
if not target:hasEffect(target.EFF_WILD_SPEED) then target:setEffect(target.EFF_WILD_SPEED, 1, {power=200}) end
end)
target.turn_procs.roll_with_it = true
end
......@@ -855,6 +865,8 @@ function _M:attackTargetWith(target, weapon, damtype, mult, force_dam)
-- Visual feedback
if hitted then game.level.map:particleEmitter(target.x, target.y, 1, "melee_attack", {color=target.blood_color}) end
self.turn_procs.weapon_type = nil
return self:combatSpeed(weapon), hitted
end
......
......@@ -365,6 +365,10 @@ setDefaultProjector(function(src, x, y, type, dam, tmp, no_martyr)
if dam > 0 and src.damage_log then
src.damage_log[type] = (src.damage_log[type] or 0) + dam
if src.turn_procs and src.turn_procs.weapon_type then
src.damage_log.weapon[src.turn_procs.weapon_type.kind] = (src.damage_log.weapon[src.turn_procs.weapon_type.kind] or 0) + dam
src.damage_log.weapon[src.turn_procs.weapon_type.mode] = (src.damage_log.weapon[src.turn_procs.weapon_type.mode] or 0) + dam
end
end
if dam > 0 and source_talent then
......
......@@ -56,9 +56,8 @@ uberTalent{
uberTalent{
name = "Windblade",
mode = "activated",
require = { special={desc="Know at least 20 talent levels of stamina using talents.", fct=function(self) return knowRessource(self, "stamina", 20) end} },
require = { special={desc="Dealt over 50000 damage with dual wielded weapons.", fct=function(self) return self.damage_log and self.damage_log.weapon.dualwield and self.damage_log.weapon.dualwield >= 50000 end} },
cooldown = 20,
stamina = 30,
radius = 2,
range = 1,
tactical = { ATTACK = { PHYSICAL=2 }, DISABLE = { disarm = 2 } },
......@@ -109,9 +108,15 @@ uberTalent{
uberTalent{
name = "Giant Leap",
mode = "activated",
require = { special={desc="Know at least 20 talent levels of stamina using talents.", fct=function(self) return knowRessource(self, "stamina", 20) end} },
require = { special={desc="Dealt over 50000 damage with any weapon or unarmed.", fct=function(self) return
self.damage_log and (
(self.damage_log.weapon.twohanded and self.damage_log.weapon.twohanded >= 50000) or
(self.damage_log.weapon.shield and self.damage_log.weapon.shield >= 50000) or
(self.damage_log.weapon.dualwield and self.damage_log.weapon.dualwield >= 50000) or
(self.damage_log.weapon.other and self.damage_log.weapon.other >= 50000)
)
end} },
cooldown = 20,
stamina = 30,
radius = 1,
range = 10,
tactical = { CLOSEIN = 2, ATTACK = { PHYSICAL = 2 }, DISABLE = { daze = 1 } },
......@@ -177,6 +182,7 @@ uberTalent{
activate = function(self, t)
local ret = {}
self:talentTemporaryValue(ret, "knockback_on_hit", 1)
self:talentTemporaryValue(ret, "movespeed_on_hit", {speed=3, dur=1})
self:talentTemporaryValue(ret, "resists", {[DamageType.PHYSICAL] = 10})
return ret
end,
......@@ -185,7 +191,7 @@ uberTalent{
end,
info = function(self, t)
return ([[You have learnt to take a few hits when needed, you know how to flow with them, reducing all physical damage by 10%%.
When you get hit by melee or archery you go back one tile (this can only happen once per turn) for free and gain 300% movement speed for a turn.]])
When you get hit by melee or archery you go back one tile (this can only happen once per turn) for free and gain 200%% movement speed for a turn.]])
:format()
end,
}
......@@ -37,12 +37,11 @@ uberTalent{
uberTalent{
name = "You Shall Be My Weapon!", short_name="TITAN_S_SMASH", image = "talents/titan_s_smash.png",
mode = "activated",
require = { special={desc="Be of at least size category 'huge' (also required to use it) and know at least 20 talent levels of stamina using talents.", fct=function(self) return self.size_category and self.size_category >= 5 and knowRessource(self, "stamina", 20) end} },
require = { special={desc="Be of at least size category 'huge' (also required to use it).", fct=function(self) return self.size_category and self.size_category >= 5 end} },
requires_target = true,
tactical = { ATTACK = 4 },
on_pre_use = function(self, t) return self.size_category and self.size_category >= 5 end,
cooldown = 10,
stamina = 20,
cooldown = 12,
action = function(self, t)
local tg = {type="hit", range=self:getTalentRange(t)}
local x, y, target = self:getTarget(tg)
......@@ -76,11 +75,13 @@ uberTalent{
uberTalent{
name = "Massive Blow",
mode = "activated",
require = { special={desc="Dug at least 30 walls/trees/... and know at least 20 talent levels of stamina using talents.", fct=function(self) return self.dug_times and self.dug_times >= 30 and knowRessource(self, "stamina", 20) end} },
require = { special={desc="Dug at least 30 walls/trees/... and dealt over 50000 damage with a two handed weapon.", fct=function(self) return
self.dug_times and self.dug_times >= 30 and
self.damage_log and self.damage_log.weapon.twohanded and self.damage_log.weapon.twohanded >= 50000
end} },
requires_target = true,
tactical = { ATTACK = 4 },
cooldown = 10,
stamina = 20,
cooldown = 12,
action = function(self, t)
local tg = {type="hit", range=self:getTalentRange(t)}
local x, y, target = self:getTarget(tg)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment