Merge branch 'master' into post-scal-assets

This commit is contained in:
Dominic committed 2021-10-15 16:00:20 -05:00
commit 3ecd0e53d4
45 files changed
+222 -124

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 790 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 635 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 803 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 809 B

+1 -1
View File
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Ammo
public override void SetDefaults()
{
item.damage = 42;
item.damage = 28;
item.ranged = true;
item.width = 22;
item.height = 22;
+1 -1
View File
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Magic
public override void SetDefaults()
{
item.damage = 230;
item.damage = 500;
item.magic = true;
item.mana = 15;
item.width = 60;
+1 -1
View File
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Magic
public override void SetDefaults()
{
item.damage = 444;
item.damage = 888;
item.magic = true;
item.mana = 10;
item.width = 38;
+1 -1
View File
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Melee
{
item.height = 134;
item.width = 54;
item.damage = 4050;
item.damage = 3725;
// Displayed axe% is 1/5th of axePower here because trees have 500% hardness. This corrects for that.
item.axe = 6000 / 5;
+1 -1
View File
@@ -8,7 +8,7 @@ namespace CalamityMod.Items.Weapons.Summon
{
public class AngryChickenStaff : ModItem
{
public const int Damage = 107;
public const int Damage = 300;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Yharon's Kindle Staff");
+31 -1
View File
@@ -411,7 +411,37 @@ namespace CalamityMod.NPCs.Abyss
npc.rotation = (float)System.Math.Atan2((double)npc.velocity.Y, (double)npc.velocity.X) + 1.57f;
}
public override bool? CanBeHitByProjectile(Projectile projectile)
public override bool CanHitPlayer(Player target, ref int cooldownSlot)
{
bool adultWyrmAlive = false;
if (CalamityGlobalNPC.adultEidolonWyrmHead != -1)
{
if (Main.npc[CalamityGlobalNPC.adultEidolonWyrmHead].active)
adultWyrmAlive = true;
}
if (adultWyrmAlive)
cooldownSlot = 1;
Rectangle targetHitbox = target.Hitbox;
float dist1 = Vector2.Distance(npc.Center, targetHitbox.TopLeft());
float dist2 = Vector2.Distance(npc.Center, targetHitbox.TopRight());
float dist3 = Vector2.Distance(npc.Center, targetHitbox.BottomLeft());
float dist4 = Vector2.Distance(npc.Center, targetHitbox.BottomRight());
float minDist = dist1;
if (dist2 < minDist)
minDist = dist2;
if (dist3 < minDist)
minDist = dist3;
if (dist4 < minDist)
minDist = dist4;
return minDist <= 40f;
}
public override bool? CanBeHitByProjectile(Projectile projectile)
{
if (projectile.minion && !projectile.Calamity().overridesMinionDamagePrevention)
{
+2 -2
View File
@@ -894,7 +894,7 @@ namespace CalamityMod.NPCs.Abyss
{
calamityGlobalNPC.newAI[2] += 1f;
float spinVelocityDivisor = targetDownDeep ? 180f : 120f;
float spinVelocityDivisor = targetDownDeep ? 120f : 90f;
if (rotationDirection == 0)
{
// Set spin direction
@@ -1172,7 +1172,7 @@ namespace CalamityMod.NPCs.Abyss
if ((destination - npc.Center).Length() < spinLocationDistance || calamityGlobalNPC.newAI[1] > 0f)
{
calamityGlobalNPC.newAI[1] += 1f;
float spinVelocityDivisor = targetDownDeep ? 180f : 120f;
float spinVelocityDivisor = targetDownDeep ? 90f : 60f;
if (rotationDirection == 0)
{
// Set spin direction
+2 -2
View File
@@ -1925,8 +1925,8 @@ namespace CalamityMod.NPCs
bool thanatos = ThanatosIDs.Contains(npc.type);
// Calculate extra DR based on kill time, similar to the Hush boss from The Binding of Isaac
bool increasedTimedDR = !GetDownedBossVariable(npc.type) || malice || nightProvi || prePlant_Destroyer || prePlant_AS || preML_Deus || preDoG_SW || malice_DS_Perfs || thanatos;
if (KillTime > 0 && AITimer < KillTime && !BossRushEvent.BossRushActive && increasedTimedDR)
bool useTimedDR = !GetDownedBossVariable(npc.type) || malice || nightProvi || prePlant_Destroyer || prePlant_AS || preML_Deus || preDoG_SW || malice_DS_Perfs || thanatos;
if (KillTime > 0 && AITimer < KillTime && !BossRushEvent.BossRushActive && useTimedDR)
{
bool tenTimes_TimedDR = nightProvi;
bool fiveTimes_TimedDR = prePlant_Destroyer || prePlant_AS || preML_Deus || preDoG_SW || malice_DS_Perfs;
@@ -91,7 +91,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
// Angles are wrapped to be 0 to 2pi instead of -pi to pi for convenience with absolute values.
float rotationAdjusted = MathHelper.WrapAngle(projectile.rotation) + MathHelper.Pi;
float oldRotationAdjusted = MathHelper.WrapAngle(projectile.oldRot[1]) + MathHelper.Pi;
float deltaAngle = Math.Abs(rotationAdjusted - oldRotationAdjusted);
float deltaAngle = Math.Abs(MathHelper.WrapAngle(rotationAdjusted - oldRotationAdjusted));
// Frame 1 effect: Prevent the sword from instantly firing a sword beam.
if (projectile.localAI[1] == 0f)
@@ -285,7 +285,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
float rotationAdjusted = MathHelper.WrapAngle(projectile.rotation) + MathHelper.Pi;
float oldRotationAdjusted = MathHelper.WrapAngle(projectile.oldRot[1]) + MathHelper.Pi;
deltaAngle = Math.Abs(rotationAdjusted - oldRotationAdjusted);
deltaAngle = Math.Abs(MathHelper.WrapAngle(rotationAdjusted - oldRotationAdjusted));
if (deltaAngle < 0.04f)
opacity = 0f;
@@ -293,7 +293,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
return Color.Lerp(Color.Red, Color.PaleVioletRed * completionRatio, MathHelper.Clamp(completionRatio * 0.8f, 0f, 1f)) * opacity;
}
internal float WidthFunction(float completionRatio) => (IsSmall ? 101f : 127f) * (1f - completionRatio);
internal float WidthFunction(float completionRatio) => (IsSmall ? 101f : 127f) * (1f - completionRatio) * 0.8f;
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
{
@@ -301,7 +301,9 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
Texture2D hiltTexture = ModContent.GetTexture(Texture);
if (IsSmall)
bladeTexture = ModContent.GetTexture("CalamityMod/Projectiles/DraedonsArsenal/PhaseslayerBladeSmall");
Vector2 bladeOffset = projectile.rotation.ToRotationVector2() * (IsSmall ? 90f : 132f) * projectile.scale;
float bladeLength = (IsSmall ? 90f : 132f) * projectile.scale;
Vector2 bladeOffset = projectile.rotation.ToRotationVector2() * bladeLength;
Vector2 origin = bladeTexture.Size() * 0.5f;
origin /= IsSmall ? new Vector2(1f, 3f) : new Vector2(3f, 7f);
@@ -313,26 +315,22 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
GameShaders.Misc["CalamityMod:PhaseslayerRipEffect"].SetShaderTexture(ModContent.GetTexture("CalamityMod/ExtraTextures/SwordSlashTexture"));
Player player = Main.player[projectile.owner];
List<Vector2> positions = new List<Vector2>();
float swingAngularDirection = Math.Sign(MathHelper.WrapAngle(projectile.rotation - projectile.oldRot[1]));
float swingAngularDirection = Math.Sign(projectile.rotation - projectile.oldRot[1]);
projectile.oldRot[0] += swingAngularDirection * 0.1f;
for (int i = 0; i < projectile.oldPos.Length; i++)
Vector2[] drawPoints = new Vector2[projectile.oldPos.Length];
Vector2 perpendicularDirection = bladeOffset.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.PiOver2);
for (int i = 0; i < drawPoints.Length; i++)
{
if (projectile.oldPos[i] == Vector2.Zero)
continue;
// Skip over any very points going in the wrong direction, to prevent "nets" from the primitive.
if (i > 1 && Math.Sign(projectile.oldRot[i - 1] - projectile.oldRot[i]) != swingAngularDirection)
continue;
Vector2 position = projectile.position + projectile.oldRot[i].ToRotationVector2() * (IsSmall ? 90f : 132f) * projectile.scale;
positions.Add(position);
float swingFactor = MathHelper.Min(1f, AngularDamageFactor);
float offsetFactor = i * -swingAngularDirection * MathHelper.Min(0.8f, swingFactor) * 100f;
float angularTurn = i * swingAngularDirection * -0.09f;
drawPoints[i] = projectile.position + perpendicularDirection.RotatedBy(angularTurn) * offsetFactor;
}
projectile.oldRot[0] -= swingAngularDirection * 0.1f;
TrailDrawer.Draw(positions, projectile.Size * 0.5f - Main.screenPosition, 50);
TrailDrawer.Draw(drawPoints, projectile.Size * 0.5f + bladeOffset - Main.screenPosition, 50);
spriteBatch.Draw(bladeTexture, projectile.Center + bladeOffset - Main.screenPosition, frame, Color.White, projectile.rotation + MathHelper.PiOver2, origin, projectile.scale, SpriteEffects.None, 0f);
spriteBatch.Draw(hiltTexture, projectile.Center - Main.screenPosition, null, lightColor, projectile.rotation + MathHelper.PiOver2, hiltTexture.Size() * 0.5f, projectile.scale, SpriteEffects.None, 0f);
+1 -1
View File
@@ -87,7 +87,7 @@ namespace CalamityMod.Projectiles.Magic
if (projectile.localAI[0] >= 100)
{
Vector2 center = projectile.Center;
float homingRange = 250f;
float homingRange = 325f;
bool homeIn = false;
float inertia = 25f;
float homingSpeed = 23f;
+1 -1
View File
@@ -92,7 +92,7 @@ namespace CalamityMod.Projectiles.Magic
projectile.velocity = velocity;
int projType = ModContent.ProjectileType<T1000Laser>();
float velocityMult = 14f;
float velocityMult = 21f;
float randNum = 4f;
for (int j = 0; j < 4; j++)
{
+8 -1
View File
@@ -110,7 +110,14 @@ namespace CalamityMod.Projectiles.Melee
target.AddBuff(ModContent.BuffType<ArmorCrunch>(), 240);
}
public override bool? CanHitNPC(NPC target) => projectile.ai[0] != 1f;
public override bool? CanHitNPC(NPC target)
{
if (projectile.ai[0] == 1f)
{
return false;
}
return null;
}
public override bool CanHitPvp(Player target) => projectile.ai[0] != 1f;
}
+1 -2
View File
@@ -22,8 +22,7 @@ namespace CalamityMod.Projectiles.Melee
public override void SetDefaults()
{
projectile.width = 42;
projectile.height = 42;
projectile.width = projectile.height = 88;
projectile.friendly = true;
projectile.ignoreWater = true;
projectile.extraUpdates = 1;
+5 -1
View File
@@ -142,7 +142,11 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
// Charge up the red lightning aura with every hit
// On hit effects do not apply if no damage was done.
if (damage <= 0)
return;
// Charge up the red lightning aura with every hit.
AuraCharge += ChargePerHit;
// Fire Auric orbs every few hits while supercharged.
+1 -1
View File
@@ -97,7 +97,7 @@ namespace CalamityMod.Projectiles.Ranged
projectile.tileCollide = false;
// Reduce damage, but remove piercing. Reset local iframes so the bullet, turned blue, may always strike again.
projectile.damage = (int)(0.3f * projectile.damage);
projectile.damage = (int)(0.28f * projectile.damage);
projectile.penetrate = 1;
for (int i = 0; i < Main.maxNPCs; i++)
projectile.localNPCImmunity[i] = 0;
+8 -1
View File
@@ -106,7 +106,14 @@ namespace CalamityMod.Projectiles.Rogue
return false;
}
public override bool? CanHitNPC(NPC target) => projectile.ai[0] != 1f;
public override bool? CanHitNPC(NPC target)
{
if (projectile.ai[0] == 1f)
{
return false;
}
return null;
}
public override bool CanHitPvp(Player target) => projectile.ai[0] != 1f;
}
+1 -1
View File
@@ -115,7 +115,7 @@ namespace CalamityMod.Projectiles.Summon
if (body.ai[0] >= 0 && body.ai[0] < Main.npc.Length)
{
NPC target = Main.npc[(int)body.ai[0]];
bool targetAliveAndInLineOfSight = target.active && projectile.Distance(target.Center) < EndoHydraBody.DistanceToCheck && Collision.CanHit(projectile.Center, 1, 1, target.Center, 1, 1);
bool targetAliveAndInLineOfSight = target.active && projectile.Distance(target.Center) < EndoHydraBody.DistanceToCheck;
if (targetAliveAndInLineOfSight && target.CanBeChasedBy() && Main.myPlayer == projectile.owner)
{
if (Time % 40f == 24f)
+1
View File
@@ -24,6 +24,7 @@ namespace CalamityMod.Projectiles.Summon
projectile.extraUpdates = 100;
projectile.timeLeft = 265;
projectile.coldDamage = true;
projectile.tileCollide = false;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 100;
}
+88 -66
View File
@@ -6,119 +6,141 @@ using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Summon
{
public class RadiantResolutionAura : ModProjectile
{
public const float DistanceToCheck = 1600f;
public Player Owner => Main.player[projectile.owner];
public ref float AllocatedSlots => ref projectile.ai[0];
public ref float GeneralTimer => ref projectile.ai[1];
public const float TargetCheckDistance = 1600f;
public const int RadiantOrbAppearRateLowerBound = 7;
public const int RadiantOrbDamageUpperBound = 10000;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Saros Possession");
DisplayName.SetDefault("Radiant Aura");
ProjectileID.Sets.MinionSacrificable[projectile.type] = true;
ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true;
}
public override void SetDefaults()
{
projectile.width = 66;
projectile.height = 66;
projectile.width = projectile.height = 66;
projectile.netImportant = true;
projectile.friendly = true;
projectile.ignoreWater = true;
projectile.minionSlots = 1f;
projectile.timeLeft = 18000;
projectile.timeLeft = 90000;
projectile.penetrate = -1;
projectile.tileCollide = false;
projectile.timeLeft *= 5;
projectile.minion = true;
}
public override void AI()
{
Lighting.AddLight(projectile.Center, 2f, 2f, 2f);
Player player = Main.player[projectile.owner];
CalamityPlayer modPlayer = player.Calamity();
player.AddBuff(ModContent.BuffType<RadiantResolutionBuff>(), 3600);
// Emit some light.
Lighting.AddLight(projectile.Center, Vector3.One * 1.2f);
// Ensure that the projectile using this AI is the correct projectile and that the owner has the appropriate buffs.
VerifyIdentityOfCaller();
// Handle dynamic minion damage.
HandleDynamicMinionDamage();
// Store the allocated slots in the minionSlots field so that the amount of slots the projectile is holding
// is always correct.
projectile.minionSlots = projectile.ai[0];
// Stay near the target and spin around.
projectile.Center = Owner.Center - Vector2.UnitY * 16f;
projectile.rotation += MathHelper.ToRadians(AllocatedSlots * 0.85f + 3f);
float damageMultiplier = (float)Math.Log(AllocatedSlots, 3D) + 1f;
// Softcap the multiplier after it has exceeded 3x the base value.
float softcappedDamageMultiplier = damageMultiplier;
if (softcappedDamageMultiplier > 3f)
softcappedDamageMultiplier = ((damageMultiplier - 3f) * 0.1f) + 3f;
int radiantOrbDamage = (int)(projectile.damage * softcappedDamageMultiplier);
int radiantOrbAppearRate = (int)(130 * Math.Pow(0.9, AllocatedSlots));
// Hard-cap the orb appear rate and damage.
// The latter is basically impossible to reach now due to rebalancing, but it shall remain for the time being.
if (radiantOrbAppearRate < RadiantOrbAppearRateLowerBound)
radiantOrbAppearRate = RadiantOrbAppearRateLowerBound;
if (radiantOrbDamage > RadiantOrbDamageUpperBound)
radiantOrbDamage = RadiantOrbDamageUpperBound;
// Attack nearby targets.
GeneralTimer++;
NPC potentialTarget = projectile.Center.MinionHoming(TargetCheckDistance, Owner);
if (potentialTarget != null && Main.myPlayer == projectile.owner)
AttackTarget(potentialTarget, radiantOrbAppearRate, radiantOrbDamage);
}
public void VerifyIdentityOfCaller()
{
Owner.AddBuff(ModContent.BuffType<RadiantResolutionBuff>(), 3600);
bool isCorrectProjectile = projectile.type == ModContent.ProjectileType<RadiantResolutionAura>();
if (isCorrectProjectile)
{
if (player.dead)
{
modPlayer.radiantResolution = false;
}
if (modPlayer.radiantResolution)
{
projectile.timeLeft = 2;
}
}
if (Owner.dead)
Owner.Calamity().radiantResolution = false;
if (Owner.Calamity().radiantResolution)
projectile.timeLeft = 2;
}
}
public void HandleDynamicMinionDamage()
{
if (projectile.localAI[0] == 0f)
{
projectile.Calamity().spawnedPlayerMinionDamageValue = player.MinionDamage();
projectile.Calamity().spawnedPlayerMinionDamageValue = Owner.MinionDamage();
projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage;
projectile.localAI[0] += 1f;
}
if (player.MinionDamage() != projectile.Calamity().spawnedPlayerMinionDamageValue)
if (Owner.MinionDamage() != projectile.Calamity().spawnedPlayerMinionDamageValue)
{
int trueDamage = (int)(projectile.Calamity().spawnedPlayerMinionProjectileDamageValue /
projectile.Calamity().spawnedPlayerMinionDamageValue *
player.MinionDamage());
Owner.MinionDamage());
projectile.damage = trueDamage;
}
projectile.minionSlots = projectile.ai[0];
}
projectile.Center = player.Center - Vector2.UnitY * 16f;
float allocatedSlots = projectile.ai[0];
projectile.rotation += MathHelper.ToRadians(3f) + MathHelper.ToRadians(allocatedSlots * 0.85f);
float damageMult = (float)Math.Log(allocatedSlots, 3) + 1f;
//Softcap the mult after 9 slots
float newMult = damageMult;
if (newMult > 3f)
{
newMult = ((damageMult - 3f) * 0.1f) + 3f;
}
int radiantOrbDamage = (int)(projectile.damage * newMult);
int radiantOrbAppearRate = (int)(130 * Math.Pow(0.9, allocatedSlots));
if (radiantOrbAppearRate < 7)
radiantOrbAppearRate = 7;
if (radiantOrbDamage > 10000)
radiantOrbDamage = 10000;
projectile.ai[1]++;
NPC potentialTarget = projectile.Center.MinionHoming(DistanceToCheck, player);
if (potentialTarget != null && Main.myPlayer == projectile.owner)
public void AttackTarget(NPC target, int radiantOrbAppearRate, int radiantOrbDamage)
{
if (GeneralTimer % 35f == 34f)
{
if (projectile.ai[1] % 35 == 34)
for (int i = 0; i < 2; i++)
{
for (int i = 0; i < 2; i++)
{
float angle = MathHelper.Lerp(-MathHelper.ToRadians(20f), MathHelper.ToRadians(20f), i / 2f);
Vector2 fireVelocity = projectile.SafeDirectionTo(potentialTarget.Center).RotatedBy(angle) * 15f;
Projectile.NewProjectile(projectile.Center, fireVelocity, ModContent.ProjectileType<RadiantResolutionFire>(), radiantOrbDamage / 2, projectile.knockBack, projectile.owner);
}
float angle = MathHelper.Lerp(-MathHelper.ToRadians(20f), MathHelper.ToRadians(20f), i / 2f);
Vector2 fireVelocity = projectile.SafeDirectionTo(target.Center).RotatedBy(angle) * 15f;
Projectile.NewProjectile(projectile.Center, fireVelocity, ModContent.ProjectileType<RadiantResolutionFire>(), radiantOrbDamage / 2, projectile.knockBack, projectile.owner);
}
if (projectile.ai[1] % radiantOrbAppearRate == radiantOrbAppearRate - 1)
}
if (GeneralTimer % radiantOrbAppearRate == radiantOrbAppearRate - 1)
{
Vector2 spawnPosition = projectile.Center + Main.rand.NextVector2Unit() * Main.rand.NextFloat(100f, 360f);
Vector2 bootlegRadianceOrbVelocity = projectile.SafeDirectionTo(target.Center) * 2f;
Projectile.NewProjectile(spawnPosition, bootlegRadianceOrbVelocity, ModContent.ProjectileType<RadiantResolutionOrb>(), radiantOrbDamage, projectile.knockBack * 4f, projectile.owner);
for (int i = 0; i < 3; i++)
{
Vector2 spawnPosition = projectile.Center + Main.rand.NextVector2Unit() * Main.rand.NextFloat(100f, 360f);
Vector2 bootlegRadianceOrbVelocity = projectile.SafeDirectionTo(potentialTarget.Center) * 2f;
Projectile.NewProjectile(spawnPosition, bootlegRadianceOrbVelocity, ModContent.ProjectileType<RadiantResolutionOrb>(), radiantOrbDamage, projectile.knockBack * 4f, projectile.owner);
for (int i = 0; i < 3; i++)
{
float angle = MathHelper.Lerp(-MathHelper.ToRadians(30f), MathHelper.ToRadians(30f), i / 3f);
Vector2 fireVelocity = projectile.SafeDirectionTo(potentialTarget.Center).RotatedBy(angle) * 19f;
Projectile.NewProjectile(projectile.Center, fireVelocity, ModContent.ProjectileType<RadiantResolutionFire>(), radiantOrbDamage / 2, projectile.knockBack, projectile.owner);
}
float angle = MathHelper.Lerp(-MathHelper.ToRadians(30f), MathHelper.ToRadians(30f), i / 3f);
Vector2 fireVelocity = projectile.SafeDirectionTo(target.Center).RotatedBy(angle) * 19f;
Projectile.NewProjectile(projectile.Center, fireVelocity, ModContent.ProjectileType<RadiantResolutionFire>(), radiantOrbDamage / 2, projectile.knockBack, projectile.owner);
}
}
}
public override bool CanDamage() => false;
public override void PostDraw(SpriteBatch spriteBatch, Color lightColor)
{
Texture2D currentTexture = ModContent.GetTexture(Texture);
+1 -1
View File
@@ -107,7 +107,7 @@ namespace CalamityMod.Projectiles.Summon
}
}
projectile.ChargingMinionAI(1000f, 2000f, 3000f, 500f, 1, 30f, 8f, 4f, new Vector2(0f, -60f), 40f, 8f, true, true);
projectile.ChargingMinionAI(1000f, 2000f, 3000f, 500f, 1, 30f, 8f, 4f, new Vector2(0f, -60f), 40f, 15.5f, true, true);
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor)
+8 -1
View File
@@ -201,7 +201,14 @@ namespace CalamityMod.Projectiles.Typeless
target.AddBuff(ModContent.BuffType<Vaporfied>(), 60);
}
public override bool? CanHitNPC(NPC target) => projectile.alpha < 128;
public override bool? CanHitNPC(NPC target)
{
if (projectile.alpha >= 128)
{
return false;
}
return null;
}
public override bool CanHitPvp(Player target) => projectile.alpha < 128;
+2 -1
View File
@@ -59,7 +59,8 @@ namespace CalamityMod.Tiles.Furniture
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex)
{
CalamityUtils.DrawFlameSparks(235, 5, i, j);
if (Main.tile[i, j].frameX < 18)
CalamityUtils.DrawFlameSparks(235, 5, i, j);
}
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
+2 -1
View File
@@ -59,7 +59,8 @@ namespace CalamityMod.Tiles.Furniture
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex)
{
CalamityUtils.DrawFlameSparks(62, 5, i, j);
if (Main.tile[i, j].frameX < 18)
CalamityUtils.DrawFlameSparks(62, 5, i, j);
}
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
+2 -1
View File
@@ -70,7 +70,8 @@ namespace CalamityMod.Tiles.FurnitureAbyss
}
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex)
{
CalamityUtils.DrawFlameSparks(187, 5, i, j);
if (Main.tile[i, j].frameX < 66)
CalamityUtils.DrawFlameSparks(187, 5, i, j);
}
public override bool NewRightClick(int i, int j)
+1 -1
View File
@@ -79,7 +79,7 @@ namespace CalamityMod.Tiles.FurnitureAncient
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex)
{
Tile tile = Main.tile[i, j];
if (tile.frameY == 18)
if (tile.frameY == 18 && tile.frameX < 54)
{
CalamityUtils.DrawFlameSparks(60, 5, i, j);
}
+1 -1
View File
@@ -44,7 +44,7 @@ namespace CalamityMod.Tiles.FurnitureAncient
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex)
{
Tile tile = Main.tile[i, j];
if (tile.frameX == 18 && tile.frameY == 36)
if (tile.frameX < 54 && tile.frameY == 36)
{
CalamityUtils.DrawFlameSparks(60, 5, i, j);
}
+1 -1
View File
@@ -56,7 +56,7 @@ namespace CalamityMod.Tiles.FurnitureAncient
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex)
{
Tile tile = Main.tile[i, j];
if (tile.frameY == 18)
if (tile.frameY == 18 && tile.frameX < 18)
{
CalamityUtils.DrawFlameSparks(60, 5, i, j);
}
+18 -3
View File
@@ -36,21 +36,36 @@ namespace CalamityMod.Tiles.FurnitureAncient
Item.NewItem(i * 16, j * 16, 16, 32, ModContent.ItemType<Items.Placeables.FurnitureAncient.AncientLantern>());
}
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
{
if (Main.tile[i, j].frameX < 18)
{
r = 1f;
g = 0.5f;
b = 0.5f;
}
else
{
r = 0f;
g = 0f;
b = 0f;
}
}
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
{
CalamityUtils.DrawFlameEffect(ModContent.GetTexture("CalamityMod/Tiles/FurnitureAncient/AncientLanternFlame"), i, j);
}
public override void HitWire(int i, int j)
{
CalamityUtils.LightHitWire(Type, i, j, 3, 3);
CalamityUtils.LightHitWire(Type, i, j, 1, 2);
}
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex)
{
Tile tile = Main.tile[i, j];
if (tile.frameY == 18)
if (tile.frameY == 18 && tile.frameX < 18)
{
CalamityUtils.DrawFlameSparks(60, 5, i, j);
}
+1 -1
View File
@@ -80,7 +80,7 @@ namespace CalamityMod.Tiles.FurnitureAshen
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex)
{
Tile tile = Main.tile[i, j];
if (tile.frameY == 18)
if (tile.frameY == 18 && tile.frameX < 54)
{
CalamityUtils.DrawFlameSparks(60, 5, i, j);
}
+2 -1
View File
@@ -77,7 +77,8 @@ namespace CalamityMod.Tiles.FurnitureAshen
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex)
{
CalamityUtils.DrawFlameSparks(60, 5, i, j);
if (Main.tile[i, j].frameX < 35)
CalamityUtils.DrawFlameSparks(60, 5, i, j);
}
}
}
+2 -1
View File
@@ -73,7 +73,8 @@ namespace CalamityMod.Tiles.FurnitureAshen
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex)
{
CalamityUtils.DrawFlameSparks(60, 5, i, j);
if (Main.tile[i, j].frameX < 18)
CalamityUtils.DrawFlameSparks(60, 5, i, j);
}
}
}
+1 -1
View File
@@ -77,7 +77,7 @@ namespace CalamityMod.Tiles.FurnitureAshen
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex)
{
Tile tile = Main.tile[i, j];
if (tile.frameY == 18)
if (tile.frameY == 18 && tile.frameX < 54)
{
CalamityUtils.DrawFlameSparks(60, 5, i, j);
}
+1 -1
View File
@@ -65,7 +65,7 @@ namespace CalamityMod.Tiles.FurnitureAshen
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex)
{
Tile tile = Main.tile[i, j];
if (tile.frameY == 0)
if (tile.frameY == 0 && tile.frameX < 18)
{
CalamityUtils.DrawFlameSparks(60, 5, i, j);
}
+1 -1
View File
@@ -65,7 +65,7 @@ namespace CalamityMod.Tiles.FurnitureAshen
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex)
{
Tile tile = Main.tile[i, j];
if (tile.frameY == 18)
if (tile.frameY == 18 && tile.frameX < 18)
{
CalamityUtils.DrawFlameSparks(60, 5, i, j);
}
@@ -83,7 +83,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex)
{
Tile tile = Main.tile[i, j];
if (tile.frameY == 18)
if (tile.frameY == 18 && tile.frameX < 54)
{
CalamityUtils.DrawFlameSparks((int)CalamityDusts.PurpleCosmilite, 5, i, j);
}
@@ -64,7 +64,8 @@ namespace CalamityMod.Tiles.FurnitureProfaned
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex)
{
CalamityUtils.DrawFlameSparks(246, 5, i, j);
if (Main.tile[i, j].frameX < 35)
CalamityUtils.DrawFlameSparks(246, 5, i, j);
}
}
}
+2 -1
View File
@@ -74,7 +74,8 @@ namespace CalamityMod.Tiles.FurnitureProfaned
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex)
{
CalamityUtils.DrawFlameSparks(246, 5, i, j);
if (Main.tile[i, j].frameX < 18)
CalamityUtils.DrawFlameSparks(246, 5, i, j);
}
}
}
+1 -1
View File
@@ -65,7 +65,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex)
{
if (Main.tile[i, j].frameY == 0)
if (Main.tile[i, j].frameY == 0 && Main.tile[i, j].frameX < 18)
{
CalamityUtils.DrawFlameSparks(246, 5, i, j);
}
+2 -1
View File
@@ -65,7 +65,8 @@ namespace CalamityMod.Tiles.FurnitureProfaned
public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex)
{
CalamityUtils.DrawFlameSparks(246, 5, i, j);
if (Main.tile[i, j].frameX < 18)
CalamityUtils.DrawFlameSparks(246, 5, i, j);
}
}
}