/ld26

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

« back to all changes in this revision

Viewing changes to items.lua

  • Committer: Josh C
  • Date: 2013-04-29 00:08:20 UTC
  • Revision ID: josh@9ix.org-20130429000820-bth2m0z5q94drdxn
fairy

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
               end
43
43
}
44
44
 
 
45
Fairy = Sprite:extend{
 
46
   name = 'fairy',
 
47
   invTile = Tile:new{image = 'data/fairy.png'},
 
48
   onCollide = function(self, other, xOl, yOl)
 
49
                  if the.inventory.items['cat'] then
 
50
                     the.inventory:add(self)
 
51
 
 
52
                     the.inventory:remove('cat')
 
53
                  end
 
54
 
 
55
                  self:displace(other)
 
56
               end
 
57
}
 
58
 
45
59
Cat = Tile:extend{
46
60
   image = 'data/cat.png',
47
61
   name = 'cat',