File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -46,12 +46,14 @@ function InteractionInput.new()
46
46
-- @return (boolean) True if an action was created, false otherwise.
47
47
--
48
48
function self :request ( target , character )
49
+ -- Check health of enemy characters.
50
+ if target :isOccupied () and target :getCharacter ():getFaction ():getType () ~= character :getFaction ():getType () then
51
+ ScreenManager .push ( ' health' , target :getCharacter () );
52
+ return true ;
53
+ end
54
+
49
55
-- Characters can only interact with adjacent tiles.
50
56
if not target :isAdjacent ( character :getTile () ) then
51
- if target :isOccupied () and target :getCharacter ():getFaction ():getType () ~= character :getFaction ():getType () then
52
- ScreenManager .push ( ' health' , target :getCharacter () );
53
- return true ;
54
- end
55
57
return false ;
56
58
end
57
59
You can’t perform that action at this time.
0 commit comments