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)
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')
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')
_roomaji_youon = {
u'ャ': 'ya', u'ュ': 'yu', u'ョ': 'yo',
- u'ゃ': 'ya', u'ゅ': 'yu', u'ょ': 'yo',
+ #u'ゃ': 'ya', u'ゅ': 'yu', u'ょ': 'yo',
}
# XXX If romanize() ever handles hiragana, it will need to make sure that the
# Youon
elif char in _roomaji_youon:
- if last_kana[-1] != 'i' or last_kana == 'i':
+ if not last_kana or last_kana[-1] != 'i' or last_kana == 'i':
raise ValueError("Youon must follow an -i sound.")
# Drop the -i and append the ya/yu/yo sound
last_kana = new_char
# Sokuon
- elif char in (u'っ', u'ッ'):
+ #elif char in (u'っ', u'ッ'):
+ elif char in (u'ッ',):
# Remember it and double the consonant next time around
last_kana = 'sokuon'