pvp memes featuring typeless

This commit is contained in:
termigator1359 committed 2020-01-21 18:55:16 -05:00
1 parent c8471bdb21
commit cbf981d47b
51 files changed
+506 -36

No files matched your search

+5
View File
@@ -21,5 +21,10 @@ namespace CalamityMod.Buffs.DamageOverTime
npc.DelBuff(buffIndex);
buffIndex--;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().vaporfied = true;
}
}
}
+40
View File
@@ -544,6 +544,7 @@ namespace CalamityMod.CalPlayer
public bool eutrophication = false;
public bool iCantBreathe = false; //Frozen Lungs debuff
public bool cragsLava = false;
public bool vaporfied = false;
// Buff
public bool trinketOfChiBuff = false;
@@ -1303,6 +1304,7 @@ namespace CalamityMod.CalPlayer
eutrophication = false;
iCantBreathe = false;
cragsLava = false;
vaporfied = false;
revivify = false;
trinketOfChiBuff = false;
@@ -1541,6 +1543,7 @@ namespace CalamityMod.CalPlayer
eutrophication = false;
iCantBreathe = false;
cragsLava = false;
vaporfied = false;
#endregion
#region Rogue
@@ -3244,6 +3247,10 @@ namespace CalamityMod.CalPlayer
{
damageSource = PlayerDeathReason.ByCustomReason(player.name + " was incinerated by lunar rays.");
}
if (vaporfied && damage == 10.0 && hitDirection == 0 && damageSource.SourceOtherIndex == 8)
{
damageSource = PlayerDeathReason.ByCustomReason(player.name + " vaporized into thin air.");
}
if (manaOverloader && damage == 10.0 && hitDirection == 0 && damageSource.SourceOtherIndex == 8)
{
damageSource = PlayerDeathReason.ByCustomReason(player.name + "'s life was completely converted into mana.");
@@ -8275,6 +8282,39 @@ namespace CalamityMod.CalPlayer
fullBright = true;
}
}
if (vaporfied)
{
int dustType = Utils.SelectRandom(Main.rand, new int[]
{
246,
242,
229,
226,
247,
187,
234
});
if (Main.rand.NextBool(4) && drawInfo.shadow == 0f)
{
int dust = Dust.NewDust(drawInfo.position - new Vector2(2f, 2f), player.width + 4, player.height + 4, dustType, player.velocity.X * 0.4f, player.velocity.Y * 0.4f, 100, default, 3f);
Main.dust[dust].noGravity = true;
Main.dust[dust].velocity *= 1.8f;
Main.dust[dust].velocity.Y -= 0.5f;
if (Main.rand.NextBool(4))
{
Main.dust[dust].noGravity = false;
Main.dust[dust].scale *= 0.5f;
}
Main.playerDrawDust.Add(dust);
}
if (noRogueStealth)
{
r *= 0.25f;
g *= 0.25f;
b *= 0.1f;
fullBright = true;
}
}
if (eFreeze || silvaStun || gState || cDepth || eutrophication)
{
if (noRogueStealth)
+9
View File
@@ -104,6 +104,15 @@ namespace CalamityMod.CalPlayer
player.lifeRegen -= 16;
}
if (modPlayer.vaporfied)
{
if (player.lifeRegen > 0)
player.lifeRegen = 0;
player.lifeRegenTime = 0;
player.lifeRegen -= 8;
}
if (modPlayer.cragsLava)
{
if (player.lifeRegen > 0)
+6
View File
@@ -2280,6 +2280,12 @@ namespace CalamityMod.CalPlayer
player.velocity.X = 0f;
}
if (modPlayer.vaporfied)
{
player.velocity.Y *= 0.98f;
player.velocity.X *= 0.98f;
}
if (modPlayer.eGravity)
{
if (player.wingTimeMax < 0)
+5
View File
@@ -94,6 +94,11 @@ namespace CalamityMod.Projectiles.Typeless
target.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 120);
}
public override Color? GetAlpha(Color lightColor)
{
return new Color(200, 100, 250, projectile.alpha);
+5
View File
@@ -68,5 +68,10 @@ namespace CalamityMod.Projectiles.Typeless
{
target.AddBuff(BuffID.OnFire, 180);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(BuffID.OnFire, 180);
}
}
}
@@ -69,5 +69,10 @@ namespace CalamityMod.Projectiles.Typeless
{
target.AddBuff(BuffID.Venom, 240);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(BuffID.Venom, 240);
}
}
}
@@ -69,5 +69,10 @@ namespace CalamityMod.Projectiles.Typeless
{
target.AddBuff(BuffID.Venom, 240);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(BuffID.Venom, 240);
}
}
}
@@ -69,5 +69,10 @@ namespace CalamityMod.Projectiles.Typeless
{
target.AddBuff(BuffID.Venom, 240);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(BuffID.Venom, 240);
}
}
}
+5
View File
@@ -108,5 +108,10 @@ namespace CalamityMod.Projectiles.Typeless
{
target.AddBuff(ModContent.BuffType<HolyFlames>(), 180);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(ModContent.BuffType<HolyFlames>(), 180);
}
}
}
+5
View File
@@ -94,5 +94,10 @@ namespace CalamityMod.Projectiles.Typeless
{
target.AddBuff(BuffID.OnFire, 300);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(BuffID.OnFire, 300);
}
}
}
+6
View File
@@ -79,5 +79,11 @@ namespace CalamityMod.Projectiles.Typeless
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 180);
target.AddBuff(BuffID.OnFire, 180);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(BuffID.OnFire, 180);
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 180);
}
}
}
+5
View File
@@ -73,5 +73,10 @@ namespace CalamityMod.Projectiles.Typeless
{
target.AddBuff(BuffID.OnFire, 180);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(BuffID.OnFire, 180);
}
}
}
+5
View File
@@ -99,5 +99,10 @@ namespace CalamityMod.Projectiles.Typeless
{
target.AddBuff(BuffID.OnFire, 180);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(BuffID.OnFire, 180);
}
}
}
@@ -123,5 +123,18 @@ namespace CalamityMod.Projectiles.Typeless
int owner = projectile.owner;
Projectile.NewProjectile(target.position.X, target.position.Y, 0f, 0f, ProjectileID.VampireHeal, 0, 0f, projectile.owner, (float)owner, heal);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
float heal = (float)damage * 0.05f;
if ((int)heal == 0)
return;
if (Main.player[Main.myPlayer].lifeSteal <= 0f)
return;
Main.player[Main.myPlayer].lifeSteal -= heal * 1.5f;
int owner = projectile.owner;
Projectile.NewProjectile(target.position.X, target.position.Y, 0f, 0f, ProjectileID.VampireHeal, 0, 0f, projectile.owner, (float)owner, heal);
}
}
}
+13
View File
@@ -94,5 +94,18 @@ namespace CalamityMod.Projectiles.Typeless
int owner = projectile.owner;
Projectile.NewProjectile(target.position.X, target.position.Y, 0f, 0f, ProjectileID.VampireHeal, 0, 0f, projectile.owner, (float)owner, heal);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
float heal = (float)damage * 0.05f;
if ((int)heal == 0)
return;
if (Main.player[Main.myPlayer].lifeSteal <= 0f)
return;
Main.player[Main.myPlayer].lifeSteal -= heal * 1.5f;
int owner = projectile.owner;
Projectile.NewProjectile(target.position.X, target.position.Y, 0f, 0f, ProjectileID.VampireHeal, 0, 0f, projectile.owner, (float)owner, heal);
}
}
}
+5
View File
@@ -194,6 +194,11 @@ namespace CalamityMod.Projectiles.Typeless
target.AddBuff(ModContent.BuffType<Vaporfied>(), 300);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(ModContent.BuffType<Vaporfied>(), 300);
}
public override void Kill(int timeLeft)
{
Vector2 velocity = projectile.velocity;
+5
View File
@@ -190,6 +190,11 @@ namespace CalamityMod.Projectiles.Typeless
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
target.AddBuff(ModContent.BuffType<Vaporfied>(), 120);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(ModContent.BuffType<Vaporfied>(), 120);
}
+6
View File
@@ -51,6 +51,12 @@ namespace CalamityMod.Projectiles.Typeless
target.AddBuff(ModContent.BuffType<GlacialState>(), 480);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(BuffID.Frostburn, 480);
target.AddBuff(ModContent.BuffType<GlacialState>(), 480);
}
public override Color? GetAlpha(Color lightColor)
{
return new Color(198, 197, 246);
+5
View File
@@ -87,5 +87,10 @@ namespace CalamityMod.Projectiles.Typeless
target.immune[projectile.owner] = 0;
target.AddBuff(ModContent.BuffType<HolyFlames>(), 120);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(ModContent.BuffType<HolyFlames>(), 120);
}
}
}
+5
View File
@@ -41,5 +41,10 @@ namespace CalamityMod.Projectiles.Typeless
{
target.AddBuff(ModContent.BuffType<HolyFlames>(), 60);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(ModContent.BuffType<HolyFlames>(), 60);
}
}
}
+6
View File
@@ -120,6 +120,12 @@ namespace CalamityMod.Projectiles.Typeless
projectile.direction = Main.player[projectile.owner].direction;
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(BuffID.OnFire, 300);
projectile.direction = Main.player[projectile.owner].direction;
}
public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection)
{
damage = (int)((double)damage * 0.3);
@@ -193,5 +193,63 @@ namespace CalamityMod.Projectiles.Typeless
}
}
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
// Some dust gets produced on impact.
int dustSets = Main.rand.Next(5, 8);
int dustRadius = 6;
Vector2 corner = new Vector2(target.Center.X - (float)dustRadius, target.Center.Y - (float)dustRadius);
for (int i = 0; i < dustSets; ++i)
{
// Bigger, flying orb dust
float scaleOrb = 1.2f + Main.rand.NextFloat(1f);
int orb = Dust.NewDust(corner, 2 * dustRadius, 2 * dustRadius, 112);
Main.dust[orb].noGravity = true;
Main.dust[orb].velocity *= 4f;
Main.dust[orb].scale = scaleOrb;
// Add six sparkles per flying orb
for (int j = 0; j < 6; ++j)
{
float scaleSparkle = 0.8f + Main.rand.NextFloat(1.1f);
int sparkle = Dust.NewDust(corner, 2 * dustRadius, 2 * dustRadius, 173);
Main.dust[sparkle].noGravity = true;
float dustSpeed = Main.rand.NextFloat(10f, 18f);
Main.dust[sparkle].velocity = Main.rand.NextVector2Unit() * dustSpeed;
Main.dust[sparkle].scale = scaleSparkle;
}
}
// Makes an explosion sound.
Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 14);
// Applies God Slayer Inferno on contact.
target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 480);
// Three death lasers (aka "Nebula Shots") swarm the target.
int laserID = ModContent.ProjectileType<NebulaShot>();
int laserDamage = (int)(0.2f * projectile.damage);
float laserKB = 2.5f;
int numLasers = 3;
for (int i = 0; i < numLasers; ++i)
{
float startDist = Main.rand.NextFloat(260f, 270f);
Vector2 startDir = Main.rand.NextVector2Unit();
Vector2 startPoint = target.Center + (startDir * startDist);
float laserSpeed = Main.rand.NextFloat(15f, 18f);
Vector2 velocity = startDir * (-laserSpeed);
// NebulaShot projectile adjusts its own damage type based on ai[0]
if (projectile.owner == Main.myPlayer)
{
float damageType = projectile.melee ? 1f : 2f;
int proj = Projectile.NewProjectile(startPoint, velocity, laserID, laserDamage, laserKB, projectile.owner, damageType, 0f);
Main.projectile[proj].tileCollide = false;
Main.projectile[proj].timeLeft = 30;
}
}
}
}
}
+5
View File
@@ -139,6 +139,11 @@ namespace CalamityMod.Projectiles.Typeless
target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 180);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 180);
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2);
+8
View File
@@ -80,5 +80,13 @@ namespace CalamityMod.Projectiles.Typeless
else
target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 300);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
if (projectile.ai[1] == 1f)
target.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 300);
else
target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 300);
}
}
}
+5
View File
@@ -67,5 +67,10 @@ namespace CalamityMod.Projectiles.Typeless
{
target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 180);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 180);
}
}
}
+5
View File
@@ -129,6 +129,11 @@ namespace CalamityMod.Projectiles.Typeless
target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 300);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 300);
}
public override void Kill(int timeLeft)
{
projectile.position = projectile.Center;
+10 -14
View File
@@ -42,33 +42,25 @@ namespace CalamityMod.Projectiles.Typeless
float num589 = projectile.velocity.Y / 6f * (float)num587;
int num590 = 6;
int num591 = Dust.NewDust(new Vector2(projectile.position.X + (float)num590, projectile.position.Y + (float)num590), projectile.width - num590 * 2, projectile.height - num590 * 2, 170, 0f, 0f, 75, default, 1.2f);
Dust dust;
Dust dust = Main.dust[num591];
if (Main.rand.NextBool(2))
{
dust = Main.dust[num591];
dust.alpha += 25;
}
if (Main.rand.NextBool(2))
{
dust = Main.dust[num591];
dust.alpha += 25;
}
if (Main.rand.NextBool(2))
{
dust = Main.dust[num591];
dust.alpha += 25;
}
Main.dust[num591].noGravity = true;
dust = Main.dust[num591];
dust.noGravity = true;
dust.velocity *= 0.3f;
dust = Main.dust[num591];
dust.velocity += projectile.velocity * 0.5f;
Main.dust[num591].position = projectile.Center;
Dust var_2_18F52_cp_0_cp_0 = Main.dust[num591];
var_2_18F52_cp_0_cp_0.position.X -= num588;
Dust var_2_18F74_cp_0_cp_0 = Main.dust[num591];
var_2_18F74_cp_0_cp_0.position.Y -= num589;
dust = Main.dust[num591];
dust.position = projectile.Center;
dust.position.X -= num588;
dust.position.Y -= num589;
dust.velocity *= 0.2f;
num3 = num587;
}
@@ -78,7 +70,6 @@ namespace CalamityMod.Projectiles.Typeless
int num593 = Dust.NewDust(new Vector2(projectile.position.X + (float)num592, projectile.position.Y + (float)num592), projectile.width - num592 * 2, projectile.height - num592 * 2, 170, 0f, 0f, 75, default, 0.65f);
Dust dust = Main.dust[num593];
dust.velocity *= 0.5f;
dust = Main.dust[num593];
dust.velocity += projectile.velocity * 0.5f;
}
num3 = num586;
@@ -127,5 +118,10 @@ namespace CalamityMod.Projectiles.Typeless
{
target.AddBuff(BuffID.Ichor, 600);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(BuffID.Ichor, 600);
}
}
}
+5
View File
@@ -93,5 +93,10 @@ namespace CalamityMod.Projectiles.Typeless
{
target.AddBuff(ModContent.BuffType<HolyFlames>(), 300);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(ModContent.BuffType<HolyFlames>(), 300);
}
}
}
+5
View File
@@ -76,5 +76,10 @@ namespace CalamityMod.Projectiles.Typeless
{
target.AddBuff(ModContent.BuffType<HolyFlames>(), 300);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(ModContent.BuffType<HolyFlames>(), 300);
}
}
}
@@ -164,6 +164,30 @@ namespace CalamityMod.Projectiles.Typeless
Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 30);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(BuffID.Frostburn, 240);
if (projectile.owner == Main.myPlayer && Main.player[projectile.owner].ownedProjectileCounts[ModContent.ProjectileType<KelvinCatalystStar>()] < 25)
{
float spread = 45f * 0.0174f;
double startAngle = Math.Atan2(projectile.velocity.X, projectile.velocity.Y) - spread / 2;
double deltaAngle = spread / 8f;
double offsetAngle;
int i;
for (i = 0; i < 4; i++)
{
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(Math.Sin(offsetAngle) * 4f), (float)(Math.Cos(offsetAngle) * 4f),
ModContent.ProjectileType<KelvinCatalystStar>(), projectile.damage / 6, projectile.knockBack * 0.5f, projectile.owner, 0f, 0f);
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 4f), (float)(-Math.Cos(offsetAngle) * 4f),
ModContent.ProjectileType<KelvinCatalystStar>(), projectile.damage / 6, projectile.knockBack * 0.5f, projectile.owner, 0f, 0f);
}
}
Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 30);
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 2);
@@ -123,5 +123,10 @@ namespace CalamityMod.Projectiles.Typeless
{
target.AddBuff(BuffID.Frostburn, 60);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(BuffID.Frostburn, 60);
}
}
}
+13 -12
View File
@@ -210,6 +210,11 @@ namespace CalamityMod.Projectiles.Typeless
target.AddBuff(ModContent.BuffType<MarkedforDeath>(), 300);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(ModContent.BuffType<MarkedforDeath>(), 300);
}
public override void Kill(int timeLeft)
{
int num47 = Utils.SelectRandom(Main.rand, new int[]
@@ -249,31 +254,27 @@ namespace CalamityMod.Projectiles.Typeless
247
});
int num54 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, num47, 0f, 0f, 200, default, num50);
Main.dust[num54].position = projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)projectile.width / 2f;
Main.dust[num54].noGravity = true;
Dust dust = Main.dust[num54];
dust.position = projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)projectile.width / 2f;
dust.noGravity = true;
dust.velocity *= 3f;
dust = Main.dust[num54];
dust.velocity += value4 * Main.rand.NextFloat();
num54 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, num48, 0f, 0f, 100, default, num51);
Main.dust[num54].position = projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)projectile.width / 2f;
dust = Main.dust[num54];
dust.position = projectile.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)projectile.width / 2f;
dust.velocity *= 2f;
Main.dust[num54].noGravity = true;
Main.dust[num54].fadeIn = 1f;
Main.dust[num54].color = Color.Crimson * 0.5f;
dust = Main.dust[num54];
dust.noGravity = true;
dust.fadeIn = 1f;
dust.color = Color.Crimson * 0.5f;
dust.velocity += value4 * Main.rand.NextFloat();
num3 = num53;
}
for (int num55 = 0; num55 < 20; num55 = num3 + 1)
{
int num56 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, num49, 0f, 0f, 0, default, num52);
Main.dust[num56].position = projectile.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)projectile.velocity.ToRotation(), default) * (float)projectile.width / 3f;
Main.dust[num56].noGravity = true;
Dust dust = Main.dust[num56];
dust.position = projectile.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)projectile.velocity.ToRotation(), default) * (float)projectile.width / 3f;
dust.noGravity = true;
dust.velocity *= 0.5f;
dust = Main.dust[num56];
dust.velocity += value4 * (0.6f + 0.6f * Main.rand.NextFloat());
num3 = num55;
}
+5
View File
@@ -107,5 +107,10 @@ namespace CalamityMod.Projectiles.Typeless
{
target.AddBuff(ModContent.BuffType<MarkedforDeath>(), 300);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(ModContent.BuffType<MarkedforDeath>(), 300);
}
}
}
+33 -8
View File
@@ -186,20 +186,45 @@ namespace CalamityMod.Projectiles.Typeless
crit = true;
}
public override void ModifyHitPvp(Player target, ref int damage, ref bool crit)
{
if (Main.player[projectile.owner].Calamity().omegaBlueHentai)
crit = true;
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
if (projectile.owner == Main.myPlayer && Main.player[Main.myPlayer].lifeSteal > 0f && target.type != NPCID.TargetDummy)
if (projectile.owner == Main.myPlayer && Main.player[projectile.owner].lifeSteal > 0f && target.type != NPCID.TargetDummy)
{
int healAmount = 10 * damage / projectile.damage; //should always be around max, less if enemy has defense/DR
if (healAmount > 0)
{
Main.player[Main.myPlayer].lifeSteal -= healAmount;
if (Main.player[Main.myPlayer].Calamity().omegaBlueHentai) //hentai always crits, this makes it have same lifesteal delay
Main.player[Main.myPlayer].lifeSteal += healAmount / 2;
/*Main.player[Main.myPlayer].statLife += healAmount;
if (Main.player[Main.myPlayer].statLife > Main.player[Main.myPlayer].statLifeMax2)
Main.player[Main.myPlayer].statLife = Main.player[Main.myPlayer].statLifeMax2;
Main.player[Main.myPlayer].HealEffect(healAmount, false);*/
Main.player[projectile.owner].lifeSteal -= healAmount;
if (Main.player[projectile.owner].Calamity().omegaBlueHentai) //hentai always crits, this makes it have same lifesteal delay
Main.player[projectile.owner].lifeSteal += healAmount / 2;
/*Main.player[projectile.owner].statLife += healAmount;
if (Main.player[projectile.owner].statLife > Main.player[projectile.owner].statLifeMax2)
Main.player[projectile.owner].statLife = Main.player[projectile.owner].statLifeMax2;
Main.player[projectile.owner].HealEffect(healAmount, false);*/
Projectile.NewProjectile(projectile.Center, Vector2.Zero, ProjectileID.SpiritHeal, 0, 0f, projectile.owner, projectile.owner, healAmount);
}
}
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
if (projectile.owner == Main.myPlayer && Main.player[projectile.owner].lifeSteal > 0f)
{
int healAmount = 10 * damage / projectile.damage; //should always be around max, less if enemy has defense/DR
if (healAmount > 0)
{
Main.player[projectile.owner].lifeSteal -= healAmount;
if (Main.player[projectile.owner].Calamity().omegaBlueHentai) //hentai always crits, this makes it have same lifesteal delay
Main.player[projectile.owner].lifeSteal += healAmount / 2;
/*Main.player[projectile.owner].statLife += healAmount;
if (Main.player[projectile.owner].statLife > Main.player[projectile.owner].statLifeMax2)
Main.player[projectile.owner].statLife = Main.player[projectile.owner].statLifeMax2;
Main.player[projectile.owner].HealEffect(healAmount, false);*/
Projectile.NewProjectile(projectile.Center, Vector2.Zero, ProjectileID.SpiritHeal, 0, 0f, projectile.owner, projectile.owner, healAmount);
}
}
@@ -59,5 +59,11 @@ namespace CalamityMod.Projectiles.Typeless
target.AddBuff(BuffID.Venom, 120);
target.AddBuff(BuffID.Poisoned, 120);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(BuffID.Venom, 120);
target.AddBuff(BuffID.Poisoned, 120);
}
}
}
+5
View File
@@ -89,5 +89,10 @@ namespace CalamityMod.Projectiles.Typeless
{
target.AddBuff(BuffID.CursedInferno, 60);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(BuffID.CursedInferno, 60);
}
}
}
+5
View File
@@ -21,5 +21,10 @@ namespace CalamityMod.Projectiles.Typeless
{
target.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 300);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 300);
}
}
}
+7 -1
View File
@@ -1,4 +1,5 @@
using Terraria;
using CalamityMod.Buffs.DamageOverTime;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Microsoft.Xna.Framework;
@@ -50,5 +51,10 @@ namespace CalamityMod.Projectiles.Typeless
{
target.AddBuff(BuffID.ShadowFlame, 180);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(ModContent.BuffType<Shadowflame>(), 180);
}
}
}
@@ -1,4 +1,5 @@
using Terraria;
using CalamityMod.Buffs.DamageOverTime;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Microsoft.Xna.Framework;
@@ -52,5 +53,10 @@ namespace CalamityMod.Projectiles.Typeless
{
target.AddBuff(BuffID.ShadowFlame, 180);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(ModContent.BuffType<Shadowflame>(), 180);
}
}
}
+5
View File
@@ -97,5 +97,10 @@ namespace CalamityMod.Projectiles.Typeless
target.immune[projectile.owner] = 7;
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120);
}
}
}
@@ -189,5 +189,71 @@ namespace CalamityMod.Projectiles.Typeless
}
}
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
// Some dust gets produced on impact.
int dustCount = Main.rand.Next(20, 24);
int dustRadius = 6;
Vector2 corner = new Vector2(target.Center.X - (float)dustRadius, target.Center.Y - (float)dustRadius);
for (int i = 0; i < dustCount; ++i)
{
int dustType = 229;
float scale = 0.8f + Main.rand.NextFloat(1.1f);
int idx = Dust.NewDust(corner, 2 * dustRadius, 2 * dustRadius, dustType);
Main.dust[idx].noGravity = true;
Main.dust[idx].velocity *= 3f;
Main.dust[idx].scale = scale;
}
// Applies Nightwither on contact at night.
if (!Main.dayTime)
target.AddBuff(ModContent.BuffType<Nightwither>(), 480);
// Play the Lunar Flare sound centered on the user, not the target (consistent with Lunar Flare and Stellar Striker)
Player user = Main.player[projectile.owner];
Main.PlaySound(2, (int)user.position.X, (int)user.position.Y, 88);
projectile.netUpdate = true;
int numFlares = 2;
int flareDamage = (int)(0.3f * projectile.damage);
float flareKB = 4f;
for (int i = 0; i < numFlares; ++i)
{
float flareSpeed = Main.rand.NextFloat(8f, 11f);
// Flares never come from straight up, there is always at least an 80 pixel horizontal offset
float xDist = Main.rand.NextFloat(80f, 320f) * (Main.rand.NextBool() ? -1f : 1f);
float yDist = Main.rand.NextFloat(1200f, 1440f);
Vector2 startPoint = target.Center + new Vector2(xDist, -yDist);
// The flare is somewhat inaccurate based on the size of the target.
float xVariance = target.width / 4f;
if (xVariance < 8f)
xVariance = 8f;
float yVariance = target.height / 4f;
if (yVariance < 8f)
yVariance = 8f;
float xOffset = Main.rand.NextFloat(-xVariance, xVariance);
float yOffset = Main.rand.NextFloat(-yVariance, yVariance);
Vector2 offsetTarget = target.Center + new Vector2(xOffset, yOffset);
// Finalize the velocity vector and make sure it's going at the right speed.
Vector2 velocity = offsetTarget - startPoint;
velocity.Normalize();
velocity *= flareSpeed;
float AI1 = (float)Main.rand.Next(3);
if (projectile.owner == Main.myPlayer)
{
int proj = Projectile.NewProjectile(startPoint, velocity, ProjectileID.LunarFlare, flareDamage, flareKB, Main.myPlayer, 0f, AI1);
CalamityGlobalProjectile cgp = Main.projectile[proj].Calamity();
if (projectile.melee)
cgp.forceMelee = true;
else
cgp.forceRogue = true;
}
}
}
}
}
@@ -114,6 +114,16 @@ namespace CalamityMod.Projectiles.Typeless
projectile.Kill();
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
if (projectile.localAI[1] < 1f)
{
return;
}
target.AddBuff(BuffID.Venom, fromArmour ? 150 : 120);
projectile.Kill();
}
public override void Kill(int timeLeft)
{
Main.PlaySound(SoundID.Item54, projectile.position);
+5
View File
@@ -77,6 +77,11 @@ namespace CalamityMod.Projectiles.Typeless
target.AddBuff(ModContent.BuffType<TeslaBuff>(), 120);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(BuffID.Electrified, 300);
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
Texture2D sprite = Main.projectileTexture[projectile.type];
@@ -178,6 +178,11 @@ namespace CalamityMod.Projectiles.Typeless
target.AddBuff(BuffID.CursedInferno, 90);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(BuffID.CursedInferno, 90);
}
public override void Kill(int timeLeft)
{
projectile.position = projectile.Center;
@@ -92,5 +92,10 @@ namespace CalamityMod.Projectiles.Typeless
{
target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 300);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 300);
}
}
}
+6
View File
@@ -89,5 +89,11 @@ namespace CalamityMod.Projectiles.Typeless
target.AddBuff(BuffID.CursedInferno, 120);
target.AddBuff(BuffID.OnFire, 120);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(BuffID.CursedInferno, 120);
target.AddBuff(BuffID.OnFire, 120);
}
}
}
+6
View File
@@ -76,5 +76,11 @@ namespace CalamityMod.Projectiles.Typeless
target.AddBuff(BuffID.OnFire, 120);
target.AddBuff(BuffID.CursedInferno, 120);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(BuffID.CursedInferno, 120);
target.AddBuff(BuffID.OnFire, 120);
}
}
}
+6
View File
@@ -93,5 +93,11 @@ namespace CalamityMod.Projectiles.Typeless
target.AddBuff(BuffID.OnFire, 120);
target.AddBuff(BuffID.CursedInferno, 120);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(BuffID.CursedInferno, 120);
target.AddBuff(BuffID.OnFire, 120);
}
}
}
+6
View File
@@ -68,5 +68,11 @@ namespace CalamityMod.Projectiles.Typeless
target.AddBuff(BuffID.OnFire, 120);
target.AddBuff(BuffID.CursedInferno, 120);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(BuffID.CursedInferno, 120);
target.AddBuff(BuffID.OnFire, 120);
}
}
}
+6
View File
@@ -85,5 +85,11 @@ namespace CalamityMod.Projectiles.Typeless
target.AddBuff(BuffID.OnFire, 120);
target.AddBuff(BuffID.CursedInferno, 120);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(BuffID.CursedInferno, 120);
target.AddBuff(BuffID.OnFire, 120);
}
}
}