Changeset 354:b37dbc557ae0


Ignore:
Timestamp:
04/09/11 12:01:32 (12 years ago)
Author:
Jeremy Thurgood <firxen@…>
Branch:
default
Phase:
public
Rebase:
34323661336465326333643235363763613930313135376533363738336235383537343634623836
Message:

Stub classes for all items.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • skaapsteker/sprites/items.py

    r340 r354  
    11from base import Item
     2
     3
     4class BreakableItem(Item):
     5    whole_image_file = None
     6    broken_image_file = None
     7
     8    def setup(self, broken, **opts):
     9        super(BreakableItem, self).setup(**opts)
     10        self.broken = broken
     11
     12
     13    def setup_image_data(self, pos):
     14        self.image_file = self.broken_image_file if self._me.broken else self.whole_image_file
     15        super(BreakableItem, self).setup_image_data(pos)
     16
     17
     18    def smash(self):
     19        self._me.broken = True
     20        self.broken = True
     21        self.setup_image_data(self._starting_tile_pos)
     22
    223
    324
     
    6384
    6485
     86
    6587##################################################
    66 # Unclassified
     88# Guard seduction
     89
     90
     91class Fan(Item):
     92    image_file = 'fan.png'
    6793
    6894
    6995
    70 class Vase(Item):
    71     image_file = 'dummy.png'
     96##################################################
     97# Samurai distraction
    7298
    73     def setup(self, broken, **opts):
    74         super(Vase, self).setup(**opts)
    75         self.broken = broken
     99
     100class Kindling(Item):
     101    image_file = 'props/kindling.png'
     102
     103
     104class Oil(Item):
     105    image_file = 'props/oil.png'
     106
     107
     108
     109##################################################
     110# Cannon destruction
     111
     112
     113class Cannon(BreakableItem):
     114    whole_image_file = 'props/cannon-whole.png'
     115    broken_image_file = 'props/cannon-broken.png'
     116
     117
     118
     119##################################################
     120# Geisha character assassination
     121
     122
     123class Vase(BreakableItem):
     124    whole_image_file = 'props/vase-whole.png'
     125    broken_image_file = 'props/vase-broken.png'
    76126
    77127
    78128class Salmon(Item):
    79     image_file = 'dummy.png'
     129    image_file = 'props/fish.png'
    80130
    81131
    82132
     133##################################################
     134# Theatrical debut
     135
     136
     137class NoMask(BreakableItem):
     138    whole_image_file = 'props/no-mask-whole.png'
     139    broken_image_file = 'props/no-mask-broken.png'
     140
     141
     142class NoCostume(Item):
     143    image_file = 'props/no-costume.png'
     144
     145
     146
     147##################################################
     148# Big business
     149
     150
     151class Rice(BreakableItem):
     152    whole_image_file = 'props/rice-whole.png'
     153    broken_image_file = 'props/rice-broken.png'
     154
     155
     156class Documents(Item):
     157    image_file = 'haiku-scroll.png'
     158
Note: See TracChangeset for help on using the changeset viewer.