Skip to content
Snippets Groups Projects
Commit 93a068a8 authored by dg's avatar dg
Browse files

Talents that do a main and off hand attack correctly handle offhand penalty

git-svn-id: http://svn.net-core.org/repos/t-engine4@4011 51575b47-30f0-44d4-a5cc-537603b46e54
parent b9369058
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,7 @@ newTalent{
if math.floor(core.fov.distance(self.x, self.y, x, y)) > 1 then return nil end
local speed1, hit1 = self:attackTargetWith(target, weapon.combat, nil, self:combatTalentWeaponDamage(t, 0.8, 1.6))
local speed2, hit2 = self:attackTargetWith(target, offweapon.combat, nil, self:combatTalentWeaponDamage(t, 0.8, 1.6))
local speed2, hit2 = self:attackTargetWith(target, offweapon.combat, nil, self:getOffHandMult(self:combatTalentWeaponDamage(t, 0.8, 1.6)))
-- Try to bleed !
if hit1 then
......@@ -122,7 +122,7 @@ newTalent{
if math.floor(core.fov.distance(self.x, self.y, x, y)) > 1 then return nil end
local speed1, hit1 = self:attackTargetWith(target, weapon.combat, DamageType.ACID, self:combatTalentWeaponDamage(t, 0.8, 1.6))
local speed2, hit2 = self:attackTargetWith(target, offweapon.combat, DamageType.ACID, self:combatTalentWeaponDamage(t, 0.8, 1.6))
local speed2, hit2 = self:attackTargetWith(target, offweapon.combat, DamageType.ACID, self:getOffHandMult(self:combatTalentWeaponDamage(t, 0.8, 1.6)))
-- Acid splash !
if hit1 or hit2 then
......@@ -166,7 +166,7 @@ newTalent{
local speed1, hit1 = self:attackTargetWith(target, weapon.combat, DamageType.DARKNESS, self:combatTalentWeaponDamage(t, 0.6, 1.4))
if hit1 then
local speed2, hit2 = self:attackTargetWith(target, weapon.combat, DamageType.BLIGHT, self:combatTalentWeaponDamage(t, 0.6, 1.4))
local speed2, hit2 = self:attackTargetWith(target, offweapon.combat, DamageType.BLIGHT, self:getOffHandMult(self:combatTalentWeaponDamage(t, 0.6, 1.4)))
if hit2 and target:checkHit(self:combatAttack(offweapon.combat), target:combatPhysicalResist(), 0, 95, 10) and target:canBe("blind") then
target:setEffect(target.EFF_BLINDED, 4, {})
else
......
......@@ -131,7 +131,7 @@ newTalent{
if math.floor(core.fov.distance(self.x, self.y, x, y)) > 1 then return nil end
-- First attack with offhand
local speed, hit = self:attackTargetWith(target, offweapon.combat, nil, self:combatTalentWeaponDamage(t, 0.7, 1.5))
local speed, hit = self:attackTargetWith(target, offweapon.combat, nil, self:getOffHandMult(self:combatTalentWeaponDamage(t, 0.7, 1.5)))
-- Second attack with mainhand
if hit then
......
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