1. Necrosteocytes balancing
2. Merged Corroslime/Crimslime Staff into a singular Blighted Slime Staff
No files matched your search
@@ -95,8 +95,11 @@ namespace CalamityMod.Balancing
|
||||
#endregion
|
||||
|
||||
#region Wall of Flesh
|
||||
// 40% resist to Corro/Crimslime Staff.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.WallofFleshEye, Do(new ProjectileResistBalancingRule(0.6f, ProjectileType<CrimslimeMinion>(), ProjectileType<CorroslimeMinion>()))));
|
||||
// 50% resist to Staff of Necrosteocytes.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(new List<int> { NPCID.WallofFlesh, NPCID.WallofFleshEye }, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<SmallSkeletonMinion>()))));
|
||||
|
||||
// 20% resist to Blighted Slime Staff.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(new List<int> { NPCID.WallofFlesh, NPCID.WallofFleshEye }, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<BlightedSlimeMinion>()))));
|
||||
#endregion
|
||||
|
||||
#region Aquatic Scourge
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class Corroslime : BaseSummonBuff
|
||||
public class BlightedSlime : BaseSummonBuff
|
||||
{
|
||||
protected override int MinionProjectileType => ModContent.ProjectileType<CorroslimeMinion>();
|
||||
protected override int MinionProjectileType => ModContent.ProjectileType<BlightedSlimeMinion>();
|
||||
|
||||
protected override ref bool MinionBool => ref BuffModdedOwner.cSlime;
|
||||
protected override ref bool MinionBool => ref BuffModdedOwner.blightedSlime;
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 547 B After Width: | Height: | Size: 547 B |
|
Before Width: | Height: | Size: 543 B After Width: | Height: | Size: 543 B |
@@ -1,12 +0,0 @@
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class Crimslime : BaseSummonBuff
|
||||
{
|
||||
protected override int MinionProjectileType => ModContent.ProjectileType<CrimslimeMinion>();
|
||||
|
||||
protected override ref bool MinionBool => ref BuffModdedOwner.cSlime2;
|
||||
}
|
||||
}
|
||||
@@ -1514,10 +1514,8 @@ namespace CalamityMod.CalPlayer
|
||||
public bool CalamarisLament = false;
|
||||
/// <summary> Entropy's Vigil. </summary>
|
||||
public bool cEyes = false;
|
||||
/// <summary> Corroslime Staff. </summary>
|
||||
public bool cSlime = false;
|
||||
/// <summary> Crimslime Staff. </summary>
|
||||
public bool cSlime2 = false;
|
||||
/// <summary> Blighted Slime Staff. </summary>
|
||||
public bool blightedSlime = false;
|
||||
/// <summary> Abandoned Slime Staff. </summary>
|
||||
public bool aSlime = false;
|
||||
public bool brittleStar = false;
|
||||
@@ -2772,8 +2770,7 @@ namespace CalamityMod.CalPlayer
|
||||
cosmicViper = false;
|
||||
CalamarisLament = false;
|
||||
cEyes = false;
|
||||
cSlime = false;
|
||||
cSlime2 = false;
|
||||
blightedSlime = false;
|
||||
aSlime = false;
|
||||
brittleStar = false;
|
||||
aquaticStar = false;
|
||||
|
||||
@@ -1138,6 +1138,7 @@ namespace CalamityMod.CalPlayer
|
||||
Asset<Texture2D> carpetAuric = ExtraTextureRefs.FlyingCarpetAuric;
|
||||
Asset<Texture2D> carpetOriginal = ExtraTextureRefs.FlyingCarpetVanilla;
|
||||
TextureAssets.FlyingCarpet = (auricSet ? carpetAuric : carpetOriginal);
|
||||
TextureAssets.Buff[ModContent.BuffType<BlightedSlime>()] = WorldGen.crimson ? ExtraTextureRefs.BlightedSlimeCrimIcon : ExtraTextureRefs.BlightedSlimeCorroIcon;
|
||||
|
||||
for (int l = 0; l < Player.MaxBuffs; l++)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using CalamityMod.Buffs.Summon;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
@@ -28,6 +29,10 @@ namespace CalamityMod.ExtraTextures
|
||||
public static Asset<Texture2D> LuckIconVanilla;
|
||||
public static Asset<Texture2D> LuckIconLesser;
|
||||
|
||||
// Blighted Slime Buff icons
|
||||
public static Asset<Texture2D> BlightedSlimeCorroIcon;
|
||||
public static Asset<Texture2D> BlightedSlimeCrimIcon;
|
||||
|
||||
// Particles
|
||||
public static Asset<Texture2D> CircularSmear;
|
||||
public static Asset<Texture2D> CircularSmearFire1;
|
||||
@@ -52,6 +57,9 @@ namespace CalamityMod.ExtraTextures
|
||||
LuckIconVanilla = TextureAssets.Buff[BuffID.Lucky];
|
||||
LuckIconLesser = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/VanillaBuffs/LuckyLesser", AssetRequestMode.AsyncLoad);
|
||||
|
||||
BlightedSlimeCorroIcon = ModContent.Request<Texture2D>("CalamityMod/Buffs/Summon/BlightedSlime");
|
||||
BlightedSlimeCrimIcon = ModContent.Request<Texture2D>("CalamityMod/Buffs/Summon/BlightedSlimeCrimson");
|
||||
|
||||
CircularSmear = ModContent.Request<Texture2D>("CalamityMod/Particles/CircularSmear", AssetRequestMode.AsyncLoad);
|
||||
CircularSmearFire1 = ModContent.Request<Texture2D>("CalamityMod/Particles/CircularSmearFire1", AssetRequestMode.AsyncLoad);
|
||||
CircularSmearFire2 = ModContent.Request<Texture2D>("CalamityMod/Particles/CircularSmearFire2", AssetRequestMode.AsyncLoad);
|
||||
|
||||
@@ -68,8 +68,7 @@ namespace CalamityMod.Items.TreasureBags
|
||||
ModContent.ItemType<OverloadedBlaster>(),
|
||||
ModContent.ItemType<AbyssalTome>(),
|
||||
ModContent.ItemType<EldritchTome>(),
|
||||
ModContent.ItemType<CorroslimeStaff>(),
|
||||
ModContent.ItemType<CrimslimeStaff>()
|
||||
ModContent.ItemType<BlightedSlimeStaff>()
|
||||
}));
|
||||
|
||||
// Equipment
|
||||
|
||||
@@ -8,14 +8,15 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Summon
|
||||
{
|
||||
public class CorroslimeStaff : ModItem, ILocalizedModType
|
||||
[LegacyName("CorroslimeStaff", "CrimslimeStaff")]
|
||||
public class BlightedSlimeStaff : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Summon";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 52;
|
||||
Item.height = 54;
|
||||
Item.damage = 24;
|
||||
Item.damage = 20;
|
||||
Item.mana = 10;
|
||||
Item.useAnimation = Item.useTime = 36;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
@@ -25,8 +26,8 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
Item.rare = ItemRarityID.LightRed;
|
||||
Item.UseSound = SoundID.Item44;
|
||||
Item.autoReuse = true;
|
||||
Item.buffType = ModContent.BuffType<Corroslime>();
|
||||
Item.shoot = ModContent.ProjectileType<CorroslimeMinion>();
|
||||
Item.buffType = ModContent.BuffType<BlightedSlime>();
|
||||
Item.shoot = ModContent.ProjectileType<BlightedSlimeMinion>();
|
||||
Item.DamageType = DamageClass.Summon;
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
@@ -1,42 +0,0 @@
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Buffs.Summon;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Summon
|
||||
{
|
||||
public class CrimslimeStaff : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Summon";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 52;
|
||||
Item.height = 52;
|
||||
Item.damage = 24;
|
||||
Item.mana = 10;
|
||||
Item.useAnimation = Item.useTime = 36;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 2f;
|
||||
Item.value = CalamityGlobalItem.RarityLightRedBuyPrice;
|
||||
Item.rare = ItemRarityID.LightRed;
|
||||
Item.UseSound = SoundID.Item44;
|
||||
Item.autoReuse = true;
|
||||
Item.buffType = ModContent.BuffType<Crimslime>();
|
||||
Item.shoot = ModContent.ProjectileType<CrimslimeMinion>();
|
||||
Item.DamageType = DamageClass.Summon;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
player.AddBuff(Item.buffType, 2);
|
||||
var minion = Projectile.NewProjectileDirect(source, player.ClampedMouseWorld(), Vector2.Zero, type, damage, knockback, player.whoAmI);
|
||||
minion.originalDamage = Item.damage;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
@@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
{
|
||||
Item.width = 52;
|
||||
Item.height = 54;
|
||||
Item.damage = 31;
|
||||
Item.damage = 25;
|
||||
Item.mana = 10;
|
||||
Item.useAnimation = Item.useTime = 36;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
|
||||
@@ -1294,6 +1294,11 @@ BlackHawkBuff: {
|
||||
Description: The fighter jet will protect you
|
||||
}
|
||||
|
||||
BlightedSlime: {
|
||||
DisplayName: Blighted Slime
|
||||
Description: The blighted slime will protect you
|
||||
}
|
||||
|
||||
BrimseekerBuff: {
|
||||
DisplayName: Brimseeker
|
||||
Description: Does it want something from you?
|
||||
@@ -1334,11 +1339,6 @@ CloudElemental: {
|
||||
Description: The Cloud Elemental will protect you
|
||||
}
|
||||
|
||||
Corroslime: {
|
||||
DisplayName: Corroslime
|
||||
Description: The corroslime will protect you
|
||||
}
|
||||
|
||||
CorvidHarbringerBuff: {
|
||||
DisplayName: Raven
|
||||
Description: The powerful raven will protect you
|
||||
@@ -1359,11 +1359,6 @@ CosmilampBuff: {
|
||||
Description: The cosmilamp will protect you
|
||||
}
|
||||
|
||||
Crimslime: {
|
||||
DisplayName: Crimslime
|
||||
Description: The crimslime will protect you
|
||||
}
|
||||
|
||||
DaedalusCrystalBuff: {
|
||||
DisplayName: Daedalus Crystal
|
||||
Description: The Daedalus crystal will protect you
|
||||
|
||||
@@ -85,6 +85,11 @@ BlackHawkRemote: {
|
||||
'''
|
||||
}
|
||||
|
||||
BlightedSlimeStaff: {
|
||||
DisplayName: Blighted Slime Staff
|
||||
Tooltip: Summons a blighted slime to fight for you
|
||||
}
|
||||
|
||||
BorealisBomber: {
|
||||
DisplayName: Borealis Bomber
|
||||
Tooltip:
|
||||
@@ -191,11 +196,6 @@ Cnidarian: {
|
||||
'''
|
||||
}
|
||||
|
||||
CorroslimeStaff: {
|
||||
DisplayName: Corroslime Staff
|
||||
Tooltip: Summons a corro slime to fight for you
|
||||
}
|
||||
|
||||
CorvidHarbringerStaff: {
|
||||
DisplayName: Corvid Harbinger Staff
|
||||
Tooltip:
|
||||
@@ -233,11 +233,6 @@ Cosmilamp: {
|
||||
Tooltip: Summons a cosmic lantern above your head to fight for you
|
||||
}
|
||||
|
||||
CrimslimeStaff: {
|
||||
DisplayName: Crimslime Staff
|
||||
Tooltip: Summons a crim slime to fight for you
|
||||
}
|
||||
|
||||
CryogenicStaff: {
|
||||
DisplayName: Cryogenic Staff
|
||||
Tooltip:
|
||||
|
||||
@@ -35,11 +35,10 @@ BlackDragonHead.DisplayName: Black Celestial Dragon
|
||||
BlackDragonTail.DisplayName: Black Celestial Dragon
|
||||
BlackHawkBullet.DisplayName: Black Hawk Bullet
|
||||
BlackHawkSummon.DisplayName: Black Hawk
|
||||
BlightedSlimeMinion.DisplayName: Blighted Slime
|
||||
BloodBreath.DisplayName: Blood Dragon Fire
|
||||
BloodRain.DisplayName: Blood Rain
|
||||
BloodSpit.DisplayName: Blood Spit
|
||||
BoneMatter.DisplayName: Bone Matter
|
||||
BoneMatter2.DisplayName: Bone Matter
|
||||
BrimseekerAuraBall.DisplayName: Seeker
|
||||
BrimstoneDartMinion.DisplayName: Brimfire
|
||||
BrimstoneDartSummon.DisplayName: Brimstone Dart
|
||||
@@ -64,7 +63,6 @@ CinderBlossom.DisplayName: Cinder Blossom
|
||||
CloudElementalMinion.DisplayName: Cloud Elemental
|
||||
CnidarianJellyfishOnTheString.DisplayName: Cnidarian
|
||||
CnidarianSpark.DisplayName: Cnidarian Spark
|
||||
CorroslimeMinion.DisplayName: Corroslime
|
||||
CorruptionSlimeGodMinion.DisplayName: Slime God
|
||||
CosmicBlast.DisplayName: Cosmic Blast
|
||||
CosmicBlastBig.DisplayName: Cosmic Blast
|
||||
@@ -76,7 +74,6 @@ CosmicViperSplittingRocket.DisplayName: Splitting Rocket
|
||||
CosmicViperSummon.DisplayName: Cosmic Viper
|
||||
CosmilampBeam.DisplayName: Cosmic Beam
|
||||
CosmilampMinion.DisplayName: Cosmilamp
|
||||
CrimslimeMinion.DisplayName: Crimslime
|
||||
CrimsonSlimeGodMinion.DisplayName: Slime God
|
||||
DaedalusCrystal.DisplayName: Daedalus Crystal
|
||||
DaedalusCrystalShot.DisplayName: Crystal Shot
|
||||
|
||||
@@ -1173,8 +1173,7 @@ namespace CalamityMod
|
||||
RegisterSummon(ItemType<HerringStaff>(), BuffType<Herring>(), ProjectileType<HerringMinion>());
|
||||
RegisterSummon(ItemType<EyeOfNight>(), BuffType<EyeOfNightBuff>(), ProjectileType<EyeOfNightSummon>());
|
||||
RegisterSummon(ItemType<FleshOfInfidelity>(), BuffType<FleshBallBuff>(), ProjectileType<FleshBallMinion>());
|
||||
RegisterSummon(ItemType<CorroslimeStaff>(), BuffType<Corroslime>(), ProjectileType<CorroslimeMinion>());
|
||||
RegisterSummon(ItemType<CrimslimeStaff>(), BuffType<Crimslime>(), ProjectileType<CrimslimeMinion>());
|
||||
RegisterSummon(ItemType<BlightedSlimeStaff>(), BuffType<BlightedSlime>(), ProjectileType<BlightedSlimeMinion>());
|
||||
RegisterSummon(ItemType<BlackHawkRemote>(), BuffType<BlackHawkBuff>(), ProjectileType<BlackHawkSummon>());
|
||||
RegisterSummon(ItemType<CausticStaff>(), BuffType<CausticStaffBuff>(), ProjectileType<CausticStaffSummon>());
|
||||
RegisterSummon(ItemType<AncientIceChunk>(), BuffType<IceClasperBuff>(), ProjectileType<IceClasperMinion>());
|
||||
|
||||
@@ -652,8 +652,7 @@ IL_6899:
|
||||
ModContent.ItemType<OverloadedBlaster>(),
|
||||
ModContent.ItemType<AbyssalTome>(),
|
||||
ModContent.ItemType<EldritchTome>(),
|
||||
ModContent.ItemType<CorroslimeStaff>(),
|
||||
ModContent.ItemType<CrimslimeStaff>()
|
||||
ModContent.ItemType<BlightedSlimeStaff>()
|
||||
};
|
||||
normalOnly.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, weapons));
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
@@ -2,23 +2,34 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Summon
|
||||
{
|
||||
public class CrimslimeMinion : ModProjectile, ILocalizedModType
|
||||
public class BlightedSlimeMinion : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Summon";
|
||||
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
||||
public float dust = 0f;
|
||||
|
||||
public static Asset<Texture2D> Corroslime;
|
||||
public static Asset<Texture2D> Crimslime;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.projFrames[Type] = 6;
|
||||
Main.projPet[Type] = true;
|
||||
ProjectileID.Sets.MinionSacrificable[Type] = true;
|
||||
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
|
||||
|
||||
if (!Main.dedServ)
|
||||
{
|
||||
Corroslime = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Summon/BlightedSlimeCorro");
|
||||
Crimslime = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Summon/BlightedSlimeCrim");
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -34,16 +45,16 @@ namespace CalamityMod.Projectiles.Summon
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.timeLeft *= 5;
|
||||
Projectile.minion = true;
|
||||
AIType = ProjectileID.BabySlime;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 23;
|
||||
AIType = ProjectileID.BabySlime;
|
||||
Projectile.localNPCHitCooldown = 30;
|
||||
Projectile.DamageType = DamageClass.Summon;
|
||||
}
|
||||
|
||||
public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough, ref Vector2 hitboxCenterFrac)
|
||||
{
|
||||
fallThrough = false;
|
||||
//fallThrough = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -53,28 +64,28 @@ namespace CalamityMod.Projectiles.Summon
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (dust == 0f)
|
||||
{
|
||||
int constant = 16;
|
||||
for (int i = 0; i < constant; i++)
|
||||
int dustAmt = 16;
|
||||
for (int i = 0; i < dustAmt; i++)
|
||||
{
|
||||
Vector2 rotate = Vector2.Normalize(Projectile.velocity) * new Vector2((float)Projectile.width / 2f, (float)Projectile.height) * 0.75f;
|
||||
rotate = rotate.RotatedBy((double)((float)(i - (constant / 2 - 1)) * 6.28318548f / (float)constant), default) + Projectile.Center;
|
||||
Vector2 rotate = Vector2.Normalize(Projectile.velocity) * new Vector2(Projectile.width / 2f, Projectile.height) * 0.75f;
|
||||
rotate = rotate.RotatedBy((i - (dustAmt / 2 - 1)) * MathHelper.TwoPi / (float)dustAmt) + Projectile.Center;
|
||||
Vector2 faceDirection = rotate - Projectile.Center;
|
||||
int dust = Dust.NewDust(rotate + faceDirection, 0, 0, DustID.Blood, faceDirection.X * 1f, faceDirection.Y * 1f, 100, default, 1.1f);
|
||||
int dust = Dust.NewDust(rotate + faceDirection, 0, 0, WorldGen.crimson ? DustID.Blood : DustID.Demonite, faceDirection.X, faceDirection.Y, 100, default, 1.1f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].noLight = true;
|
||||
Main.dust[dust].velocity = faceDirection;
|
||||
}
|
||||
dust += 1f;
|
||||
}
|
||||
bool isMinion = Projectile.type == ModContent.ProjectileType<CrimslimeMinion>();
|
||||
player.AddBuff(ModContent.BuffType<Crimslime>(), 3600);
|
||||
bool isMinion = Projectile.type == ModContent.ProjectileType<BlightedSlimeMinion>();
|
||||
player.AddBuff(ModContent.BuffType<BlightedSlime>(), 3600);
|
||||
if (isMinion)
|
||||
{
|
||||
if (player.dead)
|
||||
{
|
||||
modPlayer.cSlime2 = false;
|
||||
modPlayer.blightedSlime = false;
|
||||
}
|
||||
if (modPlayer.cSlime2)
|
||||
if (modPlayer.blightedSlime)
|
||||
{
|
||||
Projectile.timeLeft = 2;
|
||||
}
|
||||
@@ -85,7 +96,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value;
|
||||
Texture2D texture2D13 = (WorldGen.crimson ? Crimslime : Corroslime).Value;
|
||||
int framing = texture2D13.Height / Main.projFrames[Type];
|
||||
int y6 = framing * Projectile.frame;
|
||||
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.None, 0);
|
||||
@@ -1,34 +0,0 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Projectiles.Summon
|
||||
{
|
||||
public class BoneMatter : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Summon";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.projFrames[Type] = 6;
|
||||
ProjectileID.Sets.MinionShot[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 26;
|
||||
Projectile.height = 32;
|
||||
Projectile.friendly = true;
|
||||
Projectile.tileCollide = true;
|
||||
Projectile.DamageType = DamageClass.Summon;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
if (Projectile.frameCounter++ % 9 == 8)
|
||||
{
|
||||
Projectile.frame++;
|
||||
if (Projectile.frame >= Main.projFrames[Type])
|
||||
Projectile.Kill();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.2 KiB |
@@ -1,35 +0,0 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Projectiles.Summon
|
||||
{
|
||||
public class BoneMatter2 : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Summon";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.projFrames[Type] = 6;
|
||||
ProjectileID.Sets.MinionShot[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 26;
|
||||
Projectile.height = 28;
|
||||
Projectile.friendly = true;
|
||||
Projectile.tileCollide = true;
|
||||
Projectile.DamageType = DamageClass.Summon;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Projectile.frameCounter++;
|
||||
if (Projectile.frameCounter % 9 == 8)
|
||||
{
|
||||
Projectile.frame++;
|
||||
if (Projectile.frame >= Main.projFrames[Type])
|
||||
Projectile.Kill();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.1 KiB |
@@ -1,97 +0,0 @@
|
||||
using CalamityMod.Buffs.Summon;
|
||||
using CalamityMod.CalPlayer;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Summon
|
||||
{
|
||||
public class CorroslimeMinion : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Summon";
|
||||
public float dust = 0f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.projFrames[Type] = 6;
|
||||
Main.projPet[Type] = true;
|
||||
ProjectileID.Sets.MinionSacrificable[Type] = true;
|
||||
ProjectileID.Sets.MinionTargettingFeature[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 26;
|
||||
Projectile.height = 26;
|
||||
Projectile.netImportant = true;
|
||||
Projectile.friendly = true;
|
||||
Projectile.minionSlots = 1;
|
||||
Projectile.alpha = 75;
|
||||
Projectile.aiStyle = ProjAIStyleID.Pet;
|
||||
Projectile.timeLeft = 18000;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.timeLeft *= 5;
|
||||
Projectile.minion = true;
|
||||
AIType = ProjectileID.BabySlime;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = 23;
|
||||
Projectile.DamageType = DamageClass.Summon;
|
||||
}
|
||||
|
||||
public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough, ref Vector2 hitboxCenterFrac)
|
||||
{
|
||||
fallThrough = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Player player = Main.player[Projectile.owner];
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (dust == 0f)
|
||||
{
|
||||
int constant = 16;
|
||||
for (int i = 0; i < constant; i++)
|
||||
{
|
||||
Vector2 rotate = Vector2.Normalize(Projectile.velocity) * new Vector2((float)Projectile.width / 2f, (float)Projectile.height) * 0.75f;
|
||||
rotate = rotate.RotatedBy((double)((float)(i - (constant / 2 - 1)) * 6.28318548f / (float)constant), default) + Projectile.Center;
|
||||
Vector2 faceDirection = rotate - Projectile.Center;
|
||||
int dust = Dust.NewDust(rotate + faceDirection, 0, 0, DustID.Demonite, faceDirection.X * 1f, faceDirection.Y * 1f, 100, default, 1.1f);
|
||||
Main.dust[dust].noGravity = true;
|
||||
Main.dust[dust].noLight = true;
|
||||
Main.dust[dust].velocity = faceDirection;
|
||||
}
|
||||
dust += 1f;
|
||||
}
|
||||
bool isMinion = Projectile.type == ModContent.ProjectileType<CorroslimeMinion>();
|
||||
player.AddBuff(ModContent.BuffType<Corroslime>(), 3600);
|
||||
if (isMinion)
|
||||
{
|
||||
if (player.dead)
|
||||
{
|
||||
modPlayer.cSlime = false;
|
||||
}
|
||||
if (modPlayer.cSlime)
|
||||
{
|
||||
Projectile.timeLeft = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool MinionContactDamage() => true;
|
||||
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
Texture2D texture2D13 = Terraria.GameContent.TextureAssets.Projectile[Type].Value;
|
||||
int framing = Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height / Main.projFrames[Type];
|
||||
int y6 = framing * Projectile.frame;
|
||||
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.None, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool OnTileCollide(Vector2 oldVelocity) => false;
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
public class CorruptionSlimeGodMinion : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Summon";
|
||||
public override string Texture => "CalamityMod/Projectiles/Summon/CorroslimeMinion";
|
||||
public override string Texture => "CalamityMod/Projectiles/Summon/BlightedSlimeCorro";
|
||||
public float dust = 0f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
|
||||
|
Before Width: | Height: | Size: 614 B |
@@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
public class CrimsonSlimeGodMinion : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Summon";
|
||||
public override string Texture => "CalamityMod/Projectiles/Summon/CrimslimeMinion";
|
||||
public override string Texture => "CalamityMod/Projectiles/Summon/BlightedSlimeCrim";
|
||||
public float dust = 0f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
|
||||
|
Before Width: | Height: | Size: 602 B |
@@ -36,9 +36,8 @@ namespace CalamityMod.Projectiles.Summon
|
||||
Projectile.timeLeft *= 5;
|
||||
Projectile.minion = true;
|
||||
Projectile.DamageType = DamageClass.Summon;
|
||||
Projectile.MaxUpdates = 2;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = Projectile.MaxUpdates * 15;
|
||||
Projectile.localNPCHitCooldown = 20;
|
||||
}
|
||||
public override void SendExtraAI(BinaryWriter writer)
|
||||
{
|
||||
@@ -66,82 +65,61 @@ namespace CalamityMod.Projectiles.Summon
|
||||
Projectile.frameCounter = 0;
|
||||
}
|
||||
if (Projectile.frame < 1)
|
||||
{
|
||||
Projectile.frame = 1;
|
||||
}
|
||||
if (Projectile.frame >= Main.projFrames[Type])
|
||||
{
|
||||
Projectile.frame = 1;
|
||||
}
|
||||
|
||||
bool isCorrectProjectile = Projectile.type == ModContent.ProjectileType<SmallSkeletonMinion>();
|
||||
player.AddBuff(ModContent.BuffType<SmallSkeletonBuff>(), 3600);
|
||||
if (isCorrectProjectile)
|
||||
{
|
||||
if (player.dead)
|
||||
{
|
||||
modPlayer.necrosteocytesDudes = false;
|
||||
}
|
||||
if (modPlayer.necrosteocytesDudes)
|
||||
{
|
||||
Projectile.timeLeft = 2;
|
||||
}
|
||||
}
|
||||
NPC potentialTarget = Projectile.Center.MinionHoming(900f, player);
|
||||
if (Projectile.velocity.Y == 0 && (HoleBelow() || (Projectile.Distance(player.Center) > 205f && Projectile.position.X == Projectile.oldPosition.X)))
|
||||
{
|
||||
if (Projectile.velocity.Y == 0 && (HoleBelow() || (Projectile.Distance(player.Center) > 320f && Projectile.position.X == Projectile.oldPosition.X) || (potentialTarget is not null && Projectile.Top.Y > potentialTarget.Bottom.Y)))
|
||||
Projectile.velocity.Y = -10f;
|
||||
}
|
||||
else if (Projectile.velocity.Y != 0f)
|
||||
{
|
||||
Projectile.frame = 2;
|
||||
}
|
||||
if (Projectile.velocity.Y > -16f)
|
||||
{
|
||||
if (Projectile.velocity.Y < 16f)
|
||||
Projectile.velocity.Y += 0.3f;
|
||||
}
|
||||
|
||||
Projectile.ai[0]++;
|
||||
if (Projectile.ai[0] % 60f == 59f && Main.myPlayer == Projectile.owner)
|
||||
{
|
||||
int type = Utils.SelectRandom(Main.rand, ModContent.ProjectileType<BoneMatter>(), ModContent.ProjectileType<BoneMatter2>());
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, type, Projectile.damage, Projectile.knockBack, Projectile.owner);
|
||||
}
|
||||
if (potentialTarget is null)
|
||||
{
|
||||
if (Math.Abs(player.Center.X - Projectile.Center.X + 40f * Projectile.minionPos) > 160f)
|
||||
if (Math.Abs(player.Center.X - Projectile.Center.X - 30f * Projectile.minionPos * player.direction) > 80f)
|
||||
{
|
||||
Projectile.velocity.X += Main.rand.NextFloat(0.11f, 0.16f) * (player.Center.X - Projectile.Center.X + 40f * Projectile.minionPos > 0f).ToDirectionInt();
|
||||
Projectile.velocity.X += Main.rand.NextFloat(0.1f, 0.13f) * (player.Center.X - Projectile.Center.X + 40f * Projectile.minionPos > 0f).ToDirectionInt();
|
||||
Projectile.velocity.X = MathHelper.Clamp(Projectile.velocity.X, -13f, 13f);
|
||||
}
|
||||
else
|
||||
{
|
||||
Projectile.velocity.X *= 0.95f;
|
||||
Projectile.velocity.X *= 0.925f;
|
||||
if (MathF.Abs(Projectile.velocity.X) < 0.05f)
|
||||
Projectile.velocity.X = 0f;
|
||||
}
|
||||
if (Projectile.Distance(player.Center) <= 150f)
|
||||
{
|
||||
|
||||
if (Projectile.velocity.X == 0f)
|
||||
Projectile.frame = 0;
|
||||
}
|
||||
if (Projectile.Distance(player.Center) > 1600f)
|
||||
{
|
||||
Projectile.Center = player.Center;
|
||||
Projectile.velocity = Vector2.Zero;
|
||||
Projectile.netUpdate = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Math.Abs(potentialTarget.Center.X - Projectile.Center.X + (int)MathHelper.Min(potentialTarget.width / 2, 40f)) > (int)MathHelper.Min(potentialTarget.width / 2, 40f))
|
||||
{
|
||||
Projectile.velocity.X += Main.rand.NextFloat(0.08f, 0.15f) * (potentialTarget.Center.X - Projectile.Center.X > 0f).ToDirectionInt();
|
||||
Projectile.velocity.X = MathHelper.Clamp(Projectile.velocity.X, -16f, 16f);
|
||||
}
|
||||
else
|
||||
{
|
||||
Projectile.velocity.X += Main.rand.NextFloat(0.1f, 0.13f) * (potentialTarget.Center.X > Projectile.Center.X).ToDirectionInt();
|
||||
Projectile.velocity.X = MathHelper.Clamp(Projectile.velocity.X, -13f, 13f);
|
||||
if (Math.Sign(Projectile.velocity.X) != (potentialTarget.Center.X > Projectile.Center.X).ToDirectionInt())
|
||||
Projectile.velocity.X *= 0.95f;
|
||||
}
|
||||
|
||||
if (Projectile.Distance(player.Center) > 1400f)
|
||||
{
|
||||
Projectile.Center = player.Center;
|
||||
Projectile.velocity = Vector2.Zero;
|
||||
Projectile.netUpdate = true;
|
||||
}
|
||||
Projectile.MinionAntiClump(0.075f);
|
||||
|
||||