rewrote arbalest drop code to mimic spear of destiny
This commit is contained in:
1 parent
649fa73d8e
commit
b995fbd16b
1 file changed
+8
-5
@@ -1489,7 +1489,7 @@ namespace CalamityMod.NPCs
|
||||
float spearDropRate = Main.expertMode ? 0.05f : 0.04f;
|
||||
float spearRoll = Main.rand.NextFloat();
|
||||
bool spearOfDestiny = spearRoll <= 0.005f; // Exact 1/200 chance for rare regardless of difficulty
|
||||
if(spearRoll < spearDropRate) // 1/25 (1/20 EX) chance of getting Ichor Spear OR Spear of Destiny replacing it
|
||||
if (spearRoll < spearDropRate) // 1/25 (1/20 EX) chance of getting Ichor Spear OR Spear of Destiny replacing it
|
||||
{
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<IchorSpear>(), !spearOfDestiny);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<SpearofDestiny>(), spearOfDestiny);
|
||||
@@ -1544,11 +1544,14 @@ namespace CalamityMod.NPCs
|
||||
break;
|
||||
|
||||
case NPCID.PirateCrossbower:
|
||||
int crossbowDropRate = Main.expertMode ? 20 : 25;
|
||||
float crossbowDropRate = Main.expertMode ? 0.05f : 0.04f;
|
||||
float arbalestRoll = Main.rand.NextFloat();
|
||||
bool arbalest = arbalestRoll < 0.005f; // Exact 1/200 chance for rare regardless of difficulty
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<RaidersGlory>(), !arbalest, crossbowDropRate, 1, 1);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<Arbalest>(), arbalest, crossbowDropRate, 1, 1);
|
||||
bool arbalest = arbalestRoll <= 0.005f; // Exact 1/200 chance for rare regardless of difficulty
|
||||
if (arbalestRoll < crossbowDropRate) // 1/25 (1/20 EX) chance of getting Raider's Glory OR Arbalest replacing it
|
||||
{
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<RaidersGlory>(), !arbalest);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<Arbalest>(), arbalest);
|
||||
}
|
||||
break;
|
||||
|
||||
case NPCID.GoblinSummoner:
|
||||
|
||||
Reference in new issue
Block a user