From 136359cf4a706d48fc93d38c3fec675b50fbd85c Mon Sep 17 00:00:00 2001 From: "Lynn \"Zhorken\" Vaughan" Date: Tue, 5 Nov 2013 11:27:09 -0500 Subject: [PATCH] Tweak a couple new ability descriptions. --- pokedex/data/csv/ability_prose.csv | 4 ++-- pokedex/db/tables.py | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pokedex/data/csv/ability_prose.csv b/pokedex/data/csv/ability_prose.csv index 04c4188..b047933 100644 --- a/pokedex/data/csv/ability_prose.csv +++ b/pokedex/data/csv/ability_prose.csv @@ -551,8 +551,8 @@ This ability functions identically to []{ability:mold-breaker} and []{ability:tu 172,9,,Raises Special Attack by two stages upon having any stat lowered. 173,9,,Strengthens biting moves. 174,9,,Turns the bearer's []{type:normal} moves into []{type:ice} moves. -175,9,,Prevents allies from sleeping. -176,9,,"Changes []{pokemon:aegislash} to Blade Forme before using a damaging move, or Shield Forme before using a status move." +175,9,,Prevents friendly Pokémon from sleeping. +176,9,,"Changes []{pokemon:aegislash} to Blade Forme before using a damaging move, or Shield Forme before using []{move:kings-shield}." 177,9,,Raises []{type:flying} moves' priority by one stage. 178,9,,Strengthens aura and pulse moves. 179,9,,Boosts Defense while []{move:grassy-terrain} is in effect. diff --git a/pokedex/db/tables.py b/pokedex/db/tables.py index 73ead2a..c87283d 100644 --- a/pokedex/db/tables.py +++ b/pokedex/db/tables.py @@ -1575,8 +1575,12 @@ class Pokemon(TableBase): If the attack stats are about equal (within 5), returns None. The value None, not the damage class called 'None'. """ - phys = self.stat(u'attack') - spec = self.stat(u'special-attack') + + try: + phys = self.stat(u'attack') + spec = self.stat(u'special-attack') + except KeyError: + return None diff = phys.base_stat - spec.base_stat