1 - Buffed Fulguration Halberd, Gladiator's Locket, Anarchy Blade, Basher, Corrupted Crusher Blade, Crimson Crusher Blade, Depth Crusher, Vulcanite Lance, Feralthorn Claymore, Hellkite, Majestic Guard, Marnite Spear, Mycelial Claws, Old Lord Oathsword, Omniblade and Profaned Sword.
2 - Nerfed Pumpler exploding pumpkin damage. 3 - Nerfed most vanilla prehardmode desert enemies pre-Desert Scourge. 4 - Added some block drop code so that two instances of the same item cannot be dropped. 5 - Unloaded some lists that were previously forgotten about and added more items to said lists.
This commit is contained in:
1 parent
74280788c2
commit
8685cfc584
28 files changed
+573
-530
No files matched your search
@@ -44,6 +44,7 @@ using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
using CalamityMod.Projectiles.Enemy;
|
||||
using CalamityMod.Projectiles.Environment;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using CalamityMod.Projectiles.Melee.Spears;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
@@ -4762,7 +4763,10 @@ namespace CalamityMod.CalPlayer
|
||||
break;
|
||||
}
|
||||
|
||||
CalamityPlayerOnHit.ItemLifesteal(player, mod, target, item, damage);
|
||||
if (item.type == ModContent.ItemType<FulgurationHalberd>())
|
||||
target.damage = (int)(target.defDamage * 0.9);
|
||||
|
||||
CalamityPlayerOnHit.ItemLifesteal(player, mod, target, item, damage);
|
||||
CalamityPlayerOnHit.ItemOnHit(player, mod, item, damage, target.Center, crit, (target.damage > 5 || target.boss) && !target.SpawnedFromStatue);
|
||||
CalamityPlayerOnHit.NPCDebuffs(player, mod, target, item.melee, item.ranged, item.magic, item.summon, item.Calamity().rogue, false);
|
||||
|
||||
@@ -4891,21 +4895,19 @@ namespace CalamityMod.CalPlayer
|
||||
break;
|
||||
}
|
||||
|
||||
if (ProjectileID.Sets.StardustDragon[proj.type])
|
||||
{
|
||||
if (proj.type == ModContent.ProjectileType<FulgurationHalberdProj>())
|
||||
target.damage = (int)(target.defDamage * 0.9);
|
||||
|
||||
if (ProjectileID.Sets.StardustDragon[proj.type])
|
||||
target.immune[proj.owner] = 10;
|
||||
}
|
||||
|
||||
if (!proj.npcProj && !proj.trap && proj.friendly)
|
||||
{
|
||||
if ((plaguebringerCarapace || uberBees) && CalamityLists.friendlyBeeList.Contains(proj.type))
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<Plague>(), 360);
|
||||
}
|
||||
|
||||
if (proj.type == ProjectileID.IchorArrow && player.ActiveItem().type == ModContent.ItemType<RaidersGlory>())
|
||||
{
|
||||
target.AddBuff(BuffID.Midas, 300, false);
|
||||
}
|
||||
|
||||
CalamityPlayerOnHit.ProjLifesteal(player, mod, target, proj, damage, crit);
|
||||
CalamityPlayerOnHit.ProjOnHit(player, mod, proj, target.Center, crit, (target.damage > 5 || target.boss) && !target.SpawnedFromStatue);
|
||||
@@ -4914,6 +4916,7 @@ namespace CalamityMod.CalPlayer
|
||||
// Shattered Community tracks all damage dealt with Rage Mode (ignoring dummies).
|
||||
if (target.type == NPCID.TargetDummy || target.type == ModContent.NPCType<SuperDummyNPC>())
|
||||
return;
|
||||
|
||||
if (rageModeActive && shatteredCommunity)
|
||||
ShatteredCommunity.AccumulateRageDamage(player, this, damage);
|
||||
}
|
||||
|
||||
+24
-1
@@ -1062,7 +1062,13 @@ namespace CalamityMod
|
||||
|
||||
useTurnList = new List<int>()
|
||||
{
|
||||
ItemID.IronBroadsword,
|
||||
ItemID.WoodenSword,
|
||||
ItemID.RichMahoganySword,
|
||||
ItemID.BorealWoodSword,
|
||||
ItemID.EbonwoodSword,
|
||||
ItemID.ShadewoodSword,
|
||||
ItemID.CopperBroadsword,
|
||||
ItemID.IronBroadsword,
|
||||
ItemID.LeadBroadsword,
|
||||
ItemID.SilverBroadsword,
|
||||
ItemID.TungstenBroadsword,
|
||||
@@ -1336,6 +1342,13 @@ namespace CalamityMod
|
||||
|
||||
weaponAutoreuseList = new List<int>()
|
||||
{
|
||||
ItemID.WoodenSword,
|
||||
ItemID.RichMahoganySword,
|
||||
ItemID.BorealWoodSword,
|
||||
ItemID.EbonwoodSword,
|
||||
ItemID.ShadewoodSword,
|
||||
ItemID.CopperShortsword,
|
||||
ItemID.CopperBroadsword,
|
||||
ItemID.IronShortsword,
|
||||
ItemID.IronBroadsword,
|
||||
ItemID.LeadShortsword,
|
||||
@@ -1348,15 +1361,18 @@ namespace CalamityMod
|
||||
ItemID.PlatinumBroadsword,
|
||||
ItemID.GoldShortsword,
|
||||
ItemID.GoldBroadsword,
|
||||
ItemID.CactusSword,
|
||||
ItemID.ZombieArm,
|
||||
ItemID.CandyCaneSword,
|
||||
ItemID.BoneSword,
|
||||
ItemID.LightsBane,
|
||||
ItemID.BloodButcherer,
|
||||
ItemID.DyeTradersScimitar,
|
||||
ItemID.FieryGreatsword,
|
||||
ItemID.NightsEdge,
|
||||
ItemID.TrueNightsEdge,
|
||||
ItemID.TrueExcalibur,
|
||||
ItemID.BreakerBlade,
|
||||
ItemID.PhoenixBlaster,
|
||||
ItemID.VenusMagnum,
|
||||
ItemID.MagicDagger,
|
||||
@@ -2525,13 +2541,20 @@ namespace CalamityMod
|
||||
iceWeaponList = null;
|
||||
natureWeaponList = null;
|
||||
alcoholList = null;
|
||||
useTurnList = null;
|
||||
twentyUseTimeBuffList = null;
|
||||
fiftySizeBuffList = null;
|
||||
quadrupleDamageBuffList = null;
|
||||
tripleDamageBuffList = null;
|
||||
doubleDamageBuffList = null;
|
||||
sixtySixDamageBuffList = null;
|
||||
fiftyDamageBuffList = null;
|
||||
thirtyThreeDamageBuffList = null;
|
||||
twentyFiveDamageBuffList = null;
|
||||
twentyDamageBuffList = null;
|
||||
tenDamageBuffList = null;
|
||||
weaponAutoreuseList = null;
|
||||
spearAutoreuseList = null;
|
||||
tenDamageNerfList = null;
|
||||
quarterDamageNerfList = null;
|
||||
pumpkinMoonBuffList = null;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using CalamityMod.Buffs.Summon;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ID;
|
||||
@@ -28,11 +28,9 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
public override bool CanEquipAccessory(Player player, int slot)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity(); //there might be an upgrade sometime later?
|
||||
if (modPlayer.gladiatorSword)
|
||||
{
|
||||
if (player.Calamity().gladiatorSword)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -43,15 +41,14 @@ namespace CalamityMod.Items.Accessories
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
if (player.FindBuffIndex(ModContent.BuffType<GladiatorSwords>()) == -1)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<GladiatorSwords>(), 3600, true);
|
||||
}
|
||||
int damage = Main.hardMode ? 50 : 20;
|
||||
|
||||
int damage = 30;
|
||||
int swordDmg = (int)(damage * player.AverageDamage());
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<GladiatorSword>()] < 1)
|
||||
{
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<GladiatorSword>(), swordDmg, 6f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<GladiatorSword2>(), swordDmg, 6f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<GladiatorSword>(), swordDmg, 2f, Main.myPlayer);
|
||||
Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<GladiatorSword2>(), swordDmg, 2f, Main.myPlayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,9 +54,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void MeleeEffects(Player player, Rectangle hitbox)
|
||||
{
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, (int)CalamityDusts.Brimstone);
|
||||
}
|
||||
Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, (int)CalamityDusts.Brimstone);
|
||||
}
|
||||
|
||||
// Gains 10% of missing health as base damage.
|
||||
@@ -68,7 +66,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, ModContent.ProjectileType<BrimstoneBoom>(), (int)(item.damage * player.MeleeDamage()), knockback, Main.myPlayer);
|
||||
Projectile.NewProjectile(target.Center, Vector2.Zero, ModContent.ProjectileType<BrimstoneBoom>(), (int)(item.damage * player.MeleeDamage()), knockback, Main.myPlayer);
|
||||
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 300);
|
||||
|
||||
if (player.statLife < (player.statLifeMax2 * 0.5f) && Main.rand.NextBool(5))
|
||||
@@ -85,7 +83,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void OnHitPvp(Player player, Player target, int damage, bool crit)
|
||||
{
|
||||
Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, ModContent.ProjectileType<BrimstoneBoom>(), (int)(item.damage * player.MeleeDamage()), item.knockBack, Main.myPlayer);
|
||||
Projectile.NewProjectile(target.Center, Vector2.Zero, ModContent.ProjectileType<BrimstoneBoom>(), (int)(item.damage * player.MeleeDamage()), item.knockBack, Main.myPlayer);
|
||||
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 300);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
item.width = 40;
|
||||
item.height = 42;
|
||||
item.damage = 24;
|
||||
item.damage = 30;
|
||||
item.scale = 1.5f;
|
||||
item.melee = true;
|
||||
item.useAnimation = item.useTime = 26;
|
||||
@@ -43,7 +43,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 120);
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 300);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 39;
|
||||
item.damage = 42;
|
||||
item.melee = true;
|
||||
item.width = 66;
|
||||
item.height = 80;
|
||||
@@ -42,11 +42,9 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(BuffID.CursedInferno, 120);
|
||||
target.AddBuff(BuffID.CursedInferno, 300);
|
||||
if (target.defense > 0 && crit && !CalamityPlayer.areThereAnyDamnBosses)
|
||||
{
|
||||
target.defense = target.defDefense - 5;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitPvp(Player player, Player target, int damage, bool crit)
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 38;
|
||||
item.damage = 40;
|
||||
item.melee = true;
|
||||
item.width = 70;
|
||||
item.height = 80;
|
||||
@@ -42,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(BuffID.Ichor, 120);
|
||||
target.AddBuff(BuffID.Ichor, 300);
|
||||
if (target.damage > 0 && crit && !CalamityPlayer.areThereAnyDamnBosses)
|
||||
{
|
||||
target.damage = target.defDamage - 5;
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
item.width = 56;
|
||||
item.height = 50;
|
||||
item.damage = 22;
|
||||
item.damage = 36;
|
||||
item.melee = true;
|
||||
item.useAnimation = 22;
|
||||
item.useTime = 22;
|
||||
@@ -60,12 +60,12 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<CrushDepth>(), 180);
|
||||
target.AddBuff(ModContent.BuffType<CrushDepth>(), 300);
|
||||
}
|
||||
|
||||
public override void OnHitPvp(Player player, Player target, int damage, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<CrushDepth>(), 180);
|
||||
target.AddBuff(ModContent.BuffType<CrushDepth>(), 300);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 44;
|
||||
item.damage = 77;
|
||||
item.damage = 130;
|
||||
item.melee = true;
|
||||
item.noMelee = true;
|
||||
item.useTurn = true;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 68;
|
||||
item.damage = 63;
|
||||
item.damage = 80;
|
||||
item.melee = true;
|
||||
item.useAnimation = 13;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
@@ -44,35 +44,27 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void MeleeEffects(Player player, Rectangle hitbox)
|
||||
{
|
||||
if (Main.rand.NextBool(4))
|
||||
{
|
||||
int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 44);
|
||||
}
|
||||
Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 44);
|
||||
}
|
||||
|
||||
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(BuffID.Venom, 300);
|
||||
|
||||
for (int x = 0; x < 2; x++)
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + 40f + (float)Main.rand.Next(0, 151), player.position.Y + 36f, 0f, -18f, ModContent.ProjectileType<ThornBase>(), (int)(item.damage * player.MeleeDamage() * 0.2), 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
Projectile.NewProjectile(player.position.X + 40f + Main.rand.Next(0, 151), player.position.Y + 36f, 0f, -18f, ModContent.ProjectileType<ThornBase>(), (int)(item.damage * player.MeleeDamage() * 0.4), 0f, Main.myPlayer);
|
||||
for (int x = 0; x < 2; x++)
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X - 40f + (float)Main.rand.Next(-150, 1), player.position.Y + 36f, 0f, -18f, ModContent.ProjectileType<ThornBase>(), (int)(item.damage * player.MeleeDamage() * 0.2), 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
Projectile.NewProjectile(player.position.X - 40f + Main.rand.Next(-150, 1), player.position.Y + 36f, 0f, -18f, ModContent.ProjectileType<ThornBase>(), (int)(item.damage * player.MeleeDamage() * 0.4), 0f, Main.myPlayer);
|
||||
}
|
||||
|
||||
public override void OnHitPvp(Player player, Player target, int damage, bool crit)
|
||||
{
|
||||
target.AddBuff(BuffID.Venom, 300);
|
||||
|
||||
for (int x = 0; x < 2; x++)
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X + 40f + (float)Main.rand.Next(0, 151), player.position.Y + 36f, 0f, -18f, ModContent.ProjectileType<ThornBase>(), (int)(item.damage * player.MeleeDamage() * 0.2), 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
Projectile.NewProjectile(player.position.X + 40f + Main.rand.Next(0, 151), player.position.Y + 36f, 0f, -18f, ModContent.ProjectileType<ThornBase>(), (int)(item.damage * player.MeleeDamage() * 0.4), 0f, Main.myPlayer);
|
||||
for (int x = 0; x < 2; x++)
|
||||
{
|
||||
Projectile.NewProjectile(player.position.X - 40f + (float)Main.rand.Next(-150, 1), player.position.Y + 36f, 0f, -18f, ModContent.ProjectileType<ThornBase>(), (int)(item.damage * player.MeleeDamage() * 0.2), 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
Projectile.NewProjectile(player.position.X - 40f + Main.rand.Next(-150, 1), player.position.Y + 36f, 0f, -18f, ModContent.ProjectileType<ThornBase>(), (int)(item.damage * player.MeleeDamage() * 0.4), 0f, Main.myPlayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Fulguration Halberd");
|
||||
Tooltip.SetDefault("Inflicts burning blood on enemy hits\n" +
|
||||
Tooltip.SetDefault("Inflicts burning blood on enemy hits and decreases enemy contact damage by 10% on hit\n" +
|
||||
"Right click to use as a spear");
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.width = 60;
|
||||
item.height = 64;
|
||||
item.scale = 1.5f;
|
||||
item.damage = 53;
|
||||
item.damage = 120;
|
||||
item.melee = true;
|
||||
item.useAnimation = 22;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 84;
|
||||
item.damage = 100;
|
||||
item.damage = 150;
|
||||
item.melee = true;
|
||||
item.useAnimation = 22;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
@@ -45,9 +45,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void MeleeEffects(Player player, Rectangle hitbox)
|
||||
{
|
||||
if (Main.rand.NextBool(4))
|
||||
{
|
||||
int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 174);
|
||||
}
|
||||
Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 174);
|
||||
}
|
||||
|
||||
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Majestic Guard");
|
||||
Tooltip.SetDefault("Has a chance to lower enemy defense by 10 when striking them\n" +
|
||||
Tooltip.SetDefault("Has a 20% chance to lower enemy defense by 10 when striking them\n" +
|
||||
"If enemy defense is 0 or below your attacks will heal you");
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.width = 98;
|
||||
item.height = 98;
|
||||
item.scale = 1.5f;
|
||||
item.damage = 60;
|
||||
item.damage = 120;
|
||||
item.melee = true;
|
||||
item.useAnimation = 22;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 50;
|
||||
item.damage = 20;
|
||||
item.damage = 26;
|
||||
item.melee = true;
|
||||
item.noMelee = true;
|
||||
item.useTurn = true;
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 22;
|
||||
item.damage = 14;
|
||||
item.damage = 21;
|
||||
item.melee = true;
|
||||
item.useAnimation = 6;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 34;
|
||||
item.damage = 60;
|
||||
item.width = 70;
|
||||
item.height = 70;
|
||||
item.melee = true;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 64;
|
||||
item.damage = 63;
|
||||
item.damage = 95;
|
||||
item.melee = true;
|
||||
item.useAnimation = 10;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
@@ -43,17 +43,13 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (Main.rand.NextBool(5))
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<WhisperingDeath>(), 360);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitPvp(Player player, Player target, int damage, bool crit)
|
||||
{
|
||||
if (Main.rand.NextBool(5))
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<WhisperingDeath>(), 360);
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -37,17 +37,13 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (target.life <= 0)
|
||||
{
|
||||
OnHitEffects(player, target.Center, knockback);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitPvp(Player player, Player target, int damage, bool crit)
|
||||
{
|
||||
if (target.statLife <= 0)
|
||||
{
|
||||
OnHitEffects(player, target.Center, item.knockBack);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnHitEffects(Player player, Vector2 targetPos, float kBack)
|
||||
@@ -55,8 +51,9 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
int boom = Projectile.NewProjectile(targetPos, Vector2.Zero, ModContent.ProjectileType<FuckYou>(), (int)(item.damage * player.MeleeDamage()), kBack, player.whoAmI, 0f, 0.85f + Main.rand.NextFloat() * 1.15f);
|
||||
if (boom.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[boom].Calamity().forceMelee = true;
|
||||
float randomSpeedX = (float)Main.rand.Next(5);
|
||||
float randomSpeedY = (float)Main.rand.Next(3, 7);
|
||||
|
||||
float randomSpeedX = Main.rand.Next(5);
|
||||
float randomSpeedY = Main.rand.Next(3, 7);
|
||||
Projectile.NewProjectile(targetPos.X, targetPos.Y, -randomSpeedX, -randomSpeedY, ModContent.ProjectileType<PhoenixHeal>(), (int)(item.damage * player.MeleeDamage()), kBack, player.whoAmI);
|
||||
Projectile.NewProjectile(targetPos.X, targetPos.Y, randomSpeedX, -randomSpeedY, ModContent.ProjectileType<PhoenixHeal>(), (int)(item.damage * player.MeleeDamage()), kBack, player.whoAmI);
|
||||
}
|
||||
@@ -64,9 +61,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void MeleeEffects(Player player, Rectangle hitbox)
|
||||
{
|
||||
if (Main.rand.NextBool(4))
|
||||
{
|
||||
int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 244);
|
||||
}
|
||||
Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, 244);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 75;
|
||||
item.damage = 100;
|
||||
item.melee = true;
|
||||
item.width = item.height = 52;
|
||||
item.scale = 1.5f;
|
||||
@@ -66,22 +66,20 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120);
|
||||
Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, ModContent.ProjectileType<Brimblast>(), (int)(item.damage * player.MeleeDamage()), knockback, Main.myPlayer);
|
||||
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 300);
|
||||
Projectile.NewProjectile(target.Center, Vector2.Zero, ModContent.ProjectileType<Brimblast>(), (int)(item.damage * player.MeleeDamage()), knockback, Main.myPlayer);
|
||||
}
|
||||
|
||||
public override void OnHitPvp(Player player, Player target, int damage, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120);
|
||||
Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, ModContent.ProjectileType<Brimblast>(), (int)(item.damage * player.MeleeDamage()), item.knockBack, Main.myPlayer);
|
||||
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 300);
|
||||
Projectile.NewProjectile(target.Center, Vector2.Zero, ModContent.ProjectileType<Brimblast>(), (int)(item.damage * player.MeleeDamage()), item.knockBack, Main.myPlayer);
|
||||
}
|
||||
|
||||
public override void MeleeEffects(Player player, Rectangle hitbox)
|
||||
{
|
||||
if (Main.rand.NextBool(4))
|
||||
{
|
||||
Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, (int)CalamityDusts.Brimstone);
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -68,15 +68,15 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
if (player.altFunctionUse == 2)
|
||||
{
|
||||
float SpeedX = speedX + (float)Main.rand.Next(-10, 11) * 0.05f;
|
||||
float SpeedY = speedY + (float)Main.rand.Next(-10, 11) * 0.05f;
|
||||
Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, ProjectileID.JackOLantern, (int)((double)damage * 1.65), knockBack * 4f, player.whoAmI, 0f, 0f);
|
||||
float SpeedX = speedX + Main.rand.Next(-10, 11) * 0.05f;
|
||||
float SpeedY = speedY + Main.rand.Next(-10, 11) * 0.05f;
|
||||
Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, ProjectileID.JackOLantern, (int)(damage * 1.4), knockBack * 4f, player.whoAmI);
|
||||
}
|
||||
else
|
||||
{
|
||||
float SpeedX = speedX + (float)Main.rand.Next(-10, 11) * 0.05f;
|
||||
float SpeedY = speedY + (float)Main.rand.Next(-10, 11) * 0.05f;
|
||||
Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 0f, 0f);
|
||||
float SpeedX = speedX + Main.rand.Next(-10, 11) * 0.05f;
|
||||
float SpeedY = speedY + Main.rand.Next(-10, 11) * 0.05f;
|
||||
Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
+10
-18
@@ -65,9 +65,8 @@ namespace CalamityMod.NPCs
|
||||
float lifeRatio = npc.life / (float)npc.lifeMax;
|
||||
|
||||
// Phases
|
||||
bool phase2 = lifeRatio < 0.8f;
|
||||
bool phase3 = lifeRatio < 0.6f;
|
||||
bool phase4 = lifeRatio < 0.4f;
|
||||
bool phase2 = lifeRatio < 0.75f;
|
||||
bool phase3 = lifeRatio < 0.5f;
|
||||
|
||||
// Increase aggression if player is taking a long time to kill the boss
|
||||
if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression)
|
||||
@@ -213,7 +212,7 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
|
||||
// Big barf attack
|
||||
if (calamityGlobalNPC.newAI[0] == 1f && !doSpiral && phase3)
|
||||
if (calamityGlobalNPC.newAI[0] == 1f && !doSpiral && phase2)
|
||||
{
|
||||
npc.localAI[0] += 1f;
|
||||
if (player.gravDir == -1f && expertMode)
|
||||
@@ -240,7 +239,7 @@ namespace CalamityMod.NPCs
|
||||
Projectile.NewProjectile(npc.Center, vector255, type, damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
|
||||
if (phase4)
|
||||
if (phase3)
|
||||
{
|
||||
int num320 = expertMode ? 14 : 7;
|
||||
type = ModContent.ProjectileType<SandPoisonCloud>();
|
||||
@@ -269,7 +268,7 @@ namespace CalamityMod.NPCs
|
||||
// Fire sand blasts or teeth depending on body type
|
||||
else
|
||||
{
|
||||
if (calamityGlobalNPC.newAI[0] == 1f && phase2)
|
||||
if (calamityGlobalNPC.newAI[0] == 1f)
|
||||
{
|
||||
npc.localAI[0] += 1f;
|
||||
float shootProjectile = 300;
|
||||
@@ -3093,11 +3092,9 @@ namespace CalamityMod.NPCs
|
||||
// Phases based on life percentage
|
||||
bool halfHealth = lifeRatio < 0.5f;
|
||||
bool doubleWormPhase = calamityGlobalNPC.newAI[0] != 0f;
|
||||
bool phase2 = (lifeRatio < 0.9f && expertMode) || (doubleWormPhase && expertMode);
|
||||
bool startFlightPhase = lifeRatio < 0.8f || death || doubleWormPhase;
|
||||
bool phase3 = (lifeRatio < 0.7f && expertMode) || (doubleWormPhase && expertMode);
|
||||
bool phase4 = lifeRatio < 0.5f && doubleWormPhase && expertMode;
|
||||
bool phase5 = lifeRatio < 0.2f && doubleWormPhase && expertMode;
|
||||
bool phase2 = lifeRatio < 0.5f && doubleWormPhase && expertMode;
|
||||
bool phase3 = lifeRatio < 0.2f && doubleWormPhase && expertMode;
|
||||
|
||||
// Set timed DR
|
||||
if (!doubleWormPhase)
|
||||
@@ -3451,7 +3448,7 @@ namespace CalamityMod.NPCs
|
||||
|
||||
if (flyAtTarget)
|
||||
{
|
||||
float speedMultiplier = doubleWormPhase ? (phase5 ? 1.25f : phase4 ? 1.2f : 1.15f) : 1f;
|
||||
float speedMultiplier = doubleWormPhase ? (phase3 ? 1.25f : phase2 ? 1.2f : 1.15f) : 1f;
|
||||
speed *= speedMultiplier;
|
||||
}
|
||||
|
||||
@@ -3651,14 +3648,9 @@ namespace CalamityMod.NPCs
|
||||
// Shoot lasers
|
||||
if (npc.type == ModContent.NPCType<AstrumDeusBodySpectral>() && Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int shootTime = 1;
|
||||
if (phase2 || targetFloatingUp)
|
||||
shootTime += 1;
|
||||
if (phase3 || targetFloatingUp)
|
||||
shootTime += 1;
|
||||
|
||||
int shootTime = ((doubleWormPhase && expertMode) || targetFloatingUp) ? 2 : 1;
|
||||
npc.localAI[0] += 1f;
|
||||
float shootProjectile = 600 / shootTime;
|
||||
float shootProjectile = 400 / shootTime;
|
||||
float timer = npc.ai[0] + 15f;
|
||||
float divisor = timer + shootProjectile;
|
||||
if (!flyAtTarget)
|
||||
|
||||
@@ -4625,12 +4625,8 @@ namespace CalamityMod.NPCs
|
||||
if (Collision.CanHit(npc.position, npc.width, npc.height, player.position, player.width, player.height))
|
||||
{
|
||||
// Laser speed
|
||||
float projectileSpeed = 4f;
|
||||
float projectileSpeed = 4.5f;
|
||||
projectileSpeed += enrageScale;
|
||||
if (phase2)
|
||||
projectileSpeed += 0.25f;
|
||||
if (phase3)
|
||||
projectileSpeed += 0.25f;
|
||||
if (BossRushEvent.BossRushActive)
|
||||
projectileSpeed *= 1.25f;
|
||||
|
||||
|
||||
+88
-50
@@ -95,6 +95,9 @@ namespace CalamityMod.NPCs
|
||||
// Max velocity used in contact damage scaling
|
||||
public float maxVelocity = 0f;
|
||||
|
||||
// Variable used to nerf desert prehardmode enemies pre-Desert Scourge
|
||||
private const double DesertEnemyStatMultiplier = 0.75;
|
||||
|
||||
// Town NPC shop alert animation variables
|
||||
public int shopAlertAnimTimer = 0;
|
||||
public int shopAlertAnimFrame = 0;
|
||||
@@ -986,9 +989,7 @@ namespace CalamityMod.NPCs
|
||||
public override void SetDefaults(NPC npc)
|
||||
{
|
||||
for (int m = 0; m < maxAIMod; m++)
|
||||
{
|
||||
newAI[m] = 0f;
|
||||
}
|
||||
|
||||
// Apply DR to vanilla NPCs.
|
||||
// This also applies DR to other mods' NPCs who have set up their NPCs to have DR.
|
||||
@@ -1011,21 +1012,15 @@ namespace CalamityMod.NPCs
|
||||
DebuffImmunities(npc);
|
||||
|
||||
if (BossRushEvent.BossRushActive)
|
||||
{
|
||||
BossRushStatChanges(npc, mod);
|
||||
}
|
||||
|
||||
BossValueChanges(npc);
|
||||
|
||||
if (DraedonMayhem)
|
||||
{
|
||||
DraedonMechaMayhemStatChanges(npc);
|
||||
}
|
||||
|
||||
if (CalamityWorld.revenge)
|
||||
{
|
||||
RevDeathStatChanges(npc, mod);
|
||||
}
|
||||
|
||||
OtherStatChanges(npc);
|
||||
}
|
||||
@@ -1063,7 +1058,7 @@ namespace CalamityMod.NPCs
|
||||
npc.buffImmune[BuffType<SulphuricPoisoning>()] = false;
|
||||
}
|
||||
|
||||
// Sets certain vanilla NPCs and all town NPCs to be immune to all debuffs.
|
||||
// Sets certain vanilla NPCs and all town NPCs to be immune to most debuffs.
|
||||
if (DestroyerIDs.Contains(npc.type) || npc.type == NPCID.SkeletronHead || (EaterofWorldsIDs.Contains(npc.type) && BossRushEvent.BossRushActive) || npc.type == NPCID.DD2EterniaCrystal || npc.townNPC || npc.type == NPCID.SpikeBall || npc.type == NPCID.BlazingWheel)
|
||||
{
|
||||
for (int k = 0; k < npc.buffImmune.Length; k++)
|
||||
@@ -1365,16 +1360,13 @@ namespace CalamityMod.NPCs
|
||||
case NPCID.LittleCrimera:
|
||||
case NPCID.Corruptor:
|
||||
case NPCID.DevourerHead:
|
||||
case NPCID.WalkingAntlion:
|
||||
case NPCID.Crawdad:
|
||||
case NPCID.Crawdad2: // chomp
|
||||
case NPCID.DungeonGuardian:
|
||||
case NPCID.Crawdad2:
|
||||
case NPCID.ManEater:
|
||||
case NPCID.AngryTrapper:
|
||||
case NPCID.Snatcher:
|
||||
case NPCID.SpikeBall:
|
||||
case NPCID.TombCrawlerHead: // lol
|
||||
case NPCID.DesertBeast: // don't ask me why basilisks are called this
|
||||
case NPCID.DesertBeast:
|
||||
case NPCID.BoneLee:
|
||||
case NPCID.Paladin:
|
||||
case NPCID.BigMimicCorruption:
|
||||
@@ -1383,7 +1375,7 @@ namespace CalamityMod.NPCs
|
||||
case NPCID.DiggerHead:
|
||||
case NPCID.SeekerHead:
|
||||
case NPCID.DuneSplicerHead:
|
||||
case NPCID.SolarCrawltipedeHead: // everybody hates this enemy lol, but they're not that bad
|
||||
case NPCID.SolarCrawltipedeHead:
|
||||
case NPCID.Mimic:
|
||||
case NPCID.SandShark:
|
||||
case NPCID.SandsharkCorrupt:
|
||||
@@ -1398,7 +1390,7 @@ namespace CalamityMod.NPCs
|
||||
case NPCID.PresentMimic:
|
||||
case NPCID.Yeti:
|
||||
case NPCID.NebulaBeast:
|
||||
case NPCID.SolarCorite: // pain
|
||||
case NPCID.SolarCorite:
|
||||
case NPCID.StardustWormHead:
|
||||
case NPCID.EaterofWorldsHead:
|
||||
case NPCID.SkeletronHead:
|
||||
@@ -1428,26 +1420,95 @@ namespace CalamityMod.NPCs
|
||||
case NPCID.PumpkingBlade:
|
||||
case NPCID.SantaNK1:
|
||||
case NPCID.DukeFishron:
|
||||
canBreakPlayerDefense = true;
|
||||
break;
|
||||
|
||||
// Reduce prehardmode desert enemy stats pre-Desert Scourge
|
||||
case NPCID.WalkingAntlion:
|
||||
if (!CalamityWorld.downedDesertScourge)
|
||||
{
|
||||
npc.lifeMax = (int)(npc.lifeMax * DesertEnemyStatMultiplier);
|
||||
npc.damage = (int)(npc.damage * DesertEnemyStatMultiplier);
|
||||
npc.defDamage = npc.damage;
|
||||
npc.defense /= 2;
|
||||
npc.defDefense = npc.defense;
|
||||
}
|
||||
canBreakPlayerDefense = true;
|
||||
break;
|
||||
|
||||
case NPCID.Antlion:
|
||||
case NPCID.FlyingAntlion:
|
||||
if (!CalamityWorld.downedDesertScourge)
|
||||
{
|
||||
npc.lifeMax = (int)(npc.lifeMax * DesertEnemyStatMultiplier);
|
||||
npc.damage = (int)(npc.damage * DesertEnemyStatMultiplier);
|
||||
npc.defDamage = npc.damage;
|
||||
npc.defense /= 2;
|
||||
npc.defDefense = npc.defense;
|
||||
}
|
||||
break;
|
||||
|
||||
// Reduce Dungeon Guardian HP
|
||||
case NPCID.DungeonGuardian:
|
||||
npc.lifeMax = (int)(npc.lifeMax * 0.1);
|
||||
canBreakPlayerDefense = true;
|
||||
break;
|
||||
|
||||
// Reduce Tomb Crawler stats
|
||||
case NPCID.TombCrawlerHead:
|
||||
npc.lifeMax = (int)(npc.lifeMax * (CalamityWorld.downedDesertScourge ? 0.6 : 0.45));
|
||||
if (!CalamityWorld.downedDesertScourge)
|
||||
{
|
||||
npc.damage = (int)(npc.damage * DesertEnemyStatMultiplier);
|
||||
npc.defDamage = npc.damage;
|
||||
// Tomb Crawler Head has 0 defense so there is no need to reduce it
|
||||
}
|
||||
canBreakPlayerDefense = true;
|
||||
break;
|
||||
|
||||
case NPCID.TombCrawlerBody:
|
||||
case NPCID.TombCrawlerTail:
|
||||
npc.lifeMax = (int)(npc.lifeMax * (CalamityWorld.downedDesertScourge ? 0.6 : 0.45));
|
||||
if (!CalamityWorld.downedDesertScourge)
|
||||
{
|
||||
npc.damage = (int)(npc.damage * DesertEnemyStatMultiplier);
|
||||
npc.defDamage = npc.damage;
|
||||
npc.defense /= 2;
|
||||
npc.defDefense = npc.defense;
|
||||
}
|
||||
break;
|
||||
|
||||
// Fix Sharkron hitboxes
|
||||
case NPCID.Sharkron:
|
||||
case NPCID.Sharkron2:
|
||||
npc.width = npc.height = 36;
|
||||
canBreakPlayerDefense = true;
|
||||
break;
|
||||
|
||||
// Make Core hitbox bigger
|
||||
case NPCID.MartianSaucerCore:
|
||||
npc.width *= 2;
|
||||
npc.height *= 2;
|
||||
break;
|
||||
|
||||
// Increase Cultist HP
|
||||
case NPCID.CultistBoss:
|
||||
npc.lifeMax = (int)(npc.lifeMax * (CalamityWorld.revenge ? 2 : 1.2));
|
||||
npc.npcSlots = 20f;
|
||||
break;
|
||||
|
||||
// Nerf Green Jellyfish because they spawn in prehardmode
|
||||
case NPCID.GreenJellyfish:
|
||||
npc.damage = 40;
|
||||
npc.defDamage = npc.damage;
|
||||
npc.defense = 4;
|
||||
npc.defDefense = npc.defense;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Fix Sharkron hitboxes
|
||||
if (npc.type == NPCID.Sharkron || npc.type == NPCID.Sharkron2)
|
||||
npc.width = npc.height = 36;
|
||||
|
||||
// Make Core hitbox bigger
|
||||
if (npc.type == NPCID.MartianSaucerCore)
|
||||
{
|
||||
npc.width *= 2;
|
||||
npc.height *= 2;
|
||||
}
|
||||
|
||||
// Reduce mech boss HP and damage depending on the new ore progression changes
|
||||
if (CalamityConfig.Instance.EarlyHardmodeProgressionRework)
|
||||
{
|
||||
@@ -1471,29 +1532,6 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
}
|
||||
|
||||
if (npc.type == NPCID.CultistBoss)
|
||||
{
|
||||
npc.lifeMax = (int)(npc.lifeMax * (CalamityWorld.revenge ? 2 : 1.2));
|
||||
npc.npcSlots = 20f;
|
||||
}
|
||||
else if (npc.type == NPCID.DungeonGuardian)
|
||||
{
|
||||
npc.lifeMax = (int)(npc.lifeMax * 0.1);
|
||||
}
|
||||
|
||||
if (npc.type >= NPCID.TombCrawlerHead && npc.type <= NPCID.TombCrawlerTail && !Main.hardMode)
|
||||
{
|
||||
npc.lifeMax = (int)(npc.lifeMax * 0.6);
|
||||
}
|
||||
|
||||
if (npc.type == NPCID.GreenJellyfish && !Main.hardMode)
|
||||
{
|
||||
npc.damage = 40;
|
||||
npc.defDamage = npc.damage;
|
||||
npc.defense = 4;
|
||||
npc.defDefense = npc.defense;
|
||||
}
|
||||
|
||||
if (Main.hardMode && HardmodeNPCNerfList.Contains(npc.type))
|
||||
{
|
||||
npc.damage = (int)(npc.damage * 0.75);
|
||||
|
||||
+341
-296
@@ -85,132 +85,132 @@ namespace CalamityMod.NPCs
|
||||
ArmageddonLoot(npc);
|
||||
|
||||
if (npc.type == NPCID.KingSlime)
|
||||
{
|
||||
// Drop a huge spray of Gel items
|
||||
int minGel = Main.expertMode ? 90 : 60;
|
||||
int maxGel = Main.expertMode ? 120 : 80;
|
||||
DropHelper.DropItemSpray(npc, ItemID.Gel, minGel, maxGel, 2);
|
||||
{
|
||||
// Drop a huge spray of Gel items
|
||||
int minGel = Main.expertMode ? 90 : 60;
|
||||
int maxGel = Main.expertMode ? 120 : 80;
|
||||
DropHelper.DropItemSpray(npc, ItemID.Gel, minGel, maxGel, 2);
|
||||
|
||||
// Legendary drop for King Slime
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<CrownJewel>(), true, CalamityWorld.malice);
|
||||
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeKingSlime>(), true, !NPC.downedSlimeKing);
|
||||
DropHelper.DropResidentEvilAmmo(npc, NPC.downedSlimeKing, 2, 0, 0);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Dryad }, NPC.downedSlimeKing);
|
||||
}
|
||||
else if (npc.type == NPCID.EyeofCthulhu)
|
||||
{
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<VictoryShard>(), !Main.expertMode, 2, 4);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeKingSlime>(), true, !NPC.downedSlimeKing);
|
||||
DropHelper.DropResidentEvilAmmo(npc, NPC.downedSlimeKing, 2, 0, 0);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Dryad }, NPC.downedSlimeKing);
|
||||
}
|
||||
else if (npc.type == NPCID.EyeofCthulhu)
|
||||
{
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<VictoryShard>(), !Main.expertMode, 2, 4);
|
||||
|
||||
// Legendary drops for Eye of Cthulhu
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<TeardropCleaver>(), true, CalamityWorld.malice);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<CounterScarf>(), true, CalamityWorld.malice);
|
||||
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeEyeofCthulhu>(), true, !NPC.downedBoss1);
|
||||
DropHelper.DropResidentEvilAmmo(npc, NPC.downedBoss1, 2, 0, 0);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Merchant, NPCID.Dryad }, NPC.downedBoss1);
|
||||
}
|
||||
else if ((npc.boss && (npc.type == NPCID.EaterofWorldsHead || npc.type == NPCID.EaterofWorldsBody || npc.type == NPCID.EaterofWorldsTail)) || npc.type == NPCID.BrainofCthulhu)
|
||||
{
|
||||
DropHelper.DropResidentEvilAmmo(npc, NPC.downedBoss1, 2, 0, 0);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Merchant, NPCID.Dryad }, NPC.downedBoss1);
|
||||
}
|
||||
else if ((npc.boss && (npc.type == NPCID.EaterofWorldsHead || npc.type == NPCID.EaterofWorldsBody || npc.type == NPCID.EaterofWorldsTail)) || npc.type == NPCID.BrainofCthulhu)
|
||||
{
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeCorruption>(), true, !WorldGen.crimson && !NPC.downedBoss2);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeEaterofWorlds>(), true, !WorldGen.crimson && !NPC.downedBoss2);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeCrimson>(), true, WorldGen.crimson && !NPC.downedBoss2);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeBrainofCthulhu>(), true, WorldGen.crimson && !NPC.downedBoss2);
|
||||
DropHelper.DropResidentEvilAmmo(npc, NPC.downedBoss2, 2, 0, 0);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Merchant, NPCID.ArmsDealer, NPCID.Dryad }, NPC.downedBoss2);
|
||||
}
|
||||
else if (npc.type == NPCID.QueenBee)
|
||||
{
|
||||
// Drop weapons Calamity style instead of mutually exclusive.
|
||||
if (!Main.expertMode)
|
||||
{
|
||||
int[] queenBeeWeapons = new int[]
|
||||
{
|
||||
ItemID.BeeKeeper,
|
||||
ItemID.BeesKnees,
|
||||
ItemID.BeeGun,
|
||||
};
|
||||
DropHelper.DropEntireSet(npc, DropHelper.NormalWeaponDropRateFloat, queenBeeWeapons);
|
||||
DropHelper.BlockDrops(queenBeeWeapons);
|
||||
}
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeEaterofWorlds>(), true, !WorldGen.crimson && !NPC.downedBoss2);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeCrimson>(), true, WorldGen.crimson && !NPC.downedBoss2);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeBrainofCthulhu>(), true, WorldGen.crimson && !NPC.downedBoss2);
|
||||
DropHelper.DropResidentEvilAmmo(npc, NPC.downedBoss2, 2, 0, 0);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Merchant, NPCID.ArmsDealer, NPCID.Dryad }, NPC.downedBoss2);
|
||||
}
|
||||
else if (npc.type == NPCID.QueenBee)
|
||||
{
|
||||
// Drop weapons Calamity style instead of mutually exclusive.
|
||||
if (!Main.expertMode)
|
||||
{
|
||||
int[] queenBeeWeapons = new int[]
|
||||
{
|
||||
ItemID.BeeKeeper,
|
||||
ItemID.BeesKnees,
|
||||
ItemID.BeeGun,
|
||||
};
|
||||
DropHelper.DropEntireSet(npc, DropHelper.NormalWeaponDropRateFloat, queenBeeWeapons);
|
||||
DropHelper.BlockDrops(queenBeeWeapons);
|
||||
}
|
||||
|
||||
DropHelper.DropItemCondition(npc, ItemID.Stinger, !Main.expertMode, 5, 10); // Extra stingers
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<HardenedHoneycomb>(), !Main.expertMode, 30, 50);
|
||||
DropHelper.DropItemCondition(npc, ItemID.Stinger, !Main.expertMode, 5, 10); // Extra stingers
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<HardenedHoneycomb>(), !Main.expertMode, 30, 50);
|
||||
|
||||
// Legendary drop for Queen Bee
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<TheBee>(), true, CalamityWorld.malice);
|
||||
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeQueenBee>(), true, !NPC.downedQueenBee);
|
||||
DropHelper.DropResidentEvilAmmo(npc, NPC.downedQueenBee, 2, 0, 0);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.ArmsDealer, NPCID.Dryad }, NPC.downedQueenBee);
|
||||
}
|
||||
else if (npc.type == NPCID.SkeletronHead)
|
||||
{
|
||||
DropHelper.DropResidentEvilAmmo(npc, NPC.downedQueenBee, 2, 0, 0);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.ArmsDealer, NPCID.Dryad }, NPC.downedQueenBee);
|
||||
}
|
||||
else if (npc.type == NPCID.SkeletronHead)
|
||||
{
|
||||
DropHelper.DropItemSpray(npc, ItemID.Bone, 70, 100, 5);
|
||||
|
||||
// Legendary drop for Skeletron
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<ClothiersWrath>(), true, CalamityWorld.malice);
|
||||
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeSkeletron>(), true, !NPC.downedBoss3);
|
||||
DropHelper.DropResidentEvilAmmo(npc, NPC.downedBoss3, 3, 1, 0);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Merchant, NPCID.Dryad }, NPC.downedBoss3);
|
||||
}
|
||||
else if (npc.type == NPCID.WallofFlesh)
|
||||
{
|
||||
if (!Main.expertMode)
|
||||
{
|
||||
// Drop weapons Calamity style instead of mutually exclusive -- this includes Calamity weapons.
|
||||
int[] wofWeapons = new int[]
|
||||
{
|
||||
ItemID.BreakerBlade,
|
||||
ItemID.ClockworkAssaultRifle,
|
||||
ModContent.ItemType<Meowthrower>(),
|
||||
ItemID.LaserRifle,
|
||||
ModContent.ItemType<BlackHawkRemote>(),
|
||||
ModContent.ItemType<BlastBarrel>(),
|
||||
};
|
||||
DropHelper.DropEntireSet(npc, DropHelper.NormalWeaponDropRateFloat, wofWeapons);
|
||||
DropHelper.BlockDrops(wofWeapons);
|
||||
DropHelper.DropResidentEvilAmmo(npc, NPC.downedBoss3, 3, 1, 0);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Merchant, NPCID.Dryad }, NPC.downedBoss3);
|
||||
}
|
||||
else if (npc.type == NPCID.WallofFlesh)
|
||||
{
|
||||
if (!Main.expertMode)
|
||||
{
|
||||
// Drop weapons Calamity style instead of mutually exclusive -- this includes Calamity weapons.
|
||||
int[] wofWeapons = new int[]
|
||||
{
|
||||
ItemID.BreakerBlade,
|
||||
ItemID.ClockworkAssaultRifle,
|
||||
ModContent.ItemType<Meowthrower>(),
|
||||
ItemID.LaserRifle,
|
||||
ModContent.ItemType<BlackHawkRemote>(),
|
||||
ModContent.ItemType<BlastBarrel>(),
|
||||
};
|
||||
DropHelper.DropEntireSet(npc, DropHelper.NormalWeaponDropRateFloat, wofWeapons);
|
||||
DropHelper.BlockDrops(wofWeapons);
|
||||
|
||||
// Drop emblems Calamity style instead of mutually exclusive -- this includes the Rogue Emblem.
|
||||
int[] emblems = new int[]
|
||||
{
|
||||
ItemID.WarriorEmblem,
|
||||
ItemID.RangerEmblem,
|
||||
ItemID.SorcererEmblem,
|
||||
ItemID.SummonerEmblem,
|
||||
ModContent.ItemType<RogueEmblem>(),
|
||||
};
|
||||
DropHelper.DropEntireSet(npc, 0.25f, emblems);
|
||||
DropHelper.BlockDrops(emblems);
|
||||
}
|
||||
// Drop emblems Calamity style instead of mutually exclusive -- this includes the Rogue Emblem.
|
||||
int[] emblems = new int[]
|
||||
{
|
||||
ItemID.WarriorEmblem,
|
||||
ItemID.RangerEmblem,
|
||||
ItemID.SorcererEmblem,
|
||||
ItemID.SummonerEmblem,
|
||||
ModContent.ItemType<RogueEmblem>(),
|
||||
};
|
||||
DropHelper.DropEntireSet(npc, 0.25f, emblems);
|
||||
DropHelper.BlockDrops(emblems);
|
||||
}
|
||||
|
||||
// Drop Demon Trophy directly if it hasn't been used yet and Expert Mode is not active.
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<MLGRune>(), !Main.expertMode && !CalamityWorld.demonMode);
|
||||
// Drop Demon Trophy directly if it hasn't been used yet and Expert Mode is not active.
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<MLGRune>(), !Main.expertMode && !CalamityWorld.demonMode);
|
||||
|
||||
// Drop Hermit's Box directly for EACH player, regardles of Expert or not. 100% chance on first kill, 10% chance afterwards.
|
||||
float hermitBoxChance = Main.hardMode ? 1f : 0.1f;
|
||||
DropHelper.DropItemChance(npc, ModContent.ItemType<IbarakiBox>(), true, hermitBoxChance);
|
||||
// Drop Hermit's Box directly for EACH player, regardles of Expert or not. 100% chance on first kill, 10% chance afterwards.
|
||||
float hermitBoxChance = Main.hardMode ? 1f : 0.1f;
|
||||
DropHelper.DropItemChance(npc, ModContent.ItemType<IbarakiBox>(), true, hermitBoxChance);
|
||||
|
||||
DropHelper.DropItemFromSetCondition(npc, !Main.expertMode, 0.2f, ItemID.CorruptionKey, ItemID.CrimsonKey);
|
||||
DropHelper.DropItemFromSetCondition(npc, !Main.expertMode, 0.2f, ItemID.CorruptionKey, ItemID.CrimsonKey);
|
||||
|
||||
// Legendary drop for Wall of Flesh
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<EvilSmasher>(), true, CalamityWorld.malice);
|
||||
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeUnderworld>(), true, !Main.hardMode);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeWallofFlesh>(), true, !Main.hardMode);
|
||||
DropHelper.DropResidentEvilAmmo(npc, Main.hardMode, 3, 1, 0);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Merchant, NPCID.ArmsDealer, NPCID.Dryad, NPCID.Painter, NPCID.WitchDoctor, NPCID.Stylist, NPCID.DyeTrader, NPCID.Demolitionist, NPCID.PartyGirl, NPCID.Clothier, NPCID.SkeletonMerchant, ModContent.NPCType<THIEF>() }, Main.hardMode);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeWallofFlesh>(), true, !Main.hardMode);
|
||||
DropHelper.DropResidentEvilAmmo(npc, Main.hardMode, 3, 1, 0);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Merchant, NPCID.ArmsDealer, NPCID.Dryad, NPCID.Painter, NPCID.WitchDoctor, NPCID.Stylist, NPCID.DyeTrader, NPCID.Demolitionist, NPCID.PartyGirl, NPCID.Clothier, NPCID.SkeletonMerchant, ModContent.NPCType<THIEF>() }, Main.hardMode);
|
||||
|
||||
// First kill text (this is not a loot function)
|
||||
if (!Main.hardMode)
|
||||
{
|
||||
// First kill text (this is not a loot function)
|
||||
if (!Main.hardMode)
|
||||
{
|
||||
// Increase altar count to allow natural mech boss spawning.
|
||||
if (CalamityConfig.Instance.EarlyHardmodeProgressionRework)
|
||||
WorldGen.altarCount++;
|
||||
|
||||
string key2 = "Mods.CalamityMod.UglyBossText";
|
||||
Color messageColor2 = Color.Aquamarine;
|
||||
string key2 = "Mods.CalamityMod.UglyBossText";
|
||||
Color messageColor2 = Color.Aquamarine;
|
||||
CalamityUtils.DisplayLocalizedText(key2, messageColor2);
|
||||
|
||||
if (CalamityConfig.Instance.EarlyHardmodeProgressionRework)
|
||||
@@ -222,320 +222,323 @@ namespace CalamityMod.NPCs
|
||||
CalamityUtils.DisplayLocalizedText(key3, messageColor3);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (lastTwinStanding)
|
||||
{
|
||||
}
|
||||
else if (lastTwinStanding)
|
||||
{
|
||||
// Only drop hallowed bars after all mechs are down
|
||||
if ((!NPC.downedMechBoss1 || !NPC.downedMechBoss2 || !NPC.downedMechBoss3) && CalamityConfig.Instance.EarlyHardmodeProgressionRework)
|
||||
DropHelper.BlockDrops(ItemID.HallowedBar);
|
||||
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<MysteriousCircuitry>(), Main.expertMode, CalamityGlobalNPC.DraedonMayhem, 8, 16);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<DubiousPlating>(), Main.expertMode, CalamityGlobalNPC.DraedonMayhem, 8, 16);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<DubiousPlating>(), Main.expertMode, CalamityGlobalNPC.DraedonMayhem, 8, 16);
|
||||
|
||||
// Legendary drop for Twins
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<Arbalest>(), true, CalamityWorld.malice);
|
||||
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeTwins>(), true, !NPC.downedMechBoss2);
|
||||
DropHelper.DropResidentEvilAmmo(npc, NPC.downedMechBoss2, 4, 2, 1);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.DD2Bartender, NPCID.Stylist, NPCID.Truffle, ModContent.NPCType<THIEF>() }, NPC.downedMechBossAny);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Stylist, ModContent.NPCType<DILF>(), ModContent.NPCType<FAP>(), ModContent.NPCType<THIEF>() }, !NPC.downedMechBoss1 || NPC.downedMechBoss2 || !NPC.downedMechBoss3);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Steampunker }, NPC.downedMechBoss2 || !CalamityConfig.Instance.SellVanillaSummons);
|
||||
DropHelper.DropResidentEvilAmmo(npc, NPC.downedMechBoss2, 4, 2, 1);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.DD2Bartender, NPCID.Stylist, NPCID.Truffle, ModContent.NPCType<THIEF>() }, NPC.downedMechBossAny);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Stylist, ModContent.NPCType<DILF>(), ModContent.NPCType<FAP>(), ModContent.NPCType<THIEF>() }, !NPC.downedMechBoss1 || NPC.downedMechBoss2 || !NPC.downedMechBoss3);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Steampunker }, NPC.downedMechBoss2 || !CalamityConfig.Instance.SellVanillaSummons);
|
||||
|
||||
if (!NPC.downedMechBoss2 && CalamityConfig.Instance.EarlyHardmodeProgressionRework)
|
||||
SpawnMechBossHardmodeOres();
|
||||
}
|
||||
else if (npc.type == NPCID.TheDestroyer)
|
||||
{
|
||||
}
|
||||
else if (npc.type == NPCID.TheDestroyer)
|
||||
{
|
||||
// Only drop hallowed bars after all mechs are down
|
||||
if ((!NPC.downedMechBoss1 || !NPC.downedMechBoss2 || !NPC.downedMechBoss3) && CalamityConfig.Instance.EarlyHardmodeProgressionRework)
|
||||
DropHelper.BlockDrops(ItemID.HallowedBar);
|
||||
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<MysteriousCircuitry>(), Main.expertMode, CalamityGlobalNPC.DraedonMayhem, 8, 16);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<DubiousPlating>(), Main.expertMode, CalamityGlobalNPC.DraedonMayhem, 8, 16);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<DubiousPlating>(), Main.expertMode, CalamityGlobalNPC.DraedonMayhem, 8, 16);
|
||||
|
||||
// Legendary drop for Destroyer
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<SHPC>(), true, CalamityWorld.malice);
|
||||
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeDestroyer>(), true, !NPC.downedMechBoss1);
|
||||
DropHelper.DropResidentEvilAmmo(npc, NPC.downedMechBoss1, 4, 2, 1);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.DD2Bartender, NPCID.Stylist, NPCID.Truffle, ModContent.NPCType<THIEF>() }, NPC.downedMechBossAny);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Stylist, ModContent.NPCType<DILF>(), ModContent.NPCType<FAP>(), ModContent.NPCType<THIEF>() }, NPC.downedMechBoss1 || !NPC.downedMechBoss2 || !NPC.downedMechBoss3);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Steampunker }, NPC.downedMechBoss1 || !CalamityConfig.Instance.SellVanillaSummons);
|
||||
DropHelper.DropResidentEvilAmmo(npc, NPC.downedMechBoss1, 4, 2, 1);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.DD2Bartender, NPCID.Stylist, NPCID.Truffle, ModContent.NPCType<THIEF>() }, NPC.downedMechBossAny);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Stylist, ModContent.NPCType<DILF>(), ModContent.NPCType<FAP>(), ModContent.NPCType<THIEF>() }, NPC.downedMechBoss1 || !NPC.downedMechBoss2 || !NPC.downedMechBoss3);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Steampunker }, NPC.downedMechBoss1 || !CalamityConfig.Instance.SellVanillaSummons);
|
||||
|
||||
if (!NPC.downedMechBoss1 && CalamityConfig.Instance.EarlyHardmodeProgressionRework)
|
||||
SpawnMechBossHardmodeOres();
|
||||
}
|
||||
else if (npc.type == NPCID.SkeletronPrime)
|
||||
{
|
||||
else if (npc.type == NPCID.SkeletronPrime)
|
||||
{
|
||||
// Only drop hallowed bars after all mechs are down
|
||||
if ((!NPC.downedMechBoss1 || !NPC.downedMechBoss2 || !NPC.downedMechBoss3) && CalamityConfig.Instance.EarlyHardmodeProgressionRework)
|
||||
DropHelper.BlockDrops(ItemID.HallowedBar);
|
||||
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<MysteriousCircuitry>(), Main.expertMode, CalamityGlobalNPC.DraedonMayhem, 8, 16);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<DubiousPlating>(), Main.expertMode, CalamityGlobalNPC.DraedonMayhem, 8, 16);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<DubiousPlating>(), Main.expertMode, CalamityGlobalNPC.DraedonMayhem, 8, 16);
|
||||
|
||||
// Legendary drop for Skeletron Prime
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<GoldBurdenBreaker>(), true, CalamityWorld.malice);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<SpearofDestiny>(), true, CalamityWorld.malice);
|
||||
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeSkeletronPrime>(), true, !NPC.downedMechBoss3);
|
||||
DropHelper.DropResidentEvilAmmo(npc, NPC.downedMechBoss3, 4, 2, 1);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.DD2Bartender, NPCID.Stylist, NPCID.Truffle, ModContent.NPCType<THIEF>() }, NPC.downedMechBossAny);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Stylist, ModContent.NPCType<DILF>(), ModContent.NPCType<FAP>(), ModContent.NPCType<THIEF>() }, !NPC.downedMechBoss1 || !NPC.downedMechBoss2 || NPC.downedMechBoss3);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Steampunker }, NPC.downedMechBoss3 || !CalamityConfig.Instance.SellVanillaSummons);
|
||||
DropHelper.DropResidentEvilAmmo(npc, NPC.downedMechBoss3, 4, 2, 1);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.DD2Bartender, NPCID.Stylist, NPCID.Truffle, ModContent.NPCType<THIEF>() }, NPC.downedMechBossAny);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Stylist, ModContent.NPCType<DILF>(), ModContent.NPCType<FAP>(), ModContent.NPCType<THIEF>() }, !NPC.downedMechBoss1 || !NPC.downedMechBoss2 || NPC.downedMechBoss3);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Steampunker }, NPC.downedMechBoss3 || !CalamityConfig.Instance.SellVanillaSummons);
|
||||
|
||||
if (!NPC.downedMechBoss3 && CalamityConfig.Instance.EarlyHardmodeProgressionRework)
|
||||
SpawnMechBossHardmodeOres();
|
||||
}
|
||||
else if (npc.type == NPCID.Plantera)
|
||||
{
|
||||
// Drop weapons Calamity style instead of mutually exclusive.
|
||||
if (!Main.expertMode)
|
||||
{
|
||||
int[] planteraWeapons = new int[]
|
||||
{
|
||||
ItemID.FlowerPow,
|
||||
ItemID.Seedler,
|
||||
ItemID.GrenadeLauncher,
|
||||
ItemID.VenusMagnum,
|
||||
ItemID.LeafBlower,
|
||||
ItemID.NettleBurst,
|
||||
ItemID.WaspGun,
|
||||
ItemID.PygmyStaff
|
||||
};
|
||||
DropHelper.DropEntireSet(npc, DropHelper.NormalWeaponDropRateFloat, planteraWeapons);
|
||||
DropHelper.BlockDrops(planteraWeapons);
|
||||
}
|
||||
else if (npc.type == NPCID.Plantera)
|
||||
{
|
||||
// Drop weapons Calamity style instead of mutually exclusive.
|
||||
if (!Main.expertMode)
|
||||
{
|
||||
int[] planteraWeapons = new int[]
|
||||
{
|
||||
ItemID.FlowerPow,
|
||||
ItemID.Seedler,
|
||||
ItemID.GrenadeLauncher,
|
||||
ItemID.VenusMagnum,
|
||||
ItemID.LeafBlower,
|
||||
ItemID.NettleBurst,
|
||||
ItemID.WaspGun,
|
||||
ItemID.PygmyStaff
|
||||
};
|
||||
DropHelper.DropEntireSet(npc, DropHelper.NormalWeaponDropRateFloat, planteraWeapons);
|
||||
DropHelper.BlockDrops(planteraWeapons);
|
||||
}
|
||||
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<LivingShard>(), !Main.expertMode, 12, 18);
|
||||
DropHelper.DropItemCondition(npc, ItemID.JungleKey, !Main.expertMode, 5, 1, 1);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<LivingShard>(), !Main.expertMode, 12, 18);
|
||||
DropHelper.DropItemCondition(npc, ItemID.JungleKey, !Main.expertMode, 5, 1, 1);
|
||||
|
||||
// Legendary drop for Plantera
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<BlossomFlux>(), true, CalamityWorld.malice);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<ThornBlossom>(), true, CalamityWorld.malice);
|
||||
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgePlantera>(), true, !NPC.downedPlantBoss);
|
||||
DropHelper.DropResidentEvilAmmo(npc, NPC.downedPlantBoss, 4, 2, 1);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.WitchDoctor, NPCID.Truffle, ModContent.NPCType<FAP>(), ModContent.NPCType<THIEF>() }, NPC.downedPlantBoss);
|
||||
DropHelper.DropResidentEvilAmmo(npc, NPC.downedPlantBoss, 4, 2, 1);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.WitchDoctor, NPCID.Truffle, ModContent.NPCType<FAP>(), ModContent.NPCType<THIEF>() }, NPC.downedPlantBoss);
|
||||
|
||||
// Spawn Perennial Ore if Plantera has never been killed
|
||||
if (!NPC.downedPlantBoss)
|
||||
{
|
||||
string key2 = "Mods.CalamityMod.PlantOreText";
|
||||
Color messageColor2 = Color.GreenYellow;
|
||||
string key3 = "Mods.CalamityMod.SandSharkText3";
|
||||
Color messageColor3 = Color.Goldenrod;
|
||||
// Spawn Perennial Ore if Plantera has never been killed
|
||||
if (!NPC.downedPlantBoss)
|
||||
{
|
||||
string key2 = "Mods.CalamityMod.PlantOreText";
|
||||
Color messageColor2 = Color.GreenYellow;
|
||||
string key3 = "Mods.CalamityMod.SandSharkText3";
|
||||
Color messageColor3 = Color.Goldenrod;
|
||||
|
||||
WorldGenerationMethods.SpawnOre(ModContent.TileType<PerennialOre>(), 12E-05, .5f, .7f);
|
||||
WorldGenerationMethods.SpawnOre(ModContent.TileType<PerennialOre>(), 12E-05, .5f, .7f);
|
||||
|
||||
CalamityUtils.DisplayLocalizedText(key2, messageColor2);
|
||||
CalamityUtils.DisplayLocalizedText(key3, messageColor3);
|
||||
}
|
||||
}
|
||||
CalamityUtils.DisplayLocalizedText(key2, messageColor2);
|
||||
CalamityUtils.DisplayLocalizedText(key3, messageColor3);
|
||||
}
|
||||
}
|
||||
|
||||
// These event enemies set shop variables and since those depend on downed bools they must be done in PreNPCLoot.
|
||||
else if (npc.type == NPCID.Pumpking)
|
||||
{
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Clothier }, NPC.downedHalloweenKing);
|
||||
}
|
||||
else if (npc.type == NPCID.Everscream)
|
||||
{
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { ModContent.NPCType<DILF>() }, NPC.downedChristmasTree || !NPC.downedChristmasSantank || !NPC.downedChristmasIceQueen);
|
||||
}
|
||||
else if (npc.type == NPCID.SantaNK1)
|
||||
{
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { ModContent.NPCType<DILF>() }, !NPC.downedChristmasTree || NPC.downedChristmasSantank || !NPC.downedChristmasIceQueen);
|
||||
}
|
||||
else if (npc.type == NPCID.IceQueen)
|
||||
{
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Clothier }, NPC.downedChristmasIceQueen);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { ModContent.NPCType<DILF>() }, !NPC.downedChristmasTree || !NPC.downedChristmasSantank || NPC.downedChristmasIceQueen);
|
||||
}
|
||||
// These event enemies set shop variables and since those depend on downed bools they must be done in PreNPCLoot.
|
||||
else if (npc.type == NPCID.Pumpking)
|
||||
{
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Clothier }, NPC.downedHalloweenKing);
|
||||
}
|
||||
else if (npc.type == NPCID.Everscream)
|
||||
{
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { ModContent.NPCType<DILF>() }, NPC.downedChristmasTree || !NPC.downedChristmasSantank || !NPC.downedChristmasIceQueen);
|
||||
}
|
||||
else if (npc.type == NPCID.SantaNK1)
|
||||
{
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { ModContent.NPCType<DILF>() }, !NPC.downedChristmasTree || NPC.downedChristmasSantank || !NPC.downedChristmasIceQueen);
|
||||
}
|
||||
else if (npc.type == NPCID.IceQueen)
|
||||
{
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Clothier }, NPC.downedChristmasIceQueen);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { ModContent.NPCType<DILF>() }, !NPC.downedChristmasTree || !NPC.downedChristmasSantank || NPC.downedChristmasIceQueen);
|
||||
}
|
||||
|
||||
else if (npc.type == NPCID.Golem)
|
||||
{
|
||||
// Drop loot Calamity style instead of mutually exclusive.
|
||||
if (!Main.expertMode)
|
||||
{
|
||||
int[] golemItems = new int[]
|
||||
{
|
||||
ItemID.GolemFist,
|
||||
ItemID.PossessedHatchet,
|
||||
ItemID.Stynger,
|
||||
ItemID.HeatRay,
|
||||
ItemID.StaffofEarth,
|
||||
ItemID.EyeoftheGolem,
|
||||
ItemID.SunStone,
|
||||
};
|
||||
DropHelper.DropEntireSet(npc, DropHelper.NormalWeaponDropRateFloat, golemItems);
|
||||
DropHelper.BlockDrops(golemItems);
|
||||
}
|
||||
else if (npc.type == NPCID.Golem)
|
||||
{
|
||||
// Drop loot Calamity style instead of mutually exclusive.
|
||||
if (!Main.expertMode)
|
||||
{
|
||||
int[] golemItems = new int[]
|
||||
{
|
||||
ItemID.GolemFist,
|
||||
ItemID.PossessedHatchet,
|
||||
ItemID.Stynger,
|
||||
ItemID.HeatRay,
|
||||
ItemID.StaffofEarth,
|
||||
ItemID.EyeoftheGolem,
|
||||
ItemID.SunStone,
|
||||
};
|
||||
DropHelper.DropEntireSet(npc, DropHelper.NormalWeaponDropRateFloat, golemItems);
|
||||
DropHelper.BlockDrops(golemItems);
|
||||
}
|
||||
|
||||
// If Golem has never been killed, provide a Picksaw to all players. This only applies in Normal Mode.
|
||||
// The Golem Treasure Bag is guaranteed to provide a Picksaw if one is not yet in the inventory.
|
||||
DropHelper.DropItemCondition(npc, ItemID.Picksaw, true, !Main.expertMode && !NPC.downedGolemBoss);
|
||||
// If Golem has never been killed, provide a Picksaw to all players. This only applies in Normal Mode.
|
||||
// The Golem Treasure Bag is guaranteed to provide a Picksaw if one is not yet in the inventory.
|
||||
DropHelper.DropItemCondition(npc, ItemID.Picksaw, true, !Main.expertMode && !NPC.downedGolemBoss);
|
||||
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<EssenceofCinder>(), !Main.expertMode, 5, 10);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<EssenceofCinder>(), !Main.expertMode, 5, 10);
|
||||
|
||||
// Legendary drop for Golem
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<AegisBlade>(), true, CalamityWorld.malice);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<LeadWizard>(), true, CalamityWorld.malice);
|
||||
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeGolem>(), true, !NPC.downedGolemBoss);
|
||||
DropHelper.DropResidentEvilAmmo(npc, NPC.downedGolemBoss, 4, 2, 1);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.ArmsDealer, NPCID.Cyborg, NPCID.Steampunker, NPCID.Wizard, NPCID.WitchDoctor, NPCID.DD2Bartender, ModContent.NPCType<FAP>(), ModContent.NPCType<THIEF>() }, NPC.downedGolemBoss);
|
||||
DropHelper.DropResidentEvilAmmo(npc, NPC.downedGolemBoss, 4, 2, 1);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.ArmsDealer, NPCID.Cyborg, NPCID.Steampunker, NPCID.Wizard, NPCID.WitchDoctor, NPCID.DD2Bartender, ModContent.NPCType<FAP>(), ModContent.NPCType<THIEF>() }, NPC.downedGolemBoss);
|
||||
|
||||
// If Golem has never been killed, send a message about the Plague.
|
||||
if (!NPC.downedGolemBoss)
|
||||
{
|
||||
string key = "Mods.CalamityMod.BabyBossText";
|
||||
Color messageColor = Color.Lime;
|
||||
// If Golem has never been killed, send a message about the Plague.
|
||||
if (!NPC.downedGolemBoss)
|
||||
{
|
||||
string key = "Mods.CalamityMod.BabyBossText";
|
||||
Color messageColor = Color.Lime;
|
||||
|
||||
CalamityUtils.DisplayLocalizedText(key, messageColor);
|
||||
}
|
||||
}
|
||||
else if (npc.type == NPCID.DD2Betsy && !CalamityWorld.downedBetsy)
|
||||
{
|
||||
// Drop weapons Calamity style instead of mutually exclusive.
|
||||
if (!Main.expertMode)
|
||||
{
|
||||
int[] betsyWeapons = new int[]
|
||||
{
|
||||
ItemID.DD2SquireBetsySword, // Flying Dragon
|
||||
CalamityUtils.DisplayLocalizedText(key, messageColor);
|
||||
}
|
||||
}
|
||||
else if (npc.type == NPCID.DD2Betsy && !CalamityWorld.downedBetsy)
|
||||
{
|
||||
// Drop weapons Calamity style instead of mutually exclusive.
|
||||
if (!Main.expertMode)
|
||||
{
|
||||
int[] betsyWeapons = new int[]
|
||||
{
|
||||
ItemID.DD2SquireBetsySword, // Flying Dragon
|
||||
ItemID.MonkStaffT3, // Sky Dragon's Fury
|
||||
ItemID.DD2BetsyBow, // Aerial Bane
|
||||
ItemID.ApprenticeStaffT3, // Betsy's Wrath
|
||||
};
|
||||
DropHelper.DropEntireSet(npc, DropHelper.NormalWeaponDropRateFloat, betsyWeapons);
|
||||
DropHelper.BlockDrops(betsyWeapons);
|
||||
}
|
||||
DropHelper.DropEntireSet(npc, DropHelper.NormalWeaponDropRateFloat, betsyWeapons);
|
||||
DropHelper.BlockDrops(betsyWeapons);
|
||||
}
|
||||
|
||||
DropHelper.DropResidentEvilAmmo(npc, CalamityWorld.downedBetsy, 4, 2, 1);
|
||||
DropHelper.DropResidentEvilAmmo(npc, CalamityWorld.downedBetsy, 4, 2, 1);
|
||||
|
||||
// Mark Betsy as dead (Vanilla does not keep track of her)
|
||||
CalamityWorld.downedBetsy = true;
|
||||
CalamityNetcode.SyncWorld();
|
||||
}
|
||||
else if (npc.type == NPCID.DukeFishron)
|
||||
{
|
||||
// Drop weapons Calamity style instead of mutually exclusive -- this includes Calamity weapons.
|
||||
if (!Main.expertMode)
|
||||
{
|
||||
int[] dukeWeapons = new int[]
|
||||
{
|
||||
ItemID.Flairon,
|
||||
ItemID.Tsunami,
|
||||
ItemID.BubbleGun,
|
||||
ItemID.RazorbladeTyphoon,
|
||||
ItemID.TempestStaff,
|
||||
ModContent.ItemType<DukesDecapitator>(),
|
||||
};
|
||||
DropHelper.DropEntireSet(npc, DropHelper.NormalWeaponDropRateFloat, dukeWeapons);
|
||||
DropHelper.BlockDrops(dukeWeapons);
|
||||
}
|
||||
// Mark Betsy as dead (Vanilla does not keep track of her)
|
||||
CalamityWorld.downedBetsy = true;
|
||||
CalamityNetcode.SyncWorld();
|
||||
}
|
||||
else if (npc.type == NPCID.DukeFishron)
|
||||
{
|
||||
// Drop weapons Calamity style instead of mutually exclusive -- this includes Calamity weapons.
|
||||
if (!Main.expertMode)
|
||||
{
|
||||
int[] dukeWeapons = new int[]
|
||||
{
|
||||
ItemID.Flairon,
|
||||
ItemID.Tsunami,
|
||||
ItemID.BubbleGun,
|
||||
ItemID.RazorbladeTyphoon,
|
||||
ItemID.TempestStaff,
|
||||
ModContent.ItemType<DukesDecapitator>(),
|
||||
};
|
||||
DropHelper.DropEntireSet(npc, DropHelper.NormalWeaponDropRateFloat, dukeWeapons);
|
||||
DropHelper.BlockDrops(dukeWeapons);
|
||||
}
|
||||
|
||||
// Legendary drop for Duke Fishron
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<BrinyBaron>(), true, CalamityWorld.malice);
|
||||
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeDukeFishron>(), true, !NPC.downedFishron);
|
||||
DropHelper.DropResidentEvilAmmo(npc, NPC.downedPlantBoss, 4, 2, 1);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { ModContent.NPCType<SEAHOE>() }, NPC.downedFishron || !CalamityConfig.Instance.SellVanillaSummons);
|
||||
}
|
||||
else if (npc.type == NPCID.CultistBoss)
|
||||
{
|
||||
DropHelper.DropResidentEvilAmmo(npc, NPC.downedPlantBoss, 4, 2, 1);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { ModContent.NPCType<SEAHOE>() }, NPC.downedFishron || !CalamityConfig.Instance.SellVanillaSummons);
|
||||
}
|
||||
else if (npc.type == NPCID.CultistBoss)
|
||||
{
|
||||
// Legendary drops for Cultist
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<EyeofMagnus>(), true, CalamityWorld.malice);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<StardustStaff>(), true, CalamityWorld.malice);
|
||||
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeLunaticCultist>(), true, !NPC.downedAncientCultist);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeBloodMoon>(), true, Main.bloodMoon);
|
||||
DropHelper.DropResidentEvilAmmo(npc, NPC.downedAncientCultist, 4, 2, 1);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeBloodMoon>(), true, Main.bloodMoon);
|
||||
DropHelper.DropResidentEvilAmmo(npc, NPC.downedAncientCultist, 4, 2, 1);
|
||||
|
||||
// Deus text (this is not a loot function)
|
||||
if (!NPC.downedAncientCultist)
|
||||
{
|
||||
string key = "Mods.CalamityMod.DeusText";
|
||||
Color messageColor = Color.Gold;
|
||||
// Deus text (this is not a loot function)
|
||||
if (!NPC.downedAncientCultist)
|
||||
{
|
||||
string key = "Mods.CalamityMod.DeusText";
|
||||
Color messageColor = Color.Gold;
|
||||
|
||||
CalamityUtils.DisplayLocalizedText(key, messageColor);
|
||||
}
|
||||
}
|
||||
else if (npc.type == NPCID.MoonLordCore)
|
||||
{
|
||||
// Drop weapons Calamity style instead of mutually exclusive -- this includes Calamity weapons.
|
||||
if (!Main.expertMode)
|
||||
{
|
||||
int[] moonLordWeapons = new int[]
|
||||
{
|
||||
ItemID.Meowmere,
|
||||
ItemID.StarWrath,
|
||||
ItemID.Terrarian,
|
||||
ItemID.FireworksLauncher, // Celebration
|
||||
CalamityUtils.DisplayLocalizedText(key, messageColor);
|
||||
}
|
||||
}
|
||||
else if (npc.type == NPCID.MoonLordCore)
|
||||
{
|
||||
// Drop weapons Calamity style instead of mutually exclusive -- this includes Calamity weapons.
|
||||
if (!Main.expertMode)
|
||||
{
|
||||
int[] moonLordWeapons = new int[]
|
||||
{
|
||||
ItemID.Meowmere,
|
||||
ItemID.StarWrath,
|
||||
ItemID.Terrarian,
|
||||
ItemID.FireworksLauncher, // Celebration
|
||||
// ItemID.CelebrationMK2,
|
||||
ItemID.SDMG,
|
||||
ItemID.LastPrism,
|
||||
ItemID.LunarFlareBook,
|
||||
ItemID.MoonlordTurretStaff, // Lunar Portal Staff
|
||||
ItemID.LastPrism,
|
||||
ItemID.LunarFlareBook,
|
||||
ItemID.MoonlordTurretStaff, // Lunar Portal Staff
|
||||
ItemID.RainbowCrystalStaff,
|
||||
ModContent.ItemType<UtensilPoker>(),
|
||||
};
|
||||
DropHelper.DropEntireSet(npc, DropHelper.NormalWeaponDropRateFloat, moonLordWeapons);
|
||||
DropHelper.BlockDrops(moonLordWeapons);
|
||||
}
|
||||
ModContent.ItemType<UtensilPoker>(),
|
||||
};
|
||||
DropHelper.DropEntireSet(npc, DropHelper.NormalWeaponDropRateFloat, moonLordWeapons);
|
||||
DropHelper.BlockDrops(moonLordWeapons);
|
||||
}
|
||||
|
||||
// Gravity Globe is available to Normal players as well
|
||||
DropHelper.DropItemCondition(npc, ItemID.GravityGlobe, !Main.expertMode);
|
||||
// Gravity Globe is available to Normal players as well
|
||||
DropHelper.DropItemCondition(npc, ItemID.GravityGlobe, !Main.expertMode);
|
||||
|
||||
// One Celestial Onion is given to each player individually
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<MLGRune2>(), true, !Main.expertMode);
|
||||
// One Celestial Onion is given to each player individually
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<MLGRune2>(), true, !Main.expertMode);
|
||||
|
||||
// Legendary drops for Moon Lord
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<GrandDad>(), true, CalamityWorld.malice);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<Infinity>(), true, CalamityWorld.malice);
|
||||
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeMoonLord>(), true, !NPC.downedMoonlord);
|
||||
DropHelper.DropResidentEvilAmmo(npc, NPC.downedMoonlord, 5, 2, 1);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { ModContent.NPCType<THIEF>() }, NPC.downedMoonlord);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Wizard }, NPC.downedMoonlord || !CalamityConfig.Instance.SellVanillaSummons);
|
||||
DropHelper.DropResidentEvilAmmo(npc, NPC.downedMoonlord, 5, 2, 1);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { ModContent.NPCType<THIEF>() }, NPC.downedMoonlord);
|
||||
CalamityGlobalTownNPC.SetNewShopVariable(new int[] { NPCID.Wizard }, NPC.downedMoonlord || !CalamityConfig.Instance.SellVanillaSummons);
|
||||
|
||||
string key = "Mods.CalamityMod.MoonBossText";
|
||||
Color messageColor = Color.Orange;
|
||||
string key2 = "Mods.CalamityMod.MoonBossText2";
|
||||
Color messageColor2 = Color.Violet;
|
||||
string key3 = "Mods.CalamityMod.MoonBossText3";
|
||||
Color messageColor3 = Color.Crimson;
|
||||
string key4 = "Mods.CalamityMod.ProfanedBossText2";
|
||||
Color messageColor4 = Color.Cyan;
|
||||
string key5 = "Mods.CalamityMod.FutureOreText";
|
||||
Color messageColor5 = Color.LightGray;
|
||||
string key = "Mods.CalamityMod.MoonBossText";
|
||||
Color messageColor = Color.Orange;
|
||||
string key2 = "Mods.CalamityMod.MoonBossText2";
|
||||
Color messageColor2 = Color.Violet;
|
||||
string key3 = "Mods.CalamityMod.MoonBossText3";
|
||||
Color messageColor3 = Color.Crimson;
|
||||
string key4 = "Mods.CalamityMod.ProfanedBossText2";
|
||||
Color messageColor4 = Color.Cyan;
|
||||
string key5 = "Mods.CalamityMod.FutureOreText";
|
||||
Color messageColor5 = Color.LightGray;
|
||||
|
||||
// Spawn Exodium planetoids and send messages about Providence, Bloodstone, Phantoplasm, etc. if ML has not been killed yet
|
||||
if (!NPC.downedMoonlord)
|
||||
{
|
||||
// Generate luminite planetoids.
|
||||
// This operation is done on a separate thread to lighten the load on servers so that they
|
||||
// can focus on more critical operations asychronously and ideally avoid a time-out crash.
|
||||
// Very few operations in Terraria utilize the pool, so it is highly unlikely that no threads will remain in it.
|
||||
ThreadPool.QueueUserWorkItem(_ => WorldGenerationMethods.GenerateLuminitePlanetoids());
|
||||
// Spawn Exodium planetoids and send messages about Providence, Bloodstone, Phantoplasm, etc. if ML has not been killed yet
|
||||
if (!NPC.downedMoonlord)
|
||||
{
|
||||
// Generate luminite planetoids.
|
||||
// This operation is done on a separate thread to lighten the load on servers so that they
|
||||
// can focus on more critical operations asychronously and ideally avoid a time-out crash.
|
||||
// Very few operations in Terraria utilize the pool, so it is highly unlikely that no threads will remain in it.
|
||||
ThreadPool.QueueUserWorkItem(_ => WorldGenerationMethods.GenerateLuminitePlanetoids());
|
||||
|
||||
CalamityUtils.DisplayLocalizedText(key, messageColor);
|
||||
CalamityUtils.DisplayLocalizedText(key2, messageColor2);
|
||||
CalamityUtils.DisplayLocalizedText(key3, messageColor3);
|
||||
CalamityUtils.DisplayLocalizedText(key4, messageColor4);
|
||||
CalamityUtils.DisplayLocalizedText(key5, messageColor5);
|
||||
}
|
||||
}
|
||||
CalamityUtils.DisplayLocalizedText(key, messageColor);
|
||||
CalamityUtils.DisplayLocalizedText(key2, messageColor2);
|
||||
CalamityUtils.DisplayLocalizedText(key3, messageColor3);
|
||||
CalamityUtils.DisplayLocalizedText(key4, messageColor4);
|
||||
CalamityUtils.DisplayLocalizedText(key5, messageColor5);
|
||||
}
|
||||
}
|
||||
else if (npc.type == NPCID.RedDevil)
|
||||
{
|
||||
DropHelper.DropItemChance(npc, ItemID.FireFeather, 0.1f);
|
||||
DropHelper.BlockDrops(ItemID.FireFeather);
|
||||
}
|
||||
else if (npc.type == NPCID.Vampire || npc.type == NPCID.VampireBat)
|
||||
{
|
||||
DropHelper.DropItemChance(npc, ItemID.MoonStone, 0.15f);
|
||||
DropHelper.BlockDrops(ItemID.MoonStone);
|
||||
}
|
||||
else if (npc.type == NPCID.Werewolf)
|
||||
{
|
||||
DropHelper.DropItemChance(npc, ItemID.MoonCharm, 0.05f);
|
||||
DropHelper.BlockDrops(ItemID.MoonCharm);
|
||||
}
|
||||
else if (npc.type == NPCID.Mimic)
|
||||
{
|
||||
@@ -549,10 +552,52 @@ namespace CalamityMod.NPCs
|
||||
DropHelper.WeightStack(ItemID.Compass, w),
|
||||
DropHelper.WeightStack(ItemID.PhilosophersStone, w)
|
||||
);
|
||||
|
||||
int[] mimicDrops = new int[]
|
||||
{
|
||||
ItemID.StarCloak,
|
||||
ItemID.CrossNecklace,
|
||||
ItemID.TitanGlove,
|
||||
ItemID.DualHook,
|
||||
ItemID.MagicDagger,
|
||||
ItemID.Compass,
|
||||
ItemID.PhilosophersStone
|
||||
};
|
||||
DropHelper.BlockDrops(mimicDrops);
|
||||
}
|
||||
else if (npc.type == NPCID.Moth)
|
||||
{
|
||||
DropHelper.DropItem(npc, ItemID.ButterflyDust);
|
||||
DropHelper.BlockDrops(ItemID.ButterflyDust);
|
||||
}
|
||||
else if (npc.type >= NPCID.RustyArmoredBonesAxe && npc.type <= NPCID.HellArmoredBonesSword)
|
||||
{
|
||||
DropHelper.DropItemChance(npc, ItemID.WispinaBottle, 0.005f);
|
||||
DropHelper.BlockDrops(ItemID.WispinaBottle);
|
||||
}
|
||||
else if (npc.type == NPCID.Paladin)
|
||||
{
|
||||
DropHelper.DropItemChance(npc, ItemID.PaladinsHammer, 0.15f);
|
||||
DropHelper.DropItemChance(npc, ItemID.PaladinsShield, 0.2f);
|
||||
|
||||
int[] paladinDrops = new int[]
|
||||
{
|
||||
ItemID.PaladinsHammer,
|
||||
ItemID.PaladinsShield
|
||||
};
|
||||
DropHelper.BlockDrops(paladinDrops);
|
||||
}
|
||||
else if (npc.type == NPCID.BoneLee)
|
||||
{
|
||||
DropHelper.DropItemChance(npc, ItemID.BlackBelt, 0.25f);
|
||||
DropHelper.DropItemChance(npc, ItemID.Tabi, 0.25f);
|
||||
|
||||
int[] boneLeeDrops = new int[]
|
||||
{
|
||||
ItemID.BlackBelt,
|
||||
ItemID.Tabi
|
||||
};
|
||||
DropHelper.BlockDrops(boneLeeDrops);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -752,11 +752,6 @@ namespace CalamityMod.NPCs
|
||||
break;
|
||||
|
||||
case NPCID.Wizard:
|
||||
if (Main.rand.NextBool(10) && permadong != -1)
|
||||
{
|
||||
chat = "I'd let " + Main.npc[permadong].GivenName + " coldheart MY icicle.";
|
||||
}
|
||||
|
||||
if (Main.rand.NextBool(10) && Main.hardMode)
|
||||
{
|
||||
chat = "Space just got way too close for comfort.";
|
||||
|
||||
@@ -22,35 +22,13 @@ namespace CalamityMod.Projectiles.Melee
|
||||
projectile.ignoreWater = true;
|
||||
projectile.tileCollide = false;
|
||||
projectile.melee = true;
|
||||
projectile.penetrate = -1;
|
||||
projectile.timeLeft = 10;
|
||||
projectile.penetrate = -1;
|
||||
projectile.timeLeft = 5;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.75f / 255f, (255 - projectile.alpha) * 0f / 255f, (255 - projectile.alpha) * 0f / 255f);
|
||||
bool flag15 = false;
|
||||
bool flag16 = false;
|
||||
if (projectile.velocity.X < 0f && projectile.position.X < projectile.ai[0])
|
||||
{
|
||||
flag15 = true;
|
||||
}
|
||||
if (projectile.velocity.X > 0f && projectile.position.X > projectile.ai[0])
|
||||
{
|
||||
flag15 = true;
|
||||
}
|
||||
if (projectile.velocity.Y < 0f && projectile.position.Y < projectile.ai[1])
|
||||
{
|
||||
flag16 = true;
|
||||
}
|
||||
if (projectile.velocity.Y > 0f && projectile.position.Y > projectile.ai[1])
|
||||
{
|
||||
flag16 = true;
|
||||
}
|
||||
if (flag15 && flag16)
|
||||
{
|
||||
projectile.Kill();
|
||||
}
|
||||
Lighting.AddLight(projectile.Center, 0.75f, 0f, 0f);
|
||||
float num461 = 25f;
|
||||
if (projectile.ai[0] > 180f)
|
||||
{
|
||||
@@ -64,12 +42,12 @@ namespace CalamityMod.Projectiles.Melee
|
||||
num461 *= 0.7f;
|
||||
projectile.ai[0] += 4f;
|
||||
int num462 = 0;
|
||||
while ((float)num462 < num461)
|
||||
while (num462 < num461)
|
||||
{
|
||||
float num463 = (float)Main.rand.Next(-10, 11);
|
||||
float num464 = (float)Main.rand.Next(-10, 11);
|
||||
float num465 = (float)Main.rand.Next(3, 9);
|
||||
float num466 = (float)Math.Sqrt((double)(num463 * num463 + num464 * num464));
|
||||
float num463 = Main.rand.Next(-10, 11);
|
||||
float num464 = Main.rand.Next(-10, 11);
|
||||
float num465 = Main.rand.Next(3, 9);
|
||||
float num466 = (float)Math.Sqrt(num463 * num463 + num464 * num464);
|
||||
num466 = num465 / num466;
|
||||
num463 *= num466;
|
||||
num464 *= num466;
|
||||
@@ -78,13 +56,18 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Main.dust[num467].position.X = projectile.Center.X;
|
||||
Main.dust[num467].position.Y = projectile.Center.Y;
|
||||
Dust expr_149DF_cp_0 = Main.dust[num467];
|
||||
expr_149DF_cp_0.position.X += (float)Main.rand.Next(-10, 11);
|
||||
expr_149DF_cp_0.position.X += Main.rand.Next(-10, 11);
|
||||
Dust expr_14A09_cp_0 = Main.dust[num467];
|
||||
expr_14A09_cp_0.position.Y += (float)Main.rand.Next(-10, 11);
|
||||
expr_14A09_cp_0.position.Y += Main.rand.Next(-10, 11);
|
||||
Main.dust[num467].velocity.X = num463;
|
||||
Main.dust[num467].velocity.Y = num464;
|
||||
num462++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.immune[projectile.owner] = 6;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -9,7 +8,7 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
{
|
||||
public class GladiatorSword : ModProjectile
|
||||
{
|
||||
private double rotation = 0;
|
||||
private double rotation = 0D;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -32,11 +31,10 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
projectile.friendly = true;
|
||||
projectile.hostile = false;
|
||||
bool flag64 = projectile.type == ModContent.ProjectileType<GladiatorSword>();
|
||||
Player player = Main.player[projectile.owner];
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
|
||||
if (projectile.localAI[0] == 0f)
|
||||
{
|
||||
projectile.Calamity().spawnedPlayerMinionDamageValue = player.AverageDamage();
|
||||
@@ -50,32 +48,32 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
player.AverageDamage());
|
||||
projectile.damage = damage2;
|
||||
}
|
||||
|
||||
if (!modPlayer.gladiatorSword)
|
||||
{
|
||||
projectile.active = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (flag64)
|
||||
{
|
||||
if (player.dead)
|
||||
{
|
||||
modPlayer.glSword = false;
|
||||
}
|
||||
if (modPlayer.glSword)
|
||||
{
|
||||
projectile.timeLeft = 2;
|
||||
}
|
||||
}
|
||||
Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.15f / 255f, (255 - projectile.alpha) * 0.15f / 255f, (255 - projectile.alpha) * 0.01f / 255f);
|
||||
|
||||
Lighting.AddLight(projectile.Center, 0.15f, 0.15f, 0f);
|
||||
|
||||
Vector2 vector = player.Center - projectile.Center;
|
||||
projectile.rotation = vector.ToRotation() - 1.57f;
|
||||
projectile.rotation = vector.ToRotation() - MathHelper.PiOver2;
|
||||
|
||||
projectile.Center = player.Center + new Vector2(80, 0).RotatedBy(rotation);
|
||||
double rotateAmt = CalamityWorld.downedDoG ? 0.1 : NPC.downedMoonlord ? 0.08 : NPC.downedPlantBoss ? 0.05 : Main.hardMode ? 0.04 : 0.03;
|
||||
rotation += rotateAmt;
|
||||
if (rotation >= 360)
|
||||
{
|
||||
rotation = 0;
|
||||
}
|
||||
|
||||
rotation += 0.1;
|
||||
if (rotation >= 360D)
|
||||
rotation = 0D;
|
||||
|
||||
projectile.velocity.X = (vector.X > 0f) ? -0.000001f : 0f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -9,7 +8,7 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
{
|
||||
public class GladiatorSword2 : ModProjectile
|
||||
{
|
||||
private double rotation = 0;
|
||||
private double rotation = 0D;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -33,11 +32,10 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
projectile.friendly = true;
|
||||
projectile.hostile = false;
|
||||
bool flag64 = projectile.type == ModContent.ProjectileType<GladiatorSword2>();
|
||||
Player player = Main.player[projectile.owner];
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
|
||||
if (projectile.localAI[0] == 0f)
|
||||
{
|
||||
projectile.Calamity().spawnedPlayerMinionDamageValue = player.AverageDamage();
|
||||
@@ -51,33 +49,33 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
player.AverageDamage());
|
||||
projectile.damage = damage2;
|
||||
}
|
||||
|
||||
if (!modPlayer.gladiatorSword)
|
||||
{
|
||||
projectile.active = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (flag64)
|
||||
{
|
||||
if (player.dead)
|
||||
{
|
||||
modPlayer.glSword = false;
|
||||
}
|
||||
if (modPlayer.glSword)
|
||||
{
|
||||
projectile.timeLeft = 2;
|
||||
}
|
||||
}
|
||||
Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.15f / 255f, (255 - projectile.alpha) * 0.15f / 255f, (255 - projectile.alpha) * 0.01f / 255f);
|
||||
|
||||
Lighting.AddLight(projectile.Center, 0.15f, 0.15f, 0f);
|
||||
|
||||
Vector2 vector = player.Center - projectile.Center;
|
||||
projectile.rotation = vector.ToRotation() - 1.57f;
|
||||
projectile.rotation = vector.ToRotation() - MathHelper.PiOver2;
|
||||
|
||||
projectile.Center = player.Center + new Vector2(80, 0).RotatedBy(rotation);
|
||||
double rotateAmt = CalamityWorld.downedDoG ? 0.09 : NPC.downedMoonlord ? 0.07 : NPC.downedPlantBoss ? 0.04 : Main.hardMode ? 0.03 : 0.02;
|
||||
//values are slightly different from the other sword to make this sword marginally slower so the intersection point isn't always at the same spot
|
||||
rotation -= rotateAmt;
|
||||
if (rotation <= 0)
|
||||
{
|
||||
rotation = 360;
|
||||
}
|
||||
|
||||
// Values are slightly different from the other sword to make this sword marginally slower so the intersection point isn't always at the same spot
|
||||
rotation -= 0.09;
|
||||
if (rotation <= 0D)
|
||||
rotation = 360D;
|
||||
|
||||
projectile.velocity.X = (vector.X > 0f) ? -0.000001f : 0f;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user