recipes_base.py 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. from utils.crafting import CraftingRecipe
  2. class BloodRecipe(CraftingRecipe):
  3. """Some blood"""
  4. name = "vial of blood" # name to refer to this recipe as
  5. crafting_time = 5
  6. tool_tags = ["blade"]
  7. consumable_tags = []
  8. output_prototypes = [
  9. "blood_material"
  10. ]
  11. output_names = ["a vial of blood"]
  12. success_message = "You collect your blood in a vial."
  13. def post_craft(self, craft_result, **kwargs):
  14. result_obj = super().post_craft(craft_result, **kwargs)
  15. if result_obj and self.crafter.attributes.has('health'):
  16. self.crafter.db.health -= 1
  17. return result_obj
  18. class SummoningCircleRecipe(CraftingRecipe):
  19. """A summoning circle"""
  20. name = "summoning circle" # name to refer to this recipe as
  21. crafting_time = 20
  22. tool_tags = []
  23. consumable_tags = ["blood"]
  24. output_prototypes = [
  25. "summoning_circle"
  26. ]
  27. success_message = "You draw an arcane circle on the ground."
  28. class TorchRecipe(CraftingRecipe):
  29. """A wooden torch"""
  30. """Some blood"""
  31. name = "torch" # name to refer to this recipe as
  32. crafting_time = 5
  33. tool_tags = []
  34. consumable_tags = ["wood", "cloth"]
  35. output_prototypes = [
  36. "torch"
  37. ]
  38. output_names = ["a wooden torch"]
  39. class WoodenPuppetRecipe(CraftingRecipe):
  40. """A puppet"""
  41. name = "wooden puppet" # name to refer to this recipe as
  42. crafting_time = 15
  43. tool_tags = ["blade"]
  44. consumable_tags = ["wood"]
  45. output_prototypes = [
  46. {"key": "carved wooden doll",
  47. "typeclass": "typeclasses.objects.Item",
  48. "desc": "A small carved doll"}
  49. ]