-
Notifications
You must be signed in to change notification settings - Fork 0
/
bendLuck.py
29 lines (29 loc) · 1.14 KB
/
bendLuck.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
!alias bend tembed
<drac2>
cc_request = 2
ability_name = "Bend Luck"
cc_name = "Sorcery Points"
cc_value = character().get_cc(cc_name)
return_string = ""
if cc_value >= cc_request:
cc_use = cc_request
character().mod_cc(cc_name, -cc_use)
bp = vroll("1d4")
return_string = (
f' -title "{name} uses {ability_name}!" '
f' -desc "Starting at 6th level, you have the ability to twist fate using your wild magic. When another creature you can see makes an attack roll, an ability check, or a saving throw, you can use your reaction and spend 2 sorcery points to roll 1d4 and apply the number rolled as a bonus or penalty (your choice) to the creature\'s roll. You can do so after the creature rolls but before any effects of the roll occur." '
f' -f "Roll|{str(bp)}|inline" '
)
else:
cc_use = 0
return_string = (
f' -title "{name} fails to use {ability_name}!" '
f' -desc "No {cc_name} remaining." '
)
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>