final adjustments
No files matched your search
@@ -52,9 +52,6 @@ namespace CalamityMod.Balancing
|
||||
bool HiveBeeFilter(Projectile p) =>
|
||||
p.type == ProjectileType<BasicPlagueBee>() && Main.player[p.owner].ActiveItem().type == ItemType<TheHive>();
|
||||
|
||||
bool EradicatorLaserFilter(Projectile p) =>
|
||||
p.type == ProjectileType<NebulaShot>() && p.DamageType == RogueDamageClass.Instance;
|
||||
|
||||
NPCSpecificBalancingChanges = new List<NPCBalancingChange>();
|
||||
|
||||
#region Crabulon
|
||||
@@ -402,9 +399,6 @@ namespace CalamityMod.Balancing
|
||||
// 20% resist to Ariane's aura (Lilies of Finality).
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<LiliesOfFinalityAoE>()))));
|
||||
|
||||
// 20% resist to Eradicator's beams.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileSpecificRequirementBalancingRule(0.8f, EradicatorLaserFilter))));
|
||||
|
||||
// 20% resist to Mirror of Kalandra's Paradoxica minion.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.Thanatos, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType<Paradoxica>()))));
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class Mechworm : BaseSummonBuff
|
||||
public class VoidEaterMarionetteBuff : BaseSummonBuff
|
||||
{
|
||||
protected override int MinionProjectileType => ModContent.ProjectileType<MechwormHead>();
|
||||
protected override int MinionProjectileType => ModContent.ProjectileType<VoidEaterMarionetteHead>();
|
||||
|
||||
protected override ref bool MinionBool => ref BuffModdedOwner.mWorm;
|
||||
protected override ref bool MinionBool => ref BuffModdedOwner.hasVoidEaterMarionette;
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 704 B After Width: | Height: | Size: 704 B |
@@ -1431,8 +1431,7 @@ namespace CalamityMod.CalPlayer
|
||||
#region Minion
|
||||
public bool wDroid = false;
|
||||
public bool resButterfly = false;
|
||||
/// <summary> Staff of the Mechworm. </summary>
|
||||
public bool mWorm = false;
|
||||
public bool hasVoidEaterMarionette = false;
|
||||
public bool IceClasperBool = false;
|
||||
public bool magicHat = false;
|
||||
public bool herring = false;
|
||||
@@ -2598,7 +2597,7 @@ namespace CalamityMod.CalPlayer
|
||||
#region Minion Reset Effects
|
||||
wDroid = false;
|
||||
resButterfly = false;
|
||||
mWorm = false;
|
||||
hasVoidEaterMarionette = false;
|
||||
IceClasperBool = false;
|
||||
magicHat = false;
|
||||
herring = false;
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
//Charge animation for Thread of Eradication
|
||||
if (Player.HeldItem.type == ModContent.ItemType<Deathwind>() && !Player.ItemTimeIsZero && drawInfo.shadow == 0f)
|
||||
if (Player.HeldItem.type == ModContent.ItemType<ThreadOfEradication>() && !Player.ItemTimeIsZero && drawInfo.shadow == 0f)
|
||||
{
|
||||
var color = Color.Fuchsia;
|
||||
float scale = (1 - (Player.itemTime - 7) / 50f) * 0.2f;
|
||||
|
||||
@@ -54,16 +54,16 @@ namespace CalamityMod.CalPlayer.DrawLayers
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Ranged/CleansingBlazeGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<CosmicImmaterializer>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Summon/CosmicImmaterializerGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<DeathhailStaff>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Magic/DeathhailStaffGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<Deathwind>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Ranged/DeathwindGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<HyperdeathRiftScepter>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Magic/HyperdeathRiftScepterGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<ThreadOfEradication>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Ranged/ThreadOfEradicationGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<EssenceFlayer>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Melee/EssenceFlayerGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<EtherealSubjugator>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Summon/EtherealSubjugatorGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<Excelsus>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Melee/ExcelsusGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<MawOfInfinity>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Melee/MawOfInfinityGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<FatesReveal>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Magic/FatesRevealGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<GreatswordofJudgement>())
|
||||
|
||||
@@ -76,12 +76,12 @@ namespace CalamityMod.Items.TreasureBags
|
||||
// Weapons
|
||||
itemLoot.Add(DropHelper.CalamityStyle(DropHelper.BagWeaponDropRateFraction, new int[]
|
||||
{
|
||||
ModContent.ItemType<Excelsus>(),
|
||||
ModContent.ItemType<MawOfInfinity>(),
|
||||
ModContent.ItemType<TheObliterator>(),
|
||||
ModContent.ItemType<Deathwind>(),
|
||||
ModContent.ItemType<DeathhailStaff>(),
|
||||
ModContent.ItemType<StaffoftheMechworm>(),
|
||||
ModContent.ItemType<Eradicator>()
|
||||
ModContent.ItemType<ThreadOfEradication>(),
|
||||
ModContent.ItemType<HyperdeathRiftScepter>(),
|
||||
ModContent.ItemType<VoidEaterMarionette>(),
|
||||
ModContent.ItemType<DimensionTearingDisk>()
|
||||
}));
|
||||
itemLoot.Add(ModContent.ItemType<CosmicDischarge>(), 10);
|
||||
|
||||
|
||||
@@ -47,8 +47,8 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
CreateRecipe().
|
||||
AddIngredient(ItemID.SpellTome).
|
||||
AddIngredient<CosmicDischarge>().
|
||||
AddIngredient<StaffoftheMechworm>(2).
|
||||
AddIngredient<Excelsus>(2).
|
||||
AddIngredient<VoidEaterMarionette>(2).
|
||||
AddIngredient<MawOfInfinity>(2).
|
||||
AddIngredient<ShadowspecBar>(5).
|
||||
AddIngredient<CosmiliteBar>(33).
|
||||
AddIngredient<AscendantSpiritEssence>(11).
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Items.Weapons.Summon;
|
||||
using CalamityMod.NPCs.DevourerofGods;
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using CalamityMod.Rarities;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -8,17 +10,24 @@ using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
public class DeathhailStaff : ModItem, ILocalizedModType
|
||||
[LegacyName("DeathhailStaff")]
|
||||
public class HyperdeathRiftScepter : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Magic";
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
tooltips.FindAndReplace("ff00ff", Utils.Hex3(DevourerofGodsHead.SpecialMoveColor));
|
||||
}
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.staff[Type] = true;
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<StaffoftheMechworm>();
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<VoidEaterMarionette>();
|
||||
}
|
||||
public override void SetDefaults()
|
||||
{
|
||||
@@ -36,13 +45,13 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
Item.rare = ModContent.RarityType<CosmicPurple>();
|
||||
Item.UseSound = SoundID.Item12 with {Volume = 0.75f};
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ModContent.ProjectileType<DeathhailBeam>();
|
||||
Item.shoot = ModContent.ProjectileType<HyperdeathRiftScepterBeam>();
|
||||
Item.shootSpeed = 18f;
|
||||
}
|
||||
|
||||
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
|
||||
{
|
||||
Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Magic/DeathhailStaffGlow").Value);
|
||||
Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Magic/HyperdeathRiftScepterGlow").Value);
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 493 B After Width: | Height: | Size: 493 B |
@@ -1,4 +1,6 @@
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.NPCs.DevourerofGods;
|
||||
using CalamityMod.Projectiles.BaseProjectiles;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using CalamityMod.Rarities;
|
||||
@@ -7,19 +9,26 @@ using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
public class Excelsus : BaseSwordHoldoutItem, ILocalizedModType
|
||||
[LegacyName("Excelsus")]
|
||||
public class MawOfInfinity : BaseSwordHoldoutItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Melee";
|
||||
public override int ProjectileType => ModContent.ProjectileType<ExcelsusHoldout>();
|
||||
public override int ProjectileType => ModContent.ProjectileType<MawOfInfinityHoldout>();
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<TheObliterator>();
|
||||
base.SetStaticDefaults();
|
||||
}
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
tooltips.FindAndReplace("ff00ff", Utils.Hex3(DevourerofGodsHead.SpecialMoveColor));
|
||||
tooltips.FindAndReplace("ff00ff", Utils.Hex3(DevourerofGodsHead.SpecialMoveColor));
|
||||
}
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 78;
|
||||
@@ -34,14 +43,14 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.autoReuse = true;
|
||||
Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice;
|
||||
Item.rare = ModContent.RarityType<CosmicPurple>();
|
||||
Item.shoot = ModContent.ProjectileType<ExcelsusHoldout>();
|
||||
Item.shoot = ModContent.ProjectileType<MawOfInfinityHoldout>();
|
||||
Item.shootSpeed = 12f;
|
||||
base.SetDefaults();
|
||||
}
|
||||
|
||||
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
|
||||
{
|
||||
Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Melee/ExcelsusGlow").Value);
|
||||
Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Melee/MawOfInfinityGlow").Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@@ -2,6 +2,7 @@
|
||||
using CalamityMod.Items.Weapons.Magic;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.NPCs.DevourerofGods;
|
||||
using CalamityMod.Projectiles.Melee.Yoyos;
|
||||
using CalamityMod.Rarities;
|
||||
using Terraria;
|
||||
@@ -18,13 +19,19 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public static float Reach = 720f;
|
||||
public static float Speed = 54f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(Reach.ToTiles(), Speed);
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
tooltips.FindAndReplace("[GFB]", this.GetLocalizedValue(Main.zenithWorld ? "TooltipGFB" : "TooltipNormal"));
|
||||
if (!Main.zenithWorld)
|
||||
tooltips.FindAndReplace("ff00ff", Utils.Hex3(DevourerofGodsHead.SpecialMoveColor));
|
||||
}
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
ItemID.Sets.Yoyo[Type] = true;
|
||||
ItemID.Sets.GamepadExtraRange[Type] = 15;
|
||||
ItemID.Sets.GamepadSmartQuickReach[Type] = true;
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<Deathwind>();
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<ThreadOfEradication>();
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -52,6 +59,5 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
|
||||
public override void ModifyTooltips(List<TooltipLine> list) => list.FindAndReplace("[GFB]", this.GetLocalizedValue(Main.zenithWorld ? "TooltipGFB" : "TooltipNormal"));
|
||||
}
|
||||
}
|
||||
@@ -63,7 +63,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Projectile.NewProjectile(source, position + velocity.SafeNormalize(Vector2.Zero) * 16f, randomVelocity, type, damage, knockback, player.whoAmI);
|
||||
}
|
||||
|
||||
// Spawn a beam from the sky ala Deathhail Staff or Lunar Flare
|
||||
// Spawn a beam from the sky ala Hyperdeath Rift Scepter or Lunar Flare
|
||||
// This is more powerful if Hallow-Point Rounds (either naturally used or converted) are fired
|
||||
bool empowered = type == ModContent.ProjectileType<HallowPointRoundProj>();
|
||||
float laserSpeed = 8f;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using CalamityMod.Items.Weapons.Magic;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.Items.Weapons.Magic;
|
||||
using CalamityMod.NPCs.DevourerofGods;
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
@@ -8,16 +10,24 @@ using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
public class Deathwind : ModItem, ILocalizedModType
|
||||
[LegacyName("Deathwind")]
|
||||
public class ThreadOfEradication : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Ranged";
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
tooltips.FindAndReplace("ff00ff", Utils.Hex3(DevourerofGodsHead.SpecialMoveColor));
|
||||
tooltips.FindAndReplace("ff00ff", Utils.Hex3(DevourerofGodsHead.SpecialMoveColor));
|
||||
tooltips.FindAndReplace("ff00ff", Utils.Hex3(DevourerofGodsHead.SpecialMoveColor));
|
||||
}
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<DeathhailStaff>();
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<HyperdeathRiftScepter>();
|
||||
}
|
||||
public override void SetDefaults()
|
||||
{
|
||||
@@ -41,7 +51,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
|
||||
{
|
||||
Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Ranged/DeathwindGlow").Value);
|
||||
Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Ranged/ThreadOfEradicationGlow").Value);
|
||||
}
|
||||
private int storedDMG = 1;
|
||||
private float storedKB = 1;
|
||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 475 B After Width: | Height: | Size: 475 B |
@@ -1,4 +1,6 @@
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using CalamityMod.NPCs.DevourerofGods;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using CalamityMod.Rarities;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -6,16 +8,18 @@ using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
public class Eradicator : RogueWeapon
|
||||
[LegacyName("Eradicator")]
|
||||
public class DimensionTearingDisk : RogueWeapon
|
||||
{
|
||||
public static float Speed = 10.5f;
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<Excelsus>();
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<MawOfInfinity>();
|
||||
}
|
||||
public override void SetDefaults()
|
||||
{
|
||||
@@ -32,10 +36,15 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Item.UseSound = SoundID.Item1;
|
||||
Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice;
|
||||
Item.rare = ModContent.RarityType<CosmicPurple>();
|
||||
Item.shoot = ModContent.ProjectileType<EradicatorProjectile>();
|
||||
Item.shoot = ModContent.ProjectileType<DimensionTearingDiskProjectile>();
|
||||
Item.shootSpeed = Speed;
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
tooltips.FindAndReplace("ff00ff", Utils.Hex3(DevourerofGodsHead.SpecialMoveColor));
|
||||
}
|
||||
|
||||
public override float StealthDamageMultiplier => 1f;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
@@ -50,7 +59,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
|
||||
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
|
||||
{
|
||||
Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Rogue/EradicatorGlow").Value);
|
||||
Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Rogue/DimensionTearingDiskGlow").Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
@@ -72,7 +72,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<Eradicator>().
|
||||
AddIngredient<DimensionTearingDisk>().
|
||||
AddIngredient<AerialTracker>().
|
||||
AddIngredient<AuricBar>(5).
|
||||
AddTile<CosmicAnvil>().
|
||||
|
||||
@@ -197,7 +197,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<Excelsus>().
|
||||
AddIngredient<MawOfInfinity>().
|
||||
AddIngredient<CosmicViperEngine>().
|
||||
AddIngredient(ItemID.WingsVortex).
|
||||
AddIngredient<ShadowspecBar>(5).
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<StaffoftheMechworm>();
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<VoidEaterMarionette>();
|
||||
ItemID.Sets.StaffMinionSlotsRequired[Type] = 4f;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,22 +1,32 @@
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using CalamityMod.Buffs.Summon;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.NPCs.DevourerofGods;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using CalamityMod.Rarities;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Summon
|
||||
{
|
||||
public class StaffoftheMechworm : ModItem, ILocalizedModType
|
||||
[LegacyName("StaffoftheMechworm")]
|
||||
public class VoidEaterMarionette : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Summon";
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
tooltips.FindAndReplace("ff00ff", Utils.Hex3(DevourerofGodsHead.SpecialMoveColor));
|
||||
tooltips.FindAndReplace("ff00ff", Utils.Hex3(DevourerofGodsHead.SpecialMoveColor));
|
||||
}
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<Eradicator>();
|
||||
ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType<DimensionTearingDisk>();
|
||||
}
|
||||
public override void SetDefaults()
|
||||
{
|
||||
@@ -32,11 +42,10 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
Item.rare = ModContent.RarityType<CosmicPurple>();
|
||||
Item.UseSound = SoundID.Item113;
|
||||
Item.autoReuse = true;
|
||||
Item.buffType = ModContent.BuffType<Mechworm>();
|
||||
Item.shoot = ModContent.ProjectileType<MechwormHead>();
|
||||
Item.buffType = ModContent.BuffType<VoidEaterMarionetteBuff>();
|
||||
Item.shoot = ModContent.ProjectileType<VoidEaterMarionetteHead>();
|
||||
Item.DamageType = DamageClass.Summon;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
float neededSlots = 1;
|
||||
@@ -63,19 +72,19 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
|
||||
Vector2 mouse = owner.ClampedMouseWorld();
|
||||
|
||||
int curr = Projectile.NewProjectile(source, mouse, Vector2.Zero, ModContent.ProjectileType<MechwormHead>(), damage, knockback, owner.whoAmI, 0f, 0f);
|
||||
int curr = Projectile.NewProjectile(source, mouse, Vector2.Zero, ModContent.ProjectileType<VoidEaterMarionetteHead>(), damage, knockback, owner.whoAmI, 0f, 0f);
|
||||
if (Main.projectile.IndexInRange(curr))
|
||||
Main.projectile[curr].originalDamage = baseDamage;
|
||||
curr = Projectile.NewProjectile(source, mouse, Vector2.Zero, ModContent.ProjectileType<MechwormBody>(), damage, knockback, owner.whoAmI, Main.projectile[curr].identity, 0f);
|
||||
curr = Projectile.NewProjectile(source, mouse, Vector2.Zero, ModContent.ProjectileType<VoidEaterMarionetteBody>(), damage, knockback, owner.whoAmI, Main.projectile[curr].identity, 0f);
|
||||
if (Main.projectile.IndexInRange(curr))
|
||||
Main.projectile[curr].originalDamage = baseDamage;
|
||||
int prev = curr;
|
||||
curr = Projectile.NewProjectile(source, mouse, Vector2.Zero, ModContent.ProjectileType<MechwormBody>(), damage, knockback, owner.whoAmI, Main.projectile[curr].identity, 0f);
|
||||
curr = Projectile.NewProjectile(source, mouse, Vector2.Zero, ModContent.ProjectileType<VoidEaterMarionetteBody>(), damage, knockback, owner.whoAmI, Main.projectile[curr].identity, 0f);
|
||||
if (Main.projectile.IndexInRange(curr))
|
||||
Main.projectile[curr].originalDamage = baseDamage;
|
||||
Main.projectile[prev].localAI[1] = curr;
|
||||
prev = curr;
|
||||
curr = Projectile.NewProjectile(source, mouse, Vector2.Zero, ModContent.ProjectileType<MechwormTail>(), damage, knockback, owner.whoAmI, Main.projectile[curr].identity, 0f);
|
||||
curr = Projectile.NewProjectile(source, mouse, Vector2.Zero, ModContent.ProjectileType<VoidEaterMarionetteTail>(), damage, knockback, owner.whoAmI, Main.projectile[curr].identity, 0f);
|
||||
if (Main.projectile.IndexInRange(curr))
|
||||
Main.projectile[curr].originalDamage = baseDamage;
|
||||
Main.projectile[prev].localAI[1] = curr;
|
||||
@@ -89,10 +98,10 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
return;
|
||||
|
||||
Vector2 spawnPosition = Main.projectile[tailIndex].Center;
|
||||
Projectile tailAheadSegment = Main.projectile.Take(Main.maxProjectiles).FirstOrDefault(proj => MechwormBody.SameIdentity(proj, owner.whoAmI, (int)Main.projectile[tailIndex].ai[0]));
|
||||
int body = Projectile.NewProjectile(source, spawnPosition, Vector2.Zero, ModContent.ProjectileType<MechwormBody>(), damage, knockback, owner.whoAmI, tailAheadSegment.identity, 0f);
|
||||
Projectile tailAheadSegment = Main.projectile.Take(Main.maxProjectiles).FirstOrDefault(proj => VoidEaterMarionetteBody.SameIdentity(proj, owner.whoAmI, (int)Main.projectile[tailIndex].ai[0]));
|
||||
int body = Projectile.NewProjectile(source, spawnPosition, Vector2.Zero, ModContent.ProjectileType<VoidEaterMarionetteBody>(), damage, knockback, owner.whoAmI, tailAheadSegment.identity, 0f);
|
||||
int body2 = body;
|
||||
body = Projectile.NewProjectile(source, spawnPosition, Vector2.Zero, ModContent.ProjectileType<MechwormBody>(), damage, knockback, owner.whoAmI, Main.projectile[body].identity, 0f);
|
||||
body = Projectile.NewProjectile(source, spawnPosition, Vector2.Zero, ModContent.ProjectileType<VoidEaterMarionetteBody>(), damage, knockback, owner.whoAmI, Main.projectile[body].identity, 0f);
|
||||
|
||||
var m = Main.projectileIdentity;
|
||||
Main.projectile[tailIndex].ai[0] = Main.projectile[body].identity;
|
||||
@@ -112,11 +121,11 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
{
|
||||
if (p.owner == Main.myPlayer)
|
||||
{
|
||||
if (head == -1 && p.type == ModContent.ProjectileType<MechwormHead>())
|
||||
if (head == -1 && p.type == ModContent.ProjectileType<VoidEaterMarionetteHead>())
|
||||
{
|
||||
head = p.whoAmI;
|
||||
}
|
||||
if (tail == -1 && p.type == ModContent.ProjectileType<MechwormTail>())
|
||||
if (tail == -1 && p.type == ModContent.ProjectileType<VoidEaterMarionetteTail>())
|
||||
{
|
||||
tail = p.whoAmI;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
@@ -1348,7 +1348,7 @@ MagicHatBuff: {
|
||||
Description: The hat carries your soul, bound by a contract
|
||||
}
|
||||
|
||||
Mechworm: {
|
||||
VoidEaterMarionetteBuff: {
|
||||
DisplayName: Void Eater Marionette
|
||||
Description: The power to control the Devourer is yours
|
||||
}
|
||||
|
||||
@@ -232,9 +232,9 @@ DarkSpark: {
|
||||
'''
|
||||
}
|
||||
|
||||
DeathhailStaff: {
|
||||
HyperdeathRiftScepter: {
|
||||
DisplayName: Hyperdeath Rift Scepter
|
||||
Tooltip: Rips a massive rift in spacetime
|
||||
Tooltip: Tears space in two with [c/ff00ff:Hyperdeath Rift Ripper]
|
||||
}
|
||||
|
||||
DeathValleyDuster: {
|
||||
|
||||
@@ -486,14 +486,14 @@ ExaltedOathblade: {
|
||||
'''
|
||||
}
|
||||
|
||||
Excelsus: {
|
||||
MawOfInfinity: {
|
||||
DisplayName: Maw of Infinity
|
||||
Tooltip:
|
||||
'''
|
||||
Swings a blade forged from the Devourer's maw in a 3-swing combo
|
||||
The first swing only hits close range
|
||||
The second swing additionally launches Faith Incinerator
|
||||
The third swing causes a bite at the cursor, exploding for masive damage
|
||||
The second swing additionally launches [c/ff00ff:Faith Incinerator]
|
||||
The third swing unleashes [c/ff00ff:Divinity Devourer] at your cursor, exploding for masive damage
|
||||
'''
|
||||
}
|
||||
|
||||
@@ -1365,7 +1365,7 @@ TheObliterator: {
|
||||
{$Common.YoyoStatsInfinite}
|
||||
[GFB]
|
||||
'''
|
||||
TooltipNormal: Occasionally performs a miniature Dimensional Drive at nearby foes
|
||||
TooltipNormal: Occasionally performs a miniature [c/ff00ff:Dimensional Drive] at nearby foes
|
||||
TooltipGFB: just a slight bit of dust spam on this weapon im afraid
|
||||
}
|
||||
|
||||
|
||||
@@ -379,13 +379,13 @@ DeadSunsWind: {
|
||||
'''
|
||||
}
|
||||
|
||||
Deathwind: {
|
||||
ThreadOfEradication: {
|
||||
DisplayName: Thread of Eradication
|
||||
Tooltip:
|
||||
'''
|
||||
Charges up a God Killer Doombeam
|
||||
Channelling the weapon causes it to charge up an even more powerful Hyperdeath Ripper
|
||||
While charging the Hyperdeath Ripper, the bow's turning speed is slowed down
|
||||
Charges up [c/ff00ff:God's Bane Doombeam]
|
||||
Channelling the weapon causes it to charge up [c/ff00ff:Hyperdeath Rift] instead
|
||||
While charging [c/ff00ff:Hyperdeath Rift], the bow's turning speed is slowed down
|
||||
'''
|
||||
}
|
||||
|
||||
|
||||
@@ -383,12 +383,12 @@ Equanimity: {
|
||||
'''
|
||||
}
|
||||
|
||||
Eradicator: {
|
||||
DimensionTearingDisk: {
|
||||
DisplayName: Dimension-Tearing Disk
|
||||
Tooltip:
|
||||
'''
|
||||
Throws a disk that tears space in the direction of the nearest enemy
|
||||
Stealth strikes stick to enemies and unleash God Killer Doombeam Array
|
||||
Stealth strikes stick to enemies and unleash [c/ff00ff:God's Bane Doombeam Array]
|
||||
'''
|
||||
}
|
||||
|
||||
|
||||
@@ -746,13 +746,14 @@ StaffOfNecrosteocytes: {
|
||||
'''
|
||||
}
|
||||
|
||||
StaffoftheMechworm: {
|
||||
VoidEaterMarionette: {
|
||||
DisplayName: Void Eater Marionette
|
||||
Tooltip:
|
||||
'''
|
||||
Contains the power to control a miniature Devourer
|
||||
Repeated summons increase the length of the Devourer
|
||||
'''
|
||||
'''
|
||||
Contains the power to control a miniature Devourer
|
||||
Repeated summons increase the length of the Devourer
|
||||
The Devourer alternates between using [c/ff00ff:Faith Incinerator] and [c/ff00ff:Ultracosmic Maelstrom]
|
||||
'''
|
||||
}
|
||||
|
||||
StarspawnHelixStaff: {
|
||||
|
||||
@@ -169,5 +169,5 @@ WaterSpear.DisplayName: Water Spear
|
||||
YharonBulletHellVortex.DisplayName: Bullet Hell Vortex
|
||||
YharonFireball.DisplayName: Dragon Fireball
|
||||
YharonFireball2.DisplayName: Dragon Fireball
|
||||
DeathhailBeam.DisplayName: Deathhail Beam
|
||||
FriendlyLaserWallBeam.DisplayName: Friendly Laser Wall Beam
|
||||
FriendlyLaserWallBeam.DisplayName: God's Bane Doombeam
|
||||
HyperdeathRiftScepterBeam.DisplayName: Hyperdeath Rift Scepter Beam
|
||||
@@ -51,7 +51,7 @@ CosmicTentacle.DisplayName: Dark Tentacle
|
||||
CryoBlast.DisplayName: Cryo Blast
|
||||
DarkSparkBeam.DisplayName: Dark Spark Beam
|
||||
DarkSparkPrism.DisplayName: Dark Crystal
|
||||
DeathhailBeam.DisplayName: Deathhail
|
||||
HyperdeathRiftScepterBeam.DisplayName: Hypderdeath Rift Ripper
|
||||
DeathValleyDusterProjectile.DisplayName: Death Valley Duster
|
||||
EelDrop.DisplayName: Acid Eel Drop
|
||||
EidolicWailSoundwave.DisplayName: Eidolic Wail
|
||||
@@ -261,3 +261,4 @@ WyvernFeatherPurple.DisplayName: Feather
|
||||
WyvernProjectile.DisplayName: Wyvern
|
||||
YharimsCrystalBeam.DisplayName: Yharim's Beam
|
||||
YharimsCrystalPrism.DisplayName: Yermes Christal
|
||||
DeathhailBeam.DisplayName: Deathhail Beam
|
||||
@@ -106,8 +106,8 @@ EntropicFlechette.DisplayName: Entropic Flechette
|
||||
EonBolt.DisplayName: Eon Bolt
|
||||
EssenceScythe.DisplayName: Essence Scythe
|
||||
ExaltedOathbladeThrownBlade.DisplayName: Exalted Oathblade Thrown Blade
|
||||
ExcelsusHoldout.DisplayName: Maw of Infinity
|
||||
ExcelsusJaws.DisplayName: Infinity's Bite
|
||||
MawOfInfinityHoldout.DisplayName: Maw of Infinity
|
||||
MawOfInfinityJaws.DisplayName: Divinity Devourer
|
||||
Exobeam.DisplayName: Exobeam
|
||||
ExobeamSlash.DisplayName: Exobeam Slash
|
||||
ExobeamSlashCreator.DisplayName: Anime Sword Effect
|
||||
|
||||
@@ -95,7 +95,7 @@ EpidemicShredderProjectile.DisplayName: Epidemic Shredder
|
||||
EquanimityDarkShard.DisplayName: Dark Shard
|
||||
EquanimityLightShard.DisplayName: Light Shard
|
||||
EquanimityProj.DisplayName: Equanimity
|
||||
EradicatorProjectile.DisplayName: Eradicator
|
||||
DimensionTearingDiskProjectile.DisplayName: Dimension-Tearing Disk
|
||||
ExecutionersBladeProj.DisplayName: Executioner's Blade
|
||||
ExecutionersBladeStealthProj.DisplayName: Executioner's Blade
|
||||
ExorcismProj.DisplayName: Exorcism
|
||||
|
||||
@@ -167,11 +167,10 @@ LostSoulGold.DisplayName: Gold Soul
|
||||
LostSoulLarge.DisplayName: Soul
|
||||
LostSoulSmall.DisplayName: Soul
|
||||
LuxorsGiftSummon.DisplayName: Luxor's Summon
|
||||
MechwormBody.DisplayName: Mechworm
|
||||
MechwormHead.DisplayName: Mechworm
|
||||
MechwormLaser.DisplayName: Mechworm Laser
|
||||
MechwormTail.DisplayName: Mechworm
|
||||
MechwormTeleportRift.DisplayName: Rift
|
||||
VoidEaterMarionetteBody.DisplayName: Void Eater Marionette
|
||||
VoidEaterMarionetteHead.DisplayName: Void Eater Marionette
|
||||
VoidEaterMarionetteTail.DisplayName: Void Eater Marionette
|
||||
DoGWeaponTeleportRift.DisplayName: Rift
|
||||
MidnightSunBeaconProj.DisplayName: Midnight Sun Beacon
|
||||
MidnightSunBeam.DisplayName: Midnight Beam
|
||||
MidnightSunShot.DisplayName: Midnight Shot
|
||||
|
||||
@@ -1207,7 +1207,7 @@ namespace CalamityMod
|
||||
RegisterSummon(ItemType<CalamarisLament>(), BuffType<CalamarisLamentBuff>(), ProjectileType<CalamarisLamentMinion>());
|
||||
RegisterSummon(ItemType<GammaHeart>(), BuffType<GammaHydraBuff>(), ProjectileType<GammaHead>());
|
||||
RegisterSummon(ItemType<WarloksMoonFist>(), BuffType<MoonFistBuff>(), ProjectileType<MoonFist>());
|
||||
RegisterSummon(ItemType<StaffoftheMechworm>(), BuffType<Mechworm>(), ProjectileType<MechwormBody>());
|
||||
RegisterSummon(ItemType<VoidEaterMarionette>(), BuffType<VoidEaterMarionetteBuff>(), ProjectileType<VoidEaterMarionetteBody>());
|
||||
RegisterSummon(ItemType<CorvidHarbringerStaff>(), BuffType<CorvidHarbringerBuff>(), ProjectileType<PowerfulRaven>());
|
||||
RegisterSummon(ItemType<EndoHydraStaff>(), BuffType<EndoHydraBuff>(), ProjectileType<EndoHydraHead>());
|
||||
RegisterSummon(ItemType<CosmicViperEngine>(), BuffType<CosmicViperEngineBuff>(), ProjectileType<CosmicViperSummon>());
|
||||
|
||||
@@ -53,6 +53,8 @@ namespace CalamityMod.NPCs.DevourerofGods
|
||||
[LongDistanceNetSync]
|
||||
public class DevourerofGodsHead : ModNPC
|
||||
{
|
||||
public static Color SpecialMoveColor => Color.Lerp(Color.Fuchsia, Color.Cyan, MathHelper.SmoothStep(0,1,(MathF.Sin(Main.GlobalTimeWrappedHourly*2)+1) * 0.5f));
|
||||
|
||||
public static int phase1IconIndex;
|
||||
public static int phase2IconIndex;
|
||||
|
||||
@@ -2572,12 +2574,12 @@ if (NPC.localAI[2] == timeWhenDoGShouldTeleportDuringPhase2Countdown + 115)
|
||||
// Weapons
|
||||
int[] weapons = new int[]
|
||||
{
|
||||
ModContent.ItemType<Excelsus>(),
|
||||
ModContent.ItemType<MawOfInfinity>(),
|
||||
ModContent.ItemType<TheObliterator>(),
|
||||
ModContent.ItemType<Deathwind>(),
|
||||
ModContent.ItemType<DeathhailStaff>(),
|
||||
ModContent.ItemType<StaffoftheMechworm>(),
|
||||
ModContent.ItemType<Eradicator>()
|
||||
ModContent.ItemType<ThreadOfEradication>(),
|
||||
ModContent.ItemType<HyperdeathRiftScepter>(),
|
||||
ModContent.ItemType<VoidEaterMarionette>(),
|
||||
ModContent.ItemType<DimensionTearingDisk>()
|
||||
};
|
||||
normalOnly.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, weapons));
|
||||
normalOnly.Add(ModContent.ItemType<CosmicDischarge>(), 10);
|
||||
|
||||
@@ -273,7 +273,7 @@ namespace CalamityMod.Projectiles
|
||||
/// <summary>
|
||||
/// Custom update priority.<br/>
|
||||
/// Calamity sorts projectiles by their update priority to fix otherwise absurdly difficult to resolve visual bugs on certain weapons.<br/>
|
||||
/// Examples include Mechworm segments detaching or Rancor's laser beam being offset from the magic circle.
|
||||
/// Examples include Void Eater Marionette segments detaching or Rancor's laser beam being offset from the magic circle.
|
||||
/// </summary>
|
||||
public float UpdatePriority = 0f;
|
||||
|
||||
|
||||
@@ -179,7 +179,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
// This variant of segment attachment incorporates rotation.
|
||||
// Given the fact that all segments will execute this code is succession, the
|
||||
// result across the entire worm will exponentially decay over each segment,
|
||||
// allowing for smooth rotations. This code is what the stardust dragon and mechworm use for their segmenting.
|
||||
// allowing for smooth rotations. This code is what the stardust dragon and Void Eater Marionette use for their segmenting.
|
||||
if (aheadSegmentRotation != Segments[segmentIndex].Rotation)
|
||||
{
|
||||
float offsetAngle = MathHelper.WrapAngle(aheadSegmentRotation - Segments[segmentIndex].Rotation);
|
||||
|
||||
@@ -1,160 +1,59 @@
|
||||
using System;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Projectiles.BaseProjectiles;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
public class DeathhailBeam : ModProjectile, ILocalizedModType
|
||||
public class DeathhailBeam : BaseLaserbeamProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Magic";
|
||||
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
||||
public new string LocalizationCategory => "Projectiles.Boss";
|
||||
public float time = 0;
|
||||
public ref float attackSpeed => ref Projectile.ai[0];
|
||||
public ref float laserType => ref Projectile.ai[2];
|
||||
public bool canDamage => doneAttack && laserFX >= 1f;
|
||||
public bool doneAttack = false;
|
||||
public int attackTime = 10;
|
||||
public float laserLength => 3000;
|
||||
public float laserFX = 0;
|
||||
public float storedTime = 0;
|
||||
public Color drawColor = Color.Magenta;
|
||||
public float sine = 0;
|
||||
public float laserRot = 0;
|
||||
Vector2 beamStart = Vector2.Zero;
|
||||
Vector2 directionToTarget = Vector2.Zero;
|
||||
public Vector2 targetPos => Projectile.Center;
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000;
|
||||
}
|
||||
|
||||
private Color startingColor = new Color(119, 210, 255);
|
||||
private Color secondColor = new Color(247, 119, 255);
|
||||
public override float MaxScale => 0.7f;
|
||||
public override float MaxLaserLength => 1599.999999f;
|
||||
public override float Lifetime => 20f;
|
||||
public override Color LaserOverlayColor => CalamityUtils.ColorSwap(startingColor, secondColor, 0.9f);
|
||||
public override Color LightCastColor => LaserOverlayColor;
|
||||
public override Texture2D LaserBeginTexture => ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/UltimaRayStart", AssetRequestMode.ImmediateLoad).Value;
|
||||
public override Texture2D LaserMiddleTexture => ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/UltimaRayMid", AssetRequestMode.ImmediateLoad).Value;
|
||||
public override Texture2D LaserEndTexture => ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/Lasers/UltimaRayEnd", AssetRequestMode.ImmediateLoad).Value;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 1;
|
||||
Projectile.height = 1;
|
||||
Projectile.width = Projectile.height = 22;
|
||||
Projectile.friendly = true;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.DamageType = DamageClass.Magic;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.timeLeft = 6000;
|
||||
Projectile.scale = 2;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.alpha = 255;
|
||||
Projectile.localNPCHitCooldown = -1;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
}
|
||||
public override void AI()
|
||||
|
||||
public override bool PreAI()
|
||||
{
|
||||
if (laserFX > 0)
|
||||
laserFX = MathHelper.Lerp(laserFX, 0, time > 15 ? 0.07f : 0.01f);
|
||||
sine = (float)Math.Sin(time * 4f / MathHelper.Pi);
|
||||
if (time == 0)
|
||||
// Initialization. Using the AI hook would override the base laser's code, and we don't want that.
|
||||
if (Projectile.localAI[0] == 0f)
|
||||
{
|
||||
laserType = 1;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
Projectile.scale = 6;
|
||||
laserRot = Main.rand.NextFloat(-0.4f, 0.4f);
|
||||
|
||||
beamStart = targetPos + ((laserType == 0 || laserType == 4 || laserType == 5) ? Vector2.UnitX : Vector2.UnitY).RotatedBy(laserRot) * laserLength;
|
||||
directionToTarget = beamStart.DirectionTo(targetPos);
|
||||
|
||||
Projectile.Center += Main.rand.NextVector2CircularEdge(400, 400);
|
||||
// Some default values for if the projectile spawns without them set
|
||||
if (attackSpeed == 0)
|
||||
attackSpeed = 0.5f;
|
||||
Projectile.velocity = Vector2.Zero;
|
||||
laserFX = 1f;
|
||||
Projectile.ForceNetUpdate();
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
secondColor = new Color(119, 210, 255);
|
||||
startingColor = new Color(247, 119, 255);
|
||||
}
|
||||
}
|
||||
if (time >= attackTime && !doneAttack)
|
||||
{
|
||||
SoundStyle attack = new("CalamityMod/Sounds/Custom/DoGLaserWallBigAttack");
|
||||
SoundEngine.PlaySound(attack with { Volume = 0.6f, Pitch = 0, MaxInstances = -1 }, targetPos);
|
||||
laserFX = 2.5f;
|
||||
doneAttack = true;
|
||||
storedTime = time;
|
||||
Projectile.ForceNetUpdate();
|
||||
|
||||
|
||||
if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < 3 && Main.LocalPlayer.Distance(Projectile.Center) < 1600)
|
||||
Main.LocalPlayer.Calamity().GeneralScreenShakePower = 3;
|
||||
}
|
||||
float endTime = storedTime + 10;
|
||||
if (time >= endTime && doneAttack)
|
||||
{
|
||||
Projectile.Kill();
|
||||
return;
|
||||
}
|
||||
else if (doneAttack)
|
||||
{
|
||||
drawColor = Color.Lerp(Color.Magenta, Color.Cyan, (float)Math.Pow(Utils.GetLerpValue(endTime, storedTime, time, true), 2));
|
||||
}
|
||||
time += attackSpeed;
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool? CanHitNPC(NPC target)
|
||||
{
|
||||
if (canDamage)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool CanHitPlayer(Player target)
|
||||
{
|
||||
if (canDamage)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info)
|
||||
{
|
||||
base.OnHitPlayer(target, info);
|
||||
}
|
||||
public override bool ShouldUpdatePosition() => false;
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 180);
|
||||
base.OnHitNPC(target, hit, damageDone);
|
||||
}
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
|
||||
{
|
||||
if (!canDamage)
|
||||
return false;
|
||||
else
|
||||
{
|
||||
float _ = float.NaN;
|
||||
Vector2 start = beamStart;
|
||||
Vector2 end = beamStart + directionToTarget * laserLength * 2;
|
||||
bool hitCheck = Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), start, end, 70 * Projectile.scale, ref _);
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 180);
|
||||
|
||||
return hitCheck;
|
||||
}
|
||||
}
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
if (laserFX == 0)
|
||||
return false;
|
||||
Texture2D beam = ModContent.Request<Texture2D>("CalamityMod/Particles/BloomLineThick").Value;
|
||||
Texture2D bBeam = ModContent.Request<Texture2D>("CalamityMod/Particles/LineThick").Value;
|
||||
Texture2D bloom = ModContent.Request<Texture2D>("CalamityMod/Particles/BloomCircle").Value;
|
||||
float opacity = (doneAttack ? 0.65f : 0.35f) * (float)Math.Pow(Math.Min(laserFX, 1), 2);
|
||||
Color beamColor = drawColor with { A = 0 };
|
||||
|
||||
if (CalamityClientConfig.Instance.Photosensitivity)
|
||||
opacity = 0.2f;
|
||||
for (int t = 0; t < (!doneAttack ? 1 : 4 * Projectile.scale); t++)
|
||||
{
|
||||
bool black = (t > 0 + (Projectile.scale - 1));
|
||||
if (black)
|
||||
beam = bBeam;
|
||||
|
||||
float beamThickness = 0.09f * (black ? (0.8f - 0.15f * t / Projectile.scale) : 1f) * (laserFX <= 1 ? (float)Math.Pow(Math.Min(laserFX, 1), 2) : laserFX) * Utils.Remap(sine, -1, 1, 0.8f, 1.1f);
|
||||
Main.EntitySpriteDraw(beam, beamStart - Main.screenPosition, null, (black ? Color.Black * opacity : beamColor * (1 - t * 0.3f) * opacity) * (black ? (0.2f + 0.15f * t / Projectile.scale) : 1), directionToTarget.ToRotation() + MathHelper.PiOver2, new Vector2(beam.Width / 2, beam.Height), new Vector2(beamThickness, laserLength / 975) * Projectile.scale, SpriteEffects.None);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 180);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,160 @@
|
||||
using System;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Projectiles.BaseProjectiles;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
public class HyperdeathRiftScepterBeam : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
||||
public new string LocalizationCategory => "Projectiles.Boss";
|
||||
public float time = 0;
|
||||
public ref float attackSpeed => ref Projectile.ai[0];
|
||||
public ref float laserType => ref Projectile.ai[2];
|
||||
public bool canDamage => doneAttack && laserFX >= 1f;
|
||||
public bool doneAttack = false;
|
||||
public int attackTime = 10;
|
||||
public float laserLength => 3000;
|
||||
public float laserFX = 0;
|
||||
public float storedTime = 0;
|
||||
public Color drawColor = Color.Magenta;
|
||||
public float sine = 0;
|
||||
public float laserRot = 0;
|
||||
Vector2 beamStart = Vector2.Zero;
|
||||
Vector2 directionToTarget = Vector2.Zero;
|
||||
public Vector2 targetPos => Projectile.Center;
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000;
|
||||
}
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Projectile.width = 1;
|
||||
Projectile.height = 1;
|
||||
Projectile.friendly = true;
|
||||
Projectile.ignoreWater = true;
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.penetrate = -1;
|
||||
Projectile.timeLeft = 6000;
|
||||
Projectile.scale = 2;
|
||||
Projectile.usesLocalNPCImmunity = true;
|
||||
Projectile.localNPCHitCooldown = -1;
|
||||
}
|
||||
public override void AI()
|
||||
{
|
||||
if (laserFX > 0)
|
||||
laserFX = MathHelper.Lerp(laserFX, 0, time > 15 ? 0.07f : 0.01f);
|
||||
sine = (float)Math.Sin(time * 4f / MathHelper.Pi);
|
||||
if (time == 0)
|
||||
{
|
||||
laserType = 1;
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
Projectile.scale = 6;
|
||||
laserRot = Main.rand.NextFloat(-0.4f, 0.4f);
|
||||
|
||||
beamStart = targetPos + ((laserType == 0 || laserType == 4 || laserType == 5) ? Vector2.UnitX : Vector2.UnitY).RotatedBy(laserRot) * laserLength;
|
||||
directionToTarget = beamStart.DirectionTo(targetPos);
|
||||
|
||||
Projectile.Center += Main.rand.NextVector2CircularEdge(400, 400);
|
||||
// Some default values for if the projectile spawns without them set
|
||||
if (attackSpeed == 0)
|
||||
attackSpeed = 0.5f;
|
||||
Projectile.velocity = Vector2.Zero;
|
||||
laserFX = 1f;
|
||||
Projectile.ForceNetUpdate();
|
||||
}
|
||||
if (time >= attackTime && !doneAttack)
|
||||
{
|
||||
SoundStyle attack = new("CalamityMod/Sounds/Custom/DoGLaserWallBigAttack");
|
||||
SoundEngine.PlaySound(attack with { Volume = 0.6f, Pitch = 0, MaxInstances = -1 }, targetPos);
|
||||
laserFX = 2.5f;
|
||||
doneAttack = true;
|
||||
storedTime = time;
|
||||
Projectile.ForceNetUpdate();
|
||||
|
||||
|
||||
if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < 3 && Main.LocalPlayer.Distance(Projectile.Center) < 1600)
|
||||
Main.LocalPlayer.Calamity().GeneralScreenShakePower = 3;
|
||||
}
|
||||
float endTime = storedTime + 10;
|
||||
if (time >= endTime && doneAttack)
|
||||
{
|
||||
Projectile.Kill();
|
||||
return;
|
||||
}
|
||||
else if (doneAttack)
|
||||
{
|
||||
drawColor = Color.Lerp(Color.Magenta, Color.Cyan, (float)Math.Pow(Utils.GetLerpValue(endTime, storedTime, time, true), 2));
|
||||
}
|
||||
time += attackSpeed;
|
||||
}
|
||||
|
||||
public override bool? CanHitNPC(NPC target)
|
||||
{
|
||||
if (canDamage)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override bool CanHitPlayer(Player target)
|
||||
{
|
||||
if (canDamage)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
public override void OnHitPlayer(Player target, Player.HurtInfo info)
|
||||
{
|
||||
base.OnHitPlayer(target, info);
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 180);
|
||||
base.OnHitNPC(target, hit, damageDone);
|
||||
}
|
||||
public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox)
|
||||
{
|
||||
if (!canDamage)
|
||||
return false;
|
||||
else
|
||||
{
|
||||
float _ = float.NaN;
|
||||
Vector2 start = beamStart;
|
||||
Vector2 end = beamStart + directionToTarget * laserLength * 2;
|
||||
bool hitCheck = Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), start, end, 70 * Projectile.scale, ref _);
|
||||
|
||||
return hitCheck;
|
||||
}
|
||||
}
|
||||
public override bool PreDraw(ref Color lightColor)
|
||||
{
|
||||
if (laserFX == 0)
|
||||
return false;
|
||||
Texture2D beam = ModContent.Request<Texture2D>("CalamityMod/Particles/BloomLineThick").Value;
|
||||
Texture2D bBeam = ModContent.Request<Texture2D>("CalamityMod/Particles/LineThick").Value;
|
||||
Texture2D bloom = ModContent.Request<Texture2D>("CalamityMod/Particles/BloomCircle").Value;
|
||||
float opacity = (doneAttack ? 0.65f : 0.35f) * (float)Math.Pow(Math.Min(laserFX, 1), 2);
|
||||
Color beamColor = drawColor with { A = 0 };
|
||||
|
||||
if (CalamityClientConfig.Instance.Photosensitivity)
|
||||
opacity = 0.2f;
|
||||
for (int t = 0; t < (!doneAttack ? 1 : 4 * Projectile.scale); t++)
|
||||
{
|
||||
bool black = (t > 0 + (Projectile.scale - 1));
|
||||
if (black)
|
||||
beam = bBeam;
|
||||
|
||||
float beamThickness = 0.09f * (black ? (0.8f - 0.15f * t / Projectile.scale) : 1f) * (laserFX <= 1 ? (float)Math.Pow(Math.Min(laserFX, 1), 2) : laserFX) * Utils.Remap(sine, -1, 1, 0.8f, 1.1f);
|
||||
Main.EntitySpriteDraw(beam, beamStart - Main.screenPosition, null, (black ? Color.Black * opacity : beamColor * (1 - t * 0.3f) * opacity) * (black ? (0.2f + 0.15f * t / Projectile.scale) : 1), directionToTarget.ToRotation() + MathHelper.PiOver2, new Vector2(beam.Width / 2, beam.Height), new Vector2(beamThickness, laserLength / 975) * Projectile.scale, SpriteEffects.None);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,13 +14,13 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Melee
|
||||
{
|
||||
public class ExcelsusHoldout : BaseSwordHoldoutProjectile, ILocalizedModType
|
||||
public class MawOfInfinityHoldout : BaseSwordHoldoutProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Melee";
|
||||
public override bool useMeleeSpeed => true;
|
||||
public override bool useMeleeSize => true;
|
||||
public override int swingWidth => 270;
|
||||
public override Item BaseItem => ModContent.GetModItem(ModContent.ItemType<Excelsus>()).Item;
|
||||
public override Item BaseItem => ModContent.GetModItem(ModContent.ItemType<MawOfInfinity>()).Item;
|
||||
public override int AfterImageLength => 0;
|
||||
|
||||
public override int StartupTime { get; set; }
|
||||
@@ -116,7 +116,7 @@ namespace CalamityMod.Projectiles.Melee
|
||||
break;
|
||||
case 0:
|
||||
if (Main.myPlayer == Projectile.owner)
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), player.Center, -angle * 3, ModContent.ProjectileType<ExcelsusJaws>(), Projectile.damage * 2, Projectile.knockBack, player.whoAmI);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), player.Center, -angle * 3, ModContent.ProjectileType<MawOfInfinityJaws>(), Projectile.damage * 2, Projectile.knockBack, player.whoAmI);
|
||||
player.itemAnimation = BaseItem.useAnimation;
|
||||
player.itemTime = BaseItem.useTime;
|
||||
Projectile.Kill();
|
||||
@@ -13,7 +13,7 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Melee
|
||||
{
|
||||
public class ExcelsusJaws : ModProjectile, ILocalizedModType
|
||||
public class MawOfInfinityJaws : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Melee";
|
||||
|
||||
@@ -123,7 +123,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos
|
||||
}
|
||||
if (Main.myPlayer == Projectile.owner)
|
||||
{
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<MechwormTeleportRift>(), 0, 0, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType<DoGWeaponTeleportRift>(), 0, 0, Projectile.owner);
|
||||
}
|
||||
int laserAmount = 8;
|
||||
for (int i = 0; i < laserAmount; i++)
|
||||
|
||||
@@ -14,10 +14,10 @@ using Terraria.ModLoader;
|
||||
namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
[PierceResistException]
|
||||
public class EradicatorProjectile : ModProjectile, ILocalizedModType
|
||||
public class DimensionTearingDiskProjectile : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Rogue";
|
||||
public override string Texture => "CalamityMod/Items/Weapons/Rogue/Eradicator";
|
||||
public override string Texture => "CalamityMod/Items/Weapons/Rogue/DimensionTearingDisk";
|
||||
private static float RotationIncrement = 0.15f;
|
||||
private static int Lifetime = 350;
|
||||
public static int StealthExtraLifetime = 240; // 1 extra update means this is double what you'd expect for 2 seconds
|
||||
@@ -228,7 +228,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
public override void PostDraw(Color lightColor)
|
||||
{
|
||||
Vector2 origin = new Vector2(31f, 29f);
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Rogue/EradicatorGlow").Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, origin, 1f, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Rogue/DimensionTearingDiskGlow").Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, origin, 1f, SpriteEffects.None, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Summon
|
||||
{
|
||||
public class MechwormTeleportRift : ModProjectile, ILocalizedModType
|
||||
public class DoGWeaponTeleportRift : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Summon";
|
||||
public override string Texture => "CalamityMod/Projectiles/StarProj";
|
||||
@@ -94,7 +94,6 @@ namespace CalamityMod.Projectiles.Summon
|
||||
|
||||
public void ApplyMinionBuffs()
|
||||
{
|
||||
// Maintain or remove the Mechworm buff from the owner.
|
||||
Owner.AddBuff(ModContent.BuffType<MoonFistBuff>(), 3600);
|
||||
if (Owner.dead)
|
||||
Owner.Calamity().MoonFist = false;
|
||||
|
||||
@@ -10,7 +10,7 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Summon
|
||||
{
|
||||
public class MechwormBody : ModProjectile, ILocalizedModType
|
||||
public class VoidEaterMarionetteBody : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Summon";
|
||||
public override void SetStaticDefaults()
|
||||
@@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
|
||||
internal static void SegmentAI(Projectile projectile, int offsetFromNextSegment, ref int playerMinionSlots)
|
||||
{
|
||||
// If the mechworm is opaque enough, produce light.
|
||||
// If the worm is opaque enough, produce light.
|
||||
if (projectile.alpha <= 128)
|
||||
Lighting.AddLight(projectile.Center, Color.DarkMagenta.ToVector3());
|
||||
|
||||
@@ -56,13 +56,13 @@ namespace CalamityMod.Projectiles.Summon
|
||||
|
||||
// Track the minion presence boolean.
|
||||
if (owner.dead)
|
||||
modPlayer.mWorm = false;
|
||||
if (modPlayer.mWorm)
|
||||
modPlayer.hasVoidEaterMarionette = false;
|
||||
if (modPlayer.hasVoidEaterMarionette)
|
||||
projectile.timeLeft = 2;
|
||||
|
||||
int headProjType = ModContent.ProjectileType<MechwormHead>();
|
||||
int bodyProjType = ModContent.ProjectileType<MechwormBody>();
|
||||
int tailProjType = ModContent.ProjectileType<MechwormTail>();
|
||||
int headProjType = ModContent.ProjectileType<VoidEaterMarionetteHead>();
|
||||
int bodyProjType = ModContent.ProjectileType<VoidEaterMarionetteBody>();
|
||||
int tailProjType = ModContent.ProjectileType<VoidEaterMarionetteTail>();
|
||||
|
||||
ref float segmentAheadIdentity = ref projectile.ai[0];
|
||||
Projectile segmentAhead = Main.projectile.Take(Main.maxProjectiles).FirstOrDefault(proj => SameIdentity(proj, projectile.owner, (int)projectile.ai[0]));
|
||||
@@ -85,7 +85,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
// Each body slot is actually 0.5 slots. Kill two segments to lose 1 "true" slot.
|
||||
for (int i = 0; i < 2; ++i)
|
||||
{
|
||||
if (ahead.type != ModContent.ProjectileType<MechwormHead>())
|
||||
if (ahead.type != ModContent.ProjectileType<VoidEaterMarionetteHead>())
|
||||
projectile.localAI[1] = ahead.localAI[1];
|
||||
|
||||
// Inherit the ahead segment index of the ahead segment (basically attaching to the segment that's two indices ahead).
|
||||
@@ -133,7 +133,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
projectile.extraUpdates = head.extraUpdates;
|
||||
projectile.localNPCHitCooldown = head.localNPCHitCooldown;
|
||||
|
||||
MechwormHead headModProj = head.ModProjectile<MechwormHead>();
|
||||
VoidEaterMarionetteHead headModProj = head.ModProjectile<VoidEaterMarionetteHead>();
|
||||
if (headModProj.EndRiftGateUUID == -1)
|
||||
{
|
||||
// Very rapidly fade-in.
|
||||
@@ -141,7 +141,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
}
|
||||
else if (projectile.Hitbox.Intersects(Main.projectile[headModProj.EndRiftGateUUID].Hitbox))
|
||||
{
|
||||
// Disappear if touching the mechworm portal.
|
||||
// Disappear if touching the portal.
|
||||
// It will look like it's teleporting, when in reality, it's
|
||||
// just an invisible, uninteractable projectile for the time being.
|
||||
projectile.alpha = 255;
|
||||
@@ -157,7 +157,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
if (segmentAhead.rotation != projectile.rotation)
|
||||
{
|
||||
float offsetAngle = MathHelper.WrapAngle(segmentAhead.rotation - projectile.rotation);
|
||||
offsetToDestination = offsetToDestination.RotatedBy(offsetAngle * 0.08f);
|
||||
offsetToDestination = offsetToDestination.RotatedBy(offsetAngle * 0.25f);
|
||||
}
|
||||
projectile.rotation = offsetToDestination.ToRotation() + MathHelper.PiOver2;
|
||||
|
||||
@@ -170,7 +170,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
|
||||
public static Projectile LocateHead(Projectile projectile)
|
||||
{
|
||||
int headType = ModContent.ProjectileType<MechwormHead>();
|
||||
int headType = ModContent.ProjectileType<VoidEaterMarionetteHead>();
|
||||
foreach (Projectile p in Main.ActiveProjectiles)
|
||||
{
|
||||
if (p.type != headType || p.owner != projectile.owner)
|
||||
|
Before Width: | Height: | Size: 616 B After Width: | Height: | Size: 616 B |
@@ -16,7 +16,7 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Summon
|
||||
{
|
||||
public class MechwormHead : ModProjectile, ILocalizedModType
|
||||
public class VoidEaterMarionetteHead : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Summon";
|
||||
internal enum AttackState : byte
|
||||
@@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
internal ref float Time => ref Projectile.ai[1];
|
||||
internal ref float TotalWormSegments => ref Projectile.localAI[0];
|
||||
|
||||
// Helper functions because Mechworm does a lot of checking for either itself or its target being near the edge of the world.
|
||||
// Helper functions because Void Eater Marionette does a lot of checking for either itself or its target being near the edge of the world.
|
||||
private static Vector2 WorldTopLeft(int tileDist = 15) => new Vector2(tileDist * 16f);
|
||||
private static Vector2 WorldBottomRight(int tileDist = 15) => new Vector2(Main.maxTilesX - tileDist, Main.maxTilesY - tileDist) * 16f;
|
||||
|
||||
@@ -124,10 +124,10 @@ namespace CalamityMod.Projectiles.Summon
|
||||
CalamityPlayer modPlayer = owner.Calamity();
|
||||
|
||||
// Maintain or remove the Mechworm buff from the owner.
|
||||
owner.AddBuff(ModContent.BuffType<Mechworm>(), 3600);
|
||||
owner.AddBuff(ModContent.BuffType<VoidEaterMarionetteBuff>(), 3600);
|
||||
if (owner.dead)
|
||||
modPlayer.mWorm = false;
|
||||
if (modPlayer.mWorm)
|
||||
modPlayer.hasVoidEaterMarionette = false;
|
||||
if (modPlayer.hasVoidEaterMarionette)
|
||||
Projectile.timeLeft = 2;
|
||||
|
||||
Time++;
|
||||
@@ -320,6 +320,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
int chargeTime = (int)MathHelper.Min(36 + TotalWormSegments, 70);
|
||||
if (AttackStateTimer % chargeTime == 0)
|
||||
{
|
||||
Projectile.ResetLocalNPCHitImmunity();
|
||||
Vector2 offsetBounds = Vector2.Max(target.Size, new Vector2(425f + TotalWormSegments * 8f));
|
||||
Vector2 offset = Main.rand.NextVector2CircularEdge(offsetBounds.X, offsetBounds.Y) * 0.65f;
|
||||
|
||||
@@ -352,9 +353,9 @@ namespace CalamityMod.Projectiles.Summon
|
||||
SparkParticle spark = new SparkParticle(TeleportStartingPoint, sparkVelocity, false, sparkLifetime, sparkScale, sparkColor);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
}
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), TeleportStartingPoint, Vector2.Zero, ModContent.ProjectileType<MechwormTeleportRift>(), 0, 0f, Projectile.owner);
|
||||
Projectile.NewProjectile(Projectile.GetSource_FromThis(), TeleportStartingPoint, Vector2.Zero, ModContent.ProjectileType<DoGWeaponTeleportRift>(), 0, 0f, Projectile.owner);
|
||||
}
|
||||
int endGateIndex = Projectile.NewProjectile(Projectile.GetSource_FromThis(), TeleportEndingPoint, Vector2.Zero, ModContent.ProjectileType<MechwormTeleportRift>(), 0, 0f, Projectile.owner);
|
||||
int endGateIndex = Projectile.NewProjectile(Projectile.GetSource_FromThis(), TeleportEndingPoint, Vector2.Zero, ModContent.ProjectileType<DoGWeaponTeleportRift>(), 0, 0f, Projectile.owner);
|
||||
EndRiftGateUUID = Projectile.GetByUUID(Projectile.owner, endGateIndex);
|
||||
|
||||
Main.projectile[EndRiftGateUUID].ai[0] = chargeTime;
|
||||
@@ -371,8 +372,9 @@ namespace CalamityMod.Projectiles.Summon
|
||||
if (otherProj.owner != Projectile.owner || otherProj.whoAmI == Projectile.whoAmI)
|
||||
continue;
|
||||
|
||||
if (otherProj.type == ModContent.ProjectileType<MechwormBody>() || otherProj.type == ModContent.ProjectileType<MechwormTail>())
|
||||
if (otherProj.type == ModContent.ProjectileType<VoidEaterMarionetteBody>() || otherProj.type == ModContent.ProjectileType<VoidEaterMarionetteTail>())
|
||||
{
|
||||
otherProj.ResetLocalNPCHitImmunity();
|
||||
otherProj.alpha = 0;
|
||||
if (AttackStateTimer != 0)
|
||||
otherProj.Center = Projectile.Center;
|
||||
@@ -403,7 +405,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
|
||||
private void CleanUpMechwormPortals()
|
||||
{
|
||||
int portalType = ModContent.ProjectileType<MechwormTeleportRift>();
|
||||
int portalType = ModContent.ProjectileType<DoGWeaponTeleportRift>();
|
||||
foreach (Projectile proj in Main.ActiveProjectiles)
|
||||
{
|
||||
if (proj.type != portalType || proj.owner != Projectile.owner)
|
||||
@@ -435,7 +437,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
return;
|
||||
|
||||
Vector2 origin = new Vector2(21f, 25f);
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Summon/MechwormHeadGlow").Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, origin, 1f, SpriteEffects.None, 0);
|
||||
Main.EntitySpriteDraw(ModContent.Request<Texture2D>("CalamityMod/Projectiles/Summon/VoidEaterMarionetteHeadGlow").Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, origin, 1f, SpriteEffects.None, 0);
|
||||
}
|
||||
|
||||
public override void DrawBehind(int index, List<int> behindNPCsAndTiles, List<int> behindNPCs, List<int> behindProjectiles, List<int> overPlayers, List<int> overWiresUI)
|
||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 679 B After Width: | Height: | Size: 679 B |
@@ -8,7 +8,7 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Projectiles.Summon
|
||||
{
|
||||
public class MechwormTail : ModProjectile, ILocalizedModType
|
||||
public class VoidEaterMarionetteTail : ModProjectile, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Projectiles.Summon";
|
||||
private int playerMinionSlots = 0;
|
||||
@@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
|
||||
Projectile.localAI[0] = 0f;
|
||||
|
||||
MechwormBody.SegmentAI(Projectile, 16, ref playerMinionSlots);
|
||||
VoidEaterMarionetteBody.SegmentAI(Projectile, 16, ref playerMinionSlots);
|
||||
}
|
||||
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<GodSlayerInferno>(), 90);
|
||||
|
Before Width: | Height: | Size: 955 B After Width: | Height: | Size: 955 B |
@@ -319,7 +319,7 @@ namespace CalamityMod.UI.CalamitasEnchants
|
||||
{
|
||||
[ModContent.ItemType<TheCommunity>()] = ModContent.ItemType<ShatteredCommunity>(),
|
||||
[ModContent.ItemType<EntropysVigil>()] = ModContent.ItemType<CindersOfLament>(),
|
||||
[ModContent.ItemType<StaffoftheMechworm>()] = ModContent.ItemType<Metastasis>(),
|
||||
[ModContent.ItemType<VoidEaterMarionette>()] = ModContent.ItemType<Metastasis>(),
|
||||
[ModContent.ItemType<GhastlyVisage>()] = ModContent.ItemType<GruesomeEminence>(),
|
||||
[ModContent.ItemType<BurningSea>()] = ModContent.ItemType<Rancor>()
|
||||
};
|
||||
|
||||