mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Implement an ability changelog; add a few changes. #78
This commit is contained in:
parent
11adedaea8
commit
4e5415ac56
2 changed files with 31 additions and 3 deletions
12
pokedex/data/csv/ability_changelog.csv
Normal file
12
pokedex/data/csv/ability_changelog.csv
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
ability_id,changed_in_version_group_id,effect
|
||||||
|
1,11,Has no effect in battle.
|
||||||
|
16,11,Triggers on every hit of multiple-hit moves.
|
||||||
|
24,8,Inflicts only 1/16 of the attacker's maximum [HP]{mechanic} in damage.
|
||||||
|
28,11,Passes back toxic [poison]{mechanic} as regular poison.
|
||||||
|
31,8,"Does not absorb non-damaging [Electric]{type} moves, i.e. [Thunder Wave]{move}."
|
||||||
|
31,11,Grants no [Electric]{type} immunity or [Special Attack]{mechanic} boosts.
|
||||||
|
53,11,Has no effect in battle.
|
||||||
|
98,11,"Paralysis cannot prevent the Pokémon from moving, though the [Speed]{mechanic} cut is unaffected."
|
||||||
|
102,11,[Rest]{move} works as normal during [strong sunlight]{mechanic}.
|
||||||
|
103,11,[Fling]{move} can be used as normal.
|
||||||
|
114,11,Grants no [Water]{type} immunity or [Special Attack]{mechanic} boosts.
|
|
|
@ -53,6 +53,16 @@ class Ability(TableBase):
|
||||||
short_effect = Column(markdown.MarkdownColumn(255), nullable=False,
|
short_effect = Column(markdown.MarkdownColumn(255), nullable=False,
|
||||||
info=dict(description="Short summary of this ability's effect", format='markdown'))
|
info=dict(description="Short summary of this ability's effect", format='markdown'))
|
||||||
|
|
||||||
|
class AbilityChangelog(TableBase):
|
||||||
|
"""History of changes to abilities across main game versions."""
|
||||||
|
__tablename__ = 'ability_changelog'
|
||||||
|
ability_id = Column(Integer, ForeignKey('abilities.id'), primary_key=True, nullable=False,
|
||||||
|
info=dict(description="The ID of the ability that changed"))
|
||||||
|
changed_in_version_group_id = Column(Integer, ForeignKey('version_groups.id'), primary_key=True, nullable=False,
|
||||||
|
info=dict(description="The ID of the version group in which the ability changed"))
|
||||||
|
effect = Column(markdown.MarkdownColumn(255), nullable=False,
|
||||||
|
info=dict(description="A description of the old behavior", format='markdown'))
|
||||||
|
|
||||||
class AbilityFlavorText(TableBase):
|
class AbilityFlavorText(TableBase):
|
||||||
u"""In-game flavor text of an ability
|
u"""In-game flavor text of an ability
|
||||||
"""
|
"""
|
||||||
|
@ -1261,18 +1271,22 @@ class VersionGroupRegion(TableBase):
|
||||||
info=dict(description=u"ID of the region"))
|
info=dict(description=u"ID of the region"))
|
||||||
|
|
||||||
class Version(TableBase):
|
class Version(TableBase):
|
||||||
u"""A version of a mainline pokémon game
|
u"""An individual main-series Pokémon game
|
||||||
"""
|
"""
|
||||||
__tablename__ = 'versions'
|
__tablename__ = 'versions'
|
||||||
id = Column(Integer, primary_key=True, nullable=False,
|
id = Column(Integer, primary_key=True, nullable=False,
|
||||||
info=dict(description=u"A numeric ID"))
|
info=dict(description=u"A unique ID for this version"))
|
||||||
version_group_id = Column(Integer, ForeignKey('version_groups.id'), nullable=False,
|
version_group_id = Column(Integer, ForeignKey('version_groups.id'), nullable=False,
|
||||||
info=dict(description=u"ID of the version group this game belongs to"))
|
info=dict(description=u"The ID of the version group this game belongs to"))
|
||||||
name = Column(Unicode(32), nullable=False,
|
name = Column(Unicode(32), nullable=False,
|
||||||
info=dict(description=u'The English name of the game, without the "Pokémon" prefix', official=True, format='plaintext'))
|
info=dict(description=u'The English name of the game, without the "Pokémon" prefix', official=True, format='plaintext'))
|
||||||
|
|
||||||
|
|
||||||
### Relations down here, to avoid ordering problems
|
### Relations down here, to avoid ordering problems
|
||||||
|
Ability.changelog = relation(AbilityChangelog,
|
||||||
|
order_by=AbilityChangelog.changed_in_version_group_id.desc(),
|
||||||
|
backref='ability',
|
||||||
|
)
|
||||||
Ability.flavor_text = relation(AbilityFlavorText, order_by=AbilityFlavorText.version_group_id, backref='ability')
|
Ability.flavor_text = relation(AbilityFlavorText, order_by=AbilityFlavorText.version_group_id, backref='ability')
|
||||||
Ability.foreign_names = relation(AbilityName, backref='ability')
|
Ability.foreign_names = relation(AbilityName, backref='ability')
|
||||||
Ability.generation = relation(Generation, backref='abilities')
|
Ability.generation = relation(Generation, backref='abilities')
|
||||||
|
@ -1280,6 +1294,8 @@ Ability.pokemon = relation(Pokemon,
|
||||||
secondary=PokemonAbility.__table__,
|
secondary=PokemonAbility.__table__,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
AbilityChangelog.changed_in = relation(VersionGroup, backref='ability_changelog')
|
||||||
|
|
||||||
AbilityFlavorText.version_group = relation(VersionGroup)
|
AbilityFlavorText.version_group = relation(VersionGroup)
|
||||||
|
|
||||||
AbilityName.language = relation(Language)
|
AbilityName.language = relation(Language)
|
||||||
|
|
Loading…
Reference in a new issue