Skip to content
Snippets Groups Projects
Commit 42f1dff9 authored by dg's avatar dg
Browse files

Fixed missing check to resolveSource in damage_types.lua

git-svn-id: http://svn.net-core.org/repos/t-engine4@1500 51575b47-30f0-44d4-a5cc-537603b46e54
parent 679dfa83
No related branches found
No related tags found
No related merge requests found
......@@ -27,14 +27,14 @@ setDefaultProjector(function(src, x, y, type, dam)
print("[PROJECTOR] starting dam", dam)
-- Difficulty settings
if game.difficulty == game.DIFFICULTY_EASY and target:resolveSource().player then
if game.difficulty == game.DIFFICULTY_EASY and rtarget.player then
dam = dam * 0.7
elseif game.difficulty == game.DIFFICULTY_NIGHTMARE then
if target:resolveSource().player then dam = dam * 1.3
elseif src:resolveSource().player then dam = dam * 0.7 end
if rtarget.player then dam = dam * 1.3
elseif rsrc.player then dam = dam * 0.7 end
elseif game.difficulty == game.DIFFICULTY_INSANE then
if target:resolveSource().player then dam = dam * 1.5
elseif src:resolveSource().player then dam = dam * 0.5 end
if rtarget.player then dam = dam * 1.5
elseif rsrc.player then dam = dam * 0.5 end
end
print("[PROJECTOR] after difficulty dam", dam)
......
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