Hey guys,
I'm doing a multi-player text based card game for fun in Django where each card allows each player to make some standard actions (Draw more cards, get gold, get points etc.) and maybe some other abilities (Like destroy a card from an opponents hand, give an opponent minus points and many more).
I have created a Card class:
class Card(models.Model):
name = models.CharField(max_length=255, verbose_name="Name")
description = models.TextField(verbose_name="Description")
victory = models.BooleanField("Victory Card")
action = models.BooleanField("Action Card")
reaction = models.BooleanField("Reaction Card")
treasure = models.BooleanField("Treasure Card")
attack = models.BooleanField("Attack Card")
plus_action = models.IntegerField(max_length=2, verbose_name="Plus actions", null=True, blank=True)
plus_card = models.IntegerField(max_length=2, verbose_name="Plus cards", null=True, blank=True)
plus_buy = models.IntegerField(max_length=2, verbose_name="Plus buy", null=True, blank=True)
plus_gold = models.IntegerField(max_length=2, verbose_name="Plus gold", null=True, blank=True)
plus_victory = models.IntegerField(max_length=2, verbose_name="Plus victory", null=True, blank=True)
cost = models.IntegerField(max_length=2, verbose_name="Cost")
My problem is that I don't know how to represent the other abilities. I have thought about properties but I'm not sure if that's the way to go or how to go about it.
Do you guys have any suggestions? Thanks in advance!
Regards,
Andri