dart extraupdates and crystal dart bounce iframe changes
This commit is contained in:
1 parent
f4a62fb582
commit
939b830a8c
2 files changed
+22
-5
No files matched your search
@@ -4645,7 +4645,12 @@ namespace CalamityMod.Projectiles
|
||||
target.Calamity().hyperiusMarked = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Crystal Darts reset iframes on bouncing off an enemy
|
||||
if (projectile.type == ProjectileID.CrystalDart)
|
||||
{
|
||||
projectile.ResetLocalNPCHitImmunity();
|
||||
projectile.localNPCImmunity[target.whoAmI] = -1;
|
||||
}
|
||||
// Implementation of shared static iframes.
|
||||
// If this projectile does not use static iframes, or is not registered to share them, then do nothing.
|
||||
if (!projectile.usesIDStaticNPCImmunity || CalamityProjectileSets.SharedIDStaticIFrames[projectile.type] == -1)
|
||||
@@ -4745,6 +4750,18 @@ namespace CalamityMod.Projectiles
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region TileCollide
|
||||
public override bool OnTileCollide(Projectile projectile, Vector2 oldVelocity)
|
||||
{
|
||||
//Crystal Darts use -1 local that needs to reset whenever they bounce
|
||||
if (projectile.type == ProjectileID.CrystalDart)
|
||||
{
|
||||
projectile.ResetLocalNPCHitImmunity();
|
||||
}
|
||||
return base.OnTileCollide(projectile, oldVelocity);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Drawing
|
||||
public override Color? GetAlpha(Projectile projectile, Color lightColor)
|
||||
{
|
||||
|
||||
@@ -328,7 +328,7 @@ namespace CalamityMod.Projectiles
|
||||
{ ProjectileID.CrimsandBallGun, defaultIFrames },
|
||||
{ ProjectileID.CrimsonHeart, defaultIFrames },
|
||||
{ ProjectileID.CrimsonSpray, defaultIFrames },
|
||||
{ ProjectileID.CrystalDart, defaultIFrames },
|
||||
{ ProjectileID.CrystalDart, Do( ExtraUpdatesExact(2), LocalIFrames(-1)) },
|
||||
{ ProjectileID.CrystalLeaf, defaultIFrames },
|
||||
{ ProjectileID.CrystalLeafShot, defaultIFrames },
|
||||
{ ProjectileID.CrystalPulse, defaultIFrames },
|
||||
@@ -338,7 +338,7 @@ namespace CalamityMod.Projectiles
|
||||
{ ProjectileID.CrystalVileShardHead, defaultIFrames },
|
||||
{ ProjectileID.CrystalVileShardShaft, defaultIFrames },
|
||||
{ ProjectileID.CursedArrow, defaultIFrames },
|
||||
{ ProjectileID.CursedDart, defaultIFrames },
|
||||
{ ProjectileID.CursedDart, Do( ExtraUpdatesExact(1), LocalIFrames(20)) },
|
||||
{ ProjectileID.CursedDartFlame, defaultIFrames },
|
||||
{ ProjectileID.CursedFlameFriendly, defaultIFrames },
|
||||
{ ProjectileID.CursedFlare, defaultIFrames },
|
||||
@@ -397,7 +397,7 @@ namespace CalamityMod.Projectiles
|
||||
{ ProjectileID.IceBlock, defaultIFrames },
|
||||
{ ProjectileID.IceBolt, defaultIFrames },
|
||||
{ ProjectileID.IchorArrow, defaultIFrames },
|
||||
{ ProjectileID.IchorDart, defaultIFrames },
|
||||
{ ProjectileID.IchorDart, Do( ExtraUpdatesExact(1), DefaultIDStaticIFrames) },
|
||||
{ ProjectileID.JackOLantern, defaultIFrames },
|
||||
{ ProjectileID.JavelinFriendly, defaultIFrames },
|
||||
{ ProjectileID.JestersArrow, defaultIFrames },
|
||||
@@ -466,7 +466,7 @@ namespace CalamityMod.Projectiles
|
||||
{ ProjectileID.PhantasmArrow, defaultIFrames },
|
||||
{ ProjectileID.PineNeedleFriendly, defaultIFrames },
|
||||
{ ProjectileID.PlatinumCoin, defaultIFrames },
|
||||
{ ProjectileID.PoisonDart, defaultIFrames },
|
||||
{ ProjectileID.PoisonDart, Do( ExtraUpdatesExact(1), DefaultIDStaticIFrames) },
|
||||
{ ProjectileID.PoisonDartBlowgun, defaultIFrames },
|
||||
{ ProjectileID.PoisonDartTrap, defaultIFrames },
|
||||
{ ProjectileID.PoisonedKnife, defaultIFrames },
|
||||
|
||||
Reference in new issue
Block a user