Merge branch '1.4.4' into MegalodonLine
This commit is contained in:
commit
624e762e3b
76 files changed
+371
-327
No files matched your search
@@ -506,6 +506,9 @@ namespace CalamityMod.Balancing
|
||||
#endregion
|
||||
|
||||
#region Supreme Calamitas: Brimstone Hearts
|
||||
// 34% resist to Celestus' mini scythes.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<BrimstoneHeart>(), new ProjectileResistBalancingRule(0.66f, ProjectileType<CelestusMiniScythe>())));
|
||||
|
||||
// 30% resist to Supernova.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<BrimstoneHeart>(), new ProjectileResistBalancingRule(0.7f, ProjectileType<SupernovaBoom>(), ProjectileType<SupernovaStealthBoom>())));
|
||||
|
||||
|
||||
@@ -48,6 +48,12 @@ namespace CalamityMod.Buffs
|
||||
{
|
||||
player.moveSpeed -= 0.1f;
|
||||
}
|
||||
else if (type == BuffID.Tipsy)
|
||||
{
|
||||
player.statDefense += 4;
|
||||
player.GetCritChance<MeleeDamageClass>() -= 2;
|
||||
player.GetAttackSpeed<MeleeDamageClass>() -= 0.1f;
|
||||
}
|
||||
else if (type == BuffID.WellFed)
|
||||
{
|
||||
player.moveSpeed -= 0.15f;
|
||||
|
||||
@@ -3079,18 +3079,13 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
var source = Player.GetSource_Misc("1");
|
||||
for (int i = 0; i < 8; i++)
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
float ai1 = Main.rand.NextFloat() + 0.5f;
|
||||
float randomSpeed = (float)Main.rand.Next(1, 7);
|
||||
float randomSpeed2 = (float)Main.rand.Next(1, 7);
|
||||
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
|
||||
int soul = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f) + randomSpeed, ProjectileType<BloodflareSoul>(), damage, 0f, Player.whoAmI, 0f, ai1);
|
||||
Vector2 circleVel = (MathHelper.TwoPi * i / 16f).ToRotationVector2() * Main.rand.NextFloat(5f, 8f);
|
||||
int soul = Projectile.NewProjectile(source, Player.Center, circleVel, ProjectileType<BloodflareSoul>(), damage, 0f, Player.whoAmI, 0f, ai1);
|
||||
if (soul.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[soul].DamageType = DamageClass.Generic;
|
||||
int soul2 = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f) + randomSpeed2, ProjectileType<BloodflareSoul>(), damage, 0f, Player.whoAmI, 0f, ai1);
|
||||
if (soul2.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[soul2].DamageType = DamageClass.Generic;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4755,32 +4750,8 @@ namespace CalamityMod.CalPlayer
|
||||
for (int i = 0; i < Player.MaxBuffs; i++)
|
||||
{
|
||||
int buff = Player.buffType[i];
|
||||
|
||||
// TODO -- Alcohol poisoning level is applied through a gigantic if chain
|
||||
// As such, there is currently no way to externally reference alcohol level through buff type so this is the method instead
|
||||
if (buff == BuffType<EverclearBuff>())
|
||||
Alcohol.Insert(0, new int[] { i, 2 });
|
||||
else if (buff == BuffType<BloodyMaryBuff>()
|
||||
|| buff == BuffType<CaribbeanRumBuff>()
|
||||
|| buff == BuffType<CinnamonRollBuff>()
|
||||
|| buff == BuffType<EvergreenGinBuff>()
|
||||
|| buff == BuffType<FabsolVodkaBuff>()
|
||||
|| buff == BuffType<FireballBuff>()
|
||||
|| buff == BuffType<GrapeBeerBuff>()
|
||||
|| buff == BuffType<MargaritaBuff>()
|
||||
|| buff == BuffType<MoonshineBuff>()
|
||||
|| buff == BuffType<MoscowMuleBuff>()
|
||||
|| buff == BuffType<OldFashionedBuff>()
|
||||
|| buff == BuffType<RedWineBuff>()
|
||||
|| buff == BuffType<RumBuff>()
|
||||
|| buff == BuffType<ScrewdriverBuff>()
|
||||
|| buff == BuffType<TequilaBuff>()
|
||||
|| buff == BuffType<TequilaSunriseBuff>()
|
||||
|| buff == BuffType<VodkaBuff>()
|
||||
|| buff == BuffType<WhiskeyBuff>()
|
||||
|| buff == BuffType<WhiteWineBuff>()
|
||||
|| buff == BuffID.Tipsy)
|
||||
Alcohol.Insert(0, new int[] { i, 1 });
|
||||
if (AlcoholsDict.TryGet(buff, out int level))
|
||||
Alcohol.Insert(0, new int[] { i, level });
|
||||
}
|
||||
|
||||
int poison = alcoholPoisonLevel;
|
||||
|
||||
@@ -896,8 +896,6 @@ namespace CalamityMod.CalPlayer
|
||||
#region Modify Hit By Proj
|
||||
public override void ModifyHitByProjectile(Projectile proj, ref Player.HurtModifiers modifiers)
|
||||
{
|
||||
// TODO -- Evolution dodge isn't actually a dodge and you'll still get hit for 1.
|
||||
// This should probably be changed so that when the evolution reflects it gives you 1 frame of guaranteed free dodging everything.
|
||||
if (!ProjectileDestroyExceptionsList.Includes(proj.type) && proj.active && !proj.friendly && proj.hostile && proj.damage > 0)
|
||||
{
|
||||
double dodgeDamageGateValuePercent = 0.05;
|
||||
@@ -929,7 +927,7 @@ namespace CalamityMod.CalPlayer
|
||||
int evolutionIFrames = Player.ComputeReflectIFrames();
|
||||
Player.GiveUniversalIFrames(evolutionIFrames, true);
|
||||
|
||||
modifiers.SetMaxDamage(1);
|
||||
modifiers.Cancel();
|
||||
evolutionLifeRegenCounter = 300;
|
||||
projTypeJustHitBy = proj.type;
|
||||
|
||||
@@ -1506,8 +1504,7 @@ namespace CalamityMod.CalPlayer
|
||||
theBeeCooldown = TheBee.CooldownLength;
|
||||
}
|
||||
|
||||
// TODO: If possible, find a way to make it so parries don't activate the hit
|
||||
if (rOfResilienceCooldown == 0 && rOfResilienceEffect > 0 && hurtInfo.Damage > 1)
|
||||
if (rOfResilienceCooldown == 0 && rOfResilienceEffect > 0)
|
||||
{
|
||||
int cooldownTime = (Player.Calamity().profanedSoulRelicBuff ? 300 : 600);
|
||||
rOfResilienceCooldown = cooldownTime;
|
||||
@@ -1812,7 +1809,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
blazingCoreEmpoweredParry = true;
|
||||
|
||||
modifiers.SetMaxDamage(1); //ONLY REDUCE DAMAGE IF NOT ON COOLDOWN
|
||||
modifiers.Cancel();
|
||||
modifiers.DisableSound(); //prevents hurt sound from playing, had no idea this was a thing
|
||||
}
|
||||
|
||||
@@ -2683,17 +2680,12 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
for (int i = 0; i < 8; i++)
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
float randomSpeed = Main.rand.Next(1, 7);
|
||||
float randomSpeed2 = Main.rand.Next(1, 7);
|
||||
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
|
||||
int shard = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f) + randomSpeed, ProjectileID.CrystalShard, sDamage, 1f, Player.whoAmI, 0f, 0f);
|
||||
int shard2 = Projectile.NewProjectile(source, Player.Center.X, Player.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f) + randomSpeed2, ProjectileID.CrystalShard, sDamage, 1f, Player.whoAmI, 0f, 0f);
|
||||
Vector2 circleVel = (MathHelper.TwoPi * i / 16f).ToRotationVector2() * Main.rand.NextFloat(5f, 8f);
|
||||
int shard = Projectile.NewProjectile(source, Player.Center, circleVel, ProjectileID.CrystalShard, sDamage, 1f, Player.whoAmI);
|
||||
if (shard.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[shard].DamageType = DamageClass.Generic;
|
||||
if (shard2.WithinBounds(Main.maxProjectiles))
|
||||
Main.projectile[shard2].DamageType = DamageClass.Generic;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,111 +181,52 @@ namespace CalamityMod.CalPlayer
|
||||
#endregion
|
||||
|
||||
#region Alcohol
|
||||
// NOTE: This massive if chain is also referenced in CalamityPlayer.PostNurseHeal
|
||||
// TODO -- Change this into any kind of organized data list in order to eliminate these two if chains
|
||||
for (int l = 0; l < Player.MaxBuffs; l++)
|
||||
{
|
||||
int buff = Player.buffType[l];
|
||||
if (AlcoholsDict.TryGet(buff, out var level))
|
||||
alcoholPoisonLevel += level;
|
||||
}
|
||||
if (vodka)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
totalNegativeLifeRegen += Vodka.RegenLoss;
|
||||
}
|
||||
if (redWine)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
totalNegativeLifeRegen += baguette ? Baguette.RedWineBuffedRegenLoss : RedWine.RegenLoss;
|
||||
}
|
||||
if (grapeBeer)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
}
|
||||
if (moonshine)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
totalNegativeLifeRegen += Moonshine.RegenLoss;
|
||||
}
|
||||
if (rum)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
}
|
||||
if (fabsolVodka)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
}
|
||||
if (fireball)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
totalNegativeLifeRegen += Fireball.RegenLoss;
|
||||
}
|
||||
if (whiskey)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
}
|
||||
if (everclear)
|
||||
{
|
||||
alcoholPoisonLevel += 2;
|
||||
totalNegativeLifeRegen += Everclear.RegenLoss;
|
||||
}
|
||||
if (bloodyMary)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
totalNegativeLifeRegen += BloodyMary.RegenLoss;
|
||||
}
|
||||
if (tequila)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
totalNegativeLifeRegen += Tequila.RegenLoss;
|
||||
}
|
||||
if (tequilaSunrise)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
totalNegativeLifeRegen += TequilaSunrise.RegenLoss;
|
||||
}
|
||||
if (screwdriver)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
totalNegativeLifeRegen += Screwdriver.RegenLoss;
|
||||
}
|
||||
if (caribbeanRum)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
}
|
||||
if (cinnamonRoll)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
}
|
||||
if (oldFashioned)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
}
|
||||
if (margarita)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
totalNegativeLifeRegen += Margarita.RegenLoss;
|
||||
}
|
||||
if (starBeamRye)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
totalNegativeLifeRegen += StarBeamRye.RegenLoss;
|
||||
}
|
||||
if (moscowMule)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
totalNegativeLifeRegen += MoscowMule.RegenLoss;
|
||||
}
|
||||
if (whiteWine)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
totalNegativeLifeRegen += WhiteWine.RegenLoss;
|
||||
}
|
||||
if (evergreenGin)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
totalNegativeLifeRegen += EvergreenGin.RegenLoss;
|
||||
}
|
||||
if (Player.tipsy)
|
||||
{
|
||||
alcoholPoisonLevel++;
|
||||
}
|
||||
|
||||
// Blanket effect for all alcohols
|
||||
if (alcoholPoisonLevel > 0)
|
||||
{
|
||||
// This applies the tipsy eyes effect
|
||||
Player.tipsy = true;
|
||||
|
||||
// This one is checked through a buff so we have to counter that
|
||||
if (!Player.HasBuff(BuffID.Tipsy))
|
||||
Player.fishingSkill += 5;
|
||||
|
||||
}
|
||||
if (alcoholPoisonLevel > (cirrusDress ? 5 : 3))
|
||||
{
|
||||
// Independently of Calamity's nerfs to Nebula life regen, it is disabled entirely by alcohol poisoning.
|
||||
@@ -701,7 +642,7 @@ namespace CalamityMod.CalPlayer
|
||||
for (int l = 0; l < Player.MaxBuffs; l++)
|
||||
{
|
||||
int hasBuff = Player.buffType[l];
|
||||
lesserEffect = AlcoholsList.List.Contains(hasBuff);
|
||||
lesserEffect = AlcoholsDict.TryGet(hasBuff, out var a);
|
||||
}
|
||||
if (Player.lifeRegen < 0)
|
||||
Player.lifeRegen += lesserEffect ? 1 : regenBoost;
|
||||
@@ -834,29 +775,6 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
#endregion
|
||||
|
||||
// The Camper counteracts the regen loss while moving horizontally
|
||||
if (camper && (Player.velocity.X != 0 && Player.grappling[0] <= 0))
|
||||
{
|
||||
// Vanilla base regen rate which gets boosted when resting
|
||||
// The first 6 boosts increment every 300 frames, up to 6 at 1800
|
||||
// Then, the last 3 boosts increment every 600 frames, up to 9 at 3600 which is the cap
|
||||
int baseRegenRate = (int)(Math.Clamp(Player.lifeRegenTime / 300f, 0f, 6f) + Math.Clamp((Player.lifeRegenTime - 1800f) / 600f, 0f, 3f));
|
||||
// Normally 1.25 while resting and 0.5 while not
|
||||
Player.lifeRegen += (int)(baseRegenRate * 0.75f);
|
||||
|
||||
if (Main.rand.Next(30000) < Player.lifeRegenTime || Main.rand.NextBool())
|
||||
{
|
||||
Dust regen = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.HeartCrystal, 0f, 0f, 200, Color.OrangeRed, 1f);
|
||||
regen.noGravity = true;
|
||||
regen.fadeIn = 1.3f;
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 50f, 100f, 0.04f);
|
||||
regen.velocity = velocity;
|
||||
velocity.Normalize();
|
||||
velocity *= 34f;
|
||||
regen.position = Player.Center - velocity;
|
||||
}
|
||||
}
|
||||
|
||||
// Life regen soft cap.
|
||||
if (Player.statLife < actualMaxLife)
|
||||
{
|
||||
@@ -929,5 +847,27 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
public override void NaturalLifeRegen(ref float regen)
|
||||
{
|
||||
// The Camper counteracts the regen loss while moving horizontally
|
||||
if (camper && (Player.velocity.X != 0 && Player.grappling[0] <= 0))
|
||||
{
|
||||
// Normally 1.25 while resting and 0.5 while not so we apply this cancelling multiplier
|
||||
regen *= 2.5f;
|
||||
|
||||
if (Main.rand.Next(30000) < Player.lifeRegenTime || Main.rand.NextBool())
|
||||
{
|
||||
Dust heart = Dust.NewDustDirect(Player.position, Player.width, Player.height, DustID.HeartCrystal, 0f, 0f, 200, Color.OrangeRed, 1f);
|
||||
heart.noGravity = true;
|
||||
heart.fadeIn = 1.3f;
|
||||
Vector2 velocity = CalamityUtils.RandomVelocity(100f, 50f, 100f, 0.04f);
|
||||
heart.velocity = velocity;
|
||||
velocity.Normalize();
|
||||
velocity *= 34f;
|
||||
heart.position = Player.Center - velocity;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3133,14 +3133,6 @@ namespace CalamityMod.CalPlayer
|
||||
if (whiteWine)
|
||||
Player.GetDamage<MagicDamageClass>() += WhiteWine.MagicDamageBoost;
|
||||
|
||||
// Adjustment to the Tipsy debuff
|
||||
if (Player.tipsy)
|
||||
{
|
||||
Player.statDefense += 4;
|
||||
Player.GetCritChance<MeleeDamageClass>() -= 2;
|
||||
Player.GetAttackSpeed<MeleeDamageClass>() -= 0.1f;
|
||||
}
|
||||
|
||||
if (giantPearl)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
@@ -3150,7 +3142,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (npc.friendly || npc.dontTakeDamage)
|
||||
continue;
|
||||
float distance = (npc.Center - Player.Center).Length();
|
||||
if (distance < 120f)
|
||||
if (distance < GiantPearl.AuraRadius)
|
||||
npc.AddBuff(ModContent.BuffType<PearlAura>(), 20, false);
|
||||
}
|
||||
}
|
||||
@@ -4413,7 +4405,7 @@ namespace CalamityMod.CalPlayer
|
||||
Player.statDefense -= (int)(Player.statDefense * WhiteWine.DefenseLossPercent);
|
||||
}
|
||||
|
||||
if (Player.tipsy)
|
||||
if (Player.HasBuff(BuffID.Tipsy))
|
||||
{
|
||||
if (Player.statDefense > 0)
|
||||
Player.statDefense -= (int)(Player.statDefense * 0.05);
|
||||
|
||||
@@ -12,6 +12,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public class GiantPearl : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public const float AuraRadius = 120f;
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 42;
|
||||
@@ -38,19 +39,23 @@ namespace CalamityMod.Items.Accessories
|
||||
if (currentNPCDist < npcDistCompare)
|
||||
npcDistCompare = currentNPCDist;
|
||||
}
|
||||
float opacity = Utils.Remap(npcDistCompare, 120f, 640f, 1f, 0f);
|
||||
float opacity = Utils.Remap(npcDistCompare, AuraRadius, AuraRadius * 5f, 1f, 0f);
|
||||
|
||||
if (opacity > 0.7f)
|
||||
if (opacity >= 1f)
|
||||
{
|
||||
for (int d = 0; d < 3; d++)
|
||||
for (int d = 0; d < 2; d++)
|
||||
{
|
||||
Vector2 bubbleSpawn = player.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi) * 120f;
|
||||
GenericBubbleParticle bubble = new(bubbleSpawn, Main.rand.NextVector2CircularEdge(0.75f, 0.75f), 0.3f, Main.rand.NextFloat(MathHelper.TwoPi), 8);
|
||||
GeneralParticleHandler.SpawnParticle(bubble);
|
||||
WaterGlobParticle water = new(player.Center, Main.rand.NextVector2CircularEdge(13.5f, 13.5f), 0.32f, 0f, 35);
|
||||
GeneralParticleHandler.SpawnParticle(water);
|
||||
}
|
||||
}
|
||||
|
||||
CustomPulse auraVisual = new(player.Center, Vector2.Zero, new Color(75, 164, 191), "CalamityMod/Particles/HighResFoggyCircleHardEdge", Vector2.One, 0f, 0.12f, 0.1175f, 3, true, opacity);
|
||||
SemiCircularSmearFade smearBorder = new(player.Center, player.velocity, new Color(75, 164, 191) * opacity, player.miscCounter * (MathHelper.Pi / 30f), AuraRadius * 0.01125f, Vector2.One, 2, true);
|
||||
GeneralParticleHandler.SpawnParticle(smearBorder);
|
||||
smearBorder = new(player.Center, player.velocity, new Color(75, 164, 191) * opacity, player.miscCounter * (MathHelper.Pi / 30f) + MathHelper.Pi, AuraRadius * 0.01125f, Vector2.One, 2, true);
|
||||
GeneralParticleHandler.SpawnParticle(smearBorder);
|
||||
|
||||
CustomPulse auraVisual = new(player.Center, player.velocity, new Color(75, 164, 191), "CalamityMod/Particles/BloomRing", Vector2.One, 0f, AuraRadius * 0.0105f, AuraRadius * 0.0105f, 2, true, opacity, false);
|
||||
GeneralParticleHandler.SpawnParticle(auraVisual);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using CalamityMod.CalPlayer.Dashes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
@@ -35,6 +36,12 @@ namespace CalamityMod.Items.Accessories
|
||||
player.Calamity().DashID = StatisNinjaBeltDash.ID;
|
||||
player.spikedBoots = 2;
|
||||
player.accFlipper = true;
|
||||
player.hasMagiluminescence = true;
|
||||
|
||||
player.MountedCenter.ToTileCoordinates();
|
||||
DelegateMethods.v3_1 = new Vector3(0.8f, 0.5f, 1f);
|
||||
Utils.PlotTileLine(player.Center, player.Center + player.velocity * 6f, 20f, DelegateMethods.CastLightOpen);
|
||||
Utils.PlotTileLine(player.Left, player.Right, 20f, DelegateMethods.CastLightOpen);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
@@ -44,6 +51,7 @@ namespace CalamityMod.Items.Accessories
|
||||
CreateRecipe().
|
||||
AddIngredient(ItemID.MasterNinjaGear).
|
||||
AddIngredient(ItemID.FrogFlipper).
|
||||
AddIngredient(ItemID.Magiluminescence).
|
||||
AddIngredient<PurifiedGel>(50).
|
||||
AddIngredient<Necroplasm>(5).
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
@@ -53,6 +61,7 @@ namespace CalamityMod.Items.Accessories
|
||||
AddIngredient(ItemID.Tabi).
|
||||
AddIngredient(ItemID.BlackBelt).
|
||||
AddIngredient(ItemID.FrogGear).
|
||||
AddIngredient(ItemID.Magiluminescence).
|
||||
AddIngredient<PurifiedGel>(50).
|
||||
AddIngredient<Necroplasm>(5).
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
|
||||
@@ -43,6 +43,12 @@ namespace CalamityMod.Items.Accessories
|
||||
player.dashType = 0;
|
||||
player.spikedBoots = 2;
|
||||
player.accFlipper = true;
|
||||
player.hasMagiluminescence = true;
|
||||
|
||||
player.MountedCenter.ToTileCoordinates();
|
||||
DelegateMethods.v3_1 = new Vector3(0.8f, 0.5f, 1f);
|
||||
Utils.PlotTileLine(player.Center, player.Center + player.velocity * 6f, 20f, DelegateMethods.CastLightOpen);
|
||||
Utils.PlotTileLine(player.Left, player.Right, 20f, DelegateMethods.CastLightOpen);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -474,15 +474,10 @@ namespace CalamityMod.Items
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item20, player.Center);
|
||||
float spread = 60f * 0.0174f;
|
||||
double startAngle = Math.Atan2(player.velocity.X, player.velocity.Y) - spread / 2;
|
||||
double deltaAngle = spread / 6f;
|
||||
double offsetAngle;
|
||||
for (int i = 0; i < 3; i++)
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 30f * i;
|
||||
Projectile.NewProjectile(playerSource, player.Center.X, player.Center.Y, (float)(Math.Sin(offsetAngle) * 5f), (float)(Math.Cos(offsetAngle) * 5f), flareID, flareDamage, 1f, player.whoAmI);
|
||||
Projectile.NewProjectile(playerSource, player.Center.X, player.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f), flareID, flareDamage, 1f, player.whoAmI);
|
||||
Vector2 circleVel = (MathHelper.TwoPi * i / 6f + velocity.ToRotation()).ToRotationVector2() * 5f;
|
||||
Projectile.NewProjectile(playerSource, player.Center, circleVel, flareID, flareDamage, 1f, player.whoAmI);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace CalamityMod.Items
|
||||
{ ItemID.AquaScepter, Do(DamageRatio(0.9f)) }, // Uses ratios due to remix seed
|
||||
{ ItemID.Bananarang, Do(DamageExact(76), UseExact(14)) },
|
||||
{ ItemID.BatScepter, Do(DamageExact(50)) },
|
||||
{ ItemID.BeamSword, Do(UseMeleeSpeed, DamageExact(131), UseAnimationExact(40), ShootSpeedExact(23f), KnockbackExact(8)) },
|
||||
{ ItemID.BeamSword, Do(UseMeleeSpeed, DamageExact(131), UseAnimationExact(40), KnockbackExact(8)) },
|
||||
{ ItemID.BeeGun, Do(DamageExact(11), ManaExact(4)) },
|
||||
{ ItemID.BeeKeeper, Do(UseTurn, DamageExact(32)) },
|
||||
{ ItemID.Beenade, Do(DamageExact(11), UseTimeExact(22), ShootSpeedExact(10f)) },
|
||||
|
||||
@@ -38,16 +38,10 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
float spread = 60f * 0.0174f;
|
||||
double startAngle = Math.Atan2(velocity.X, velocity.Y) - spread / 2;
|
||||
double deltaAngle = spread / 6f;
|
||||
double offsetAngle;
|
||||
int i;
|
||||
for (i = 0; i < 3; i++)
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
offsetAngle = startAngle + deltaAngle * (i + i * i) / 2f + 32f * i;
|
||||
Projectile.NewProjectile(source, player.Center.X, player.Center.Y, (float)(Math.Sin(offsetAngle) * 2f), (float)(Math.Cos(offsetAngle) * 2f), type, damage, knockback, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(source, player.Center.X, player.Center.Y, (float)(-Math.Sin(offsetAngle) * 2f), (float)(-Math.Cos(offsetAngle) * 2f), type, damage, knockback, Main.myPlayer, 0f, 0f);
|
||||
Vector2 circleVel = (MathHelper.TwoPi * i / 6f + velocity.ToRotation()).ToRotationVector2() * 2.2f;
|
||||
Projectile.NewProjectile(source, player.Center, circleVel, type, damage, knockback, Main.myPlayer);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -29,17 +29,17 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public static float NeedleDamageMultiplier = 0.7f; //Damage on the non-homing needle projectile
|
||||
public static float MaxThrowReach = 760;
|
||||
public static float snapDamageMultiplier = 1.2f; //Extra damage from making the scissors snap
|
||||
public static float SnapDamageMultiplier = 1.2f; //Extra damage from making the scissors snap
|
||||
|
||||
public static float MaxCharge = 15f; // Maximum charge value AKA how much charge you get from a parry
|
||||
public static float chargeDamageMultiplier = 1.35f; //Extra damage from charge
|
||||
public static float chainDamageMultiplier = 0.1f;
|
||||
public static float SnapBoltsDamageMultiplier = 0.1f;
|
||||
|
||||
public static float blastDamageMultiplier = 0.5f; //Damage multiplier applied ontop of the charge damage multiplier mutliplied by the amount of charges consumed. So if you consume 5 charges, the blast will get multiplied by 5 times the damage multiplier
|
||||
public static float BlastDamageMultiplier = 2f; //Damage multiplier for the blast attack
|
||||
public static float BlastBoltsDamageMultiplier = 0.2f;
|
||||
|
||||
public static float SwirlBoltAmount = 6f; //The amount of cosmic bolts produced during hte swirl attack
|
||||
public static float SwirlBoltAmount = 6f; //The amount of cosmic bolts produced during the swirl attack
|
||||
public static float SwirlBoltDamageMultiplier = 0.7f; //This is the damage multiplier for ALL THE BOLTS: Aka, said damage multiplier is divided by the amount of bolts in a swirl and the full damage multiplier is gotten if you hit all the bolts
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
@@ -138,7 +138,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
// Fire the super blast, then set charge back to zero.
|
||||
float angle = velocity.ToRotation();
|
||||
Projectile.NewProjectile(source, player.Center + angle.ToRotationVector2() * 90f, velocity, ProjectileType<ArkoftheCosmosBlast>(), (int)(damage * Charge * chargeDamageMultiplier * blastDamageMultiplier), 0, player.whoAmI, Charge);
|
||||
Projectile.NewProjectile(source, player.Center + angle.ToRotationVector2() * 90f, velocity, ProjectileType<ArkoftheCosmosBlast>(), (int)(damage * BlastDamageMultiplier), 0, player.whoAmI, Charge);
|
||||
Charge = 0;
|
||||
|
||||
// If the parry holdout has existed for very few frames and hasn't parried something, just delete it.
|
||||
|
||||
@@ -310,7 +310,7 @@ BlazingCore: {
|
||||
The searing core of the Profaned Goddess
|
||||
Pressing [KEY] will activate a parry, encasing you in luminous profaned crystal
|
||||
Being hit shortly after encasement will shatter the crystal
|
||||
Upon shattering, holy stars spiral outwards and you only take 1 damage
|
||||
Upon shattering, holy stars spiral outwards and damage taken is negated
|
||||
After shattering, this damage reduction effect goes on cooldown
|
||||
Damage parried whilst on cooldown summons additional healing stars, and will not be reduced
|
||||
{$Common.AbyssLightLevel2}
|
||||
@@ -840,7 +840,7 @@ GiantPearl: {
|
||||
'''
|
||||
You have a light aura around you
|
||||
Enemies within the aura are slowed down
|
||||
You release homing prism shards while an enemy is slowed
|
||||
Enemies that remain within the aura are bombarded by homing prism shards
|
||||
{$Common.AbyssLightLevel1}
|
||||
'''
|
||||
}
|
||||
@@ -1649,7 +1649,11 @@ StatisNinjaBelt: {
|
||||
Tooltip:
|
||||
'''
|
||||
32% increased jump speed, allows auto-jump, and negates fall damage
|
||||
Increases movement acceleration and deceleration by 1.75x
|
||||
Increases movement speed by 1.15x. This bonus applies to running boot accessories
|
||||
Grants the ability to swim, climb walls, dash, and dodge attacks
|
||||
Provides light when worn
|
||||
{$Common.AbyssLightLevel1}
|
||||
'''
|
||||
HoldShiftTooltip:
|
||||
'''
|
||||
@@ -1664,8 +1668,12 @@ StatisVoidSash: {
|
||||
Tooltip:
|
||||
'''
|
||||
32% increased jump speed, allows auto-jump, and negates fall damage
|
||||
Increases movement acceleration and deceleration by 1.75x
|
||||
Increases movement speed by 1.15x. This bonus applies to running boot accessories
|
||||
Grants the ability to swim, climb walls, dash, and dodge attacks
|
||||
Dashes leave homing scythes in your wake
|
||||
Provides light when worn
|
||||
{$Common.AbyssLightLevel1}
|
||||
'''
|
||||
HoldShiftTooltip:
|
||||
'''
|
||||
@@ -1855,7 +1863,7 @@ TheEvolution: {
|
||||
DisplayName: The Evolution
|
||||
Tooltip:
|
||||
'''
|
||||
Reflects projectiles that hit you, reducing their damage to 1 and dealing 10x damage to enemies
|
||||
Reflects projectiles that hit you, negating their damage and dealing 10x damage to enemies
|
||||
Projectiles that deal less than 5% of your max life in damage will not be reflected
|
||||
The reflect has a cooldown that ranges between 15 and 90 seconds depending on the reflected projectile's damage
|
||||
This cooldown is shared with all other dodges and reflects
|
||||
|
||||
@@ -88,7 +88,7 @@ ArkoftheCosmos: {
|
||||
'''
|
||||
<right> to snip out the scissor blades in front of you
|
||||
Hitting an enemy with it will parry them, granting you brief invulnerability
|
||||
You can parry projectiles to make them deal 160 less damage for a short period
|
||||
You can also parry projectiles to make them deal 160 less damage for a short period
|
||||
Parrying will empower the next 15 swings of the sword
|
||||
'''
|
||||
BlastInfo: Double <right> with charges available to cause a Big Rip in spacetime and consume all charges
|
||||
|
||||
@@ -5488,9 +5488,6 @@ namespace CalamityMod.NPCs
|
||||
npc.ai[3] = 0f;
|
||||
}
|
||||
|
||||
// Incremement Giant Pearl's pearl shard counter
|
||||
pearlAuraCounter++;
|
||||
|
||||
// Debuff decrements
|
||||
if (debuffResistanceTimer > 0)
|
||||
debuffResistanceTimer--;
|
||||
@@ -5719,13 +5716,29 @@ namespace CalamityMod.NPCs
|
||||
|
||||
// Pearl Aura shard spawning
|
||||
// Slowing is handled in the general slowing code below
|
||||
if (pearlAura > 0 && pearlAuraCounter % 12 == 0)
|
||||
if (pearlAura > 0)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item49, Main.LocalPlayer.Center);
|
||||
Vector2 shardVel = Vector2.UnitX.RotatedByRandom(MathHelper.Pi) * 7.5f;
|
||||
int damage = 20;
|
||||
Projectile.NewProjectile(npc.GetSource_FromThis(), Main.LocalPlayer.Center, shardVel, ProjectileType<PearlAuraShard>(), damage, 5f, Main.myPlayer);
|
||||
pearlAuraCounter++;
|
||||
if (pearlAuraCounter >= 45)
|
||||
{
|
||||
pearlAuraCounter = 0;
|
||||
SoundEngine.PlaySound(SoundID.Item49, npc.Center);
|
||||
|
||||
// Prevent things from getting too crazy
|
||||
if (CalamityUtils.CountProjectiles(ProjectileType<PearlAuraShard>()) <= 3)
|
||||
{
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
Vector2 shardPos = npc.Center + new Vector2(Main.rand.NextFloat(-100f, 100f), Main.rand.NextFloat(-500f, -650f));
|
||||
Vector2 shardVel = Vector2.Normalize(npc.Center - shardPos).RotatedByRandom(MathHelper.Pi / 55f) * 20f;
|
||||
int damage = 20;
|
||||
Projectile.NewProjectile(npc.GetSource_FromThis(), shardPos, shardVel, ProjectileType<PearlAuraShard>(), damage, 5f, Main.myPlayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
pearlAuraCounter = 0;
|
||||
|
||||
// Queen Bee is completely immune to having her movement impaired if not in a high difficulty mode.
|
||||
if (npc.type == NPCID.QueenBee && !CalamityWorld.revenge && !BossRushEvent.BossRushActive)
|
||||
|
||||
@@ -2929,6 +2929,9 @@ namespace CalamityMod.NPCs.Providence
|
||||
// Shortcut function for applying Burden Breaker-like negative healing to GFB Providence
|
||||
public static void ApplyGFBDamage(Projectile proj, int BaseDuration, int NegativeHealValue)
|
||||
{
|
||||
if (!Main.zenithWorld)
|
||||
return;
|
||||
|
||||
int index = Player.FindClosest(proj.position, proj.width, proj.height);
|
||||
Player player = Main.player[index];
|
||||
if (player is null)
|
||||
|
||||
@@ -157,12 +157,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas
|
||||
Main.instance.DrawCacheNPCsBehindNonSolidTiles.Add(index);
|
||||
}
|
||||
|
||||
public override void ModifyHitByProjectile(Projectile projectile, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
if (projectile.type == ModContent.ProjectileType<CelestusMiniScythe>())
|
||||
modifiers.SourceDamage *= 0.66f;
|
||||
}
|
||||
|
||||
public override bool CheckActive() => false;
|
||||
}
|
||||
}
|
||||
@@ -20,10 +20,11 @@ namespace CalamityMod.Particles
|
||||
private float FinalScale;
|
||||
private float BaseOpacity;
|
||||
private float opacity;
|
||||
private bool FadeOut;
|
||||
private Vector2 Squish;
|
||||
private Color BaseColor;
|
||||
|
||||
public CustomPulse(Vector2 position, Vector2 velocity, Color color, string texture, Vector2 squish, float rotation, float originalScale, float finalScale, int lifeTime, bool UseAdditiveBlend = true, float baseOpacity = 1f)
|
||||
public CustomPulse(Vector2 position, Vector2 velocity, Color color, string texture, Vector2 squish, float rotation, float originalScale, float finalScale, int lifeTime, bool UseAdditiveBlend = true, float baseOpacity = 1f, bool fade = true)
|
||||
{
|
||||
Position = position;
|
||||
Velocity = velocity;
|
||||
@@ -34,6 +35,7 @@ namespace CalamityMod.Particles
|
||||
Scale = originalScale;
|
||||
Lifetime = lifeTime;
|
||||
BaseOpacity = baseOpacity;
|
||||
FadeOut = fade;
|
||||
Squish = squish;
|
||||
Rotation = rotation;
|
||||
UseAltVisual = UseAdditiveBlend;
|
||||
@@ -44,7 +46,7 @@ namespace CalamityMod.Particles
|
||||
float pulseProgress = PiecewiseAnimation(LifetimeCompletion, new CurveSegment[] { new CurveSegment(EasingType.PolyOut, 0f, 0f, 1f, 4) });
|
||||
Scale = MathHelper.Lerp(OriginalScale, FinalScale, pulseProgress);
|
||||
|
||||
opacity = (float)Math.Sin(MathHelper.PiOver2 + LifetimeCompletion * MathHelper.PiOver2) * BaseOpacity;
|
||||
opacity = (FadeOut ? (float)Math.Sin(MathHelper.PiOver2 + LifetimeCompletion * MathHelper.PiOver2) : 1f) * BaseOpacity;
|
||||
|
||||
Color = BaseColor * opacity;
|
||||
Lighting.AddLight(Position, Color.R / 255f, Color.G / 255f, Color.B / 255f);
|
||||
|
||||
@@ -3431,9 +3431,6 @@ namespace CalamityMod.Projectiles
|
||||
//
|
||||
//if (modPlayer.deadshotBrooch && projectile.CountsAsClass<RangedDamageClass>() && player.heldProj != projectile.whoAmI)
|
||||
|
||||
if (modPlayer.camper && !player.StandingStill())
|
||||
projectile.damage = (int)(projectile.damage * 0.1);
|
||||
|
||||
if ((projectile.minion || ProjectileID.Sets.MinionShot[projectile.type] || projectile.sentry || ProjectileID.Sets.SentryShot[projectile.type]) && (player.ownedProjectileCounts[ModContent.ProjectileType<RelicOfDeliveranceSpear>()] > 0 || player.ownedProjectileCounts[ModContent.ProjectileType<RelicOfConvergenceCrystal>()] > 0))
|
||||
projectile.damage = (int)(projectile.damage * 0.1);
|
||||
|
||||
|
||||
@@ -205,7 +205,7 @@ namespace CalamityMod.Projectiles
|
||||
{ ProjectileID.StardustDrill, standardDrillTweaks },
|
||||
{ ProjectileID.StarWrath, Do(NoPiercing) },
|
||||
{ ProjectileID.Sunfury, Do(ExtraUpdatesExact(1)) },
|
||||
{ ProjectileID.SwordBeam, Do(ExtraUpdatesExact(1)) }, // Beam Sword projectile
|
||||
{ ProjectileID.SwordBeam, Do(ExtraUpdatesExact(2)) }, // Beam Sword projectile
|
||||
{ ProjectileID.Terragrim, Do(TrueMeleeNoSpeed, ScaleExact(1.25f)) },
|
||||
{ ProjectileID.ThunderStaffShot, Do(PiercingExact(3)) }, //Thunder Zapper projectile
|
||||
{ ProjectileID.TitaniumChainsaw, standardChainsawTweaks },
|
||||
|
||||
@@ -414,7 +414,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
if (Combo == 3f)
|
||||
modifiers.SourceDamage *= ArkoftheElements.snapDamageMultiplier;
|
||||
modifiers.SourceDamage *= ArkoftheCosmos.SnapDamageMultiplier;
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
|
||||
@@ -159,18 +159,28 @@ namespace CalamityMod.Projectiles.Melee
|
||||
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Particle mist = new MediumMistParticle(Owner.Center + direction * 40 + Main.rand.NextVector2Circular(30f, 30f), Vector2.Zero, new Color(172, 238, 255), new Color(145, 170, 188), Main.rand.NextFloat(0.5f, 1.5f), 245 - Main.rand.Next(50), 0.02f);
|
||||
Color initialColor = Color.Lerp(new Color(172, 238, 255), new Color(230, 172, 255), Main.rand.NextFloat(1f));;
|
||||
Particle mist = new MediumMistParticle(Owner.Center + direction * 40 + Main.rand.NextVector2Circular(30f, 30f), Vector2.Zero, initialColor, new Color(145, 170, 188), Main.rand.NextFloat(0.5f, 1.5f), 245 - Main.rand.Next(50), 0.02f);
|
||||
mist.Velocity = (mist.Position - Owner.Center) * 0.2f + Owner.velocity;
|
||||
GeneralParticleHandler.SpawnParticle(mist);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else if (Main.rand.NextFloat(0f, 1f) > 0.75f)
|
||||
else if (Main.rand.NextFloat(0f, 1f) > 0.6f)
|
||||
{
|
||||
Vector2 particlePosition = Owner.Center + (rotation.ToRotationVector2() * 100f * Projectile.scale);
|
||||
Particle snowflake = new SnowflakeSparkle(particlePosition, rotation.ToRotationVector2() * 3f, Color.White, new Color(75, 177, 250), Main.rand.NextFloat(0.3f, 1.5f), 40, 0.5f);
|
||||
GeneralParticleHandler.SpawnParticle(snowflake);
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Particle snowflake = new SnowflakeSparkle(particlePosition, rotation.ToRotationVector2() * 3f, Color.White, new Color(75, 177, 250), Main.rand.NextFloat(0.3f, 1.5f), 40, 0.5f);
|
||||
GeneralParticleHandler.SpawnParticle(snowflake);
|
||||
}
|
||||
else
|
||||
{
|
||||
float scale = Main.rand.NextFloat(0.5f, 1.8f);
|
||||
Particle star = new CritSpark(particlePosition, rotation.ToRotationVector2() * 3f, Color.White, Color.Indigo, scale, 30, 0.5f, scale * 2f);
|
||||
GeneralParticleHandler.SpawnParticle(star);
|
||||
}
|
||||
}
|
||||
|
||||
//Make the owner look like theyre holding the sword bla bla
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ModLoader;
|
||||
using static Terraria.ModLoader.ModContent;
|
||||
|
||||
@@ -13,10 +14,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
public override string Texture => "CalamityMod/Particles/MediumMist";
|
||||
public Player Owner => Main.player[Projectile.owner];
|
||||
public Color mistColor;
|
||||
public int variant = -1;
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
}
|
||||
public int variant = 0;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.DamageType = DamageClass.Melee;
|
||||
@@ -32,20 +31,31 @@ namespace CalamityMod.Projectiles.Melee
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
|
||||
{
|
||||
Vector2 size = Projectile.Size * Projectile.scale;
|
||||
|
||||
return Collision.CheckAABBvAABBCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Projectile.Center - size / 2f, size);
|
||||
}
|
||||
|
||||
public override void OnSpawn(IEntitySource source)
|
||||
{
|
||||
mistColor = Main.hslToRgb(Main.rand.NextFloat(0.5f, 0.8f), 1f, 0.8f);
|
||||
variant = Main.rand.Next(3);
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (variant == -1)
|
||||
variant = Main.rand.Next(3);
|
||||
|
||||
if (Main.rand.NextBool(15)&& Projectile.alpha <= 140) //only try to spawn your particles if you're not close to dying
|
||||
{
|
||||
Vector2 particlePosition = Projectile.Center + Main.rand.NextVector2Circular(Projectile.width * Projectile.scale * 0.5f, Projectile.height * Projectile.scale * 0.5f);
|
||||
Particle snowflake = new SnowflakeSparkle(particlePosition, Vector2.Zero, Color.White, new Color(75, 177, 250), Main.rand.NextFloat(0.3f, 1.5f), 40, 0.5f);
|
||||
GeneralParticleHandler.SpawnParticle(snowflake);
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Particle snowflake = new SnowflakeSparkle(particlePosition, Vector2.Zero, Color.White, new Color(75, 177, 250), Main.rand.NextFloat(0.3f, 1.5f), 40, 0.5f);
|
||||
GeneralParticleHandler.SpawnParticle(snowflake);
|
||||
}
|
||||
else
|
||||
{
|
||||
float scale = Main.rand.NextFloat(0.5f, 1.8f);
|
||||
Particle star = new CritSpark(particlePosition, Vector2.Zero, Color.White, Color.Indigo, scale, 30, 0.5f, scale * 2f);
|
||||
GeneralParticleHandler.SpawnParticle(star);
|
||||
}
|
||||
}
|
||||
|
||||
Projectile.velocity *= 0.85f;
|
||||
@@ -64,11 +74,8 @@ namespace CalamityMod.Projectiles.Melee
|
||||
}
|
||||
if (Projectile.alpha >= 170)
|
||||
Projectile.Kill();
|
||||
|
||||
mistColor = Color.Lerp(new Color(172, 238, 255), new Color(145, 170, 188), MathHelper.Clamp((float)(Projectile.alpha - 100) / 80, 0f, 1f)) * (255 - Projectile.alpha / 255f);
|
||||
}
|
||||
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Main.spriteBatch.EnterShaderRegion(BlendState.Additive);
|
||||
|
||||
@@ -168,8 +168,17 @@ namespace CalamityMod.Projectiles.Melee
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Owner.Center + direction * 40, rotation.ToRotationVector2() * 5, ProjectileType<BitingEmbraceMist>(), (int)(Projectile.damage * TrueBiomeBlade.ColdAttunement_MistDamageReduction), 0f, Owner.whoAmI);
|
||||
|
||||
Vector2 particlePosition = Owner.Center + (rotation.ToRotationVector2() * 100f * Projectile.scale);
|
||||
Particle snowflake = new SnowflakeSparkle(particlePosition, rotation.ToRotationVector2() * 3f, Color.White, new Color(75, 177, 250), Main.rand.NextFloat(0.3f, 1.5f), 40, 0.5f);
|
||||
GeneralParticleHandler.SpawnParticle(snowflake);
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Particle snowflake = new SnowflakeSparkle(particlePosition, rotation.ToRotationVector2() * 3f, Color.White, new Color(75, 177, 250), Main.rand.NextFloat(0.3f, 1.5f), 40, 0.5f);
|
||||
GeneralParticleHandler.SpawnParticle(snowflake);
|
||||
}
|
||||
else
|
||||
{
|
||||
float scale = Main.rand.NextFloat(0.5f, 1.8f);
|
||||
Particle star = new CritSpark(particlePosition, rotation.ToRotationVector2() * 3f, Color.White, Color.Indigo, scale, 30, 0.5f, scale * 2f);
|
||||
GeneralParticleHandler.SpawnParticle(star);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,17 +16,17 @@ namespace CalamityMod.Projectiles.Typeless
|
||||
Projectile.height = 14;
|
||||
Projectile.friendly = true;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.timeLeft = 220;
|
||||
Projectile.timeLeft = 150;
|
||||
Projectile.tileCollide = false;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (Projectile.timeLeft < 210)
|
||||
if (Projectile.timeLeft < 140)
|
||||
CalamityUtils.HomeInOnNPC(Projectile, true, 200f, 10f, 20f);
|
||||
|
||||
Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0f / 255f, (255 - Projectile.alpha) * 0.2f / 255f, (255 - Projectile.alpha) * 0.2f / 255f);
|
||||
Projectile.rotation += Projectile.velocity.X * 1.25f;
|
||||
Projectile.rotation = Projectile.velocity.ToRotation() - (MathHelper.PiOver2 * Projectile.spriteDirection);
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Flare_Blue, 0f, 0f, 100, default, 0.6f);
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using static Terraria.ModLoader.ModContent;
|
||||
|
||||
namespace CalamityMod.Systems.Collections
|
||||
{
|
||||
/// <summary>
|
||||
/// A <see cref="ModSystem"/> that contains a <see cref="IDictionary{T}"/> of all alcohol buff's IDs and their corresponding poison level.
|
||||
/// </summary>
|
||||
public sealed class AlcoholsDict : ModSystem
|
||||
{
|
||||
public static IDictionary<int, int> Dict { get; private set; }
|
||||
|
||||
public override void OnModLoad()
|
||||
{
|
||||
Dict = new Dictionary<int, int>
|
||||
{
|
||||
{ BuffID.Tipsy, 1 },
|
||||
{ BuffType<BloodyMaryBuff>(), 1 },
|
||||
{ BuffType<CaribbeanRumBuff>(), 1 },
|
||||
{ BuffType<CinnamonRollBuff>(), 1 },
|
||||
{ BuffType<EverclearBuff>(), 2 },
|
||||
{ BuffType<EvergreenGinBuff>(), 1 },
|
||||
{ BuffType<FireballBuff>(), 1 },
|
||||
{ BuffType<GrapeBeerBuff>(), 1 },
|
||||
{ BuffType<MargaritaBuff>(), 1 },
|
||||
{ BuffType<MoonshineBuff>(), 1 },
|
||||
{ BuffType<MoscowMuleBuff>(), 1 },
|
||||
{ BuffType<OldFashionedBuff>(), 1 },
|
||||
{ BuffType<RedWineBuff>(), 1 },
|
||||
{ BuffType<RumBuff>(), 1 },
|
||||
{ BuffType<ScrewdriverBuff>(), 1 },
|
||||
{ BuffType<StarBeamRyeBuff>(), 1 },
|
||||
{ BuffType<TequilaBuff>(), 1 },
|
||||
{ BuffType<TequilaSunriseBuff>(), 1 },
|
||||
{ BuffType<VodkaBuff>(), 1 },
|
||||
{ BuffType<WhiskeyBuff>(), 1 },
|
||||
{ BuffType<WhiteWineBuff>(), 1 }
|
||||
};
|
||||
}
|
||||
|
||||
public override void Unload()
|
||||
{
|
||||
Dict?.Clear();
|
||||
Dict = null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A shorthand method to obtain an alcohol buff's poison level from its buff ID.
|
||||
/// </summary>
|
||||
public static bool TryGet(int buffType, out int poisonLevel)
|
||||
{
|
||||
return Dict.TryGetValue(buffType, out poisonLevel);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.Buffs.Alcohol;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using static Terraria.ModLoader.ModContent;
|
||||
|
||||
namespace CalamityMod.Systems.Collections
|
||||
{
|
||||
/// <summary>
|
||||
/// A <see cref="ModSystem"/> that contains a <see cref="IList{T}"/> of all alcohol buff's IDs.
|
||||
/// </summary>
|
||||
public sealed class AlcoholsList : ModSystem
|
||||
{
|
||||
public static IList<int> List { get; private set; }
|
||||
|
||||
public override void OnModLoad()
|
||||
{
|
||||
List =
|
||||
[
|
||||
BuffID.Tipsy,
|
||||
BuffType<BloodyMaryBuff>(),
|
||||
BuffType<CaribbeanRumBuff>(),
|
||||
BuffType<CinnamonRollBuff>(),
|
||||
BuffType<EverclearBuff>(),
|
||||
BuffType<EvergreenGinBuff>(),
|
||||
BuffType<FireballBuff>(),
|
||||
BuffType<GrapeBeerBuff>(),
|
||||
BuffType<MargaritaBuff>(),
|
||||
BuffType<MoonshineBuff>(),
|
||||
BuffType<MoscowMuleBuff>(),
|
||||
BuffType<OldFashionedBuff>(),
|
||||
BuffType<RedWineBuff>(),
|
||||
BuffType<RumBuff>(),
|
||||
BuffType<ScrewdriverBuff>(),
|
||||
BuffType<StarBeamRyeBuff>(),
|
||||
BuffType<TequilaBuff>(),
|
||||
BuffType<TequilaSunriseBuff>(),
|
||||
BuffType<VodkaBuff>(),
|
||||
BuffType<WhiskeyBuff>(),
|
||||
BuffType<WhiteWineBuff>()
|
||||
];
|
||||
}
|
||||
|
||||
public override void Unload() => List = null;
|
||||
|
||||
/// <summary>
|
||||
/// A shorthand method to check whether or not a buff ID is an alcohol.
|
||||
/// </summary>
|
||||
public static bool Includes(int buffID) => List.Contains(buffID);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
using System;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.Drawing;
|
||||
using Terraria.GameContent.Metadata;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
@@ -29,6 +31,12 @@ namespace CalamityMod.Tiles.Abyss
|
||||
TileMaterials.SetForTileId(Type, TileMaterials._materialsByName["Plant"]);
|
||||
}
|
||||
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
Main.instance.TilesRenderer.CrawlToTopOfVineAndAddSpecialPoint(j, i);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num)
|
||||
{
|
||||
num = fail ? 1 : 3;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.Drawing;
|
||||
using Terraria.GameContent.Metadata;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -21,6 +23,12 @@ namespace CalamityMod.Tiles.Abyss
|
||||
DustType = 2;
|
||||
}
|
||||
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
Main.instance.TilesRenderer.CrawlToTopOfVineAndAddSpecialPoint(j, i);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void NumDust(int i, int j, bool fail, ref int num)
|
||||
{
|
||||
num = fail ? 1 : 3;
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
using System;
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent.Drawing;
|
||||
using Terraria.GameContent.Metadata;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
@@ -32,6 +34,12 @@ namespace CalamityMod.Tiles.Astral
|
||||
AddMapEntry(new Color(65, 56, 83));
|
||||
}
|
||||
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch)
|
||||
{
|
||||
Main.instance.TilesRenderer.CrawlToTopOfVineAndAddSpecialPoint(j, i);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void KillTile(int i, int j, ref bool fail, ref bool effectOnly, ref bool noItem)
|
||||
{
|
||||
//GIVE VINE ROPE IF SPECIAL VINE BOOK
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using CalamityMod.Items.Placeables.Furniture;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -16,7 +17,7 @@ namespace CalamityMod.Tiles.Furniture
|
||||
AdjTiles = new int[] { TileID.HangingLanterns, TileID.FireflyinaBottle, TileID.LightningBuginaBottle };
|
||||
}
|
||||
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override void AnimateTile(ref int frame, ref int frameCounter)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.FurnitureAbyss
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpChandelier(ModContent.ItemType<Items.Placeables.FurnitureAbyss.AbyssChandelier>(), true);
|
||||
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Stone, 0f, 0f, 1, new Color(100, 130, 150), 1f);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -8,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureAbyss
|
||||
public class AbyssLantern : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<Items.Placeables.FurnitureAbyss.AbyssLantern>(), true);
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -11,6 +11,8 @@ namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpChandelier(ModContent.ItemType<AcidwoodChandelier>());
|
||||
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.WoodFurniture, 0f, 0f, 1, new Color(255, 255, 255), 1f);
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Tiles.FurnitureAcidwood
|
||||
public class AcidwoodLanternTile : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<AcidwoodLantern>());
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureAncient
|
||||
public class AncientLantern : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<Items.Placeables.FurnitureAncient.AncientLantern>(), true);
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -17,6 +17,8 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
AnimationFrameHeight = 54;
|
||||
}
|
||||
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.RedTorch, 0f, 0f, 1, new Color(255, 255, 255), 1f);
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureAshen
|
||||
public class AshenLantern : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<Items.Placeables.FurnitureAshen.AshenLantern>(), true);
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using CalamityMod.Dusts.Furniture;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.FurnitureBotanic
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpChandelier(ModContent.ItemType<Items.Placeables.FurnitureBotanic.BotanicChandelier>(), true);
|
||||
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, ModContent.DustType<BloomTileGold>(), 0f, 0f, 1, new Color(255, 255, 255), 1f);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using CalamityMod.Dusts.Furniture;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -8,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureBotanic
|
||||
public class BotanicLantern : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<Items.Placeables.FurnitureBotanic.BotanicLantern>(), true);
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.FurnitureCosmilite
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpChandelier(ModContent.ItemType<Items.Placeables.FurnitureCosmilite.CosmiliteChandelier>(), true);
|
||||
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Firework_Blue, 0f, 0f, 1, new Color(255, 255, 255), 1f);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -8,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite
|
||||
public class CosmiliteLantern : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<Items.Placeables.FurnitureCosmilite.CosmiliteLantern>(), true);
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.FurnitureEutrophic
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpChandelier(ModContent.ItemType<Items.Placeables.FurnitureEutrophic.EutrophicChandelier>());
|
||||
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.SnowBlock, 0f, 0f, 1, new Color(54, 69, 72), 1f);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -8,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureEutrophic
|
||||
public class EutrophicLantern : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<Items.Placeables.FurnitureEutrophic.EutrophicLantern>());
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -11,6 +11,8 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpChandelier(ModContent.ItemType<ExoChandelier>(), true);
|
||||
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CanExplode(int i, int j) => false;
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureExo
|
||||
public class ExoLanternTile : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<ExoLantern>(), true);
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CanExplode(int i, int j) => false;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.FurnitureMarnite
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpChandelier(ModContent.ItemType<Items.Placeables.FurnitureMarnite.MarniteChandelier>(), true);
|
||||
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Granite, 0f, 0f, 1, new Color(255, 255, 255), 1f);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -8,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureMarnite
|
||||
public class MarniteLantern : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<Items.Placeables.FurnitureMarnite.MarniteLantern>(), true);
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -10,6 +10,8 @@ namespace CalamityMod.Tiles.FurnitureMonolith
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpChandelier(ModContent.ItemType<Items.Placeables.FurnitureMonolith.MonolithChandelier>(), true);
|
||||
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, ModContent.DustType<AstralBasic>(), 0f, 0f, 1, new Color(255, 255, 255), 1f);
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureMonolith
|
||||
public class MonolithLantern : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<Items.Placeables.FurnitureMonolith.MonolithLantern>(), true);
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using CalamityMod.Dusts.Furniture;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -11,6 +12,8 @@ namespace CalamityMod.Tiles.FurnitureOtherworldly
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpChandelier(ModContent.ItemType<Items.Placeables.FurnitureOtherworldly.OtherworldlyChandelier>(), true);
|
||||
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Stone, 0f, 0f, 1, new Color(125, 94, 128), 1f);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using CalamityMod.Dusts.Furniture;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -10,7 +11,7 @@ namespace CalamityMod.Tiles.FurnitureOtherworldly
|
||||
public class OtherworldlyLantern : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<Items.Placeables.FurnitureOtherworldly.OtherworldlyLantern>(), true);
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.FurniturePlaguedPlate
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpChandelier(ModContent.ItemType<Items.Placeables.FurniturePlagued.PlaguedPlateChandelier>(), true);
|
||||
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.BubbleBurst_Green, 0f, 0f, 1, new Color(255, 255, 255), 1f);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -8,7 +9,7 @@ namespace CalamityMod.Tiles.FurniturePlaguedPlate
|
||||
public class PlaguedPlateLantern : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<Items.Placeables.FurniturePlagued.PlaguedPlateLantern>(), true);
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using CalamityMod.Dusts.Furniture;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -10,6 +11,8 @@ namespace CalamityMod.Tiles.FurnitureProfaned
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpChandelier(ModContent.ItemType<Items.Placeables.FurnitureProfaned.ProfanedChandelier>(), true);
|
||||
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.GoldCoin, 0f, 0f, 1, new Color(255, 255, 255), 1f);
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned
|
||||
public class ProfanedLantern : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<Items.Placeables.FurnitureProfaned.ProfanedLantern>(), true);
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace CalamityMod.Tiles.FurnitureSacrilegious
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileNoAttach[Type] = true;
|
||||
Main.tileLavaDeath[Type] = false;
|
||||
TileID.Sets.MultiTileSway[Type] = true;
|
||||
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style2xX);
|
||||
TileObjectData.newTile.LavaDeath = false;
|
||||
@@ -37,6 +38,6 @@ namespace CalamityMod.Tiles.FurnitureSacrilegious
|
||||
AddMapEntry(new Color(43, 19, 42), Language.GetText("MapObject.Banner"));
|
||||
}
|
||||
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@ namespace CalamityMod.Tiles.FurnitureSacrilegious
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileNoAttach[Type] = true;
|
||||
Main.tileLavaDeath[Type] = false;
|
||||
TileID.Sets.MultiTileSway[Type] = true;
|
||||
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style2xX);
|
||||
TileObjectData.newTile.LavaDeath = false;
|
||||
@@ -37,6 +38,6 @@ namespace CalamityMod.Tiles.FurnitureSacrilegious
|
||||
AddMapEntry(new Color(43, 19, 42), Language.GetText("MapObject.Banner"));
|
||||
}
|
||||
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,8 @@ namespace CalamityMod.Tiles.FurnitureSacrilegious
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpChandelier(ModContent.ItemType<SacrilegiousChandelier>(), true);
|
||||
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.RedTorch, 0f, 0f, 1, new Color(255, 255, 255), 1f);
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureSacrilegious
|
||||
public class SacrilegiousLanternTile : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<SacrilegiousLantern>(), true);
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using CalamityMod.Dusts.Furniture;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -10,6 +11,8 @@ namespace CalamityMod.Tiles.FurnitureSilva
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpChandelier(ModContent.ItemType<Items.Placeables.FurnitureSilva.SilvaChandelier>(), true);
|
||||
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, ModContent.DustType<SilvaTileGold>(), 0f, 0f, 1, new Color(255, 255, 255), 1f);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using CalamityMod.Dusts.Furniture;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,7 +10,7 @@ namespace CalamityMod.Tiles.FurnitureSilva
|
||||
public class SilvaLantern : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<Items.Placeables.FurnitureSilva.SilvaLantern>(), true);
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -10,6 +10,8 @@ namespace CalamityMod.Tiles.FurnitureStatigel
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpChandelier(ModContent.ItemType<Items.Placeables.FurnitureStatigel.StatigelChandelier>());
|
||||
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.PinkSlime, 0f, 0f, 1, new Color(255, 255, 255), 1f);
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStatigel
|
||||
public class StatigelLantern : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<Items.Placeables.FurnitureStatigel.StatigelLantern>());
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -12,6 +12,8 @@ namespace CalamityMod.Tiles.FurnitureStratus
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpChandelier(ModContent.ItemType<Items.Placeables.FurnitureStratus.StratusChandelier>(), true);
|
||||
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Stone, 0f, 0f, 1, new Color(100, 130, 150), 1f);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -8,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureStratus
|
||||
public class StratusLantern : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<Items.Placeables.FurnitureStratus.StratusLantern>(), true);
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -9,6 +10,8 @@ namespace CalamityMod.Tiles.FurnitureVoid
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpChandelier(ModContent.ItemType<Items.Placeables.FurnitureVoid.VoidChandelier>(), true);
|
||||
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.DungeonSpirit, 0f, 0f, 1, new Color(255, 255, 255), 1f);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -8,7 +9,7 @@ namespace CalamityMod.Tiles.FurnitureVoid
|
||||
public class VoidLantern : ModTile
|
||||
{
|
||||
public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType<Items.Placeables.FurnitureVoid.VoidLantern>(), true);
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
{
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace CalamityMod.Tiles.FurnitureWulfrum
|
||||
Main.tileLighted[Type] = true;
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileNoAttach[Type] = true;
|
||||
TileID.Sets.MultiTileSway[Type] = true;
|
||||
TileObjectData.newTile.Width = 3;
|
||||
TileObjectData.newTile.Height = 2;
|
||||
TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16 };
|
||||
@@ -32,6 +33,8 @@ namespace CalamityMod.Tiles.FurnitureWulfrum
|
||||
AdjTiles = new int[] { TileID.Chandeliers };
|
||||
}
|
||||
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CanExplode(int i, int j) => false;
|
||||
|
||||
public override bool CreateDust(int i, int j, ref int type)
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace CalamityMod.Tiles.FurnitureWulfrum
|
||||
AdjTiles = new int[] { TileID.HangingLanterns };
|
||||
}
|
||||
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public override bool CanExplode(int i, int j) => false;
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ namespace CalamityMod.Tiles
|
||||
Main.tileFrameImportant[Type] = true;
|
||||
Main.tileNoAttach[Type] = true;
|
||||
Main.tileLavaDeath[Type] = true;
|
||||
TileID.Sets.MultiTileSway[Type] = true;
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2Top);
|
||||
TileObjectData.newTile.Height = 3;
|
||||
TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16, 16 };
|
||||
@@ -62,7 +63,7 @@ namespace CalamityMod.Tiles
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY);
|
||||
public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) => CalamityUtils.DrawSwayingMultiTile(i, j);
|
||||
|
||||
public static int GetBannerNPC(int style)
|
||||
{
|
||||
|
||||
@@ -934,6 +934,7 @@ namespace CalamityMod
|
||||
Main.tileNoAttach[mt.Type] = true;
|
||||
Main.tileLavaDeath[mt.Type] = !lavaImmune;
|
||||
Main.tileWaterDeath[mt.Type] = false;
|
||||
TileID.Sets.MultiTileSway[mt.Type] = true;
|
||||
TileObjectData.newTile.Width = 3;
|
||||
TileObjectData.newTile.Height = 3;
|
||||
TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16, 16 };
|
||||
@@ -1251,6 +1252,7 @@ namespace CalamityMod
|
||||
Main.tileLavaDeath[mt.Type] = !lavaImmune;
|
||||
Main.tileWaterDeath[mt.Type] = false;
|
||||
TileID.Sets.DisableSmartCursor[mt.Type] = true;
|
||||
TileID.Sets.MultiTileSway[mt.Type] = true;
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style1x2Top);
|
||||
TileObjectData.newTile.LavaDeath = !lavaImmune;
|
||||
TileObjectData.newTile.LavaPlacement = lavaImmune ? LiquidPlacement.Allowed : LiquidPlacement.NotAllowed;
|
||||
@@ -1270,19 +1272,6 @@ namespace CalamityMod
|
||||
mt.AdjTiles = new int[] { TileID.HangingLanterns };
|
||||
}
|
||||
|
||||
// Allow hanging lanterns to move up when hung on platforms
|
||||
internal static void PlatformHangOffset(int i, int j, ref int offsetY)
|
||||
{
|
||||
Tile tile = Main.tile[i, j];
|
||||
TileObjectData data = TileObjectData.GetTileData(tile);
|
||||
int topLeftX = i - tile.TileFrameX / 18 % data.Width;
|
||||
int topLeftY = j - tile.TileFrameY / 18 % data.Height;
|
||||
if (WorldGen.IsBelowANonHammeredPlatform(topLeftX, topLeftY))
|
||||
{
|
||||
offsetY -= 8;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Extension which initializes a ModTile to be a piano.
|
||||
/// </summary>
|
||||
|
||||
@@ -112,6 +112,7 @@ namespace CalamityMod
|
||||
|
||||
// This is the hardcoded value to "do nothing", and is thus the default choice.
|
||||
int prefix = -1;
|
||||
bool supportsLegendary = PrefixLegacy.ItemSets.SwordsHammersAxesPicks[item.type] || (item.ModItem != null && item.ModItem.MeleePrefix());
|
||||
|
||||
// ACCESSORIES
|
||||
if (item.accessory)
|
||||
@@ -139,7 +140,8 @@ namespace CalamityMod
|
||||
}
|
||||
|
||||
// MELEE (includes tools and whips)
|
||||
else if (item.CountsAsClass<MeleeDamageClass>() || item.CountsAsClass<MeleeRangedHybridDamageClass>() || item.CountsAsClass<SummonMeleeSpeedDamageClass>())
|
||||
// Melee-ranged hybrid weapons prioritize Legendary if available, otherwise go for Unreal
|
||||
else if ((item.CountsAsClass<MeleeDamageClass>() || item.CountsAsClass<SummonMeleeSpeedDamageClass>()) && !(item.CountsAsClass<MeleeRangedHybridDamageClass>() && !supportsLegendary))
|
||||
{
|
||||
// Terrarian (has its own special "Legendary" for marketing reasons)
|
||||
// Other items that want to use Legendary2 are also compatible
|
||||
@@ -156,7 +158,7 @@ namespace CalamityMod
|
||||
}
|
||||
|
||||
// Swords, Whips, Tools, other items that support the Legendary modifier
|
||||
else if (PrefixLegacy.ItemSets.SwordsHammersAxesPicks[item.type] || (item.ModItem != null && item.ModItem.MeleePrefix()))
|
||||
else if (supportsLegendary)
|
||||
{
|
||||
int[][] meleeReforgeTiers = new int[][]
|
||||
{
|
||||
|
||||
@@ -99,10 +99,6 @@ namespace CalamityMod
|
||||
// PART 2: Specific other cases that can't be neatly fit into the database
|
||||
//
|
||||
|
||||
// All bosses and several enemies are automatically immune to Pearl Aura.
|
||||
if (EnemyImmunitiesList.Includes(npc.type) || npc.boss)
|
||||
NPCID.Sets.SpecificDebuffImmunity[npc.type][ModContent.BuffType<PearlAura>()] = true;
|
||||
|
||||
// Make all Cal NPCs immune to confused unless otherwise specified
|
||||
// Extra note: Clams are not in this list as they initially immune to Confused, but are no longer immune once aggro'd. This is set in their AI().
|
||||
bool cal = npc.ModNPC != null && npc.ModNPC.Mod.Name.Equals(ModContent.GetInstance<CalamityMod>().Name);
|
||||
|
||||
@@ -22,6 +22,7 @@ using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.GameContent.Drawing;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ObjectData;
|
||||
@@ -112,6 +113,14 @@ namespace CalamityMod
|
||||
NetMessage.SendTileSquare(-1, x, y, tileX, tileY);
|
||||
}
|
||||
|
||||
public static bool DrawSwayingMultiTile(int i, int j)
|
||||
{
|
||||
Tile tile = Main.tile[i, j];
|
||||
if (TileObjectData.IsTopLeft(tile))
|
||||
Main.instance.TilesRenderer.AddSpecialPoint(i, j, TileDrawing.TileCounterType.MultiTileVine);
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void DrawFlameEffect(Texture2D flameTexture, int i, int j, int offsetX = 0, int offsetY = 0)
|
||||
{
|
||||
Tile tile = Main.tile[i, j];
|
||||
|
||||
Reference in new issue
Block a user