1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00
royalnet/rpgpack/commands/dnddamage.py

18 lines
513 B
Python

from typing import *
from ..tables import DndBattleUnit
from .abstract import DndBattleTargetCommand
class DnddamageCommand(DndBattleTargetCommand):
name: str = "dnddamage"
description: str = "Damage a target in the currently active battle."
syntax: str = "{target} {damage}"
aliases = ["damage", "ddamage", "dd", "dmg", "ddmg"]
async def _change(self, unit: DndBattleUnit, args: List[str]):
health = unit.health
health.change(-int(args[0]))
unit.health = health