Created
August 10, 2017 09:47
-
-
Save TheRenaissance/c849e6de08d54e57f01453c75bcc116d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from .base_sol import Soldier | |
from .weapons.lance import Lance # I only imported the lance, just to get one weapon up before I work on importing more | |
from random import randint | |
class Cavalryman(Soldier): | |
weap_dict = {'lance': Lance(), | |
'sword': Sword(), | |
'crossbow': Crossbow()} | |
def __init__(self): | |
self.attack=randint(5, 10) | |
self.speed=5 | |
self.weapons=['lance', 'sword', 'crossbow'] | |
self.defense=randint(1, 3) | |
self.vitality=randint(25, 30) | |
self.current_weapon='lance' | |
def active_weapon(self, current_weapon): | |
weap = self.weap_dict.get(current_weapon) | |
return weap |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment