-
Notifications
You must be signed in to change notification settings - Fork 6
/
ICoreApi.cs
148 lines (117 loc) · 8.67 KB
/
ICoreApi.cs
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
namespace DaLion.Core;
#region using directives
using StardewValley.Monsters;
#endregion using directive
/// <summary>The public interface for the Core mod API.</summary>
public interface ICoreApi
{
#region status effects
/// <summary>Causes bleeding on the <paramref name="monster"/> for the specified <paramref name="duration"/> and with the specified <paramref name="intensity"/>.</summary>
/// <param name="monster">The <see cref="Monster"/>.</param>
/// <param name="bleeder">The <see cref="Farmer"/> who caused the bleeding.</param>
/// <param name="duration">The duration in milliseconds.</param>
/// <param name="stacks">The number of bleeding stacks.</param>
/// <param name="maxStacks">The max number of allowed stacks.</param>
public void Bleed(Monster monster, Farmer bleeder, int duration = 30000, int stacks = 1, int maxStacks = int.MaxValue);
/// <summary>Removes bleeding from the <paramref name="monster"/>.</summary>
/// <param name="monster">The <see cref="Monster"/>.</param>
public void Unbleed(Monster monster);
/// <summary>Checks whether the <paramref name="monster"/> is bleeding.</summary>
/// <param name="monster">The <see cref="Monster"/>.</param>
/// <returns><see langword="true"/> if the <paramref name="monster"/> has non-zero bleeding stacks, otherwise <see langword="false"/>.</returns>
public bool IsBleeding(Monster monster);
/// <summary>Blinds the <paramref name="monster"/> for the specified <paramref name="duration"/>.</summary>
/// <param name="monster">The <see cref="Monster"/>.</param>
/// <param name="duration">The duration in milliseconds.</param>
public void Blind(Monster monster, int duration = 5000);
/// <summary>Removes blind from <paramref name="monster"/>.</summary>
/// <param name="monster">The <see cref="Monster"/>.</param>
public void Unblind(Monster monster);
/// <summary>Checks whether the <paramref name="monster"/> is blinded.</summary>
/// <param name="monster">The <see cref="Monster"/>.</param>
/// <returns><see langword="true"/> if the <paramref name="monster"/> has non-zero blind timer, otherwise <see langword="false"/>.</returns>
public bool IsBlinded(Monster monster);
/// <summary>Burns the <paramref name="monster"/> for the specified <paramref name="duration"/>.</summary>
/// <param name="monster">The <see cref="Monster"/>.</param>
/// <param name="burner">The <see cref="Farmer"/> who inflicted the burn.</param>
/// <param name="duration">The duration in milliseconds.</param>
public void Burn(Monster monster, Farmer burner, int duration = 15000);
/// <summary>Removes burn from <paramref name="monster"/>.</summary>
/// <param name="monster">The <see cref="Monster"/>.</param>
public void Unburn(Monster monster);
/// <summary>Checks whether the <paramref name="monster"/> is burning.</summary>
/// <param name="monster">The <see cref="Monster"/>.</param>
/// <returns><see langword="true"/> if the <paramref name="monster"/> has non-zero burn timer, otherwise <see langword="false"/>.</returns>
public bool IsBurning(Monster monster);
/// <summary>Chills the <paramref name="monster"/> for the specified <paramref name="duration"/>.</summary>
/// <param name="monster">The <see cref="Monster"/>.</param>
/// <param name="duration">The duration in milliseconds.</param>
/// <param name="intensity">The intensity of the slow effect.</param>
/// <param name="freezeThreshold">The required slow intensity total for the target to be considered frozen.</param>
/// <param name="playSoundEffect">Whether to play the chill sound effect.</param>
public void Chill(Monster monster, int duration = 5000, float intensity = 0.5f, float freezeThreshold = 1f, bool playSoundEffect = true);
/// <summary>Removes chilled status from the <paramref name="monster"/>.</summary>
/// <param name="monster">The <see cref="Monster"/>.</param>
public void Unchill(Monster monster);
/// <summary>Checks whether the <paramref name="monster"/> is chilled.</summary>
/// <param name="monster">The <see cref="Monster"/>.</param>
/// <returns>The <paramref name="monster"/>'s chilled flag.</returns>
public bool IsChilled(Monster monster);
/// <summary>Fears the <paramref name="monster"/> for the specified <paramref name="duration"/>.</summary>
/// <param name="monster">The <see cref="Monster"/>.</param>
/// <param name="duration">The duration in milliseconds.</param>
public void Fear(Monster monster, int duration);
/// <summary>Removes fear from <paramref name="monster"/>.</summary>
/// <param name="monster">The <see cref="Monster"/>.</param>
public void Unfear(Monster monster);
/// <summary>Checks whether the <paramref name="monster"/> is feared.</summary>
/// <param name="monster">The <see cref="Monster"/>.</param>
/// <returns><see langword="true"/> if the <paramref name="monster"/> has non-zero fear timer, otherwise <see langword="false"/>.</returns>
public bool IsFeared(Monster monster);
/// <summary>Freezes the <paramref name="monster"/> for the specified <paramref name="duration"/>.</summary>
/// <param name="monster">The <see cref="Monster"/>.</param>
/// <param name="duration">The duration in milliseconds.</param>
public void Freeze(Monster monster, int duration = 30000);
/// <summary>Removes frozen status from the <paramref name="monster"/>.</summary>
/// <param name="monster">The <see cref="Monster"/>.</param>
public void Defrost(Monster monster);
/// <summary>Checks whether the <paramref name="monster"/> is frozen.</summary>
/// <param name="monster">The <see cref="Monster"/>.</param>
/// <returns><see langword="true"/> if the <paramref name="monster"/> has non-zero freeze stacks, otherwise <see langword="false"/>.</returns>
public bool IsFrozen(Monster monster);
/// <summary>Poisons the <paramref name="monster"/> for the specified <paramref name="duration"/> and with the specified <paramref name="intensity"/>.</summary>
/// <param name="monster">The <see cref="Monster"/>.</param>
/// <param name="poisoner">The <see cref="Farmer"/> who inflicted the poison.</param>
/// <param name="duration">The duration in milliseconds.</param>
/// <param name="stacks">The number of poison stacks.</param>
/// <param name="maxStacks">This number of stacks will immediately kill the monster.</param>
public void Poison(Monster monster, Farmer poisoner, int duration = 15000, int stacks = 1, int maxStacks = int.MaxValue);
/// <summary>Removes poison from <paramref name="monster"/>.</summary>
/// <param name="monster">The <see cref="Monster"/>.</param>
public void Detox(Monster monster);
/// <summary>Checks whether the <paramref name="monster"/> is poisoned.</summary>
/// <param name="monster">The <see cref="Monster"/>.</param>
/// <returns><see langword="true"/> if the <paramref name="monster"/> has non-zero poison stacks, otherwise <see langword="false"/>.</returns>
public bool IsPoisoned(Monster monster);
/// <summary>Slows the <paramref name="monster"/> for the specified <paramref name="duration"/> and with the specified <paramref name="intensity"/>.</summary>
/// <param name="monster">The <see cref="Monster"/>.</param>
/// <param name="duration">The duration in milliseconds.</param>
/// <param name="intensity">The intensity of the slow effect; i.e. the percentage by which the target will be slowed.</param>
public void Slow(Monster monster, int duration, float intensity = 0.5f);
/// <summary>Removes slow from <paramref name="monster"/>.</summary>
/// <param name="monster">The <see cref="Monster"/>.</param>
public void Unslow(Monster monster);
/// <summary>Checks whether the <paramref name="monster"/> is slowed.</summary>
/// <param name="monster">The <see cref="Monster"/>.</param>
/// <returns><see langword="true"/> if the <paramref name="monster"/> has non-zero slow timer, otherwise <see langword="false"/>.</returns>
public bool IsSlowed(Monster monster);
/// <summary>Stuns the <paramref name="monster"/> for the specified <paramref name="duration"/>.</summary>
/// <param name="monster">The <see cref="Monster"/>.</param>
/// <param name="duration">The duration in milliseconds.</param>
public void Stun(Monster monster, int duration);
/// <summary>Checks whether the <paramref name="monster"/> is stunned.</summary>
/// <param name="monster">The <see cref="Monster"/>.</param>
/// <returns><see langword="true"/> if the <paramref name="monster"/> has non-zero stun timer, otherwise <see langword="false"/>.</returns>
public bool IsStunned(Monster monster);
#endregion status effects
}