add kills counter random agility for each player and random init players
This commit is contained in:
@@ -1,11 +1,27 @@
|
||||
import random as _rand
|
||||
from bot_libs import syms as _bot_syms
|
||||
|
||||
async def add_player(update, context, name):
|
||||
#name= " ".join(context.args)
|
||||
print(f'add_player: {name}')
|
||||
Arena= context.application.bot_data['arena']
|
||||
Arena.add_player(name)
|
||||
players= [p.get_name() for p in Arena.get_players()]
|
||||
players_str= '\n'.join(players)
|
||||
await update.message.reply_text(f'Ecco i giocatori presenti nel mondo do gioco: \n{players_str}')
|
||||
#players= [p.get_name() for p in Arena.get_players()]
|
||||
#players_str= '\n'.join(players)
|
||||
#await update.message.reply_text(f'Ecco i giocatori presenti nel mondo do gioco: \n{players_str}')
|
||||
|
||||
async def add_random_players(update, context, colors_names= False):
|
||||
if colors_names: names= _bot_syms.COLORS_NAMES
|
||||
else: names= _bot_syms.RANDOM_NAMES
|
||||
|
||||
max_players= len(names)
|
||||
min_players= min(7, max_players)
|
||||
|
||||
players_num= _rand.randint(min_players, max_players)
|
||||
_rand.shuffle(names)
|
||||
lucky_players= _rand.sample(names, players_num)
|
||||
print(f'add_random_players: extracting {players_num} random players for the game')
|
||||
for name in names: await add_player(update, context, name)
|
||||
|
||||
async def get_players(update, context):
|
||||
Arena= context.application.bot_data['arena']
|
||||
|
||||
@@ -8,11 +8,11 @@ def get_winner(Arena):
|
||||
except: pass
|
||||
day= Arena.day
|
||||
if winner.player_gender_is_male():
|
||||
msg= f'Giorno #{day}: {winner.get_name()} Vince la cruenta battaglia, e vive felice e contento con Guarino'
|
||||
msg= f'{winner.get_name()} Vince la cruenta battaglia uccidendo {winner.get_kills()} giocatori, e vive felice e contento con Guarino'
|
||||
elif winner.player_gender_is_female():
|
||||
msg= f'Giorno #{day}: {winner.get_name()} Vince la cruenta battaglia, e vive felice e contenta con Guarino'
|
||||
msg= f'{winner.get_name()} Vince la cruenta battaglia uccidendo {winner.get_kills()} giocatori, e vive felice e contenta con Guarino'
|
||||
else:
|
||||
msg= f'Giorno #{day}: {winner.get_name()} Vince la cruenta battaglia, e vive felice e content# con Guarino'
|
||||
msg= f'{winner.get_name()} Vince la cruenta battaglia uccidendo {winner.get_kills()} giocatori, e vive felice e content# con Guarino'
|
||||
return msg
|
||||
|
||||
async def simulate_day(context, chat_id):
|
||||
|
||||
@@ -11,3 +11,30 @@ Uccidi o sarai tu ad essere ucciso
|
||||
"""
|
||||
|
||||
WIP_MSG= "Ehi, mio padre mi sta ancora finendo di creare, abbi pazienza, che fretta hai di entrare in questo mondo per morire?"
|
||||
|
||||
RANDOM_NAMES = [
|
||||
"Aeliana", "Thorne", "Kael", "Seraphine", "Jaxon", "Lyra", "Darius", "Elowen",
|
||||
"Zander", "Nyssa", "Orion", "Vesper", "Kieran", "Isolde", "Riven", "Calista",
|
||||
"Draven", "Mira", "Zephyr", "Selene", "Ashen", "Talia", "Finnian", "Aria",
|
||||
"Kaelan", "Liora", "Soren", "Elara", "Thalia", "Jett", "Cressida", "Lucian",
|
||||
"Freya", "Ronan", "Niamh", "Kellan", "Zara", "Dorian", "Amara", "Jace",
|
||||
"Elysia", "Caius", "Sable", "Alaric", "Veda", "Quinn", "Thorne", "Lirael",
|
||||
"Rhea", "Kade", "Isadora", "Ash", "Nyx", "Cassian", "Elowen", "Tamsin",
|
||||
"Rylan", "Faye", "Jorah", "Sienna", "Kieran", "Astra", "Zane", "Lyric",
|
||||
"Dax", "Ember", "Orion", "Selah", "Juno", "Kaia", "Thorne", "Vespera",
|
||||
"Riven", "Caden", "Liora", "Soren", "Elara", "Talia", "Jett", "Freya",
|
||||
"Ronan", "Niamh", "Kellan", "Zara", "Dorian", "Amara", "Jace", "Elysia",
|
||||
"Caius", "Sable", "Alaric", "Veda", "Quinn", "Thorne", "Lirael", "Rhea",
|
||||
"Kade", "Isadora", "Ash", "Nyx",
|
||||
]
|
||||
|
||||
COLORS_NAMES= [
|
||||
"Yellow", "Grey", "Violet", "Black", "Lime", "Ruby", "Avocado", "Crystal",
|
||||
"Pink", "Maize", "Coral", "Jade", "Platinum", "Emerald", "Carmine", "Nickel",
|
||||
"Chocolate", "Slate", "Turquoise", "Silver", "Teal", "Jet", "Ivory", "Cobalt",
|
||||
"Vermillion", "Aero", "Orange", "Rhythm", "Amber", "Olive", "Sepia", "Cyan",
|
||||
"Green", "Ochre", "Denim", "Erin", "Fuchsia", "Aqua", "Iceberg", "Blue",
|
||||
"Canary", "Red", "Mint", "Scarlet", "Coffee", "Indigo", "Mystic", "Rose",
|
||||
"Pearl", "Pumpkin", "Navy", "Ultramarine", "Sapphire", "Desert", "Cherry",
|
||||
"Tulip",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user