-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMermaidForgeRecipe.cs
More file actions
117 lines (99 loc) · 2.8 KB
/
MermaidForgeRecipe.cs
File metadata and controls
117 lines (99 loc) · 2.8 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
using SpaceCore;
using StardewValley;
using StardewValley.Enchantments;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PolyamorySweetLove
{
public class MermaidEnchantment : BaseWeaponEnchantment
{
public override bool IsSecondaryEnchantment()
{
return true;
}
public override bool IsForge()
{
return false;
}
public override int GetMaximumLevel()
{
return 1;
}
public override bool ShouldBeDisplayed()
{
return false;
}
}
}
/*
public class MermaidForgeRecipe : CustomForgeRecipe
{
public class IngredientMatcher : CustomForgeRecipe.IngredientMatcher
{
public override bool HasEnoughFor(Item item)
{
return item is StardewValley.Object obj && obj.ParentSheetIndex == 77; // Mermaid Pendant
}
public override void Consume(ref Item item)
{
if (item is StardewValley.Object obj && obj.ParentSheetIndex == 77)
{
item = null; // Consume the Mermaid Pendant
}
}
}
static StardewValley.Object item = (StardewValley.Object)ItemRegistry.Create("MermaidsKiss");
public override CustomForgeRecipe.IngredientMatcher BaseItem
{
get;
}
public override CustomForgeRecipe.IngredientMatcher IngredientItem { get; } = new IngredientMatcher();
public override int CinderShardCost { get; } = 20;
public override Item CreateResult(Item baseItem, Item ingredItem)
{
return baseItem;
}
}
/*
public class SwordUpgradeRecipe : CustomForgeRecipe
{
public class SwordMatcher : IngredientMatcher
{
public override bool HasEnoughFor(Item item)
{
return item != null && item.Type == "Sword";
}
public override void Consume(ref Item item)
{
// Simulate "consuming" by setting item to null
item = null;
}
}
public class GemMatcher : IngredientMatcher
{
public override bool HasEnoughFor(Item item)
{
return item != null && item.ItemId == "910" ;
}
public override void Consume(ref Item item)
{
item = null;
}
}
public override IngredientMatcher BaseItem => new SwordMatcher();
public override IngredientMatcher IngredientItem => new GemMatcher();
public override int CinderShardCost => 10;
public override Item CreateResult(Item baseItem, Item ingredItem)
{
return new Item
{
Type = "UpgradedSword",
Name = baseItem.Name + " + Gem",
Power = baseItem.Power + 15
};
}
}
*/