/traderous

To get this branch, use:
bzr branch /bzr/traderous

« back to all changes in this revision

Viewing changes to enemy.lua

  • Committer: Josh C
  • Date: 2013-06-30 14:59:35 UTC
  • Revision ID: josh@9ix.org-20130630145935-y34o51cg3lsom5bg
"safe" zone on planets - no new enemies will track you if you're there.

Show diffs side-by-side

added added

removed removed

50
50
 
51
51
                     if pdist2 < (the.app.width / 2)^2 then
52
52
                        -- if player is roughly on enemy's screen
53
 
                        if self.state == 'patrolling' and the.player.active then
 
53
                        if self.state == 'patrolling' and the.player.active and not the.player.onPlanet then
54
54
                           self.state = 'combat'
55
55
                           self.target = the.player
56
56
                        end