-
Notifications
You must be signed in to change notification settings - Fork 0
/
heroismPotion.py
30 lines (30 loc) · 1.04 KB
/
heroismPotion.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 hero tembed
<drac2>
ability_name = "a Potion of Heroism"
cc_name = "Potions of Heroism"
cc_value = character().get_cc(cc_name)
return_string = ""
cc_request = 1
if cc_value >= cc_request:
cc_use = cc_request
character().mod_cc(cc_name, -cc_use)
if character().temp_hp < 10:
character().set_temp_hp(10)
return_string = (
f' -title "{name} drinks {ability_name}!" '
f' -desc "For 1 hour after drinking it, you gain 10 temporary hit points that last for 1 hour. For the same duration, you are under the effect of the bless spell (no concentration required). This blue potion bubbles and steams as if boiling." '
f' -f "HP|{character().hp_str()}|inline" '
)
else:
cc_use = 0
return_string = (
f' -title "{name} fails to drink {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>