something about minions

This commit is contained in:
Altixal committed 2024-10-24 13:08:19 +07:00
1 parent e17db9d427
commit 66ccc5cccc
10 files changed
+14 -5

No files matched your search

@@ -141,6 +141,7 @@ namespace CalamityMod.Projectiles.BaseProjectiles
{
Main.projFrames[Type] = AnimationFrames;
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
ProjectileID.Sets.TrailingMode[Type] = TrailingMode;
ProjectileID.Sets.TrailCacheLength[Type] = TrailCacheLength;
+1 -1
View File
@@ -206,6 +206,6 @@ namespace CalamityMod.Projectiles.Summon
HitCounter = 0;
}
}
public override bool? CanDamage() => Reforming ? false : null;
public override bool MinionContactDamage() => !Reforming;
}
}
+1 -1
View File
@@ -209,7 +209,7 @@ namespace CalamityMod.Projectiles.Summon
}
// The minion will only have contact damage if it's on latching mode.
public override bool? CanDamage() => (State == AIState.Latching) ? null : false;
public override bool MinionContactDamage() => State == AIState.Latching;
// The minion will do 1.5x damage if it's latched on.
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => modifiers.SourceDamage *= CalamarisLament.LatchingDamageMultiplier;
+2
View File
@@ -173,6 +173,8 @@ namespace CalamityMod.Projectiles.Summon
}
}
public override bool MinionContactDamage() => true;
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
if (AttackState.HasFlag(AttackBehaviorFlags.HasDashed) && !AttackState.HasFlag(AttackBehaviorFlags.HasHitTargetOnDash) && Target == target)
+2
View File
@@ -173,6 +173,8 @@ namespace CalamityMod.Projectiles.Summon
}
}
public override bool MinionContactDamage() => true;
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
if (AttackState.HasFlag(AttackBehaviorFlags.HasDashed) && !AttackState.HasFlag(AttackBehaviorFlags.HasHitTargetOnDash) && Target == target)
+1 -1
View File
@@ -185,7 +185,7 @@ namespace CalamityMod.Projectiles.Summon
}
}
public override bool? CanDamage() => (State == AIState.Ram) ? null : false;
public override bool MinionContactDamage() => State == AIState.Ram;
public override bool PreDraw(ref Color lightColor)
{
+2
View File
@@ -204,6 +204,8 @@ namespace CalamityMod.Projectiles.Summon
Projectile.netUpdate = true;
}
public override bool MinionContactDamage() => true;
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
// Rebound on collision.
+1 -1
View File
@@ -253,7 +253,7 @@ namespace CalamityMod.Projectiles.Summon
#endregion
public override bool? CanDamage() => (State == AIState.Dashing) ? null : false;
public override bool MinionContactDamage() => State == AIState.Dashing;
// The minion while dashing does 1.25x more damge.
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => modifiers.SourceDamage *= 1.25f;
+1 -1
View File
@@ -401,6 +401,6 @@ namespace CalamityMod.Projectiles.Summon
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType<Plague>(), 180);
public override bool? CanDamage() => CurrentState == ViriliAIState.ChargeAtEnemies ? null : false;
public override bool MinionContactDamage() => CurrentState == ViriliAIState.ChargeAtEnemies;
}
}
@@ -329,6 +329,8 @@ namespace CalamityMod.Projectiles.Summon
#endregion
public override bool MinionContactDamage() => true;
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
{
if (State == AIState.Ramming)