Merge branch 'master' of https://github.com/UncleDanny/CalamityMod
No files matched your search
@@ -0,0 +1,29 @@
|
||||
using CalamityMod.Projectiles.Pets;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Pets
|
||||
{
|
||||
public class PlaguebringerBabBuff : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Plaguebringer Bab");
|
||||
Description.SetDefault("The baby plaguebringer sees you as the queen");
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.vanityPet[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.buffTime[buffIndex] = 18000;
|
||||
player.Calamity().plaguebringerBab = true;
|
||||
bool petProjectileNotSpawned = player.ownedProjectileCounts[ModContent.ProjectileType<PlaguebringerBab>()] <= 0;
|
||||
if (petProjectileNotSpawned && player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
int bee = Projectile.NewProjectile(player.position.X + (float)(player.width / 2), player.position.Y + (float)(player.height / 2), 0f, 0f, ModContent.ProjectileType<PlaguebringerBab>(), 0, 0f, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[bee].frame = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 571 B |
@@ -240,6 +240,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool perfmini = false;
|
||||
public bool akato = false;
|
||||
public bool leviPet = false;
|
||||
public bool plaguebringerBab = false;
|
||||
public bool rotomPet = false;
|
||||
public bool sparks = false;
|
||||
public bool sirenPet = false;
|
||||
@@ -1248,6 +1249,7 @@ namespace CalamityMod.CalPlayer
|
||||
perfmini = false;
|
||||
akato = false;
|
||||
leviPet = false;
|
||||
plaguebringerBab = false;
|
||||
rotomPet = false;
|
||||
sparks = false;
|
||||
sirenPet = false;
|
||||
|
||||
@@ -1234,7 +1234,8 @@ namespace CalamityMod
|
||||
ItemID.ChristmasTreeSword,
|
||||
ItemID.MonkStaffT1,
|
||||
ItemID.InfernoFork,
|
||||
ItemID.VenomStaff
|
||||
ItemID.VenomStaff,
|
||||
ItemID.Frostbrand
|
||||
};
|
||||
|
||||
fiftyDamageBuffList = new List<int>()
|
||||
|
||||
@@ -104,7 +104,7 @@ namespace CalamityMod.Items
|
||||
item.damage = (int)(item.damage * 1.25);
|
||||
else if (CalamityMod.twentyDamageBuffList?.Contains(item.type) ?? false)
|
||||
item.damage = (int)(item.damage * 1.2);
|
||||
else if (item.type == ItemID.Frostbrand || item.type == ItemID.MagnetSphere)
|
||||
else if (item.type == ItemID.MagnetSphere)
|
||||
item.damage = (int)(item.damage * 1.1);
|
||||
else if (item.type == ItemID.Razorpine)
|
||||
item.damage = (int)(item.damage * 0.95);
|
||||
|
||||
|
Before Width: | Height: | Size: 550 B After Width: | Height: | Size: 504 B |
@@ -0,0 +1,33 @@
|
||||
using CalamityMod.Buffs.Pets;
|
||||
using CalamityMod.Projectiles.Pets;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Pets
|
||||
{
|
||||
public class PlagueCaller : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Plague Caller");
|
||||
Tooltip.SetDefault("Summons a baby Plaguebringer pet");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.CloneDefaults(ItemID.ZephyrFish);
|
||||
item.shoot = ModContent.ProjectileType<PlaguebringerBab>();
|
||||
item.buffType = ModContent.BuffType<PlaguebringerBabBuff>();
|
||||
item.rare = 7;
|
||||
}
|
||||
|
||||
public override void UseStyle(Player player)
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer && player.itemTime == 0)
|
||||
{
|
||||
player.AddBuff(item.buffType, 3600, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 517 B |
|
Before Width: | Height: | Size: 642 B After Width: | Height: | Size: 540 B |
|
Before Width: | Height: | Size: 414 B After Width: | Height: | Size: 479 B |
@@ -12,7 +12,8 @@ namespace CalamityMod.Items.SummonItems
|
||||
{
|
||||
DisplayName.SetDefault("Abombination");
|
||||
Tooltip.SetDefault("Calls in the airborne jungle abomination\n" +
|
||||
"Summons the Plaguebringer Goliath");
|
||||
"Summons the Plaguebringer Goliath\n" +
|
||||
"The boss enrages in the open air of the surface");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -13,7 +13,8 @@ namespace CalamityMod.Items.SummonItems
|
||||
{
|
||||
DisplayName.SetDefault("Charred Idol");
|
||||
Tooltip.SetDefault("Use in the Brimstone Crag at your own risk\n" +
|
||||
"Summons the Brimstone Elemental");
|
||||
"Summons the Brimstone Elemental\n" +
|
||||
"The boss enrages outside of her home in the crags");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -11,7 +11,8 @@ namespace CalamityMod.Items.SummonItems
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Cryo Key");
|
||||
Tooltip.SetDefault("Summons Cryogen");
|
||||
Tooltip.SetDefault("Summons Cryogen\n" +
|
||||
"The boss enrages outside of the snowy tundra");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Armor.Vanity;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Pets;
|
||||
using CalamityMod.Items.Weapons.Magic;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
@@ -66,6 +67,7 @@ namespace CalamityMod.Items.TreasureBags
|
||||
|
||||
// Vanity
|
||||
DropHelper.DropItemChance(player, ModContent.ItemType<PlaguebringerGoliathMask>(), 7);
|
||||
DropHelper.DropItemChance(player, ModContent.ItemType<PlagueCaller>(), 10);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 995 B After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 737 B After Width: | Height: | Size: 16 KiB |
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
}
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 50;
|
||||
item.damage = 75;
|
||||
item.magic = true;
|
||||
item.mana = 7;
|
||||
item.width = 28;
|
||||
@@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
item.scale = 0.9f;
|
||||
item.autoReuse = true;
|
||||
item.shoot = ModContent.ProjectileType<Icicle>();
|
||||
item.shootSpeed = 12f;
|
||||
item.shootSpeed = 15f;
|
||||
}
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
}
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 90;
|
||||
item.damage = 120;
|
||||
item.melee = true;
|
||||
item.width = 58;
|
||||
item.height = 58;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 58;
|
||||
item.damage = 50;
|
||||
item.damage = 75;
|
||||
item.melee = true;
|
||||
item.useAnimation = 23;
|
||||
item.useTime = 23;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 50;
|
||||
item.width = 52;
|
||||
item.damage = 85;
|
||||
item.melee = true;
|
||||
item.useAnimation = 16;
|
||||
@@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.knockBack = 6;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.autoReuse = true;
|
||||
item.height = 58;
|
||||
item.height = 60;
|
||||
item.value = Item.buyPrice(0, 80, 0, 0);
|
||||
item.rare = 8;
|
||||
item.shoot = ModContent.ProjectileType<TemporalFloeSwordProjectile>();
|
||||
|
||||
|
Before Width: | Height: | Size: 807 B After Width: | Height: | Size: 441 B |
@@ -12,13 +12,14 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
DisplayName.SetDefault("True Caustic Edge");
|
||||
Tooltip.SetDefault("Fires a bouncing caustic beam\n" +
|
||||
"Bounces increase the beam's damage\n" +
|
||||
"Inflicts on fire, poison, and venom");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 64;
|
||||
item.damage = 75;
|
||||
item.damage = 100;
|
||||
item.melee = true;
|
||||
item.useAnimation = 28;
|
||||
item.useStyle = 1;
|
||||
@@ -36,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, (int)(damage * 0.8), knockBack, player.whoAmI, 0f, 0f);
|
||||
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, (int)(damage * 0.75), knockBack, player.whoAmI, 0f, 0f);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,12 +15,12 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
}
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 60;
|
||||
item.damage = 80;
|
||||
item.ranged = true;
|
||||
item.width = 42;
|
||||
item.height = 62;
|
||||
item.useTime = 20;
|
||||
item.useAnimation = 20;
|
||||
item.useTime = 18;
|
||||
item.useAnimation = 18;
|
||||
item.useStyle = 5;
|
||||
item.useTurn = false;
|
||||
item.noMelee = true;
|
||||
@@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
float SpeedX = speedX + (float)Main.rand.Next(-10, 11) * 0.05f;
|
||||
float SpeedY = speedY + (float)Main.rand.Next(-10, 11) * 0.05f;
|
||||
int index = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, ModContent.ProjectileType<IcicleArrowProj>(), (int)(damage * 0.5f), knockBack, player.whoAmI, 0f, 0f);
|
||||
int index = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, ModContent.ProjectileType<IcicleArrowProj>(), (int)(damage * 0.75f), knockBack, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[index].noDropItem = true;
|
||||
|
||||
return true;
|
||||
|
||||
@@ -18,12 +18,12 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 20;
|
||||
item.damage = 15;
|
||||
item.ranged = true;
|
||||
item.width = 20;
|
||||
item.height = 62;
|
||||
item.useTime = 29;
|
||||
item.useAnimation = 29;
|
||||
item.useTime = 30;
|
||||
item.useAnimation = 30;
|
||||
item.useStyle = 5;
|
||||
item.noMelee = true;
|
||||
item.knockBack = 1.5f;
|
||||
@@ -55,7 +55,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
}
|
||||
if (type == ProjectileID.WoodenArrowFriendly)
|
||||
{
|
||||
int num123 = Projectile.NewProjectile(vector2.X + value9.X, vector2.Y + value9.Y, speedX, speedY, ModContent.ProjectileType<FlareBat>(), (int)(damage * 1.25), knockBack, player.whoAmI, 0f, 0f);
|
||||
int num123 = Projectile.NewProjectile(vector2.X + value9.X, vector2.Y + value9.Y, speedX, speedY, ModContent.ProjectileType<FlareBat>(), damage, knockBack, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[num123].noDropItem = true;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 76;
|
||||
item.damage = 65;
|
||||
item.mana = 10;
|
||||
item.width = 46;
|
||||
item.height = 46;
|
||||
|
||||
@@ -369,7 +369,7 @@ namespace CalamityMod
|
||||
int type = NPCType<PlaguebringerGoliath>();
|
||||
int summon = ItemType<Abomination>();
|
||||
List<int> loot = new List<int>() { ItemType<PlaguebringerGoliathBag>(), ItemType<PlagueCellCluster>(), ItemType<VirulentKatana>(), ItemType<DiseasedPike>(), ItemType<ThePlaguebringer>(), ItemType<Malevolence>(), ItemType<PestilentDefiler>(), ItemType<TheHive>(), ItemType<MepheticSprayer>(), ItemType<PlagueStaff>(), ItemType<TheSyringe>(), ItemType<FuelCellBundle>(), ItemType<InfectedRemote>(), ItemType<Malachite>(), ItemType<BloomStone>(), ItemType<ToxicHeart>(), ItemID.GreaterHealingPotion };
|
||||
List<int> collection = new List<int>() { ItemType<PlaguebringerGoliathTrophy>(), ItemType<PlaguebringerGoliathMask>(), ItemType<KnowledgePlaguebringerGoliath>() };
|
||||
List<int> collection = new List<int>() { ItemType<PlaguebringerGoliathTrophy>(), ItemType<PlaguebringerGoliathMask>(), ItemType<KnowledgePlaguebringerGoliath>(), ItemType<PlagueCaller>() };
|
||||
string instructions = $"Use an [i:{summon}] in the Jungle Biome";
|
||||
string despawn = CalamityUtils.ColorMessage("HOSTILE SPECIMENS TERMINATED. INITIATE RECALL TO HOME BASE.", new Color(0x00, 0xFF, 0x00));
|
||||
string bossLogTex = "CalamityMod/NPCs/PlaguebringerGoliath/PlaguebringerGoliath_BossChecklist";
|
||||
|
||||
@@ -3374,6 +3374,52 @@ namespace CalamityMod.NPCs
|
||||
if (npc.townNPC && projectile.hostile)
|
||||
damage *= 2;
|
||||
|
||||
if (!projectile.npcProj && !projectile.trap)
|
||||
{
|
||||
if (ShouldAffectNPC(npc) && Main.rand.NextBool(15) && !CalamityPlayer.areThereAnyDamnBosses)
|
||||
{
|
||||
if (modPlayer.eGauntlet && projectile.melee)
|
||||
{
|
||||
damage = npc.lifeMax * 3;
|
||||
}
|
||||
|
||||
if (modPlayer.eTalisman && projectile.magic)
|
||||
{
|
||||
damage = npc.lifeMax * 3;
|
||||
}
|
||||
|
||||
if (modPlayer.nanotech && projectile.Calamity().rogue)
|
||||
{
|
||||
damage = npc.lifeMax * 3;
|
||||
}
|
||||
|
||||
if (modPlayer.eQuiver && projectile.ranged)
|
||||
{
|
||||
damage = npc.lifeMax * 3;
|
||||
}
|
||||
|
||||
if (modPlayer.nucleogenesis)
|
||||
{
|
||||
if ((projectile.minion || projectile.sentry || ProjectileID.Sets.MinionShot[projectile.type] || ProjectileID.Sets.SentryShot[projectile.type] || CalamityMod.projectileMinionList.Contains(projectile.type)) && ShouldAffectNPC(npc) && Main.rand.NextBool(15))
|
||||
{
|
||||
damage = npc.lifeMax * 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (projectile.ranged && modPlayer.plagueReaper && pFlames > 0)
|
||||
{
|
||||
damage = (int)(damage * 1.1);
|
||||
}
|
||||
}
|
||||
|
||||
NPCResists(npc, projectile, damage);
|
||||
}
|
||||
|
||||
#region NPC Resists
|
||||
private void NPCResists(NPC npc, Projectile projectile, int damage)
|
||||
{
|
||||
Player player = Main.player[projectile.owner];
|
||||
if (AstrumDeusIDs.Contains(npc.type))
|
||||
{
|
||||
if (projectile.type == ModContent.ProjectileType<RainbowBoom>() || ProjectileID.Sets.StardustDragon[projectile.type])
|
||||
@@ -3407,22 +3453,22 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
if (projectile.type == ModContent.ProjectileType<ShatteredSunScorchedBlade>())
|
||||
{
|
||||
damage = (int)((double)damage * 0.9);
|
||||
damage = (int)(damage * 0.9);
|
||||
}
|
||||
else if (projectile.type == ModContent.ProjectileType<MoltenAmputatorProj>() || projectile.type == ModContent.ProjectileType<MoltenBlobThrown>())
|
||||
{
|
||||
if (projectile.penetrate == -1)
|
||||
projectile.penetrate = projectile.Calamity().stealthStrike ? 6 : 9;
|
||||
damage = (int)((double)damage * 0.75);
|
||||
damage = (int)(damage * 0.75);
|
||||
}
|
||||
else if (projectile.type == ModContent.ProjectileType<ElementalAxeMinion>() || projectile.type == ModContent.ProjectileType<DazzlingStabber>())
|
||||
{
|
||||
damage = (int)((double)damage * 0.5);
|
||||
damage = (int)(damage * 0.5);
|
||||
}
|
||||
|
||||
if (projectile.penetrate == -1 && !projectile.minion)
|
||||
{
|
||||
damage = (int)((double)damage * 0.2);
|
||||
damage = (int)(damage * 0.2);
|
||||
}
|
||||
else if (projectile.penetrate > 1)
|
||||
{
|
||||
@@ -3441,7 +3487,7 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
else if (projectile.type == ModContent.ProjectileType<SulphuricNukesplosion>())
|
||||
{
|
||||
damage /= 3;
|
||||
damage = (int)(damage * 0.5);
|
||||
}
|
||||
else if (projectile.type == ModContent.ProjectileType<SeasSearingSpout>())
|
||||
{
|
||||
@@ -3449,12 +3495,14 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
else if (projectile.type == ModContent.ProjectileType<ProfanedSwordProj>())
|
||||
{
|
||||
if (projectile.penetrate == -1)
|
||||
projectile.penetrate = 1;
|
||||
damage = (int)(damage * 0.1);
|
||||
}
|
||||
else if (projectile.type == ModContent.ProjectileType<BrimstoneSwordExplosion>())
|
||||
{
|
||||
if (projectile.penetrate == -1)
|
||||
projectile.penetrate = 3;
|
||||
projectile.penetrate = 2;
|
||||
damage = (int)(damage * 0.1);
|
||||
}
|
||||
}
|
||||
@@ -3470,13 +3518,15 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
else if (projectile.type == ModContent.ProjectileType<ProfanedSwordProj>())
|
||||
{
|
||||
damage = (int)(damage * 0.1);
|
||||
if (projectile.penetrate == -1)
|
||||
projectile.penetrate = 1;
|
||||
damage = (int)(damage * 0.05);
|
||||
}
|
||||
else if (projectile.type == ModContent.ProjectileType<BrimstoneSwordExplosion>())
|
||||
{
|
||||
if (projectile.penetrate == -1)
|
||||
projectile.penetrate = 3;
|
||||
damage = (int)(damage * 0.1);
|
||||
projectile.penetrate = 2;
|
||||
damage = (int)(damage * 0.05);
|
||||
}
|
||||
}
|
||||
else if (EaterofWorldsIDs.Contains(npc.type) || npc.type == NPCID.Creeper)
|
||||
@@ -3520,70 +3570,29 @@ namespace CalamityMod.NPCs
|
||||
damage = (int)(damage * 0.8);
|
||||
}
|
||||
}
|
||||
|
||||
if (!projectile.npcProj && !projectile.trap)
|
||||
else if (npc.type == NPCID.CultistBoss)
|
||||
{
|
||||
if (modPlayer.eGauntlet)
|
||||
{
|
||||
if (projectile.melee && ShouldAffectNPC(npc) && Main.rand.NextBool(15))
|
||||
{
|
||||
if (!CalamityPlayer.areThereAnyDamnBosses)
|
||||
{
|
||||
damage = npc.lifeMax * 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (modPlayer.eTalisman)
|
||||
{
|
||||
if (projectile.magic && ShouldAffectNPC(npc) && Main.rand.NextBool(15))
|
||||
{
|
||||
if (!CalamityPlayer.areThereAnyDamnBosses)
|
||||
{
|
||||
damage = npc.lifeMax * 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (modPlayer.nanotech)
|
||||
{
|
||||
if (projectile.Calamity().rogue && ShouldAffectNPC(npc) && Main.rand.NextBool(15))
|
||||
{
|
||||
if (!CalamityPlayer.areThereAnyDamnBosses)
|
||||
{
|
||||
damage = npc.lifeMax * 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (modPlayer.eQuiver)
|
||||
{
|
||||
if (projectile.ranged && ShouldAffectNPC(npc) && Main.rand.NextBool(15))
|
||||
{
|
||||
if (!CalamityPlayer.areThereAnyDamnBosses)
|
||||
{
|
||||
damage = npc.lifeMax * 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (modPlayer.nucleogenesis)
|
||||
{
|
||||
if ((projectile.minion || projectile.sentry || ProjectileID.Sets.MinionShot[projectile.type] || ProjectileID.Sets.SentryShot[projectile.type] || CalamityMod.projectileMinionList.Contains(projectile.type)) && ShouldAffectNPC(npc) && Main.rand.NextBool(15))
|
||||
{
|
||||
if (!CalamityPlayer.areThereAnyDamnBosses)
|
||||
{
|
||||
damage = npc.lifeMax * 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (projectile.ranged && modPlayer.plagueReaper && pFlames > 0)
|
||||
{
|
||||
damage = (int)(damage * 1.1);
|
||||
if (projectile.type == ModContent.ProjectileType<PurpleButterfly>() || projectile.type == ModContent.ProjectileType<SakuraBullet>())
|
||||
{
|
||||
damage = (int)(damage * 0.75);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (npc.type == NPCID.DukeFishron)
|
||||
{
|
||||
if (projectile.type == ModContent.ProjectileType<PurpleButterfly>() || projectile.type == ModContent.ProjectileType<SakuraBullet>())
|
||||
{
|
||||
damage = (int)(damage * 1.2);
|
||||
}
|
||||
}
|
||||
else if (npc.type == ModContent.NPCType<Providence.Providence>())
|
||||
{
|
||||
if (projectile.type == ModContent.ProjectileType<ElementalAxeMinion>())
|
||||
{
|
||||
damage = (int)(damage * 1.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region On Hit By Item
|
||||
|
||||
@@ -144,6 +144,7 @@ namespace CalamityMod.NPCs.HiveMind
|
||||
writer.Write(reelCount);
|
||||
writer.Write(counter);
|
||||
writer.Write(initialised);
|
||||
writer.Write(npc.dontTakeDamage);
|
||||
}
|
||||
|
||||
public override void ReceiveExtraAI(BinaryReader reader)
|
||||
@@ -158,6 +159,7 @@ namespace CalamityMod.NPCs.HiveMind
|
||||
reelCount = reader.ReadInt32();
|
||||
counter = reader.ReadInt32();
|
||||
initialised = reader.ReadBoolean();
|
||||
npc.dontTakeDamage = reader.ReadBoolean();
|
||||
}
|
||||
|
||||
public override void FindFrame(int frameHeight)
|
||||
@@ -304,7 +306,7 @@ namespace CalamityMod.NPCs.HiveMind
|
||||
|
||||
Player player = Main.player[npc.target];
|
||||
|
||||
npc.defense = (player.ZoneCorrupt || CalamityWorld.bossRushActive) ? 5 : 9999;
|
||||
npc.dontTakeDamage = (player.ZoneCorrupt || CalamityWorld.bossRushActive) ? false : true;
|
||||
|
||||
CalamityGlobalNPC.hiveMind = npc.whoAmI;
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 789 B After Width: | Height: | Size: 453 B |
@@ -4,6 +4,7 @@ using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Armor.Vanity;
|
||||
using CalamityMod.Items.LoreItems;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Pets;
|
||||
using CalamityMod.Items.Placeables.Furniture.Trophies;
|
||||
using CalamityMod.Items.TreasureBags;
|
||||
using CalamityMod.Items.Weapons.Magic;
|
||||
@@ -1152,6 +1153,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
|
||||
// Vanity
|
||||
DropHelper.DropItemChance(npc, ModContent.ItemType<PlaguebringerGoliathMask>(), 7);
|
||||
DropHelper.DropItemChance(npc, ModContent.ItemType<PlagueCaller>(), 10);
|
||||
}
|
||||
|
||||
// Mark PBG as dead
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Pets;
|
||||
using CalamityMod.Items.Placeables.Banners;
|
||||
using CalamityMod.Projectiles.Boss;
|
||||
using CalamityMod.World;
|
||||
@@ -676,6 +677,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath
|
||||
{
|
||||
DropHelper.DropItem(npc, ModContent.ItemType<PlagueCellCluster>(), 8, 12);
|
||||
DropHelper.DropItemChance(npc, ModContent.ItemType<PlaguedFuelPack>(), 10);
|
||||
DropHelper.DropItemChance(npc, ModContent.ItemType<PlagueCaller>(), 50); //no, this isn't getting boosted by Defiled. Rover, I don't care. PBG also drops it
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Items.Armor.Vanity;
|
||||
using CalamityMod.Items.LoreItems;
|
||||
using CalamityMod.Items.SummonItems;
|
||||
@@ -23,6 +24,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
{
|
||||
private int spearType = 0;
|
||||
private int dustTimer = 3;
|
||||
private int immuneTimer = 300;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -80,6 +82,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
{
|
||||
writer.Write(spearType);
|
||||
writer.Write(dustTimer);
|
||||
writer.Write(immuneTimer);
|
||||
writer.Write(npc.dontTakeDamage);
|
||||
}
|
||||
|
||||
@@ -87,6 +90,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
{
|
||||
spearType = reader.ReadInt32();
|
||||
dustTimer = reader.ReadInt32();
|
||||
immuneTimer = reader.ReadInt32();
|
||||
npc.dontTakeDamage = reader.ReadBoolean();
|
||||
}
|
||||
|
||||
@@ -149,10 +153,21 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
bool expertMode = Main.expertMode || CalamityWorld.bossRushActive;
|
||||
bool revenge = CalamityWorld.revenge || CalamityWorld.bossRushActive;
|
||||
bool death = CalamityWorld.death || CalamityWorld.bossRushActive;
|
||||
npc.defense = (isHoly || isHell || CalamityWorld.bossRushActive) ? 50 : 99999;
|
||||
|
||||
// Become immune over time if target isn't in hell or hallow
|
||||
if (!isHoly && !isHell && !CalamityWorld.bossRushActive)
|
||||
{
|
||||
if (immuneTimer > 0)
|
||||
immuneTimer--;
|
||||
}
|
||||
else
|
||||
immuneTimer = 300;
|
||||
|
||||
// Take damage or not
|
||||
npc.dontTakeDamage = immuneTimer <= 0;
|
||||
|
||||
bool flag100 = false;
|
||||
for (int num569 = 0; num569 < 200; num569++)
|
||||
for (int num569 = 0; num569 < Main.maxNPCs; num569++)
|
||||
{
|
||||
if ((Main.npc[num569].active && Main.npc[num569].type == ModContent.NPCType<ProfanedGuardianBoss2>()) || (Main.npc[num569].active && Main.npc[num569].type == ModContent.NPCType<ProfanedGuardianBoss3>()))
|
||||
{
|
||||
@@ -184,7 +199,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
{
|
||||
if (Main.rand.Next(3) < num1009)
|
||||
{
|
||||
int num1012 = Dust.NewDust(vectorCenter - new Vector2((float)num1010), num1010 * 2, num1010 * 2, 244, npc.velocity.X * 0.5f, npc.velocity.Y * 0.5f, 90, default, 1.5f);
|
||||
int num1012 = Dust.NewDust(vectorCenter - new Vector2((float)num1010), num1010 * 2, num1010 * 2, (int)CalamityDusts.ProfanedFire, npc.velocity.X * 0.5f, npc.velocity.Y * 0.5f, 90, default, 1.5f);
|
||||
Main.dust[num1012].noGravity = true;
|
||||
Main.dust[num1012].velocity *= 0.2f;
|
||||
Main.dust[num1012].fadeIn = 1f;
|
||||
@@ -465,7 +480,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(npc.position, npc.width, npc.height, 244, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.ProfanedFire, hitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (npc.life <= 0)
|
||||
{
|
||||
@@ -475,7 +490,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/ProfanedGuardianBossGores/ProfanedGuardianBossA4"), 1f);
|
||||
for (int k = 0; k < 50; k++)
|
||||
{
|
||||
Dust.NewDust(npc.position, npc.width, npc.height, 244, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.ProfanedFire, hitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Projectiles.Boss;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.IO;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -15,6 +17,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
[AutoloadBossHead]
|
||||
public class ProfanedGuardianBoss2 : ModNPC
|
||||
{
|
||||
private int immuneTimer = 300;
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Profaned Guardian");
|
||||
@@ -67,6 +70,18 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
npc.DeathSound = SoundID.NPCDeath55;
|
||||
}
|
||||
|
||||
public override void SendExtraAI(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(immuneTimer);
|
||||
writer.Write(npc.dontTakeDamage);
|
||||
}
|
||||
|
||||
public override void ReceiveExtraAI(BinaryReader reader)
|
||||
{
|
||||
immuneTimer = reader.ReadInt32();
|
||||
npc.dontTakeDamage = reader.ReadBoolean();
|
||||
}
|
||||
|
||||
public override void FindFrame(int frameHeight)
|
||||
{
|
||||
npc.frameCounter += 0.15f;
|
||||
@@ -85,7 +100,19 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
bool expertMode = Main.expertMode;
|
||||
bool isHoly = player.ZoneHoly;
|
||||
bool isHell = player.ZoneUnderworldHeight;
|
||||
npc.defense = (isHoly || isHell || CalamityWorld.bossRushActive) ? 40 : 99999;
|
||||
|
||||
// Become immune over time if target isn't in hell or hallow
|
||||
if (!isHoly && !isHell && !CalamityWorld.bossRushActive)
|
||||
{
|
||||
if (immuneTimer > 0)
|
||||
immuneTimer--;
|
||||
}
|
||||
else
|
||||
immuneTimer = 300;
|
||||
|
||||
// Take damage or not
|
||||
npc.dontTakeDamage = immuneTimer <= 0;
|
||||
|
||||
Vector2 vectorCenter = npc.Center;
|
||||
|
||||
if (Math.Sign(npc.velocity.X) != 0)
|
||||
@@ -102,7 +129,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
int dustType = Main.rand.Next(2);
|
||||
if (dustType == 0)
|
||||
{
|
||||
dustType = 244;
|
||||
dustType = (int)CalamityDusts.ProfanedFire;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -279,7 +306,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(npc.position, npc.width, npc.height, 244, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.ProfanedFire, hitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (npc.life <= 0)
|
||||
{
|
||||
@@ -288,7 +315,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/ProfanedGuardianBossGores/ProfanedGuardianBossT3"), 1f);
|
||||
for (int k = 0; k < 50; k++)
|
||||
{
|
||||
Dust.NewDust(npc.position, npc.width, npc.height, 244, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.ProfanedFire, hitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Projectiles.Boss;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.IO;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -15,6 +17,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
[AutoloadBossHead]
|
||||
public class ProfanedGuardianBoss3 : ModNPC
|
||||
{
|
||||
private int immuneTimer = 300;
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Profaned Guardian");
|
||||
@@ -67,6 +70,18 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
npc.DeathSound = SoundID.NPCDeath55;
|
||||
}
|
||||
|
||||
public override void SendExtraAI(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(immuneTimer);
|
||||
writer.Write(npc.dontTakeDamage);
|
||||
}
|
||||
|
||||
public override void ReceiveExtraAI(BinaryReader reader)
|
||||
{
|
||||
immuneTimer = reader.ReadInt32();
|
||||
npc.dontTakeDamage = reader.ReadBoolean();
|
||||
}
|
||||
|
||||
public override void FindFrame(int frameHeight)
|
||||
{
|
||||
npc.frameCounter += 0.15f;
|
||||
@@ -85,7 +100,19 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
bool expertMode = Main.expertMode;
|
||||
bool isHoly = player.ZoneHoly;
|
||||
bool isHell = player.ZoneUnderworldHeight;
|
||||
npc.defense = (isHoly || isHell || CalamityWorld.bossRushActive) ? 40 : 99999;
|
||||
|
||||
// Become immune over time if target isn't in hell or hallow
|
||||
if (!isHoly && !isHell && !CalamityWorld.bossRushActive)
|
||||
{
|
||||
if (immuneTimer > 0)
|
||||
immuneTimer--;
|
||||
}
|
||||
else
|
||||
immuneTimer = 300;
|
||||
|
||||
// Take damage or not
|
||||
npc.dontTakeDamage = immuneTimer <= 0;
|
||||
|
||||
Vector2 vectorCenter = npc.Center;
|
||||
|
||||
if (Math.Sign(npc.velocity.X) != 0)
|
||||
@@ -102,7 +129,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
int dustType = Main.rand.Next(2);
|
||||
if (dustType == 0)
|
||||
{
|
||||
dustType = 244;
|
||||
dustType = (int)CalamityDusts.ProfanedFire;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -289,7 +316,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(npc.position, npc.width, npc.height, 244, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.ProfanedFire, hitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (npc.life <= 0)
|
||||
{
|
||||
@@ -300,7 +327,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians
|
||||
Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/ProfanedGuardianBossGores/ProfanedGuardianBossH5"), 1f);
|
||||
for (int k = 0; k < 50; k++)
|
||||
{
|
||||
Dust.NewDust(npc.position, npc.width, npc.height, 244, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.ProfanedFire, hitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Accessories.Wings;
|
||||
using CalamityMod.Items.Armor.Vanity;
|
||||
@@ -829,7 +830,7 @@ namespace CalamityMod.NPCs.Providence
|
||||
for (int num621 = 0; num621 < 40; num621++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(player2.position.X, player2.position.Y),
|
||||
player2.width, player2.height, 244, 0f, 0f, 100, default, 2f);
|
||||
player2.width, player2.height, (int)CalamityDusts.ProfanedFire, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
@@ -841,11 +842,11 @@ namespace CalamityMod.NPCs.Providence
|
||||
for (int num623 = 0; num623 < 60; num623++)
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(player2.position.X, player2.position.Y),
|
||||
player2.width, player2.height, 244, 0f, 0f, 100, default, 3f);
|
||||
player2.width, player2.height, (int)CalamityDusts.ProfanedFire, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 5f;
|
||||
num624 = Dust.NewDust(new Vector2(player2.position.X, player2.position.Y),
|
||||
player2.width, player2.height, 244, 0f, 0f, 100, default, 2f);
|
||||
player2.width, player2.height, (int)CalamityDusts.ProfanedFire, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
@@ -1058,7 +1059,7 @@ namespace CalamityMod.NPCs.Providence
|
||||
|
||||
for (int num1221 = 0; num1221 < 1 + num1220; num1221++)
|
||||
{
|
||||
int num1222 = 244;
|
||||
int num1222 = (int)CalamityDusts.ProfanedFire;
|
||||
float num1223 = 1.2f;
|
||||
if (num1221 % 2 == 1)
|
||||
num1223 = 2.8f;
|
||||
@@ -1446,7 +1447,7 @@ namespace CalamityMod.NPCs.Providence
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/ProvidenceHurt"), npc.Center);
|
||||
}
|
||||
for (int k = 0; k < 15; k++)
|
||||
Dust.NewDust(npc.position, npc.width, npc.height, 244, hitDirection, -1f, 0, default, 1f);
|
||||
Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.ProfanedFire, hitDirection, -1f, 0, default, 1f);
|
||||
|
||||
if (npc.life <= 0)
|
||||
{
|
||||
@@ -1463,7 +1464,7 @@ namespace CalamityMod.NPCs.Providence
|
||||
npc.position.Y = npc.position.Y - (float)(npc.height / 2);
|
||||
for (int num621 = 0; num621 < 60; num621++)
|
||||
{
|
||||
int num622 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 244, 0f, 0f, 100, default, 2f);
|
||||
int num622 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, (int)CalamityDusts.ProfanedFire, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num622].velocity *= 3f;
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
@@ -1473,10 +1474,10 @@ namespace CalamityMod.NPCs.Providence
|
||||
}
|
||||
for (int num623 = 0; num623 < 90; num623++)
|
||||
{
|
||||
int num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 244, 0f, 0f, 100, default, 3f);
|
||||
int num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, (int)CalamityDusts.ProfanedFire, 0f, 0f, 100, default, 3f);
|
||||
Main.dust[num624].noGravity = true;
|
||||
Main.dust[num624].velocity *= 5f;
|
||||
num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 244, 0f, 0f, 100, default, 2f);
|
||||
num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, (int)CalamityDusts.ProfanedFire, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2025,7 +2025,7 @@ namespace CalamityMod.Projectiles
|
||||
}
|
||||
}
|
||||
|
||||
public static void FloatingPetAI(Projectile projectile, bool lightPet = false, bool faceRight = false, float tiltFloat = 0.05f)
|
||||
public static void FloatingPetAI(Projectile projectile, bool faceRight, float tiltFloat, bool lightPet = false)
|
||||
{
|
||||
Player player = Main.player[projectile.owner];
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
|
||||
public override bool OnTileCollide(Vector2 oldVelocity)
|
||||
{
|
||||
projectile.damage = (int)((double)projectile.damage * 1.25);
|
||||
projectile.damage = (int)(projectile.damage * 1.25);
|
||||
projectile.penetrate--;
|
||||
if (projectile.penetrate <= 0)
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
projectile.width = 10;
|
||||
projectile.height = 10;
|
||||
projectile.friendly = true;
|
||||
projectile.penetrate = 4;
|
||||
projectile.penetrate = -1;
|
||||
projectile.aiStyle = 113;
|
||||
projectile.timeLeft = 600;
|
||||
aiType = ProjectileID.BoneJavelin;
|
||||
@@ -61,9 +61,6 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (CalamityGlobalNPC.AquaticScourgeIDs.Contains(target.type) || CalamityGlobalNPC.DestroyerIDs.Contains(target.type))
|
||||
projectile.penetrate--;
|
||||
|
||||
target.immune[projectile.owner] = 6;
|
||||
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 180);
|
||||
if (Main.myPlayer == projectile.owner)
|
||||
|
||||
@@ -24,6 +24,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
projectile.melee = true;
|
||||
projectile.penetrate = 3;
|
||||
projectile.timeLeft = 600;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 10;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
@@ -47,6 +49,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
public override bool OnTileCollide(Vector2 oldVelocity)
|
||||
{
|
||||
projectile.damage = (int)(projectile.damage * 1.25);
|
||||
projectile.penetrate--;
|
||||
if (projectile.penetrate <= 0)
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Pets
|
||||
{
|
||||
projectile.timeLeft = 2;
|
||||
}
|
||||
CalamityGlobalProjectile.FloatingPetAI(projectile, false, true, 0.02f);
|
||||
CalamityGlobalProjectile.FloatingPetAI(projectile, true, 0.02f);
|
||||
projectile.frameCounter++;
|
||||
if (projectile.frameCounter > 6)
|
||||
{
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace CalamityMod.Projectiles.Pets
|
||||
{
|
||||
Lighting.AddLight(projectile.Center, 0.1f, 0.3f, 0.5f);
|
||||
}
|
||||
CalamityGlobalProjectile.FloatingPetAI(projectile, true);
|
||||
CalamityGlobalProjectile.FloatingPetAI(projectile, false, 0.05f, true);
|
||||
projectile.frameCounter++;
|
||||
if (projectile.frameCounter > 6)
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Pets
|
||||
{
|
||||
projectile.timeLeft = 2;
|
||||
}
|
||||
CalamityGlobalProjectile.FloatingPetAI(projectile);
|
||||
CalamityGlobalProjectile.FloatingPetAI(projectile, false, 0.05f);
|
||||
projectile.frameCounter++;
|
||||
if (projectile.frameCounter > 6)
|
||||
{
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace CalamityMod.Projectiles.Pets
|
||||
projectile.timeLeft = 2;
|
||||
}
|
||||
|
||||
CalamityGlobalProjectile.FloatingPetAI(projectile, false, true, 0.1f);
|
||||
CalamityGlobalProjectile.FloatingPetAI(projectile, true, 0.1f);
|
||||
|
||||
//Dust
|
||||
if (Main.rand.NextBool(50))
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Projectiles.Pets
|
||||
{
|
||||
public class PlaguebringerBab : ModProjectile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Plaguebringer Bab");
|
||||
Main.projFrames[projectile.type] = 4;
|
||||
Main.projPet[projectile.type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.netImportant = true;
|
||||
projectile.width = 30;
|
||||
projectile.height = 30;
|
||||
projectile.friendly = true;
|
||||
projectile.penetrate = -1;
|
||||
projectile.timeLeft *= 5;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Player player = Main.player[projectile.owner];
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (!player.active)
|
||||
{
|
||||
projectile.active = false;
|
||||
return;
|
||||
}
|
||||
if (player.dead)
|
||||
{
|
||||
modPlayer.plaguebringerBab = false;
|
||||
}
|
||||
if (modPlayer.plaguebringerBab)
|
||||
{
|
||||
projectile.timeLeft = 2;
|
||||
}
|
||||
CalamityGlobalProjectile.FloatingPetAI(projectile, false, 0.05f);
|
||||
projectile.frameCounter++;
|
||||
if (projectile.frameCounter > 6)
|
||||
{
|
||||
projectile.frame++;
|
||||
projectile.frameCounter = 0;
|
||||
}
|
||||
if (projectile.frame >= 4)
|
||||
{
|
||||
projectile.frame = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
@@ -75,7 +75,7 @@ namespace CalamityMod.Projectiles.Pets
|
||||
dust += 1f;
|
||||
}
|
||||
|
||||
CalamityGlobalProjectile.FloatingPetAI(projectile, false, true);
|
||||
CalamityGlobalProjectile.FloatingPetAI(projectile, true, 0.05f);
|
||||
|
||||
projectile.frameCounter++;
|
||||
if (projectile.frameCounter > 6)
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace CalamityMod.Projectiles.Pets
|
||||
{
|
||||
projectile.timeLeft = 2;
|
||||
}
|
||||
CalamityGlobalProjectile.FloatingPetAI(projectile);
|
||||
CalamityGlobalProjectile.FloatingPetAI(projectile, false, 0.05f);
|
||||
projectile.frameCounter++;
|
||||
if (projectile.frameCounter > 6)
|
||||
{
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Pets
|
||||
{
|
||||
projectile.timeLeft = 2;
|
||||
}
|
||||
CalamityGlobalProjectile.FloatingPetAI(projectile, false, true, 0.1f);
|
||||
CalamityGlobalProjectile.FloatingPetAI(projectile, true, 0.1f);
|
||||
//Animation
|
||||
projectile.frameCounter++;
|
||||
if (projectile.frameCounter > 6)
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
projectile.penetrate = 3;
|
||||
projectile.extraUpdates = 1;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 10;
|
||||
projectile.localNPCHitCooldown = 20;
|
||||
projectile.coldDamage = true;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
}
|
||||
if (projectile.owner == Main.myPlayer)
|
||||
{
|
||||
for (int index = 0; index < 2; ++index)
|
||||
for (int index = 0; index < Main.rand.Next(1,3); ++index) //1 to 2
|
||||
{
|
||||
float SpeedX = -projectile.velocity.X * Main.rand.Next(40, 70) * 0.01f + Main.rand.Next(-20, 21) * 0.4f;
|
||||
float SpeedY = -projectile.velocity.Y * Main.rand.Next(40, 70) * 0.01f + Main.rand.Next(-20, 21) * 0.4f;
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
player.MinionDamage());
|
||||
projectile.damage = damage2;
|
||||
}
|
||||
if ((double)Math.Abs(projectile.velocity.X) > 0.2)
|
||||
if (Math.Abs(projectile.velocity.X) > 0.2f)
|
||||
{
|
||||
projectile.spriteDirection = -projectile.direction;
|
||||
}
|
||||
@@ -75,8 +75,8 @@ namespace CalamityMod.Projectiles.Summon
|
||||
projectile.frame = 0;
|
||||
}
|
||||
Lighting.AddLight(projectile.Center, 0.3f, 0.2f, 0.3f);
|
||||
float num633 = 700f;
|
||||
float num634 = 1100f;
|
||||
float num633 = 1200f;
|
||||
float num634 = 1500f;
|
||||
float num635 = 2400f;
|
||||
float num636 = 150f;
|
||||
bool flag64 = projectile.type == ModContent.ProjectileType<PinkButterfly>();
|
||||
|
||||
@@ -77,9 +77,9 @@ namespace CalamityMod.Projectiles.Summon
|
||||
projectile.frame = 0;
|
||||
}
|
||||
Lighting.AddLight(projectile.Center, 0.3f, 0f, 0.5f);
|
||||
float num633 = 800f;
|
||||
float num634 = 1000f;
|
||||
float num635 = 1600f;
|
||||
float num633 = 1200f;
|
||||
float num634 = 1500f;
|
||||
float num635 = 2400f;
|
||||
float num636 = 150f;
|
||||
bool flag64 = projectile.type == ModContent.ProjectileType<PurpleButterfly>();
|
||||
player.AddBuff(ModContent.BuffType<ResurrectionButterflyBuff>(), 3600);
|
||||
@@ -280,12 +280,6 @@ namespace CalamityMod.Projectiles.Summon
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection)
|
||||
{
|
||||
if (target.type == NPCID.CultistBoss)
|
||||
damage = (int)(damage * 0.75);
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.immune[projectile.owner] = 6;
|
||||
|
||||
@@ -96,12 +96,6 @@ namespace CalamityMod.Projectiles.Summon
|
||||
Main.dust[num458].velocity += projectile.velocity * 0.1f;
|
||||
}
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection)
|
||||
{
|
||||
if (target.type == NPCID.CultistBoss)
|
||||
damage = (int)(damage * 0.75);
|
||||
}
|
||||
|
||||
public override void Kill(int timeLeft)
|
||||
{
|
||||
Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 25);
|
||||
|
||||