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

Fixed ranged defense stat to affect ranged attacks instead of melee ones

git-svn-id: http://svn.net-core.org/repos/t-engine4@888 51575b47-30f0-44d4-a5cc-537603b46e54
parent 9b6249c3
No related branches found
No related tags found
No related merge requests found
......@@ -177,7 +177,7 @@ function _M:archeryShoot(damtype, mult, on_hit, tg, params)
if params.limit_shots then params.limit_shots = params.limit_shots - 1 end
-- Does the blow connect? yes .. complex :/
local atk, def = self:combatAttack(weapon), target:combatDefense()
local atk, def = self:combatAttack(weapon), target:combatDefenseRanged()
local dam, apr, armor = self:combatDamage(ammo), self:combatAPR(ammo), target:combatArmor()
print("[ATTACK] to ", target.name, " :: ", dam, apr, armor, "::", mult)
if not self:canSee(target) then atk = atk / 3 end
......@@ -261,7 +261,7 @@ function _M:attackTargetWith(target, weapon, damtype, mult)
mult = mult or 1
-- Does the blow connect? yes .. complex :/
local atk, def = self:combatAttack(weapon), target:combatDefenseRanged()
local atk, def = self:combatAttack(weapon), target:combatDefense()
if not self:canSee(target) then atk = atk / 3 end
local dam, apr, armor = self:combatDamage(weapon), self:combatAPR(weapon), target:combatArmor()
print("[ATTACK] to ", target.name, " :: ", dam, apr, armor, "::", mult)
......
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