TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ CanDrop()

bool Terraria.GameContent.ItemDropRules.Conditions.FrostMoonDropGateForTrophies.CanDrop ( DropAttemptInfo info)
inline

Implements Terraria.GameContent.ItemDropRules.IItemDropRuleCondition.

Definition at line 128 of file Conditions.cs.

129 {
130 if (!Main.snowMoon)
131 {
132 return false;
133 }
134 int waveNumber = NPC.waveNumber;
135 if (NPC.waveNumber < 15)
136 {
137 return false;
138 }
139 int num = 4;
140 if (waveNumber == 16)
141 {
142 num = 4;
143 }
144 if (waveNumber == 17)
145 {
146 num = 3;
147 }
148 if (waveNumber == 18)
149 {
150 num = 3;
151 }
152 if (waveNumber == 19)
153 {
154 num = 2;
155 }
156 if (waveNumber >= 20)
157 {
158 num = 2;
159 }
160 if (Main.expertMode && Main.rand.Next(3) == 0)
161 {
162 num--;
163 }
164 return info.rng.Next(num) == 0;
165 }

References Terraria.Main.expertMode, Terraria.Main.rand, Terraria.Main.snowMoon, and Terraria.NPC.waveNumber.