2014-12-04 11:11:46 +00:00
|
|
|
from django.db import models
|
|
|
|
|
2015-04-06 04:27:59 +00:00
|
|
|
#####################
|
|
|
|
# ABSTRACT MODELS #
|
|
|
|
#####################
|
2015-03-31 01:02:29 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
|
2015-04-07 12:14:31 +00:00
|
|
|
class HasAbility(models.Model):
|
2020-02-17 20:58:07 +00:00
|
|
|
ability = models.ForeignKey(
|
|
|
|
"Ability",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-07 12:14:31 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-07 12:14:31 +00:00
|
|
|
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2015-04-07 12:14:31 +00:00
|
|
|
class HasCharacteristic(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
characteristic = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"Characteristic",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-07 12:14:31 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-07 12:14:31 +00:00
|
|
|
|
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class HasContestType(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
contest_type = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"ContestType",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
2015-11-16 03:29:30 +00:00
|
|
|
class HasContestEffect(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
contest_effect = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"ContestEffect",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-11-16 03:29:30 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-11-16 03:29:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
class HasSuperContestEffect(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
super_contest_effect = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"SuperContestEffect",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
2018-10-19 15:50:32 +00:00
|
|
|
)
|
2015-11-16 03:29:30 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-11-16 03:29:30 +00:00
|
|
|
|
|
|
|
|
2015-04-09 04:45:23 +00:00
|
|
|
class HasDescription(models.Model):
|
2020-02-17 20:58:07 +00:00
|
|
|
description = models.CharField(max_length=1000, default="")
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class HasGender(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
gender = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"Gender",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-07 12:14:31 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-07 12:14:31 +00:00
|
|
|
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class HasEffect(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
effect = models.CharField(max_length=6000)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
2015-04-07 12:14:31 +00:00
|
|
|
class HasEggGroup(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
egg_group = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"EggGroup",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-07 12:14:31 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-07 12:14:31 +00:00
|
|
|
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class HasEncounterMethod(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
encounter_method = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"EncounterMethod",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class HasEncounterCondition(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
encounter_condition = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"EncounterCondition",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class HasEvolutionTrigger(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
evolution_trigger = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"EvolutionTrigger",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
2015-04-09 04:45:23 +00:00
|
|
|
class HasFlavorText(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
flavor_text = models.CharField(max_length=500)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class HasFlingEffect(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
item_fling_effect = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"ItemFlingEffect",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
class HasGameIndex(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
game_index = models.IntegerField()
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
2015-04-07 12:14:31 +00:00
|
|
|
class HasGeneration(models.Model):
|
2020-02-17 20:58:07 +00:00
|
|
|
generation = models.ForeignKey(
|
|
|
|
"Generation",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-07 12:14:31 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-07 12:14:31 +00:00
|
|
|
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2015-04-07 12:14:31 +00:00
|
|
|
class HasGrowthRate(models.Model):
|
2020-02-17 20:58:07 +00:00
|
|
|
growth_rate = models.ForeignKey(
|
|
|
|
"GrowthRate",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-07 12:14:31 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-07 12:14:31 +00:00
|
|
|
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class HasItem(models.Model):
|
2020-02-17 20:58:07 +00:00
|
|
|
item = models.ForeignKey(
|
|
|
|
"Item",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
2015-10-27 13:36:33 +00:00
|
|
|
class HasItemAttribute(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
item_attribute = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"ItemAttribute",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-10-27 13:36:33 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-10-27 13:36:33 +00:00
|
|
|
|
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class HasItemCategory(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
item_category = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"ItemCategory",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class HasItemPocket(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
item_pocket = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"ItemPocket",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
2015-04-06 04:27:59 +00:00
|
|
|
class HasLanguage(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
language = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"Language",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s_language",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-06 04:27:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-06 04:27:59 +00:00
|
|
|
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class HasLocation(models.Model):
|
2020-02-17 20:58:07 +00:00
|
|
|
location = models.ForeignKey(
|
|
|
|
"Location",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class HasLocationArea(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
location_area = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"LocationArea",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
2015-04-09 04:45:23 +00:00
|
|
|
class HasMetaAilment(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
move_meta_ailment = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"MoveMetaAilment",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
class HasMetaCategory(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
move_meta_category = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"MoveMetaCategory",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
class HasMove(models.Model):
|
2020-02-17 20:58:07 +00:00
|
|
|
move = models.ForeignKey(
|
|
|
|
"Move",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
class HasMoveDamageClass(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
move_damage_class = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"MoveDamageClass",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
class HasMoveEffect(models.Model):
|
2020-02-17 20:58:07 +00:00
|
|
|
move_effect = models.ForeignKey(
|
|
|
|
"MoveEffect", blank=True, null=True, on_delete=models.CASCADE
|
|
|
|
)
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
2015-10-27 13:36:33 +00:00
|
|
|
class HasMoveAttribute(models.Model):
|
2018-10-18 20:23:48 +00:00
|
|
|
move_attribute = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"MoveAttribute", blank=True, null=True, on_delete=models.CASCADE
|
|
|
|
)
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
class HasMoveTarget(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
move_target = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"MoveTarget",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
2015-04-06 04:27:59 +00:00
|
|
|
class HasName(models.Model):
|
2016-05-30 13:58:03 +00:00
|
|
|
name = models.CharField(max_length=100, db_index=True)
|
2015-04-06 04:27:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-06 04:27:59 +00:00
|
|
|
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2015-04-07 12:14:31 +00:00
|
|
|
class HasNature(models.Model):
|
2020-02-17 20:58:07 +00:00
|
|
|
nature = models.ForeignKey(
|
|
|
|
"Nature",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-06 04:27:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-06 04:27:59 +00:00
|
|
|
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2015-04-06 04:27:59 +00:00
|
|
|
class HasOrder(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
order = models.IntegerField(blank=True, null=True)
|
2015-04-06 04:27:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-06 04:27:59 +00:00
|
|
|
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class HasPokeathlonStat(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
pokeathlon_stat = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"PokeathlonStat",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-06 04:27:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-06 04:27:59 +00:00
|
|
|
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class HasPokedex(models.Model):
|
2020-02-17 20:58:07 +00:00
|
|
|
pokedex = models.ForeignKey(
|
|
|
|
"Pokedex",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-06 04:27:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-06 04:27:59 +00:00
|
|
|
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class HasPokemon(models.Model):
|
2020-02-17 20:58:07 +00:00
|
|
|
pokemon = models.ForeignKey(
|
|
|
|
"Pokemon",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-06 04:27:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-06 04:27:59 +00:00
|
|
|
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class HasPokemonColor(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
pokemon_color = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"PokemonColor",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-06 04:27:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-06 04:27:59 +00:00
|
|
|
|
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class HasPokemonForm(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
pokemon_form = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"PokemonForm",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class HasPokemonHabitat(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
pokemon_habitat = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"PokemonHabitat",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
# HasPokemonMoveMethod
|
2015-09-27 04:20:19 +00:00
|
|
|
class HasMoveLearnMethod(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
move_learn_method = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"MoveLearnMethod",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class HasPokemonShape(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
pokemon_shape = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"PokemonShape",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class HasPokemonSpecies(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
pokemon_species = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"PokemonSpecies",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class HasRegion(models.Model):
|
2020-02-17 20:58:07 +00:00
|
|
|
region = models.ForeignKey(
|
|
|
|
"Region",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class HasShortEffect(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
short_effect = models.CharField(max_length=300)
|
2015-04-21 01:43:55 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class HasStat(models.Model):
|
2020-02-17 20:58:07 +00:00
|
|
|
stat = models.ForeignKey(
|
|
|
|
"Stat",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class HasType(models.Model):
|
2020-02-17 20:58:07 +00:00
|
|
|
type = models.ForeignKey(
|
|
|
|
"Type",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
2019-12-01 12:38:51 +00:00
|
|
|
class HasTypeEfficacy(models.Model):
|
2021-02-13 22:22:41 +00:00
|
|
|
damage_type = models.ForeignKey(
|
|
|
|
"Type",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s_damage_type",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2019-12-01 12:38:51 +00:00
|
|
|
|
2021-02-13 22:22:41 +00:00
|
|
|
target_type = models.ForeignKey(
|
|
|
|
"Type",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s_target_type",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2019-12-01 12:38:51 +00:00
|
|
|
|
|
|
|
damage_factor = models.IntegerField()
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
abstract = True
|
|
|
|
|
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class HasVersion(models.Model):
|
2020-02-17 20:58:07 +00:00
|
|
|
version = models.ForeignKey(
|
|
|
|
"Version",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class HasVersionGroup(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
version_group = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"VersionGroup",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class IsDescription(HasLanguage, HasDescription):
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-21 01:43:55 +00:00
|
|
|
|
|
|
|
|
2015-04-09 04:45:23 +00:00
|
|
|
class IsName(HasLanguage, HasName):
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
class IsFlavorText(HasLanguage, HasFlavorText):
|
2016-03-05 09:27:25 +00:00
|
|
|
class Meta:
|
|
|
|
abstract = True
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
2015-04-06 04:27:59 +00:00
|
|
|
####################
|
|
|
|
# VERSION MODELS #
|
|
|
|
####################
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
2015-04-06 04:27:59 +00:00
|
|
|
class Version(HasName, HasVersionGroup):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-06 04:27:59 +00:00
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2015-10-18 23:01:33 +00:00
|
|
|
class VersionName(IsName, HasVersion):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-06 04:27:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class VersionGroup(HasName, HasGeneration, HasOrder):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-06 04:27:59 +00:00
|
|
|
|
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class VersionGroupRegion(HasVersionGroup, HasRegion):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-06 04:27:59 +00:00
|
|
|
|
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
# VersionGroupPokemonMoveMethod
|
|
|
|
class VersionGroupMoveLearnMethod(HasVersionGroup, HasMoveLearnMethod):
|
|
|
|
pass
|
2015-04-06 04:27:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
#####################
|
|
|
|
# LANGUAGE MODELS #
|
|
|
|
#####################
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
2015-04-06 04:27:59 +00:00
|
|
|
class Language(HasName, HasOrder):
|
2019-12-17 16:27:01 +00:00
|
|
|
iso639 = models.CharField(max_length=10)
|
2015-04-06 04:27:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
iso3166 = models.CharField(max_length=2)
|
2015-04-06 04:27:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
official = models.BooleanField(default=False)
|
2015-04-06 04:27:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class LanguageName(IsName):
|
2016-03-05 09:27:25 +00:00
|
|
|
local_language = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"Language",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="locallanguage",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-03-31 01:02:29 +00:00
|
|
|
|
|
|
|
|
2015-04-06 04:27:59 +00:00
|
|
|
#######################
|
|
|
|
# GENERATION MODELS #
|
|
|
|
#######################
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
2015-11-16 03:29:30 +00:00
|
|
|
class Generation(HasName):
|
2020-02-17 20:58:07 +00:00
|
|
|
region = models.OneToOneField(
|
|
|
|
"Region",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-03-31 01:02:29 +00:00
|
|
|
|
|
|
|
|
2015-04-21 01:43:55 +00:00
|
|
|
class GenerationName(IsName, HasGeneration):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-20 02:24:14 +00:00
|
|
|
|
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
###################
|
|
|
|
# REGION MODELS #
|
|
|
|
###################
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class Region(HasName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class RegionName(IsName, HasRegion):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
2015-04-06 04:27:59 +00:00
|
|
|
####################
|
|
|
|
# ABILITY MODELS #
|
|
|
|
####################
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
2015-04-06 04:27:59 +00:00
|
|
|
class Ability(HasName, HasGeneration):
|
2016-03-05 09:27:25 +00:00
|
|
|
is_main_series = models.BooleanField(default=False)
|
2015-04-06 04:27:59 +00:00
|
|
|
|
|
|
|
|
2015-10-27 13:36:33 +00:00
|
|
|
class AbilityEffectText(HasLanguage, HasEffect, HasShortEffect, HasAbility):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-06 04:27:59 +00:00
|
|
|
|
2015-03-31 01:02:29 +00:00
|
|
|
|
2015-04-09 04:45:23 +00:00
|
|
|
class AbilityFlavorText(IsFlavorText, HasAbility, HasVersionGroup):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-03-31 01:02:29 +00:00
|
|
|
|
|
|
|
|
2015-04-06 04:27:59 +00:00
|
|
|
class AbilityName(IsName, HasAbility):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-03-31 01:02:29 +00:00
|
|
|
|
|
|
|
|
2015-11-08 21:26:02 +00:00
|
|
|
class AbilityChange(HasAbility, HasVersionGroup):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
2015-10-27 13:36:33 +00:00
|
|
|
class AbilityChangeEffectText(HasLanguage, HasEffect):
|
2016-03-05 09:27:25 +00:00
|
|
|
ability_change = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
AbilityChange,
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2015-03-31 01:02:29 +00:00
|
|
|
|
2015-04-06 04:27:59 +00:00
|
|
|
#################
|
|
|
|
# TYPE MODELS #
|
|
|
|
#################
|
2015-03-31 01:02:29 +00:00
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
2015-04-09 04:45:23 +00:00
|
|
|
class Type(HasName, HasGeneration, HasMoveDamageClass):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-03-31 01:02:29 +00:00
|
|
|
|
|
|
|
|
2015-04-06 04:27:59 +00:00
|
|
|
class TypeName(IsName, HasType):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-03-31 01:02:29 +00:00
|
|
|
|
|
|
|
|
2015-04-09 04:45:23 +00:00
|
|
|
class TypeGameIndex(HasType, HasGeneration, HasGameIndex):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-03-31 01:02:29 +00:00
|
|
|
|
|
|
|
|
2019-12-01 12:38:51 +00:00
|
|
|
class TypeEfficacy(HasTypeEfficacy):
|
|
|
|
pass
|
2015-03-31 01:02:29 +00:00
|
|
|
|
2015-04-07 12:14:31 +00:00
|
|
|
|
2019-12-01 12:38:51 +00:00
|
|
|
# model for a type's efficacy that was used until a given generation
|
|
|
|
class TypeEfficacyPast(HasTypeEfficacy, HasGeneration):
|
|
|
|
pass
|
2015-04-07 12:14:31 +00:00
|
|
|
|
|
|
|
|
2024-07-29 00:04:30 +00:00
|
|
|
class TypeSprites(HasType):
|
|
|
|
sprites = models.JSONField()
|
|
|
|
|
|
|
|
|
2015-04-07 12:14:31 +00:00
|
|
|
#################
|
|
|
|
# STAT MODELS #
|
|
|
|
#################
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
2015-04-09 04:45:23 +00:00
|
|
|
class Stat(HasName, HasMoveDamageClass):
|
2016-03-05 09:27:25 +00:00
|
|
|
is_battle_only = models.BooleanField(default=False)
|
2015-04-07 12:14:31 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
game_index = models.IntegerField()
|
2015-04-07 12:14:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
class StatName(IsName, HasStat):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-07 12:14:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
###########################
|
|
|
|
# CHARACTERISTIC MODELS #
|
|
|
|
###########################
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
2015-04-07 12:14:31 +00:00
|
|
|
class Characteristic(HasStat):
|
2016-03-05 09:27:25 +00:00
|
|
|
gene_mod_5 = models.IntegerField()
|
2015-04-07 12:14:31 +00:00
|
|
|
|
|
|
|
|
2015-04-09 04:45:23 +00:00
|
|
|
class CharacteristicDescription(HasCharacteristic, IsDescription):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-07 12:14:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
######################
|
|
|
|
# EGG GROUP MODELS #
|
|
|
|
######################
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
2015-04-07 12:14:31 +00:00
|
|
|
class EggGroup(HasName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-07 12:14:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
class EggGroupName(IsName, HasEggGroup):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-07 12:14:31 +00:00
|
|
|
|
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
#################
|
|
|
|
# ITEM MODELS #
|
|
|
|
#################
|
2015-04-07 12:14:31 +00:00
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class ItemPocket(HasName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-07 12:14:31 +00:00
|
|
|
|
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class ItemPocketName(IsName, HasItemPocket):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-07 12:14:31 +00:00
|
|
|
|
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class ItemCategory(HasName, HasItemPocket):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-07 12:14:31 +00:00
|
|
|
|
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class ItemCategoryName(IsName, HasItemCategory):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-07 12:14:31 +00:00
|
|
|
|
|
|
|
|
2015-10-03 03:40:21 +00:00
|
|
|
class ItemFlingEffect(HasName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-07 12:14:31 +00:00
|
|
|
|
|
|
|
|
2015-11-16 03:29:30 +00:00
|
|
|
class ItemFlingEffectEffectText(HasLanguage, HasEffect, HasFlingEffect):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-07 12:14:31 +00:00
|
|
|
|
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class Item(HasName, HasItemCategory, HasFlingEffect):
|
2016-03-05 09:27:25 +00:00
|
|
|
cost = models.IntegerField(blank=True, null=True)
|
2015-04-07 12:14:31 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
fling_power = models.IntegerField(blank=True, null=True)
|
2015-04-21 01:43:55 +00:00
|
|
|
|
2015-04-07 12:14:31 +00:00
|
|
|
|
2015-10-27 13:36:33 +00:00
|
|
|
class ItemEffectText(HasItem, HasLanguage, HasEffect, HasShortEffect):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-07 12:14:31 +00:00
|
|
|
|
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class ItemName(HasItem, IsName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-07 12:14:31 +00:00
|
|
|
|
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class ItemFlavorText(HasItem, HasVersionGroup, IsFlavorText):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
2015-10-23 04:56:01 +00:00
|
|
|
class ItemAttribute(HasName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
2015-10-27 13:36:33 +00:00
|
|
|
class ItemAttributeName(IsName, HasItemAttribute):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
2015-10-27 13:36:33 +00:00
|
|
|
class ItemAttributeDescription(IsDescription, HasItemAttribute):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
2015-10-27 13:36:33 +00:00
|
|
|
class ItemAttributeMap(HasItem, HasItemAttribute):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class ItemGameIndex(HasItem, HasGeneration, HasGameIndex):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
2016-02-16 06:31:19 +00:00
|
|
|
class ItemSprites(HasItem):
|
2023-11-26 13:18:58 +00:00
|
|
|
sprites = models.JSONField()
|
2016-02-16 06:31:19 +00:00
|
|
|
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
####################
|
|
|
|
# CONTEST MODELS #
|
|
|
|
####################
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class ContestType(HasName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class ContestTypeName(HasContestType, IsName):
|
2016-03-05 09:27:25 +00:00
|
|
|
flavor = models.CharField(max_length=10)
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
color = models.CharField(max_length=10)
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class ContestEffect(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
appeal = models.IntegerField()
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
jam = models.IntegerField()
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
2015-11-16 03:29:30 +00:00
|
|
|
class ContestEffectEffectText(HasLanguage, HasEffect, HasContestEffect):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-10-27 13:36:33 +00:00
|
|
|
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2015-11-16 03:29:30 +00:00
|
|
|
class ContestEffectFlavorText(HasLanguage, HasFlavorText, HasContestEffect):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class ContestCombo(models.Model):
|
2020-02-17 20:58:07 +00:00
|
|
|
first_move = models.ForeignKey(
|
|
|
|
"Move",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="first_move",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
second_move = models.ForeignKey(
|
|
|
|
"Move",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="second_move",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
##################
|
|
|
|
# BERRY MODELS #
|
|
|
|
##################
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class BerryFirmness(HasName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class BerryFirmnessName(IsName):
|
2016-03-05 09:27:25 +00:00
|
|
|
berry_firmness = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
BerryFirmness,
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
2015-11-26 01:18:35 +00:00
|
|
|
class Berry(HasName, HasItem):
|
2016-03-05 09:27:25 +00:00
|
|
|
berry_firmness = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
BerryFirmness,
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
natural_gift_power = models.IntegerField()
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2018-10-18 20:23:48 +00:00
|
|
|
natural_gift_type = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
Type, blank=True, null=True, related_name="%(class)s", on_delete=models.CASCADE
|
|
|
|
)
|
2015-11-26 01:18:35 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
size = models.IntegerField()
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
max_harvest = models.IntegerField()
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
growth_time = models.IntegerField()
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
soil_dryness = models.IntegerField()
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
smoothness = models.IntegerField()
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
2018-10-20 00:05:10 +00:00
|
|
|
# Berry Flavors are a bit of a hack because their relationship
|
|
|
|
# in terms of flavors to contest types is really awkward the
|
|
|
|
# way it was handled in the veekun data set. Berry Flavor here
|
|
|
|
# does not match the csv table. Berry Flavor Map
|
|
|
|
# is a table fabricated just to suit this project.
|
2016-03-05 09:27:25 +00:00
|
|
|
|
|
|
|
|
2015-11-16 03:29:30 +00:00
|
|
|
class BerryFlavor(HasName):
|
2016-03-05 09:27:25 +00:00
|
|
|
contest_type = models.OneToOneField(
|
2020-02-17 20:58:07 +00:00
|
|
|
"ContestType",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-11-10 19:20:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
class BerryFlavorName(IsName):
|
2020-02-17 20:58:07 +00:00
|
|
|
berry_flavor = models.ForeignKey(
|
|
|
|
BerryFlavor,
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-11-10 19:20:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
class BerryFlavorMap(models.Model):
|
2020-02-17 20:58:07 +00:00
|
|
|
berry = models.ForeignKey(
|
|
|
|
Berry, blank=True, null=True, related_name="%(class)s", on_delete=models.CASCADE
|
|
|
|
)
|
2015-11-10 19:20:06 +00:00
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
berry_flavor = models.ForeignKey(
|
|
|
|
BerryFlavor,
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
potency = models.IntegerField()
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
########################
|
|
|
|
# GROWTH RATE MODELS #
|
|
|
|
########################
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class GrowthRate(HasName):
|
2016-03-05 09:27:25 +00:00
|
|
|
formula = models.CharField(max_length=500)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class GrowthRateDescription(HasGrowthRate, IsDescription):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
###################
|
|
|
|
# NATURE MODELS #
|
|
|
|
###################
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class Nature(HasName):
|
2018-10-18 20:23:48 +00:00
|
|
|
decreased_stat = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
Stat, blank=True, null=True, related_name="decreased", on_delete=models.CASCADE
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2018-10-18 20:23:48 +00:00
|
|
|
increased_stat = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
Stat, blank=True, null=True, related_name="increased", on_delete=models.CASCADE
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
hates_flavor = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
BerryFlavor,
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="hates_flavor",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
likes_flavor = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
BerryFlavor,
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="likes_flavor",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
game_index = models.IntegerField()
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class NatureName(IsName, HasNature):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class NaturePokeathlonStat(HasNature, HasPokeathlonStat):
|
2016-03-05 09:27:25 +00:00
|
|
|
max_change = models.IntegerField()
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class NatureBattleStylePreference(HasNature):
|
2016-03-05 09:27:25 +00:00
|
|
|
move_battle_style = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"MoveBattleStyle",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
low_hp_preference = models.IntegerField()
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
high_hp_preference = models.IntegerField()
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
#####################
|
|
|
|
# LOCATION MODELS #
|
|
|
|
#####################
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class Location(HasRegion, HasName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class LocationName(HasLocation, IsName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class LocationGameIndex(HasLocation, HasGeneration, HasGameIndex):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class LocationArea(HasLocation, HasGameIndex, HasName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class LocationAreaName(IsName, HasLocationArea):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class LocationAreaEncounterRate(HasEncounterMethod, HasLocationArea, HasVersion):
|
2016-03-05 09:27:25 +00:00
|
|
|
rate = models.IntegerField()
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
######################
|
|
|
|
# ENCOUNTER MODELS #
|
|
|
|
######################
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class EncounterMethod(HasName, HasOrder):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class EncounterMethodName(HasEncounterMethod, IsName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class EncounterSlot(HasVersionGroup, HasEncounterMethod):
|
2016-03-05 09:27:25 +00:00
|
|
|
slot = models.IntegerField(blank=True, null=True)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
rarity = models.IntegerField()
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Encounter(HasVersion, HasLocationArea, HasPokemon):
|
2020-02-17 20:58:07 +00:00
|
|
|
encounter_slot = models.ForeignKey(
|
|
|
|
EncounterSlot, blank=True, null=True, on_delete=models.CASCADE
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
min_level = models.IntegerField()
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
max_level = models.IntegerField()
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class EncounterCondition(HasName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class EncounterConditionName(HasEncounterCondition, IsName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class EncounterConditionValue(HasEncounterCondition, HasName):
|
2016-03-05 09:27:25 +00:00
|
|
|
is_default = models.BooleanField(default=False)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class EncounterConditionValueName(IsName):
|
2016-03-05 09:27:25 +00:00
|
|
|
encounter_condition_value = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
EncounterConditionValue,
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class EncounterConditionValueMap(models.Model):
|
2020-02-17 20:58:07 +00:00
|
|
|
encounter = models.ForeignKey(
|
|
|
|
Encounter, blank=True, null=True, on_delete=models.CASCADE
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2018-10-18 20:23:48 +00:00
|
|
|
encounter_condition_value = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
EncounterConditionValue, blank=True, null=True, on_delete=models.CASCADE
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
#################
|
|
|
|
# MOVE MODELS #
|
|
|
|
#################
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class Move(
|
2020-02-17 20:58:07 +00:00
|
|
|
HasName,
|
|
|
|
HasGeneration,
|
|
|
|
HasType,
|
|
|
|
HasMoveDamageClass,
|
|
|
|
HasMoveEffect,
|
|
|
|
HasMoveTarget,
|
|
|
|
HasContestType,
|
|
|
|
HasContestEffect,
|
|
|
|
HasSuperContestEffect,
|
|
|
|
):
|
2016-03-05 09:27:25 +00:00
|
|
|
power = models.IntegerField(blank=True, null=True)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
pp = models.IntegerField(blank=True, null=True)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
accuracy = models.IntegerField(blank=True, null=True)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
priority = models.IntegerField(blank=True, null=True)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
move_effect_chance = models.IntegerField(blank=True, null=True)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class MoveName(HasMove, IsName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class MoveFlavorText(HasMove, HasVersionGroup, IsFlavorText):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class MoveChange(HasMove, HasVersionGroup, HasType, HasMoveEffect):
|
2016-03-05 09:27:25 +00:00
|
|
|
power = models.IntegerField(blank=True, null=True)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
pp = models.IntegerField(blank=True, null=True)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
accuracy = models.IntegerField(blank=True, null=True)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
move_effect_chance = models.IntegerField(blank=True, null=True)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
##############################
|
|
|
|
# MOVE DAMAGE CLASS MODELS #
|
|
|
|
##############################
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class MoveDamageClass(HasName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2015-10-27 13:36:33 +00:00
|
|
|
class MoveDamageClassName(HasMoveDamageClass, IsName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
class MoveDamageClassDescription(HasMoveDamageClass, IsDescription):
|
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
##############################
|
|
|
|
# MOVE BATTLE STYLE MODELS #
|
|
|
|
##############################
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class MoveBattleStyle(HasName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class MoveBattleStyleName(IsName):
|
2016-03-05 09:27:25 +00:00
|
|
|
move_battle_style = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
MoveBattleStyle,
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
########################
|
|
|
|
# MOVE EFFECT MODELS #
|
|
|
|
########################
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class MoveEffect(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
2015-10-27 13:36:33 +00:00
|
|
|
class MoveEffectEffectText(HasLanguage, HasMoveEffect, HasEffect, HasShortEffect):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class MoveEffectChange(HasMoveEffect, HasVersionGroup):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
2015-10-27 13:36:33 +00:00
|
|
|
class MoveEffectChangeEffectText(HasLanguage, HasEffect):
|
2016-03-05 09:27:25 +00:00
|
|
|
move_effect_change = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"MoveEffectChange",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
2015-10-27 13:36:33 +00:00
|
|
|
################################
|
|
|
|
# MOVE FLAG/ATTRIBUTE MODELS #
|
|
|
|
################################
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
2015-10-27 13:36:33 +00:00
|
|
|
class MoveAttribute(HasName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-10-27 13:36:33 +00:00
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2015-10-27 13:36:33 +00:00
|
|
|
class MoveAttributeName(HasMoveAttribute, IsName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
2015-10-27 13:36:33 +00:00
|
|
|
class MoveAttributeDescription(HasMoveAttribute, IsDescription):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
2015-10-27 13:36:33 +00:00
|
|
|
class MoveAttributeMap(HasMove, HasMoveAttribute):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
########################
|
|
|
|
# MOVE TARGET MODELS #
|
|
|
|
########################
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
2015-04-09 04:45:23 +00:00
|
|
|
class MoveTarget(HasName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
2015-10-27 13:36:33 +00:00
|
|
|
class MoveTargetName(HasMoveTarget, IsName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-10-27 13:36:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
class MoveTargetDescription(HasMoveTarget, IsDescription):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
######################
|
|
|
|
# MOVE META MODELS #
|
|
|
|
######################
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
2015-09-27 04:20:19 +00:00
|
|
|
class MoveMeta(HasMetaAilment, HasMetaCategory):
|
2020-02-17 20:58:07 +00:00
|
|
|
move = models.OneToOneField(
|
|
|
|
Move,
|
|
|
|
blank=False,
|
|
|
|
null=False,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
min_hits = models.IntegerField(blank=True, null=True)
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
max_hits = models.IntegerField(blank=True, null=True)
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
min_turns = models.IntegerField(blank=True, null=True)
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
max_turns = models.IntegerField(blank=True, null=True)
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
drain = models.IntegerField(blank=True, null=True)
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
healing = models.IntegerField(blank=True, null=True)
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
crit_rate = models.IntegerField(blank=True, null=True)
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
ailment_chance = models.IntegerField(blank=True, null=True)
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
flinch_chance = models.IntegerField(blank=True, null=True)
|
2015-04-09 04:45:23 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
stat_chance = models.IntegerField(blank=True, null=True)
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
class MoveMetaAilment(HasName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
class MoveMetaAilmentName(HasMetaAilment, IsName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
class MoveMetaCategory(HasName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
class MoveMetaCategoryDescription(HasMetaCategory, IsDescription):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-09 04:45:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
class MoveMetaStatChange(HasMove, HasStat):
|
2016-03-05 09:27:25 +00:00
|
|
|
change = models.IntegerField()
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
#######################
|
|
|
|
# EXPERIENCE MODELS #
|
|
|
|
#######################
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class Experience(HasGrowthRate):
|
2016-03-05 09:27:25 +00:00
|
|
|
level = models.IntegerField()
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
experience = models.IntegerField()
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
###################
|
|
|
|
# GENDER MODELS #
|
|
|
|
###################
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class Gender(HasName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
####################
|
|
|
|
# MACHINE MODELS #
|
|
|
|
####################
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class Machine(HasGrowthRate, HasItem):
|
2016-03-05 09:27:25 +00:00
|
|
|
machine_number = models.IntegerField()
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
version_group = models.ForeignKey(
|
|
|
|
VersionGroup, blank=True, null=True, on_delete=models.CASCADE
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2018-10-18 20:23:48 +00:00
|
|
|
move = models.ForeignKey(Move, blank=True, null=True, on_delete=models.CASCADE)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
#######################
|
|
|
|
# POKEATHLON MODELS #
|
|
|
|
#######################
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class PokeathlonStat(HasName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PokeathlonStatName(IsName, HasPokeathlonStat):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
#####################
|
|
|
|
# PAL PARK MODELS #
|
|
|
|
#####################
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class PalParkArea(HasName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PalParkAreaName(IsName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pal_park_area = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
PalParkArea,
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PalPark(HasPokemonSpecies):
|
2016-03-05 09:27:25 +00:00
|
|
|
pal_park_area = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
PalParkArea,
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
base_score = models.IntegerField(blank=True, null=True)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
rate = models.IntegerField()
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
##########################
|
|
|
|
# SUPER CONTEST MODELS #
|
|
|
|
##########################
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class SuperContestEffect(models.Model):
|
2016-03-05 09:27:25 +00:00
|
|
|
appeal = models.IntegerField()
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
2015-11-16 03:29:30 +00:00
|
|
|
class SuperContestEffectFlavorText(IsFlavorText, HasSuperContestEffect):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class SuperContestCombo(models.Model):
|
2020-02-17 20:58:07 +00:00
|
|
|
first_move = models.ForeignKey(
|
|
|
|
Move, blank=True, null=True, related_name="first", on_delete=models.CASCADE
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
second_move = models.ForeignKey(
|
|
|
|
Move, blank=True, null=True, related_name="second", on_delete=models.CASCADE
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
######################
|
|
|
|
# EVOLUTION MODELS #
|
|
|
|
######################
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class EvolutionChain(models.Model):
|
2020-02-17 20:58:07 +00:00
|
|
|
baby_trigger_item = models.ForeignKey(
|
|
|
|
Item, blank=True, null=True, on_delete=models.CASCADE
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class EvolutionTrigger(HasName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class EvolutionTriggerName(HasEvolutionTrigger, IsName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
####################
|
|
|
|
# POKEDEX MODELS #
|
|
|
|
####################
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class Pokedex(HasName, HasRegion):
|
2016-03-05 09:27:25 +00:00
|
|
|
is_main_series = models.BooleanField(default=False)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
2015-10-27 13:36:33 +00:00
|
|
|
class PokedexName(HasPokedex, IsName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-10-27 13:36:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PokedexDescription(HasPokedex, IsDescription):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PokedexVersionGroup(HasPokedex, HasVersionGroup):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
####################
|
|
|
|
# POKEMON MODELS #
|
|
|
|
####################
|
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
|
|
|
|
class PokemonSpecies(
|
|
|
|
HasName, HasGeneration, HasPokemonColor, HasPokemonShape, HasGrowthRate, HasOrder
|
|
|
|
):
|
2018-10-18 20:23:48 +00:00
|
|
|
evolves_from_species = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"self", blank=True, null=True, on_delete=models.CASCADE
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2018-10-18 20:23:48 +00:00
|
|
|
evolution_chain = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
EvolutionChain, blank=True, null=True, on_delete=models.CASCADE
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
pokemon_habitat = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
"PokemonHabitat",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2020-08-01 10:00:09 +00:00
|
|
|
gender_rate = models.IntegerField(blank=True, null=True)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2020-08-01 10:00:09 +00:00
|
|
|
capture_rate = models.IntegerField(blank=True, null=True)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2020-08-01 10:00:09 +00:00
|
|
|
base_happiness = models.IntegerField(blank=True, null=True)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
is_baby = models.BooleanField(default=False)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2020-08-09 19:35:45 +00:00
|
|
|
is_legendary = models.BooleanField(default=False)
|
|
|
|
|
|
|
|
is_mythical = models.BooleanField(default=False)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2020-08-01 10:00:09 +00:00
|
|
|
hatch_counter = models.IntegerField(blank=True, null=True)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
has_gender_differences = models.BooleanField(default=False)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
forms_switchable = models.BooleanField(default=False)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PokemonSpeciesName(IsName, HasPokemonSpecies):
|
2016-03-05 09:27:25 +00:00
|
|
|
genus = models.CharField(max_length=30)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PokemonSpeciesDescription(HasPokemonSpecies, IsDescription):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PokemonSpeciesFlavorText(IsFlavorText, HasPokemonSpecies, HasVersion):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Pokemon(HasName, HasPokemonSpecies, HasOrder):
|
2020-07-25 19:52:01 +00:00
|
|
|
height = models.IntegerField(blank=True, null=True)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2020-07-25 19:52:01 +00:00
|
|
|
weight = models.IntegerField(blank=True, null=True)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2020-07-25 19:52:01 +00:00
|
|
|
base_experience = models.IntegerField(blank=True, null=True)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
is_default = models.BooleanField(default=False)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PokemonAbility(HasPokemon, HasAbility):
|
2016-03-05 09:27:25 +00:00
|
|
|
is_hidden = models.BooleanField(default=False)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
slot = models.IntegerField()
|
2023-02-16 23:53:48 +00:00
|
|
|
|
2023-02-16 23:18:04 +00:00
|
|
|
|
|
|
|
# model for a Pokemon's abilities that were used until a given generation
|
|
|
|
class PokemonAbilityPast(HasPokemon, HasAbility, HasGeneration):
|
|
|
|
is_hidden = models.BooleanField(default=False)
|
2023-02-16 23:53:48 +00:00
|
|
|
|
2023-02-16 23:18:04 +00:00
|
|
|
slot = models.IntegerField()
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PokemonColor(HasName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PokemonColorName(HasPokemonColor, IsName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PokemonDexNumber(HasPokemonSpecies, HasPokedex):
|
2016-03-05 09:27:25 +00:00
|
|
|
pokedex_number = models.IntegerField()
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PokemonEggGroup(HasPokemonSpecies, HasEggGroup):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PokemonEvolution(HasEvolutionTrigger, HasGender):
|
2018-10-18 20:23:48 +00:00
|
|
|
evolution_item = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
Item,
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="evolution_item",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
evolved_species = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
PokemonSpecies,
|
|
|
|
related_name="evolved_species",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
min_level = models.IntegerField(blank=True, null=True)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
location = models.ForeignKey(
|
|
|
|
Location,
|
|
|
|
related_name="location",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
held_item = models.ForeignKey(
|
|
|
|
Item, blank=True, null=True, related_name="held_item", on_delete=models.CASCADE
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
time_of_day = models.CharField(max_length=10, blank=True, null=True)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
known_move = models.ForeignKey(
|
|
|
|
Move, blank=True, null=True, on_delete=models.CASCADE
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2018-10-18 20:23:48 +00:00
|
|
|
known_move_type = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
Type, related_name="known_move", blank=True, null=True, on_delete=models.CASCADE
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
min_happiness = models.IntegerField(blank=True, null=True)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
min_beauty = models.IntegerField(blank=True, null=True)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
min_affection = models.IntegerField(blank=True, null=True)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
relative_physical_stats = models.IntegerField(blank=True, null=True)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
party_species = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
PokemonSpecies,
|
|
|
|
related_name="party_species",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
party_type = models.ForeignKey(
|
|
|
|
Type, related_name="party_type", blank=True, null=True, on_delete=models.CASCADE
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
trade_species = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
PokemonSpecies,
|
|
|
|
related_name="trade_species",
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
needs_overworld_rain = models.BooleanField(default=False)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
turn_upside_down = models.BooleanField(default=False)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PokemonForm(HasName, HasPokemon, HasOrder):
|
2016-03-05 09:27:25 +00:00
|
|
|
form_name = models.CharField(max_length=30)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2020-02-17 20:58:07 +00:00
|
|
|
version_group = models.ForeignKey(
|
|
|
|
VersionGroup, blank=True, null=True, on_delete=models.CASCADE
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
is_default = models.BooleanField(default=False)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
is_battle_only = models.BooleanField(default=False)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
is_mega = models.BooleanField(default=False)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
form_order = models.IntegerField(blank=True, null=True)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PokemonFormGeneration(HasPokemonForm, HasGeneration, HasGameIndex):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PokemonFormName(HasPokemonForm, IsName):
|
2020-11-23 20:57:30 +00:00
|
|
|
pokemon_name = models.CharField(max_length=60)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
2016-02-16 06:31:19 +00:00
|
|
|
class PokemonFormSprites(HasPokemonForm):
|
2023-11-26 13:18:58 +00:00
|
|
|
sprites = models.JSONField()
|
2016-02-16 06:31:19 +00:00
|
|
|
|
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
class PokemonGameIndex(HasPokemon, HasGameIndex, HasVersion):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PokemonHabitat(HasName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PokemonHabitatName(IsName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pokemon_habitat = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
PokemonHabitat,
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="%(class)s",
|
|
|
|
on_delete=models.CASCADE,
|
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PokemonItem(HasPokemon, HasVersion, HasItem):
|
2016-03-05 09:27:25 +00:00
|
|
|
rarity = models.IntegerField()
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
# PokemonMoveMethod
|
2015-09-27 04:20:19 +00:00
|
|
|
class MoveLearnMethod(HasName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
|
|
|
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
# PokemonMoveMethodName
|
2015-10-27 13:36:33 +00:00
|
|
|
class MoveLearnMethodName(IsName, HasMoveLearnMethod):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-10-27 13:36:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
class MoveLearnMethodDescription(IsDescription, HasMoveLearnMethod):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
2015-09-27 04:20:19 +00:00
|
|
|
class PokemonMove(HasPokemon, HasMoveLearnMethod, HasVersionGroup, HasMove, HasOrder):
|
2016-03-05 09:27:25 +00:00
|
|
|
level = models.IntegerField()
|
2024-10-11 05:54:16 +00:00
|
|
|
mastery = models.IntegerField(null=True, blank=True)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PokemonShape(HasName):
|
2016-03-05 09:27:25 +00:00
|
|
|
pass
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PokemonShapeName(IsName):
|
2016-03-05 09:27:25 +00:00
|
|
|
awesome_name = models.CharField(max_length=30)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
pokemon_shape = models.ForeignKey(
|
2020-02-17 20:58:07 +00:00
|
|
|
PokemonShape,
|
|
|
|
blank=True,
|
|
|
|
null=True,
|
|
|
|
related_name="pokemonshapename",
|
|
|
|
on_delete=models.CASCADE,
|
2018-10-18 20:23:48 +00:00
|
|
|
)
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PokemonStat(HasPokemon, HasStat):
|
2016-03-05 09:27:25 +00:00
|
|
|
base_stat = models.IntegerField()
|
2015-04-21 03:31:59 +00:00
|
|
|
|
2016-03-05 09:27:25 +00:00
|
|
|
effort = models.IntegerField()
|
2015-04-21 03:31:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PokemonType(HasPokemon, HasType):
|
2016-03-05 09:27:25 +00:00
|
|
|
slot = models.IntegerField()
|
2016-02-10 04:11:37 +00:00
|
|
|
|
|
|
|
|
2020-04-25 13:10:50 +00:00
|
|
|
class PokemonFormType(HasPokemonForm, HasType):
|
|
|
|
slot = models.IntegerField()
|
|
|
|
|
|
|
|
|
2019-11-30 20:49:39 +00:00
|
|
|
# model for a Pokemon's types that were used until a given generation
|
|
|
|
class PokemonTypePast(HasPokemon, HasType, HasGeneration):
|
|
|
|
slot = models.IntegerField()
|
|
|
|
|
|
|
|
|
2016-02-13 04:44:08 +00:00
|
|
|
class PokemonSprites(HasPokemon):
|
2023-11-23 10:59:12 +00:00
|
|
|
sprites = models.JSONField()
|
2024-02-02 18:45:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
class PokemonCries(HasPokemon):
|
|
|
|
cries = models.JSONField()
|