-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcharacter_creation.py
More file actions
51 lines (42 loc) · 1.45 KB
/
Copy pathcharacter_creation.py
File metadata and controls
51 lines (42 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
"""
Calvin Vu
A01291758
Hanxiao Mao
A01293003
Contains functions to create the game character.
"""
def make_character(character_name: str) -> dict:
"""
Create a game character according to character_name parameter.
:param character_name: a string represent the character name
:precondition: character_name must be string type
:post condition: generate a dictionary that has all the stats for character
:return: a dictionary that has all the stats for character
>>> make_character("han")
{'Name': 'han', 'X': 0, 'Y': 0, 'Level': 1, 'XP': 0, 'XPToLevelUp': 100, 'HP': 200, 'Max HP': 200, 'Chakra': 100, \
'Max Chakra': 100, 'Attack': 20, 'Magic': 11, 'Luck': 2, 'Goal Achieved': False, 'Jutsu': {('Katon', 'Unleash a fiery \
blast of chakra!', 'A powerful fire blast'): 22}}
"""
character = {"Name": character_name,
"X": 0,
"Y": 0,
"Level": 1,
"XP": 0,
"XPToLevelUp": 100,
"HP": 200,
"Max HP": 200,
"Chakra": 100,
"Max Chakra": 100,
"Attack": 20,
"Magic": 11,
"Luck": 2,
"Goal Achieved": False,
"Jutsu": {("Katon", "Unleash a fiery blast of chakra!", "A powerful fire blast"): 22}}
return character
def main():
"""
Drive the program.
"""
pass
if __name__ == '__main__':
main()