-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathradiantWeapon.py
30 lines (30 loc) · 1.02 KB
/
radiantWeapon.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
!alias rad tembed
<drac2>
ability_name = "Radiant Weapon"
bonus = 0
if len(&ARGS&) > 0:
args = &ARGS&
bonus = int(args[0]) #bonus
cc_name = ability_name
cc_value = character().get_cc(cc_name)
return_string = ""
if cc_value >= 1:
cc_use = 1
character().mod_cc(cc_name, -cc_use)
return_string = (
f'-title "{name} uses their {ability_name}!" '
f'-desc "As a reaction immediately after being hit by an attack, the wielder can expend 1 charge and cause the attacker to be blinded until the end of the attacker\'s next turn, unless the attacker succeeds on a **DC {int(character().spellbook.dc) + bonus}** Constitution saving throw." '
)
else:
cc_use = 0
return_string = (
f' -title "{name} fails to use their {ability_name}!" '
f' -desc "It will recharge (a bit) at dawn." '
)
cc_current = character().cc_str(cc_name)
return_string += (
f'-f "{cc_name} (-{cc_use})| {cc_current}|inline" '
f'-footer "{ctx.prefix}{ctx.alias}"'
)
return return_string
</drac2>