dnd5-scripts/game_utils.py
2026-06-17 22:32:48 +03:00

34 lines
1.0 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

def get_weather(city: str, tone: str = "обычный"):
"""
Получает прогноз погоды для города.
:param city: Название города на русском языке.
:param tone: Стиль описания (мрачный, веселый).
"""
# Логика скрипта
return f"В городе {city} сейчас дождь. Тон: {tone}"
def roll_dice(dice_exp: str):
"""
Бросает кубики (например, '2d20 + 5').
"""
import random
# Парсинг и бросок...
return "Выпало 18"
def main(dice_exp2: str):
"""
Бросает кубики (например, '2d20 + 5').
"""
import random
# Парсинг и бросок...
return "Выпало 114"
def create_ch(name: str, appearance: str):
"""
Бросает кубики (например, '2d20 + 5').
"""
import random
# Парсинг и бросок...
return f"имечко {name}, внешка: {appearance}"