dkmud/world/recipes_base.py
Francesco Cappelli 18c59755d4 altri bugfix.
2022-01-25 23:31:04 +01:00

59 lines
1.6 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 TorchRecipe(CraftingRecipe):
"""A wooden torch"""
"""Some blood"""
name = "torch" # name to refer to this recipe as
crafting_time = 5
tool_tags = []
consumable_tags = ["wood", "cloth"]
output_prototypes = [
"torch"
]
output_names = ["a wooden torch"]
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"}
]