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

◆ CanDrop()

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

Implements Terraria.GameContent.ItemDropRules.IItemDropRuleCondition.

Definition at line 56 of file Conditions.cs.

57 {
58 if (!Main.snowMoon)
59 {
60 return false;
61 }
62 int num = NPC.waveNumber;
63 if (Main.expertMode)
64 {
65 num += 5;
66 }
67 int num2 = (int)((double)(28 - num) / 2.5);
68 if (Main.expertMode)
69 {
70 num2 -= 2;
71 }
72 if (num2 < 1)
73 {
74 num2 = 1;
75 }
76 return info.player.RollLuck(num2) == 0;
77 }

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