Call characteristics "characteristics". #132

This commit is contained in:
Lynn "Zhorken" Vaughan 2014-07-28 19:01:09 -04:00
parent 1bae7d5ad2
commit 7ddecd527d
3 changed files with 24 additions and 25 deletions

View file

@ -1,4 +1,4 @@
stat_hint_id,local_language_id,message characteristic_id,local_language_id,message
1,9,Loves to eat 1,9,Loves to eat
2,9,Proud of its power 2,9,Proud of its power
3,9,Sturdy body 3,9,Sturdy body
1 stat_hint_id characteristic_id local_language_id message
2 1 9 Loves to eat
3 2 9 Proud of its power
4 3 9 Sturdy body

View file

@ -226,6 +226,24 @@ class BerryFlavor(TableBase):
flavor = Column(Integer, nullable=False, flavor = Column(Integer, nullable=False,
doc=u"The level of the flavor in the berry") doc=u"The level of the flavor in the berry")
class Characteristic(TableBase):
u"""Flavor text hinting at genes that appears in a Pokémon's summary."""
__tablename__ = 'characteristics'
__singlename__ = 'characteristic'
id = Column(Integer, primary_key=True, nullable=False,
doc=u"A numeric ID")
stat_id = Column(Integer, ForeignKey('stats.id'), nullable=False,
doc=u"ID of the stat with the highest gene")
gene_mod_5 = Column(Integer, nullable=False, index=True,
doc=u"Value of the highest gene modulo 5")
create_translation_table('characteristic_text', Characteristic, 'text',
relation_lazy='joined',
message = Column(Unicode(79), nullable=False, index=True,
doc=u"The text displayed",
info=dict(official=True, format='plaintext')),
)
class ConquestEpisode(TableBase): class ConquestEpisode(TableBase):
u"""An episode from Pokémon Conquest: one of a bunch of mini-stories u"""An episode from Pokémon Conquest: one of a bunch of mini-stories
featuring a particular warrior. featuring a particular warrior.
@ -2079,26 +2097,6 @@ create_translation_table('stat_names', Stat, 'names',
info=dict(format='plaintext', official=True)), info=dict(format='plaintext', official=True)),
) )
class StatHint(TableBase):
u"""Flavor text for genes that appears in a Pokémon's summary. Sometimes
called "characteristics".
"""
__tablename__ = 'stat_hints'
__singlename__ = 'stat_hint'
id = Column(Integer, primary_key=True, nullable=False,
doc=u"A numeric ID")
stat_id = Column(Integer, ForeignKey('stats.id'), nullable=False,
doc=u"ID of the highest stat")
gene_mod_5 = Column(Integer, nullable=False, index=True,
doc=u"Value of the highest stat modulo 5")
create_translation_table('stat_hint_names', StatHint, 'names',
relation_lazy='joined',
message = Column(Unicode(79), nullable=False, index=True,
doc=u"The text displayed",
info=dict(official=True, format='plaintext')),
)
class SuperContestCombo(TableBase): class SuperContestCombo(TableBase):
u"""Combo of two moves in a Super Contest.""" u"""Combo of two moves in a Super Contest."""
__tablename__ = 'super_contest_combos' __tablename__ = 'super_contest_combos'
@ -2254,6 +2252,11 @@ Berry.natural_gift_type = relationship(Type, innerjoin=True)
BerryFlavor.contest_type = relationship(ContestType, innerjoin=True) BerryFlavor.contest_type = relationship(ContestType, innerjoin=True)
Characteristic.stat = relationship(Stat,
innerjoin=True,
backref='characteristics')
ConquestEpisode.warriors = relationship(ConquestWarrior, ConquestEpisode.warriors = relationship(ConquestWarrior,
secondary=ConquestEpisodeWarrior.__table__, secondary=ConquestEpisodeWarrior.__table__,
innerjoin=True, innerjoin=True,
@ -2830,10 +2833,6 @@ Region.version_groups = relationship(VersionGroup,
Stat.damage_class = relationship(MoveDamageClass, Stat.damage_class = relationship(MoveDamageClass,
backref='stats') backref='stats')
StatHint.stat = relationship(Stat,
innerjoin=True,
backref='hints')
SuperContestCombo.first = relationship(Move, SuperContestCombo.first = relationship(Move,
primaryjoin=SuperContestCombo.first_move_id==Move.id, primaryjoin=SuperContestCombo.first_move_id==Move.id,