-id,name
-1,Has a count in the bag
-2,Consumed when used
-3,Usable outside battle
-4,Usable in battle
-5,Can be held by a Pokémon
-6,Works passively when held
-7,Usable by a Pokémon when held
-8,Appears in Sinnoh Underground
+id,identifier,name
+1,countable,Has a count in the bag
+2,consumable,Consumed when used
+3,usable_overworld,Usable outside battle
+4,usable_in_battle,Usable in battle
+5,holdable,Can be held by a Pokémon
+6,holdable_passive,Works passively when held
+7,holdable_active,Usable by a Pokémon when held
+8,underground,Appears in Sinnoh Underground
roles.register_local_role('ability', generic_role)
roles.register_local_role('item', generic_role)
+roles.register_local_role('location', generic_role)
roles.register_local_role('move', generic_role)
roles.register_local_role('type', generic_role)
roles.register_local_role('pokemon', generic_role)
cost = Column(Integer, nullable=False)
fling_power = Column(Integer, nullable=True)
fling_effect_id = Column(Integer, ForeignKey('item_fling_effects.id'), nullable=True)
- effect = Column(Unicode(5120), nullable=False)
+ effect = Column(rst.RstTextColumn(5120), nullable=False)
+
+ @property
+ def appears_underground(self):
+ return any(flag.identifier == u'underground' for flag in self.flags)
class ItemCategory(TableBase):
__tablename__ = 'item_categories'
class ItemFlag(TableBase):
__tablename__ = 'item_flags'
id = Column(Integer, primary_key=True, nullable=False)
+ identifier = Column(Unicode(24), nullable=False)
name = Column(Unicode(64), nullable=False)
class ItemFlagMap(TableBase):