mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
Support permanent spells in /dndspell
This commit is contained in:
parent
a4229b0724
commit
bfc76548ff
1 changed files with 4 additions and 1 deletions
|
@ -5,7 +5,7 @@ from ..command import Command
|
||||||
from ..commandargs import CommandArgs
|
from ..commandargs import CommandArgs
|
||||||
from ..commanddata import CommandData
|
from ..commanddata import CommandData
|
||||||
from ..commandinterface import CommandInterface
|
from ..commandinterface import CommandInterface
|
||||||
from ...utils import parse_5etools_entry, ordinalformat
|
from ...utils import parse_5etools_entry, ordinalformat, andformat
|
||||||
|
|
||||||
|
|
||||||
class DndspellCommand(Command):
|
class DndspellCommand(Command):
|
||||||
|
@ -75,6 +75,7 @@ class DndspellCommand(Command):
|
||||||
string += f'💎 [b]Material[/b] ([i]{spell["components"]["m"]["text"]}[/i]) | '
|
string += f'💎 [b]Material[/b] ([i]{spell["components"]["m"]["text"]}[/i]) | '
|
||||||
else:
|
else:
|
||||||
string += f'💎 [b]Material[/b] ([i]{spell["components"]["m"]}[/i]) | '
|
string += f'💎 [b]Material[/b] ([i]{spell["components"]["m"]}[/i]) | '
|
||||||
|
string = string.rstrip(" ").rstrip("|")
|
||||||
string += "\n"
|
string += "\n"
|
||||||
string += "\n"
|
string += "\n"
|
||||||
if "duration" in spell:
|
if "duration" in spell:
|
||||||
|
@ -85,6 +86,8 @@ class DndspellCommand(Command):
|
||||||
string += 'Duration: ☁️ [b]Instantaneous[/b]'
|
string += 'Duration: ☁️ [b]Instantaneous[/b]'
|
||||||
elif duration["type"] == "special":
|
elif duration["type"] == "special":
|
||||||
string += 'Duration: ⭐️ [b]Special[/b]'
|
string += 'Duration: ⭐️ [b]Special[/b]'
|
||||||
|
elif duration["type"] == "permanent":
|
||||||
|
string += f"Duration: ♾ [b]Permanent[/b] (ends on {andformat(duration['ends'], final=' or ')})"
|
||||||
else:
|
else:
|
||||||
string += f'Duration: ⚠️[b]UNKNOWN[/b]'
|
string += f'Duration: ⚠️[b]UNKNOWN[/b]'
|
||||||
if duration.get("concentration", False):
|
if duration.get("concentration", False):
|
||||||
|
|
Loading…
Reference in a new issue