lastProjectileHit is now checked globally and fixed rubico prime bug

This commit is contained in:
termigator1359 committed 2020-07-14 11:48:24 -04:00
1 parent 718e028538
commit e586734cb2
54 files changed
+21 -275

No files matched your search

-5
View File
@@ -70,10 +70,5 @@ namespace CalamityMod.Projectiles.Boss
CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1);
return false;
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -125,10 +125,5 @@ namespace CalamityMod.Projectiles.Boss
Main.dust[redFire].noGravity = true;
}
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -136,10 +136,5 @@ namespace CalamityMod.Projectiles.Boss
Main.dust[redFire].noGravity = true;
}
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -86,10 +86,5 @@ namespace CalamityMod.Projectiles.Boss
Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f);
}
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -79,10 +79,5 @@ namespace CalamityMod.Projectiles.Boss
target.AddBuff(ModContent.BuffType<AbyssalFlames>(), 180);
target.AddBuff(ModContent.BuffType<VulnerabilityHex>(), 120, true);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -190,10 +190,5 @@ namespace CalamityMod.Projectiles.Boss
target.AddBuff(ModContent.BuffType<AbyssalFlames>(), 900);
target.AddBuff(ModContent.BuffType<VulnerabilityHex>(), 300, true);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -194,10 +194,5 @@ namespace CalamityMod.Projectiles.Boss
{
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 300);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -175,10 +175,5 @@ namespace CalamityMod.Projectiles.Boss
{
target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 300);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -88,10 +88,5 @@ namespace CalamityMod.Projectiles.Boss
target.AddBuff(ModContent.BuffType<AbyssalFlames>(), 180);
target.AddBuff(ModContent.BuffType<VulnerabilityHex>(), 120, true);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -92,10 +92,5 @@ namespace CalamityMod.Projectiles.Boss
Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 90, 0f, 0f);
}
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -559,10 +559,5 @@ namespace CalamityMod.Projectiles.Boss
CalamityGlobalProjectile.DrawCenteredAndAfterimage(projectile, lightColor, ProjectileID.Sets.TrailingMode[projectile.type], 1);
return false;
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -81,10 +81,5 @@ namespace CalamityMod.Projectiles.Boss
}
return new Color(255, 255, 255, 100);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -144,10 +144,5 @@ namespace CalamityMod.Projectiles.Boss
}
return new Color(255, 255, 255, 100);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -97,11 +97,6 @@ namespace CalamityMod.Projectiles.Boss
return new Color(255, 255, 255, projectile.alpha);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
if (TelegraphDelay >= TelegraphTotalTime)
-5
View File
@@ -124,10 +124,5 @@ namespace CalamityMod.Projectiles.Boss
}
projectile.Damage();
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -108,10 +108,5 @@ namespace CalamityMod.Projectiles.Boss
}
return false;
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -69,10 +69,5 @@ namespace CalamityMod.Projectiles.Boss
{
target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 180);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -167,10 +167,5 @@ namespace CalamityMod.Projectiles.Boss
{
target.AddBuff(ModContent.BuffType<LethalLavaBurn>(), 180);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -152,10 +152,5 @@ namespace CalamityMod.Projectiles.Boss
{
target.AddBuff(ModContent.BuffType<LethalLavaBurn>(), 180);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -160,10 +160,5 @@ namespace CalamityMod.Projectiles.Boss
{
target.AddBuff(ModContent.BuffType<LethalLavaBurn>(), 180);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -158,10 +158,5 @@ namespace CalamityMod.Projectiles.Boss
{
target.AddBuff(ModContent.BuffType<LethalLavaBurn>(), 300);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -125,10 +125,5 @@ namespace CalamityMod.Projectiles.Boss
int buffType = Main.dayTime ? ModContent.BuffType<HolyFlames>() : ModContent.BuffType<Nightwither>();
target.AddBuff(buffType, 240);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -120,10 +120,5 @@ namespace CalamityMod.Projectiles.Boss
int buffType = Main.dayTime ? ModContent.BuffType<HolyFlames>() : ModContent.BuffType<Nightwither>();
target.AddBuff(buffType, 180);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -115,10 +115,5 @@ namespace CalamityMod.Projectiles.Boss
int buffType = Main.dayTime ? ModContent.BuffType<HolyFlames>() : ModContent.BuffType<Nightwither>();
target.AddBuff(buffType, 120);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -104,10 +104,5 @@ namespace CalamityMod.Projectiles.Boss
int buffType = Main.dayTime ? ModContent.BuffType<HolyFlames>() : ModContent.BuffType<Nightwither>();
target.AddBuff(buffType, 120);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -112,10 +112,5 @@ namespace CalamityMod.Projectiles.Boss
int buffType = Main.dayTime ? ModContent.BuffType<HolyFlames>() : ModContent.BuffType<Nightwither>();
target.AddBuff(buffType, 120);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -172,10 +172,5 @@ namespace CalamityMod.Projectiles.Boss
int buffType = Main.dayTime ? ModContent.BuffType<HolyFlames>() : ModContent.BuffType<Nightwither>();
target.AddBuff(buffType, 120);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -159,10 +159,5 @@ namespace CalamityMod.Projectiles.Boss
{
target.AddBuff(ModContent.BuffType<LethalLavaBurn>(), 420);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -159,10 +159,5 @@ namespace CalamityMod.Projectiles.Boss
{
target.AddBuff(ModContent.BuffType<LethalLavaBurn>(), 420);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -147,10 +147,5 @@ namespace CalamityMod.Projectiles.Boss
{
target.KillMe(PlayerDeathReason.ByOther(11), 1000.0, 0, false);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -144,10 +144,5 @@ namespace CalamityMod.Projectiles.Boss
int buffType = Main.dayTime ? ModContent.BuffType<HolyFlames>() : ModContent.BuffType<Nightwither>();
target.AddBuff(buffType, 180);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -114,10 +114,5 @@ namespace CalamityMod.Projectiles.Boss
int buffType = Main.dayTime ? ModContent.BuffType<HolyFlames>() : ModContent.BuffType<Nightwither>();
target.AddBuff(buffType, 90);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -92,11 +92,6 @@ namespace CalamityMod.Projectiles.Boss
target.AddBuff(ModContent.BuffType<Irradiated>(), 180);
}
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);
-5
View File
@@ -163,10 +163,5 @@ 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;
}
}
}
-5
View File
@@ -134,10 +134,5 @@ namespace CalamityMod.Projectiles.Boss
{
target.AddBuff(ModContent.BuffType<Nightwither>(), 180);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -134,10 +134,5 @@ namespace CalamityMod.Projectiles.Boss
{
target.AddBuff(ModContent.BuffType<WhisperingDeath>(), 180);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -72,10 +72,5 @@ namespace CalamityMod.Projectiles.Boss
{
return new Color(100, 250, 250, projectile.alpha);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -72,10 +72,5 @@ namespace CalamityMod.Projectiles.Boss
{
return new Color(100, 250, 250, projectile.alpha);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -73,10 +73,5 @@ namespace CalamityMod.Projectiles.Boss
target.AddBuff(ModContent.BuffType<Nightwither>(), 180);
target.AddBuff(ModContent.BuffType<WhisperingDeath>(), 180);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -94,10 +94,5 @@ namespace CalamityMod.Projectiles.Boss
{
target.AddBuff(ModContent.BuffType<Nightwither>(), 120);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -94,10 +94,5 @@ namespace CalamityMod.Projectiles.Boss
{
target.AddBuff(ModContent.BuffType<WhisperingDeath>(), 120);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -95,10 +95,5 @@ namespace CalamityMod.Projectiles.Boss
{
target.AddBuff(ModContent.BuffType<HolyFlames>(), 120);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -124,10 +124,5 @@ namespace CalamityMod.Projectiles.Boss
}
return false;
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
@@ -199,10 +199,5 @@ namespace CalamityMod.Projectiles.Boss
{
return new Color(255 - projectile.alpha, 255 - projectile.alpha, 255 - projectile.alpha, 0);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -201,10 +201,5 @@ namespace CalamityMod.Projectiles.Boss
int buffType = Main.dayTime ? ModContent.BuffType<HolyFlames>() : ModContent.BuffType<Nightwither>();
target.AddBuff(buffType, 300);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -172,11 +172,6 @@ namespace CalamityMod.Projectiles.Boss
target.AddBuff(BuffID.Electrified, 120);
}
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;
-5
View File
@@ -145,10 +145,5 @@ namespace CalamityMod.Projectiles.Boss
target.AddBuff(BuffID.Electrified, 60);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -144,10 +144,5 @@ namespace CalamityMod.Projectiles.Boss
Main.dust[num624].velocity *= 2f;
}
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -121,10 +121,5 @@ namespace CalamityMod.Projectiles.Boss
}
}
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -72,10 +72,5 @@ namespace CalamityMod.Projectiles.Boss
Main.projectile[num236].netUpdate = true;
}
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -117,10 +117,5 @@ namespace CalamityMod.Projectiles.Boss
{
target.AddBuff(ModContent.BuffType<LethalLavaBurn>(), 180);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
-5
View File
@@ -129,10 +129,5 @@ namespace CalamityMod.Projectiles.Boss
{
target.AddBuff(ModContent.BuffType<LethalLavaBurn>(), 180);
}
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
}
}
+21 -1
View File
@@ -1058,7 +1058,12 @@ namespace CalamityMod.Projectiles
}
#endregion
#region ModifyHitNPC
#region ModifyHit
public override void ModifyHitPlayer(Projectile projectile, Player target, ref int damage, ref bool crit)
{
target.Calamity().lastProjectileHit = projectile;
}
public override void ModifyHitNPC(Projectile projectile, NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection)
{
Player player = Main.player[projectile.owner];
@@ -1101,6 +1106,21 @@ namespace CalamityMod.Projectiles
if (rogue && stealthStrike && modPlayer.stealthStrikeAlwaysCrits)
crit = true;
//Done here since crit calcs are overridden here
if (projectile.type == ProjectileType<ImpactRound>())
{
double damageMult = 1D;
if (crit)
{
damageMult += 0.25;
}
if (target.Inorganic())
{
damageMult += 0.1;
}
damage = (int)(damage * damageMult);
}
}
}
#endregion
-14
View File
@@ -43,19 +43,5 @@ namespace CalamityMod.Projectiles.Ranged
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) => projectile.timeLeft < 600;
public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection)
{
double damageMult = 1D;
if (crit)
{
damageMult += 0.25;
}
if (target.Inorganic())
{
damageMult += 0.1;
}
damage = (int)(damage * damageMult);
}
}
}