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

◆ CanDrop()

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

Implements Terraria.GameContent.ItemDropRules.IItemDropRuleCondition.

Definition at line 92 of file Conditions.cs.

93 {
94 if (!Main.pumpkinMoon)
95 {
96 return false;
97 }
98 int num = NPC.waveNumber;
99 if (Main.expertMode)
100 {
101 num += 5;
102 }
103 int num2 = (int)((double)(24 - num) / 2.5);
104 if (Main.expertMode)
105 {
106 num2--;
107 }
108 if (num2 < 1)
109 {
110 num2 = 1;
111 }
112 return info.player.RollLuck(num2) == 0;
113 }

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