This commit is contained in:
Shayy committed 2025-06-27 02:29:32 -04:00
commit f3552f85c3
117 files changed
+431 -269

No files matched your search

+1 -51
View File
@@ -27,7 +27,6 @@ namespace CalamityMod.Balancing
{
public sealed class BalancingChangesManager : ModSystem
{
internal static List<IBalancingRule[]> UniversalBalancingChanges = null;
internal static List<NPCBalancingChange> NPCSpecificBalancingChanges = null;
// Balancing changes in this method are sorted based on place in progression, NPC name (from A-Z), and strength of resistance in ascending order, in that level of priority.
@@ -46,50 +45,12 @@ namespace CalamityMod.Balancing
bool DragonRageFilter(Projectile p) =>
p.type == ProjectileType<DragonRageStaff>() || p.type == ProjectileType<DragonRageFireball>() || (p.type == ProjectileType<FuckYou>() && p.CountsAsClass<MeleeDamageClass>());
// bool MonkStaffT3Filter(Projectile p) =>
// p.type == ProjectileID.MonkStaffT3_AltShot || (p.type == ProjectileID.Electrosphere && Main.player[p.owner].ActiveItem().type == ItemID.MonkStaffT3);
bool MushroomSpearFilter(Projectile p) =>
p.type == ProjectileID.Mushroom && Main.player[p.owner].ActiveItem().type == ItemID.MushroomSpear;
bool OrichalcumPetalFilter(Projectile p) =>
p.type == ProjectileID.FlowerPetal && Main.player[p.owner].onHitPetal;
bool SpectreMaskSetBonusFilter(Projectile p) =>
p.type == ProjectileID.SpectreWrath && Main.player[p.owner].ghostHurt;
bool AotCThrowCombo(Projectile p) =>
p.type == ProjectileType<ArkoftheCosmosSwungBlade>() && (p.ai[0] == 2 || p.ai[0] == 3);
bool HiveBeeFilter(Projectile p) =>
p.type == ProjectileType<BasicPlagueBee>() && Main.player[p.owner].ActiveItem().type == ItemType<TheHive>();
UniversalBalancingChanges = new List<IBalancingRule[]>()
{
// Nerf Crystal bullet shards by 45%
// Currently crystal bullet projectiles deal 50% of the bullet's damage which is absurd in vanilla, this nerfs them to 27.5%
Do(new ProjectileResistBalancingRule(0.55f, ProjectileID.CrystalShard)),
// Nerf Luminite Arrow trails by 50%.
Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.MoonlordArrowTrail)),
// Nerf Seedler seeds by 25%.
Do(new ProjectileResistBalancingRule(0.75f, ProjectileID.SeedlerNut, ProjectileID.SeedlerThorn)),
// Nerf Cursed Dart flames by 50%.
Do(new ProjectileResistBalancingRule(0.5f, ProjectileID.CursedDartFlame)),
// Nerf Mushroom Spear projectiles by 50%.
Do(new ProjectileSpecificRequirementBalancingRule(0.5f, MushroomSpearFilter)),
// Nerf Orichalcum armor set bonus petals by 25%.
Do(new ProjectileSpecificRequirementBalancingRule(0.75f, OrichalcumPetalFilter)),
// Nerf Spectre Mask set bonus projectiles by 50%.
Do(new ProjectileSpecificRequirementBalancingRule(0.5f, SpectreMaskSetBonusFilter)),
};
NPCSpecificBalancingChanges = new List<NPCBalancingChange>();
#region Crabulon
@@ -511,23 +472,12 @@ namespace CalamityMod.Balancing
public override void Unload()
{
UniversalBalancingChanges = null;
NPCSpecificBalancingChanges = null;
}
public static void ApplyFromProjectile(NPC npc, ref NPC.HitModifiers modifiers, Projectile proj)
{
// Apply universal balancing rules.
foreach (IBalancingRule[] balancingRules in UniversalBalancingChanges)
{
foreach (IBalancingRule balancingRule in balancingRules)
{
if (balancingRule.AppliesTo(npc, modifiers, proj))
balancingRule.ApplyBalancingChange(npc, ref modifiers);
}
}
// As well as rules specific to NPCs.
// Apply NPC-specific balancing rules.
foreach (NPCBalancingChange balanceChange in NPCSpecificBalancingChanges)
{
if (npc.type != balanceChange.NPCType)
+1 -1
View File
@@ -27,7 +27,7 @@ namespace CalamityMod.Buffs.StatBuffs
{
player.breath = player.breathMax + 3;
}
if (Main.myPlayer == player.whoAmI && player.wet && NPC.downedBoss3)
if (Main.myPlayer == player.whoAmI && player.Calamity().countsAsAnyWet && NPC.downedBoss3)
{
player.AddBuff(ModContent.BuffType<AquaticHeartWaterSpeed>(), 360);
}
+2 -1
View File
@@ -175,6 +175,8 @@ namespace CalamityMod.CalPlayer
public int momentumCapacitorTime = 0;
/// <summary> A multiplier on the player's movement speed applied while using Momentum Capacitor. </summary>
public float momentumCapacitorBoost = 0f;
public bool countsAsAnyWet => (Player.armor[0].type == ItemID.FishBowl || Player.wetCount > 0 || Player.wet || Player.honeyWet || Player.lavaWet);
#endregion
#region Speedrun Timer
@@ -2001,7 +2003,6 @@ namespace CalamityMod.CalPlayer
Player.statLifeMax2 += 45;
int percentMaxLifeIncrease = 0;
// Blood Pact and Chalice of the Blood God stack their HP bonuses if you want to equip both
if (bloodPact)
percentMaxLifeIncrease += 25;
+1 -1
View File
@@ -370,7 +370,7 @@ namespace CalamityMod.CalPlayer
if (ZoneAbyss || ZoneSulphur)
canSulphurFish = true;
Item item = Player.ActiveItem();
Item item = Player.HeldItem;
if (!canSulphurFish || item.fishingPole <= 0 || item.holdStyle != 1)
fishingLevel = -1;
+1 -1
View File
@@ -2747,7 +2747,7 @@ namespace CalamityMod.CalPlayer
if (Player.whoAmI == Main.myPlayer)
{
for (int i = 0; i < 16; i++)
for (int i = 0; i < 10; i++)
{
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);
+1 -1
View File
@@ -3159,7 +3159,7 @@ namespace CalamityMod.CalPlayer
// Aquatic Emblem bonus
if (aquaticEmblem)
{
if (Player.IsUnderwater() && Player.wet && !Player.lavaWet && !Player.honeyWet &&
if (countsAsAnyWet && !Player.lavaWet && !Player.honeyWet &&
!Player.mount.Active)
{
if (aquaticBoost > 0f)
+1 -1
View File
@@ -1308,7 +1308,7 @@ namespace CalamityMod.CalPlayer
target.AddBuff(BuffType<HadopelagicPressure>(), 180);
if (sulphurSet)
target.AddBuff(BuffID.Poisoned, 60);
if (ilSpark && Player.IsUnderwater())
if (ilSpark && Player.Calamity().countsAsAnyWet)
{
int duration = 60;
target.AddBuff(BuffType<StaticDischarge>(), duration);
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor.FathomSwarmer
public override void UpdateEquip(Player player)
{
player.GetDamage<SummonDamageClass>() += 0.08f;
if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir))
if (player.Calamity().countsAsAnyWet)
{
player.moveSpeed += 0.4f;
}
@@ -38,7 +38,7 @@ namespace CalamityMod.Items.Armor.FathomSwarmer
player.spikedBoots = 2;
player.maxMinions += 2;
player.GetDamage<SummonDamageClass>() += 0.1f;
if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir))
if (modPlayer.countsAsAnyWet)
{
player.GetDamage<SummonDamageClass>() += 0.2f;
player.statDefense += 10;
@@ -56,7 +56,7 @@ namespace CalamityMod.Items.Armor.FathomSwarmer
player.breath = player.breathMax + 3;
}
modPlayer.fathomSwarmerVisage = true;
if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir))
if (player.Calamity().countsAsAnyWet)
{
Lighting.AddLight((int)player.Center.X / 16, (int)player.Center.Y / 16, 0.3f, 0.9f, 1.35f);
}
+1 -1
View File
@@ -42,7 +42,7 @@ namespace CalamityMod.Items.Armor.Reaver
modPlayer.wearingRogueArmor = true;
player.findTreasure = true;
player.aggro -= 200;
if (player.IsUnderwater())
if (player.Calamity().countsAsAnyWet)
player.gills = true;
if (player.whoAmI == Main.myPlayer)
+1 -1
View File
@@ -42,7 +42,7 @@ namespace CalamityMod.Items.Armor.Sulphurous
{
player.GetDamage<ThrowingDamageClass>() += 0.04f;
player.GetCritChance<ThrowingDamageClass>() += 2;
if (player.IsUnderwater())
if (player.Calamity().countsAsAnyWet)
player.gills = true;
}
+1 -1
View File
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Armor.Sulphurous
public override void UpdateEquip(Player player)
{
player.moveSpeed += Collision.DrownCollision(player.position, player.width, player.height, player.gravDir) ? 0.35f : 0.1f;
player.moveSpeed += player.Calamity().countsAsAnyWet ? 0.35f : 0.1f;
}
public override void AddRecipes()
+1 -1
View File
@@ -44,7 +44,7 @@ namespace CalamityMod.Items.Armor.Victide
{
player.endurance += 0.05f;
player.GetCritChance<GenericDamageClass>() += 5;
if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir))
if (player.Calamity().countsAsAnyWet)
{
player.statDefense += 5;
player.endurance += 0.1f;
+1 -1
View File
@@ -31,7 +31,7 @@ namespace CalamityMod.Items.Armor.Victide
public override void UpdateEquip(Player player)
{
player.moveSpeed += Collision.DrownCollision(player.position, player.width, player.height, player.gravDir) ? 0.3f : 0.08f;
player.moveSpeed += player.Calamity().countsAsAnyWet ? 0.3f : 0.08f;
}
public override void AddRecipes()
+1 -1
View File
@@ -31,7 +31,7 @@ namespace CalamityMod.Items.Armor.Victide
var modPlayer = player.Calamity();
modPlayer.victideSet = true;
player.ignoreWater = true;
if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir))
if (player.Calamity().countsAsAnyWet)
{
player.GetDamage<MagicDamageClass>() += 0.1f;
player.lifeRegen += 3;
+1 -1
View File
@@ -31,7 +31,7 @@ namespace CalamityMod.Items.Armor.Victide
var modPlayer = player.Calamity();
modPlayer.victideSet = true;
player.ignoreWater = true;
if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir))
if (player.Calamity().countsAsAnyWet)
{
player.GetDamage<MeleeDamageClass>() += 0.1f;
player.lifeRegen += 3;
+1 -1
View File
@@ -31,7 +31,7 @@ namespace CalamityMod.Items.Armor.Victide
var modPlayer = player.Calamity();
modPlayer.victideSet = true;
player.ignoreWater = true;
if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir))
if (player.Calamity().countsAsAnyWet)
{
player.GetDamage<RangedDamageClass>() += 0.1f;
player.lifeRegen += 3;
+1 -1
View File
@@ -33,7 +33,7 @@ namespace CalamityMod.Items.Armor.Victide
modPlayer.rogueStealthMax += 0.6f;
modPlayer.wearingRogueArmor = true;
player.ignoreWater = true;
if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir))
if (player.Calamity().countsAsAnyWet)
{
player.GetDamage<ThrowingDamageClass>() += 0.1f;
player.lifeRegen += 3;
+1 -1
View File
@@ -55,7 +55,7 @@ namespace CalamityMod.Items.Armor.Victide
}
}
player.ignoreWater = true;
if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir))
if (player.Calamity().countsAsAnyWet)
{
player.GetDamage<SummonDamageClass>() += 0.1f;
player.lifeRegen += 3;
+5 -7
View File
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Magic
{
Item.width = 36;
Item.height = 40;
Item.damage = 70;
Item.damage = 65;
Item.DamageType = DamageClass.Magic;
Item.mana = 7;
Item.useTime = 12;
@@ -32,16 +32,14 @@ namespace CalamityMod.Items.Weapons.Magic
Item.UseSound = SoundID.Item9;
Item.autoReuse = true;
Item.shoot = ModContent.ProjectileType<Icicle>();
Item.shootSpeed = 15f;
Item.shootSpeed = 16f;
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
if (!Main.rand.NextBool(4))
{
Vector2 speed = velocity.RotatedBy(MathHelper.ToRadians(Main.rand.Next(-15, 16)));
speed.Normalize();
speed *= 15f;
Vector2 speed = velocity.RotatedByRandom(MathHelper.Pi / 12f);
speed.Y -= Math.Abs(speed.X) * 0.2f;
int p = Projectile.NewProjectile(source, position, speed, ModContent.ProjectileType<FrostShardFriendly>(), damage, knockback, player.whoAmI);
if (p.WithinBounds(Main.maxProjectiles))
@@ -52,8 +50,8 @@ namespace CalamityMod.Items.Weapons.Magic
SoundEngine.PlaySound(SoundID.Item1, position);
Projectile.NewProjectile(source, position.X, position.Y, velocity.X * 1.2f, velocity.Y * 1.2f, ModContent.ProjectileType<Snowball>(), damage, knockback * 2f, player.whoAmI);
}
velocity.X += Main.rand.Next(-40, 41) * 0.05f;
velocity.Y += Main.rand.Next(-40, 41) * 0.05f;
velocity.X += Main.rand.NextFloat(-2f, 2f);
velocity.Y += Main.rand.NextFloat(-2f, 2f);
return true;
}
}
+1 -1
View File
@@ -53,7 +53,7 @@ namespace CalamityMod.Items.Weapons.Ranged
}
}
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0 && !player.Calamity().mouseRight;
public override bool CanConsumeAmmo(Item ammo, Player player) => player.ownedProjectileCounts[Item.shoot] > 0; // Spawning the holdout cannot consume ammo
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
+1 -1
View File
@@ -53,7 +53,7 @@ namespace CalamityMod.Items.Weapons.Ranged
BuiltUpHeat = 0;
}
}
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0 && !player.Calamity().mouseRight;
public override bool CanConsumeAmmo(Item ammo, Player player) => player.ownedProjectileCounts[Item.shoot] > 0; // Spawning the holdout cannot consume ammo
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
+1 -1
View File
@@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Rogue
// Terraria seems to really dislike high crit values in SetDefaults
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 4;
public override float StealthDamageMultiplier => 3f;
public override float StealthDamageMultiplier => 1.7f;
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
@@ -423,9 +423,9 @@ GodSlayerChestplate: {
'''
CommonSetBonus:
'''
Pressing {0} allows you to dash towards your cursor for 2.5 seconds
Pressing {0} allows you to dash towards your cursor for 2 seconds
Enemies you dash through take massive damage
During the dash you are immune to most debuffs
During the dash you are immune to damage and most debuffs
The dash has a {1} second cooldown
'''
}
+40
View File
@@ -271,6 +271,7 @@ namespace CalamityMod.NPCs
"Chris Tallballs", // <@!770211589076418571> (vysterx) (previously: bewearium)
"Syethas", // <@!325413275066171393> (cosmicstariight)
"Nextdoor Psycho", // <@!173261518572486656> (nextdoorpsycho)
"Mike Cyclops", // <@!702327497475227741> (seichoseicho)
};
private static readonly string[] ZoologistNames =
{
@@ -281,6 +282,18 @@ namespace CalamityMod.NPCs
"Gwenhwyvar", // <@!291342874497515531> (diamondnife)
"Daxie", // <@!465438861103988737> (daxie626)
};
// Town Slimes
private static readonly string[] ClumsySlimeNames = null;
private static readonly string[] CoolSlimeNames = null;
private static readonly string[] DivaSlimeNames = null;
private static readonly string[] ElderSlimeNames = null;
private static readonly string[] MysticSlimeNames = null;
private static readonly string[] NerdySlimeNames =
{
"Big Blungus", // <@!272759434282008577> (schmoov)
};
private static readonly string[] SquireSlimeNames = null;
private static readonly string[] SurlySlimeNames = null;
// The following sets are for the 1.4 Town Pets: Town Dogs, Cats and Bunnies.
// All three pet types come in numerous breeds. Each breed has its own name pool.
@@ -361,6 +374,7 @@ namespace CalamityMod.NPCs
private static readonly string[] TownBunnyNames =
{
"Poco", // <@!1192261996146593872> (tostitomuncher33)
"Puffer", // <@!181103507711983616> (piky)
};
private static readonly string[] TownBunnyWhiteNames = null;
private static readonly string[] TownBunnyAngoraNames = null;
@@ -599,6 +613,32 @@ namespace CalamityMod.NPCs
AddNewNames(nameList, ZoologistNames);
break;
// Town Slimes
case NPCID.TownSlimePurple: // Clumsy Slime
AddNewNames(nameList, ClumsySlimeNames);
break;
case NPCID.TownSlimeGreen: // Cool Slime
AddNewNames(nameList, CoolSlimeNames);
break;
case NPCID.TownSlimeRainbow: // Diva Slime
AddNewNames(nameList, DivaSlimeNames);
break;
case NPCID.TownSlimeOld: // Elder Slime
AddNewNames(nameList, ElderSlimeNames);
break;
case NPCID.TownSlimeYellow: // Mystic Slime
AddNewNames(nameList, MysticSlimeNames);
break;
case NPCID.TownSlimeBlue: // Nerdy Slime
AddNewNames(nameList, NerdySlimeNames);
break;
case NPCID.TownSlimeCopper: // Squire Slime
AddNewNames(nameList, SquireSlimeNames);
break;
case NPCID.TownSlimeRed: // Surly Slime
AddNewNames(nameList, SurlySlimeNames);
break;
// This function doesn't work with Town Pets currently
case NPCID.TownCat:
AddNewNames(nameList, TownCatNames);
+1 -1
View File
@@ -1388,7 +1388,7 @@ namespace CalamityMod.NPCs.Providence
if (!Main.dedServ)
{
Player player2 = Main.LocalPlayer;
bool inLiquid = (player2.wet || player2.honeyWet) && !player2.lavaWet;
bool inLiquid = player2.Calamity().countsAsAnyWet && !player2.lavaWet;
if (!player2.dead && player2.active && Vector2.Distance(player2.Center, NPC.Center) < 2800f && !inLiquid)
{
@@ -140,6 +140,7 @@ namespace CalamityMod.Projectiles.BaseProjectiles
public override void SetStaticDefaults()
{
Main.projFrames[Type] = AnimationFrames;
// IMPORTANT: Setting Main.projPet disables projectile damage! If you are making a charging minion, be sure to override the MinionContactDamage hook
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
+42 -7
View File
@@ -294,7 +294,6 @@ namespace CalamityMod.Projectiles
public int BloodstoneOrbValue = 0;
#region On Spawn
public override void OnSpawn(Projectile projectile, IEntitySource source)
{
// TODO -- it would be nice to move frame one hacks here, but this runs in the middle of NewProjectile
@@ -306,18 +305,54 @@ namespace CalamityMod.Projectiles
if (sourceItem != null)
extorterBoost = true;
if (source is EntitySource_Parent { Entity: NPC npc })
{
if (!npc.friendly)
ParentNPCIndex = npc.whoAmI;
}
// Whenever the player has Daawnlight Spirit Origin, any ranged projectile will have the capacity to infintely supercrit.
if (Main.player[projectile.owner].Calamity().spiritOrigin && projectile.CountsAsClass<RangedDamageClass>())
{
projectile.CritChance += Main.player[projectile.owner].Calamity().spiritOriginCritBoost;
projectile.Calamity().supercritHits = -1;
}
if (source is EntitySource_Parent { Entity: NPC npc })
{
if (!npc.friendly)
ParentNPCIndex = npc.whoAmI;
}
//
// SPECIFIC PROJECTILE BALANCE CHANGES
//
else if (source is EntitySource_Parent { Entity: Projectile parent })
{
// Nerf Crystal bullet shard damage by 45%
// Vanilla crystal shards deal 50% of the bullet's damage which is absurd, this nerfs them to 27.5%
if (parent.type == ProjectileID.CrystalBullet && projectile.type == ProjectileID.CrystalShard)
projectile.damage = (int)(projectile.damage * 0.55f);
// Nerf Mushroom Spear mushroom damage by 50%
if (parent.type == ProjectileID.MushroomSpear && projectile.type == ProjectileID.Mushroom)
projectile.damage /= 2;
// Nerf Luminite Arrow trail damage by 50%
if (parent.type == ProjectileID.MoonlordArrow && projectile.type == ProjectileID.MoonlordArrowTrail)
projectile.damage /= 2;
// Nerf Cursed Dart flame damage by 50%
if (parent.type == ProjectileID.CursedDart && projectile.type == ProjectileID.CursedDartFlame)
projectile.damage /= 2;
}
if (source is EntitySource_OnHit e)
{
// Nerf Orichalcum armor's set bonus petal damage by 25% (5 is the projectile source ID for Orichalcum armor set bonus)
if (e.Context == "5")
projectile.damage = (int)(projectile.damage * 0.75f);
// Nerf Spectre armor's set bonus soul damage by 50% (16 is the projectile source ID for Spectre Mask set bonus)
if (e.Context == "16")
projectile.damage /= 2;
}
// Nerfed Seedler projectile damage by 25%
if (source is EntitySource_ItemUse_WithAmmo ea && ea.Item.type == ItemID.Seedler)
projectile.damage = (int)(projectile.damage * 0.75f);
}
public override void SendExtraAI(Projectile projectile, BitWriter bitWriter, BinaryWriter binaryWriter) => binaryWriter.Write(ParentNPCIndex);
public override void ReceiveExtraAI(Projectile projectile, BitReader bitReader, BinaryReader binaryReader) => ParentNPCIndex = binaryReader.ReadInt32();
@@ -28,6 +28,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
public override void SetStaticDefaults()
{
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
ProjectileID.Sets.NeedsUUID[Type] = true;
@@ -114,6 +115,5 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
SoundEngine.PlaySound(CommonCalamitySounds.LaserCannonSound, Projectile.Center);
}
}
public override bool? CanDamage() => false;
}
}
@@ -25,6 +25,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
}
public override void SetStaticDefaults()
{
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
ProjectileID.Sets.TrailingMode[Type] = 0;
@@ -173,6 +174,8 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
}
}
public override bool MinionContactDamage() => true;
public override bool PreDraw(ref Color lightColor)
{
Texture2D tex = TextureAssets.Projectile[Type].Value;
@@ -42,6 +42,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
public override void SetStaticDefaults()
{
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -237,8 +238,6 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
public override void OnSpawn(IEntitySource source) => DoVFXPulse();
public override bool? CanDamage() => false;
public override bool PreDraw(ref Color lightColor)
{
Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value;
@@ -28,6 +28,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 12;
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -292,7 +293,5 @@ namespace CalamityMod.Projectiles.DraedonsArsenal
fallThrough = Projectile.Bottom.Y < FallThroughYPoint - 120f;
return base.TileCollideStyle(ref width, ref height, ref fallThrough, ref hitboxCenterFrac);
}
public override bool? CanDamage() => false;
}
}
-1
View File
@@ -19,7 +19,6 @@ namespace CalamityMod.Projectiles.Magic
Projectile.DamageType = DamageClass.Magic;
Projectile.coldDamage = true;
Projectile.penetrate = 1;
Projectile.extraUpdates = 1;
Projectile.coldDamage = true;
}
@@ -140,8 +140,6 @@ namespace CalamityMod.Projectiles.Summon
}
}
public override bool? CanDamage() => false;
public override bool PreDraw(ref Color lightColor)
{
Texture2D texture = TextureAssets.Projectile[Type].Value;
+3 -9
View File
@@ -19,6 +19,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 8;
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -239,6 +240,8 @@ namespace CalamityMod.Projectiles.Summon
}
public override bool MinionContactDamage() => HitCooldown == 0;
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
if (Main.rand.NextBool(3))
@@ -253,14 +256,5 @@ namespace CalamityMod.Projectiles.Summon
Projectile.netUpdate = true;
HitCooldown = 20;
}
public override bool? CanHitNPC(NPC target)
{
if (HitCooldown == 0)
{
return null;
}
return false;
}
}
}
+3
View File
@@ -18,6 +18,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -70,6 +71,8 @@ namespace CalamityMod.Projectiles.Summon
Projectile.ChargingMinionAI(1200f, 1500f, 2200f, 150f, 0, 24f, 15f, 4f, new Vector2(0f, -60f), 12f, 12f, false, false, 1);
}
public override bool MinionContactDamage() => true;
public override bool OnTileCollide(Vector2 oldVelocity) => false;
}
}
+3
View File
@@ -21,6 +21,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 6;
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -209,6 +210,8 @@ namespace CalamityMod.Projectiles.Summon
}
}
public override bool MinionContactDamage() => true;
public override bool OnTileCollide(Vector2 oldVelocity) => false;
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
+1 -2
View File
@@ -40,6 +40,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -150,8 +151,6 @@ namespace CalamityMod.Projectiles.Summon
}
}
public override bool? CanDamage() => false;
#endregion
}
}
+3
View File
@@ -15,6 +15,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 11;
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -96,6 +97,8 @@ namespace CalamityMod.Projectiles.Summon
}
}
public override bool MinionContactDamage() => true;
public override bool OnTileCollide(Vector2 oldVelocity) => false;
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => OnHitEffects(target);
-2
View File
@@ -106,8 +106,6 @@ namespace CalamityMod.Projectiles.Summon
}
}
public override bool? CanDamage() => false;
public override bool PreDraw(ref Color lightColor)
{
Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value;
+2
View File
@@ -216,6 +216,8 @@ namespace CalamityMod.Projectiles.Summon
}
public override bool MinionContactDamage() => true;
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(BuffID.ShadowFlame, 300);
}
}
+2 -4
View File
@@ -18,9 +18,10 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 6;
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
Main.projFrames[Type] = 6;
}
public override void SetDefaults()
@@ -299,9 +300,6 @@ namespace CalamityMod.Projectiles.Summon
}
}
//Does no contact damage
public override bool? CanDamage() => false;
public override bool PreDraw(ref Color lightColor)
{
Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value;
-2
View File
@@ -245,7 +245,5 @@ namespace CalamityMod.Projectiles.Summon
Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, yStart, texture.Width, frameHeight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, frameHeight / 2f), Projectile.scale, SpriteEffects.None, 0);
return false;
}
public override bool? CanDamage() => false;
}
}
-2
View File
@@ -239,7 +239,5 @@ namespace CalamityMod.Projectiles.Summon
Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, yStart, texture.Width, frameHeight)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, frameHeight / 2f), Projectile.scale, SpriteEffects.None, 0);
return false;
}
public override bool? CanDamage() => false;
}
}
+2
View File
@@ -82,6 +82,8 @@ namespace CalamityMod.Projectiles.Summon
Projectile.ChargingMinionAI(Calamitamini.Range, Calamitamini.SeparationAnxietyMin, Calamitamini.SeparationAnxietyMax, Calamitamini.SafeDist, 0, 40f, 8f, 4f, new Vector2(0f, -60f), 40f, 8f, false, true);
}
public override bool MinionContactDamage() => true;
public override bool PreDraw(ref Color lightColor)
{
SpriteEffects spriteEffects = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None;
+1 -2
View File
@@ -15,6 +15,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 4;
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -285,7 +286,5 @@ namespace CalamityMod.Projectiles.Summon
}
public override bool OnTileCollide(Vector2 oldVelocity) => false;
public override bool? CanDamage() => false;
}
}
+4
View File
@@ -15,6 +15,7 @@ namespace CalamityMod.Projectiles.Summon
public new string LocalizationCategory => "Projectiles.Summon";
public override void SetStaticDefaults()
{
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -75,6 +76,9 @@ namespace CalamityMod.Projectiles.Summon
Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0);
return false;
}
public override bool MinionContactDamage() => true;
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<ElementalMix>(), 60);
+1 -2
View File
@@ -20,6 +20,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -89,7 +90,5 @@ namespace CalamityMod.Projectiles.Summon
DelayBetweenShooting++;
}
}
public override bool? CanDamage() => false;
}
}
+3
View File
@@ -16,6 +16,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 6;
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -80,6 +81,8 @@ namespace CalamityMod.Projectiles.Summon
}
}
public override bool MinionContactDamage() => true;
public override bool PreDraw(ref Color lightColor)
{
Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value;
-2
View File
@@ -221,7 +221,5 @@ namespace CalamityMod.Projectiles.Summon
{
return new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, 255);
}
public override bool? CanDamage() => false;
}
}
+2 -3
View File
@@ -18,9 +18,10 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 3;
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
Main.projFrames[Type] = 3;
}
public override void SetDefaults()
@@ -307,8 +308,6 @@ namespace CalamityMod.Projectiles.Summon
}
}
public override bool? CanDamage() => false;
public override bool PreDraw(ref Color lightColor)
{
Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value;
-3
View File
@@ -148,8 +148,5 @@ namespace CalamityMod.Projectiles.Summon
Main.EntitySpriteDraw(texture, drawPosition, frame, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, direction, 0);
return false;
}
// The lamps themselves do not do damage, but they do store damage for the sake of shooting projectiles.
public override bool? CanDamage() => false;
}
}
+3
View File
@@ -16,6 +16,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 6;
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -80,6 +81,8 @@ namespace CalamityMod.Projectiles.Summon
}
}
public override bool MinionContactDamage() => true;
public override bool PreDraw(ref Color lightColor)
{
Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value;
+1 -2
View File
@@ -26,6 +26,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 18;
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -297,7 +298,5 @@ namespace CalamityMod.Projectiles.Summon
Projectile.frame = 0;
}
}
public override bool? CanDamage() => false;
}
}
+3
View File
@@ -15,6 +15,7 @@ namespace CalamityMod.Projectiles.Summon
public new string LocalizationCategory => "Projectiles.Summon";
public override void SetStaticDefaults()
{
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -208,6 +209,8 @@ namespace CalamityMod.Projectiles.Summon
}
}
public override bool MinionContactDamage() => true;
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
if (Projectile.owner == Main.myPlayer)
+4 -1
View File
@@ -28,6 +28,7 @@ namespace CalamityMod.Projectiles.Summon
public Vector2 storedPos;
public override void SetStaticDefaults()
{
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = false; // To prevent blade type desync
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -303,7 +304,9 @@ namespace CalamityMod.Projectiles.Summon
}
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType<HolyFlames>(), 180);
public override bool? CanDamage() => attackCooldown == 0 ? null : false;
public override bool MinionContactDamage() => attackCooldown == 0;
public override bool PreDraw(ref Color lightColor)
{
Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value;
+1 -2
View File
@@ -24,6 +24,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 6;
Main.projPet[Type] = true;
ProjectileID.Sets.NeedsUUID[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
@@ -169,7 +170,5 @@ namespace CalamityMod.Projectiles.Summon
Main.EntitySpriteDraw(pupilTexture, pupilDrawPosition, null, Projectile.GetAlpha(lightColor), PupilAngle, pupilTexture.Size() * 0.5f, PupilScale, SpriteEffects.None);
return false;
}
public override bool? CanDamage() => false;
}
}
+4 -3
View File
@@ -26,12 +26,10 @@ namespace CalamityMod.Projectiles.Summon
}
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 8;
Main.projPet[Type] = true;
ProjectileID.Sets.TrailCacheLength[Type] = 7;
ProjectileID.Sets.TrailingMode[Type] = 2;
ProjectileID.Sets.MinionSacrificable[Type] = true;
}
@@ -153,6 +151,9 @@ namespace CalamityMod.Projectiles.Summon
}
Lighting.AddLight(Projectile.Center, Color.Red.ToVector3());
}
public override bool MinionContactDamage() => true;
public override void PostDraw(Color lightColor)
{
if ((Projectile.ai[0] > 0f && Projectile.ai[0] <= MaxChargeTime && Projectile.velocity.Length() >= 8f) || SeekingTarget)
+2 -2
View File
@@ -351,12 +351,12 @@ namespace CalamityMod.Projectiles.Summon
Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, frame, Color.LightSkyBlue, Projectile.rotation, Projectile.Size / 2, 1f, SpriteEffects.None, 0);
}
public override bool MinionContactDamage() => AttackMode == 2;
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<GlacialState>(), 60);
target.AddBuff(ModContent.BuffType<Voidfrost>(), 180);
}
public override bool? CanDamage() => AttackMode == 2;
}
}
+1 -1
View File
@@ -26,6 +26,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 5;
Main.projPet[Type] = true;
ProjectileID.Sets.TrailingMode[Type] = 0;
ProjectileID.Sets.TrailCacheLength[Type] = 20;
ProjectileID.Sets.MinionSacrificable[Type] = true;
@@ -241,6 +242,5 @@ namespace CalamityMod.Projectiles.Summon
0);
return false;
}
public override bool? CanDamage() => false;
}
}
+1 -2
View File
@@ -18,6 +18,7 @@ namespace CalamityMod.Projectiles.Summon
public const int ShootRate = 60;
public override void SetStaticDefaults()
{
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -117,7 +118,5 @@ namespace CalamityMod.Projectiles.Summon
Projectile.velocity = (destination - Projectile.Center).SafeNormalize(Vector2.Zero) * flySpeed;
}
public override bool? CanDamage() => false;
}
}
+1 -1
View File
@@ -235,7 +235,7 @@ namespace CalamityMod.Projectiles.Summon
modifiers.FinalDamage *= YharonsKindleStaff.ReboundRamDamageFactor;
}
public override bool? CanDamage() => Projectile.localAI[0] > 1f;
public override bool MinionContactDamage() => Projectile.localAI[0] > 1f;
public override bool PreDraw(ref Color lightColor)
{
+2
View File
@@ -125,6 +125,8 @@ namespace CalamityMod.Projectiles.Summon
#endregion
public override bool MinionContactDamage() => true;
public override void OnSpawn(IEntitySource source) => IFrames = 30;
// Prevent immediate death on tile collision, and slow down on tile collision.
+1 -2
View File
@@ -17,6 +17,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -88,7 +89,5 @@ namespace CalamityMod.Projectiles.Summon
}
}
}
public override bool? CanDamage() => false;
}
}
+1 -2
View File
@@ -32,6 +32,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 4;
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -264,7 +265,5 @@ namespace CalamityMod.Projectiles.Summon
return false;
}
public override bool? CanDamage() => false;
}
}
+1 -3
View File
@@ -18,6 +18,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 4;
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -298,9 +299,6 @@ namespace CalamityMod.Projectiles.Summon
}
}
//This minion does no contact damage
public override bool? CanDamage() => false;
public override bool PreDraw(ref Color lightColor)
{
Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value;
+2 -3
View File
@@ -15,9 +15,10 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 19;
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
Main.projFrames[Type] = 19;
}
public override void SetDefaults()
@@ -566,8 +567,6 @@ namespace CalamityMod.Projectiles.Summon
}
}
public override bool? CanDamage() => false;
public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough, ref Vector2 hitboxCenterFrac)
{
fallThrough = false;
+3
View File
@@ -16,6 +16,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 9;
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -359,6 +360,8 @@ namespace CalamityMod.Projectiles.Summon
return true;
}
public override bool MinionContactDamage() => true;
public override bool OnTileCollide(Vector2 oldVelocity) => false;
}
}
+3
View File
@@ -19,6 +19,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -94,6 +95,8 @@ namespace CalamityMod.Projectiles.Summon
}
}
public override bool MinionContactDamage() => true;
public override bool OnTileCollide(Vector2 oldVelocity) => false;
}
}
+4
View File
@@ -15,6 +15,7 @@ namespace CalamityMod.Projectiles.Summon
public bool Firing = false;
public override void SetStaticDefaults()
{
Main.projPet[Type] = true;
ProjectileID.Sets.TrailingMode[Type] = 0;
ProjectileID.Sets.TrailCacheLength[Type] = 7;
}
@@ -91,6 +92,9 @@ namespace CalamityMod.Projectiles.Summon
}
}
}
public override bool MinionContactDamage() => true;
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
if (Firing)
@@ -150,8 +150,6 @@ namespace CalamityMod.Projectiles.Summon
return true;
}
public override bool? CanDamage() => false;
#endregion
#region AI
@@ -146,8 +146,6 @@ namespace CalamityMod.Projectiles.Summon
return true;
}
public override bool? CanDamage() => false;
#endregion
#region AI
+2 -2
View File
@@ -20,6 +20,8 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 4;
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.TrailCacheLength[Type] = 4;
ProjectileID.Sets.TrailingMode[Type] = 0;
}
@@ -39,8 +41,6 @@ namespace CalamityMod.Projectiles.Summon
Projectile.DamageType = DamageClass.Summon;
}
public override bool? CanDamage() => false;
public override void AI()
{
Lighting.AddLight(Projectile.Center, Color.SkyBlue.ToVector3());
+1 -2
View File
@@ -15,6 +15,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -229,7 +230,5 @@ namespace CalamityMod.Projectiles.Summon
{
return new Color(100, 250, 250, Projectile.alpha);
}
public override bool? CanDamage() => false;
}
}
+1 -2
View File
@@ -15,6 +15,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 4;
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -245,7 +246,5 @@ namespace CalamityMod.Projectiles.Summon
Main.EntitySpriteDraw(texture2D13, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture2D13.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2((float)texture2D13.Width / 2f, (float)framing / 2f), Projectile.scale, spriteEffects, 0);
return false;
}
public override bool? CanDamage() => false;
}
}
+2 -3
View File
@@ -14,7 +14,8 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 6;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
}
public override void SetDefaults()
@@ -128,7 +129,5 @@ namespace CalamityMod.Projectiles.Summon
Projectile.frame = 0;
}
}
public override bool? CanDamage() => false;
}
}
+3
View File
@@ -17,6 +17,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 5;
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -148,5 +149,7 @@ namespace CalamityMod.Projectiles.Summon
}
Projectile.direction = Projectile.spriteDirection = (Projectile.velocity.X > 0).ToDirectionInt();
}
public override bool MinionContactDamage() => true;
}
}
+3
View File
@@ -30,6 +30,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 10;
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -199,6 +200,8 @@ namespace CalamityMod.Projectiles.Summon
}
}
public override bool MinionContactDamage() => true;
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
if (EnemyFailureCooldown > 0)
+3
View File
@@ -16,6 +16,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 4;
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -87,6 +88,8 @@ namespace CalamityMod.Projectiles.Summon
Projectile.ChargingMinionAI(1200f, 1500f, 2400f, 150f, 0, 25f, 20f, 9f, new Vector2(0f, -60f), 30f, 15f, true, true);
}
public override bool MinionContactDamage() => true;
public override bool PreDraw(ref Color lightColor)
{
SpriteEffects spriteEffects = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None;
+1 -3
View File
@@ -25,6 +25,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 4;
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -191,8 +192,5 @@ namespace CalamityMod.Projectiles.Summon
}
}
}
// The spirit itself should not do direct damage.
public override bool? CanDamage() => false;
}
}
+1 -2
View File
@@ -22,6 +22,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 6;
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -165,8 +166,6 @@ namespace CalamityMod.Projectiles.Summon
TimerForShooting++;
}
public override bool? CanDamage() => false;
#endregion
}
}
-2
View File
@@ -128,8 +128,6 @@ namespace CalamityMod.Projectiles.Summon
}
}
public override bool? CanDamage() => false;
#endregion
}
}
+2 -1
View File
@@ -44,6 +44,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
// Minion targeting feature is not active here since this isn't a normal summon weapon
}
@@ -316,6 +317,6 @@ namespace CalamityMod.Projectiles.Summon
float _ = float.NaN;
return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Projectile.Center, tipPosition, 30 * Projectile.scale, ref _);
}
public override bool? CanDamage() => (isAttacking && attackTimer > bladeValue && Projectile.ai[0] != 0) ? null : false;
public override bool MinionContactDamage() => isAttacking && attackTimer > bladeValue && Projectile.ai[0] != 0;
}
}
+3
View File
@@ -16,6 +16,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 5;
Main.projPet[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
}
@@ -159,5 +160,7 @@ namespace CalamityMod.Projectiles.Summon
else if (Projectile.velocity.Length() < 28f)
Projectile.velocity = Projectile.SafeDirectionTo(target.Center) * 29f;
}
public override bool MinionContactDamage() => true;
}
}
+2
View File
@@ -693,6 +693,8 @@ namespace CalamityMod.Projectiles.Summon
#endregion
public override bool MinionContactDamage() => true;
public override bool? CanHitNPC(NPC target)
{
if (target.type == ModContent.NPCType<ExhumedHeart>())
+1 -1
View File
@@ -424,7 +424,7 @@ namespace CalamityMod.Projectiles.Summon
return null;
}
public override bool? CanDamage() => Projectile.ai[0] == 0f;
public override bool MinionContactDamage() => Projectile.ai[0] == 0f;
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
-2
View File
@@ -120,8 +120,6 @@ namespace CalamityMod.Projectiles.Summon
public override Color? GetAlpha(Color lightColor) => new Color(200, 200, 200, 200);
public override bool? CanDamage() => false;
#endregion
}
}
@@ -138,5 +138,7 @@ namespace CalamityMod.Projectiles.Summon
Projectile.frame = 0;
}
}
public override bool MinionContactDamage() => true;
}
}
+5 -1
View File
@@ -15,9 +15,10 @@ namespace CalamityMod.Projectiles.Summon
public int Variant;
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 7;
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
Main.projFrames[Type] = 7;
}
public override void SetDefaults()
@@ -171,6 +172,9 @@ namespace CalamityMod.Projectiles.Summon
}
return true;
}
public override bool MinionContactDamage() => true;
public override bool PreDraw(ref Color lightColor)
{
Rectangle frame = new Rectangle(Variant * Projectile.width, Projectile.frame * Projectile.height, Projectile.width, Projectile.height);
+1 -2
View File
@@ -11,6 +11,7 @@ namespace CalamityMod.Projectiles.Summon
public new string LocalizationCategory => "Projectiles.Summon";
public override void SetStaticDefaults()
{
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -128,7 +129,5 @@ namespace CalamityMod.Projectiles.Summon
}
public override Color? GetAlpha(Color lightColor) => new Color(200, 200, 200, 200);
public override bool? CanDamage() => false;
}
}
+1 -2
View File
@@ -11,6 +11,7 @@ namespace CalamityMod.Projectiles.Summon
public new string LocalizationCategory => "Projectiles.Summon";
public override void SetStaticDefaults()
{
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -129,7 +130,5 @@ namespace CalamityMod.Projectiles.Summon
}
public override Color? GetAlpha(Color lightColor) => new Color(200, 200, 200, 200);
public override bool? CanDamage() => false;
}
}
+1 -2
View File
@@ -32,6 +32,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 4;
Main.projPet[Type] = true;
ProjectileID.Sets.DrawScreenCheckFluff[Type] = 12000;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
@@ -272,7 +273,5 @@ namespace CalamityMod.Projectiles.Summon
return false;
}
public override bool? CanDamage() => false;
}
}
+2 -3
View File
@@ -18,9 +18,10 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 10;
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
Main.projFrames[Type] = 10;
}
public override void SetDefaults()
@@ -557,7 +558,5 @@ namespace CalamityMod.Projectiles.Summon
Main.gore[index].velocity *= 0.1f;
}
}
public override bool? CanDamage() => false;
}
}
+1 -2
View File
@@ -20,6 +20,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 3;
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -59,8 +60,6 @@ namespace CalamityMod.Projectiles.Summon
FalseGun.DamageType = DamageClass.Summon;
}
public override bool? CanDamage() => false;
public override void AI()
{
Player player = Main.player[Projectile.owner];
+1 -2
View File
@@ -21,6 +21,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -109,8 +110,6 @@ namespace CalamityMod.Projectiles.Summon
Projectile.netUpdate = true;
}
public override bool? CanDamage() => false;
#endregion
}
}
-3
View File
@@ -116,9 +116,6 @@ namespace CalamityMod.Projectiles.Summon.Umbrella
// Glowmask effect
public override Color? GetAlpha(Color lightColor) => new Color(200, 200, 200, 200);
// No contact damage
public override bool? CanDamage() => false;
// Draw over players
public override void DrawBehind(int index, List<int> behindNPCsAndTiles, List<int> behindNPCs, List<int> behindProjectiles, List<int> overPlayers, List<int> overWiresUI) => overPlayers.Add(index);
+3
View File
@@ -18,6 +18,7 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projFrames[Type] = 3;
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
}
@@ -157,6 +158,8 @@ namespace CalamityMod.Projectiles.Summon
}
}
public override bool MinionContactDamage() => true;
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
{
Player player = Main.player[Projectile.owner];
+4
View File
@@ -57,6 +57,8 @@ namespace CalamityMod.Projectiles.Summon
public override void SetStaticDefaults()
{
Main.projPet[Type] = true;
ProjectileID.Sets.MinionSacrificable[Type] = true;
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
ProjectileID.Sets.TrailingMode[Type] = 2;
ProjectileID.Sets.TrailCacheLength[Type] = 45;
@@ -91,6 +93,8 @@ namespace CalamityMod.Projectiles.Summon
ChargeStartingPosition = reader.ReadVector2();
}
public override bool MinionContactDamage() => true;
public override void AI()
{
// Decide whether the minion should still exist.
@@ -91,5 +91,7 @@ namespace CalamityMod.Projectiles.Summon
return;
timer++;
}
public override bool MinionContactDamage() => true;
}
}
+2
View File
@@ -214,6 +214,8 @@ namespace CalamityMod.Projectiles.Summon
return false;
}
public override bool MinionContactDamage() => true;
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(BuffID.Frostburn2, 300);
}
}
Loaded 100 of 117 files, more files were not shown because too many files have changed in this diff. Show more