46 lines
1.3 KiB
Python
46 lines
1.3 KiB
Python
from utils.crafting import CraftingRecipe
|
|
|
|
|
|
class BloodRecipe(CraftingRecipe):
|
|
"""Some blood"""
|
|
name = "vial of blood" # name to refer to this recipe as
|
|
crafting_time = 5
|
|
tool_tags = ["blade"]
|
|
consumable_tags = []
|
|
output_prototypes = [
|
|
"blood_material"
|
|
]
|
|
output_names = ["a vial of blood"]
|
|
success_message = "You collect your blood in a vial."
|
|
|
|
def post_craft(self, craft_result, **kwargs):
|
|
result_obj = super().post_craft(craft_result, **kwargs)
|
|
if result_obj and self.crafter.attributes.has('health'):
|
|
self.crafter.db.health -= 1
|
|
|
|
return result_obj
|
|
|
|
|
|
class SummoningCircleRecipe(CraftingRecipe):
|
|
"""A summoning circle"""
|
|
name = "summoning circle" # name to refer to this recipe as
|
|
crafting_time = 20
|
|
tool_tags = []
|
|
consumable_tags = ["blood"]
|
|
output_prototypes = [
|
|
"summoning_circle"
|
|
]
|
|
success_message = "You draw an arcane circle on the ground."
|
|
|
|
|
|
class WoodenPuppetRecipe(CraftingRecipe):
|
|
"""A puppet"""
|
|
name = "wooden puppet" # name to refer to this recipe as
|
|
crafting_time = 15
|
|
tool_tags = ["blade"]
|
|
consumable_tags = ["wood"]
|
|
output_prototypes = [
|
|
{"key": "carved wooden doll",
|
|
"typeclass": "typeclasses.objects.Item",
|
|
"desc": "A small carved doll"}
|
|
]
|