mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Added foreign move names. Japanese only so far.
Also fixed roomaji conversion to not die spectacularly when given hiragana. For some reason I let it know about hiragana soukuon and youon, but nothing else, so it gets totally confused.
This commit is contained in:
parent
fce02ad9eb
commit
990469bcd5
3 changed files with 482 additions and 4 deletions
pokedex/db
|
@ -181,6 +181,12 @@ class MoveEffect(TableBase):
|
|||
short_effect = Column(Unicode(256), nullable=False)
|
||||
effect = Column(Unicode(5120), nullable=False)
|
||||
|
||||
class MoveName(TableBase):
|
||||
__tablename__ = 'move_names'
|
||||
move_id = Column(Integer, ForeignKey('moves.id'), primary_key=True, nullable=False, autoincrement=False)
|
||||
language_id = Column(Integer, ForeignKey('languages.id'), primary_key=True, nullable=False, autoincrement=False)
|
||||
name = Column(Unicode(16), nullable=False)
|
||||
|
||||
class MoveTarget(TableBase):
|
||||
__tablename__ = 'move_targets'
|
||||
id = Column(Integer, primary_key=True, nullable=False)
|
||||
|
@ -403,9 +409,10 @@ LocationArea.location = relation(Location, backref='areas')
|
|||
Machine.generation = relation(Generation)
|
||||
|
||||
Move.damage_class = relation(MoveDamageClass, backref='moves')
|
||||
Move.move_effect = relation(MoveEffect, backref='moves')
|
||||
Move.foreign_names = relation(MoveName, backref='pokemon')
|
||||
Move.generation = relation(Generation, backref='moves')
|
||||
Move.machines = relation(Machine, backref='move')
|
||||
Move.move_effect = relation(MoveEffect, backref='moves')
|
||||
Move.target = relation(MoveTarget, backref='moves')
|
||||
Move.type = relation(Type, backref='moves')
|
||||
|
||||
|
@ -413,6 +420,8 @@ Move.effect = rst.MoveEffectProperty('effect')
|
|||
Move.priority = association_proxy('move_effect', 'priority')
|
||||
Move.short_effect = rst.MoveEffectProperty('short_effect')
|
||||
|
||||
MoveName.language = relation(Language)
|
||||
|
||||
Pokemon.abilities = relation(Ability, secondary=PokemonAbility.__table__,
|
||||
order_by=PokemonAbility.slot,
|
||||
backref='pokemon')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue