Terraria v1.4.4.9
Terraria 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 127 of file Conditions.cs.

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

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