-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1ab0e4c
commit 07007d7
Showing
10 changed files
with
324 additions
and
92 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from abc import ABC, abstractmethod | ||
|
||
class Activity: | ||
|
||
def __init__(self, name, duration): | ||
self.name = name | ||
self.duration = duration | ||
|
||
@abstractmethod | ||
def on_finished(self, player): | ||
pass | ||
|
||
class EquipArmorActivity(Activity): | ||
|
||
def __init__(self, armor, duration): | ||
super().__init__(f"putting on your {armor.name}", duration) | ||
self.armor = armor | ||
|
||
def on_finished(self, player): | ||
player.equip_armor(self.armor) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
[ | ||
{ | ||
"id": "leather", | ||
"name": "leather armor", | ||
"symbol": "l", | ||
"protection": 1 | ||
}, | ||
{ | ||
"id": "hide", | ||
"name": "hide armor", | ||
"symbol": "h", | ||
"protection": 2, | ||
"encumbrance": 1 | ||
}, | ||
{ | ||
"id": "scale_mail", | ||
"name": "scale mail", | ||
"symbol": "M", | ||
"protection": 4, | ||
"encumbrance": 7, | ||
"stealth_pen": 2 | ||
}, | ||
{ | ||
"id": "half_plate", | ||
"name": "half-plate armor", | ||
"symbol": "H", | ||
"protection": 5, | ||
"encumbrance": 6, | ||
"stealth_pen": 2 | ||
} | ||
] |
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
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
Oops, something went wrong.