/ld28

To get this branch, use:
bzr branch http://9ix.org/bzr/ld28

« back to all changes in this revision

Viewing changes to main.lua

  • Committer: Josh C
  • Date: 2013-12-15 03:05:42 UTC
  • Revision ID: josh@9ix.org-20131215030542-pneoyxj6rtm3c3hx
super hacky fix for passing through clones/goals

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
                 if the.player.moved then
48
48
                    -- this should encapsulate
49
49
 
 
50
                    the.clones:collide(the.player)
 
51
                    the.goalPerson:collide(the.player)
 
52
 
50
53
                    the.goalPerson:doMove()
51
54
 
52
55
                    for _, np in ipairs(the.clones.sprites) do
53
56
                       np:doMove()
54
57
                    end
55
58
 
 
59
                    -- yeah, again.  once for flip, twice for displace
 
60
                    the.clones:collide(the.player)
 
61
 
56
62
                    the.clones:collide(self.map)
57
63
                    the.player:collide(self.map)
58
64
                    the.goalPerson:collide(self.map)
59
65
 
60
66
                    the.clones:collide()
61
 
                    the.clones:collide(the.player)
62
 
                    the.goalPerson:collide(the.player)
63
67
 
64
68
                    if math.random(1,5) == 1 then
65
 
                       the.clones.sprites[math.random(the.clones:count())].image = 'data/goal.png'
 
69
                       local c = the.clones.sprites[math.random(the.clones:count())]
 
70
                       if not c.cured then
 
71
                          c.image = 'data/goal.png'
 
72
                       end
66
73
                    end
67
74
 
68
75
                    the.player.moved = false