proof of concept made

This commit is contained in:
Samuele Lorefice
2023-11-05 16:24:31 +01:00
commit 9350c8966a
13 changed files with 838 additions and 0 deletions

25
Card.py Normal file
View File

@@ -0,0 +1,25 @@
import string
class Card:
id: int = 0
name: string = ""
attack: int = 0
defence: int = 0
currHp: int = 0
maxHp: int = 0
def __init__(self, id: int, name: string, attack: int, defense: int):
self.id = id
self.name = name
self.attack = attack
self.defense = defense
def __str__(self):
return f"Card: {self.name} - Attack: {self.attack} - Defense: {self.defense}"
def Attack(self, card):
# current formula being sustained damage = attack - own card defence
card.currHp -= (self.attack-card.defense)
# might want to expand with crits and dice rolls to make it more fun