1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-27 21:44:21 +00:00
royalnet/rpgpack/commands/dndheal.py

19 lines
479 B
Python
Raw Normal View History

2020-03-04 18:29:33 +00:00
from typing import *
from ..tables import DndBattleUnit
from .abstract import DndBattleTargetCommand
2020-03-04 18:29:33 +00:00
class DndhealCommand(DndBattleTargetCommand):
2020-03-04 18:29:33 +00:00
name: str = "dndheal"
description: str = "Heal a target in the currently active battle."
2020-03-04 18:29:33 +00:00
syntax: str = "{target} {heal}"
2020-03-04 18:29:33 +00:00
aliases = ["heal", "dheal"]
async def _change(self, unit: DndBattleUnit, args: List[str]):
2020-03-04 18:29:33 +00:00
health = unit.health
health.change(int(args[0]))
2020-03-04 18:29:33 +00:00
unit.health = health