JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
fix bug: conflicting board/neighbors force
authorJason Woofenden <jason@jasonwoof.com>
Fri, 29 Nov 2013 04:34:34 +0000 (23:34 -0500)
committerJason Woofenden <jason@jasonwoof.com>
Fri, 29 Nov 2013 04:34:34 +0000 (23:34 -0500)
main.coffee

index 147b76a..459f152 100644 (file)
@@ -548,7 +548,11 @@ blip_selection = ->
                        force = effects.force.last()
                if force > 0
                        for tile in area.up
                        force = effects.force.last()
                if force > 0
                        for tile in area.up
-                               tile.new_hp = tile.hp + force
+                               if tile.new_hp
+                                       # for overlap of board and [n]neigbors
+                                       tile.new_hp += force
+                               else
+                                       tile.new_hp = tile.hp + force
        for s in spaces
                s.tile.new_hp ?= s.tile.hp - 1
                if s.tile.new_hp < 0
        for s in spaces
                s.tile.new_hp ?= s.tile.hp - 1
                if s.tile.new_hp < 0