abyssal/sulphuric treasure now drop more loot to compensate for only droppingo ne now
This commit is contained in:
1 parent
9ef8473a9c
commit
fa0224ffed
3 files changed
+208
-200
No files matched your search
@@ -26,116 +26,120 @@ namespace CalamityMod.Items.TreasureBags
|
||||
|
||||
public override void RightClick(Player player)
|
||||
{
|
||||
if (Main.rand.NextBool(10))
|
||||
// Loops 4 times to compensate for dropping only one treasure now
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
int potionType = Utils.SelectRandom(WorldGen.genRand, new int[]
|
||||
if (Main.rand.NextBool(10))
|
||||
{
|
||||
ItemID.SpelunkerPotion,
|
||||
ItemID.MagicPowerPotion,
|
||||
ItemID.ShinePotion,
|
||||
ItemID.WaterWalkingPotion,
|
||||
ItemID.ObsidianSkinPotion,
|
||||
ItemID.WaterWalkingPotion,
|
||||
ItemID.GravitationPotion,
|
||||
ItemID.RegenerationPotion,
|
||||
ModContent.ItemType<TriumphPotion>(),
|
||||
ModContent.ItemType<AnechoicCoating>(),
|
||||
ItemID.GillsPotion,
|
||||
ItemID.EndurancePotion,
|
||||
ItemID.HeartreachPotion,
|
||||
ItemID.FlipperPotion,
|
||||
ItemID.LifeforcePotion,
|
||||
ItemID.InfernoPotion
|
||||
});
|
||||
DropHelper.DropItem(player, potionType);
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (Main.rand.Next(10))
|
||||
int potionType = Utils.SelectRandom(WorldGen.genRand, new int[]
|
||||
{
|
||||
ItemID.SpelunkerPotion,
|
||||
ItemID.MagicPowerPotion,
|
||||
ItemID.ShinePotion,
|
||||
ItemID.WaterWalkingPotion,
|
||||
ItemID.ObsidianSkinPotion,
|
||||
ItemID.WaterWalkingPotion,
|
||||
ItemID.GravitationPotion,
|
||||
ItemID.RegenerationPotion,
|
||||
ModContent.ItemType<TriumphPotion>(),
|
||||
ModContent.ItemType<AnechoicCoating>(),
|
||||
ItemID.GillsPotion,
|
||||
ItemID.EndurancePotion,
|
||||
ItemID.HeartreachPotion,
|
||||
ItemID.FlipperPotion,
|
||||
ItemID.LifeforcePotion,
|
||||
ItemID.InfernoPotion
|
||||
});
|
||||
DropHelper.DropItem(player, potionType);
|
||||
}
|
||||
else
|
||||
{
|
||||
case 0:
|
||||
int sglowstickAmt = Main.rand.Next(2, 6);
|
||||
if (Main.expertMode)
|
||||
{
|
||||
sglowstickAmt += Main.rand.Next(1, 7);
|
||||
}
|
||||
DropHelper.DropItem(player, ItemID.SpelunkerGlowstick, sglowstickAmt);
|
||||
break;
|
||||
case 1:
|
||||
DropHelper.DropItem(player, ItemID.HellfireArrow, 10, 20);
|
||||
break;
|
||||
case 2:
|
||||
DropHelper.DropItem(player, ModContent.ItemType<SunkenStew>());
|
||||
break;
|
||||
case 3:
|
||||
DropHelper.DropItem(player, ItemID.StickyDynamite);
|
||||
break;
|
||||
default:
|
||||
int coinCount = 5000 + Main.rand.Next(-100, 101);
|
||||
while (coinCount > 0)
|
||||
{
|
||||
if (coinCount > 1000000)
|
||||
switch (Main.rand.Next(10))
|
||||
{
|
||||
case 0:
|
||||
int sglowstickAmt = Main.rand.Next(2, 6);
|
||||
if (Main.expertMode)
|
||||
{
|
||||
int ptCoinAmt = coinCount / 1000000;
|
||||
if (ptCoinAmt > 50 && Main.rand.NextBool(2))
|
||||
{
|
||||
ptCoinAmt /= Main.rand.Next(3) + 1;
|
||||
}
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
ptCoinAmt /= Main.rand.Next(3) + 1;
|
||||
}
|
||||
coinCount -= 1000000 * ptCoinAmt;
|
||||
DropHelper.DropItem(player, ItemID.PlatinumCoin, ptCoinAmt);
|
||||
sglowstickAmt += Main.rand.Next(1, 7);
|
||||
}
|
||||
else if (coinCount > 10000)
|
||||
DropHelper.DropItem(player, ItemID.SpelunkerGlowstick, sglowstickAmt);
|
||||
break;
|
||||
case 1:
|
||||
DropHelper.DropItem(player, ItemID.HellfireArrow, 10, 20);
|
||||
break;
|
||||
case 2:
|
||||
DropHelper.DropItem(player, ModContent.ItemType<SunkenStew>());
|
||||
break;
|
||||
case 3:
|
||||
DropHelper.DropItem(player, ItemID.StickyDynamite);
|
||||
break;
|
||||
default:
|
||||
int coinCount = 5000 + Main.rand.Next(-100, 101);
|
||||
while (coinCount > 0)
|
||||
{
|
||||
int auCoinAmt = coinCount / 10000;
|
||||
if (auCoinAmt > 50 && Main.rand.NextBool(2))
|
||||
if (coinCount > 1000000)
|
||||
{
|
||||
auCoinAmt /= Main.rand.Next(3) + 1;
|
||||
int ptCoinAmt = coinCount / 1000000;
|
||||
if (ptCoinAmt > 50 && Main.rand.NextBool(2))
|
||||
{
|
||||
ptCoinAmt /= Main.rand.Next(3) + 1;
|
||||
}
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
ptCoinAmt /= Main.rand.Next(3) + 1;
|
||||
}
|
||||
coinCount -= 1000000 * ptCoinAmt;
|
||||
DropHelper.DropItem(player, ItemID.PlatinumCoin, ptCoinAmt);
|
||||
}
|
||||
if (Main.rand.NextBool(2))
|
||||
else if (coinCount > 10000)
|
||||
{
|
||||
auCoinAmt /= Main.rand.Next(3) + 1;
|
||||
int auCoinAmt = coinCount / 10000;
|
||||
if (auCoinAmt > 50 && Main.rand.NextBool(2))
|
||||
{
|
||||
auCoinAmt /= Main.rand.Next(3) + 1;
|
||||
}
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
auCoinAmt /= Main.rand.Next(3) + 1;
|
||||
}
|
||||
coinCount -= 10000 * auCoinAmt;
|
||||
DropHelper.DropItem(player, ItemID.GoldCoin, auCoinAmt);
|
||||
}
|
||||
else if (coinCount > 100)
|
||||
{
|
||||
int agCoinAmt = coinCount / 100;
|
||||
if (agCoinAmt > 50 && Main.rand.NextBool(2))
|
||||
{
|
||||
agCoinAmt /= Main.rand.Next(3) + 1;
|
||||
}
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
agCoinAmt /= Main.rand.Next(3) + 1;
|
||||
}
|
||||
coinCount -= 100 * agCoinAmt;
|
||||
DropHelper.DropItem(player, ItemID.SilverCoin, agCoinAmt);
|
||||
}
|
||||
else
|
||||
{
|
||||
int cuCoinAmt = coinCount;
|
||||
if (cuCoinAmt > 50 && Main.rand.NextBool(2))
|
||||
{
|
||||
cuCoinAmt /= Main.rand.Next(3) + 1;
|
||||
}
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
cuCoinAmt /= Main.rand.Next(4) + 1;
|
||||
}
|
||||
if (cuCoinAmt < 1)
|
||||
{
|
||||
cuCoinAmt = 1;
|
||||
}
|
||||
coinCount -= cuCoinAmt;
|
||||
DropHelper.DropItem(player, ItemID.CopperCoin, cuCoinAmt);
|
||||
}
|
||||
coinCount -= 10000 * auCoinAmt;
|
||||
DropHelper.DropItem(player, ItemID.GoldCoin, auCoinAmt);
|
||||
}
|
||||
else if (coinCount > 100)
|
||||
{
|
||||
int agCoinAmt = coinCount / 100;
|
||||
if (agCoinAmt > 50 && Main.rand.NextBool(2))
|
||||
{
|
||||
agCoinAmt /= Main.rand.Next(3) + 1;
|
||||
}
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
agCoinAmt /= Main.rand.Next(3) + 1;
|
||||
}
|
||||
coinCount -= 100 * agCoinAmt;
|
||||
DropHelper.DropItem(player, ItemID.SilverCoin, agCoinAmt);
|
||||
}
|
||||
else
|
||||
{
|
||||
int cuCoinAmt = coinCount;
|
||||
if (cuCoinAmt > 50 && Main.rand.NextBool(2))
|
||||
{
|
||||
cuCoinAmt /= Main.rand.Next(3) + 1;
|
||||
}
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
cuCoinAmt /= Main.rand.Next(4) + 1;
|
||||
}
|
||||
if (cuCoinAmt < 1)
|
||||
{
|
||||
cuCoinAmt = 1;
|
||||
}
|
||||
coinCount -= cuCoinAmt;
|
||||
DropHelper.DropItem(player, ItemID.CopperCoin, cuCoinAmt);
|
||||
}
|
||||
}
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,116 +26,120 @@ namespace CalamityMod.Items.TreasureBags
|
||||
|
||||
public override void RightClick(Player player)
|
||||
{
|
||||
if (Main.rand.NextBool(15))
|
||||
// Loops 4 times to compensate for dropping only one treasure now
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
int potionType = Utils.SelectRandom(WorldGen.genRand, new int[]
|
||||
if (Main.rand.NextBool(15))
|
||||
{
|
||||
ItemID.SpelunkerPotion,
|
||||
ItemID.MagicPowerPotion,
|
||||
ItemID.ShinePotion,
|
||||
ItemID.WaterWalkingPotion,
|
||||
ItemID.ObsidianSkinPotion,
|
||||
ItemID.WaterWalkingPotion,
|
||||
ItemID.GravitationPotion,
|
||||
ItemID.RegenerationPotion,
|
||||
ModContent.ItemType<TriumphPotion>(),
|
||||
ModContent.ItemType<AnechoicCoating>(),
|
||||
ItemID.GillsPotion,
|
||||
ItemID.EndurancePotion,
|
||||
ItemID.HeartreachPotion,
|
||||
ItemID.FlipperPotion,
|
||||
ItemID.LifeforcePotion,
|
||||
ItemID.InfernoPotion
|
||||
});
|
||||
DropHelper.DropItem(player, potionType);
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (Main.rand.Next(10))
|
||||
int potionType = Utils.SelectRandom(WorldGen.genRand, new int[]
|
||||
{
|
||||
ItemID.SpelunkerPotion,
|
||||
ItemID.MagicPowerPotion,
|
||||
ItemID.ShinePotion,
|
||||
ItemID.WaterWalkingPotion,
|
||||
ItemID.ObsidianSkinPotion,
|
||||
ItemID.WaterWalkingPotion,
|
||||
ItemID.GravitationPotion,
|
||||
ItemID.RegenerationPotion,
|
||||
ModContent.ItemType<TriumphPotion>(),
|
||||
ModContent.ItemType<AnechoicCoating>(),
|
||||
ItemID.GillsPotion,
|
||||
ItemID.EndurancePotion,
|
||||
ItemID.HeartreachPotion,
|
||||
ItemID.FlipperPotion,
|
||||
ItemID.LifeforcePotion,
|
||||
ItemID.InfernoPotion
|
||||
});
|
||||
DropHelper.DropItem(player, potionType);
|
||||
}
|
||||
else
|
||||
{
|
||||
case 0:
|
||||
int glowstickAmt = Main.rand.Next(2, 6);
|
||||
if (Main.expertMode)
|
||||
{
|
||||
glowstickAmt += Main.rand.Next(1, 7);
|
||||
}
|
||||
DropHelper.DropItem(player, ItemID.Glowstick, glowstickAmt);
|
||||
break;
|
||||
case 1:
|
||||
DropHelper.DropItem(player, ItemID.JestersArrow, 10, 20);
|
||||
break;
|
||||
case 2:
|
||||
DropHelper.DropItem(player, ItemID.HealingPotion);
|
||||
break;
|
||||
case 3:
|
||||
DropHelper.DropItem(player, ItemID.Bomb, 5, 8);
|
||||
break;
|
||||
default:
|
||||
int coinCount = 5000 + Main.rand.Next(-100, 101);
|
||||
while (coinCount > 0)
|
||||
{
|
||||
if (coinCount > 1000000)
|
||||
switch (Main.rand.Next(10))
|
||||
{
|
||||
case 0:
|
||||
int glowstickAmt = Main.rand.Next(2, 6);
|
||||
if (Main.expertMode)
|
||||
{
|
||||
int ptCoinAmt = coinCount / 1000000;
|
||||
if (ptCoinAmt > 50 && Main.rand.NextBool(2))
|
||||
{
|
||||
ptCoinAmt /= Main.rand.Next(3) + 1;
|
||||
}
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
ptCoinAmt /= Main.rand.Next(3) + 1;
|
||||
}
|
||||
coinCount -= 1000000 * ptCoinAmt;
|
||||
DropHelper.DropItem(player, ItemID.PlatinumCoin, ptCoinAmt);
|
||||
glowstickAmt += Main.rand.Next(1, 7);
|
||||
}
|
||||
else if (coinCount > 10000)
|
||||
DropHelper.DropItem(player, ItemID.Glowstick, glowstickAmt);
|
||||
break;
|
||||
case 1:
|
||||
DropHelper.DropItem(player, ItemID.JestersArrow, 10, 20);
|
||||
break;
|
||||
case 2:
|
||||
DropHelper.DropItem(player, ItemID.HealingPotion);
|
||||
break;
|
||||
case 3:
|
||||
DropHelper.DropItem(player, ItemID.Bomb, 5, 8);
|
||||
break;
|
||||
default:
|
||||
int coinCount = 5000 + Main.rand.Next(-100, 101);
|
||||
while (coinCount > 0)
|
||||
{
|
||||
int auCoinAmt = coinCount / 10000;
|
||||
if (auCoinAmt > 50 && Main.rand.NextBool(2))
|
||||
if (coinCount > 1000000)
|
||||
{
|
||||
auCoinAmt /= Main.rand.Next(3) + 1;
|
||||
int ptCoinAmt = coinCount / 1000000;
|
||||
if (ptCoinAmt > 50 && Main.rand.NextBool(2))
|
||||
{
|
||||
ptCoinAmt /= Main.rand.Next(3) + 1;
|
||||
}
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
ptCoinAmt /= Main.rand.Next(3) + 1;
|
||||
}
|
||||
coinCount -= 1000000 * ptCoinAmt;
|
||||
DropHelper.DropItem(player, ItemID.PlatinumCoin, ptCoinAmt);
|
||||
}
|
||||
if (Main.rand.NextBool(2))
|
||||
else if (coinCount > 10000)
|
||||
{
|
||||
auCoinAmt /= Main.rand.Next(3) + 1;
|
||||
int auCoinAmt = coinCount / 10000;
|
||||
if (auCoinAmt > 50 && Main.rand.NextBool(2))
|
||||
{
|
||||
auCoinAmt /= Main.rand.Next(3) + 1;
|
||||
}
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
auCoinAmt /= Main.rand.Next(3) + 1;
|
||||
}
|
||||
coinCount -= 10000 * auCoinAmt;
|
||||
DropHelper.DropItem(player, ItemID.GoldCoin, auCoinAmt);
|
||||
}
|
||||
else if (coinCount > 100)
|
||||
{
|
||||
int agCoinAmt = coinCount / 100;
|
||||
if (agCoinAmt > 50 && Main.rand.NextBool(2))
|
||||
{
|
||||
agCoinAmt /= Main.rand.Next(3) + 1;
|
||||
}
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
agCoinAmt /= Main.rand.Next(3) + 1;
|
||||
}
|
||||
coinCount -= 100 * agCoinAmt;
|
||||
DropHelper.DropItem(player, ItemID.SilverCoin, agCoinAmt);
|
||||
}
|
||||
else
|
||||
{
|
||||
int cuCoinAmt = coinCount;
|
||||
if (cuCoinAmt > 50 && Main.rand.NextBool(2))
|
||||
{
|
||||
cuCoinAmt /= Main.rand.Next(3) + 1;
|
||||
}
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
cuCoinAmt /= Main.rand.Next(4) + 1;
|
||||
}
|
||||
if (cuCoinAmt < 1)
|
||||
{
|
||||
cuCoinAmt = 1;
|
||||
}
|
||||
coinCount -= cuCoinAmt;
|
||||
DropHelper.DropItem(player, ItemID.CopperCoin, cuCoinAmt);
|
||||
}
|
||||
coinCount -= 10000 * auCoinAmt;
|
||||
DropHelper.DropItem(player, ItemID.GoldCoin, auCoinAmt);
|
||||
}
|
||||
else if (coinCount > 100)
|
||||
{
|
||||
int agCoinAmt = coinCount / 100;
|
||||
if (agCoinAmt > 50 && Main.rand.NextBool(2))
|
||||
{
|
||||
agCoinAmt /= Main.rand.Next(3) + 1;
|
||||
}
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
agCoinAmt /= Main.rand.Next(3) + 1;
|
||||
}
|
||||
coinCount -= 100 * agCoinAmt;
|
||||
DropHelper.DropItem(player, ItemID.SilverCoin, agCoinAmt);
|
||||
}
|
||||
else
|
||||
{
|
||||
int cuCoinAmt = coinCount;
|
||||
if (cuCoinAmt > 50 && Main.rand.NextBool(2))
|
||||
{
|
||||
cuCoinAmt /= Main.rand.Next(3) + 1;
|
||||
}
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
cuCoinAmt /= Main.rand.Next(4) + 1;
|
||||
}
|
||||
if (cuCoinAmt < 1)
|
||||
{
|
||||
cuCoinAmt = 1;
|
||||
}
|
||||
coinCount -= cuCoinAmt;
|
||||
DropHelper.DropItem(player, ItemID.CopperCoin, cuCoinAmt);
|
||||
}
|
||||
}
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
{
|
||||
if (projectile.owner == Main.myPlayer)
|
||||
{
|
||||
Main.PlaySound(SoundID.Shatter, (int) projectile.position.X, (int) projectile.position.Y, 1, 1f, 0.0f);
|
||||
Main.PlaySound(SoundID.Shatter, (int)projectile.position.X, (int)projectile.position.Y, 1, 1f, 0f);
|
||||
for (int index = 0; index < 5; ++index)
|
||||
Dust.NewDust(projectile.position, projectile.width, projectile.height, 13, 0f, 0f, 0, new Color(), 1f);
|
||||
for (int index1 = 0; index1 < 30; ++index1)
|
||||
@@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
dust.velocity.X *= 1.5f;
|
||||
dust.velocity *= 3f;
|
||||
}
|
||||
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType<WaterConvertor>(), 0, 0f, projectile.owner, 4f);
|
||||
Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType<WaterConvertor>(), 0, 0f, projectile.owner, 4f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user