forked from bredeson/PnP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdice_encounter.py
58 lines (45 loc) · 2.17 KB
/
dice_encounter.py
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
52
53
54
55
56
57
58
#!/usr/bin/env python3
import creatures, random, sass, time
from textFormat import print_s, input_s
art = '''
, _..._ ,
{'. .' '. .'}
{ ~ '. _|= __|_ .' ~}
{ ~ ~ '-._ (___________) _.-'~ ~ }
{~ ~ ~ ~.' '. ~ ~ }
{ ~ ~ ~ / /\ /\ \ ~ ~ }
{ ~ ~ / __ __ \ ~ ~ }
{ ~ /\/ -<( o) ( o)>- \/\ ~ ~}
{ ~ ;( \/ .-. \/ ); ~ }
{ ~ ~\_ () ^ ( ) ^ () _/ ~ }
'-._~ \ (`-._'-'_.-') / ~_.-'
'--\ `'._'"'_.'` /--'
\ \`-'/ /
`\ '-' /'
`\ /'
'-...-'
'''
def dice_game(player):
print(art)
d_10 = random.randint(1,10)
print_s("You go to pick up the dice and the clown whispers...")
time.sleep(2)
decision = input_s("[Blood] or [Power]?\n", player, color="red")
while str(decision) not in ["blood", "power", "Blood", "Power"]:
decision=input_s(sass.sample_sass(), player, color='purple')
if decision.lower()=="blood":
if d_10 > 4:
print_s("\nWow, all those years playing street dice in the ghetto paid off, you gain +2 health points\n")
print_s("\nWell played my friend here take this [rope], I'm certain it'll come in handy\n", color="red")
player.hp+=2
elif d_10 <= 4:
print_s("\nShoot... you suck at this, the clown slaps you upside the head. You loose 1 health point\n the clown slopes off behind his trolley and leaves the way clear\n", color='purple')
player.hp-=1
elif decision.lower()=="power":
if d_10 > 4:
print_s("\nWow, all those years playing street dice in the ghetto paid off, you gain +2 attack \n")
print_s("\nWell played my friend here take this [rope], I'm certain it'll come in handy\n", color="red")
player.attack+=2
elif d_10 <= 4:
print_s("\nShoot... you suck at this, the clown laughs in your face. You loose 1 attack point\n the clown slopes off behind his trolley and leaves the way clear\n", color='purple')
player.attack-=1