Skip to content
Snippets Groups Projects
Commit 615cbed2 authored by dg's avatar dg
Browse files

Fix Shockwave Bomb

git-svn-id: http://svn.net-core.org/repos/t-engine4@1864 51575b47-30f0-44d4-a5cc-537603b46e54
parent 0e53ccf9
No related branches found
No related tags found
No related merge requests found
......@@ -525,9 +525,10 @@ newDamageType{
name = "spell knockback", type = "SPELLKNOCKBACK",
projector = function(src, x, y, type, dam, tmp)
local target = game.level.map(x, y, Map.ACTOR)
local realdam = 0
if target and not tmp[target] then
tmp[target] = true
DamageType:get(DamageType.PHYSICAL).projector(src, x, y, DamageType.PHYSICAL, dam)
realdam = DamageType:get(DamageType.PHYSICAL).projector(src, x, y, DamageType.PHYSICAL, dam)
if target:checkHit(src:combatSpellpower(), target:combatPhysicalResist(), 0, 95, 15) and target:canBe("knockback") then
target:knockback(src.x, src.y, 3)
game.logSeen(target, "%s is knocked back!", target.name:capitalize())
......@@ -535,6 +536,7 @@ newDamageType{
game.logSeen(target, "%s resists the punch!", target.name:capitalize())
end
end
return realdam
end,
}
......
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