-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathanimation.py
More file actions
30 lines (25 loc) · 844 Bytes
/
animation.py
File metadata and controls
30 lines (25 loc) · 844 Bytes
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
import sys
import os
import time
from colorama import Fore
def animated_ascii_typing():
ascii_art = r"""
____ ___ _ _______ ______ _______ _ _ ___ _ _
| _ \ / _ \| |/ / ____| _ \ \ / /_ _| | | |/ _ \| \ | |
| |_) | | | | ' /| _| | |_) \ V / | | | |_| | | | | \| |
| __/| |_| | . \| |___| __/ | | | | | _ | |_| | |\ |
|_| \___/|_|\_\_____|_| |_| |_| |_| |_|\___/|_| \_|
"""
print(Fore.MAGENTA)
for char in ascii_art:
sys.stdout.write(char)
sys.stdout.flush()
time.sleep(0.002)
def animar_barra_vida(pokemon, dano):
for _ in range(dano):
if pokemon["vida"] > 0:
pokemon["vida"] -= 1
os.system('cls')
print(f'{pokemon["nome"]}')
print(f'❤️ {max(0, pokemon["vida"])} de vida')
time.sleep(0.03)