1 - Reduced severity of boss rush i-frame curse from 5 seconds to 3 seconds.
2 - Provi darkness is now at max distance during all attacks while any guardian is alive. 3 - Elemental Quiver increases ranged damage by 15% instead of 10%. 4 - Increased Frequency Manipulator damage by 13 and made it throw the spear sooner. 5 - Increased Galvanizing Glaive damage by 16 and made the spear itself ignore more i-frames. 6 - Increased Gauss Dagger size by 50% and allowed the player to turn while using it. 7 - Decreased Gauss Pistol damage by 20 and made the projectile stay still for half the time. 8 - Increased Plasma Grenade damage by 1000 and gave it an impact sound. 9 - Increased Pulse Rifle damage by 2000. 10 - Increased Snake Eyes damage by 15 and made the leash distance longer. 11 - Decreased Taser damage by 6 and increased the velocity of it. 12 - Increased Tesla Cannon damage by 5000 and increased split beam damage by 10%. 13 - Tripled Wave Pounder damage. 14 - Reduced Shadowdrop Staff projectiles from 20 per use to 6 and reduced spread by 75%. 15 - Increased Ancient Crusher size by 50% again. 16 - Increased Astral Blade damage due to how dangerous it is to use at times. 17 - Gave Brimlance, Earthen Pike, Fulguration Halberd, Goldplume Spear, Hellion Flower Spear, Marnite Spear, Sausage Maker, Starnight Lance, Urchin Spear and Yateveo Bloom autoswing. 18 - Increased Earthen Pike, Majestic Guard and Fulguration Halberd size by 50%. 19 - Decreased Insidious Impaler damage by 40. 20 - Ultimus Cleaver explodes on hit now and increased size by 50%. 21 - Decreased Arterial Assault damage by 32. 22 - Onyxia onyx shard travels further. 23 - Increased God's Bellows range. 24 - Made SCal bullet hell 5 feel less rng with how full or empty it can sometimes feel. 25 - Reduced how often Supreme Catastrophe fires projectiles. 26 - Reduced how insane Old Duke is in Boss Rush. 27 - Reduced Rev+ Destroyer laser speed again from 14 to 12. 28 - Fixed a bug with Rev+ Destroyer flying phase lights where they'd show even when broken. 29 - Dark Energies resist piercing. 30 - Skeletron Head is now immune to all debuffs. 31 - Storm Weaver phase 2 resists Wave Pounder. 32 - Increased Volt Crasher Voltage Stream damage. 33 - Destroyer and Aquatic Scourge resist Volt Crasher. 34 - Gauss Rifle dust particles are smaller and the explosion no longer vanishes when tiles are near it, made the explosion pierce infinitely. 35 - Pole Warpers ignore more i-frames. 36 - Gave Pulse Dragon an extra update. 37 - Decreased Tracking Disk laser damage. 38 - Matter Modulator projectiles now deal a third of their damage if they haven't hit a tile yet to avoid confusion. 39 - Astral Pike stars now home in. 40 - Gilded Proboscis heals less often. 41 - Increased Goldplume Spear feather damage. 42 - Increased Avalanche ice shard damage. 43 - Gave Mourningstar an extra update and made it ignore more i-frames. 44 - True Caustic Edge projectiles no longer gain damage on tile collision. 45 - Version bump.
This commit is contained in:
1 parent
ac43dddd63
commit
1bf3de0b06
87 files changed
+331
-265
No files matched your search
@@ -7896,7 +7896,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (BossRushEvent.BossRushActive && CalamityConfig.Instance.BossRushImmunityFrameCurse)
|
||||
{
|
||||
bossRushImmunityFrameCurseTimer = 300 + player.immuneTime;
|
||||
bossRushImmunityFrameCurseTimer = 180 + player.immuneTime;
|
||||
}
|
||||
if (damage > 25)
|
||||
{
|
||||
|
||||
@@ -131,7 +131,24 @@ namespace CalamityMod.CalPlayer
|
||||
float shorterSpearCocoonDistance = CalamityWorld.death ? 1000f : CalamityWorld.revenge ? 400f : Main.expertMode ? 200f : 0f;
|
||||
float shorterDistance = aiState == 2f ? shorterFlameCocoonDistance : shorterSpearCocoonDistance;
|
||||
|
||||
float maxDistance = (aiState == 2f || aiState == 5f) ? baseDistance - MathHelper.Lerp(0f, shorterDistance, MathHelper.Clamp(aiTimer / 120f, 0f, 1f)) : baseDistance;
|
||||
bool guardianAlive = false;
|
||||
if (CalamityGlobalNPC.holyBossAttacker != -1)
|
||||
{
|
||||
if (Main.npc[CalamityGlobalNPC.holyBossAttacker].active)
|
||||
guardianAlive = true;
|
||||
}
|
||||
if (CalamityGlobalNPC.holyBossDefender != -1)
|
||||
{
|
||||
if (Main.npc[CalamityGlobalNPC.holyBossDefender].active)
|
||||
guardianAlive = true;
|
||||
}
|
||||
if (CalamityGlobalNPC.holyBossHealer != -1)
|
||||
{
|
||||
if (Main.npc[CalamityGlobalNPC.holyBossHealer].active)
|
||||
guardianAlive = true;
|
||||
}
|
||||
|
||||
float maxDistance = guardianAlive ? baseDistance : (aiState == 2f || aiState == 5f) ? baseDistance - MathHelper.Lerp(0f, shorterDistance, MathHelper.Clamp(aiTimer / 120f, 0f, 1f)) : baseDistance;
|
||||
float drawDarknessDistance = maxDistance - 400f;
|
||||
float intensityScalar = MathHelper.Lerp(0f, 0.9f, MathHelper.Clamp((x - drawDarknessDistance) / 400f, 0f, 1f));
|
||||
|
||||
|
||||
+1
-1
@@ -258,7 +258,7 @@ namespace CalamityMod
|
||||
[Label("Immunity Frame Curse")]
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[DefaultValue(false)]
|
||||
[Tooltip("During the Boss Rush, being hit twice within five seconds will cause instant death.\nThis effect ignores revives.")]
|
||||
[Tooltip("During the Boss Rush, being hit twice within three seconds will cause instant death.\nThis effect ignores revives.")]
|
||||
public bool BossRushImmunityFrameCurse { get; set; }
|
||||
|
||||
[Label("Xeroc Curse")]
|
||||
|
||||
+18
-1
@@ -1342,7 +1342,24 @@ namespace CalamityMod
|
||||
float shorterSpearCocoonDistance = CalamityWorld.death ? 1000f : CalamityWorld.revenge ? 400f : Main.expertMode ? 200f : 0f;
|
||||
float shorterDistance = aiState == 2f ? shorterFlameCocoonDistance : shorterSpearCocoonDistance;
|
||||
|
||||
float maxDistance = (aiState == 2f || aiState == 5f) ? baseDistance - MathHelper.Lerp(0f, shorterDistance, MathHelper.Clamp(aiTimer / 120f, 0f, 1f)) : baseDistance;
|
||||
bool guardianAlive = false;
|
||||
if (CalamityGlobalNPC.holyBossAttacker != -1)
|
||||
{
|
||||
if (Main.npc[CalamityGlobalNPC.holyBossAttacker].active)
|
||||
guardianAlive = true;
|
||||
}
|
||||
if (CalamityGlobalNPC.holyBossDefender != -1)
|
||||
{
|
||||
if (Main.npc[CalamityGlobalNPC.holyBossDefender].active)
|
||||
guardianAlive = true;
|
||||
}
|
||||
if (CalamityGlobalNPC.holyBossHealer != -1)
|
||||
{
|
||||
if (Main.npc[CalamityGlobalNPC.holyBossHealer].active)
|
||||
guardianAlive = true;
|
||||
}
|
||||
|
||||
float maxDistance = guardianAlive ? baseDistance : (aiState == 2f || aiState == 5f) ? baseDistance - MathHelper.Lerp(0f, shorterDistance, MathHelper.Clamp(aiTimer / 120f, 0f, 1f)) : baseDistance;
|
||||
float drawDarknessDistance = maxDistance - 400f;
|
||||
float intensityScalar = MathHelper.Lerp(0f, 0.9f, MathHelper.Clamp((x - drawDarknessDistance) / 400f, 0f, 1f));
|
||||
scale -= intensityScalar;
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
DisplayName.SetDefault("Elemental Quiver");
|
||||
Tooltip.SetDefault("Ranged projectiles have a chance to split\n" +
|
||||
"10% increased ranged damage, 5% increased ranged critical strike chance, and 20% reduced ammo usage\n" +
|
||||
"15% increased ranged damage, 5% increased ranged critical strike chance, and 20% reduced ammo usage\n" +
|
||||
"5 increased defense, 2 increased life regen, and 15% increased pick speed\n" +
|
||||
"Greatly increases arrow speed and grants a 20% chance to not consume arrows");
|
||||
}
|
||||
@@ -31,7 +31,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.eQuiver = true;
|
||||
player.rangedDamage += 0.1f;
|
||||
player.rangedDamage += 0.15f;
|
||||
player.rangedCrit += 5;
|
||||
player.ammoCost80 = true;
|
||||
player.lifeRegen += 2;
|
||||
|
||||
@@ -261,16 +261,16 @@ namespace CalamityMod.Items
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
if (item.melee)
|
||||
Projectile.NewProjectile(position, velocity * 0.5f, ModContent.ProjectileType<LuxorsGiftMelee>(), CalamityUtils.DamageSoftCap(newDamage * 0.4, 60), 0f, player.whoAmI);
|
||||
Projectile.NewProjectile(position, velocity * 0.5f, ModContent.ProjectileType<LuxorsGiftMelee>(), CalamityUtils.DamageSoftCap(newDamage * 0.6, 60), 0f, player.whoAmI);
|
||||
|
||||
else if (rogue)
|
||||
Projectile.NewProjectile(position, velocity, ModContent.ProjectileType<LuxorsGiftRogue>(), CalamityUtils.DamageSoftCap(newDamage * 0.35, 50), 0f, player.whoAmI);
|
||||
Projectile.NewProjectile(position, velocity, ModContent.ProjectileType<LuxorsGiftRogue>(), CalamityUtils.DamageSoftCap(newDamage * 0.5, 50), 0f, player.whoAmI);
|
||||
|
||||
else if (item.ranged)
|
||||
Projectile.NewProjectile(position, velocity * 1.5f, ModContent.ProjectileType<LuxorsGiftRanged>(), CalamityUtils.DamageSoftCap(newDamage * 0.275, 40), 0f, player.whoAmI);
|
||||
Projectile.NewProjectile(position, velocity * 1.5f, ModContent.ProjectileType<LuxorsGiftRanged>(), CalamityUtils.DamageSoftCap(newDamage * 0.4, 40), 0f, player.whoAmI);
|
||||
|
||||
else if (item.magic)
|
||||
Projectile.NewProjectile(position, velocity, ModContent.ProjectileType<LuxorsGiftMagic>(), CalamityUtils.DamageSoftCap(newDamage * 0.525, 80), 0f, player.whoAmI);
|
||||
Projectile.NewProjectile(position, velocity, ModContent.ProjectileType<LuxorsGiftMagic>(), CalamityUtils.DamageSoftCap(newDamage * 0.8, 80), 0f, player.whoAmI);
|
||||
|
||||
else if (item.summon && player.ownedProjectileCounts[ModContent.ProjectileType<LuxorsGiftSummon>()] < 1)
|
||||
Projectile.NewProjectile(position, Vector2.Zero, ModContent.ProjectileType<LuxorsGiftSummon>(), damage, 0f, player.whoAmI);
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
{
|
||||
CalamityGlobalItem modItem = item.Calamity();
|
||||
|
||||
item.damage = 67;
|
||||
item.damage = 80;
|
||||
modItem.rogue = true;
|
||||
item.noMelee = true;
|
||||
item.noUseGraphic = true;
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
|
||||
item.width = 56;
|
||||
item.height = 52;
|
||||
item.damage = 84;
|
||||
item.damage = 100;
|
||||
item.noMelee = true;
|
||||
item.noUseGraphic = true;
|
||||
item.channel = true;
|
||||
@@ -56,6 +56,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, swingOffset);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
|
||||
@@ -24,10 +24,11 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
item.melee = true;
|
||||
item.width = 26;
|
||||
item.height = 26;
|
||||
item.scale = 1.5f;
|
||||
item.useTime = 24;
|
||||
item.useAnimation = 24;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
item.useTurn = false;
|
||||
item.useTurn = true;
|
||||
item.knockBack = 7f;
|
||||
|
||||
item.value = CalamityGlobalItem.Rarity3BuyPrice;
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
item.height = 22;
|
||||
item.magic = true;
|
||||
item.mana = 6;
|
||||
item.damage = 130;
|
||||
item.damage = 110;
|
||||
item.knockBack = 11f;
|
||||
item.useTime = item.useAnimation = 20;
|
||||
item.autoReuse = true;
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
|
||||
item.width = 22;
|
||||
item.height = 28;
|
||||
item.damage = 8572;
|
||||
item.damage = 9572;
|
||||
item.noMelee = true;
|
||||
item.noUseGraphic = true;
|
||||
item.consumable = true;
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
{
|
||||
public class PulseRifle : ModItem
|
||||
{
|
||||
private int BaseDamage = 6560;
|
||||
private int BaseDamage = 8560;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
CalamityGlobalItem modItem = item.Calamity();
|
||||
|
||||
item.shootSpeed = 10f;
|
||||
item.damage = 40;
|
||||
item.damage = 55;
|
||||
item.mana = 12;
|
||||
item.width = 38;
|
||||
item.height = 24;
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
item.width = 50;
|
||||
item.height = 26;
|
||||
item.ranged = true;
|
||||
item.damage = 28;
|
||||
item.damage = 22;
|
||||
item.knockBack = 0f;
|
||||
item.useTime = item.useAnimation = 28;
|
||||
item.autoReuse = true;
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
{
|
||||
public class TeslaCannon : ModItem
|
||||
{
|
||||
private int BaseDamage = 10000;
|
||||
private int BaseDamage = 15000;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
{
|
||||
CalamityGlobalItem modItem = item.Calamity();
|
||||
|
||||
item.damage = 34;
|
||||
item.damage = 102;
|
||||
modItem.rogue = true;
|
||||
item.noMelee = true;
|
||||
item.noUseGraphic = true;
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
num80 = num72 / num80;
|
||||
}
|
||||
|
||||
int num107 = 10;
|
||||
int num107 = 3;
|
||||
for (int num108 = 0; num108 < num107; num108++)
|
||||
{
|
||||
vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f);
|
||||
@@ -95,8 +95,8 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
num80 = num72 / num80;
|
||||
num78 *= num80;
|
||||
num79 *= num80;
|
||||
float speedX4 = num78 + (float)Main.rand.Next(-120, 121) * 0.02f;
|
||||
float speedY5 = num79 + (float)Main.rand.Next(-120, 121) * 0.02f;
|
||||
float speedX4 = num78 + (float)Main.rand.Next(-30, 31) * 0.02f;
|
||||
float speedY5 = num79 + (float)Main.rand.Next(-30, 31) * 0.02f;
|
||||
Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType<AuraRain>(), damage, knockBack, player.whoAmI, 0f, (float)Main.rand.Next(10));
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
item.width = 62;
|
||||
item.height = 62;
|
||||
item.scale = 1.5f;
|
||||
item.scale = 2f;
|
||||
item.damage = 55;
|
||||
item.melee = true;
|
||||
item.useAnimation = 30;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 95;
|
||||
item.damage = 110;
|
||||
item.crit += 25;
|
||||
item.melee = true;
|
||||
item.width = 80;
|
||||
|
||||
@@ -26,12 +26,14 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.useTime = 19;
|
||||
item.knockBack = 7.5f;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.autoReuse = false;
|
||||
item.autoReuse = true;
|
||||
item.height = 56;
|
||||
item.value = Item.buyPrice(0, 36, 0, 0);
|
||||
item.rare = 5;
|
||||
item.shoot = ModContent.ProjectileType<BrimlanceProj>();
|
||||
item.shootSpeed = 12f;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
}
|
||||
}
|
||||
@@ -34,16 +34,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.shootSpeed = 10f;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
for (int i = 0; i < 1000; ++i)
|
||||
{
|
||||
if (Main.projectile[i].active && Main.projectile[i].owner == Main.myPlayer && Main.projectile[i].type == item.shoot)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
}
|
||||
}
|
||||
@@ -27,12 +27,14 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.useTime = 25;
|
||||
item.knockBack = 7f;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.autoReuse = false;
|
||||
item.autoReuse = true;
|
||||
item.height = 60;
|
||||
item.value = Item.buyPrice(0, 36, 0, 0);
|
||||
item.rare = 5;
|
||||
item.shoot = ModContent.ProjectileType<EarthenPikeSpear>();
|
||||
item.shootSpeed = 6f;
|
||||
item.shootSpeed = 8f;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
}
|
||||
}
|
||||
@@ -35,19 +35,9 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.shootSpeed = 8f;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
for (int i = 0; i < 1000; ++i)
|
||||
{
|
||||
if (Main.projectile[i].active && Main.projectile[i].owner == Main.myPlayer && Main.projectile[i].type == item.shoot)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
|
||||
public override void AddRecipes()
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<CruptixBar>(), 10);
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
item.width = 60;
|
||||
item.height = 64;
|
||||
item.scale = 1.5f;
|
||||
item.damage = 53;
|
||||
item.melee = true;
|
||||
item.useAnimation = 22;
|
||||
@@ -31,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.autoReuse = true;
|
||||
item.value = Item.buyPrice(0, 36, 0, 0);
|
||||
item.rare = 5;
|
||||
item.shootSpeed = 6f;
|
||||
item.shootSpeed = 8f;
|
||||
}
|
||||
|
||||
public override bool AltFunctionUse(Player player)
|
||||
@@ -46,21 +47,20 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.noMelee = true;
|
||||
item.noUseGraphic = true;
|
||||
item.useStyle = ItemUseStyleID.HoldingOut;
|
||||
item.autoReuse = false;
|
||||
item.shoot = ModContent.ProjectileType<FulgurationHalberdProj>();
|
||||
}
|
||||
return player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
item.noMelee = false;
|
||||
item.noUseGraphic = false;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
item.autoReuse = true;
|
||||
item.shoot = ProjectileID.None;
|
||||
}
|
||||
return base.CanUseItem(player);
|
||||
return base.CanUseItem(player);
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
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, ModContent.ProjectileType<FulgurationHalberdProj>(), damage, knockBack, player.whoAmI, 0f, 0f);
|
||||
return false;
|
||||
|
||||
@@ -36,16 +36,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.Calamity().customRarity = CalamityRarity.Turquoise;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
for (int i = 0; i < Main.maxProjectiles; ++i)
|
||||
{
|
||||
if (Main.projectile[i].active && Main.projectile[i].owner == Main.myPlayer && Main.projectile[i].type == item.shoot)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.useTime = 23;
|
||||
item.knockBack = 5.75f;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.autoReuse = false;
|
||||
item.autoReuse = true;
|
||||
item.height = 54;
|
||||
item.value = Item.buyPrice(0, 4, 0, 0);
|
||||
item.rare = 3;
|
||||
@@ -35,7 +35,9 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.shootSpeed = 5f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<AerialiteBar>(), 10);
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.useTime = 20;
|
||||
item.knockBack = 7.5f;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.autoReuse = false;
|
||||
item.autoReuse = true;
|
||||
item.height = 64;
|
||||
item.value = Item.buyPrice(0, 60, 0, 0);
|
||||
item.rare = 7;
|
||||
@@ -36,7 +36,9 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.shootSpeed = 8f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<DraedonBar>(), 12);
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 66;
|
||||
item.damage = 390;
|
||||
item.damage = 350;
|
||||
item.melee = true;
|
||||
item.noMelee = true;
|
||||
item.useTurn = true;
|
||||
@@ -35,16 +35,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.shootSpeed = 5f;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
for (int i = 0; i < Main.maxProjectiles; ++i)
|
||||
{
|
||||
if (Main.projectile[i].active && Main.projectile[i].owner == Main.myPlayer && Main.projectile[i].type == item.shoot)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,9 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 98;
|
||||
item.damage = 60;
|
||||
item.height = 98;
|
||||
item.scale = 1.5f;
|
||||
item.damage = 60;
|
||||
item.melee = true;
|
||||
item.useAnimation = 22;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
@@ -25,7 +27,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.knockBack = 7.5f;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.autoReuse = true;
|
||||
item.height = 98;
|
||||
item.value = Item.buyPrice(0, 36, 0, 0);
|
||||
item.rare = 5;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.useTime = 21;
|
||||
item.knockBack = 5.25f;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.autoReuse = false;
|
||||
item.autoReuse = true;
|
||||
item.height = 50;
|
||||
item.value = Item.buyPrice(0, 2, 0, 0);
|
||||
item.rare = 2;
|
||||
@@ -33,7 +33,9 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.shootSpeed = 5f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddRecipeGroup("AnyGoldBar", 5);
|
||||
|
||||
@@ -43,15 +43,9 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.shootSpeed = ShootSpeed;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
for (int i = 0; i < Main.projectile.Length; ++i)
|
||||
if (Main.projectile[i].active && Main.projectile[i].owner == Main.myPlayer && Main.projectile[i].type == item.shoot)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
|
||||
public override void AddRecipes()
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<SpatialLance>());
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.useTime = 20;
|
||||
item.knockBack = 6.25f;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.autoReuse = false;
|
||||
item.autoReuse = true;
|
||||
item.height = 42;
|
||||
item.value = Item.buyPrice(0, 4, 0, 0);
|
||||
item.rare = 3;
|
||||
@@ -35,7 +35,9 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.shootSpeed = 6f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<BloodSample>(), 8);
|
||||
|
||||
@@ -37,19 +37,9 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.Calamity().customRarity = CalamityRarity.Turquoise;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
for (int i = 0; i < 1000; ++i)
|
||||
{
|
||||
if (Main.projectile[i].active && Main.projectile[i].owner == Main.myPlayer && Main.projectile[i].type == item.shoot)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
|
||||
public override void AddRecipes()
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<TerraLance>());
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.useTime = 23;
|
||||
item.knockBack = 6;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.autoReuse = false;
|
||||
item.autoReuse = true;
|
||||
item.height = 72;
|
||||
item.value = Item.buyPrice(0, 36, 0, 0);
|
||||
item.rare = 5;
|
||||
@@ -35,7 +35,9 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.shootSpeed = 6f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<VerstaltiteBar>(), 12);
|
||||
|
||||
@@ -45,19 +45,9 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
spriteBatch.Draw(ModContent.GetTexture("CalamityMod/Items/Weapons/Melee/StreamGougeGlow"), item.Center - Main.screenPosition, null, Color.White, rotation, origin, 1f, SpriteEffects.None, 0f);
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
for (int i = 0; i < 1000; ++i)
|
||||
{
|
||||
if (Main.projectile[i].active && Main.projectile[i].owner == Main.myPlayer && Main.projectile[i].type == item.shoot)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
|
||||
public override void AddRecipes()
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<CosmiliteBar>(), 14);
|
||||
|
||||
@@ -35,19 +35,9 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.shootSpeed = 11f;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
for (int i = 0; i < 1000; ++i)
|
||||
{
|
||||
if (Main.projectile[i].active && Main.projectile[i].owner == Main.myPlayer && Main.projectile[i].type == item.shoot)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
|
||||
public override void AddRecipes()
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ItemID.ChlorophytePartisan);
|
||||
|
||||
@@ -12,16 +12,18 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Ultimus Cleaver");
|
||||
Tooltip.SetDefault("Launches damaging homing sparks");
|
||||
Tooltip.SetDefault("Launches damaging homing sparks and explodes on enemy hits");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 130;
|
||||
item.melee = true;
|
||||
item.useTurn = true;
|
||||
item.rare = 8;
|
||||
item.width = 72;
|
||||
item.height = 62;
|
||||
item.scale = 1.5f;
|
||||
item.useTime = 20;
|
||||
item.useAnimation = 20;
|
||||
item.useStyle = ItemUseStyleID.SwingThrow;
|
||||
@@ -31,7 +33,50 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.UseSound = SoundID.Item1;
|
||||
}
|
||||
|
||||
public override void MeleeEffects(Player player, Rectangle hitbox)
|
||||
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(BuffID.OnFire, 600);
|
||||
player.ApplyDamageToNPC(target, (int)(item.damage * (player.allDamage + player.meleeDamage - 1f)), 0f, 0, false);
|
||||
float num50 = 1.7f;
|
||||
float num51 = 0.8f;
|
||||
float num52 = 2f;
|
||||
Vector2 value3 = (target.rotation - 1.57079637f).ToRotationVector2();
|
||||
Vector2 value4 = value3 * target.velocity.Length();
|
||||
Main.PlaySound(SoundID.Item14, target.position);
|
||||
int num3;
|
||||
for (int num53 = 0; num53 < 40; num53 = num3 + 1)
|
||||
{
|
||||
int num54 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 174, 0f, 0f, 200, default, num50);
|
||||
Dust dust = Main.dust[num54];
|
||||
dust.position = target.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)target.width / 2f;
|
||||
dust.noGravity = true;
|
||||
dust.velocity.Y -= 6f;
|
||||
dust.velocity *= 3f;
|
||||
dust.velocity += value4 * Main.rand.NextFloat();
|
||||
num54 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 174, 0f, 0f, 100, default, num51);
|
||||
dust.position = target.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)target.width / 2f;
|
||||
dust.velocity.Y -= 6f;
|
||||
dust.velocity *= 2f;
|
||||
dust.noGravity = true;
|
||||
dust.fadeIn = 1f;
|
||||
dust.color = Color.Crimson * 0.5f;
|
||||
dust.velocity += value4 * Main.rand.NextFloat();
|
||||
num3 = num53;
|
||||
}
|
||||
for (int num55 = 0; num55 < 20; num55 = num3 + 1)
|
||||
{
|
||||
int num56 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 174, 0f, 0f, 0, default, num52);
|
||||
Dust dust = Main.dust[num56];
|
||||
dust.position = target.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)target.velocity.ToRotation(), default) * (float)target.width / 3f;
|
||||
dust.noGravity = true;
|
||||
dust.velocity.Y -= 6f;
|
||||
dust.velocity *= 0.5f;
|
||||
dust.velocity += value4 * (0.6f + 0.6f * Main.rand.NextFloat());
|
||||
num3 = num55;
|
||||
}
|
||||
}
|
||||
|
||||
public override void MeleeEffects(Player player, Rectangle hitbox)
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
@@ -97,7 +142,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
num342 *= (float)player.direction;
|
||||
num341 *= player.gravDir;
|
||||
Projectile.NewProjectile((float)(hitbox.X + hitbox.Width / 2) + num342, (float)(hitbox.Y + hitbox.Height / 2) + num341,
|
||||
(float)player.direction * num340, num339 * player.gravDir, ModContent.ProjectileType<UltimusCleaverDust>(), (int)(item.damage * player.MeleeDamage() * 0.1f), 0f, player.whoAmI, 0f, 0f);
|
||||
(float)player.direction * num340, num339 * player.gravDir, ModContent.ProjectileType<UltimusCleaverDust>(), (int)(item.damage * player.MeleeDamage() * 0.1), 0f, player.whoAmI, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.useTime = 25;
|
||||
item.knockBack = 5f;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.autoReuse = false;
|
||||
item.autoReuse = true;
|
||||
item.height = 56;
|
||||
item.value = Item.buyPrice(0, 2, 0, 0);
|
||||
item.rare = 2;
|
||||
@@ -35,7 +35,9 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.shootSpeed = 4f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<VictideBar>(), 4);
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.melee = true;
|
||||
item.noMelee = true;
|
||||
item.channel = true;
|
||||
item.autoReuse = false;
|
||||
item.autoReuse = true;
|
||||
item.useTurn = true;
|
||||
|
||||
item.useStyle = ItemUseStyleID.HoldingOut;
|
||||
@@ -58,19 +58,22 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
item.damage = 20;
|
||||
item.channel = false;
|
||||
item.autoReuse = true;
|
||||
item.useAnimation = 33;
|
||||
item.useTime = 33;
|
||||
item.shootSpeed = 4.5f;
|
||||
}
|
||||
return player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
item.damage = BaseDamage;
|
||||
item.channel = true;
|
||||
item.autoReuse = false;
|
||||
item.useAnimation = 22;
|
||||
item.useTime = 22;
|
||||
item.shootSpeed = ShootSpeed;
|
||||
}
|
||||
return base.CanUseItem(player);
|
||||
return base.CanUseItem(player);
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 232;
|
||||
item.damage = 200;
|
||||
item.ranged = true;
|
||||
item.width = 44;
|
||||
item.height = 100;
|
||||
|
||||
@@ -52,8 +52,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
float shardKB = 2f * knockBack;
|
||||
float shardVelocityX = (speedX + (float)Main.rand.Next(-25, 26) * 0.05f) * 0.9f;
|
||||
float shardVelocityY = (speedY + (float)Main.rand.Next(-25, 26) * 0.05f) * 0.9f;
|
||||
int onyx = Projectile.NewProjectile(position.X, position.Y, shardVelocityX, shardVelocityY, ProjectileID.BlackBolt, shardDamage, shardKB, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[onyx].timeLeft -= 20;
|
||||
Projectile.NewProjectile(position.X, position.Y, shardVelocityX, shardVelocityY, ProjectileID.BlackBolt, shardDamage, shardKB, player.whoAmI, 0f, 0f);
|
||||
|
||||
// Fire three symmetric pairs of bullets alongside it
|
||||
Vector2 baseVelocity = new Vector2(speedX, speedY);
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
item.rare = 9;
|
||||
item.autoReuse = true;
|
||||
item.shoot = ModContent.ProjectileType<CosmicFire>();
|
||||
item.shootSpeed = 7.5f;
|
||||
item.shootSpeed = 9f;
|
||||
item.useAmmo = AmmoID.Gel;
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -4669,11 +4669,11 @@ namespace CalamityMod.NPCs
|
||||
|
||||
if (BossRushEvent.BossRushActive)
|
||||
{
|
||||
idlePhaseTimer = 35;
|
||||
idlePhaseAcceleration *= 1.1f;
|
||||
idlePhaseVelocity *= 1.15f;
|
||||
idlePhaseTimer = 45;
|
||||
idlePhaseAcceleration *= 1.06f;
|
||||
idlePhaseVelocity *= 1.12f;
|
||||
chargeTime -= 3;
|
||||
chargeVelocity *= 1.25f;
|
||||
chargeVelocity *= 1.15f;
|
||||
}
|
||||
|
||||
if (calamityGlobalNPC.newAI[1] == 1f)
|
||||
|
||||
@@ -4610,7 +4610,7 @@ namespace CalamityMod.NPCs
|
||||
if (Collision.CanHit(npc.position, npc.width, npc.height, player.position, player.width, player.height))
|
||||
{
|
||||
// Laser speed
|
||||
float projectileSpeed = npc.ai[2] == 0f ? 2f : 4f;
|
||||
float projectileSpeed = npc.ai[2] == 0f ? 4f : 2f;
|
||||
projectileSpeed += enrageScale;
|
||||
if (phase2)
|
||||
projectileSpeed += 0.25f;
|
||||
|
||||
+22
-18
@@ -338,6 +338,13 @@ namespace CalamityMod.NPCs
|
||||
NPCID.TheDestroyerTail
|
||||
};
|
||||
|
||||
public static List<int> DarkEnergyIDs = new List<int>
|
||||
{
|
||||
NPCType<DarkEnergy>(),
|
||||
NPCType<DarkEnergy2>(),
|
||||
NPCType<DarkEnergy3>()
|
||||
};
|
||||
|
||||
public static List<int> StormWeaverIDs = new List<int>
|
||||
{
|
||||
NPCType<StormWeaverHeadNaked>(),
|
||||
@@ -838,7 +845,7 @@ namespace CalamityMod.NPCs
|
||||
npc.buffImmune[BuffID.Slow] = true;
|
||||
}
|
||||
|
||||
if (DestroyerIDs.Contains(npc.type) || (EaterofWorldsIDs.Contains(npc.type) && BossRushEvent.BossRushActive) || npc.type == NPCID.DD2EterniaCrystal || npc.townNPC || npc.type == NPCID.SpikeBall || npc.type == NPCID.BlazingWheel)
|
||||
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++)
|
||||
{
|
||||
@@ -3051,21 +3058,6 @@ namespace CalamityMod.NPCs
|
||||
GrenadeResist(projectile, ref damage);
|
||||
PierceResistGlobal(projectile, ref damage);
|
||||
|
||||
// Old resists
|
||||
/*if (projectile.type == ProjectileType<AtlantisSpear2>())
|
||||
{
|
||||
damage = (int)(damage * 0.1);
|
||||
}
|
||||
else if (projectile.type == ProjectileType<DormantBrimseekerBab>())
|
||||
{
|
||||
damage = (int)(damage * 0.2);
|
||||
}
|
||||
else if (projectile.type == player.beeType() || projectile.type == ProjectileType<MalachiteBolt>())
|
||||
{
|
||||
damage = (int)(damage * 0.4);
|
||||
}*/
|
||||
|
||||
// New resists
|
||||
if (ProjectileID.Sets.StardustDragon[projectile.type] || projectile.type == ProjectileType<PlaguenadeBee>() || projectile.type == ProjectileType<PlaguenadeProj>())
|
||||
{
|
||||
damage = (int)(damage * 0.25);
|
||||
@@ -3083,7 +3075,7 @@ namespace CalamityMod.NPCs
|
||||
damage = (int)(damage * 0.75);
|
||||
}
|
||||
}
|
||||
else if (CosmicGuardianIDs.Contains(npc.type))
|
||||
else if (CosmicGuardianIDs.Contains(npc.type) || DarkEnergyIDs.Contains(npc.type))
|
||||
{
|
||||
GrenadeResist(projectile, ref damage);
|
||||
PierceResistGlobal(projectile, ref damage);
|
||||
@@ -3111,6 +3103,10 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
damage = (int)(damage * 0.5);
|
||||
}
|
||||
else if (projectile.type == ProjectileType<WavePounderBoom>())
|
||||
{
|
||||
damage = (int)(damage * 0.4);
|
||||
}
|
||||
else if (ProjectileID.Sets.StardustDragon[projectile.type])
|
||||
{
|
||||
damage = (int)(damage * 0.1);
|
||||
@@ -3129,6 +3125,10 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
damage = (int)(damage * 0.5);
|
||||
}
|
||||
else if (projectile.type == ProjectileType<VoltageStream>())
|
||||
{
|
||||
damage = (int)(damage * 0.45);
|
||||
}
|
||||
else if (projectile.type == ProjectileType<SulphuricNukesplosion>())
|
||||
{
|
||||
damage = (int)(damage * 0.38);
|
||||
@@ -3147,6 +3147,10 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
damage = (int)(damage * 0.9);
|
||||
}
|
||||
else if (projectile.type == ProjectileType<VoltageStream>())
|
||||
{
|
||||
damage = (int)(damage * 0.75);
|
||||
}
|
||||
if (projectile.type == ProjectileType<SHPExplosion>() || projectile.type == ProjectileType<DormantBrimseekerBab>() || projectile.type == ProjectileType<PoleWarperSummon>())
|
||||
{
|
||||
damage = (int)(damage * 0.5);
|
||||
@@ -4337,7 +4341,7 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
else if (DestroyerIDs.Contains(npc.type))
|
||||
{
|
||||
if (drawColor != Color.Black && ((newAI[3] >= 900f && npc.life / (float)npc.lifeMax < 0.5f) || (newAI[1] < 600f && newAI[1] > 60f)))
|
||||
if (drawColor != Color.Black && npc.ai[2] == 0f && ((newAI[3] >= 900f && npc.life / (float)npc.lifeMax < 0.5f) || (newAI[1] < 600f && newAI[1] > 60f)))
|
||||
{
|
||||
Vector2 halfSize = npc.frame.Size() / 2;
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
|
||||
@@ -300,15 +300,6 @@ namespace CalamityMod.NPCs.CeaselessVoid
|
||||
return CalamityGlobalNPC.voidBoss < 0 || !Main.npc[CalamityGlobalNPC.voidBoss].active;
|
||||
}
|
||||
|
||||
public override void OnHitByProjectile(Projectile projectile, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (CalamityWorld.DoGSecondStageCountdown <= 0 || !CalamityWorld.downedSentinel1)
|
||||
{
|
||||
if (projectile.type == ModContent.ProjectileType<MoltenAmputatorProj>())
|
||||
damage = (int)(damage * 0.9);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(BuffID.VortexDebuff, 20, true);
|
||||
|
||||
@@ -260,15 +260,6 @@ namespace CalamityMod.NPCs.CeaselessVoid
|
||||
return CalamityGlobalNPC.voidBoss < 0 || !Main.npc[CalamityGlobalNPC.voidBoss].active;
|
||||
}
|
||||
|
||||
public override void OnHitByProjectile(Projectile projectile, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (CalamityWorld.DoGSecondStageCountdown <= 0 || !CalamityWorld.downedSentinel1)
|
||||
{
|
||||
if (projectile.type == ModContent.ProjectileType<MoltenAmputatorProj>())
|
||||
damage = (int)(damage * 0.9);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(BuffID.VortexDebuff, 20, true);
|
||||
|
||||
@@ -288,15 +288,6 @@ namespace CalamityMod.NPCs.CeaselessVoid
|
||||
return CalamityGlobalNPC.voidBoss < 0 || !Main.npc[CalamityGlobalNPC.voidBoss].active;
|
||||
}
|
||||
|
||||
public override void OnHitByProjectile(Projectile projectile, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (CalamityWorld.DoGSecondStageCountdown <= 0 || !CalamityWorld.downedSentinel1)
|
||||
{
|
||||
if (projectile.type == ModContent.ProjectileType<MoltenAmputatorProj>())
|
||||
damage = (int)(damage * 0.9);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(BuffID.VortexDebuff, 20, true);
|
||||
|
||||
@@ -694,7 +694,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
|
||||
if (bulletHellCounter2 % 30 == 0) //projectiles that move in wave pattern
|
||||
{
|
||||
int random = Main.rand.Next(-1000, 1001);
|
||||
int random = Main.rand.Next(-500, 501);
|
||||
Projectile.NewProjectile(player.position.X + 1000f, player.position.Y + random, -5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneWave>(), waveDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.position.X - 1000f, player.position.Y - random, 5f * uDieLul, 0f, ModContent.ProjectileType<BrimstoneWave>(), waveDamage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
{
|
||||
npc.ai[1] += 1f;
|
||||
}
|
||||
if (npc.ai[1] >= 30f)
|
||||
if (npc.ai[1] >= 45f)
|
||||
{
|
||||
npc.ai[1] = 0f;
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SCalSounds/BrimstoneHellblastSound"), npc.Center);
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Main.PlaySound(SoundID.Item33, (int)projectile.position.X, (int)projectile.position.Y);
|
||||
projectile.localAI[1] = 1f;
|
||||
}
|
||||
if (projectile.velocity.Length() < 14f)
|
||||
if (projectile.velocity.Length() < 12f)
|
||||
{
|
||||
projectile.velocity *= 1.0025f;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Main.PlaySound(SoundID.Item33, (int)projectile.position.X, (int)projectile.position.Y);
|
||||
projectile.localAI[1] = 1f;
|
||||
}
|
||||
if (projectile.velocity.Length() < 14f)
|
||||
if (projectile.velocity.Length() < 12f)
|
||||
{
|
||||
projectile.velocity *= 1.0025f;
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ namespace CalamityMod.Projectiles
|
||||
projectile.localAI[1] = 1f;
|
||||
}
|
||||
|
||||
if (projectile.velocity.Length() < 14f)
|
||||
if (projectile.velocity.Length() < 12f)
|
||||
projectile.velocity *= 1.0025f;
|
||||
|
||||
return false;
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
set => projectile.ai[0] = value;
|
||||
}
|
||||
public const int TotalSpins = 2;
|
||||
public const float SpinTime = 60f;
|
||||
public const float SpinTime = 30f;
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Frequency Manipulator");
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
projectile.ownerHitCheck = true;
|
||||
projectile.hide = true;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 8;
|
||||
projectile.localNPCHitCooldown = 6;
|
||||
projectile.alpha = 255;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
public const float MinEnergyParticleSpeed = 0.25f;
|
||||
public const float MaxEnergyParticleSpeed = 4f;
|
||||
public const float EnergyChargeRadiusRatio = 1.45f;
|
||||
public const float ChargeTime = 60f;
|
||||
public const float ChargeTime = 30f;
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Gauss Shot");
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
Dust dust = Dust.NewDustPerfect(projectile.Center, 263);
|
||||
dust.velocity = angle.ToRotationVector2().RotatedByRandom(0.25f) * Main.rand.NextFloat(6f, 8f);
|
||||
dust.noGravity = true;
|
||||
dust.scale = 2.1f;
|
||||
dust.scale = 1.6f;
|
||||
}
|
||||
}
|
||||
// Ring dust.
|
||||
@@ -54,10 +54,11 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
Dust dust = Dust.NewDustPerfect(projectile.Center + angle.ToRotationVector2() * radius, 226);
|
||||
dust.velocity = Vector2.Zero;
|
||||
dust.noGravity = true;
|
||||
dust.scale = 2f;
|
||||
dust.scale = 1.5f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Kill(int timeLeft)
|
||||
{
|
||||
if (Main.myPlayer == projectile.owner)
|
||||
|
||||
@@ -22,8 +22,9 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
projectile.width = projectile.height = 500;
|
||||
projectile.friendly = true;
|
||||
projectile.ranged = true;
|
||||
projectile.penetrate = 1;
|
||||
projectile.timeLeft = 60;
|
||||
projectile.tileCollide = false;
|
||||
projectile.penetrate = -1;
|
||||
projectile.timeLeft = 40;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 8;
|
||||
}
|
||||
@@ -41,7 +42,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
dust.velocity = dust.velocity.RotatedByRandom(0.4f);
|
||||
dust.velocity = dust.velocity.RotatedBy(Time / 60f * MathHelper.ToRadians(720f));
|
||||
dust.velocity *= Main.rand.NextFloat(20f, 50f);
|
||||
dust.scale = Main.rand.NextFloat(1.7f, 2.1f);
|
||||
dust.scale = Main.rand.NextFloat(1.2f, 1.6f);
|
||||
dust.noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
projectile.melee = true;
|
||||
projectile.scale = 1.1f;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
projectile.timeLeft = 60;
|
||||
@@ -112,6 +113,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
projectile.position -= projectile.velocity.ToRotation().ToRotationVector2() * 8f;
|
||||
projectile.velocity.X *= Main.rand.NextFloat(0.97f, 1.03f);
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/PlasmaBolt"), target.Center);
|
||||
@@ -139,6 +141,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool TryToSuperchargeNPC(NPC npc)
|
||||
{
|
||||
// Prevent supercharging an enemy twice.
|
||||
@@ -154,7 +157,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
Projectile.NewProjectileDirect(npc.Center,
|
||||
Vector2.Zero,
|
||||
ModContent.ProjectileType<VoltageStream>(),
|
||||
(int)(projectile.damage * 0.35),
|
||||
(int)(projectile.damage * 0.8),
|
||||
0f,
|
||||
projectile.owner,
|
||||
0f,
|
||||
|
||||
@@ -12,8 +12,10 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
get => projectile.ai[0];
|
||||
set => projectile.ai[0] = value;
|
||||
}
|
||||
|
||||
public const float FallAcceleration = 0.15f;
|
||||
public const float MaxFallSpeed = 12f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Plasma Grenade");
|
||||
@@ -54,7 +56,8 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
|
||||
public override void Kill(int timeLeft)
|
||||
{
|
||||
if (projectile.Calamity().stealthStrike)
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/PlasmaGrenadeExplosion"), (int)projectile.position.X, (int)projectile.position.Y);
|
||||
if (projectile.Calamity().stealthStrike)
|
||||
{
|
||||
if (Main.myPlayer == projectile.owner)
|
||||
{
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
projectile.minion = true;
|
||||
projectile.tileCollide = false;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 24;
|
||||
projectile.localNPCHitCooldown = 12;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
@@ -70,6 +70,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
}
|
||||
Time++;
|
||||
}
|
||||
|
||||
public void Initialize(Player player)
|
||||
{
|
||||
projectile.Calamity().spawnedPlayerMinionDamageValue = player.MinionDamage();
|
||||
@@ -82,6 +83,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
dust.noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
// While this projectile cannot attack, the projectiles it shoots derive from the damage.
|
||||
public void AdjustDamage(Player player)
|
||||
{
|
||||
@@ -93,6 +95,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
projectile.damage = trueDamage;
|
||||
}
|
||||
}
|
||||
|
||||
public void GrantBuffs(Player player)
|
||||
{
|
||||
bool isCorrectProjectile = projectile.type == ModContent.ProjectileType<PoleWarperSummon>();
|
||||
@@ -109,6 +112,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void PlayerMovement(Player player)
|
||||
{
|
||||
Vector2 destination = player.Center + Vector2.UnitY.RotatedBy(Time / 16f + AngularOffset + (!North).ToInt() * MathHelper.Pi) * 180f;
|
||||
@@ -116,6 +120,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
projectile.velocity = projectile.velocity.SafeNormalize(Vector2.UnitY) * 10f;
|
||||
projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2;
|
||||
}
|
||||
|
||||
public void NPCMovement(NPC npc)
|
||||
{
|
||||
for (int i = 0; i < Main.projectile.Length; i++)
|
||||
@@ -150,6 +155,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
projectile.rotation = projectile.AngleTo(npc.Center) + MathHelper.PiOver2;
|
||||
}
|
||||
}
|
||||
|
||||
public void RepelMovement()
|
||||
{
|
||||
// This does not incorporate attraction on purpose. Doing so causes the minions to very easily become distracted.
|
||||
@@ -173,6 +179,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
{
|
||||
CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, 1, 2);
|
||||
|
||||
@@ -56,6 +56,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 4;
|
||||
projectile.tileCollide = true;
|
||||
projectile.extraUpdates = 1;
|
||||
projectile.Calamity().hasInorganicEnemyHitBoost = true;
|
||||
projectile.Calamity().inorganicEnemyHitBoost = 0.003f;
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
if (alreadyTargetedNPCType != Main.npc[i].whoAmI &&
|
||||
projectile.Center.ManhattanDistance(Main.npc[i].Center) < 600f)
|
||||
{
|
||||
Projectile.NewProjectile(projectile.Center, projectile.DirectionTo(Main.npc[i].Center) * 2f, projectile.type, projectile.damage / 2, 0f, projectile.owner, target.whoAmI, projectile.ai[1] + 1f);
|
||||
Projectile.NewProjectile(projectile.Center, projectile.DirectionTo(Main.npc[i].Center) * 5f, projectile.type, projectile.damage / 2, 0f, projectile.owner, Main.npc[i].whoAmI, projectile.ai[1] + 1f);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -110,9 +110,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
if (!target.boss)
|
||||
{
|
||||
if (target.Inorganic())
|
||||
{
|
||||
damage += target.lifeMax / 250;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,13 +13,16 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
public bool SufferingFromSeparationAnxiety = false;
|
||||
public Vector2 OldCenter;
|
||||
public Vector2 Destination;
|
||||
|
||||
public float Time
|
||||
{
|
||||
get => projectile.ai[0];
|
||||
set => projectile.ai[0] = value;
|
||||
}
|
||||
|
||||
public float EyeOutwardness = 1f;
|
||||
public float EyeRotation = 0f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Snake Eyes");
|
||||
@@ -89,7 +92,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
}
|
||||
NPCMovement(potentialTarget);
|
||||
}
|
||||
if (!SufferingFromSeparationAnxiety && projectile.Distance(player.Center) > (potentialTarget is null ? 360f : 1500f))
|
||||
if (!SufferingFromSeparationAnxiety && projectile.Distance(player.Center) > (potentialTarget is null ? 360f : 1800f))
|
||||
{
|
||||
SufferingFromSeparationAnxiety = true;
|
||||
projectile.netUpdate = true;
|
||||
@@ -105,6 +108,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
}
|
||||
Time++;
|
||||
}
|
||||
|
||||
public void Initialize(Player player)
|
||||
{
|
||||
projectile.Calamity().spawnedPlayerMinionDamageValue = player.MinionDamage();
|
||||
@@ -118,6 +122,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
dust.noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
// While this projectile cannot attack, the projectiles it shoots derive from the damage.
|
||||
public void AdjustDamage(Player player)
|
||||
{
|
||||
@@ -129,6 +134,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
projectile.damage = trueDamage;
|
||||
}
|
||||
}
|
||||
|
||||
public void GrantBuffs(Player player)
|
||||
{
|
||||
bool isCorrectProjectile = projectile.type == ModContent.ProjectileType<SnakeEyesSummon>();
|
||||
@@ -145,6 +151,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void PlayerMovement(Player player)
|
||||
{
|
||||
projectile.velocity = Vector2.Zero;
|
||||
@@ -170,6 +177,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
}
|
||||
EyeOutwardness = MathHelper.Lerp(EyeOutwardness, 0f, 0.15f);
|
||||
}
|
||||
|
||||
public void NPCMovement(NPC npc)
|
||||
{
|
||||
projectile.velocity = Vector2.Zero;
|
||||
@@ -210,6 +218,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
projectile.Center = Vector2.SmoothStep(OldCenter, npc.Center + (new Vector2(300f) + projectile.Size * 0.5f) * offsetMultiplier, Time % 20f / 20f);
|
||||
}
|
||||
}
|
||||
|
||||
public void GenerateAfterimageDust()
|
||||
{
|
||||
for (int i = 1; i < projectile.oldPos.Length; i++)
|
||||
@@ -238,7 +247,9 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CanDamage() => false;
|
||||
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
{
|
||||
CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, Color.White, 0, ProjectileID.Sets.TrailCacheLength[projectile.type]);
|
||||
|
||||
@@ -16,11 +16,13 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
public float AcidShootTimer = 0f;
|
||||
public float AcidShootCooldown = 0f;
|
||||
public float FallThroughYPoint = 0f;
|
||||
|
||||
public bool ReleasingAcid
|
||||
{
|
||||
get => projectile.ai[0] != 0f;
|
||||
set => projectile.ai[0] = value.ToInt();
|
||||
}
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Pet Froge");
|
||||
@@ -49,6 +51,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
writer.Write(AcidShootTimer);
|
||||
writer.Write(AcidShootCooldown);
|
||||
}
|
||||
|
||||
public override void ReceiveExtraAI(BinaryReader reader)
|
||||
{
|
||||
HopCooldown = reader.ReadSingle();
|
||||
@@ -156,8 +159,8 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
player.MinionDamage());
|
||||
projectile.damage = newDamage;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void HandleHop(Vector2 targetPosition)
|
||||
{
|
||||
if (HopCooldown <= 0f && projectile.oldPosition.Y == projectile.position.Y)
|
||||
@@ -179,6 +182,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
HopCooldown--;
|
||||
}
|
||||
}
|
||||
|
||||
public void PlayerSeparationAnxietyAI(Player player, ref int minimumFrame, ref int maximumFrame)
|
||||
{
|
||||
// If the player is extremely far away, don't bother homing. Just go to the player's location.
|
||||
@@ -226,6 +230,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
HandleHop(player.Center);
|
||||
}
|
||||
}
|
||||
|
||||
public void NPCTargetingAI(NPC potentialTarget)
|
||||
{
|
||||
HandleHop(potentialTarget.Center);
|
||||
@@ -270,6 +275,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
AcidShootCooldown--;
|
||||
projectile.velocity.X *= 0.8f;
|
||||
}
|
||||
|
||||
public void ManipulateFrames(int minimumFrame, int maximumFrame)
|
||||
{
|
||||
if (projectile.frame < minimumFrame)
|
||||
@@ -303,12 +309,15 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
0f);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool OnTileCollide(Vector2 oldVelocity) => false;
|
||||
|
||||
public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough)
|
||||
{
|
||||
fallThrough = projectile.Bottom.Y < FallThroughYPoint - 120f;
|
||||
return base.TileCollideStyle(ref width, ref height, ref fallThrough);
|
||||
}
|
||||
|
||||
public override bool CanDamage() => false;
|
||||
}
|
||||
}
|
||||
@@ -16,22 +16,27 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
Electrocuting,
|
||||
ReelingBack
|
||||
}
|
||||
|
||||
public TaserAIState AIState
|
||||
{
|
||||
get => (TaserAIState)(int)projectile.ai[0];
|
||||
set => projectile.ai[0] = (int)value;
|
||||
}
|
||||
|
||||
public float Time
|
||||
{
|
||||
get => projectile.ai[1];
|
||||
set => projectile.ai[1] = value;
|
||||
}
|
||||
|
||||
public int ElectrocutionTarget
|
||||
{
|
||||
get => (int)projectile.localAI[0];
|
||||
set => projectile.localAI[0] = value;
|
||||
}
|
||||
public const float ReelbackSpeed = 7f;
|
||||
|
||||
public const float ReelbackSpeed = 15f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Taser");
|
||||
|
||||
@@ -107,7 +107,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
|
||||
if (projectile.Center.ManhattanDistance(Main.npc[i].Center) < num474)
|
||||
{
|
||||
Projectile.NewProjectile(projectile.Center, projectile.DirectionTo(Main.npc[i].Center) * 2f, projectile.type, projectile.damage / 2, projectile.knockBack * 0.5f, projectile.owner, 0f, -1f);
|
||||
Projectile.NewProjectile(projectile.Center, projectile.DirectionTo(Main.npc[i].Center) * 2f, projectile.type, (int)(projectile.damage * 0.6), projectile.knockBack * 0.6f, projectile.owner, 0f, -1f);
|
||||
|
||||
projectile.ai[1] = 60f;
|
||||
|
||||
|
||||
@@ -18,16 +18,19 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
get => projectile.ai[0] == 1f;
|
||||
set => projectile.ai[0] = value.ToInt();
|
||||
}
|
||||
|
||||
public float Time
|
||||
{
|
||||
get => projectile.ai[1];
|
||||
set => projectile.ai[1] = value;
|
||||
}
|
||||
|
||||
public const int LaserFireRate = 20;
|
||||
public const int MaxLaserCountPerShot = 4; // This only applies to stealth strikes.
|
||||
public const float MaxTargetSearchDistance = 480f;
|
||||
public const float ReturnAcceleration = 0.15f;
|
||||
public const float ReturnMaxSpeed = 12f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Tracking Disk");
|
||||
@@ -74,7 +77,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
projectile.velocity.Y += Math.Sign(idealVelocity.Y - projectile.velocity.Y) * ReturnAcceleration;
|
||||
|
||||
if (Time % LaserFireRate == 0f)
|
||||
AttemptToFireLasers((int)(projectile.damage * 0.4));
|
||||
AttemptToFireLasers((int)(projectile.damage * 0.25));
|
||||
|
||||
if (Main.myPlayer == projectile.owner)
|
||||
{
|
||||
|
||||
@@ -12,11 +12,13 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
get => projectile.ai[0] == 1f;
|
||||
set => projectile.ai[0] = value.ToInt();
|
||||
}
|
||||
|
||||
public float Time
|
||||
{
|
||||
get => projectile.ai[1];
|
||||
set => projectile.ai[1] = value;
|
||||
}
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Unstable Matter");
|
||||
@@ -68,6 +70,9 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
|
||||
public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection)
|
||||
{
|
||||
if (!HasCollidedWithATile)
|
||||
damage /= 3;
|
||||
|
||||
damage += target.defense / 3;
|
||||
}
|
||||
|
||||
@@ -81,7 +86,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
// And bounce off the tile. Or towards a nearby enemy, if there is one.
|
||||
NPC potentialTarget = projectile.Center.ClosestNPCAt(700f, false);
|
||||
if (potentialTarget != null)
|
||||
projectile.velocity = projectile.DirectionTo(potentialTarget.Center);
|
||||
projectile.velocity = projectile.DirectionTo(potentialTarget.Center);
|
||||
else
|
||||
{
|
||||
if (projectile.velocity.X != oldVelocity.X)
|
||||
@@ -97,7 +102,5 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool CanDamage() => HasCollidedWithATile;
|
||||
}
|
||||
}
|
||||
@@ -14,11 +14,13 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
get => projectile.ai[0];
|
||||
set => projectile.ai[0] = value;
|
||||
}
|
||||
|
||||
public NPC Target
|
||||
{
|
||||
get => Main.npc[(int)projectile.ai[1]];
|
||||
set => projectile.ai[1] = value.whoAmI;
|
||||
}
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Voltage Stream");
|
||||
@@ -111,9 +113,5 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
{
|
||||
projectile.damage = (int)(projectile.damage * 0.75);
|
||||
}
|
||||
|
||||
public override void Kill(int timeLeft)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,24 +21,29 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
Position = position;
|
||||
}
|
||||
}
|
||||
|
||||
public class WavePounderBoom : ModProjectile
|
||||
{
|
||||
public ScreenShakeSpot CurrentSpot;
|
||||
|
||||
public float Radius
|
||||
{
|
||||
get => projectile.ai[0];
|
||||
set => projectile.ai[0] = value;
|
||||
}
|
||||
|
||||
public float MaxRadius
|
||||
{
|
||||
get => projectile.ai[1];
|
||||
set => projectile.ai[1] = value;
|
||||
}
|
||||
|
||||
public float InterpolationStep
|
||||
{
|
||||
get => projectile.localAI[1];
|
||||
set => projectile.localAI[1] = value;
|
||||
}
|
||||
|
||||
public const int Lifetime = 60;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
@@ -94,11 +99,13 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
|
||||
projectile.scale = MathHelper.Lerp(1.2f, 5f, Utils.InverseLerp(Lifetime, 0f, projectile.timeLeft, true));
|
||||
CalamityGlobalProjectile.ExpandHitboxBy(projectile, (int)(Radius * projectile.scale), (int)(Radius * projectile.scale));
|
||||
}
|
||||
|
||||
public override void Kill(int timeLeft)
|
||||
{
|
||||
if (projectile.Calamity().stealthStrike)
|
||||
CalamityWorld.ScreenShakeSpots.Remove(Projectile.GetByUUID(projectile.owner, projectile.whoAmI)); // Remove the explosion associated with this projectile's UUID.
|
||||
}
|
||||
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
{
|
||||
spriteBatch.End();
|
||||
|
||||
@@ -27,8 +27,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
projectile.velocity.X *= 0.985f;
|
||||
projectile.velocity.Y *= 0.985f;
|
||||
projectile.velocity *= 0.985f;
|
||||
if (Main.rand.NextBool(5))
|
||||
{
|
||||
Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 67, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f);
|
||||
@@ -48,9 +47,9 @@ namespace CalamityMod.Projectiles.Melee
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
|
||||
int projectile1 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ProjectileID.FrostShard, 30, 2f, projectile.owner, 0f, 0f);
|
||||
int projectile1 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ProjectileID.FrostShard, (int)(projectile.damage * 0.5), 0f, projectile.owner, 0f, 0f);
|
||||
Main.projectile[projectile1].Calamity().forceMelee = true;
|
||||
int projectile2 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ProjectileID.FrostShard, 30, 2f, projectile.owner, 0f, 0f);
|
||||
int projectile2 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ProjectileID.FrostShard, (int)(projectile.damage * 0.5), 0f, projectile.owner, 0f, 0f);
|
||||
Main.projectile[projectile2].Calamity().forceMelee = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
projectile.melee = true;
|
||||
projectile.ignoreWater = true;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 10;
|
||||
projectile.localNPCHitCooldown = 4;
|
||||
projectile.extraUpdates = 1;
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
@@ -32,8 +33,10 @@ namespace CalamityMod.Projectiles.Melee
|
||||
// If it is to be rebalanced, consider replacing it with the FuckYou projectile (which does not mess with I-frames)
|
||||
if (projectile.localAI[1] <= 0f && projectile.owner == Main.myPlayer)
|
||||
{
|
||||
Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, ProjectileID.SolarWhipSwordExplosion, projectile.damage, knockback, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f);
|
||||
}
|
||||
int proj = Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, ProjectileID.SolarWhipSwordExplosion, projectile.damage, knockback, projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f);
|
||||
Main.projectile[proj].usesLocalNPCImmunity = true;
|
||||
Main.projectile[proj].localNPCHitCooldown = 4;
|
||||
}
|
||||
projectile.localAI[1] = 4f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
speedY = MathHelper.Clamp(speedY, -15f, 15f);
|
||||
if (projectile.owner == Main.myPlayer)
|
||||
{
|
||||
int proj = Projectile.NewProjectile(spawnPosition.X, spawnPosition.Y, speedX, speedY, ModContent.ProjectileType<AstralStar>(), (int)(projectile.damage * 0.2), 1f, projectile.owner);
|
||||
int proj = Projectile.NewProjectile(spawnPosition.X, spawnPosition.Y, speedX, speedY, ModContent.ProjectileType<AstralStar>(), (int)(projectile.damage * 0.4), 1f, projectile.owner, 3f, 0f);
|
||||
Main.projectile[proj].Calamity().forceMelee = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
projectile.melee = true; //Dictates whether projectile is a melee-class weapon.
|
||||
projectile.timeLeft = 90;
|
||||
projectile.height = 40; //The height of the .png file in pixels divided by 2.
|
||||
projectile.scale = 1.5f;
|
||||
projectile.friendly = true;
|
||||
projectile.hostile = false;
|
||||
projectile.tileCollide = false;
|
||||
|
||||
@@ -14,11 +14,12 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 35; //The width of the .png file in pixels divided by 2.
|
||||
projectile.width = 40; //The width of the .png file in pixels divided by 2.
|
||||
projectile.aiStyle = 19;
|
||||
projectile.melee = true; //Dictates whether projectile is a melee-class weapon.
|
||||
projectile.timeLeft = 90;
|
||||
projectile.height = 33; //The height of the .png file in pixels divided by 2.
|
||||
projectile.height = 40; //The height of the .png file in pixels divided by 2.
|
||||
projectile.scale = 1.5f;
|
||||
projectile.friendly = true;
|
||||
projectile.hostile = false;
|
||||
projectile.tileCollide = false;
|
||||
|
||||
@@ -48,8 +48,11 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
return;
|
||||
|
||||
Player player = Main.player[projectile.owner];
|
||||
player.statLife += 1;
|
||||
player.HealEffect(1);
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
player.statLife += 1;
|
||||
player.HealEffect(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
if (Main.myPlayer == projectile.owner)
|
||||
{
|
||||
Projectile.NewProjectile(projectile.Center.X + projectile.velocity.X, projectile.Center.Y + projectile.velocity.Y,
|
||||
projectile.velocity.X, projectile.velocity.Y, ModContent.ProjectileType<Feather>(), (int)(projectile.damage * 0.2), 0f, projectile.owner, 0f, 0f);
|
||||
projectile.velocity.X, projectile.velocity.Y, ModContent.ProjectileType<Feather>(), (int)(projectile.damage * 0.4), 0f, projectile.owner, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Melee.Spears
|
||||
public override Action<Projectile> EffectBeforeReelback => (proj) =>
|
||||
{
|
||||
Projectile.NewProjectile(projectile.Center.X + projectile.velocity.X, projectile.Center.Y + projectile.velocity.Y,
|
||||
projectile.velocity.X * 3.5f, projectile.velocity.Y * 3.5f, ModContent.ProjectileType<InsidiousHarpoon>(), (int)(projectile.damage * 0.5f), projectile.knockBack * 0.85f, projectile.owner, 0f, 0f);
|
||||
projectile.velocity.X * 3.5f, projectile.velocity.Y * 3.5f, ModContent.ProjectileType<InsidiousHarpoon>(), (int)(projectile.damage * 0.5), projectile.knockBack * 0.85f, projectile.owner, 0f, 0f);
|
||||
};
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
|
||||
@@ -49,7 +49,6 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
public override bool OnTileCollide(Vector2 oldVelocity)
|
||||
{
|
||||
projectile.damage = (int)(projectile.damage * 1.25);
|
||||
projectile.penetrate--;
|
||||
if (projectile.penetrate <= 0)
|
||||
{
|
||||
|
||||
@@ -26,10 +26,6 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
public override void AI()
|
||||
{
|
||||
Lighting.AddLight(projectile.Center, 0f, 0.25f, 0f);
|
||||
if (projectile.timeLeft > 90)
|
||||
{
|
||||
projectile.timeLeft = 90;
|
||||
}
|
||||
if (projectile.ai[0] > 7f)
|
||||
{
|
||||
float num296 = 1f;
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
projectile.ranged = true;
|
||||
projectile.penetrate = -1;
|
||||
projectile.extraUpdates = 3;
|
||||
projectile.timeLeft = 90;
|
||||
projectile.timeLeft = 100;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
@@ -31,10 +31,6 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
projectile.scale *= 1.01f;
|
||||
}
|
||||
Lighting.AddLight(projectile.Center, 0.25f, 0f, 0.1f);
|
||||
if (projectile.timeLeft > 90)
|
||||
{
|
||||
projectile.timeLeft = 90;
|
||||
}
|
||||
if (projectile.ai[0] > 7f)
|
||||
{
|
||||
float scalar = 1f;
|
||||
|
||||
@@ -32,6 +32,9 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (projectile.ai[0] == 3f)
|
||||
CalamityGlobalProjectile.HomeInOnNPC(projectile, true, 300f, 12f, 20);
|
||||
|
||||
if (projectile.ai[0] == 2f)
|
||||
{
|
||||
projectile.Calamity().rogue = true;
|
||||
|
||||
@@ -81,10 +81,6 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
|
||||
public override bool OnTileCollide(Vector2 oldVelocity)
|
||||
{
|
||||
if (projectile.penetrate == 0)
|
||||
{
|
||||
projectile.Kill();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
using Microsoft.Xna.Framework.Audio;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Sounds.Item
|
||||
{
|
||||
public class PlasmaGrenadeExplosion : ModSound
|
||||
{
|
||||
public override SoundEffectInstance PlaySound(ref SoundEffectInstance soundInstance, float volume, float pan, SoundType type)
|
||||
{
|
||||
soundInstance = sound.CreateInstance();
|
||||
soundInstance.Volume = volume * 1f;
|
||||
soundInstance.Pan = pan;
|
||||
Main.PlaySoundInstance(soundInstance);
|
||||
return soundInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
author = Fabsol and the Dev Team
|
||||
version = 1.4.5.005
|
||||
version = 1.4.5.006
|
||||
displayName = Calamity Mod (No Calamity Music)
|
||||
homepage = https://forums.terraria.org/index.php?threads/calamity-mod.44065/
|
||||
buildIgnore = .vs\*, Properties\*, *.csproj, *.user, obj\*, bin\*, *.config, .git\*, LICENSE, README.md, .editorconfig, .gitignore, .gitattributes
|
||||
|
||||
Reference in new issue
Block a user