Merge branch 'master' of https://github.com/UncleDanny/CalamityMod
No files matched your search
@@ -1,5 +1,5 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ using CalamityMod.NPCs.Providence;
|
||||
using CalamityMod.NPCs.SunkenSea;
|
||||
using CalamityMod.NPCs.SupremeCalamitas;
|
||||
using CalamityMod.NPCs.Yharon;
|
||||
using CalamityMod.Projectiles.Boss;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
@@ -1039,17 +1040,17 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
// Max health reductions
|
||||
if (crimEffigy)
|
||||
player.statLifeMax2 = (int)((double)player.statLifeMax2 * 0.8);
|
||||
player.statLifeMax2 = (int)(player.statLifeMax2 * 0.8);
|
||||
if (badgeOfBraveryRare)
|
||||
player.statLifeMax2 = (int)((double)player.statLifeMax2 * 0.75);
|
||||
player.statLifeMax2 = (int)(player.statLifeMax2 * 0.75);
|
||||
if (regenator)
|
||||
player.statLifeMax2 = (int)((double)player.statLifeMax2 * 0.5);
|
||||
player.statLifeMax2 = (int)(player.statLifeMax2 * 0.5);
|
||||
if (skeletronLore)
|
||||
player.statLifeMax2 = (int)((double)player.statLifeMax2 * 0.9);
|
||||
player.statLifeMax2 = (int)(player.statLifeMax2 * 0.9);
|
||||
if (calamitasLore)
|
||||
player.statLifeMax2 = (int)((double)player.statLifeMax2 * 0.75);
|
||||
player.statLifeMax2 = (int)(player.statLifeMax2 * 0.75);
|
||||
if (providenceLore)
|
||||
player.statLifeMax2 = (int)((double)player.statLifeMax2 * 0.8);
|
||||
player.statLifeMax2 = (int)(player.statLifeMax2 * 0.8);
|
||||
|
||||
// Extra accessory slots
|
||||
if (extraAccessoryML)
|
||||
@@ -1931,7 +1932,6 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
lastProjectileHit = null;
|
||||
|
||||
|
||||
if (CalamityWorld.bossRushActive)
|
||||
{
|
||||
if (!CalamityGlobalNPC.AnyLivingPlayers())
|
||||
@@ -2713,8 +2713,8 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
public static void JungleTeleport(Player player, bool syncData = false)
|
||||
{
|
||||
int teleportStartX = CalamityWorld.abyssSide ? (int)((double)Main.maxTilesX * 0.65) : (int)((double)Main.maxTilesX * 0.2);
|
||||
int teleportRangeX = (int)((double)Main.maxTilesX * 0.15);
|
||||
int teleportStartX = CalamityWorld.abyssSide ? (int)(Main.maxTilesX * 0.65) : (int)(Main.maxTilesX * 0.2);
|
||||
int teleportRangeX = (int)(Main.maxTilesX * 0.15);
|
||||
|
||||
int teleportStartY = (int)Main.worldSurface - 75;
|
||||
int teleportRangeY = 50;
|
||||
@@ -3150,7 +3150,7 @@ namespace CalamityMod.CalPlayer
|
||||
((stressPills || laudanum || draedonsHeart) ? 0.05f : 0f) +
|
||||
((abyssalDivingSuit && player.IsUnderwater()) ? 0.05f : 0f) +
|
||||
(sirenWaterBuff ? 0.15f : 0f) +
|
||||
((frostFlare && player.statLife < (int)((double)player.statLifeMax2 * 0.25)) ? 0.15f : 0f) +
|
||||
((frostFlare && player.statLife < (int)(player.statLifeMax2 * 0.25)) ? 0.15f : 0f) +
|
||||
(auricSet ? 0.1f : 0f) +
|
||||
(dragonScales ? 0.1f : 0f) +
|
||||
(cTracers ? 0.1f : 0f) +
|
||||
@@ -3165,7 +3165,7 @@ namespace CalamityMod.CalPlayer
|
||||
float runSpeedMult = 1f +
|
||||
(shadowSpeed ? 0.5f : 0f) +
|
||||
((abyssalDivingSuit && player.IsUnderwater()) ? 0.05f : 0f) +
|
||||
((frostFlare && player.statLife < (int)((double)player.statLifeMax2 * 0.25)) ? 0.15f : 0f) +
|
||||
((frostFlare && player.statLife < (int)(player.statLifeMax2 * 0.25)) ? 0.15f : 0f) +
|
||||
(sirenWaterBuff ? 0.15f : 0f) +
|
||||
(auricSet ? 0.1f : 0f) +
|
||||
(dragonScales ? 0.1f : 0f) +
|
||||
@@ -3275,7 +3275,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
for (int i = 0; i < 50; i++)
|
||||
{
|
||||
int lumenyl = Projectile.NewProjectile(player.Center.X, player.Center.Y, Main.rand.NextFloat(-2f, 2f), Main.rand.NextFloat(-2f, 2f), ModContent.ProjectileType<AbyssalMirrorProjectile>(), 55, 0, player.whoAmI);
|
||||
int lumenyl = Projectile.NewProjectile(player.Center.X, player.Center.Y, Main.rand.NextFloat(-2f, 2f), Main.rand.NextFloat(-2f, 2f), ModContent.ProjectileType<AbyssalMirrorProjectile>(), (int)(55 * player.RogueDamage()), 0, player.whoAmI);
|
||||
Main.projectile[lumenyl].rotation = Main.rand.NextFloat(0, 360);
|
||||
Main.projectile[lumenyl].frame = Main.rand.Next(0, 4);
|
||||
}
|
||||
@@ -3298,7 +3298,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
Main.PlaySound(2, (int)Main.player[Main.myPlayer].position.X, (int)Main.player[Main.myPlayer].position.Y, 68);
|
||||
int eclipseBurst = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<EclipseMirrorBurst>(), 8000, 0, player.whoAmI);
|
||||
int eclipseBurst = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<EclipseMirrorBurst>(), (int)(7000 * player.RogueDamage()), 0, player.whoAmI);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -3570,7 +3570,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (silvaThrowing)
|
||||
{
|
||||
if (player.statLife > (int)((double)player.statLifeMax2 * 0.5) &&
|
||||
if (player.statLife > (int)(player.statLifeMax2 * 0.5) &&
|
||||
item.Calamity().rogue && item.useTime > 3)
|
||||
return 1.1f;
|
||||
}
|
||||
@@ -3633,13 +3633,14 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (item.ranged)
|
||||
{
|
||||
acidRoundMultiplier = (double)(item.useTime) / 20D;
|
||||
acidRoundMultiplier = item.useTime / 20D;
|
||||
}
|
||||
else
|
||||
{
|
||||
acidRoundMultiplier = 1D;
|
||||
}
|
||||
}
|
||||
|
||||
public override void GetWeaponKnockback(Item item, ref float knockback)
|
||||
{
|
||||
if (auricBoost)
|
||||
@@ -3678,7 +3679,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (item.type == ItemID.SpaceGun && meteorSet)
|
||||
{
|
||||
mult /= 2;
|
||||
mult *= 0.5f;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -3686,27 +3687,27 @@ namespace CalamityMod.CalPlayer
|
||||
#region Melee Effects
|
||||
public override void MeleeEffects(Item item, Rectangle hitbox)
|
||||
{
|
||||
if (!item.melee && !item.noMelee && (!item.noUseGraphic && (int) player.meleeEnchant > 0))
|
||||
if (!item.melee && !item.noMelee && (!item.noUseGraphic && (int)player.meleeEnchant > 0))
|
||||
{
|
||||
if ((int) player.meleeEnchant == 7)
|
||||
if ((int)player.meleeEnchant == 7)
|
||||
{
|
||||
if (Main.rand.NextBool(20))
|
||||
{
|
||||
int Type = Main.rand.Next(139, 143);
|
||||
int index = Dust.NewDust(new Vector2(hitbox.X,hitbox.Y), hitbox.Width, hitbox.Height, Type, player.velocity.X, player.velocity.Y, 0, new Color(), 1.2f);
|
||||
Main.dust[index].velocity.X *= (float) (1.0 + Main.rand.Next(-50, 51) * 0.01);
|
||||
Main.dust[index].velocity.Y *= (float) (1.0 + Main.rand.Next(-50, 51) * 0.01);
|
||||
Main.dust[index].velocity.X *= (float)(1.0 + Main.rand.Next(-50, 51) * 0.01);
|
||||
Main.dust[index].velocity.Y *= (float)(1.0 + Main.rand.Next(-50, 51) * 0.01);
|
||||
Main.dust[index].velocity.X += Main.rand.Next(-50, 51) * 0.05f;
|
||||
Main.dust[index].velocity.Y += Main.rand.Next(-50, 51) * 0.05f;
|
||||
Main.dust[index].scale *= (float) (1.0 + Main.rand.Next(-30, 31) * 0.01);
|
||||
Main.dust[index].scale *= (float)(1.0 + Main.rand.Next(-30, 31) * 0.01);
|
||||
}
|
||||
if (Main.rand.NextBool(40))
|
||||
{
|
||||
int Type = Main.rand.Next(276, 283);
|
||||
int index = Gore.NewGore(new Vector2(hitbox.X, hitbox.Y), player.velocity, Type, 1f);
|
||||
Main.gore[index].velocity.X *= (float) (1.0 + Main.rand.Next(-50, 51) * 0.01);
|
||||
Main.gore[index].velocity.Y *= (float) (1.0 + Main.rand.Next(-50, 51) * 0.01);
|
||||
Main.gore[index].scale *= (float) (1.0 + Main.rand.Next(-20, 21) * 0.01);
|
||||
Main.gore[index].velocity.X *= (float)(1.0 + Main.rand.Next(-50, 51) * 0.01);
|
||||
Main.gore[index].velocity.Y *= (float)(1.0 + Main.rand.Next(-50, 51) * 0.01);
|
||||
Main.gore[index].scale *= (float)(1.0 + Main.rand.Next(-20, 21) * 0.01);
|
||||
Main.gore[index].velocity.X += Main.rand.Next(-50, 51) * 0.05f;
|
||||
Main.gore[index].velocity.Y += Main.rand.Next(-50, 51) * 0.05f;
|
||||
}
|
||||
@@ -3717,59 +3718,59 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (fungalSymbiote && player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.1) ||
|
||||
player.itemAnimation == (int)((double)player.itemAnimationMax * 0.3) ||
|
||||
player.itemAnimation == (int)((double)player.itemAnimationMax * 0.5) ||
|
||||
player.itemAnimation == (int)((double)player.itemAnimationMax * 0.7) ||
|
||||
player.itemAnimation == (int)((double)player.itemAnimationMax * 0.9))
|
||||
if (player.itemAnimation == (int)(player.itemAnimationMax * 0.1) ||
|
||||
player.itemAnimation == (int)(player.itemAnimationMax * 0.3) ||
|
||||
player.itemAnimation == (int)(player.itemAnimationMax * 0.5) ||
|
||||
player.itemAnimation == (int)(player.itemAnimationMax * 0.7) ||
|
||||
player.itemAnimation == (int)(player.itemAnimationMax * 0.9))
|
||||
{
|
||||
float num339 = 0f;
|
||||
float num340 = 0f;
|
||||
float num341 = 0f;
|
||||
float num342 = 0f;
|
||||
if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.9))
|
||||
if (player.itemAnimation == (int)(player.itemAnimationMax * 0.9))
|
||||
{
|
||||
num339 = -7f;
|
||||
}
|
||||
if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.7))
|
||||
if (player.itemAnimation == (int)(player.itemAnimationMax * 0.7))
|
||||
{
|
||||
num339 = -6f;
|
||||
num340 = 2f;
|
||||
}
|
||||
if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.5))
|
||||
if (player.itemAnimation == (int)(player.itemAnimationMax * 0.5))
|
||||
{
|
||||
num339 = -4f;
|
||||
num340 = 4f;
|
||||
}
|
||||
if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.3))
|
||||
if (player.itemAnimation == (int)(player.itemAnimationMax * 0.3))
|
||||
{
|
||||
num339 = -2f;
|
||||
num340 = 6f;
|
||||
}
|
||||
if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.1))
|
||||
if (player.itemAnimation == (int)(player.itemAnimationMax * 0.1))
|
||||
{
|
||||
num340 = 7f;
|
||||
}
|
||||
if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.7))
|
||||
if (player.itemAnimation == (int)(player.itemAnimationMax * 0.7))
|
||||
{
|
||||
num342 = 26f;
|
||||
}
|
||||
if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.3))
|
||||
if (player.itemAnimation == (int)(player.itemAnimationMax * 0.3))
|
||||
{
|
||||
num342 -= 4f;
|
||||
num341 -= 20f;
|
||||
}
|
||||
if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.1))
|
||||
if (player.itemAnimation == (int)(player.itemAnimationMax * 0.1))
|
||||
{
|
||||
num341 += 6f;
|
||||
}
|
||||
if (player.direction == -1)
|
||||
{
|
||||
if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.9))
|
||||
if (player.itemAnimation == (int)(player.itemAnimationMax * 0.9))
|
||||
{
|
||||
num342 -= 8f;
|
||||
}
|
||||
if (player.itemAnimation == (int)((double)player.itemAnimationMax * 0.7))
|
||||
if (player.itemAnimation == (int)(player.itemAnimationMax * 0.7))
|
||||
{
|
||||
num342 -= 6f;
|
||||
}
|
||||
@@ -4841,7 +4842,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
}
|
||||
damage = (int)((double)damage * damageMult);
|
||||
damage = (int)(damage * damageMult);
|
||||
|
||||
if (oldDie)
|
||||
{
|
||||
@@ -4871,15 +4872,15 @@ namespace CalamityMod.CalPlayer
|
||||
#endregion
|
||||
|
||||
if (yharonLore)
|
||||
damage = (int)((double)damage * 0.75);
|
||||
damage = (int)(damage * 0.75);
|
||||
|
||||
if ((target.damage > 5 || target.boss) && player.whoAmI == Main.myPlayer && !target.SpawnedFromStatue)
|
||||
{
|
||||
if (isTrueMelee && soaring)
|
||||
{
|
||||
double useTimeMultiplier = 0.85 + ((double)(item.useTime * item.useAnimation) / 3600D); //28 * 28 = 784 is average so that equals 784 / 3600 = 0.217777 + 1 = 21.7% boost
|
||||
double wingTimeFraction = (double)player.wingTimeMax / 20D;
|
||||
double meleeStatMultiplier = (double)(player.meleeDamage * (float)((double)player.meleeCrit / 10D));
|
||||
double useTimeMultiplier = 0.85 + (item.useTime * item.useAnimation / 3600D); //28 * 28 = 784 is average so that equals 784 / 3600 = 0.217777 + 1 = 21.7% boost
|
||||
double wingTimeFraction = player.wingTimeMax / 20D;
|
||||
double meleeStatMultiplier = (double)(player.meleeDamage * (float)(player.meleeCrit / 10D));
|
||||
|
||||
if (player.wingTime < player.wingTimeMax)
|
||||
player.wingTime += (int)(useTimeMultiplier * (wingTimeFraction + meleeStatMultiplier));
|
||||
@@ -4893,7 +4894,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<ChaosGeyser>()] < 3)
|
||||
{
|
||||
Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, ModContent.ProjectileType<ChaosGeyser>(), (int)((double)damage * 0.15), 2f, player.whoAmI, 0f, 0f);
|
||||
Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, ModContent.ProjectileType<ChaosGeyser>(), (int)(damage * 0.15), 2f, player.whoAmI, 0f, 0f);
|
||||
}
|
||||
}
|
||||
if (unstablePrism && crit)
|
||||
@@ -4907,7 +4908,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
value15.Normalize();
|
||||
value15 *= (float)Main.rand.Next(30, 61) * 0.1f;
|
||||
Projectile.NewProjectile(target.Center.X, target.Center.Y, value15.X, value15.Y, ModContent.ProjectileType<UnstableSpark>(), (int)((double)damage * 0.15), 0f, player.whoAmI, 0f, 0f);
|
||||
Projectile.NewProjectile(target.Center.X, target.Center.Y, value15.X, value15.Y, ModContent.ProjectileType<UnstableSpark>(), (int)(damage * 0.15), 0f, player.whoAmI, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4987,7 +4988,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (item.melee)
|
||||
{
|
||||
int stressGain = (int)((double)damage * 0.1);
|
||||
int stressGain = (int)(damage * 0.1);
|
||||
int stressMaxGain = 10;
|
||||
if (stressGain < 1)
|
||||
{
|
||||
@@ -5018,16 +5019,16 @@ namespace CalamityMod.CalPlayer
|
||||
return;
|
||||
|
||||
bool isTrueMelee = proj.Calamity().trueMelee;
|
||||
bool isSummon = proj.minion || proj.sentry || CalamityMod.projectileMinionList.Contains(proj.type);
|
||||
bool isSummon = proj.minion || proj.sentry || CalamityMod.projectileMinionList.Contains(proj.type);
|
||||
bool hasClassType = proj.melee || proj.ranged || proj.magic || isSummon || proj.Calamity().rogue;
|
||||
|
||||
Item heldItem = player.inventory[player.selectedItem];
|
||||
|
||||
if (isTrueMelee && soaring)
|
||||
{
|
||||
double useTimeMultiplier = 0.85 + ((double)(heldItem.useTime * heldItem.useAnimation) / 3600D); //28 * 28 = 784 is average so that equals 784 / 3600 = 0.217777 + 1 = 21.7% boost
|
||||
double wingTimeFraction = (double)player.wingTimeMax / 20D;
|
||||
double meleeStatMultiplier = (double)(player.meleeDamage * (float)((double)player.meleeCrit / 10D));
|
||||
double useTimeMultiplier = 0.85 + (heldItem.useTime * heldItem.useAnimation / 3600D); //28 * 28 = 784 is average so that equals 784 / 3600 = 0.217777 + 1 = 21.7% boost
|
||||
double wingTimeFraction = player.wingTimeMax / 20D;
|
||||
double meleeStatMultiplier = (double)(player.meleeDamage * (float)(player.meleeCrit / 10D));
|
||||
|
||||
if (player.wingTime < player.wingTimeMax)
|
||||
player.wingTime += (int)(useTimeMultiplier * (wingTimeFraction + meleeStatMultiplier));
|
||||
@@ -5209,7 +5210,7 @@ namespace CalamityMod.CalPlayer
|
||||
#region AdditiveBoosts
|
||||
if (proj.type == ModContent.ProjectileType<AcidBulletProj>())
|
||||
{
|
||||
int defenseAdd = (int)((double)target.defense * 0.05 * ((double)proj.damage / 50D) * acidRoundMultiplier); //100 defense * 0.05 = 5
|
||||
int defenseAdd = (int)(target.defense * 0.05 * (proj.damage / 50D) * acidRoundMultiplier); //100 defense * 0.05 = 5
|
||||
damage += defenseAdd;
|
||||
}
|
||||
if (uberBees && (proj.type == ProjectileID.GiantBee || proj.type == ProjectileID.Bee || proj.type == ProjectileID.Wasp || proj.type == ModContent.ProjectileType<PlaguenadeBee>()))
|
||||
@@ -5325,7 +5326,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
value15.Normalize();
|
||||
value15 *= (float)Main.rand.Next(30, 61) * 0.1f;
|
||||
Projectile.NewProjectile(proj.oldPosition.X + (float)(proj.width / 2), proj.oldPosition.Y + (float)(proj.height / 2), value15.X, value15.Y, ModContent.ProjectileType<UnstableSpark>(), (int)((double)damage * 0.15), 0f, player.whoAmI, 0f, 0f);
|
||||
Projectile.NewProjectile(proj.oldPosition.X + (float)(proj.width / 2), proj.oldPosition.Y + (float)(proj.height / 2), value15.X, value15.Y, ModContent.ProjectileType<UnstableSpark>(), (int)(damage * 0.15), 0f, player.whoAmI, 0f, 0f);
|
||||
}
|
||||
}
|
||||
if (electricianGlove && proj.Calamity().stealthStrike && proj.Calamity().rogue)
|
||||
@@ -5339,7 +5340,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
value15.Normalize();
|
||||
value15 *= (float)Main.rand.Next(30, 61) * 0.1f;
|
||||
int num17 = Projectile.NewProjectile(proj.oldPosition.X + (float)(proj.width / 2), proj.oldPosition.Y + (float)(proj.height / 2), value15.X, value15.Y, ModContent.ProjectileType<Spark>(), (int)((double)damage * 0.1), 0f, player.whoAmI, 0f, 0f);
|
||||
int num17 = Projectile.NewProjectile(proj.oldPosition.X + (float)(proj.width / 2), proj.oldPosition.Y + (float)(proj.height / 2), value15.X, value15.Y, ModContent.ProjectileType<Spark>(), (int)(damage * 0.1), 0f, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[num17].Calamity().forceRogue = true;
|
||||
Main.projectile[num17].localNPCHitCooldown = -1;
|
||||
}
|
||||
@@ -5390,7 +5391,7 @@ namespace CalamityMod.CalPlayer
|
||||
value15.Normalize();
|
||||
value15 *= (float)Main.rand.Next(70, 101) * 0.1f;
|
||||
int FUCKYOU = Projectile.NewProjectile(target.position.X + (float)(target.width / 2), target.position.Y + (float)(target.height / 2),
|
||||
value15.X, value15.Y, ProjectileID.Leaf, (int)((double)damage * 0.25), 0f, player.whoAmI, 0f, 0f);
|
||||
value15.X, value15.Y, ProjectileID.Leaf, (int)(damage * 0.25), 0f, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[FUCKYOU].magic = false;
|
||||
Main.projectile[FUCKYOU].netUpdate = true;
|
||||
}
|
||||
@@ -5438,7 +5439,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (umbraphileSet && proj.Calamity().rogue && (Main.rand.NextBool(4) || proj.Calamity().stealthStrike))
|
||||
{
|
||||
int newDamage = (int)((double)proj.damage * 0.25);
|
||||
int newDamage = (int)(proj.damage * 0.25);
|
||||
if (newDamage > 50)
|
||||
{
|
||||
newDamage = 50;
|
||||
@@ -5606,7 +5607,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (triumph)
|
||||
{
|
||||
double HPMultiplier = 0.15 * (1.0 - ((double)npc.life / (double)npc.lifeMax));
|
||||
int damageReduction = (int)((double)damage * HPMultiplier);
|
||||
int damageReduction = (int)(damage * HPMultiplier);
|
||||
damage -= damageReduction;
|
||||
}
|
||||
if (aSparkRare)
|
||||
@@ -5631,7 +5632,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (silvaMelee && silvaCountdown <= 0 && hasSilvaEffect)
|
||||
{
|
||||
damage = (int)((double)damage * 0.8);
|
||||
damage = (int)(damage * 0.8);
|
||||
}
|
||||
if (aBulwarkRare)
|
||||
{
|
||||
@@ -5695,7 +5696,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (projRefRare)
|
||||
{
|
||||
if (proj.type == projTypeJustHitBy)
|
||||
damage = (int)((double)damage * 0.85);
|
||||
damage = (int)(damage * 0.85);
|
||||
}
|
||||
if (aSparkRare)
|
||||
{
|
||||
@@ -5705,17 +5706,17 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (proj.type == ProjectileID.Nail)
|
||||
{
|
||||
damage = (int)((double)damage * 0.75);
|
||||
damage = (int)(damage * 0.75);
|
||||
}
|
||||
if (beeResist)
|
||||
{
|
||||
if (CalamityMod.beeProjectileList.Contains(proj.type))
|
||||
damage = (int)((double)damage * 0.75);
|
||||
damage = (int)(damage * 0.75);
|
||||
}
|
||||
if (Main.hardMode && Main.expertMode && !CalamityWorld.spawnedHardBoss && proj.active && !proj.friendly && proj.hostile && damage > 0)
|
||||
{
|
||||
if (CalamityMod.hardModeNerfList.Contains(proj.type))
|
||||
damage = (int)((double)damage * 0.75);
|
||||
damage = (int)(damage * 0.75);
|
||||
}
|
||||
if (CalamityWorld.revenge)
|
||||
{
|
||||
@@ -5750,14 +5751,17 @@ namespace CalamityMod.CalPlayer
|
||||
// Reduce damage from vanilla traps
|
||||
// 350 in normal, 450 in expert
|
||||
if (proj.type == ProjectileID.Explosives)
|
||||
damage = (int)((double)damage * (Main.expertMode ? 0.225 : 0.35));
|
||||
damage = (int)(damage * (Main.expertMode ? 0.225 : 0.35));
|
||||
if (Main.expertMode)
|
||||
{
|
||||
// 140 in normal, 182 in expert
|
||||
if (proj.type == ProjectileID.Boulder)
|
||||
damage = (int)((double)damage * 0.65);
|
||||
damage = (int)(damage * 0.65);
|
||||
}
|
||||
|
||||
if (proj.type == ModContent.ProjectileType<BirbAura>())
|
||||
damage = 0;
|
||||
|
||||
if (player.whoAmI == Main.myPlayer && gainRageCooldown <= 0)
|
||||
{
|
||||
if (CalamityWorld.revenge && CalamityMod.CalamityConfig.AdrenalineAndRage && !CalamityMod.trapProjectileList.Contains(proj.type))
|
||||
@@ -6038,7 +6042,7 @@ namespace CalamityMod.CalPlayer
|
||||
player.head = mod.GetEquipSlot("ProviHead", EquipType.Head);
|
||||
player.wings = mod.GetEquipSlot("ProviWings", EquipType.Wings);
|
||||
|
||||
bool enrage = !profanedCrystalForce && profanedCrystalBuffs && player.statLife <= (int)((double)player.statLifeMax2 * 0.5);
|
||||
bool enrage = !profanedCrystalForce && profanedCrystalBuffs && player.statLife <= (int)(player.statLifeMax2 * 0.5);
|
||||
|
||||
if (profanedCrystalWingCounter.Value == 0)
|
||||
{
|
||||
@@ -6110,7 +6114,7 @@ namespace CalamityMod.CalPlayer
|
||||
player.gravControl = false;
|
||||
player.gravControl2 = false;
|
||||
player.jumpSpeedBoost = 0f;
|
||||
player.wingTimeMax = (int)((double)player.wingTimeMax * 0.5);
|
||||
player.wingTimeMax = (int)(player.wingTimeMax * 0.5);
|
||||
player.balloon = -1;
|
||||
weakPetrification = true;
|
||||
}
|
||||
@@ -6206,13 +6210,13 @@ namespace CalamityMod.CalPlayer
|
||||
damageMult += 0.2;
|
||||
}
|
||||
|
||||
damage = (int)((double)damage * damageMult);
|
||||
damage = (int)(damage * damageMult);
|
||||
#endregion
|
||||
|
||||
if (CalamityWorld.revenge)
|
||||
{
|
||||
customDamage = true;
|
||||
double newDamage = (double)damage - ((double)player.statDefense * 0.75);
|
||||
double newDamage = (double)damage - (player.statDefense * 0.75);
|
||||
double newDamageLimit = 5.0 + (Main.hardMode ? 5.0 : 0.0) + (NPC.downedPlantBoss ? 5.0 : 0.0) + (NPC.downedMoonlord ? 5.0 : 0.0); //5, 10, 15, 20
|
||||
if (newDamage < newDamageLimit)
|
||||
{
|
||||
@@ -6224,11 +6228,11 @@ namespace CalamityMod.CalPlayer
|
||||
#region MultiplicativeReductions
|
||||
if (trinketOfChiBuff)
|
||||
{
|
||||
damage = (int)((double)damage * 0.85);
|
||||
damage = (int)(damage * 0.85);
|
||||
}
|
||||
if (purpleCandle)
|
||||
{
|
||||
damage = (int)((double)damage - ((double)player.statDefense * 0.05));
|
||||
damage = (int)((double)damage - (player.statDefense * 0.05));
|
||||
}
|
||||
// Fearmonger set provides 15% multiplicative DR that ignores caps during the Holiday Moons.
|
||||
// To prevent abuse, this effect does not work if there are any bosses alive.
|
||||
@@ -6238,36 +6242,36 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (abyssalDivingSuitPlates)
|
||||
{
|
||||
damage = (int)((double)damage * 0.85);
|
||||
damage = (int)(damage * 0.85);
|
||||
}
|
||||
if (sirenIce)
|
||||
{
|
||||
damage = (int)((double)damage * 0.85);
|
||||
damage = (int)(damage * 0.85);
|
||||
}
|
||||
if (encased)
|
||||
{
|
||||
damage = (int)((double)damage * 0.7);
|
||||
damage = (int)(damage * 0.7);
|
||||
}
|
||||
if (theBee && player.statLife >= player.statLifeMax2 && theBeeCooldown <= 0)
|
||||
{
|
||||
damage = (int)((double)damage * 0.5);
|
||||
damage = (int)(damage * 0.5);
|
||||
theBeeCooldown = 600;
|
||||
}
|
||||
if (CalamityWorld.revenge)
|
||||
{
|
||||
if (!CalamityWorld.downedBossAny)
|
||||
damage = (int)((double)damage * 0.8);
|
||||
damage = (int)(damage * 0.8);
|
||||
|
||||
if (CalamityMod.CalamityConfig.AdrenalineAndRage)
|
||||
{
|
||||
if (adrenaline == adrenalineMax && !adrenalineMode)
|
||||
damage = (int)((double)damage * 0.5);
|
||||
damage = (int)(damage * 0.5);
|
||||
}
|
||||
}
|
||||
if (player.mount.Active && (player.mount.Type == ModContent.MountType<AngryDogMount>() || player.mount.Type == ModContent.MountType<OnyxExcavator>())
|
||||
&& Math.Abs(player.velocity.X) > player.mount.RunSpeed / 2f)
|
||||
{
|
||||
damage = (int)((double)damage * 0.9);
|
||||
damage = (int)(damage * 0.9);
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -6468,11 +6472,12 @@ namespace CalamityMod.CalPlayer
|
||||
if (arg_67A_0 < num10)
|
||||
{
|
||||
float num11 = (float)Main.rand.Next(90 + (int)damage / 3, 300 + (int)damage / 2);
|
||||
Main.npc[m].AddBuff(31, (int)num11, false);
|
||||
Main.npc[m].AddBuff(BuffID.Confused, (int)num11, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
Projectile.NewProjectile(player.Center.X + (float)Main.rand.Next(-40, 40), player.Center.Y - (float)Main.rand.Next(20, 60), player.velocity.X * 0.3f, player.velocity.Y * 0.3f, 565, 0, 0f, player.whoAmI, 0f, 0f);
|
||||
//spawn the harmless brain images that are actually projectiles
|
||||
Projectile.NewProjectile(player.Center.X + (float)Main.rand.Next(-40, 40), player.Center.Y - (float)Main.rand.Next(20, 60), player.velocity.X * 0.3f, player.velocity.Y * 0.3f, ProjectileID.BrainOfConfusion, 0, 0f, player.whoAmI, 0f, 0f);
|
||||
}
|
||||
if (polarisBoost)
|
||||
{
|
||||
@@ -6566,7 +6571,7 @@ namespace CalamityMod.CalPlayer
|
||||
num16 = (float)num15 / num16;
|
||||
num13 *= num16;
|
||||
num14 *= num16;
|
||||
int num17 = Projectile.NewProjectile(x, y, num13, num14, ModContent.ProjectileType<StickyFeatherAero>(), 20, 1f, player.whoAmI, 0f, 0f);
|
||||
int num17 = Projectile.NewProjectile(x, y, num13, num14, ModContent.ProjectileType<StickyFeatherAero>(), (int)(20 * player.AverageDamage()), 1f, player.whoAmI, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6575,7 +6580,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (aBulwarkRare)
|
||||
{
|
||||
Main.PlaySound(2, (int)player.position.X, (int)player.position.Y, 74);
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<GodSlayerBlaze>(), 25, 5f, player.whoAmI, 0f, 1f);
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<GodSlayerBlaze>(), (int)(25 * player.AverageDamage()), 5f, player.whoAmI, 0f, 1f);
|
||||
}
|
||||
int starAmt = aBulwarkRare ? 12 : 5;
|
||||
for (int n = 0; n < starAmt; n++)
|
||||
@@ -6591,7 +6596,7 @@ namespace CalamityMod.CalPlayer
|
||||
num16 = (float)num15 / num16;
|
||||
num13 *= num16;
|
||||
num14 *= num16;
|
||||
int num17 = Projectile.NewProjectile(x, y, num13, num14, ModContent.ProjectileType<AstralStar>(), 320, 5f, player.whoAmI, 0f, 0f);
|
||||
int num17 = Projectile.NewProjectile(x, y, num13, num14, ModContent.ProjectileType<AstralStar>(), (int)(320 * player.AverageDamage()), 5f, player.whoAmI, 0f, 0f);
|
||||
}
|
||||
}
|
||||
if (dAmulet)
|
||||
@@ -6609,7 +6614,7 @@ namespace CalamityMod.CalPlayer
|
||||
num16 = (float)num15 / num16;
|
||||
num13 *= num16;
|
||||
num14 *= num16;
|
||||
int star = Projectile.NewProjectile(x, y, num13, num14, 92, 130, 4f, player.whoAmI, 0f, 0f);
|
||||
int star = Projectile.NewProjectile(x, y, num13, num14, ProjectileID.HallowStar, (int)(130 * player.AverageDamage()), 4f, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[star].usesLocalNPCImmunity = true;
|
||||
Main.projectile[star].localNPCHitCooldown = 5;
|
||||
Main.projectile[star].ranged = false;
|
||||
@@ -6644,7 +6649,7 @@ namespace CalamityMod.CalPlayer
|
||||
num16 = (float)num15 / num16;
|
||||
num13 *= num16;
|
||||
num14 *= num16;
|
||||
int star = Projectile.NewProjectile(x, y, num13, num14, 92, 130, 4f, player.whoAmI, 0f, 0f);
|
||||
int star = Projectile.NewProjectile(x, y, num13, num14, ProjectileID.HallowStar, (int)(150 * player.AverageDamage()), 4f, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[star].usesLocalNPCImmunity = true;
|
||||
Main.projectile[star].localNPCHitCooldown = 5;
|
||||
Main.projectile[star].ranged = false;
|
||||
@@ -6674,7 +6679,7 @@ namespace CalamityMod.CalPlayer
|
||||
double deltaAngle = spread / 8f;
|
||||
double offsetAngle;
|
||||
int i;
|
||||
int fDamage = 56;
|
||||
int fDamage = (int)(56 * player.AverageDamage());
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
for (i = 0; i < 4; i++)
|
||||
@@ -6708,10 +6713,12 @@ namespace CalamityMod.CalPlayer
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
|
||||
int spark1 = Projectile.NewProjectile(player.Center.X, player.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<Spark>(), sDamage, 1.25f, player.whoAmI, 0f, 0f);
|
||||
int spark2 = Projectile.NewProjectile(player.Center.X, player.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<Spark>(), sDamage, 1.25f, player.whoAmI, 0f, 0f);
|
||||
int spark1 = Projectile.NewProjectile(player.Center.X, player.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<Spark>(), (int)(sDamage * player.AverageDamage()), 1.25f, player.whoAmI, 0f, 0f);
|
||||
int spark2 = Projectile.NewProjectile(player.Center.X, player.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<Spark>(), (int)(sDamage * player.AverageDamage()), 1.25f, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[spark1].timeLeft = 120;
|
||||
Main.projectile[spark2].timeLeft = 120;
|
||||
Main.projectile[spark1].melee = false;
|
||||
Main.projectile[spark2].melee = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6739,7 +6746,7 @@ namespace CalamityMod.CalPlayer
|
||||
Dust.NewDust(player.Center, 1, 1, 244, BCDSpeed.X, BCDSpeed.Y, 0, default, 1.1f);
|
||||
}
|
||||
Main.PlaySound(SoundID.Item14, player.Center);
|
||||
int blazingSun = Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<BlazingSun>(), 1690, 0f, player.whoAmI, 0f, 0f);
|
||||
int blazingSun = Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<BlazingSun>(), (int)(1690 * player.AverageDamage()), 0f, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[blazingSun].Center = player.Center;
|
||||
int blazingSun2 = Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<BlazingSun2>(), 0, 0f, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[blazingSun2].Center = player.Center;
|
||||
@@ -6750,7 +6757,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (damage > 0)
|
||||
{
|
||||
Main.PlaySound(2, (int)player.position.X, (int)player.position.Y, 74);
|
||||
int eDamage = 100;
|
||||
int eDamage = (int)(100 * player.AverageDamage());
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<ChaosBlaze>(), eDamage, 1f, player.whoAmI, 0f, 0f);
|
||||
@@ -6767,7 +6774,7 @@ namespace CalamityMod.CalPlayer
|
||||
double deltaAngle = spread / 8f;
|
||||
double offsetAngle;
|
||||
int i;
|
||||
int sDamage = 27;
|
||||
int sDamage = (int)(27 * player.RangedDamage()); //daedalus ranged helm
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
for (i = 0; i < 8; i++)
|
||||
@@ -6793,7 +6800,7 @@ namespace CalamityMod.CalPlayer
|
||||
double deltaAngle = spread / 8f;
|
||||
double offsetAngle;
|
||||
int i;
|
||||
int rDamage = 58;
|
||||
int rDamage = (int)(58 * player.RogueDamage()); //Reaver rogue helm
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
for (i = 0; i < 4; i++)
|
||||
@@ -6811,7 +6818,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (godSlayerDamage)
|
||||
else if (godSlayerDamage) //god slayer melee helm
|
||||
{
|
||||
if (damage > 80)
|
||||
{
|
||||
@@ -6826,8 +6833,8 @@ namespace CalamityMod.CalPlayer
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<GodKiller>(), 900, 5f, player.whoAmI, 0f, 0f);
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<GodKiller>(), 900, 5f, player.whoAmI, 0f, 0f);
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<GodKiller>(), (int)(900 * player.MeleeDamage()), 5f, player.whoAmI, 0f, 0f);
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), ModContent.ProjectileType<GodKiller>(), (int)(900 * player.MeleeDamage()), 5f, player.whoAmI, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6839,7 +6846,7 @@ namespace CalamityMod.CalPlayer
|
||||
Main.PlaySound(2, (int)player.position.X, (int)player.position.Y, 74);
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<GodSlayerBlaze>(), auricSet ? 2400 : 1200, 1f, player.whoAmI, 0f, 0f);
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<GodSlayerBlaze>(), (int)((auricSet ? 2400 : 1200) * player.MagicDamage()), 1f, player.whoAmI, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6860,10 +6867,11 @@ namespace CalamityMod.CalPlayer
|
||||
num18 = (float)num17 / num18;
|
||||
num15 *= num18;
|
||||
num16 *= num18;
|
||||
int num19 = Projectile.NewProjectile(x, y, num15, num16, ProjectileID.ShadowBeamFriendly, 3000, 7f, player.whoAmI, 0f, 0f);
|
||||
int num19 = Projectile.NewProjectile(x, y, num15, num16, ProjectileID.ShadowBeamFriendly, (int)(3000 * player.AverageDamage()), 7f, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[num19].ai[1] = player.position.Y;
|
||||
Main.projectile[num19].usesLocalNPCImmunity = true;
|
||||
Main.projectile[num19].localNPCHitCooldown = 10;
|
||||
Main.projectile[num19].magic = false;
|
||||
}
|
||||
for (int l = 0; l < 5; l++)
|
||||
{
|
||||
@@ -6878,10 +6886,11 @@ namespace CalamityMod.CalPlayer
|
||||
num18 = (float)num17 / num18;
|
||||
num15 *= num18;
|
||||
num16 *= num18;
|
||||
int num19 = Projectile.NewProjectile(x, y, num15, num16, ProjectileID.DemonScythe, 5000, 7f, player.whoAmI, 0f, 0f);
|
||||
int num19 = Projectile.NewProjectile(x, y, num15, num16, ProjectileID.DemonScythe, (int)(5000 * player.AverageDamage()), 7f, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[num19].ai[1] = player.position.Y;
|
||||
Main.projectile[num19].usesLocalNPCImmunity = true;
|
||||
Main.projectile[num19].localNPCHitCooldown = 10;
|
||||
Main.projectile[num19].magic = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6999,7 +7008,7 @@ namespace CalamityMod.CalPlayer
|
||||
player.respawnTimer = 600;
|
||||
if (Main.expertMode)
|
||||
{
|
||||
player.respawnTimer = (int)((double)player.respawnTimer * 1.5);
|
||||
player.respawnTimer = (int)(player.respawnTimer * 1.5);
|
||||
}
|
||||
player.immuneAlpha = 0;
|
||||
player.palladiumRegen = false;
|
||||
@@ -7085,7 +7094,7 @@ namespace CalamityMod.CalPlayer
|
||||
Rectangle rect = nPC.getRect();
|
||||
if (rectangle.Intersects(rect) && (nPC.noTileCollide || player.CanHit(nPC)))
|
||||
{
|
||||
float num = 50f * player.MeleeDamage();
|
||||
float num = 50f * player.AverageDamage();
|
||||
float num2 = 3f;
|
||||
bool crit = false;
|
||||
if (player.kbGlove)
|
||||
@@ -7139,7 +7148,7 @@ namespace CalamityMod.CalPlayer
|
||||
Rectangle rect = nPC.getRect();
|
||||
if (rectangle.Intersects(rect) && (nPC.noTileCollide || player.CanHit(nPC)))
|
||||
{
|
||||
float num = 1500f * player.MeleeDamage();
|
||||
float num = 1500f * player.AverageDamage();
|
||||
float num2 = 15f;
|
||||
bool crit = false;
|
||||
if (player.kbGlove)
|
||||
@@ -7166,9 +7175,8 @@ namespace CalamityMod.CalPlayer
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
player.ApplyDamageToNPC(nPC, (int)num, num2, direction, crit);
|
||||
int num6 = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<HolyExplosionSupreme>(), 1000, 20f, Main.myPlayer, 0f, 0f);
|
||||
Main.projectile[num6].Kill();
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<HolyEruption>(), 780, 5f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<HolyExplosionSupreme>(), (int)(1000 * player.AverageDamage()), 20f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<HolyEruption>(), (int)(780 * player.AverageDamage()), 5f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
if (nPC.immune[player.whoAmI] < 6)
|
||||
nPC.immune[player.whoAmI] = 6;
|
||||
@@ -7196,7 +7204,7 @@ namespace CalamityMod.CalPlayer
|
||||
Rectangle rect = nPC.getRect();
|
||||
if (rectangle.Intersects(rect) && (nPC.noTileCollide || player.CanHit(nPC)))
|
||||
{
|
||||
float num = 500f * player.MeleeDamage();
|
||||
float num = 500f * player.AverageDamage();
|
||||
float num2 = 12f;
|
||||
bool crit = false;
|
||||
if (player.kbGlove)
|
||||
@@ -7223,9 +7231,8 @@ namespace CalamityMod.CalPlayer
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
player.ApplyDamageToNPC(nPC, (int)num, num2, direction, crit);
|
||||
int num6 = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<HolyExplosionSupreme>(), 500, 15f, Main.myPlayer, 0f, 0f);
|
||||
Main.projectile[num6].Kill();
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<HolyEruption>(), 380, 5f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<HolyExplosionSupreme>(), (int)(500 * player.AverageDamage()), 15f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<HolyEruption>(), (int)(380 * player.AverageDamage()), 5f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
if (nPC.immune[player.whoAmI] < 6)
|
||||
nPC.immune[player.whoAmI] = 6;
|
||||
@@ -7252,7 +7259,7 @@ namespace CalamityMod.CalPlayer
|
||||
Rectangle rect = nPC.getRect();
|
||||
if (rectangle.Intersects(rect) && (nPC.noTileCollide || player.CanHit(nPC)))
|
||||
{
|
||||
float num = 100f * player.MeleeDamage();
|
||||
float num = 100f * player.AverageDamage();
|
||||
float num2 = 9f;
|
||||
bool crit = false;
|
||||
if (player.kbGlove)
|
||||
@@ -7279,8 +7286,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
player.ApplyDamageToNPC(nPC, (int)num, num2, direction, crit);
|
||||
int num6 = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<HolyExplosion>(), 100, 15f, Main.myPlayer, 0f, 0f);
|
||||
Main.projectile[num6].Kill();
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<HolyExplosion>(), (int)(100 * player.AverageDamage()), 15f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
if (nPC.immune[player.whoAmI] < 6)
|
||||
nPC.immune[player.whoAmI] = 6;
|
||||
@@ -7455,7 +7461,7 @@ namespace CalamityMod.CalPlayer
|
||||
num7 = 14f; //14
|
||||
if (statisTimer % 5 == 0)
|
||||
{
|
||||
int scythe = Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<CosmicScythe>(), (int)(500 * player.allDamage), 5f, player.whoAmI, 1f);
|
||||
int scythe = Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<CosmicScythe>(), (int)(500 * player.AverageDamage()), 5f, player.whoAmI, 1f);
|
||||
Main.projectile[scythe].Calamity().rogue = false;
|
||||
Main.projectile[scythe].usesIDStaticNPCImmunity = true;
|
||||
Main.projectile[scythe].idStaticNPCHitCooldown = 10 * Main.projectile[scythe].extraUpdates;
|
||||
@@ -10461,7 +10467,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
bool isInvalidTransFrame = !IsValidTransitionFrame(currentType, newType, key, value); //to make the transition between walk and idle frames less jarring and smoother
|
||||
AnimationType type = isInvalidTransFrame ? newType : currentType;
|
||||
int frameCount = type == AnimationType.Walk || (!profanedCrystalForce && player.statLife <= (int)((double)player.statLifeMax2 * 0.5)) ? 7 : 10;
|
||||
int frameCount = type == AnimationType.Walk || (!profanedCrystalForce && player.statLife <= (int)(player.statLifeMax2 * 0.5)) ? 7 : 10;
|
||||
int lowerRange = type == AnimationType.Idle ? 0 : type == AnimationType.Jump ? 8 : 9;
|
||||
int upperRange = type == AnimationType.Idle ? 7 : type == AnimationType.Jump ? 8 : 22;
|
||||
if (value <= 0 || !isInvalidTransFrame)
|
||||
|
||||
@@ -785,11 +785,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (!tentaclesPresent[i])
|
||||
{
|
||||
float modifier = player.meleeDamage + player.magicDamage + player.rangedDamage +
|
||||
modPlayer.throwingDamage + player.minionDamage + ((player.allDamage - 1f) * 5f);
|
||||
|
||||
modifier /= 5f;
|
||||
int damage = (int)(666 * modifier);
|
||||
int damage = (int)(666 * player.AverageDamage());
|
||||
Vector2 vel = new Vector2(Main.rand.Next(-13, 14), Main.rand.Next(-13, 14)) * 0.25f;
|
||||
Projectile.NewProjectile(player.Center, vel, ModContent.ProjectileType<OmegaBlueTentacle>(), damage, 8f, Main.myPlayer, Main.rand.Next(120), i);
|
||||
}
|
||||
@@ -1294,7 +1290,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (modPlayer.eaterOfWorldsLore)
|
||||
{
|
||||
int damage = 20;
|
||||
int damage = (int)(15 * player.AverageDamage());
|
||||
float knockBack = 1f;
|
||||
if (Main.rand.NextBool(15))
|
||||
{
|
||||
@@ -1661,7 +1657,7 @@ namespace CalamityMod.CalPlayer
|
||||
Vector2 cloudVelocity = new Vector2(Main.rand.NextFloat(-1, 1), Main.rand.NextFloat(-1, 1));
|
||||
cloudVelocity.Normalize();
|
||||
cloudVelocity *= Main.rand.NextFloat(0f, 1f);
|
||||
int projectile = Projectile.NewProjectile(player.Center, cloudVelocity, ModContent.ProjectileType<PlaguedFuelPackCloud>(), 20, 0, player.whoAmI, 0, 0);
|
||||
int projectile = Projectile.NewProjectile(player.Center, cloudVelocity, ModContent.ProjectileType<PlaguedFuelPackCloud>(), (int)(20 * player.RogueDamage()), 0, player.whoAmI, 0, 0);
|
||||
Main.projectile[projectile].timeLeft = Main.rand.Next(180, 240);
|
||||
}
|
||||
|
||||
@@ -3126,7 +3122,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (modPlayer.navyRodAuraTimer == 0 && player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
const int BaseDamage = 10;
|
||||
int damage = (int)(BaseDamage * player.allDamage);
|
||||
int damage = (int)(BaseDamage * player.AverageDamage());
|
||||
float range = 200f;
|
||||
|
||||
for (int i = 0; i < Main.maxNPCs; ++i)
|
||||
@@ -3169,7 +3165,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
const int BaseDamage = 50;
|
||||
int damage = (int)(BaseDamage * player.allDamage);
|
||||
int damage = (int)(BaseDamage * player.AverageDamage());
|
||||
float range = 300f;
|
||||
|
||||
for (int i = 0; i < Main.maxNPCs; ++i)
|
||||
@@ -3363,7 +3359,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<TeslaAura>()] < 1)
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<TeslaAura>(), 15, 0f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<TeslaAura>(), (int)(10 * player.AverageDamage()), 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
else if (player.ownedProjectileCounts[ModContent.ProjectileType<TeslaAura>()] != 0)
|
||||
|
||||
@@ -1737,6 +1737,7 @@ namespace CalamityMod
|
||||
ModContent.ProjectileType<ProfanedSpear>(),
|
||||
ModContent.ProjectileType<FlareDust>(),
|
||||
ModContent.ProjectileType<RedLightningFeather>(),
|
||||
ModContent.ProjectileType<RedLightning>(),
|
||||
ModContent.ProjectileType<HolyBlast>(),
|
||||
ModContent.ProjectileType<HolyShot>(),
|
||||
ModContent.ProjectileType<HolySpear>(),
|
||||
|
||||
@@ -51,11 +51,12 @@ namespace CalamityMod.Items.Accessories
|
||||
num18 = (float)num17 / num18;
|
||||
num15 *= num18;
|
||||
num16 *= num18;
|
||||
int num19 = Projectile.NewProjectile(x, y, num15, num16, ModContent.ProjectileType<AuraRain>(), 60, 2f, player.whoAmI, 0f, 0f);
|
||||
int num19 = Projectile.NewProjectile(x, y, num15, num16, ModContent.ProjectileType<AuraRain>(), (int)(60 * player.AverageDamage()), 2f, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[num19].ai[1] = player.position.Y;
|
||||
Main.projectile[num19].tileCollide = false;
|
||||
Main.projectile[num19].usesLocalNPCImmunity = true;
|
||||
Main.projectile[num19].localNPCHitCooldown = 10;
|
||||
Main.projectile[num19].magic = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
@@ -14,7 +14,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Amidias' Pendant");
|
||||
Tooltip.SetDefault("Periodically rains down prism shards");
|
||||
Tooltip.SetDefault("Periodically rains down prism shards that can briefly stun enemies");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -28,14 +28,14 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
if (ShardCountdown == 0)
|
||||
if (ShardCountdown <= 0)
|
||||
{
|
||||
ShardCountdown = 120;
|
||||
ShardCountdown = 140;
|
||||
}
|
||||
if (ShardCountdown > 0)
|
||||
{
|
||||
ShardCountdown--;
|
||||
if (ShardCountdown == 0)
|
||||
ShardCountdown -= Main.rand.Next(1,4);
|
||||
if (ShardCountdown <= 0)
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
@@ -69,9 +69,7 @@ namespace CalamityMod.Items.Accessories
|
||||
damage = 30;
|
||||
break;
|
||||
}
|
||||
int projectile = Projectile.NewProjectile(spawn.X, spawn.Y, velocity.X / 3, velocity.Y / 2, type, damage, 5f, Main.myPlayer, 0f, 0f);
|
||||
Main.projectile[projectile].tileCollide = false;
|
||||
Main.projectile[projectile].timeLeft = 220;
|
||||
Projectile.NewProjectile(spawn.X, spawn.Y, velocity.X / 3, velocity.Y / 2, type, (int)(damage * player.AverageDamage()), 5f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace CalamityMod.Items.Accessories
|
||||
int num = 186;
|
||||
float num2 = 150f;
|
||||
bool flag = bloomCounter % 60 == 0;
|
||||
int num3 = 10;
|
||||
int num3 = (int)(10 * player.AverageDamage());
|
||||
int random = Main.rand.Next(10);
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace CalamityMod.Items.Accessories
|
||||
num18 = (float)num17 / num18;
|
||||
num15 *= num18;
|
||||
num16 *= num18;
|
||||
int num19 = Projectile.NewProjectile(x, y, num15, num16, ModContent.ProjectileType<StandingFire>(), 30, 5f, player.whoAmI, 0f, 0f);
|
||||
int num19 = Projectile.NewProjectile(x, y, num15, num16, ModContent.ProjectileType<StandingFire>(), (int)(30 * player.AverageDamage()), 5f, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[num19].ai[1] = player.position.Y;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
float speed = Main.rand.NextFloat(3f, 11f);
|
||||
Projectile.NewProjectile(player.Center, Vector2.One.RotatedByRandom(MathHelper.TwoPi) * speed,
|
||||
type, 100, 0f, player.whoAmI);
|
||||
type, (int)(100 * player.RogueDamage()), 0f, player.whoAmI);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
@@ -53,9 +53,7 @@ namespace CalamityMod.Items.Accessories
|
||||
spawn.X = spawn.X + i * 30 - (FireProjectiles * 15);
|
||||
Vector2 velocity = baseVelocity.RotatedBy(MathHelper.ToRadians(-FireAngleSpread / 2 + (FireAngleSpread * i / (float)FireProjectiles)));
|
||||
velocity.X = velocity.X + 3 * Main.rand.NextFloat() - 1.5f;
|
||||
int projectile = Projectile.NewProjectile(spawn.X, spawn.Y, velocity.X, velocity.Y, ModContent.ProjectileType<BrimstoneHellfireballFriendly2>(), 54, 5f, Main.myPlayer, 0f, 0f);
|
||||
Main.projectile[projectile].tileCollide = false;
|
||||
Main.projectile[projectile].timeLeft = 50;
|
||||
Projectile.NewProjectile(spawn.X, spawn.Y, velocity.X, velocity.Y, ModContent.ProjectileType<BrimstoneHellfireballFriendly2>(), (int)(54 * player.AverageDamage()), 5f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Buffs.Summon;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.World;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Accessories
|
||||
@@ -43,10 +44,13 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<GladiatorSwords>(), 3600, true);
|
||||
}
|
||||
int damage = NPC.downedPlantBoss ? 100 : Main.hardMode ? 50 : 20;
|
||||
float damageMult = CalamityWorld.downedDoG ? 3f : NPC.downedMoonlord ? 2f : 1f;
|
||||
int swordDmg = (int)(damage * damageMult * player.AverageDamage());
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<GladiatorSword>()] < 1)
|
||||
{
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<GladiatorSword>(), (int)(20f * (player.allDamage + player.minionDamage - 1f)), 6f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<GladiatorSword2>(), (int)(20f * (player.allDamage + player.minionDamage - 1f)), 6f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<GladiatorSword>(), swordDmg, 6f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<GladiatorSword2>(), swordDmg, 6f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,8 +62,11 @@ namespace CalamityMod.Items.Accessories
|
||||
player.statManaMax2 += 50;
|
||||
player.manaCost *= 0.95f;
|
||||
player.allDamage += 0.08f;
|
||||
|
||||
int damage = NPC.downedMoonlord ? 150 : 90;
|
||||
float damageMult = CalamityWorld.downedDoG ? 2f : 1f;
|
||||
int elementalDmg = (int)(damage * damageMult * player.MinionDamage());
|
||||
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<BrimstoneElementalMinion>()] > 1 || player.ownedProjectileCounts[ModContent.ProjectileType<WaterElementalMinion>()] > 1 ||
|
||||
player.ownedProjectileCounts[ModContent.ProjectileType<SandElementalHealer>()] > 1 || player.ownedProjectileCounts[ModContent.ProjectileType<SandElementalMinion>()] > 1 ||
|
||||
player.ownedProjectileCounts[ModContent.ProjectileType<CloudElementalMinion>()] > 1)
|
||||
@@ -76,23 +79,23 @@ namespace CalamityMod.Items.Accessories
|
||||
}
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<BrimstoneElementalMinion>()] < 1)
|
||||
{
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<BrimstoneElementalMinion>(), (int)((float)damage * damageMult * (player.allDamage + player.minionDamage - 1f)), 2f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<BrimstoneElementalMinion>(), elementalDmg, 2f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<WaterElementalMinion>()] < 1)
|
||||
{
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<WaterElementalMinion>(), (int)((float)damage * damageMult * (player.allDamage + player.minionDamage - 1f)), 2f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<WaterElementalMinion>(), elementalDmg, 2f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<SandElementalHealer>()] < 1)
|
||||
{
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<SandElementalHealer>(), (int)((float)damage * damageMult * (player.allDamage + player.minionDamage - 1f)), 2f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<SandElementalHealer>(), elementalDmg, 2f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<SandElementalMinion>()] < 1)
|
||||
{
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<SandElementalMinion>(), (int)((float)damage * damageMult * (player.allDamage + player.minionDamage - 1f)), 2f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<SandElementalMinion>(), elementalDmg, 2f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<CloudElementalMinion>()] < 1)
|
||||
{
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<CloudElementalMinion>(), (int)((float)damage * damageMult * (player.allDamage + player.minionDamage - 1f)), 2f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<CloudElementalMinion>(), elementalDmg, 2f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<PoisonousSeawater>(), 50, 5f, player.whoAmI, 0f, 0f);
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<PoisonousSeawater>(), (int)(50 * player.AverageDamage()), 5f, player.whoAmI, 0f, 0f);
|
||||
}
|
||||
}
|
||||
int seaCounter = 0;
|
||||
@@ -56,13 +56,13 @@ namespace CalamityMod.Items.Accessories
|
||||
int num = BuffID.Venom;
|
||||
float num2 = 200f;
|
||||
bool flag = seaCounter % 60 == 0;
|
||||
int num3 = 15;
|
||||
int num3 = (int)(15 * player.AverageDamage());
|
||||
int random = Main.rand.Next(5);
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
if (random == 0 && player.immune && Collision.DrownCollision(player.position, player.width, player.height, player.gravDir))
|
||||
{
|
||||
for (int l = 0; l < 200; l++)
|
||||
for (int l = 0; l < Main.maxNPCs; l++)
|
||||
{
|
||||
NPC nPC = Main.npc[l];
|
||||
if (nPC.active && !nPC.friendly && nPC.damage > 0 && !nPC.dontTakeDamage && !nPC.buffImmune[num] && Vector2.Distance(player.Center, nPC.Center) <= num2)
|
||||
|
||||
@@ -39,12 +39,12 @@ namespace CalamityMod.Items.Accessories
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.nCore = true;
|
||||
player.allDamage += 0.12f;
|
||||
int damage = 1500;
|
||||
int damage = (int)(1500 * player.AverageDamage());
|
||||
float knockBack = 3f;
|
||||
if (Main.rand.NextBool(15))
|
||||
{
|
||||
int num = 0;
|
||||
for (int i = 0; i < 1000; i++)
|
||||
for (int i = 0; i < Main.maxProjectiles; i++)
|
||||
{
|
||||
if (Main.projectile[i].active && Main.projectile[i].owner == player.whoAmI && Main.projectile[i].type == ModContent.ProjectileType<NebulaStar>())
|
||||
{
|
||||
@@ -88,7 +88,7 @@ namespace CalamityMod.Items.Accessories
|
||||
}
|
||||
if (flag)
|
||||
{
|
||||
for (int k = 0; k < 1000; k++)
|
||||
for (int k = 0; k < Main.maxProjectiles; k++)
|
||||
{
|
||||
if (Main.projectile[k].active && Main.projectile[k].owner == player.whoAmI && Main.projectile[k].type == ModContent.ProjectileType<NebulaStar>() && (center - Main.projectile[k].Center).Length() < 48f)
|
||||
{
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace CalamityMod.Items.Accessories
|
||||
int num = ModContent.BuffType<Plague>();
|
||||
float num2 = 300f;
|
||||
bool flag = plagueCounter % 60 == 0;
|
||||
int num3 = 60;
|
||||
int num3 = (int)(60 * player.AverageDamage());
|
||||
int random = Main.rand.Next(10);
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
|
||||
@@ -46,12 +46,12 @@ namespace CalamityMod.Items.Accessories
|
||||
num18 = (float)num17 / num18;
|
||||
num15 *= num18;
|
||||
num16 *= num18;
|
||||
// TODO -- Rotten Brain's projectiles are boosted by magic damage despite being an all class accessory
|
||||
int num19 = Projectile.NewProjectile(x, y, num15, num16, ModContent.ProjectileType<AuraRain>(), 18, 2f, player.whoAmI, 0f, 0f);
|
||||
int num19 = Projectile.NewProjectile(x, y, num15, num16, ModContent.ProjectileType<AuraRain>(), (int)(18 * player.AverageDamage()), 2f, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[num19].ai[1] = player.position.Y;
|
||||
Main.projectile[num19].tileCollide = false;
|
||||
Main.projectile[num19].usesLocalNPCImmunity = true;
|
||||
Main.projectile[num19].localNPCHitCooldown = 10;
|
||||
Main.projectile[num19].magic = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<PoisonousSeawater>(), 2000, 0f, player.whoAmI, 0f, 0f);
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<PoisonousSeawater>(), (int)(2000 * player.AverageDamage()), 0f, player.whoAmI, 0f, 0f);
|
||||
}
|
||||
}
|
||||
if (player.immune)
|
||||
@@ -114,10 +114,12 @@ namespace CalamityMod.Items.Accessories
|
||||
num15 *= num18;
|
||||
num16 *= num18;
|
||||
int type = Main.rand.NextBool(2) ? ModContent.ProjectileType<AuraRain>() : ModContent.ProjectileType<StandingFire>();
|
||||
int num19 = Projectile.NewProjectile(x, y, num15, num16, type, 2000, 1f, player.whoAmI, 0f, 0f);
|
||||
int num19 = Projectile.NewProjectile(x, y, num15, num16, type, (int)(2000 * player.AverageDamage()), 1f, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[num19].tileCollide = false;
|
||||
Main.projectile[num19].usesLocalNPCImmunity = true;
|
||||
Main.projectile[num19].localNPCHitCooldown = 10;
|
||||
Main.projectile[num19].usesIDStaticNPCImmunity = false;
|
||||
Main.projectile[num19].magic = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -127,7 +129,7 @@ namespace CalamityMod.Items.Accessories
|
||||
int num = BuffID.Venom;
|
||||
float num2 = 300f;
|
||||
bool flag = seaCounter % 60 == 0;
|
||||
int num3 = 320;
|
||||
int num3 = (int)(320 * player.AverageDamage());
|
||||
int random = Main.rand.Next(5);
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
@@ -181,9 +183,7 @@ namespace CalamityMod.Items.Accessories
|
||||
spawn.X = spawn.X + i * 30 - (FireProjectiles * 15);
|
||||
Vector2 velocity = baseVelocity.RotatedBy(MathHelper.ToRadians(-FireAngleSpread / 2 + (FireAngleSpread * i / (float)FireProjectiles)));
|
||||
velocity.X = velocity.X + 3 * Main.rand.NextFloat() - 1.5f;
|
||||
int projectile = Projectile.NewProjectile(spawn.X, spawn.Y, velocity.X, velocity.Y, ModContent.ProjectileType<BrimstoneHellfireballFriendly2>(), 2000, 5f, Main.myPlayer, 0f, 0f);
|
||||
Main.projectile[projectile].tileCollide = false;
|
||||
Main.projectile[projectile].timeLeft = 50;
|
||||
Projectile.NewProjectile(spawn.X, spawn.Y, velocity.X, velocity.Y, ModContent.ProjectileType<BrimstoneHellfireballFriendly2>(), (int)(2000 * player.AverageDamage()), 5f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,13 +32,13 @@ namespace CalamityMod.Items.Accessories
|
||||
int num = ModContent.BuffType<Plague>();
|
||||
float num2 = 300f;
|
||||
bool flag = plagueCounter % 60 == 0;
|
||||
int num3 = 30;
|
||||
int num3 = (int)(30 * player.AverageDamage());
|
||||
int random = Main.rand.Next(10);
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
if (random == 0)
|
||||
{
|
||||
for (int l = 0; l < 200; l++)
|
||||
for (int l = 0; l < Main.maxNPCs; l++)
|
||||
{
|
||||
NPC nPC = Main.npc[l];
|
||||
if (nPC.active && !nPC.friendly && nPC.damage > 0 && !nPC.dontTakeDamage && !nPC.buffImmune[num] && Vector2.Distance(player.Center, nPC.Center) <= num2)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
@@ -87,10 +86,11 @@ namespace CalamityMod.Items.Accessories
|
||||
num18 = (float)num17 / num18;
|
||||
num15 *= num18;
|
||||
num16 *= num18;
|
||||
int num19 = Projectile.NewProjectile(x, y, num15, num16, ModContent.ProjectileType<StandingFire>(), 40, 5f, player.whoAmI, 0f, 0f);
|
||||
int num19 = Projectile.NewProjectile(x, y, num15, num16, ModContent.ProjectileType<StandingFire>(), (int)(40 * player.AverageDamage()), 5f, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[num19].ai[1] = player.position.Y;
|
||||
Main.projectile[num19].usesLocalNPCImmunity = true;
|
||||
Main.projectile[num19].localNPCHitCooldown = 60;
|
||||
Main.projectile[num19].usesIDStaticNPCImmunity = false;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -120,10 +120,7 @@ namespace CalamityMod.Items.Accessories
|
||||
spawn.X = spawn.X + i * 30 - (FireProjectiles * 15);
|
||||
Vector2 velocity = baseVelocity.RotatedBy(MathHelper.ToRadians(-FireAngleSpread / 2 + (FireAngleSpread * i / (float)FireProjectiles)));
|
||||
velocity.X = velocity.X + 3 * Main.rand.NextFloat() - 1.5f;
|
||||
// TODO -- Void of Extinction's projectiles are boosted by magic damage despite being an all class accessory
|
||||
int projectile = Projectile.NewProjectile(spawn.X, spawn.Y, velocity.X, velocity.Y, ModContent.ProjectileType<BrimstoneHellfireballFriendly2>(), 70, 5f, Main.myPlayer, 0f, 0f);
|
||||
Main.projectile[projectile].tileCollide = false;
|
||||
Main.projectile[projectile].timeLeft = 50;
|
||||
Projectile.NewProjectile(spawn.X, spawn.Y, velocity.X, velocity.Y, ModContent.ProjectileType<BrimstoneHellfireballFriendly2>(), (int)(70 * player.AverageDamage()), 5f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace CalamityMod.Items.Accessories
|
||||
}
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<SandElementalMinion>()] < 1)
|
||||
{
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<SandElementalMinion>(), (int)(45f * (player.allDamage + player.minionDamage - 1f)), 2f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<SandElementalMinion>(), (int)(45f * player.MinionDamage()), 2f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
int projectile1 = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<DragonDust>(), 350, 5f, player.whoAmI, 0f, 0f);
|
||||
int projectile1 = Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<DragonDust>(), (int)(350 * player.AverageDamage()), 5f, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[projectile1].timeLeft = 60;
|
||||
}
|
||||
dragonTimer = 60;
|
||||
@@ -69,7 +69,7 @@ namespace CalamityMod.Items.Accessories
|
||||
num18 = (float)num17 / num18;
|
||||
num15 *= num18;
|
||||
num16 *= num18;
|
||||
int num19 = Projectile.NewProjectile(x, y, num15, num16, ModContent.ProjectileType<SkyFlareFriendly>(), 750, 9f, player.whoAmI, 0f, 0f);
|
||||
int num19 = Projectile.NewProjectile(x, y, num15, num16, ModContent.ProjectileType<SkyFlareFriendly>(), (int)(750 * player.AverageDamage()), 9f, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[num19].ai[1] = player.position.Y;
|
||||
Main.projectile[num19].hostile = false;
|
||||
Main.projectile[num19].friendly = true;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using CalamityMod.Buffs.Summon;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
@@ -57,11 +57,7 @@ namespace CalamityMod.Items.Armor
|
||||
}
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<DemonshadeRedDevil>()] < 1)
|
||||
{
|
||||
float modifier = player.meleeDamage + player.magicDamage + player.rangedDamage +
|
||||
modPlayer.throwingDamage + player.minionDamage + ((player.allDamage - 1f) * 5f);
|
||||
|
||||
modifier /= 5f;
|
||||
int damage = (int)(10000 * modifier);
|
||||
int damage = (int)(10000 * player.AverageDamage());
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<DemonshadeRedDevil>(), damage, 0f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Typeless
|
||||
return new Vector2(10, 10);
|
||||
}
|
||||
|
||||
// Lunic Eye scales off of all damage types simultaneously (meaning it scales 5x from universal damage boosts).
|
||||
// Aestheticus scales off of all damage types simultaneously (meaning it scales 5x from universal damage boosts).
|
||||
public override void ModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat)
|
||||
{
|
||||
float formula = 5f * (player.allDamage - 1f);
|
||||
|
||||
@@ -99,7 +99,6 @@ namespace CalamityMod.NPCs.Bumblebirb
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
//npc.visualOffset = new Vector2(20f, 50f);
|
||||
CalamityAI.BumblebirbAI(npc, mod);
|
||||
}
|
||||
|
||||
@@ -226,17 +225,17 @@ namespace CalamityMod.NPCs.Bumblebirb
|
||||
|
||||
if (phase3 && calamityGlobalNPC.newAI[3] == 1f)
|
||||
{
|
||||
color = buffColor(color, 0.9f, 0.6f, 0.2f, 1f);
|
||||
color = CalamityGlobalNPC.buffColor(color, 0.9f, 0.6f, 0.2f, 1f);
|
||||
}
|
||||
else if (phase2 && calamityGlobalNPC.newAI[2] == 1f)
|
||||
{
|
||||
color = buffColor(color, 0.7f, 0.7f, 0.3f, 1f);
|
||||
color = CalamityGlobalNPC.buffColor(color, 0.7f, 0.7f, 0.3f, 1f);
|
||||
}
|
||||
else if (phase2 && calamityGlobalNPC.newAI[0] > (float)num150)
|
||||
{
|
||||
float num152 = calamityGlobalNPC.newAI[0] - (float)num150;
|
||||
num152 /= (float)num151;
|
||||
color = buffColor(color, 1f - 0.3f * num152, 1f - 0.3f * num152, 1f - 0.7f * num152, 1f);
|
||||
color = CalamityGlobalNPC.buffColor(color, 1f - 0.3f * num152, 1f - 0.3f * num152, 1f - 0.7f * num152, 1f);
|
||||
}
|
||||
|
||||
int num153 = 10;
|
||||
|
||||
@@ -61,7 +61,6 @@ namespace CalamityMod.NPCs.Bumblebirb
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
//npc.visualOffset = new Vector2(10, 40);
|
||||
Player player = Main.player[npc.target];
|
||||
Vector2 vector = npc.Center;
|
||||
npc.damage = npc.defDamage;
|
||||
@@ -361,6 +360,12 @@ namespace CalamityMod.NPCs.Bumblebirb
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool CanHitPlayer(Player target, ref int cooldownSlot)
|
||||
{
|
||||
cooldownSlot = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
{
|
||||
for (int k = 0; k < 5; k++)
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace CalamityMod.NPCs
|
||||
int npcPosY = (int)(npc.position.Y + (float)(npc.height / 2)) / 16;
|
||||
|
||||
// Barf out enemies
|
||||
int variable = 5;
|
||||
int variable = 10;
|
||||
if (calamityGlobalNPC.newAI[3] % 60f == 0f && npcPosX > variable && npcPosY > variable && npcPosX < Main.maxTilesX - variable && npcPosY < Main.maxTilesY - variable)
|
||||
{
|
||||
Main.PlaySound(4, (int)npc.position.X, (int)npc.position.Y, 13);
|
||||
@@ -4139,7 +4139,7 @@ namespace CalamityMod.NPCs
|
||||
while (!WorldGen.SolidTile(num1313, num1314) && (double)num1314 < Main.worldSurface)
|
||||
num1314++;
|
||||
|
||||
if ((new Vector2((float)(num1313 * 16 + 8), (float)(num1314 * 16 + 8)) - player.Center).Length() < 1600f)
|
||||
if ((new Vector2((float)(num1313 * 16 + 8), (float)(num1314 * 16 + 8)) - player.Center).Length() < 1200f)
|
||||
{
|
||||
npc.ai[0] = 4.1f;
|
||||
npc.ai[1] = (float)num1313;
|
||||
@@ -4179,7 +4179,7 @@ namespace CalamityMod.NPCs
|
||||
num1319 = 20f;
|
||||
|
||||
float num1320 = 10f;
|
||||
if (vector207.Length() < 10f)
|
||||
if (vector207.Length() < 50f)
|
||||
npc.ai[0] = 4.2f;
|
||||
|
||||
vector207.Normalize();
|
||||
@@ -4206,7 +4206,7 @@ namespace CalamityMod.NPCs
|
||||
float num1323 = 4f; //4
|
||||
float num1324 = 2f; //2
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient && vector208.Length() < 4f)
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient && vector208.Length() < 20f)
|
||||
{
|
||||
int num1325 = 10;
|
||||
if (Main.expertMode)
|
||||
@@ -4228,7 +4228,7 @@ namespace CalamityMod.NPCs
|
||||
npc.ai[2] = 0f;
|
||||
npc.ai[3] = 0f;
|
||||
|
||||
if (NPC.CountNPCS(ModContent.NPCType<Bumblefuck2>()) < num1305 && Main.rand.Next(5) != 0)
|
||||
if (NPC.CountNPCS(ModContent.NPCType<Bumblefuck2>()) < num1305 && Main.rand.NextBool(2))
|
||||
npc.ai[0] = 4f;
|
||||
else if (Collision.SolidCollision(npc.position, npc.width, npc.height))
|
||||
npc.ai[0] = 1f;
|
||||
@@ -4260,7 +4260,7 @@ namespace CalamityMod.NPCs
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
Vector2 vector7 = npc.rotation.ToRotationVector2() * (Vector2.UnitX * (float)npc.direction) * (float)(npc.width + 20) / 2f + vector;
|
||||
Projectile.NewProjectile(vector7.X, vector7.Y, 0f, 0f, ModContent.ProjectileType<BirbAuraFlare>(), 0, 0f, Main.myPlayer, 0f, (float)(npc.target + 1));
|
||||
Projectile.NewProjectile(vector7.X, vector7.Y, 0f, 0f, ModContent.ProjectileType<BirbAuraFlare>(), 0, 0f, Main.myPlayer, phase3 ? 1f : 0f, (float)(npc.target + 1));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4530,7 +4530,7 @@ namespace CalamityMod.NPCs
|
||||
if (npc.ai[0] == -1f)
|
||||
{
|
||||
// Velocity
|
||||
if(npc.Calamity().newAI[3] == 0f)
|
||||
if (npc.Calamity().newAI[3] == 0f)
|
||||
npc.velocity *= 0.98f;
|
||||
|
||||
// Direction
|
||||
@@ -4725,7 +4725,7 @@ namespace CalamityMod.NPCs
|
||||
for (int j = 0; j < num24; j++)
|
||||
{
|
||||
Vector2 arg_E1C_0 = (Vector2.Normalize(npc.velocity) * new Vector2((float)(npc.width + 50) / 2f, (float)npc.height) * 0.75f).RotatedBy((double)(j - (num24 / 2 - 1)) * (double)pie / (double)(float)num24, default) + vector;
|
||||
Vector2 vector4 = ((float)(Main.rand.NextDouble() * (double)pie) - pie * 0.5f).ToRotationVector2() * (float)Main.rand.Next(3, 8);
|
||||
Vector2 vector4 = ((float)(Main.rand.NextDouble() * (double)pie) - MathHelper.PiOver2).ToRotationVector2() * (float)Main.rand.Next(3, 8);
|
||||
int num25 = Dust.NewDust(arg_E1C_0 + vector4, 0, 0, (int)CalamityDusts.SulfurousSeaAcid, vector4.X * 2f, vector4.Y * 2f, 100, default, 1.4f);
|
||||
Main.dust[num25].noGravity = true;
|
||||
Main.dust[num25].noLight = true;
|
||||
@@ -5037,7 +5037,7 @@ namespace CalamityMod.NPCs
|
||||
for (int k = 0; k < num29; k++)
|
||||
{
|
||||
Vector2 arg_1A97_0 = (Vector2.Normalize(npc.velocity) * new Vector2((float)(npc.width + 50) / 2f, (float)npc.height) * 0.75f).RotatedBy((double)(k - (num29 / 2 - 1)) * (double)pie / (double)(float)num29, default) + vector;
|
||||
Vector2 vector9 = ((float)(Main.rand.NextDouble() * (double)pie) - pie * 0.5f).ToRotationVector2() * (float)Main.rand.Next(3, 8);
|
||||
Vector2 vector9 = ((float)(Main.rand.NextDouble() * (double)pie) - MathHelper.PiOver2).ToRotationVector2() * (float)Main.rand.Next(3, 8);
|
||||
int num30 = Dust.NewDust(arg_1A97_0 + vector9, 0, 0, (int)CalamityDusts.SulfurousSeaAcid, vector9.X * 2f, vector9.Y * 2f, 100, default, 1.4f);
|
||||
Main.dust[num30].noGravity = true;
|
||||
Main.dust[num30].noLight = true;
|
||||
@@ -5188,7 +5188,6 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
|
||||
// Phase 3
|
||||
// Most of this will need to be rewritten
|
||||
else if (npc.ai[0] == 10f && !player.dead)
|
||||
{
|
||||
// Alpha
|
||||
@@ -5331,7 +5330,7 @@ namespace CalamityMod.NPCs
|
||||
for (int m = 0; m < num34; m++)
|
||||
{
|
||||
Vector2 arg_2444_0 = (Vector2.Normalize(npc.velocity) * new Vector2((float)(npc.width + 50) / 2f, (float)npc.height) * 0.75f).RotatedBy((double)(m - (num34 / 2 - 1)) * (double)pie / (double)(float)num34, default) + vector;
|
||||
Vector2 vector11 = ((float)(Main.rand.NextDouble() * (double)pie) - pie * 0.5f).ToRotationVector2() * (float)Main.rand.Next(3, 8);
|
||||
Vector2 vector11 = ((float)(Main.rand.NextDouble() * (double)pie) - MathHelper.PiOver2).ToRotationVector2() * (float)Main.rand.Next(3, 8);
|
||||
int num35 = Dust.NewDust(arg_2444_0 + vector11, 0, 0, (int)CalamityDusts.SulfurousSeaAcid, vector11.X * 2f, vector11.Y * 2f, 100, default, 1.4f);
|
||||
Main.dust[num35].noGravity = true;
|
||||
Main.dust[num35].noLight = true;
|
||||
|
||||
@@ -4421,6 +4421,15 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Color buffColor(Color newColor, float R, float G, float B, float A)
|
||||
{
|
||||
newColor.R = (byte)((float)newColor.R * R);
|
||||
newColor.G = (byte)((float)newColor.G * G);
|
||||
newColor.B = (byte)((float)newColor.B * B);
|
||||
newColor.A = (byte)((float)newColor.A * A);
|
||||
return newColor;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Get Chat
|
||||
|
||||
|
After Width: | Height: | Size: 294 B |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 28 KiB |
@@ -813,8 +813,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
player.KillMe(PlayerDeathReason.ByCustomReason(player.name + "'s essence was consumed by the devourer."), 1000.0, 0, false);
|
||||
}
|
||||
|
||||
// TODO: don't talk if the player has iframes
|
||||
if (player.immuneTime > 0 || player.immune)
|
||||
if (player.immune || player.hurtCooldowns[1] > 0)
|
||||
return;
|
||||
|
||||
int num = Main.rand.Next(5);
|
||||
|
||||
@@ -1201,8 +1201,7 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
player.KillMe(PlayerDeathReason.ByCustomReason(player.name + "'s essence was consumed by the devourer."), 1000.0, 0, false);
|
||||
}
|
||||
|
||||
// TODO: don't talk if the player has iframes
|
||||
if (player.immune || player.immuneTime > 0)
|
||||
if (player.immune || player.hurtCooldowns[1] > 0)
|
||||
return;
|
||||
|
||||
int num = Main.rand.Next(5);
|
||||
|
||||
@@ -180,7 +180,7 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
}
|
||||
Texture2D texture2D15 = Main.npcTexture[npc.type];
|
||||
Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2));
|
||||
Vector2 vector11 = new Vector2((float)(texture2D15.Width / 2), (float)(texture2D15.Height / Main.npcFrameCount[npc.type] / 2));
|
||||
Color color = lightColor;
|
||||
Color color36 = Color.White;
|
||||
float amount9 = 0f;
|
||||
@@ -190,17 +190,17 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
int num151 = 60;
|
||||
if (flag9)
|
||||
{
|
||||
color = buffColor(color, 0.4f, 0.8f, 0.4f, 1f);
|
||||
color = CalamityGlobalNPC.buffColor(color, 0.4f, 0.8f, 0.4f, 1f);
|
||||
}
|
||||
else if (flag8)
|
||||
{
|
||||
color = buffColor(color, 0.5f, 0.7f, 0.5f, 1f);
|
||||
color = CalamityGlobalNPC.buffColor(color, 0.5f, 0.7f, 0.5f, 1f);
|
||||
}
|
||||
else if (npc.ai[0] == 4f && npc.ai[2] > (float)num150)
|
||||
{
|
||||
float num152 = npc.ai[2] - (float)num150;
|
||||
num152 /= (float)num151;
|
||||
color = buffColor(color, 1f - 0.5f * num152, 1f - 0.3f * num152, 1f - 0.5f * num152, 1f);
|
||||
color = CalamityGlobalNPC.buffColor(color, 1f - 0.5f * num152, 1f - 0.3f * num152, 1f - 0.5f * num152, 1f);
|
||||
}
|
||||
|
||||
int num153 = 10;
|
||||
@@ -355,15 +355,6 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
return false;
|
||||
}
|
||||
|
||||
private static Color buffColor(Color newColor, float R, float G, float B, float A)
|
||||
{
|
||||
newColor.R = (byte)((float)newColor.R * R);
|
||||
newColor.G = (byte)((float)newColor.G * G);
|
||||
newColor.B = (byte)((float)newColor.B * B);
|
||||
newColor.A = (byte)((float)newColor.A * A);
|
||||
return newColor;
|
||||
}
|
||||
|
||||
public override void BossLoot(ref string name, ref int potionType)
|
||||
{
|
||||
potionType = ItemID.SuperHealingPotion;
|
||||
@@ -400,7 +391,13 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
CalamityMod.UpdateServerBoolean();
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
public override bool CanHitPlayer(Player target, ref int cooldownSlot)
|
||||
{
|
||||
cooldownSlot = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(BuffID.Venom, 300, true);
|
||||
player.AddBuff(BuffID.Rabies, 300, true);
|
||||
|
||||
@@ -186,6 +186,12 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool CanHitPlayer(Player target, ref int cooldownSlot)
|
||||
{
|
||||
cooldownSlot = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(BuffID.Venom, 180, true);
|
||||
|
||||
@@ -158,7 +158,13 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override bool CanHitPlayer(Player target, ref int cooldownSlot)
|
||||
{
|
||||
cooldownSlot = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
player.AddBuff(BuffID.Venom, 180, true);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -237,7 +238,39 @@ namespace CalamityMod.NPCs.Yharon
|
||||
return new Color(255, Main.DiscoG, 53, 0);
|
||||
}
|
||||
|
||||
public override bool CanHitPlayer(Player target, ref int cooldownSlot)
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
{
|
||||
SpriteEffects spriteEffects = SpriteEffects.None;
|
||||
if (npc.spriteDirection == 1)
|
||||
spriteEffects = SpriteEffects.FlipHorizontally;
|
||||
|
||||
Texture2D texture2D15 = Main.npcTexture[npc.type];
|
||||
Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2));
|
||||
Color color36 = new Color(255, Main.DiscoG, 53, 0);
|
||||
float amount9 = 0.5f;
|
||||
int num153 = 10;
|
||||
|
||||
for (int num155 = 1; num155 < num153; num155 += 2)
|
||||
{
|
||||
Color color38 = lightColor;
|
||||
color38 = Color.Lerp(color38, color36, amount9);
|
||||
color38 = npc.GetAlpha(color38);
|
||||
color38 *= (float)(num153 - num155) / 15f;
|
||||
Vector2 vector41 = npc.oldPos[num155] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition;
|
||||
vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f;
|
||||
vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY);
|
||||
spriteBatch.Draw(texture2D15, vector41, new Rectangle?(npc.frame), color38, npc.rotation, vector11, npc.scale, spriteEffects, 0f);
|
||||
}
|
||||
|
||||
Vector2 vector43 = npc.Center - Main.screenPosition;
|
||||
vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f;
|
||||
vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY);
|
||||
spriteBatch.Draw(texture2D15, vector43, new Rectangle?(npc.frame), npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool CanHitPlayer(Player target, ref int cooldownSlot)
|
||||
{
|
||||
cooldownSlot = 1;
|
||||
return true;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -15,7 +16,8 @@ namespace CalamityMod.NPCs.Yharon
|
||||
{
|
||||
DisplayName.SetDefault("Detonating Flame");
|
||||
Main.npcFrameCount[npc.type] = 5;
|
||||
}
|
||||
NPCID.Sets.TrailingMode[npc.type] = 1;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
@@ -73,7 +75,35 @@ namespace CalamityMod.NPCs.Yharon
|
||||
return new Color(255, Main.DiscoG, 53, 0);
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
{
|
||||
Texture2D texture2D15 = Main.npcTexture[npc.type];
|
||||
Vector2 vector11 = new Vector2((float)(Main.npcTexture[npc.type].Width / 2), (float)(Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2));
|
||||
Color color36 = new Color(255, Main.DiscoG, 53, 0);
|
||||
float amount9 = 0.5f;
|
||||
int num153 = 10;
|
||||
|
||||
for (int num155 = 1; num155 < num153; num155 += 2)
|
||||
{
|
||||
Color color38 = lightColor;
|
||||
color38 = Color.Lerp(color38, color36, amount9);
|
||||
color38 = npc.GetAlpha(color38);
|
||||
color38 *= (float)(num153 - num155) / 15f;
|
||||
Vector2 vector41 = npc.oldPos[num155] + new Vector2((float)npc.width, (float)npc.height) / 2f - Main.screenPosition;
|
||||
vector41 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f;
|
||||
vector41 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY);
|
||||
spriteBatch.Draw(texture2D15, vector41, new Rectangle?(npc.frame), color38, npc.rotation, vector11, npc.scale, SpriteEffects.None, 0f);
|
||||
}
|
||||
|
||||
Vector2 vector43 = npc.Center - Main.screenPosition;
|
||||
vector43 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[npc.type])) * npc.scale / 2f;
|
||||
vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY);
|
||||
spriteBatch.Draw(texture2D15, vector43, new Rectangle?(npc.frame), npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, SpriteEffects.None, 0f);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player player, int damage, bool crit)
|
||||
{
|
||||
if (CalamityWorld.revenge)
|
||||
{
|
||||
|
||||
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 43 KiB |
@@ -14,6 +14,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public class BirbAura : ModProjectile
|
||||
{
|
||||
float timer = 0f;
|
||||
float timeBeforeVanish = 0f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -36,6 +37,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
writer.Write(projectile.localAI[0]);
|
||||
writer.Write(projectile.localAI[1]);
|
||||
writer.Write(timer);
|
||||
writer.Write(timeBeforeVanish);
|
||||
}
|
||||
|
||||
public override void ReceiveExtraAI(BinaryReader reader)
|
||||
@@ -43,6 +45,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
projectile.localAI[0] = reader.ReadSingle();
|
||||
projectile.localAI[1] = reader.ReadSingle();
|
||||
timer = reader.ReadSingle();
|
||||
timeBeforeVanish = reader.ReadSingle();
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
@@ -62,15 +65,17 @@ namespace CalamityMod.Projectiles.Boss
|
||||
timer -= 1f;
|
||||
|
||||
float num801 = 1f;
|
||||
if (timeBeforeVanish == 0f)
|
||||
timeBeforeVanish = projectile.timeLeft <= 900 ? 900f : 1200f;
|
||||
|
||||
projectile.localAI[0] += 1f;
|
||||
if (projectile.localAI[0] >= 1200f)
|
||||
if (projectile.localAI[0] >= timeBeforeVanish)
|
||||
{
|
||||
projectile.Kill();
|
||||
return;
|
||||
}
|
||||
|
||||
projectile.scale = (float)Math.Sin((double)(projectile.localAI[0] * Math.PI / 1200f)) * 10f * num801;
|
||||
projectile.scale = (float)Math.Sin((double)(projectile.localAI[0] * Math.PI / timeBeforeVanish)) * 10f * num801;
|
||||
if (projectile.scale > num801)
|
||||
projectile.scale = num801;
|
||||
|
||||
@@ -85,7 +90,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (vector78.HasValue)
|
||||
samplingPoint = vector78.Value;
|
||||
|
||||
float laserLength = MathHelper.Clamp(projectile.ai[1] - 160f, 1600f, 3600f);
|
||||
float laserLength = projectile.ai[1] - 160f;
|
||||
float[] array3 = new float[(int)num805];
|
||||
Collision.LaserScan(samplingPoint, projectile.velocity, num806 * projectile.scale, laserLength, array3);
|
||||
float num807 = 0f;
|
||||
@@ -95,6 +100,8 @@ namespace CalamityMod.Projectiles.Boss
|
||||
}
|
||||
num807 /= num805;
|
||||
|
||||
num807 = MathHelper.Clamp(num807, 1800f, 3600f);
|
||||
|
||||
float amount = 0.5f;
|
||||
projectile.localAI[1] = MathHelper.Lerp(projectile.localAI[1], num807, amount);
|
||||
|
||||
@@ -104,7 +111,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
|
||||
{
|
||||
if (timer <= 0f && projectile.localAI[0] >= 120f)
|
||||
if (timer <= 0f && (projectile.localAI[0] >= 120f || projectile.timeLeft <= 900))
|
||||
{
|
||||
if (projectile.owner == Main.myPlayer)
|
||||
{
|
||||
@@ -114,10 +121,9 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Vector2 ai0 = target.Center - fireFrom;
|
||||
float ai = (float)Main.rand.Next(100);
|
||||
Vector2 velocity = Vector2.Normalize(ai0.RotatedByRandom(MathHelper.PiOver4)) * 7f;
|
||||
Projectile.NewProjectile(fireFrom.X, fireFrom.Y, velocity.X, velocity.Y, ModContent.ProjectileType<RedLightning>(), projectile.damage, 0f, projectile.owner, ai0.ToRotation(), ai);
|
||||
Projectile.NewProjectile(fireFrom.X, fireFrom.Y, velocity.X, velocity.Y, ModContent.ProjectileType<RedLightning>(), damage, 0f, projectile.owner, ai0.ToRotation(), ai);
|
||||
}
|
||||
}
|
||||
damage = 0;
|
||||
}
|
||||
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
@@ -177,7 +183,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
return true;
|
||||
}
|
||||
float num6 = 0f;
|
||||
if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center, projectile.Center + projectile.velocity * projectile.localAI[1], 22f * projectile.scale, ref num6))
|
||||
if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center, projectile.Center + projectile.velocity * projectile.localAI[1], 80f * projectile.scale, ref num6))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -29,12 +29,14 @@ namespace CalamityMod.Projectiles.Boss
|
||||
public override void SendExtraAI(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(projectile.localAI[0]);
|
||||
}
|
||||
writer.Write(projectile.localAI[1]);
|
||||
}
|
||||
|
||||
public override void ReceiveExtraAI(BinaryReader reader)
|
||||
{
|
||||
projectile.localAI[0] = reader.ReadSingle();
|
||||
}
|
||||
projectile.localAI[1] = reader.ReadSingle();
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
@@ -47,11 +49,11 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (projectile.localAI[0] > 10f)
|
||||
{
|
||||
// Dust pulse effect
|
||||
projectile.ai[0] = (float)Math.Abs(Math.Cos((double)MathHelper.ToRadians(projectile.localAI[0] * 2f)));
|
||||
projectile.localAI[1] = (float)Math.Abs(Math.Cos((double)MathHelper.ToRadians(projectile.localAI[0] * 2f)));
|
||||
int num626 = 18;
|
||||
for (int num627 = 0; num627 < num626; num627++)
|
||||
{
|
||||
Vector2 vector45 = Vector2.Normalize(projectile.velocity) * new Vector2((float)projectile.width / 2f, (float)projectile.height) * projectile.ai[0];
|
||||
Vector2 vector45 = Vector2.Normalize(projectile.velocity) * new Vector2((float)projectile.width / 2f, (float)projectile.height) * projectile.localAI[1];
|
||||
vector45 = vector45.RotatedBy((double)(num627 - (num626 / 2 - 1)) * 3.1415926535897931 / (double)(float)num626, default) + projectile.Center;
|
||||
Vector2 value15 = ((float)(Main.rand.NextDouble() * Math.PI) - MathHelper.PiOver2).ToRotationVector2() * (float)Main.rand.Next(3, 8);
|
||||
int num628 = Dust.NewDust(vector45 + value15, 0, 0, 60, value15.X * 2f, value15.Y * 2f, 100, default, 1f);
|
||||
@@ -65,7 +67,8 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
Vector2 value16 = Main.player[num625].Center - projectile.Center;
|
||||
float num629 = 4f;
|
||||
num629 += projectile.localAI[0] / 60f;
|
||||
float divisor = projectile.ai[0] == 1f ? 45f : 60f;
|
||||
num629 += projectile.localAI[0] / divisor;
|
||||
projectile.velocity = Vector2.Normalize(value16) * num629;
|
||||
if (value16.Length() < 32f)
|
||||
{
|
||||
@@ -111,23 +114,40 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
num231 = Main.maxTilesY - num233 - 10;
|
||||
}
|
||||
int spawnAreaY = Main.maxTilesY - num231;
|
||||
for (int num234 = num231; num234 < num231 + spawnAreaY; num234++)
|
||||
{
|
||||
Tile tile = Main.tile[num232, num234];
|
||||
if (tile.active() && !TileID.Sets.Platforms[tile.type] && (Main.tileSolid[(int)tile.type] || tile.liquid != 0))
|
||||
{
|
||||
num231 = num234;
|
||||
break;
|
||||
}
|
||||
}
|
||||
float x = (float)(num232 * 16);
|
||||
float y = (float)(num231 * 16 - 48);
|
||||
float y = (float)(num231 * 16 + 900);
|
||||
Vector2 laserVelocity = new Vector2(x, 160f) - new Vector2(x, y);
|
||||
laserVelocity.Normalize();
|
||||
int damage = Main.expertMode ? 75 : 100;
|
||||
int num236 = Projectile.NewProjectile(x, y, 0f, laserVelocity.Y, ModContent.ProjectileType<BirbAura>(), damage, 0f, Main.myPlayer, x, y);
|
||||
Main.projectile[num236].netUpdate = true;
|
||||
if (projectile.ai[0] == 1f)
|
||||
{
|
||||
x += 500f;
|
||||
if ((int)(x / 16f) > Main.maxTilesX - 10)
|
||||
{
|
||||
x = (float)(Main.maxTilesX - 10) * 16f;
|
||||
}
|
||||
laserVelocity = new Vector2(x, 160f) - new Vector2(x, y);
|
||||
laserVelocity.Normalize();
|
||||
int num237 = Projectile.NewProjectile(x, y, 0f, laserVelocity.Y, ModContent.ProjectileType<BirbAura>(), damage, 0f, Main.myPlayer, x, y);
|
||||
Main.projectile[num237].timeLeft = 900;
|
||||
Main.projectile[num237].netUpdate = true;
|
||||
|
||||
x -= 1000f;
|
||||
if ((int)(x / 16f) < 10)
|
||||
{
|
||||
x = 160f;
|
||||
}
|
||||
laserVelocity = new Vector2(x, 160f) - new Vector2(x, y);
|
||||
laserVelocity.Normalize();
|
||||
int num238 = Projectile.NewProjectile(x, y, 0f, laserVelocity.Y, ModContent.ProjectileType<BirbAura>(), damage, 0f, Main.myPlayer, x, y);
|
||||
Main.projectile[num238].timeLeft = 900;
|
||||
Main.projectile[num238].netUpdate = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
laserVelocity.Normalize();
|
||||
int num236 = Projectile.NewProjectile(x, y, 0f, laserVelocity.Y, ModContent.ProjectileType<BirbAura>(), damage, 0f, Main.myPlayer, x, y);
|
||||
Main.projectile[num236].netUpdate = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
projectile.penetrate = 1;
|
||||
projectile.timeLeft = 300;
|
||||
projectile.alpha = 255;
|
||||
cooldownSlot = 1;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
@@ -93,7 +94,12 @@ namespace CalamityMod.Projectiles.Boss
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 180);
|
||||
}
|
||||
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
|
||||
{
|
||||
target.Calamity().lastProjectileHit = projectile;
|
||||
}
|
||||
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
{
|
||||
CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1);
|
||||
return false;
|
||||
|
||||
@@ -30,7 +30,8 @@ namespace CalamityMod.Projectiles.Boss
|
||||
projectile.tileCollide = false;
|
||||
projectile.ignoreWater = true;
|
||||
projectile.timeLeft = 1800;
|
||||
}
|
||||
cooldownSlot = 1;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
@@ -94,6 +95,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
}
|
||||
|
||||
float distanceRequired = 800f * projectile.scale;
|
||||
float succPower = 0.4f;
|
||||
for (int i = 0; i < Main.maxPlayers; i++)
|
||||
{
|
||||
Player player = Main.player[i];
|
||||
@@ -106,35 +108,18 @@ namespace CalamityMod.Projectiles.Boss
|
||||
|
||||
float wingTimeSet = (float)Math.Ceiling((float)player.wingTimeMax * 0.5f * distanceRatio);
|
||||
if (player.wingTime > wingTimeSet)
|
||||
{
|
||||
player.wingTime = wingTimeSet;
|
||||
}
|
||||
|
||||
float succPower = 0.4f;
|
||||
float multiplier = 1f - distanceRatio;
|
||||
if (player.Center.X < projectile.Center.X)
|
||||
{
|
||||
player.velocity.X += succPower * multiplier;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.velocity.X -= succPower * multiplier;
|
||||
}
|
||||
|
||||
int num = (int)player.Center.X / 16;
|
||||
int num2 = (int)(player.position.Y + (float)player.height - 1f) / 16;
|
||||
Tile tile = Framing.GetTileSafely(num, num2 + 1);
|
||||
if (!WorldGen.SolidTile2(tile) || !player.controlJump)
|
||||
{
|
||||
if (player.Center.Y < projectile.Center.Y)
|
||||
{
|
||||
player.velocity.Y += succPower * multiplier;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.velocity.Y -= succPower * multiplier;
|
||||
}
|
||||
}
|
||||
if (player.Center.Y < projectile.Center.Y)
|
||||
player.velocity.Y += succPower * multiplier;
|
||||
else
|
||||
player.velocity.Y -= succPower * multiplier;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -178,5 +163,10 @@ namespace CalamityMod.Projectiles.Boss
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 600);
|
||||
}
|
||||
}
|
||||
|
||||
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
|
||||
{
|
||||
target.Calamity().lastProjectileHit = projectile;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33,7 +33,8 @@ namespace CalamityMod.Projectiles.Boss
|
||||
projectile.tileCollide = false;
|
||||
projectile.extraUpdates = 20;
|
||||
projectile.timeLeft = 1260;
|
||||
}
|
||||
cooldownSlot = 1;
|
||||
}
|
||||
|
||||
public override void SendExtraAI(BinaryWriter writer)
|
||||
{
|
||||
@@ -171,6 +172,11 @@ namespace CalamityMod.Projectiles.Boss
|
||||
}
|
||||
}
|
||||
|
||||
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
|
||||
{
|
||||
target.Calamity().lastProjectileHit = projectile;
|
||||
}
|
||||
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
{
|
||||
Vector2 end = projectile.position + new Vector2((float)projectile.width, (float)projectile.height) / 2f + Vector2.UnitY * projectile.gfxOffY - Main.screenPosition;
|
||||
|
||||
@@ -3,6 +3,7 @@ using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
|
||||
namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
@@ -46,9 +47,16 @@ namespace CalamityMod.Projectiles.Magic
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player target, int damage, bool crit)
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(BuffID.Venom, 120);
|
||||
target.AddBuff(BuffID.Venom, 60);
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 60);
|
||||
}
|
||||
|
||||
public override void OnHitPvp(Player target, int damage, bool crit)
|
||||
{
|
||||
target.AddBuff(BuffID.Venom, 60);
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 60);
|
||||
}
|
||||
|
||||
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
projectile.tileCollide = false;
|
||||
projectile.penetrate = -1;
|
||||
projectile.timeLeft = 180;
|
||||
projectile.magic = true;
|
||||
projectile.magic = true;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 10;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
|
||||
namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
@@ -20,7 +21,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 94;
|
||||
projectile.width = 22;
|
||||
projectile.height = 22;
|
||||
projectile.friendly = true;
|
||||
projectile.magic = true;
|
||||
@@ -67,10 +68,21 @@ namespace CalamityMod.Projectiles.Magic
|
||||
CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, new Color(255, 255, 255, 127), ProjectileID.Sets.TrailingMode[projectile.type], 1);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
projectile.ai[0]++;
|
||||
target.AddBuff(BuffID.Venom, 180);
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 180);
|
||||
}
|
||||
|
||||
public override void OnHitPvp(Player target, int damage, bool crit)
|
||||
{
|
||||
projectile.ai[0]++;
|
||||
target.AddBuff(BuffID.Venom, 180);
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 180);
|
||||
}
|
||||
|
||||
public override void Kill(int timeLeft)
|
||||
{
|
||||
for (int dust = 0; dust <= 22; dust++)
|
||||
|
||||
@@ -48,5 +48,10 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<Eutrophication>(), 15);
|
||||
}
|
||||
|
||||
public override void OnHitPvp(Player target, int damage, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<Eutrophication>(), 15);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -51,7 +51,8 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
|
||||
private void CreateInk()
|
||||
{
|
||||
Main.PlaySound(2, (int)Main.player[projectile.owner].position.X, (int)Main.player[projectile.owner].position.Y, 14);
|
||||
Player player = Main.player[projectile.owner];
|
||||
Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 14);
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
int projType = Main.rand.Next(0, 3);
|
||||
@@ -68,7 +69,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
inkType = ModContent.ProjectileType<InkCloud3>();
|
||||
break;
|
||||
}
|
||||
int inkID = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, Main.rand.NextFloat(-2f, 2f), Main.rand.NextFloat(-2f, 2f), inkType, 22, 7, projectile.owner);
|
||||
int inkID = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, Main.rand.NextFloat(-2f, 2f), Main.rand.NextFloat(-2f, 2f), inkType, (int)(22 * player.RogueDamage()), 7, projectile.owner);
|
||||
Main.projectile[inkID].timeLeft += Main.rand.Next(-20, 25);
|
||||
}
|
||||
projectile.Kill();
|
||||
|
||||
@@ -6,7 +6,6 @@ using CalamityMod.Buffs.DamageOverTime;
|
||||
|
||||
namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
//TODO -- Make the dust from the explosion not look like ass, reduce timeleft if neccesary
|
||||
public class PartisanExplosion : ModProjectile
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
|
||||
@@ -3,7 +3,7 @@ using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Projectiles.Magic
|
||||
namespace CalamityMod.Projectiles.Typeless
|
||||
{
|
||||
public class BrimstoneHellfireballFriendly2 : ModProjectile
|
||||
{
|
||||
@@ -18,9 +18,9 @@ namespace CalamityMod.Projectiles.Magic
|
||||
projectile.height = 12;
|
||||
projectile.friendly = true;
|
||||
projectile.ignoreWater = true;
|
||||
projectile.timeLeft = 600;
|
||||
projectile.tileCollide = false;
|
||||
projectile.timeLeft = 50;
|
||||
projectile.penetrate = -1;
|
||||
projectile.magic = true;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 10;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 139 B After Width: | Height: | Size: 139 B |
@@ -7,7 +7,7 @@ using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Summon
|
||||
namespace CalamityMod.Projectiles.Typeless
|
||||
{
|
||||
public class DemonshadeRedDevil : ModProjectile
|
||||
{
|
||||
@@ -27,7 +27,6 @@ namespace CalamityMod.Projectiles.Summon
|
||||
projectile.height = 48;
|
||||
projectile.netImportant = true;
|
||||
projectile.friendly = true;
|
||||
projectile.minion = true;
|
||||
projectile.ignoreWater = true;
|
||||
projectile.timeLeft = 18000;
|
||||
projectile.penetrate = -1;
|
||||
@@ -57,6 +56,11 @@ namespace CalamityMod.Projectiles.Summon
|
||||
}
|
||||
}
|
||||
dust--;
|
||||
if (dust == 2)
|
||||
{
|
||||
projectile.Calamity().spawnedPlayerMinionDamageValue = player.AverageDamage();
|
||||
projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage;
|
||||
}
|
||||
if (dust >= 0)
|
||||
{
|
||||
int num501 = 50;
|
||||
@@ -67,6 +71,13 @@ namespace CalamityMod.Projectiles.Summon
|
||||
Main.dust[num503].scale *= 1.15f;
|
||||
}
|
||||
}
|
||||
if (player.AverageDamage() != projectile.Calamity().spawnedPlayerMinionDamageValue)
|
||||
{
|
||||
int damage2 = (int)((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue /
|
||||
projectile.Calamity().spawnedPlayerMinionDamageValue *
|
||||
player.AverageDamage());
|
||||
projectile.damage = damage2;
|
||||
}
|
||||
projectile.frameCounter++;
|
||||
if (projectile.frameCounter > 8)
|
||||
{
|
||||
@@ -231,8 +242,8 @@ namespace CalamityMod.Projectiles.Summon
|
||||
}
|
||||
if (num651 > 2000f)
|
||||
{
|
||||
projectile.position.X = Main.player[projectile.owner].Center.X - (float)(projectile.width / 2);
|
||||
projectile.position.Y = Main.player[projectile.owner].Center.Y - (float)(projectile.height / 2);
|
||||
projectile.position.X = player.Center.X - (float)(projectile.width / 2);
|
||||
projectile.position.Y = player.Center.Y - (float)(projectile.height / 2);
|
||||
projectile.netUpdate = true;
|
||||
}
|
||||
if (num651 > 70f)
|
||||
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
@@ -1,10 +1,11 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Summon
|
||||
namespace CalamityMod.Projectiles.Typeless
|
||||
{
|
||||
public class GladiatorSword : ModProjectile
|
||||
{
|
||||
@@ -21,14 +22,17 @@ namespace CalamityMod.Projectiles.Summon
|
||||
projectile.width = 22;
|
||||
projectile.height = 22;
|
||||
projectile.ignoreWater = true;
|
||||
projectile.minionSlots = 0f;
|
||||
projectile.timeLeft = 18000;
|
||||
projectile.tileCollide = false;
|
||||
projectile.friendly = true;
|
||||
projectile.timeLeft *= 5;
|
||||
projectile.penetrate = -1;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 10;
|
||||
projectile.localNPCHitCooldown = 10 -
|
||||
(Main.hardMode ? 2 : 0) -
|
||||
(NPC.downedPlantBoss ? 2 : 0) -
|
||||
(NPC.downedMoonlord ? 2 : 0) -
|
||||
(CalamityWorld.downedDoG ? 2 : 0);
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
@@ -38,15 +42,15 @@ namespace CalamityMod.Projectiles.Summon
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (projectile.localAI[0] == 0f)
|
||||
{
|
||||
projectile.Calamity().spawnedPlayerMinionDamageValue = player.MinionDamage();
|
||||
projectile.Calamity().spawnedPlayerMinionDamageValue = player.AverageDamage();
|
||||
projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage;
|
||||
projectile.localAI[0] += 1f;
|
||||
}
|
||||
if (player.MinionDamage() != projectile.Calamity().spawnedPlayerMinionDamageValue)
|
||||
if (player.AverageDamage() != projectile.Calamity().spawnedPlayerMinionDamageValue)
|
||||
{
|
||||
int damage2 = (int)((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue /
|
||||
projectile.Calamity().spawnedPlayerMinionDamageValue *
|
||||
player.MinionDamage());
|
||||
player.AverageDamage());
|
||||
projectile.damage = damage2;
|
||||
}
|
||||
if (!modPlayer.gladiatorSword)
|
||||
@@ -69,7 +73,8 @@ namespace CalamityMod.Projectiles.Summon
|
||||
Vector2 vector = player.Center - projectile.Center;
|
||||
projectile.rotation = vector.ToRotation() - 1.57f;
|
||||
projectile.Center = player.Center + new Vector2(80, 0).RotatedBy(rotation);
|
||||
rotation += 0.03;
|
||||
double rotateAmt = CalamityWorld.downedDoG ? 0.1 : NPC.downedMoonlord ? 0.08 : NPC.downedPlantBoss ? 0.05 : Main.hardMode ? 0.04 : 0.03;
|
||||
rotation += rotateAmt;
|
||||
if (rotation >= 360)
|
||||
{
|
||||
rotation = 0;
|
||||
|
Before Width: | Height: | Size: 643 B After Width: | Height: | Size: 643 B |
@@ -1,10 +1,11 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Summon
|
||||
namespace CalamityMod.Projectiles.Typeless
|
||||
{
|
||||
public class GladiatorSword2 : ModProjectile
|
||||
{
|
||||
@@ -21,14 +22,17 @@ namespace CalamityMod.Projectiles.Summon
|
||||
projectile.width = 22;
|
||||
projectile.height = 22;
|
||||
projectile.ignoreWater = true;
|
||||
projectile.minionSlots = 0f;
|
||||
projectile.timeLeft = 18000;
|
||||
projectile.tileCollide = false;
|
||||
projectile.friendly = true;
|
||||
projectile.timeLeft *= 5;
|
||||
projectile.penetrate = -1;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 10;
|
||||
projectile.localNPCHitCooldown = 10 -
|
||||
(Main.hardMode ? 2 : 0) -
|
||||
(NPC.downedPlantBoss ? 2 : 0) -
|
||||
(NPC.downedMoonlord ? 2 : 0) -
|
||||
(CalamityWorld.downedDoG ? 2 : 0);
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
@@ -38,15 +42,15 @@ namespace CalamityMod.Projectiles.Summon
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (projectile.localAI[0] == 0f)
|
||||
{
|
||||
projectile.Calamity().spawnedPlayerMinionDamageValue = player.MinionDamage();
|
||||
projectile.Calamity().spawnedPlayerMinionDamageValue = player.AverageDamage();
|
||||
projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage;
|
||||
projectile.localAI[0] += 1f;
|
||||
}
|
||||
if (player.MinionDamage() != projectile.Calamity().spawnedPlayerMinionDamageValue)
|
||||
if (player.AverageDamage() != projectile.Calamity().spawnedPlayerMinionDamageValue)
|
||||
{
|
||||
int damage2 = (int)((float)projectile.Calamity().spawnedPlayerMinionProjectileDamageValue /
|
||||
projectile.Calamity().spawnedPlayerMinionDamageValue *
|
||||
player.MinionDamage());
|
||||
player.AverageDamage());
|
||||
projectile.damage = damage2;
|
||||
}
|
||||
if (!modPlayer.gladiatorSword)
|
||||
@@ -69,7 +73,9 @@ namespace CalamityMod.Projectiles.Summon
|
||||
Vector2 vector = player.Center - projectile.Center;
|
||||
projectile.rotation = vector.ToRotation() - 1.57f;
|
||||
projectile.Center = player.Center + new Vector2(80, 0).RotatedBy(rotation);
|
||||
rotation -= 0.03;
|
||||
double rotateAmt = CalamityWorld.downedDoG ? 0.09 : NPC.downedMoonlord ? 0.07 : NPC.downedPlantBoss ? 0.04 : Main.hardMode ? 0.03 : 0.02;
|
||||
//values are slightly different from the other sword to make this sword marginally slower so the intersection point isn't always at the same spot
|
||||
rotation -= rotateAmt;
|
||||
if (rotation <= 0)
|
||||
{
|
||||
rotation = 360;
|
||||
|
Before Width: | Height: | Size: 643 B After Width: | Height: | Size: 643 B |
@@ -4,7 +4,7 @@ using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Projectiles.Magic
|
||||
namespace CalamityMod.Projectiles.Typeless
|
||||
{
|
||||
public class HellfireExplosionFriendly2 : ModProjectile
|
||||
{
|
||||
@@ -22,7 +22,6 @@ namespace CalamityMod.Projectiles.Magic
|
||||
projectile.tileCollide = false;
|
||||
projectile.penetrate = -1;
|
||||
projectile.timeLeft = 300;
|
||||
projectile.magic = true;
|
||||
projectile.usesLocalNPCImmunity = true;
|
||||
projectile.localNPCHitCooldown = 10;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 354 B After Width: | Height: | Size: 354 B |
@@ -1,7 +1,8 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Projectiles.Magic
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
namespace CalamityMod.Projectiles.Typeless
|
||||
{
|
||||
public class PendantProjectile1 : ModProjectile
|
||||
{
|
||||
@@ -13,17 +14,17 @@ namespace CalamityMod.Projectiles.Magic
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 10;
|
||||
projectile.height = 16;
|
||||
projectile.height = 10;
|
||||
projectile.friendly = true;
|
||||
projectile.ignoreWater = true;
|
||||
projectile.timeLeft = 600;
|
||||
projectile.timeLeft = 220;
|
||||
projectile.penetrate = 1;
|
||||
projectile.magic = true;
|
||||
projectile.tileCollide = false;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0f / 255f, (255 - projectile.alpha) * 0.35f / 255f, (255 - projectile.alpha) * 0.35f / 255f);
|
||||
Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0f / 255f, (255 - projectile.alpha) * 0.2f / 255f, (255 - projectile.alpha) * 0.2f / 255f);
|
||||
projectile.rotation += projectile.velocity.X * 1.25f;
|
||||
for (int num457 = 0; num457 < 5; num457++)
|
||||
{
|
||||
@@ -33,5 +34,15 @@ namespace CalamityMod.Projectiles.Magic
|
||||
Main.dust[num458].velocity += projectile.velocity * 0.1f;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<Eutrophication>(), 15);
|
||||
}
|
||||
|
||||
public override void OnHitPvp(Player target, int damage, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<Eutrophication>(), 15);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 246 B After Width: | Height: | Size: 246 B |
@@ -1,7 +1,8 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Projectiles.Magic
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
namespace CalamityMod.Projectiles.Typeless
|
||||
{
|
||||
public class PendantProjectile2 : ModProjectile
|
||||
{
|
||||
@@ -13,17 +14,17 @@ namespace CalamityMod.Projectiles.Magic
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 10;
|
||||
projectile.height = 16;
|
||||
projectile.height = 10;
|
||||
projectile.friendly = true;
|
||||
projectile.ignoreWater = true;
|
||||
projectile.timeLeft = 600;
|
||||
projectile.timeLeft = 220;
|
||||
projectile.penetrate = 1;
|
||||
projectile.magic = true;
|
||||
projectile.tileCollide = false;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0f / 255f, (255 - projectile.alpha) * 0.35f / 255f, (255 - projectile.alpha) * 0.35f / 255f);
|
||||
Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0f / 255f, (255 - projectile.alpha) * 0.2f / 255f, (255 - projectile.alpha) * 0.2f / 255f);
|
||||
projectile.rotation += projectile.velocity.X * 1.25f;
|
||||
for (int num457 = 0; num457 < 5; num457++)
|
||||
{
|
||||
@@ -33,5 +34,15 @@ namespace CalamityMod.Projectiles.Magic
|
||||
Main.dust[num458].velocity += projectile.velocity * 0.1f;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<Eutrophication>(), 15);
|
||||
}
|
||||
|
||||
public override void OnHitPvp(Player target, int damage, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<Eutrophication>(), 15);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 256 B After Width: | Height: | Size: 256 B |
@@ -1,7 +1,8 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Projectiles.Magic
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
namespace CalamityMod.Projectiles.Typeless
|
||||
{
|
||||
public class PendantProjectile3 : ModProjectile
|
||||
{
|
||||
@@ -13,17 +14,19 @@ namespace CalamityMod.Projectiles.Magic
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 14;
|
||||
projectile.height = 26;
|
||||
projectile.height = 14;
|
||||
projectile.friendly = true;
|
||||
projectile.ignoreWater = true;
|
||||
projectile.timeLeft = 600;
|
||||
projectile.timeLeft = 220;
|
||||
projectile.penetrate = 1;
|
||||
projectile.magic = true;
|
||||
projectile.tileCollide = false;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0f / 255f, (255 - projectile.alpha) * 0.35f / 255f, (255 - projectile.alpha) * 0.35f / 255f);
|
||||
CalamityGlobalProjectile.HomeInOnNPC(projectile, false, 400f, 10f, 20f);
|
||||
|
||||
Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0f / 255f, (255 - projectile.alpha) * 0.2f / 255f, (255 - projectile.alpha) * 0.2f / 255f);
|
||||
projectile.rotation += projectile.velocity.X * 1.25f;
|
||||
for (int num457 = 0; num457 < 5; num457++)
|
||||
{
|
||||
@@ -33,5 +36,15 @@ namespace CalamityMod.Projectiles.Magic
|
||||
Main.dust[num458].velocity += projectile.velocity * 0.1f;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<Eutrophication>(), 30);
|
||||
}
|
||||
|
||||
public override void OnHitPvp(Player target, int damage, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<Eutrophication>(), 30);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 325 B After Width: | Height: | Size: 325 B |
@@ -63,6 +63,7 @@ namespace CalamityMod
|
||||
public static float MinionDamage(this Player player) => player.allDamage + player.minionDamage - 1f;
|
||||
public static float ThrownDamage(this Player player) => player.allDamage + player.thrownDamage - 1f;
|
||||
public static float RogueDamage(this Player player) => player.allDamage + player.thrownDamage + player.Calamity().throwingDamage - 2f;
|
||||
public static float AverageDamage(this Player player) => player.allDamage + (player.meleeDamage + player.rangedDamage + player.magicDamage + player.minionDamage + player.Calamity().throwingDamage - 5f) / 5f;
|
||||
|
||||
public static bool IsUnderwater(this Player player) => Collision.DrownCollision(player.position, player.width, player.height, player.gravDir);
|
||||
public static bool InSpace(this Player player)
|
||||
|
||||