merge conflicts
No files matched your search
@@ -148,12 +148,6 @@ namespace CalamityMod.Buffs
|
||||
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
|
||||
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex];
|
||||
}
|
||||
else if (type == BuffID.Slow)
|
||||
{
|
||||
npc.Calamity().slowed = true;
|
||||
if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0)
|
||||
npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex];
|
||||
}
|
||||
if (type == BuffID.Electrified)
|
||||
{
|
||||
npc.Calamity().electrified = true;
|
||||
|
||||
@@ -973,6 +973,8 @@ namespace CalamityMod.CalPlayer
|
||||
public bool XykVisualsBlue = false;
|
||||
public bool XykVisualsOrange = false;
|
||||
public Color XykFXColor = Color.Black;
|
||||
public int XykWingTimer = 0;
|
||||
public Color lightRGB = Color.Black;
|
||||
public bool manaOverloader = false;
|
||||
/// <summary> Used for allowing Calamity slimes to be affected by Royal Gel. </summary>
|
||||
public bool royalGel = false;
|
||||
|
||||
@@ -878,7 +878,7 @@ namespace CalamityMod.CalPlayer
|
||||
contactDamageReduction *= (double)Crumbling.MultiplicativeDamageReductionPlayer;
|
||||
|
||||
// Contact damage reduction is reduced by DR Damage, which itself is proportional to defense damage
|
||||
// In GFB, as defense damage is uncapped, DR damage is also uncapped.
|
||||
// In FTW, as defense damage is uncapped, DR damage is also uncapped.
|
||||
int currentDefense = Player.GetCurrentDefense(false);
|
||||
if (totalDefenseDamage > 0 && currentDefense > 0)
|
||||
{
|
||||
|
||||
@@ -254,12 +254,21 @@ namespace CalamityMod.CalPlayer
|
||||
foreach (Projectile p in Main.ActiveProjectiles)
|
||||
if (p.type == ModContent.ProjectileType<XykWings>() && p.owner == Player.whoAmI && p.ai[1] == 0)
|
||||
numOfActiveWings++;
|
||||
bool spawnWings = numOfActiveWings < maxWingPieces && !Player.dead && Player.wingsLogic > 0 && !(Player.wingTime == Player.wingTimeMax && Player.velocity.Y == 0) && Player.wingTime > 0;
|
||||
bool spawnWings = numOfActiveWings < maxWingPieces && !Player.dead && Player.wingsLogic > 0 && ((!(Player.wingTime == Player.wingTimeMax && Player.velocity.Y == 0) && Player.wingTime > 0) || XykWingTimer >= 3);
|
||||
if (spawnWings)
|
||||
{
|
||||
int wingCount = numOfActiveWings;
|
||||
Projectile wings = Projectile.NewProjectileDirect(Player.GetSource_FromThis(), Player.Center, Vector2.Zero, ModContent.ProjectileType<XykWings>(), 0, 0f, Player.whoAmI, wingCount);
|
||||
if (XykWingTimer >= 3)
|
||||
{
|
||||
int wingCount = numOfActiveWings;
|
||||
Projectile wings = Projectile.NewProjectileDirect(Player.GetSource_FromThis(), Player.Center, Vector2.Zero, ModContent.ProjectileType<XykWings>(), 0, 0f, Player.whoAmI, wingCount);
|
||||
if (numOfActiveWings + 1 == maxWingPieces)
|
||||
XykWingTimer = 0;
|
||||
}
|
||||
else
|
||||
XykWingTimer++;
|
||||
}
|
||||
else
|
||||
XykWingTimer = 0;
|
||||
}
|
||||
|
||||
// First Frame dash effects
|
||||
@@ -568,6 +577,22 @@ namespace CalamityMod.CalPlayer
|
||||
if (heldGaelsLastFrame)
|
||||
rageDiff += rageMax * GaelsGreatsword.RagePerSecond / 60f;
|
||||
|
||||
float rate = Main.GlobalTimeWrappedHourly * 29;
|
||||
List<Color> eColors = new List<Color>()
|
||||
{
|
||||
Color.PaleVioletRed,
|
||||
Color.Coral,
|
||||
Color.Khaki,
|
||||
Color.PaleGreen,
|
||||
Color.Turquoise,
|
||||
Color.Violet
|
||||
};
|
||||
|
||||
int colorIndex = (int)(rate / 2 % eColors.Count);
|
||||
Color currentColor = eColors[colorIndex];
|
||||
Color nextColor = eColors[(colorIndex + 1) % eColors.Count];
|
||||
lightRGB = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f);
|
||||
|
||||
// Calculate and grant proximity rage.
|
||||
// Regular enemies can give up to 1x proximity rage. Bosses can give up to 3x. Multiple regular enemies don't stack.
|
||||
// Proximity rage is maxed out when within 10 blocks (160 pixels) of the enemy's hitbox.
|
||||
@@ -3097,7 +3122,7 @@ namespace CalamityMod.CalPlayer
|
||||
abyssDeath = false;
|
||||
|
||||
// Signus headcrab darkness
|
||||
if (CalamityWorld.LegendaryMode && CalamityWorld.revenge)
|
||||
if (CalamityWorld.LegendaryMode)
|
||||
{
|
||||
if (CalamityGlobalNPC.signus != -1)
|
||||
{
|
||||
@@ -3801,11 +3826,15 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
Player.GetDamage<GenericDamageClass>() += PrimordialEarth.BuffDamageBoost;
|
||||
Player.statDefense += PrimordialEarth.BuffDefenseBoost;
|
||||
Player.manaRegenDelayBonus += 1;
|
||||
Player.manaRegenBonus += 50 + (int)(400 * (float)Math.Pow((1 - ((float)Player.statMana / (float)Player.statManaMax2)), 2));
|
||||
}
|
||||
if (aeolianEarthBuff)
|
||||
{
|
||||
Player.GetDamage<GenericDamageClass>() += PrimordialAncient.BuffDamageBoost;
|
||||
Player.endurance += PrimordialAncient.BuffDamageReductionBoost;
|
||||
Player.manaRegenDelayBonus += 1;
|
||||
Player.manaRegenBonus += 75 + (int)(600 * (float)Math.Pow((1 - ((float)Player.statMana / (float)Player.statManaMax2)), 2));
|
||||
}
|
||||
|
||||
if (frostFlare)
|
||||
|
||||
@@ -843,8 +843,9 @@ namespace CalamityMod.CalPlayer
|
||||
if (dynamoStemCells && MiniSwarmerCooldown <= 0 && proj.CountsAsClass<RangedDamageClass>())
|
||||
{
|
||||
MiniSwarmerCooldown = DynamoStemCells.MiniSwarmerCooldown;
|
||||
|
||||
Vector2 velocity = proj.velocity.SafeNormalize(Vector2.UnitY) * 19;
|
||||
Vector2 directionToMouse = Main.MouseWorld - Player.Center;
|
||||
directionToMouse.Normalize();
|
||||
Vector2 velocity = directionToMouse * 19;
|
||||
int MiniSwamerDamage = (int)Player.GetTotalDamage<RangedDamageClass>().ApplyTo(DynamoStemCells.MiniSwamerDamage);
|
||||
Projectile.NewProjectile(source, Player.Center, velocity, ProjectileType<MiniatureFolly>(), MiniSwamerDamage, 2f, proj.owner);
|
||||
}
|
||||
|
||||
@@ -35,6 +35,8 @@ namespace CalamityMod.CalPlayer.DrawLayers
|
||||
if (itemType < ItemID.Count)
|
||||
return;
|
||||
|
||||
Color color = new Color(250, 250, 250, heldItem.alpha);
|
||||
|
||||
// This is ugly and I don't give a fuck.
|
||||
// If you want it to look better, do it yourself.
|
||||
Texture2D glowMask = default;
|
||||
@@ -62,8 +64,6 @@ namespace CalamityMod.CalPlayer.DrawLayers
|
||||
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<IridescentExcalibur>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Melee/IridescentExcaliburGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<FatesReveal>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Magic/FatesRevealGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<GreatswordofJudgement>())
|
||||
@@ -75,7 +75,10 @@ namespace CalamityMod.CalPlayer.DrawLayers
|
||||
else if (itemType == ModContent.ItemType<NecroplasmicBeacon>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/SummonItems/NecroplasmicBeaconGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<Orderbringer>())
|
||||
{
|
||||
color = Color.Lerp(Color.White, drawPlayer.Calamity().lightRGB, 0.75f) with { A = 0 };
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Melee/OrderbringerGlow").Value;
|
||||
}
|
||||
else if (itemType == ModContent.ItemType<Photosynthesis>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Magic/PhotosynthesisGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<PlantationStaff>())
|
||||
@@ -140,7 +143,6 @@ namespace CalamityMod.CalPlayer.DrawLayers
|
||||
if (drawInfo.shadow != 0f || drawPlayer.frozen || !(inUse || visuallyHeld) || itemType <= 0 || drawPlayer.dead || heldItem.noUseGraphic || (drawPlayer.wet && heldItem.noWet) || (drawPlayer.happyFunTorchTime && drawPlayer.inventory[drawPlayer.selectedItem].createTile == TileID.Torches && drawPlayer.itemAnimation == 0))
|
||||
return;
|
||||
|
||||
Color color = new Color(250, 250, 250, heldItem.alpha);
|
||||
Vector2 originOffset = Vector2.Zero;
|
||||
|
||||
// Use to adjust glow mask draw offset and color.
|
||||
|
||||
@@ -200,7 +200,6 @@ namespace CalamityMod
|
||||
|
||||
{ NPCID.Spazmatism, 0.85 },
|
||||
{ NPCID.Retinazer, 0.85 },
|
||||
{ ModContent.NPCType<Foveanator>(), 0.85 },
|
||||
|
||||
{ ModContent.NPCType<AquaticScourgeHead>(), 1.1 },
|
||||
{ ModContent.NPCType<AquaticScourgeBody>(), 0.8 },
|
||||
@@ -214,7 +213,6 @@ namespace CalamityMod
|
||||
{ ModContent.NPCType<BrimstoneElemental>(), 0.8 },
|
||||
|
||||
{ NPCID.SkeletronPrime, 0.85 },
|
||||
{ ModContent.NPCType<SkeletronPrime2>(), 0.85 },
|
||||
{ NPCID.PrimeCannon, 0.85 },
|
||||
{ NPCID.PrimeLaser, 0.85 },
|
||||
{ NPCID.PrimeSaw, 0.85 },
|
||||
@@ -261,7 +259,7 @@ namespace CalamityMod
|
||||
|
||||
{ ModContent.NPCType<ProfanedGuardianCommander>(), 0.8 },
|
||||
|
||||
{ ModContent.NPCType<Bumblefuck>(), 0.8 },
|
||||
{ ModContent.NPCType<Dragonfolly>(), 0.8 },
|
||||
|
||||
{ ModContent.NPCType<StormWeaverBody>(), 0.8 },
|
||||
{ ModContent.NPCType<StormWeaverTail>(), 0.8 },
|
||||
@@ -399,12 +397,6 @@ namespace CalamityMod
|
||||
102, // 153 in phase 2
|
||||
119, // 178 in phase 2
|
||||
153 } }, // 229 in phase 2
|
||||
{ ModContent.NPCType<Foveanator>(), new int[] {
|
||||
62, // 93 in phase 2
|
||||
94, // 141 in phase 2
|
||||
110, // 165 in phase 2
|
||||
128, // 192 in phase 2
|
||||
178 } }, // 267 in phase 2
|
||||
|
||||
{ ModContent.NPCType<AquaticScourgeHead>(), new int[] { 110, 176, 187, 198, 330 } },
|
||||
{ ModContent.NPCType<AquaticScourgeBody>(), new int[] { 75, 112, 136, 160, 240 } },
|
||||
@@ -423,12 +415,6 @@ namespace CalamityMod
|
||||
102, // 204 while spinning
|
||||
119, // 238 while spinning
|
||||
153 } }, // 306 while spinning
|
||||
{ ModContent.NPCType<SkeletronPrime2>(), new int[] {
|
||||
50, // 100 while spinning
|
||||
85, // 170 while spinning
|
||||
102, // 204 while spinning
|
||||
119, // 238 while spinning
|
||||
153 } }, // 306 while spinning
|
||||
{ NPCID.PrimeVice, new int[] { 70, 102, 136, 170, 255 } },
|
||||
{ NPCID.PrimeSaw, new int[] { 70, 102, 136, 170, 255 } },
|
||||
{ NPCID.PrimeCannon, new int[] { 30, 51, 68, 85, 102 } },
|
||||
@@ -510,8 +496,8 @@ namespace CalamityMod
|
||||
{ ModContent.NPCType<ProfanedGuardianHealer>(), new int[] { 100, 200, 220, 240, 300 } },
|
||||
{ ModContent.NPCType<ProfanedRocks>(), new int[] { 100, 200, 220, 232, 300 } },
|
||||
|
||||
{ ModContent.NPCType<Bumblefuck>(), new int[] { 170, 256, 288, 320, 504 } },
|
||||
{ ModContent.NPCType<Bumblefuck2>(), new int[] { 145, 220, 242, 264, 435 } },
|
||||
{ ModContent.NPCType<Dragonfolly>(), new int[] { 170, 256, 288, 320, 504 } },
|
||||
{ ModContent.NPCType<DraconicSwarmer>(), new int[] { 145, 220, 242, 264, 435 } },
|
||||
|
||||
{ ModContent.NPCType<CeaselessVoid>(), new int[] { 240, 360, 396, 432, 720 } },
|
||||
{ ModContent.NPCType<DarkEnergy>(), new int[] { 175, 260, 288, 316, 525 } },
|
||||
@@ -649,9 +635,6 @@ namespace CalamityMod
|
||||
{ new Tuple<int, int>(NPCID.Spazmatism, ModContent.ProjectileType<CursedFire>()), new int[] { 60, 120, 148, 176, 264 } },
|
||||
{ new Tuple<int, int>(NPCID.Spazmatism, ModContent.ProjectileType<Shadowflamethrower>()), new int[] { 70, 120, 148, 176, 264 } },
|
||||
{ new Tuple<int, int>(NPCID.Spazmatism, ModContent.ProjectileType<ShadowflameFireball>()), new int[] { 60, 100, 128, 156, 234 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Foveanator>(), ModContent.ProjectileType<FoveanatorLaser>()), new int[] { 50, 108, 132, 156, 234 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Foveanator>(), ModContent.ProjectileType<FoveanatorEnergyBomb>()), new int[] { 70, 120, 148, 176, 264 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Foveanator>(), ModContent.ProjectileType<FoveanatorFlamethrower>()), new int[] { 70, 120, 148, 176, 264 } },
|
||||
|
||||
{ new Tuple<int, int>(ModContent.NPCType<AquaticScourgeHead>(), ModContent.ProjectileType<SulphuricAcidMist>()), new int[] { 60, 100, 120, 140, 210 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<AquaticScourgeHead>(), ModContent.ProjectileType<SandPoisonCloud>()), new int[] { 70, 120, 136, 152, 228 } },
|
||||
@@ -676,9 +659,6 @@ namespace CalamityMod
|
||||
{ new Tuple<int, int>(NPCID.SkeletronPrime, ProjectileID.Skull), new int[] { 50, 108, 124, 140, 210 } },
|
||||
{ new Tuple<int, int>(NPCID.SkeletronPrime, ProjectileID.DeathLaser), new int[] { 50, 108, 124, 140, 210 } },
|
||||
{ new Tuple<int, int>(NPCID.SkeletronPrime, ProjectileID.RocketSkeleton), new int[] { 60, 120, 148, 176, 264 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SkeletronPrime2>(), ProjectileID.Skull), new int[] { 50, 108, 124, 140, 210 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SkeletronPrime2>(), ProjectileID.BombSkeletronPrime), new int[] { 80, 160, 180, 200, 300 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<SkeletronPrime2>(), ProjectileID.FrostBeam), new int[] { 50, 108, 124, 140, 210 } },
|
||||
{ new Tuple<int, int>(NPCID.PrimeCannon, ProjectileID.RocketSkeleton), new int[] { 60, 120, 148, 176, 264 } },
|
||||
{ new Tuple<int, int>(NPCID.PrimeCannon, ProjectileID.BombSkeletronPrime), new int[] { 80, 160, 0, 0, 300 } },
|
||||
{ new Tuple<int, int>(NPCID.PrimeLaser, ProjectileID.DeathLaser), new int[] { 50, 108, 124, 140, 210 } },
|
||||
@@ -769,8 +749,8 @@ namespace CalamityMod
|
||||
{ new Tuple<int, int>(ModContent.NPCType<ProfanedGuardianHealer>(), ModContent.ProjectileType<HolyBurnOrb>()), new int[] { 120, 192, 220, 248, 360 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<ProfanedGuardianHealer>(), ModContent.ProjectileType<HolyLight>()), new int[] { 35, 50, 50, 0, 0 } },
|
||||
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Bumblefuck>(), ModContent.ProjectileType<RedLightningFeather>()), new int[] { 140, 220, 244, 268, 420 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Bumblefuck>(), ModContent.ProjectileType<BirbAuraFlare>()), new int[] { 200, 300, 332, 364, 600 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Dragonfolly>(), ModContent.ProjectileType<RedLightningFeather>()), new int[] { 140, 220, 244, 268, 420 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Dragonfolly>(), ModContent.ProjectileType<BirbAuraFlare>()), new int[] { 200, 300, 332, 364, 600 } },
|
||||
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Providence>(), ModContent.ProjectileType<HolyBlast>()), new int[] { 150, 264, 288, 312, 450 } }, // Split holy fire does: 113, 198, 216, 234, 338
|
||||
{ new Tuple<int, int>(ModContent.NPCType<Providence>(), ModContent.ProjectileType<HolyFire>()), new int[] { 120, 192, 220, 248, 360 } },
|
||||
|
||||
@@ -213,8 +213,7 @@ namespace CalamityMod.Events
|
||||
{
|
||||
NPC.SpawnOnPlayer(ClosestPlayerToWorldCenter, NPCID.Spazmatism);
|
||||
NPC.SpawnOnPlayer(ClosestPlayerToWorldCenter, NPCID.Retinazer);
|
||||
NPC.SpawnOnPlayer(ClosestPlayerToWorldCenter, ModContent.NPCType<Foveanator>());
|
||||
}, permittedNPCs: new int[] { NPCID.Retinazer, ModContent.NPCType<Foveanator>() }),
|
||||
}, permittedNPCs: new int[] { NPCID.Retinazer }),
|
||||
|
||||
new Boss(ModContent.NPCType<AquaticScourgeHead>(), TimeChangeContext.Day, permittedNPCs: new int[] { ModContent.NPCType<AquaticScourgeBody>(), ModContent.NPCType<AquaticScourgeBodyAlt>(), ModContent.NPCType<AquaticScourgeTail>() }),
|
||||
|
||||
@@ -222,7 +221,7 @@ namespace CalamityMod.Events
|
||||
|
||||
new Boss(ModContent.NPCType<BrimstoneElemental>(), TimeChangeContext.Day, permittedNPCs: ModContent.NPCType<Brimling>()),
|
||||
|
||||
new Boss(NPCID.SkeletronPrime, TimeChangeContext.Night, permittedNPCs: new int[] { ModContent.NPCType<SkeletronPrime2>(), NPCID.PrimeCannon, NPCID.PrimeSaw, NPCID.PrimeVice, NPCID.PrimeLaser, NPCID.Probe }),
|
||||
new Boss(NPCID.SkeletronPrime, TimeChangeContext.Night, permittedNPCs: new int[] { NPCID.PrimeCannon, NPCID.PrimeSaw, NPCID.PrimeVice, NPCID.PrimeLaser }),
|
||||
|
||||
new Boss(ModContent.NPCType<CalamitasClone>(), TimeChangeContext.Night, permittedNPCs: new int[] { ModContent.NPCType<Cataclysm>(), ModContent.NPCType<Catastrophe>(),
|
||||
ModContent.NPCType<SoulSeeker>() }),
|
||||
@@ -309,7 +308,7 @@ namespace CalamityMod.Events
|
||||
NPC.SpawnOnPlayer(ClosestPlayerToWorldCenter, type);
|
||||
}, permittedNPCs: new int[] { ModContent.NPCType<ProfanedGuardianDefender>(), ModContent.NPCType<ProfanedGuardianHealer>(), ModContent.NPCType<ProfanedRocks>() }),
|
||||
|
||||
new Boss(ModContent.NPCType<Bumblefuck>(), permittedNPCs: new int[] { ModContent.NPCType<Bumblefuck2>() }),
|
||||
new Boss(ModContent.NPCType<Dragonfolly>(), permittedNPCs: new int[] { ModContent.NPCType<DraconicSwarmer>() }),
|
||||
|
||||
new Boss(ModContent.NPCType<Providence>(), TimeChangeContext.Day, type =>
|
||||
{
|
||||
|
||||
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 588 B |
|
Before Width: | Height: | Size: 493 B |
@@ -19,11 +19,6 @@ namespace CalamityMod.ExtraTextures
|
||||
public static Asset<Texture2D> DestroyerHeadGlowmask;
|
||||
public static Asset<Texture2D> DestroyerBodyGlowmask;
|
||||
public static Asset<Texture2D> DestroyerTailGlowmask;
|
||||
public static Asset<Texture2D> ProbeGlowmask;
|
||||
|
||||
// Master Rev+ Skeletron Prime
|
||||
public static Asset<Texture2D> ChadPrime;
|
||||
public static Asset<Texture2D> ChadPrimeEyeGlowmask;
|
||||
|
||||
// WoF, These are not "exactly" the ExtraTextures. But
|
||||
public static Asset<Texture2D> WallOfFleshEyeGlowmask;
|
||||
@@ -44,16 +39,6 @@ namespace CalamityMod.ExtraTextures
|
||||
public static Asset<Texture2D> CircularSmearFire2;
|
||||
public static Asset<Texture2D> CircularSmearFire3;
|
||||
|
||||
// Boss Heads
|
||||
// I know it's not exactly a Texture2D but it belongs to ExtraTextures.
|
||||
public static int BossHeadIndex_ChadPrime;
|
||||
|
||||
public override void Load()
|
||||
{
|
||||
string chadPrimeIconPath = "CalamityMod/ExtraTextures/ChadPrime_Head_Boss";
|
||||
BossHeadIndex_ChadPrime = CalamityMod.Instance.AddBossHeadTexture(chadPrimeIconPath, -1);
|
||||
}
|
||||
|
||||
|
||||
// TODO: - Every other ExtraTextures Reference could be move in here
|
||||
public override void OnModLoad()
|
||||
@@ -62,11 +47,6 @@ namespace CalamityMod.ExtraTextures
|
||||
DestroyerBodyGlowmask = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/VanillaBossGlowmasks/DestroyerBodyGlow", AssetRequestMode.AsyncLoad);
|
||||
DestroyerTailGlowmask = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/VanillaBossGlowmasks/DestroyerTailGlow", AssetRequestMode.AsyncLoad);
|
||||
|
||||
ProbeGlowmask = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/VanillaBossGlowmasks/ProbeGlow", AssetRequestMode.AsyncLoad);
|
||||
|
||||
ChadPrime = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/ChadPrime", AssetRequestMode.AsyncLoad);
|
||||
ChadPrimeEyeGlowmask = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/ChadPrimeHeadGlow", AssetRequestMode.AsyncLoad);
|
||||
|
||||
WallOfFleshEyeGlowmask = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/VanillaBossGlowmasks/WallOfFleshEyeTelegraphGlow", AssetRequestMode.AsyncLoad);
|
||||
WallOfFleshDemonSickleTexture = ModContent.Request<Texture2D>("CalamityMod/Projectiles/Melee/ForbiddenOathbladeProjectile", AssetRequestMode.AsyncLoad);
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 602 B |
|
Before Width: | Height: | Size: 594 B |
@@ -241,18 +241,7 @@ namespace CalamityMod.ILEditing
|
||||
}
|
||||
cursor.Next.Operand = BalancingConstants.SoaringInsigniaRunAccelerationMultiplier;
|
||||
|
||||
// Second: Magiluminescence. Find the check for whether it's equipped for run speeds.
|
||||
if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdfld<Player>("hasMagiluminescence")))
|
||||
{
|
||||
LogFailure("Run Acceleration Nerfs", "Could not locate the Magiluminescence bool.");
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Don't actually do anything. Magiluminescence is not intended to be nerfed by Calamity.
|
||||
//
|
||||
|
||||
// Third: Shadow Armor. Find the check for whether it's equipped for run speeds.
|
||||
// Second: Shadow Armor. Find the check for whether it's equipped for run speeds.
|
||||
if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdfld<Player>("shadowArmor")))
|
||||
{
|
||||
LogFailure("Run Acceleration Nerfs", "Could not locate the Shadow Armor bool.");
|
||||
@@ -396,75 +385,27 @@ namespace CalamityMod.ILEditing
|
||||
private static void PrefixChanges(On_Player.orig_GrantPrefixBenefits orig, Player self, Item item)
|
||||
{
|
||||
orig(self, item);
|
||||
// Defense accessory prefixes have slightly scaling defense boosts through progression
|
||||
if (item.prefix >= PrefixID.Hard && item.prefix <= PrefixID.Warding)
|
||||
{
|
||||
if (DownedBossSystem.downedDoG)
|
||||
self.statDefense += 3;
|
||||
else if (NPC.downedMoonlord)
|
||||
self.statDefense += 2;
|
||||
else if (Main.hardMode)
|
||||
self.statDefense += 1;
|
||||
}
|
||||
// Hard / Guarding / Armored / Warding give 0.25% / 0.5% / 0.75% / 1% DR
|
||||
if (item.prefix == PrefixID.Hard)
|
||||
{
|
||||
/* Prehardmode = 1
|
||||
* Hardmode = 2
|
||||
* Post-Moon Lord = 3
|
||||
* Post-DoG = 4
|
||||
*/
|
||||
|
||||
if (DownedBossSystem.downedDoG)
|
||||
self.statDefense += 3;
|
||||
else if (NPC.downedMoonlord)
|
||||
self.statDefense += 2;
|
||||
else if (Main.hardMode)
|
||||
self.statDefense += 1;
|
||||
|
||||
self.endurance += 0.0025f;
|
||||
}
|
||||
if (item.prefix == PrefixID.Guarding)
|
||||
{
|
||||
/* Prehardmode = 2
|
||||
* Hardmode = 3
|
||||
* Post-Moon Lord = 4
|
||||
* Post-DoG = 5
|
||||
*/
|
||||
|
||||
if (DownedBossSystem.downedDoG)
|
||||
self.statDefense += 3;
|
||||
else if (NPC.downedMoonlord)
|
||||
self.statDefense += 2;
|
||||
else if (Main.hardMode)
|
||||
self.statDefense += 1;
|
||||
|
||||
self.endurance += 0.005f;
|
||||
}
|
||||
if (item.prefix == PrefixID.Armored)
|
||||
{
|
||||
/* Prehardmode = 3
|
||||
* Hardmode = 4
|
||||
* Post-Moon Lord = 5
|
||||
* Post-DoG = 6
|
||||
*/
|
||||
|
||||
if (DownedBossSystem.downedDoG)
|
||||
self.statDefense += 3;
|
||||
else if (NPC.downedMoonlord)
|
||||
self.statDefense += 2;
|
||||
else if (Main.hardMode)
|
||||
self.statDefense += 1;
|
||||
|
||||
self.endurance += 0.0075f;
|
||||
}
|
||||
if (item.prefix == PrefixID.Warding)
|
||||
{
|
||||
/* Prehardmode = 4
|
||||
* Hardmode = 5
|
||||
* Post-Moon Lord = 6
|
||||
* Post-DoG = 7
|
||||
*/
|
||||
|
||||
if (DownedBossSystem.downedDoG)
|
||||
self.statDefense += 3;
|
||||
else if (NPC.downedMoonlord)
|
||||
self.statDefense += 2;
|
||||
else if (Main.hardMode)
|
||||
self.statDefense += 1;
|
||||
self.endurance += 0.01f;
|
||||
}
|
||||
|
||||
// Lucky prefix increases luck
|
||||
if (item.prefix == PrefixID.Lucky)
|
||||
self.Calamity().calamityBonusLuck += 0.05f;
|
||||
}
|
||||
@@ -501,7 +442,7 @@ namespace CalamityMod.ILEditing
|
||||
private static void VanillaBossResistChanges(ILContext il)
|
||||
{
|
||||
// This IL edit accomplishes two things:
|
||||
// 1. Reduces Expert+ Eater of Worlds' resist to explosives from 80% to 60%.
|
||||
// 1. Reduces Expert+ Eater of Worlds' resist to explosives from 80% to 66%.
|
||||
// 2. Effectively removes Lunatic Cultist's resistance to homing projectiles.
|
||||
var cursor = new ILCursor(il);
|
||||
|
||||
@@ -514,17 +455,15 @@ namespace CalamityMod.ILEditing
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!cursor.TryGotoNext(MoveType.AfterLabel, i => i.MatchDiv()))
|
||||
if (!cursor.TryGotoNext(MoveType.AfterLabel, i => i.MatchLdcR4(5f)))
|
||||
{
|
||||
LogFailure("Reduce EoW Grenade Resist", "Could not move to the resist factor.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove the division instruction, then pop the 5 off the stack to destroy it. Replace it with loading a 0.4 and then multiplying by it.
|
||||
cursor.Remove();
|
||||
// Pop the 5 off the stack, and replace it with a 3.
|
||||
cursor.EmitPop();
|
||||
cursor.EmitLdcR4(0.4f);
|
||||
cursor.EmitMul();
|
||||
cursor.EmitLdcR4(3f);
|
||||
|
||||
// Now, move to the Cultist resist which is right below it.
|
||||
if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdsfld(typeof(ProjectileID.Sets), "CultistIsResistantTo")))
|
||||
|
||||
@@ -91,9 +91,6 @@ namespace CalamityMod.ILEditing
|
||||
On_AWorldListItem.GetDifficulty += GetDifficultyOverride;
|
||||
On_Item.GetShimmered += ShimmerEffectEdits;
|
||||
On_Player.Teleport += TPOverride;
|
||||
On_NPC.SpawnBoss += TripletsSpawnTextOverride;
|
||||
On_NPC.DoDeathEvents_BeforeLoot += PreventFoveanatorDefeatMessageIfNotKilledLast;
|
||||
On_NPC.DoDeathEvents_CelebrateBossDeath += TripletsDefeatTextOverride;
|
||||
On_TileDrawing.DrawSingleTile += GlowMaskTileRender;
|
||||
On_Main.DoUpdate_HandleChat += SpawnPunchCard;
|
||||
On_Player.PlaceThing_CannonBall += AllowCannonJellyfishUse;
|
||||
@@ -192,6 +189,7 @@ namespace CalamityMod.ILEditing
|
||||
|
||||
// Removal of vanilla stupidity
|
||||
IL_Player.StatusFromNPC += RemoveExpertBrainRandomDebuffs;
|
||||
IL_NPC.StrikeNPC_HitInfo_bool_bool += LetDetonatingBubblesTakeDamage;
|
||||
IL_Player.ItemCheck_EmitUseVisuals += MakeMagmaStoneFireGauntletDustToggleable;
|
||||
IL_Projectile.EmitEnchantmentVisualsAt += MakeMagmaStoneFireGauntletProjectileDustToggleable;
|
||||
IL_Sandstorm.HasSufficientWind += DecreaseSandstormWindSpeedRequirement;
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace CalamityMod.ILEditing
|
||||
//private static readonly MethodInfo textureGetValueMethod = typeof(Asset<Texture2D>).GetMethod("get_Value", BindingFlags.Public | BindingFlags.Instance);
|
||||
|
||||
#region Punch Card Spawning Command
|
||||
private static void SpawnPunchCard(Terraria.On_Main.orig_DoUpdate_HandleChat orig)
|
||||
private static void SpawnPunchCard(On_Main.orig_DoUpdate_HandleChat orig)
|
||||
{
|
||||
// Any of these conditions should result in normal behaviour
|
||||
if (!Main.drawingPlayerChat || Main.CurrentInputTextTakerOverride != null || Main.editSign || PlayerInput.UsingGamepad)
|
||||
@@ -282,7 +282,7 @@ namespace CalamityMod.ILEditing
|
||||
cursor.Emit(OpCodes.Ldc_I4, 10 - BalancingConstants.ShieldOfCthulhuBonkNoCollideFrames);
|
||||
}
|
||||
|
||||
private static void ApplyDashKeybind(Terraria.On_Player.orig_DoCommonDashHandle orig, Player self, out int dir, out bool dashing, Player.DashStartAction dashStartAction)
|
||||
private static void ApplyDashKeybind(On_Player.orig_DoCommonDashHandle orig, Player self, out int dir, out bool dashing, Player.DashStartAction dashStartAction)
|
||||
{
|
||||
// we feasting multiplayer bugs
|
||||
if (self.whoAmI != Main.myPlayer)
|
||||
@@ -334,7 +334,7 @@ namespace CalamityMod.ILEditing
|
||||
#endregion
|
||||
|
||||
#region Allow Empress to Enrage in Boss Rush
|
||||
private static bool AllowEmpressToEnrageInBossRush(Terraria.On_NPC.orig_ShouldEmpressBeEnraged orig)
|
||||
private static bool AllowEmpressToEnrageInBossRush(On_NPC.orig_ShouldEmpressBeEnraged orig)
|
||||
{
|
||||
if (BossRushEvent.BossRushActive)
|
||||
return true;
|
||||
@@ -356,11 +356,11 @@ namespace CalamityMod.ILEditing
|
||||
|
||||
orig(self, closestPlayer);
|
||||
}
|
||||
#endregion Prevent Vanilla Bosses From Being Marked as Defeated in Boss Rush
|
||||
#endregion
|
||||
|
||||
#region Enabling of Triggered NPC Platform Fallthrough
|
||||
// Why this isn't a mechanism provided by TML itself or vanilla itself is beyond me.
|
||||
private static void AllowTriggeredFallthrough(Terraria.On_NPC.orig_ApplyTileCollision orig, NPC self, bool fall, Vector2 cPosition, int cWidth, int cHeight)
|
||||
private static void AllowTriggeredFallthrough(On_NPC.orig_ApplyTileCollision orig, NPC self, bool fall, Vector2 cPosition, int cWidth, int cHeight)
|
||||
{
|
||||
if (self.active && self.type == ModContent.NPCType<FusionFeeder>())
|
||||
{
|
||||
@@ -398,7 +398,7 @@ namespace CalamityMod.ILEditing
|
||||
cursor.Emit(OpCodes.Ret);
|
||||
}
|
||||
|
||||
private static void AlterTownNPCSpawnRate(Terraria.On_Main.orig_UpdateTime_SpawnTownNPCs orig)
|
||||
private static void AlterTownNPCSpawnRate(On_Main.orig_UpdateTime_SpawnTownNPCs orig)
|
||||
{
|
||||
double oldWorldRate = Main.desiredWorldTilesUpdateRate;
|
||||
Main.desiredWorldTilesUpdateRate *= CalamityServerConfig.Instance.TownNPCSpawnRateMultiplier;
|
||||
@@ -483,7 +483,7 @@ namespace CalamityMod.ILEditing
|
||||
#endregion
|
||||
|
||||
#region Custom Gate Door Logic
|
||||
private static bool OpenDoor_LabDoorOverride(Terraria.On_WorldGen.orig_OpenDoor orig, int i, int j, int direction)
|
||||
private static bool OpenDoor_LabDoorOverride(On_WorldGen.orig_OpenDoor orig, int i, int j, int direction)
|
||||
{
|
||||
Tile tile = Main.tile[i, j];
|
||||
|
||||
@@ -499,7 +499,7 @@ namespace CalamityMod.ILEditing
|
||||
return orig(i, j, direction);
|
||||
}
|
||||
|
||||
private static bool CloseDoor_LabDoorOverride(Terraria.On_WorldGen.orig_CloseDoor orig, int i, int j, bool forced)
|
||||
private static bool CloseDoor_LabDoorOverride(On_WorldGen.orig_CloseDoor orig, int i, int j, bool forced)
|
||||
{
|
||||
Tile tile = Main.tile[i, j];
|
||||
|
||||
@@ -517,7 +517,7 @@ namespace CalamityMod.ILEditing
|
||||
#endregion
|
||||
|
||||
#region Platform Collision Checks for Grounded Bosses
|
||||
private static bool EnableCalamityBossPlatformCollision(Terraria.On_NPC.orig_Collision_DecideFallThroughPlatforms orig, NPC self)
|
||||
private static bool EnableCalamityBossPlatformCollision(On_NPC.orig_Collision_DecideFallThroughPlatforms orig, NPC self)
|
||||
{
|
||||
if ((self.type == ModContent.NPCType<AstrumAureus>() || self.type == ModContent.NPCType<Crabulon>() || self.type == ModContent.NPCType<RavagerBody>() ||
|
||||
self.type == ModContent.NPCType<RockPillar>() || self.type == ModContent.NPCType<FlamePillar>()) &&
|
||||
@@ -529,7 +529,7 @@ namespace CalamityMod.ILEditing
|
||||
#endregion
|
||||
|
||||
#region Incorporate Enchantments in Item Names
|
||||
private static string IncorporateEnchantmentInAffix(Terraria.On_Item.orig_AffixName orig, Item self)
|
||||
private static string IncorporateEnchantmentInAffix(On_Item.orig_AffixName orig, Item self)
|
||||
{
|
||||
string result = orig(self);
|
||||
|
||||
@@ -545,7 +545,7 @@ namespace CalamityMod.ILEditing
|
||||
#endregion
|
||||
|
||||
#region Apply Projectile Variables Upon Creation
|
||||
private static int IncorporateExtraProjectileVariables(Terraria.On_Projectile.orig_NewProjectile_IEntitySource_float_float_float_float_int_int_float_int_float_float_float orig, IEntitySource spawnSource, float x, float y, float xSpeed, float ySpeed, int type, int damage, float knockback, int owner, float ai0, float ai1, float ai2)
|
||||
private static int IncorporateExtraProjectileVariables(On_Projectile.orig_NewProjectile_IEntitySource_float_float_float_float_int_int_float_int_float_float_float orig, IEntitySource spawnSource, float x, float y, float xSpeed, float ySpeed, int type, int damage, float knockback, int owner, float ai0, float ai1, float ai2)
|
||||
{
|
||||
// This is unfortunately not something that can be done via SetDefaults since owner is set
|
||||
// after that method is called. Doing it directly when the projectile is spawned appears to be the only reasonable way.
|
||||
@@ -613,7 +613,7 @@ namespace CalamityMod.ILEditing
|
||||
#endregion
|
||||
|
||||
#region Apply Old Fashioned Damage to Miscellanous Hits
|
||||
private static void ApplyOldFashionedDamageToMiscHits(Terraria.On_Player.orig_ApplyDamageToNPC orig, Player self, NPC npc, int damage, float knockback, int direction, bool crit = false, DamageClass? damageType = null, bool damageVariation = false)
|
||||
private static void ApplyOldFashionedDamageToMiscHits(On_Player.orig_ApplyDamageToNPC orig, Player self, NPC npc, int damage, float knockback, int direction, bool crit = false, DamageClass? damageType = null, bool damageVariation = false)
|
||||
{
|
||||
if (self.Calamity().oldFashioned)
|
||||
damage = (int)(damage * OldFashioned.DamageBoostMultiplier);
|
||||
@@ -699,7 +699,7 @@ namespace CalamityMod.ILEditing
|
||||
#endregion
|
||||
|
||||
#region Fire Cursor Effect for the Calamity Accessory
|
||||
private static void UseCoolFireCursorEffect(Terraria.On_Main.orig_DrawCursor orig, Vector2 bonus, bool smart)
|
||||
private static void UseCoolFireCursorEffect(On_Main.orig_DrawCursor orig, Vector2 bonus, bool smart)
|
||||
{
|
||||
Player player = Main.LocalPlayer;
|
||||
|
||||
@@ -911,7 +911,7 @@ namespace CalamityMod.ILEditing
|
||||
#endregion
|
||||
|
||||
#region General Particle Rendering
|
||||
private static void DrawFusableParticles(Terraria.On_Main.orig_SortDrawCacheWorms orig, Main self)
|
||||
private static void DrawFusableParticles(On_Main.orig_SortDrawCacheWorms orig, Main self)
|
||||
{
|
||||
DeathAshParticle.DrawAll();
|
||||
|
||||
@@ -921,7 +921,7 @@ namespace CalamityMod.ILEditing
|
||||
orig(self);
|
||||
}
|
||||
|
||||
private static void DrawForegroundParticles(Terraria.On_Main.orig_DrawInfernoRings orig, Main self)
|
||||
private static void DrawForegroundParticles(On_Main.orig_DrawInfernoRings orig, Main self)
|
||||
{
|
||||
GeneralParticleHandler.DrawAllParticles(Main.spriteBatch);
|
||||
orig(self);
|
||||
@@ -1624,7 +1624,7 @@ namespace CalamityMod.ILEditing
|
||||
/// <summary>
|
||||
/// Determines if the custom grapple movement should take place or not. Useful for hooks that only do movement tricks in some cases
|
||||
/// </summary>
|
||||
private static void CustomGrappleMovementCheck(Terraria.On_Player.orig_GrappleMovement orig, Player self)
|
||||
private static void CustomGrappleMovementCheck(On_Player.orig_GrappleMovement orig, Player self)
|
||||
{
|
||||
WulfrumPackPlayer mp = self.GetModPlayer<WulfrumPackPlayer>();
|
||||
|
||||
@@ -1637,7 +1637,7 @@ namespace CalamityMod.ILEditing
|
||||
/// <summary>
|
||||
/// This is called right before the game decides wether or not to update the players velocity based on "real" physics (aka not tongued or hooked or with a pulley)
|
||||
/// </summary>
|
||||
private static void CustomGrapplePreDefaultMovement(Terraria.On_Player.orig_UpdatePettingAnimal orig, Player self)
|
||||
private static void CustomGrapplePreDefaultMovement(On_Player.orig_UpdatePettingAnimal orig, Player self)
|
||||
{
|
||||
orig(self);
|
||||
|
||||
@@ -1661,7 +1661,7 @@ namespace CalamityMod.ILEditing
|
||||
/// Used before the player steps up a half tile. If we don't do that, players that are grappled but don't use hook movement won't be able to go over tiles.
|
||||
/// The hook cache is reset in PreUpdateMovement
|
||||
/// </summary>
|
||||
private static void CustomGrapplePreStepUp(Terraria.On_Player.orig_SlopeDownMovement orig, Player self)
|
||||
private static void CustomGrapplePreStepUp(On_Player.orig_SlopeDownMovement orig, Player self)
|
||||
{
|
||||
orig(self);
|
||||
|
||||
@@ -1675,9 +1675,9 @@ namespace CalamityMod.ILEditing
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This is done to put the hook if it was cacehd during the frame instruction.
|
||||
/// This is done to put the hook if it was cached during the frame instruction.
|
||||
/// </summary>
|
||||
private static void CustomGrapplePostFrame(Terraria.On_Player.orig_PlayerFrame orig, Player self)
|
||||
private static void CustomGrapplePostFrame(On_Player.orig_PlayerFrame orig, Player self)
|
||||
{
|
||||
orig(self);
|
||||
WulfrumPackPlayer mp = self.GetModPlayer<WulfrumPackPlayer>();
|
||||
@@ -1694,7 +1694,7 @@ namespace CalamityMod.ILEditing
|
||||
|
||||
#region Find Calamity Item Dye Shader
|
||||
|
||||
internal static void FindCalamityItemDyeShader(Terraria.On_Player.orig_UpdateItemDye orig, Player self, bool isNotInVanitySlot, bool isSetToHidden, Item armorItem, Item dyeItem)
|
||||
internal static void FindCalamityItemDyeShader(On_Player.orig_UpdateItemDye orig, Player self, bool isNotInVanitySlot, bool isSetToHidden, Item armorItem, Item dyeItem)
|
||||
{
|
||||
orig(self, isNotInVanitySlot, isSetToHidden, armorItem, dyeItem);
|
||||
if (armorItem.type == ModContent.ItemType<Calamity>())
|
||||
@@ -1727,7 +1727,7 @@ namespace CalamityMod.ILEditing
|
||||
#endregion
|
||||
|
||||
#region Custom world selection difficulties
|
||||
internal static void GetDifficultyOverride(Terraria.GameContent.UI.Elements.On_AWorldListItem.orig_GetDifficulty orig, AWorldListItem self, out string expertText, out Color gameModeColor)
|
||||
internal static void GetDifficultyOverride(On_AWorldListItem.orig_GetDifficulty orig, AWorldListItem self, out string expertText, out Color gameModeColor)
|
||||
{
|
||||
// Run the original code and pull out the original text and text color
|
||||
orig(self, out expertText, out gameModeColor);
|
||||
@@ -1762,7 +1762,7 @@ namespace CalamityMod.ILEditing
|
||||
#endregion
|
||||
|
||||
#region Shimmer effect edits
|
||||
public static void ShimmerEffectEdits(Terraria.On_Item.orig_GetShimmered orig, Item self)
|
||||
public static void ShimmerEffectEdits(On_Item.orig_GetShimmered orig, Item self)
|
||||
{
|
||||
// Make Plagued Containment Bricks turn into Plagued Nanodroids if shimmered before defeating Golem
|
||||
if (self.type == ModContent.ItemType<PlaguedContainmentBrick>())
|
||||
@@ -1805,7 +1805,7 @@ namespace CalamityMod.ILEditing
|
||||
|
||||
#region Block Abyss from Teleportation Potions
|
||||
|
||||
public static void TPOverride(Terraria.On_Player.orig_Teleport orig, Player self, Vector2 newPos, int Style = 0, int extraInfo = 0)
|
||||
public static void TPOverride(On_Player.orig_Teleport orig, Player self, Vector2 newPos, int Style = 0, int extraInfo = 0)
|
||||
{
|
||||
// Grab the tile from where the potion wants to teleport
|
||||
Tile t = CalamityUtils.ParanoidTileRetrieval(newPos.ToTileCoordinates().X, newPos.ToTileCoordinates().Y);
|
||||
@@ -1849,67 +1849,6 @@ namespace CalamityMod.ILEditing
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Revengeance Master Mode Twins Shenanigans
|
||||
public static void TripletsSpawnTextOverride(Terraria.On_NPC.orig_SpawnBoss orig, int x, int y, int type, int targetPlayerIndex)
|
||||
{
|
||||
if (CalamityWorld.death && type == NPCID.Retinazer)
|
||||
{
|
||||
int retinazerIndex = NPC.NewNPC(NPC.GetBossSpawnSource(targetPlayerIndex), x, y, type, 1);
|
||||
if (retinazerIndex == 200)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Main.npc[retinazerIndex].target = targetPlayerIndex;
|
||||
Main.npc[retinazerIndex].timeLeft *= 20;
|
||||
|
||||
if (Main.dedServ && retinazerIndex < 200)
|
||||
{
|
||||
NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, retinazerIndex);
|
||||
}
|
||||
|
||||
AchievementsHelper.CheckMechaMayhem();
|
||||
|
||||
CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.Status.Boss.TripletsBossText", new Color(175, 75, 255));
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
orig(x, y, type, targetPlayerIndex);
|
||||
}
|
||||
}
|
||||
|
||||
public static void PreventFoveanatorDefeatMessageIfNotKilledLast(On_NPC.orig_DoDeathEvents_BeforeLoot orig, NPC self, Player closestPlayer)
|
||||
{
|
||||
if (CalamityWorld.death && self.type == ModContent.NPCType<Foveanator>() && (NPC.AnyNPCs(NPCID.Spazmatism) || NPC.AnyNPCs(NPCID.Retinazer)))
|
||||
{
|
||||
self.value = 0f;
|
||||
self.boss = false;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
orig(self, closestPlayer);
|
||||
}
|
||||
}
|
||||
|
||||
public static void TripletsDefeatTextOverride(On_NPC.orig_DoDeathEvents_CelebrateBossDeath orig, NPC self, string typeName)
|
||||
{
|
||||
bool correctNPCType = self.type == NPCID.Retinazer || self.type == NPCID.Spazmatism || self.type == ModContent.NPCType<Foveanator>();
|
||||
if (CalamityWorld.death && correctNPCType)
|
||||
{
|
||||
if (Main.netMode == NetmodeID.SinglePlayer)
|
||||
Main.NewText(Language.GetTextValue("Announcement.HasBeenDefeated_Plural", CalamityUtils.GetTextValue("Status.Boss.TripletsDefeatName")), 175, 75, 255);
|
||||
else if (Main.dedServ)
|
||||
ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasBeenDefeated_Plural", NetworkText.FromKey("Mods.CalamityMod.Status.Boss.TripletsDefeatName")), new Color(175, 75, 255));
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
orig(self, typeName);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Optimized GlowMask Rendering on Tile
|
||||
private static void GlowMaskTileRender(On_TileDrawing.orig_DrawSingleTile orig, TileDrawing self, TileDrawInfo drawData, bool solidLayer, int waterStyleOverride, Vector2 screenPosition, Vector2 screenOffset, int tileX, int tileY)
|
||||
{
|
||||
@@ -1974,7 +1913,7 @@ namespace CalamityMod.ILEditing
|
||||
#endregion
|
||||
|
||||
#region Allow Cannons to use jellyfish
|
||||
public static void AllowCannonJellyfishUse(Terraria.On_Player.orig_PlaceThing_CannonBall orig, Player self)
|
||||
public static void AllowCannonJellyfishUse(On_Player.orig_PlaceThing_CannonBall orig, Player self)
|
||||
{
|
||||
// Check if the player is holding a jelly
|
||||
if (self.HeldItem.type == ModContent.ItemType<BabyCannonballJellyfishItem>())
|
||||
@@ -2085,7 +2024,7 @@ namespace CalamityMod.ILEditing
|
||||
#endregion
|
||||
|
||||
#region Add Stohne to the Jungle
|
||||
public static void AddStohne(Terraria.GameContent.Biomes.On_JunglePass.orig_GenerateFinishingTouches orig, JunglePass self, GenerationProgress progress, int oldX, int oldY)
|
||||
public static void AddStohne(On_JunglePass.orig_GenerateFinishingTouches orig, JunglePass self, GenerationProgress progress, int oldX, int oldY)
|
||||
{
|
||||
int anchorX = oldX;
|
||||
int anchorY = oldY;
|
||||
@@ -2629,7 +2568,7 @@ namespace CalamityMod.ILEditing
|
||||
#endregion
|
||||
|
||||
#region Make Celestial Onion give the Master Mode slot
|
||||
public static bool MasterModeCelestialOnionCheck(Terraria.On_Player.orig_IsItemSlotUnlockedAndUsable orig, Player self, int slot)
|
||||
public static bool MasterModeCelestialOnionCheck(On_Player.orig_IsItemSlotUnlockedAndUsable orig, Player self, int slot)
|
||||
{
|
||||
if ((slot == 9 || slot == 19) && self.Calamity().extraAccessoryML && !Main.gameMenu)
|
||||
{
|
||||
|
||||
@@ -9,6 +9,7 @@ using CalamityMod.NPCs.AcidRain;
|
||||
using CalamityMod.NPCs.NormalNPCs;
|
||||
using CalamityMod.NPCs.TownNPCs;
|
||||
using CalamityMod.Walls;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Mono.Cecil.Cil;
|
||||
using MonoMod.Cil;
|
||||
@@ -17,7 +18,7 @@ using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.GameContent.Drawing;
|
||||
using Terraria.GameContent.Personalities;
|
||||
using Terraria.GameContent.ItemDropRules;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.Graphics.Effects;
|
||||
@@ -153,7 +154,7 @@ namespace CalamityMod.ILEditing
|
||||
#endregion
|
||||
|
||||
#region Prevention of Slime Rain Spawns When Near Bosses
|
||||
private static void PreventBossSlimeRainSpawns(Terraria.On_NPC.orig_SlimeRainSpawns orig, int plr)
|
||||
private static void PreventBossSlimeRainSpawns(On_NPC.orig_SlimeRainSpawns orig, int plr)
|
||||
{
|
||||
if (!Main.player[plr].Calamity().isNearbyBoss && CalamityServerConfig.Instance.BossZen)
|
||||
orig(plr);
|
||||
@@ -174,12 +175,47 @@ namespace CalamityMod.ILEditing
|
||||
}
|
||||
|
||||
// Remove the Expert Mode check, and in its place put a check for the Zenith seed (Get fixed boi).
|
||||
// Note from CIT: I originally removed these entirely;
|
||||
cursor.Emit(OpCodes.Pop);
|
||||
cursor.Emit(OpCodes.Ldsfld, typeof(Main).GetField("zenithWorld"));
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Disable Detonating Bubble StrikeNPC Hardcoded Override
|
||||
private static void LetDetonatingBubblesTakeDamage(ILContext il)
|
||||
{
|
||||
// In vanilla's StrikeNPC function, Detonating Bubbles have a hardcoded type check which sets the damage of the strike to 0.
|
||||
// This IL edit disables that type check in Death Mode.
|
||||
var cursor = new ILCursor(il);
|
||||
|
||||
// Go to the point after the check for the Detonating Bubble NPC ID.
|
||||
if (!cursor.TryGotoNext(MoveType.AfterLabel, i => i.MatchLdcR8(0.0)))
|
||||
{
|
||||
LogFailure("Let Detonating Bubbles Take Damage in Death", "Could not move after the NPC type check.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Define the label.
|
||||
var label = il.DefineLabel();
|
||||
|
||||
// Add a branch if it is Death Mode.
|
||||
cursor.Emit(OpCodes.Ldsfld, typeof(CalamityWorld).GetField("death"));
|
||||
cursor.Emit(OpCodes.Brtrue, label);
|
||||
|
||||
// Move to the point after Detonating Bubble changes are implemented to place the branch label.
|
||||
if (!cursor.TryGotoNext(MoveType.After, i => i.MatchStfld<NPC>("dontTakeDamage")))
|
||||
{
|
||||
LogFailure("Let Detonating Bubbles Take Damage in Death", "Could not move to after the Detonating Bubble logic.");
|
||||
return;
|
||||
}
|
||||
if (!cursor.TryGotoNext(MoveType.AfterLabel, i => i.MatchLdarg0()))
|
||||
{
|
||||
LogFailure("Let Detonating Bubbles Take Damage in Death", "Could not move to after the Detonating Bubble logic.");
|
||||
return;
|
||||
}
|
||||
cursor.MarkLabel(label);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Make Meteorite Explodable
|
||||
private static void MakeMeteoriteExplodable(ILContext il)
|
||||
{
|
||||
@@ -271,13 +307,15 @@ namespace CalamityMod.ILEditing
|
||||
LogFailure("Prevent Fossil Shattering", "Could not locate the Desert Fossil Tile ID variable.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove this value and replace it with a large number that will never be a valid tile ID.
|
||||
cursor.Remove();
|
||||
cursor.Emit(OpCodes.Ldc_I4, TileID.PixelBox); // Change to Pixel Box because it cannot be obtained in-game without cheating.
|
||||
cursor.Emit(OpCodes.Ldc_I4, 40000);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Remove Hellforge Pickaxe Requirement
|
||||
private static int RemoveHellforgePickaxeRequirement(Terraria.On_Player.orig_GetPickaxeDamage orig, Player self, int x, int y, int pickPower, int hitBufferIndex, Tile tileTarget)
|
||||
private static int RemoveHellforgePickaxeRequirement(On_Player.orig_GetPickaxeDamage orig, Player self, int x, int y, int pickPower, int hitBufferIndex, Tile tileTarget)
|
||||
{
|
||||
if (tileTarget.TileType == TileID.Hellforge)
|
||||
pickPower = 65;
|
||||
@@ -295,10 +333,6 @@ namespace CalamityMod.ILEditing
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Fix Chlorophyte Crystal Attacking Where it Shouldn't
|
||||
// TODO -- Finish this
|
||||
#endregion Fix Chlorophyte Crystal Attacking Where it Shouldn't
|
||||
|
||||
#region Prevent UFO Mount from Dismounting in Water
|
||||
private static void PreventUFODismountInWater(ILContext il)
|
||||
{
|
||||
@@ -331,7 +365,7 @@ namespace CalamityMod.ILEditing
|
||||
#endregion Prevent UFO Mount from Dismounting in Water
|
||||
|
||||
#region Color Blighted Gel
|
||||
private static void ColorBlightedGel(Terraria.GameContent.ItemDropRules.On_CommonCode.orig_ModifyItemDropFromNPC orig, NPC npc, int itemIndex)
|
||||
private static void ColorBlightedGel(On_CommonCode.orig_ModifyItemDropFromNPC orig, NPC npc, int itemIndex)
|
||||
{
|
||||
orig(npc, itemIndex);
|
||||
|
||||
@@ -357,7 +391,7 @@ namespace CalamityMod.ILEditing
|
||||
#endregion Color Blighted Gel
|
||||
|
||||
#region Improve Angler Quest Rewards
|
||||
private static void ImproveAnglerRewards(Terraria.On_Player.orig_GetAnglerReward orig, Player self, NPC angler, int questItemType)
|
||||
private static void ImproveAnglerRewards(On_Player.orig_GetAnglerReward orig, Player self, NPC angler, int questItemType)
|
||||
{
|
||||
orig(self, angler, questItemType);
|
||||
|
||||
@@ -1046,7 +1080,7 @@ namespace CalamityMod.ILEditing
|
||||
var cursor = new ILCursor(il);
|
||||
if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdfld<Player>("magmaStone"))) // Flag for if Magma Stone is equipped. Fire Gauntlet also uses this.
|
||||
{
|
||||
LogFailure("Make Magma Stone & Fire Gauntlet Dust Toggleable", "Could not locate the magma stone variable.");
|
||||
LogFailure("Make Magma Stone & Fire Gauntlet Dust Toggleable", "Could not locate the Magma Stone variable.");
|
||||
return;
|
||||
}
|
||||
// Load the player itself onto the stack so that it becomes an argument for the following delegate.
|
||||
@@ -1091,7 +1125,7 @@ namespace CalamityMod.ILEditing
|
||||
}
|
||||
|
||||
// Remove the instruction and replace with 1 (true). This effectively removes the requirement for defeating Plantera.
|
||||
// The only requirements for summoning Golems with Power Cells are now: 1) Golem is not alive, and 2) The world is in Hardmode.
|
||||
// The only requirements for summoning Golem with Power Cells are now: 1) Golem is not alive, and 2) The world is in Hardmode.
|
||||
cursor.EmitPop();
|
||||
cursor.Emit(OpCodes.Ldc_I4_1);
|
||||
}
|
||||
@@ -1144,7 +1178,7 @@ namespace CalamityMod.ILEditing
|
||||
return;
|
||||
}
|
||||
|
||||
// branch is used for exit condition. So setting ble.s opcode to nop will remove the condition
|
||||
// Branch is used for exit condition. So setting ble.s opcode to nop will remove the condition
|
||||
cursor.Prev.OpCode = OpCodes.Nop;
|
||||
|
||||
// After that we pop NPC.damage and 0 from stack
|
||||
@@ -1188,7 +1222,7 @@ namespace CalamityMod.ILEditing
|
||||
}*/
|
||||
#endregion
|
||||
|
||||
#region Allow disabling gravity swap visual && allow gravity keybind
|
||||
#region Allow Disabling Gravity Swap Visual and Allow Gravity Keybind
|
||||
private static void DelayGravity(On_Player.orig_UpdateControlHolds orig, Player Player)
|
||||
{
|
||||
var cplay = Player.Calamity();
|
||||
|
||||
@@ -8,6 +8,7 @@ using MonoMod.Cil;
|
||||
using Terraria;
|
||||
using Terraria.GameContent.UI.States;
|
||||
using Terraria.ID;
|
||||
using Terraria.IO;
|
||||
using Terraria.WorldBuilding;
|
||||
|
||||
namespace CalamityMod.ILEditing
|
||||
@@ -66,7 +67,7 @@ namespace CalamityMod.ILEditing
|
||||
#endregion Fixing of Living Tree/Sulphurous Sea Interactions
|
||||
|
||||
#region Removal of Hardmode Ore Generation from Evil Altars
|
||||
private static void PreventSmashAltarCode(Terraria.On_WorldGen.orig_SmashAltar orig, int i, int j)
|
||||
private static void PreventSmashAltarCode(On_WorldGen.orig_SmashAltar orig, int i, int j)
|
||||
{
|
||||
if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework)
|
||||
return;
|
||||
@@ -135,10 +136,8 @@ namespace CalamityMod.ILEditing
|
||||
return;
|
||||
}
|
||||
|
||||
// Pop original value off.
|
||||
// Pop original value off. Push '2' to the stack.
|
||||
c.Emit(OpCodes.Pop);
|
||||
|
||||
// Push '2' to the stack.
|
||||
c.Emit(OpCodes.Ldc_I4_2);
|
||||
|
||||
// OBJECTIVE 2
|
||||
@@ -181,13 +180,11 @@ namespace CalamityMod.ILEditing
|
||||
|
||||
// Emit our new string "Mods.CalamityMod.UI.SmallWorldWarning".
|
||||
c.Emit(OpCodes.Ldstr, "Mods.CalamityMod.UI.SmallWorldWarning");
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Clear temporary modded tiles
|
||||
private static void ClearModdedTempTiles(Terraria.IO.On_WorldFile.orig_ClearTempTiles orig)
|
||||
private static void ClearModdedTempTiles(On_WorldFile.orig_ClearTempTiles orig)
|
||||
{
|
||||
orig();
|
||||
|
||||
|
||||
@@ -73,8 +73,10 @@ namespace CalamityMod.Items.Accessories
|
||||
continue;
|
||||
|
||||
// Inflict Riptide on empowered parries.
|
||||
//Doze - I gave all parry accessories long debuff infliction times due to the lack of weapons that inflict debuffs for a decent time, and the scarcity of using the parry
|
||||
//Most common vanilla debuffs have a way to inflict them for 15, 20, or even 30 seconds
|
||||
if (empowered)
|
||||
npc.AddBuff(ModContent.BuffType<RiptideDebuff>(), 300);
|
||||
npc.AddBuff(ModContent.BuffType<RiptideDebuff>(), CalamityUtils.SecondsToFrames(15));
|
||||
|
||||
// If the NPC can be moved, violently shove them away. Make them susceptible to fall damage on empowered parries.
|
||||
// Otherwise, simply deal a large amount of damage to them if empowered.
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories.Vanity
|
||||
{
|
||||
[AutoloadEquip(EquipType.Face)]
|
||||
public class LucisSight : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
if (!Main.dedServ)
|
||||
{
|
||||
int equipSlot = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Face);
|
||||
ArmorIDs.Face.Sets.DrawInFaceUnderHairLayer[equipSlot] = true;
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 28;
|
||||
Item.height = 18;
|
||||
Item.value = Item.buyPrice(gold: 10); // Sold by Steampunker
|
||||
Item.rare = ItemRarityID.Pink;
|
||||
Item.accessory = true;
|
||||
Item.vanity = true;
|
||||
Item.Calamity().donorItem = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 318 B |
|
After Width: | Height: | Size: 2.2 KiB |
@@ -22,7 +22,6 @@ namespace CalamityMod.Items.Accessories.Vanity
|
||||
EquipLoader.AddEquipTexture(Mod, "CalamityMod/Projectiles/InvisibleProj", EquipType.Wings, this);
|
||||
}
|
||||
}
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
if (Main.dedServ)
|
||||
@@ -44,17 +43,15 @@ namespace CalamityMod.Items.Accessories.Vanity
|
||||
Item.width = 36;
|
||||
Item.height = 34;
|
||||
Item.accessory = true;
|
||||
Item.consumable = true;
|
||||
Item.vanity = true;
|
||||
Item.rare = ModContent.RarityType<Turquoise>();
|
||||
Item.value = CalamityGlobalItem.RarityBlueBuyPrice;
|
||||
Item.Calamity().devItem = true;
|
||||
}
|
||||
public override bool CanRightClick() => true;
|
||||
|
||||
public override void ModifyItemLoot(ItemLoot itemLoot)
|
||||
public override void RightClick(Player player)
|
||||
{
|
||||
itemLoot.Add(ModContent.ItemType<XyksBlessingOrange>());
|
||||
player.PutItemInInventoryFromItemUsage(ModContent.ItemType<XyksBlessingOrange>(), 1);
|
||||
}
|
||||
public override void UpdateVanity(Player player)
|
||||
{
|
||||
|
||||
@@ -44,17 +44,15 @@ namespace CalamityMod.Items.Accessories.Vanity
|
||||
Item.width = 36;
|
||||
Item.height = 34;
|
||||
Item.accessory = true;
|
||||
Item.consumable = true;
|
||||
Item.vanity = true;
|
||||
Item.rare = ModContent.RarityType<DarkOrange>();
|
||||
Item.value = CalamityGlobalItem.RarityBlueBuyPrice;
|
||||
Item.Calamity().devItem = true;
|
||||
}
|
||||
public override bool CanRightClick() => true;
|
||||
|
||||
public override void ModifyItemLoot(ItemLoot itemLoot)
|
||||
public override void RightClick(Player player)
|
||||
{
|
||||
itemLoot.Add(ModContent.ItemType<XyksBlessingBlue>());
|
||||
player.PutItemInInventoryFromItemUsage(ModContent.ItemType<XyksBlessingBlue>(), 1);
|
||||
}
|
||||
public override void UpdateVanity(Player player)
|
||||
{
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace CalamityMod.Items.Accessories
|
||||
float generousHitboxWidth = Math.Max(nPC.Hitbox.Width / 2f, nPC.Hitbox.Height / 2f) + 100; // Adds some room so max bonus isnt when you're ON the hitbox
|
||||
float intensity = Utils.Remap(Utils.Distance(player.Center, nPC.Center), MaxDistance + generousHitboxWidth, generousHitboxWidth, 1, 3, true); // We have to have this seperate from bonus, otherwise all effected enemies take damage based on the closest enemy
|
||||
|
||||
if (Utils.Distance(nPC.Center, player.Center) < MaxDistance + generousHitboxWidth && (nPC.IsAnEnemy(true, true, false) || nPC.type == ModContent.NPCType<SuperDummyNPC>()) && nPC.CanBeChasedBy())
|
||||
if (Utils.Distance(nPC.Center, player.Center) < MaxDistance + generousHitboxWidth && (nPC.IsAnEnemy(true, true, false) || nPC.type == ModContent.NPCType<SuperDummyNPC>()) && !nPC.dontTakeDamage)
|
||||
{
|
||||
float minDamageMult = 0.35f;
|
||||
int maxTargets = 25;
|
||||
|
||||
@@ -7,7 +7,8 @@ using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Armor.Aerospec
|
||||
{
|
||||
[AutoloadEquip(EquipType.Head)]
|
||||
public class AerospecHat : ModItem, ILocalizedModType
|
||||
[LegacyName("AerospecHat")]
|
||||
public class AerospecHeadMagic : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PreHardmode";
|
||||
public override void SetDefaults()
|
||||
|
Before Width: | Height: | Size: 373 B After Width: | Height: | Size: 373 B |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
@@ -7,7 +7,8 @@ using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Armor.Aerospec
|
||||
{
|
||||
[AutoloadEquip(EquipType.Head)]
|
||||
public class AerospecHelm : ModItem, ILocalizedModType
|
||||
[LegacyName("AerospecHelm")]
|
||||
public class AerospecHeadMelee : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PreHardmode";
|
||||
public override void SetDefaults()
|
||||
@@ -52,7 +53,7 @@ namespace CalamityMod.Items.Armor.Aerospec
|
||||
AddIngredient(ItemID.SunplateBlock, 3).
|
||||
AddIngredient(ItemID.Feather).
|
||||
AddTile(TileID.Anvils).
|
||||
SortBeforeFirstRecipesOf(ModContent.ItemType<AerospecHat>()).
|
||||
SortBeforeFirstRecipesOf(ModContent.ItemType<AerospecHeadMagic>()).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 343 B After Width: | Height: | Size: 343 B |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
@@ -7,7 +7,8 @@ using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Armor.Aerospec
|
||||
{
|
||||
[AutoloadEquip(EquipType.Head)]
|
||||
public class AerospecHood : ModItem, ILocalizedModType
|
||||
[LegacyName("AerospecHood")]
|
||||
public class AerospecHeadRanged : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PreHardmode";
|
||||
public override void SetDefaults()
|
||||
@@ -51,7 +52,7 @@ namespace CalamityMod.Items.Armor.Aerospec
|
||||
AddIngredient(ItemID.SunplateBlock, 3).
|
||||
AddIngredient(ItemID.Feather).
|
||||
AddTile(TileID.Anvils).
|
||||
SortAfterFirstRecipesOf(ModContent.ItemType<AerospecHelm>()).
|
||||
SortAfterFirstRecipesOf(ModContent.ItemType<AerospecHeadMagic>()).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 312 B After Width: | Height: | Size: 312 B |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
@@ -7,7 +7,8 @@ using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Armor.Aerospec
|
||||
{
|
||||
[AutoloadEquip(EquipType.Head)]
|
||||
public class AerospecHeadgear : ModItem, ILocalizedModType
|
||||
[LegacyName("AerospecHeadgear")]
|
||||
public class AerospecHeadRogue : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PreHardmode";
|
||||
public override void SetStaticDefaults()
|
||||
@@ -60,7 +61,7 @@ namespace CalamityMod.Items.Armor.Aerospec
|
||||
AddIngredient(ItemID.SunplateBlock, 3).
|
||||
AddIngredient(ItemID.Feather).
|
||||
AddTile(TileID.Anvils).
|
||||
SortAfterFirstRecipesOf(ModContent.ItemType<AerospecHat>()).
|
||||
SortAfterFirstRecipesOf(ModContent.ItemType<AerospecBreastplate>()).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 217 B After Width: | Height: | Size: 217 B |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
@@ -10,7 +10,8 @@ using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Armor.Aerospec
|
||||
{
|
||||
[AutoloadEquip(EquipType.Head)]
|
||||
public class AerospecHelmet : ModItem, ILocalizedModType
|
||||
[LegacyName("AerospecHelmet")]
|
||||
public class AerospecHeadSummon : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PreHardmode";
|
||||
public static int ValkyrieDamage = 20;
|
||||
@@ -74,7 +75,7 @@ namespace CalamityMod.Items.Armor.Aerospec
|
||||
AddIngredient(ItemID.SunplateBlock, 3).
|
||||
AddIngredient(ItemID.Feather).
|
||||
AddTile(TileID.Anvils).
|
||||
SortBeforeFirstRecipesOf(ModContent.ItemType<AerospecHeadgear>()).
|
||||
SortBeforeFirstRecipesOf(ModContent.ItemType<AerospecHeadRogue>()).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 354 B After Width: | Height: | Size: 354 B |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
@@ -12,7 +12,8 @@ using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Armor.Auric
|
||||
{
|
||||
[AutoloadEquip(EquipType.Head)]
|
||||
public class AuricTeslaWireHemmedVisage : ModItem, ILocalizedModType
|
||||
[LegacyName("AuricTeslaWireHemmedVisage")]
|
||||
public class AuricTeslaHeadMagic : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
public override void SetDefaults()
|
||||
@@ -95,7 +96,7 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
AddIngredient<TarragonHeadMagic>().
|
||||
AddIngredient<AuricBar>(12).
|
||||
AddTile<CosmicAnvil>().
|
||||
SortBeforeFirstRecipesOf(ModContent.ItemType<AuricTeslaSpaceHelmet>()).
|
||||
SortBeforeFirstRecipesOf(ModContent.ItemType<AuricTeslaBodyArmor>()).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 684 B After Width: | Height: | Size: 684 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
@@ -15,7 +15,8 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
{
|
||||
[AutoloadEquip(EquipType.Head)]
|
||||
[LegacyName("AuricTeslaHelm")]
|
||||
public class AuricTeslaRoyalHelm : ModItem, ILocalizedModType
|
||||
[LegacyName("AuricTeslaRoyalHelm")]
|
||||
public class AuricTeslaHeadMelee : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
public override void SetDefaults()
|
||||
@@ -103,7 +104,7 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
AddIngredient<TarragonHeadMelee>().
|
||||
AddIngredient<AuricBar>(12).
|
||||
AddTile<CosmicAnvil>().
|
||||
SortBeforeFirstRecipesOf(ModContent.ItemType<AuricTeslaHoodedFacemask>()).
|
||||
SortBeforeFirstRecipesOf(ModContent.ItemType<AuricTeslaHeadMagic>()).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 676 B After Width: | Height: | Size: 676 B |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
@@ -13,7 +13,8 @@ using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Armor.Auric
|
||||
{
|
||||
[AutoloadEquip(EquipType.Head)]
|
||||
public class AuricTeslaHoodedFacemask : ModItem, ILocalizedModType
|
||||
[LegacyName("AuricTeslaHoodedFacemask")]
|
||||
public class AuricTeslaHeadRanged : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
public override void SetDefaults()
|
||||
@@ -98,7 +99,7 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
AddIngredient<TarragonHeadRanged>().
|
||||
AddIngredient<AuricBar>(12).
|
||||
AddTile<CosmicAnvil>().
|
||||
SortBeforeFirstRecipesOf(ModContent.ItemType<AuricTeslaBodyArmor>()).
|
||||
SortBeforeFirstRecipesOf(ModContent.ItemType<AuricTeslaHeadMagic>()).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 627 B After Width: | Height: | Size: 627 B |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
@@ -13,7 +13,8 @@ using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Armor.Auric
|
||||
{
|
||||
[AutoloadEquip(EquipType.Head)]
|
||||
public class AuricTeslaPlumedHelm : ModItem, ILocalizedModType
|
||||
[LegacyName("AuricTeslaPlumedHelm")]
|
||||
public class AuricTeslaHeadRogue : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
public override void SetDefaults()
|
||||
|
Before Width: | Height: | Size: 553 B After Width: | Height: | Size: 553 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -12,7 +12,8 @@ using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Armor.Auric
|
||||
{
|
||||
[AutoloadEquip(EquipType.Head)]
|
||||
public class AuricTeslaSpaceHelmet : ModItem, ILocalizedModType
|
||||
[LegacyName("AuricTeslaSpaceHelmet")]
|
||||
public class AuricTeslaHeadSummon : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.PostMoonLord";
|
||||
public override void SetDefaults()
|
||||
@@ -95,7 +96,7 @@ namespace CalamityMod.Items.Armor.Auric
|
||||
AddIngredient<TarragonHeadSummon>().
|
||||
AddIngredient<AuricBar>(12).
|
||||
AddTile<CosmicAnvil>().
|
||||
SortBeforeFirstRecipesOf(ModContent.ItemType<AuricTeslaPlumedHelm>()).
|
||||
SortBeforeFirstRecipesOf(ModContent.ItemType<AuricTeslaHeadRogue>()).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 562 B After Width: | Height: | Size: 562 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,22 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.Vanity
|
||||
{
|
||||
[AutoloadEquip(EquipType.Legs)]
|
||||
public class LucisBoots : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.Vanity";
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
Item.value = Item.buyPrice(gold: 10); // Sold by Steampunker
|
||||
Item.rare = ItemRarityID.Pink;
|
||||
Item.vanity = true;
|
||||
Item.Calamity().donorItem = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 279 B |
|
After Width: | Height: | Size: 3.7 KiB |
@@ -0,0 +1,22 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.Vanity
|
||||
{
|
||||
[AutoloadEquip(EquipType.Head)]
|
||||
public class LucisHairstyle : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.Vanity";
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 28;
|
||||
Item.height = 20;
|
||||
Item.value = Item.buyPrice(gold: 10); // Sold by Steampunker
|
||||
Item.rare = ItemRarityID.Pink;
|
||||
Item.vanity = true;
|
||||
Item.Calamity().donorItem = true; // Donor: xAqult (Sprites made by Gote)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 576 B |
|
After Width: | Height: | Size: 5.0 KiB |
@@ -0,0 +1,22 @@
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Armor.Vanity
|
||||
{
|
||||
[AutoloadEquip(EquipType.Body)]
|
||||
public class LucisMilitaryUniform : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Armor.Vanity";
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 26;
|
||||
Item.height = 20;
|
||||
Item.value = Item.buyPrice(gold: 10); // Sold by Steampunker
|
||||
Item.rare = ItemRarityID.Pink;
|
||||
Item.vanity = true;
|
||||
Item.Calamity().donorItem = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 540 B |
|
After Width: | Height: | Size: 5.7 KiB |
@@ -6,6 +6,7 @@ using CalamityMod.Balancing;
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Accessories.Vanity;
|
||||
using CalamityMod.Items.Armor.Demonshade;
|
||||
using CalamityMod.Items.PermanentBoosters;
|
||||
using CalamityMod.Items.Tools;
|
||||
@@ -289,7 +290,7 @@ namespace CalamityMod.Items
|
||||
#region Rarity Coloration
|
||||
private static void ApplyRarityColor(Item item, TooltipLine nameLine)
|
||||
{
|
||||
if (item.type == ModContent.ItemType<HeartoftheElements>() || item.type == ModContent.ItemType<TheCommunity>() || item.type == ModContent.ItemType<IridescentExcalibur>())
|
||||
if (item.type == ModContent.ItemType<HeartoftheElements>() || item.type == ModContent.ItemType<TheCommunity>())
|
||||
nameLine.OverrideColor = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB);
|
||||
|
||||
// Developer items
|
||||
@@ -1633,6 +1634,128 @@ namespace CalamityMod.Items
|
||||
#region Enchanted Rarity Text Drawing
|
||||
public override bool PreDrawTooltipLine(Item item, DrawableTooltipLine line, ref int yOffset)
|
||||
{
|
||||
if (line.Name == "ItemName" && line.Mod == "Terraria" && item.type == ModContent.ItemType<XyksBlessingBlue>())
|
||||
{
|
||||
Color rarityColor = Color.White;
|
||||
Vector2 basePosition = new Vector2(line.X, line.Y);
|
||||
|
||||
float rate = Main.GlobalTimeWrappedHourly * 6;
|
||||
List<Color> eColors = new List<Color>()
|
||||
{
|
||||
Color.DodgerBlue,
|
||||
Color.Cyan,
|
||||
Color.RoyalBlue
|
||||
};
|
||||
int colorIndex = (int)(rate / 2 % eColors.Count);
|
||||
Color currentColor = eColors[colorIndex];
|
||||
Color nextColor = eColors[(colorIndex + 1) % eColors.Count];
|
||||
Color usedColor = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f);
|
||||
|
||||
Vector2 backScale = line.BaseScale;
|
||||
Color backColor = usedColor;
|
||||
|
||||
Main.spriteBatch.End();
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, null, null, null, null, Main.UIScaleMatrix);
|
||||
|
||||
int draws = 20;
|
||||
for (int i = 0; i < draws; i++)
|
||||
{
|
||||
Vector2 backPosition = basePosition + (MathHelper.TwoPi * i / 20f).ToRotationVector2() * (3.5f);
|
||||
ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, backPosition, backColor, line.Rotation, line.Origin, backScale, line.MaxWidth, line.Spread);
|
||||
}
|
||||
Texture2D texture = ModContent.Request<Texture2D>("CalamityMod/Particles/BloomCircle").Value;
|
||||
Texture2D square = ModContent.Request<Texture2D>("CalamityMod/Particles/BloomRing").Value;
|
||||
|
||||
Vector2 drawPosition = basePosition;
|
||||
Color drawColor = backColor;
|
||||
Vector2 rotationPoint = texture.Size() * 0.5f;
|
||||
int length = line.Text.Length;
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
Main.EntitySpriteDraw(texture, basePosition + Vector2.UnitX * length * 4 + Vector2.UnitY * 23 + Vector2.UnitX * (i % 2 == 0 ? -10 * i : 10 * i), null, drawColor, (MathHelper.PiOver2), rotationPoint, new Vector2(0.3f - 0.02f * i, 1 + 0.35f * i) * 0.3f * Main.rand.NextFloat(0.9f, 1f), SpriteEffects.None);
|
||||
}
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
float sine = (float)Math.Sin(Main.GlobalTimeWrappedHourly * (0 + i * 0.8f) / MathHelper.Pi);
|
||||
float sine2 = (float)Math.Sin(Main.GlobalTimeWrappedHourly * (5) / MathHelper.Pi);
|
||||
float squareSine = (float)Math.Sin(i * 2.5f / MathHelper.Pi);
|
||||
float clockSine = (float)Math.Sin((float)Math.Pow(Utils.GetLerpValue(0, 110, ((int)(Main.GlobalTimeWrappedHourly * (60 + i * 2)) % 120)), 5));
|
||||
Vector2 weirdPos = Vector2.UnitX * 53 * i * (Utils.GetLerpValue(20, 0, i, true)) + Vector2.UnitY * -23 * squareSine * sine2 + new Vector2(5, 10);
|
||||
for (int t = 0; t < 3; t++)
|
||||
Main.EntitySpriteDraw(square, basePosition + weirdPos, null, drawColor * (1 - 0.03f * i), 0, square.Size() * 0.5f, (1.2f - 0.07f * t) * new Vector2(1, 1) * (0.25f * ((float)Math.Pow(Utils.GetLerpValue(11, 0, i, true), 3) + 0.2f)), SpriteEffects.None);
|
||||
for (int t = 0; t < 3; t++)
|
||||
Main.EntitySpriteDraw(texture, basePosition + weirdPos, null, drawColor * (1 - 0.03f * i), 0, texture.Size() * 0.5f, (0.65f - 0.07f * t) * new Vector2(1, 1) * (0.25f * ((float)Math.Pow(Utils.GetLerpValue(11, 0, i, true), 3) + 0.2f)), SpriteEffects.None);
|
||||
}
|
||||
|
||||
Main.spriteBatch.End();
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, null, null, null, null, Main.UIScaleMatrix);
|
||||
|
||||
// Draw the front text as usual.
|
||||
ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, basePosition, rarityColor, line.Rotation, line.Origin, line.BaseScale, line.MaxWidth, line.Spread);
|
||||
|
||||
return false;
|
||||
}
|
||||
if (line.Name == "ItemName" && line.Mod == "Terraria" && item.type == ModContent.ItemType<XyksBlessingOrange>())
|
||||
{
|
||||
Color rarityColor = Color.White;
|
||||
Vector2 basePosition = new Vector2(line.X, line.Y);
|
||||
|
||||
float rate = Main.GlobalTimeWrappedHourly * 6;
|
||||
List<Color> eColors = new List<Color>()
|
||||
{
|
||||
new Color(248, 117, 52),
|
||||
Color.Gold,
|
||||
Color.Orange
|
||||
};
|
||||
int colorIndex = (int)(rate / 2 % eColors.Count);
|
||||
Color currentColor = eColors[colorIndex];
|
||||
Color nextColor = eColors[(colorIndex + 1) % eColors.Count];
|
||||
Color usedColor = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f);
|
||||
|
||||
Vector2 backScale = line.BaseScale;
|
||||
Color backColor = usedColor;
|
||||
|
||||
Main.spriteBatch.End();
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, null, null, null, null, Main.UIScaleMatrix);
|
||||
|
||||
int draws = 20;
|
||||
for (int i = 0; i < draws; i++)
|
||||
{
|
||||
Vector2 backPosition = basePosition + (MathHelper.TwoPi * i / 20f).ToRotationVector2() * (3.5f);
|
||||
ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, backPosition, backColor, line.Rotation, line.Origin, backScale, line.MaxWidth, line.Spread);
|
||||
}
|
||||
Texture2D texture = ModContent.Request<Texture2D>("CalamityMod/Particles/BloomCircle").Value;
|
||||
Texture2D texture2 = ModContent.Request<Texture2D>("CalamityMod/Particles/SquareRotated").Value;
|
||||
Texture2D square = ModContent.Request<Texture2D>("CalamityMod/Particles/GlowSquareParticleThick").Value;
|
||||
|
||||
Vector2 drawPosition = basePosition;
|
||||
Color drawColor = backColor;
|
||||
Vector2 rotationPoint = texture.Size() * 0.5f;
|
||||
int length = line.Text.Length;
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
Main.EntitySpriteDraw(texture, basePosition + Vector2.UnitX * length * 4 + Vector2.UnitY * 23 + Vector2.UnitX * (i % 2 == 0 ? -10 * i : 10 * i), null, drawColor, (MathHelper.PiOver2), rotationPoint, new Vector2(0.3f - 0.02f * i, 1 + 0.35f * i) * 0.3f * Main.rand.NextFloat(0.9f, 1f), SpriteEffects.None);
|
||||
}
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
float sine = (float)Math.Sin(Main.GlobalTimeWrappedHourly * (0 + i * 0.8f) / MathHelper.Pi);
|
||||
float squareSine = (float)Math.Sin(i * 2.5f / MathHelper.Pi);
|
||||
float clockSine = (float)Math.Sin((float)Math.Pow(Utils.GetLerpValue(0, 110, ((int)(Main.GlobalTimeWrappedHourly * (60 + i * 2)) % 120)), 5));
|
||||
Vector2 weirdPos = Vector2.UnitX * 53 * i * (Utils.GetLerpValue(20, 0, i, true)) + Vector2.UnitY * 23 * squareSine + Vector2.UnitY * 5.5f * sine + new Vector2(5, 10);
|
||||
for (int t = 0; t < 3; t++)
|
||||
Main.EntitySpriteDraw(square, basePosition + weirdPos, null, drawColor * (1 - 0.03f * i), clockSine * MathHelper.PiOver2 + MathHelper.PiOver4, square.Size() * 0.5f, (1 - 0.07f * t) * new Vector2(1, 1) * (0.25f * ((float)Math.Pow(Utils.GetLerpValue(11, 0, i, true), 3) + 0.2f)), SpriteEffects.None);
|
||||
for (int t = 0; t < 3; t++)
|
||||
Main.EntitySpriteDraw(texture2, basePosition + weirdPos, null, drawColor * (1 - 0.03f * i), clockSine * MathHelper.PiOver2, texture2.Size() * 0.5f, (0.6f - 0.07f * t) * new Vector2(1, 1) * (0.25f * ((float)Math.Pow(Utils.GetLerpValue(11, 0, i, true), 3) + 0.2f)), SpriteEffects.None);
|
||||
}
|
||||
|
||||
Main.spriteBatch.End();
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, null, null, null, null, Main.UIScaleMatrix);
|
||||
|
||||
// Draw the front text as usual.
|
||||
ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, basePosition, rarityColor, line.Rotation, line.Origin, line.BaseScale, line.MaxWidth, line.Spread);
|
||||
|
||||
return false;
|
||||
}
|
||||
// Special enchantment line color.
|
||||
if (line.Name == "ItemName" && line.Mod == "Terraria" && item.IsEnchanted())
|
||||
{
|
||||
@@ -1659,6 +1782,64 @@ namespace CalamityMod.Items
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (line.Name == "ItemName" && line.Mod == "Terraria" && item.type == ModContent.ItemType<Orderbringer>())
|
||||
{
|
||||
Color rarityColor = Color.White;
|
||||
Vector2 basePosition = new Vector2(line.X, line.Y);
|
||||
|
||||
float rate = Main.GlobalTimeWrappedHourly * 29;
|
||||
List<Color> eColors = new List<Color>()
|
||||
{
|
||||
Color.PaleVioletRed,
|
||||
Color.Coral,
|
||||
Color.Khaki,
|
||||
Color.PaleGreen,
|
||||
Color.Turquoise,
|
||||
Color.Violet
|
||||
};
|
||||
|
||||
int colorIndex = (int)(rate / 2 % eColors.Count);
|
||||
Color currentColor = eColors[colorIndex];
|
||||
Color nextColor = eColors[(colorIndex + 1) % eColors.Count];
|
||||
Color usedColor = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f);
|
||||
|
||||
|
||||
float sine = (float)Math.Sin(Main.GlobalTimeWrappedHourly * 3 / MathHelper.Pi);
|
||||
sine = (float)Math.Pow(MathHelper.Lerp(sine, 0, 0.35f), 5);
|
||||
Vector2 backScale = line.BaseScale;
|
||||
Color backColor = usedColor;
|
||||
Vector2 shake = Main.rand.NextVector2Circular(15, 15) * sine;
|
||||
|
||||
Main.spriteBatch.End();
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, null, null, null, null, Main.UIScaleMatrix);
|
||||
|
||||
int draws = 20;
|
||||
for (int i = 0; i < draws; i++)
|
||||
{
|
||||
shake = Main.rand.NextVector2Circular(15, 15) * sine;
|
||||
Vector2 backPosition = basePosition + (MathHelper.TwoPi * i / 20f).ToRotationVector2() * (5 + 0.5f * sine);
|
||||
ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, shake * 4 + backPosition, backColor, line.Rotation, line.Origin, backScale, line.MaxWidth, line.Spread);
|
||||
}
|
||||
Texture2D texture = ModContent.Request<Texture2D>("CalamityMod/Particles/BloomCircle").Value;
|
||||
|
||||
Vector2 drawPosition = basePosition;
|
||||
Color drawColor = backColor;
|
||||
Vector2 rotationPoint = texture.Size() * 0.5f;
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
int length = line.Text.Length;
|
||||
Main.EntitySpriteDraw(texture, basePosition + Vector2.UnitX * length * 4 + Vector2.UnitY * 10 + Vector2.UnitX * (i % 2 == 0 ? -7 * i : 7 * i), null, drawColor, (MathHelper.PiOver2), rotationPoint, new Vector2(1 - 0.05f * i * (1 + 0.2f * -sine), 1 + 0.75f * i * (1 + 0.2f * sine) * 1f) * 0.3f * Main.rand.NextFloat(0.9f, 1f), SpriteEffects.None);
|
||||
}
|
||||
|
||||
Main.spriteBatch.End();
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, null, null, null, null, Main.UIScaleMatrix);
|
||||
|
||||
// Draw the front text as usual.
|
||||
ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, shake + basePosition, rarityColor, line.Rotation, line.Origin, line.BaseScale, line.MaxWidth, line.Spread);
|
||||
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -333,106 +333,99 @@ namespace CalamityMod.Items
|
||||
|
||||
#region CATEGORY 3: Tool Balancing
|
||||
{ ItemID.AcornAxe, Do(AxePower(100)) }, // Axe of Regrowth
|
||||
{ ItemID.AdamantiteChainsaw, Do(TrueMeleeNoSpeed, AxePower(90), UseTimeExact(4), TileBoostExact(+0), DamageExact(75)) },
|
||||
{ ItemID.AdamantiteDrill, Do(TrueMeleeNoSpeed, PickPower(180), UseTimeExact(4), TileBoostExact(+1), DamageExact(32)) },
|
||||
{ ItemID.AdamantitePickaxe, Do(PickPower(180), UseTimeExact(8), TileBoostExact(+1)) },
|
||||
{ ItemID.AdamantiteChainsaw, Do(TrueMeleeNoSpeed, AxePower(90), TileBoostExact(+0), DamageExact(75)) },
|
||||
{ ItemID.AdamantiteDrill, Do(TrueMeleeNoSpeed, TileBoostExact(+1), DamageExact(32)) },
|
||||
{ ItemID.AdamantitePickaxe, Do(TileBoostExact(+1)) },
|
||||
{ ItemID.AdamantiteWaraxe, Do(AxePower(160), UseTimeExact(10), TileBoostExact(+1)) },
|
||||
{ ItemID.BloodLustCluster, Do(AxePower(100), UseTimeExact(13), TileBoostExact(+0)) },
|
||||
{ ItemID.BonePickaxe, Do(PickPower(55), UseTimeExact(6)) },
|
||||
{ ItemID.BorealWoodHammer, Do(HammerPower(25), UseTimeExact(11), TileBoostExact(+0)) },
|
||||
{ ItemID.ButchersChainsaw, Do(TrueMeleeNoSpeed, AxePower(150), UseTimeExact(3), TileBoostExact(+0)) },
|
||||
{ ItemID.BloodLustCluster, Do(AxePower(100), UseTimeExact(13)) },
|
||||
{ ItemID.BonePickaxe, Do(UseTimeExact(6)) },
|
||||
{ ItemID.BorealWoodHammer, Do(HammerPower(25), UseTimeExact(11)) },
|
||||
{ ItemID.ButchersChainsaw, Do(TrueMeleeNoSpeed, UseTimeExact(3), TileBoostExact(+0)) },
|
||||
{ ItemID.CactusPickaxe, Do(PickPower(34), UseTimeExact(9)) },
|
||||
{ ItemID.CnadyCanePickaxe, Do(PickPower(55), UseTimeExact(9), TileBoostExact(+1)) }, // Candy Cane Pickaxe
|
||||
{ ItemID.ChlorophyteChainsaw, Do(TrueMeleeNoSpeed, AxePower(120), UseTimeExact(3), TileBoostExact(+0), DamageExact(112)) },
|
||||
{ ItemID.ChlorophyteDrill, Do(TrueMeleeNoSpeed, PickPower(200), UseTimeExact(4), TileBoostExact(+2), DamageExact(43)) },
|
||||
{ ItemID.ChlorophyteGreataxe, Do(AxePower(165), UseTimeExact(7), TileBoostExact(+2)) },
|
||||
{ ItemID.ChlorophyteJackhammer, Do(TrueMeleeNoSpeed, HammerPower(90), UseTimeExact(5), TileBoostExact(+0)) },
|
||||
{ ItemID.ChlorophytePickaxe, Do(PickPower(200), UseTimeExact(7), TileBoostExact(+2)) },
|
||||
{ ItemID.ChlorophyteWarhammer, Do(HammerPower(90), UseTimeExact(8), TileBoostExact(+2)) },
|
||||
{ ItemID.CobaltChainsaw, Do(TrueMeleeNoSpeed, AxePower(70), UseTimeExact(4), TileBoostExact(-1), DamageExact(51)) },
|
||||
{ ItemID.CnadyCanePickaxe, Do(UseTimeExact(9), TileBoostExact(+1)) }, // Candy Cane Pickaxe
|
||||
{ ItemID.ChlorophyteChainsaw, Do(TrueMeleeNoSpeed, AxePower(120), UseTimeExact(3), DamageExact(112)) },
|
||||
{ ItemID.ChlorophyteDrill, Do(TrueMeleeNoSpeed, TileBoostExact(+2), DamageExact(43)) },
|
||||
{ ItemID.ChlorophyteGreataxe, Do(AxePower(165), TileBoostExact(+2)) },
|
||||
{ ItemID.ChlorophyteJackhammer, Do(TrueMeleeNoSpeed, UseTimeExact(5)) },
|
||||
{ ItemID.ChlorophytePickaxe, Do(TileBoostExact(+2)) },
|
||||
{ ItemID.ChlorophyteWarhammer, Do(UseTimeExact(8), TileBoostExact(+2)) },
|
||||
{ ItemID.CobaltChainsaw, Do(TrueMeleeNoSpeed, UseTimeExact(4), DamageExact(51)) },
|
||||
{ ItemID.CobaltDrill, Do(TrueMeleeNoSpeed, PickPower(130), UseTimeExact(5), DamageExact(21)) },
|
||||
{ ItemID.CobaltPickaxe, Do(PickPower(130), UseTimeExact(9)) },
|
||||
{ ItemID.CobaltWaraxe, Do(AxePower(125), UseTimeExact(12), TileBoostExact(+0)) },
|
||||
{ ItemID.CobaltWaraxe, Do(AxePower(125), UseTimeExact(12)) },
|
||||
{ ItemID.CopperAxe, Do(AxePower(50), UseTimeExact(16), TileBoostExact(+0)) },
|
||||
{ ItemID.CopperHammer, Do(HammerPower(35), UseTimeExact(12), TileBoostExact(+0)) },
|
||||
{ ItemID.CopperPickaxe, Do(PickPower(35), UseTimeExact(10), TileBoostExact(+0)) },
|
||||
{ ItemID.DeathbringerPickaxe, Do(PickPower(70), UseTimeExact(10)) },
|
||||
{ ItemID.Drax, Do(TrueMeleeNoSpeed, PickPower(200), AxePower(110), UseTimeExact(4), TileBoostExact(+1), DamageExact(80)) },
|
||||
{ ItemID.EbonwoodHammer, Do(HammerPower(25), UseTimeExact(9), TileBoostExact(+0)) },
|
||||
{ ItemID.FleshGrinder, Do(HammerPower(70), UseTimeExact(13), TileBoostExact(+0)) },
|
||||
{ ItemID.GoldAxe, Do(AxePower(80), UseTimeExact(14), TileBoostExact(+0)) },
|
||||
{ ItemID.GoldHammer, Do(HammerPower(60), UseTimeExact(9), TileBoostExact(+0)) },
|
||||
{ ItemID.GoldPickaxe, Do(PickPower(55), UseTimeExact(9)) },
|
||||
{ ItemID.Hammush, Do(HammerPower(85), UseTimeExact(10), TileBoostExact(+1)) },
|
||||
{ ItemID.IronAxe, Do(AxePower(60), UseTimeExact(15), TileBoostExact(+0)) },
|
||||
{ ItemID.IronHammer, Do(HammerPower(45), UseTimeExact(11), TileBoostExact(+0)) },
|
||||
{ ItemID.IronPickaxe, Do(PickPower(40), UseTimeExact(8)) },
|
||||
{ ItemID.CopperHammer, Do(UseTimeExact(12), TileBoostExact(+0)) },
|
||||
{ ItemID.CopperPickaxe, Do(UseTimeExact(10), TileBoostExact(+0)) },
|
||||
{ ItemID.DeathbringerPickaxe, Do(UseTimeExact(10)) },
|
||||
{ ItemID.Drax, Do(TrueMeleeNoSpeed, TileBoostExact(+1), DamageExact(80)) },
|
||||
{ ItemID.EbonwoodHammer, Do(HammerPower(25), UseTimeExact(9)) },
|
||||
{ ItemID.FleshGrinder, Do(HammerPower(70), UseTimeExact(13)) },
|
||||
{ ItemID.GoldAxe, Do(AxePower(80), UseTimeExact(14)) },
|
||||
{ ItemID.GoldHammer, Do(HammerPower(60), UseTimeExact(9)) },
|
||||
{ ItemID.GoldPickaxe, Do(UseTimeExact(9)) },
|
||||
{ ItemID.Hammush, Do(UseTimeExact(10), TileBoostExact(+1)) },
|
||||
{ ItemID.IronAxe, Do(AxePower(60), UseTimeExact(15)) },
|
||||
{ ItemID.IronHammer, Do(HammerPower(45), UseTimeExact(11)) },
|
||||
{ ItemID.IronPickaxe, Do(UseTimeExact(8)) },
|
||||
{ ItemID.LaserDrill, Do(PickPower(220), AxePower(120), UseTimeExact(4), DamageExact(54)) },
|
||||
{ ItemID.LeadAxe, Do(AxePower(60), UseTimeExact(15), TileBoostExact(+0)) },
|
||||
{ ItemID.LeadHammer, Do(HammerPower(45), UseTimeExact(11), TileBoostExact(+0)) },
|
||||
{ ItemID.LeadAxe, Do(AxePower(60), UseTimeExact(15)) },
|
||||
{ ItemID.LeadHammer, Do(HammerPower(45), UseTimeExact(11)) },
|
||||
{ ItemID.LeadPickaxe, Do(PickPower(40), UseTimeExact(8)) },
|
||||
{ ItemID.LucyTheAxe, Do(AxePower(150), UseExact(13), TileBoostExact(+1)) },
|
||||
{ ItemID.LunarHamaxeNebula, Do(HammerPower(100), AxePower(175), UseTimeExact(5), TileBoostExact(+4)) },
|
||||
{ ItemID.LunarHamaxeSolar, Do(HammerPower(100), AxePower(175), UseTimeExact(5), TileBoostExact(+4)) },
|
||||
{ ItemID.LunarHamaxeStardust, Do(HammerPower(100), AxePower(175), UseTimeExact(5), TileBoostExact(+4)) },
|
||||
{ ItemID.LunarHamaxeVortex, Do(HammerPower(100), AxePower(175), UseTimeExact(5), TileBoostExact(+4)) },
|
||||
{ ItemID.MeteorHamaxe, Do(HammerPower(70), AxePower(100), UseTimeExact(16), TileBoostExact(+0)) },
|
||||
{ ItemID.MoltenHamaxe, Do(HammerPower(75), AxePower(125), UseTimeExact(14), TileBoostExact(+0)) },
|
||||
{ ItemID.MoltenPickaxe, Do(PickPower(100), UseTimeExact(10)) },
|
||||
{ ItemID.MythrilChainsaw, Do(TrueMeleeNoSpeed, AxePower(80), UseTimeExact(4), TileBoostExact(-1), DamageExact(63)) },
|
||||
{ ItemID.LucyTheAxe, Do(UseExact(13), TileBoostExact(+1)) },
|
||||
{ ItemID.LunarHamaxeNebula, Do(AxePower(175), UseTimeExact(5)) },
|
||||
{ ItemID.LunarHamaxeSolar, Do(AxePower(175), UseTimeExact(5)) },
|
||||
{ ItemID.LunarHamaxeStardust, Do(AxePower(175), UseTimeExact(5)) },
|
||||
{ ItemID.LunarHamaxeVortex, Do(AxePower(175), UseTimeExact(5)) },
|
||||
{ ItemID.MeteorHamaxe, Do(HammerPower(70)) },
|
||||
{ ItemID.MoltenHamaxe, Do(HammerPower(75), AxePower(125)) },
|
||||
{ ItemID.MoltenPickaxe, Do(UseTimeExact(10)) },
|
||||
{ ItemID.MythrilChainsaw, Do(TrueMeleeNoSpeed, AxePower(80), UseTimeExact(4), DamageExact(63)) },
|
||||
{ ItemID.MythrilDrill, Do(TrueMeleeNoSpeed, PickPower(160), UseTimeExact(4), DamageExact(26)) },
|
||||
{ ItemID.MythrilPickaxe, Do(PickPower(160), UseTimeExact(8)) },
|
||||
{ ItemID.MythrilWaraxe, Do(AxePower(140), UseTimeExact(11), TileBoostExact(+0)) },
|
||||
{ ItemID.NebulaDrill, Do(TrueMeleeNoSpeed, PickPower(225), UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) },
|
||||
{ ItemID.NebulaPickaxe, Do(PickPower(225), UseTimeExact(6), TileBoostExact(+4)) },
|
||||
{ ItemID.MythrilWaraxe, Do(AxePower(140), UseTimeExact(11)) },
|
||||
{ ItemID.NebulaDrill, Do(TrueMeleeNoSpeed, UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) },
|
||||
{ ItemID.NightmarePickaxe, Do(PickPower(66), UseTimeExact(9)) },
|
||||
{ ItemID.OrichalcumChainsaw, Do(TrueMeleeNoSpeed, AxePower(80), UseTimeExact(4), TileBoostExact(-1), DamageExact(63)) },
|
||||
{ ItemID.OrichalcumChainsaw, Do(TrueMeleeNoSpeed, AxePower(80), UseTimeExact(4), DamageExact(63)) },
|
||||
{ ItemID.OrichalcumDrill, Do(TrueMeleeNoSpeed, PickPower(160), UseTimeExact(4), DamageExact(26)) },
|
||||
{ ItemID.OrichalcumPickaxe, Do(PickPower(160), UseTimeExact(8)) },
|
||||
{ ItemID.OrichalcumWaraxe, Do(AxePower(140), UseTimeExact(11), TileBoostExact(+0)) },
|
||||
{ ItemID.PalladiumChainsaw, Do(TrueMeleeNoSpeed, AxePower(70), UseTimeExact(4), TileBoostExact(-1), DamageExact(51)) },
|
||||
{ ItemID.PalladiumDrill, Do(TrueMeleeNoSpeed, PickPower(130), UseTimeExact(5), DamageExact(21)) },
|
||||
{ ItemID.PalladiumPickaxe, Do(PickPower(130), UseTimeExact(9)) },
|
||||
{ ItemID.PalladiumWaraxe, Do(AxePower(125), UseTimeExact(12), TileBoostExact(+0)) },
|
||||
{ ItemID.PalmWoodHammer, Do(HammerPower(25), UseTimeExact(11), TileBoostExact(+0)) },
|
||||
{ ItemID.PearlwoodHammer, Do(HammerPower(25), UseTimeExact(4), UseAnimationExact(20), DamageExact(36), TileBoostExact(+0)) },
|
||||
{ ItemID.PickaxeAxe, Do(PickPower(200), AxePower(110), UseTimeExact(7), TileBoostExact(+1)) },
|
||||
{ ItemID.Picksaw, Do(PickPower(210), AxePower(125), UseTimeExact(6), TileBoostExact(+1)) },
|
||||
{ ItemID.PlatinumAxe, Do(AxePower(80), UseTimeExact(14), TileBoostExact(+0)) },
|
||||
{ ItemID.PlatinumHammer, Do(HammerPower(60), UseTimeExact(9), TileBoostExact(+0)) },
|
||||
{ ItemID.OrichalcumWaraxe, Do(AxePower(140), UseTimeExact(11)) },
|
||||
{ ItemID.PalladiumChainsaw, Do(TrueMeleeNoSpeed, AxePower(70), UseTimeExact(4), DamageExact(51)) },
|
||||
{ ItemID.PalladiumDrill, Do(TrueMeleeNoSpeed, UseTimeExact(5), DamageExact(21)) },
|
||||
{ ItemID.PalladiumPickaxe, Do(UseTimeExact(9)) },
|
||||
{ ItemID.PalladiumWaraxe, Do(AxePower(125)) },
|
||||
{ ItemID.PalmWoodHammer, Do(HammerPower(25), UseTimeExact(11)) },
|
||||
{ ItemID.PearlwoodHammer, Do(HammerPower(25), UseTimeExact(4), UseAnimationExact(20), DamageExact(36)) },
|
||||
{ ItemID.PickaxeAxe, Do(TileBoostExact(+1)) },
|
||||
{ ItemID.PlatinumAxe, Do(AxePower(80), UseTimeExact(14)) },
|
||||
{ ItemID.PlatinumHammer, Do(HammerPower(60), UseTimeExact(9)) },
|
||||
{ ItemID.PlatinumPickaxe, Do(PickPower(55), UseTimeExact(9)) },
|
||||
{ ItemID.Pwnhammer, Do(HammerPower(80), UseTimeExact(11), TileBoostExact(+1)) },
|
||||
{ ItemID.Pwnhammer, Do(UseTimeExact(11), TileBoostExact(+1)) },
|
||||
{ ItemID.ReaverShark, Do(PickPower(65), UseTimeExact(16)) },
|
||||
{ ItemID.RichMahoganyHammer, Do(HammerPower(25), UseTimeExact(10), TileBoostExact(+0)) },
|
||||
{ ItemID.Rockfish, Do(HammerPower(50), UseTimeExact(10), TileBoostExact(+0)) },
|
||||
{ ItemID.SawtoothShark, Do(TrueMeleeNoSpeed, AxePower(45), UseTimeExact(4), TileBoostExact(-1)) },
|
||||
{ ItemID.ShadewoodHammer, Do(HammerPower(25), UseTimeExact(9), TileBoostExact(+0)) },
|
||||
{ ItemID.ShroomiteDiggingClaw, Do(PickPower(200), AxePower(125), UseTimeExact(4), TileBoostExact(-1)) },
|
||||
{ ItemID.SilverAxe, Do(AxePower(70), UseTimeExact(14), TileBoostExact(+0)) },
|
||||
{ ItemID.SilverHammer, Do(HammerPower(55), UseTimeExact(10), TileBoostExact(+0)) },
|
||||
{ ItemID.SilverPickaxe, Do(PickPower(50), UseTimeExact(11)) },
|
||||
{ ItemID.SolarFlareDrill, Do(TrueMeleeNoSpeed, PickPower(225), UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) },
|
||||
{ ItemID.SolarFlarePickaxe, Do(PickPower(225), UseTimeExact(6), TileBoostExact(+4)) },
|
||||
{ ItemID.SpectreHamaxe, Do(HammerPower(90), AxePower(170), TileBoostExact(+4)) },
|
||||
{ ItemID.SpectrePickaxe, Do(PickPower(200), TileBoostExact(+4)) },
|
||||
{ ItemID.StardustDrill, Do(TrueMeleeNoSpeed, PickPower(225), UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) },
|
||||
{ ItemID.StardustPickaxe, Do(PickPower(225), UseTimeExact(6), TileBoostExact(+4)) },
|
||||
{ ItemID.TheAxe, Do(HammerPower(100), AxePower(175), UseTimeExact(7), TileBoostExact(+1)) },
|
||||
{ ItemID.TheBreaker, Do(HammerPower(70), UseTimeExact(13), TileBoostExact(+0)) },
|
||||
{ ItemID.TinAxe, Do(AxePower(50), UseTimeExact(16), TileBoostExact(+0)) },
|
||||
{ ItemID.TinHammer, Do(HammerPower(35), UseTimeExact(12), TileBoostExact(+0)) },
|
||||
{ ItemID.TinPickaxe, Do(PickPower(35), UseTimeExact(10), TileBoostExact(+0)) },
|
||||
{ ItemID.TitaniumChainsaw, Do(TrueMeleeNoSpeed, AxePower(90), UseTimeExact(4), TileBoostExact(+0), DamageExact(75)) },
|
||||
{ ItemID.TitaniumDrill, Do(TrueMeleeNoSpeed, PickPower(180), UseTimeExact(4), TileBoostExact(+1), DamageExact(32)) },
|
||||
{ ItemID.RichMahoganyHammer, Do(HammerPower(25), UseTimeExact(10)) },
|
||||
{ ItemID.Rockfish, Do(HammerPower(50), UseTimeExact(10)) },
|
||||
{ ItemID.SawtoothShark, Do(TrueMeleeNoSpeed, AxePower(45)) },
|
||||
{ ItemID.ShadewoodHammer, Do(HammerPower(25), UseTimeExact(9)) },
|
||||
{ ItemID.SilverAxe, Do(AxePower(70), UseTimeExact(14)) },
|
||||
{ ItemID.SilverHammer, Do(HammerPower(55), UseTimeExact(10)) },
|
||||
{ ItemID.SilverPickaxe, Do(PickPower(50)) },
|
||||
{ ItemID.SolarFlareDrill, Do(TrueMeleeNoSpeed, UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) },
|
||||
{ ItemID.SpectreHamaxe, Do(AxePower(170), TileBoostExact(+4)) },
|
||||
{ ItemID.SpectrePickaxe, Do(TileBoostExact(+4)) },
|
||||
{ ItemID.StardustDrill, Do(TrueMeleeNoSpeed, UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) },
|
||||
{ ItemID.TheBreaker, Do(HammerPower(70), UseTimeExact(13)) },
|
||||
{ ItemID.TinAxe, Do(AxePower(50), UseTimeExact(16)) },
|
||||
{ ItemID.TinHammer, Do(HammerPower(35), UseTimeExact(12)) },
|
||||
{ ItemID.TinPickaxe, Do(UseTimeExact(10)) },
|
||||
{ ItemID.TitaniumChainsaw, Do(TrueMeleeNoSpeed, AxePower(90), TileBoostExact(+0), DamageExact(75)) },
|
||||
{ ItemID.TitaniumDrill, Do(TrueMeleeNoSpeed, PickPower(180), TileBoostExact(+1), DamageExact(32)) },
|
||||
{ ItemID.TitaniumPickaxe, Do(PickPower(180), UseTimeExact(8), TileBoostExact(+1)) },
|
||||
{ ItemID.TitaniumWaraxe, Do(AxePower(160), UseTimeExact(10), TileBoostExact(+1)) },
|
||||
{ ItemID.TungstenAxe, Do(AxePower(70), UseTimeExact(14), TileBoostExact(+0)) },
|
||||
{ ItemID.TungstenHammer, Do(HammerPower(55), UseTimeExact(10), TileBoostExact(+0)) },
|
||||
{ ItemID.TungstenPickaxe, Do(PickPower(50), UseTimeExact(11)) },
|
||||
{ ItemID.VortexDrill, Do(TrueMeleeNoSpeed, PickPower(225), UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) },
|
||||
{ ItemID.VortexPickaxe, Do(PickPower(225), UseTimeExact(6), TileBoostExact(+4)) },
|
||||
{ ItemID.WarAxeoftheNight, Do(AxePower(100), UseTimeExact(13), TileBoostExact(+0)) },
|
||||
{ ItemID.WoodenHammer, Do(HammerPower(25), UseTimeExact(11), TileBoostExact(+0)) },
|
||||
{ ItemID.TungstenAxe, Do(AxePower(70), UseTimeExact(14)) },
|
||||
{ ItemID.TungstenHammer, Do(HammerPower(55), UseTimeExact(10)) },
|
||||
{ ItemID.TungstenPickaxe, Do(UseTimeExact(11)) },
|
||||
{ ItemID.VortexDrill, Do(TrueMeleeNoSpeed, UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) },
|
||||
{ ItemID.WarAxeoftheNight, Do(AxePower(100), UseTimeExact(13)) },
|
||||
{ ItemID.WoodenHammer, Do(UseTimeExact(11), TileBoostExact(+0)) },
|
||||
#endregion
|
||||
|
||||
#region CATEGORY 4: True Melee support
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.PermanentBoosters;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items
|
||||
{
|
||||
public class DisgustingMeat : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Misc";
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToFood(32, 30, 0, 0);
|
||||
Item.value = 0;
|
||||
Item.UseSound = SoundID.NPCDeath13;
|
||||
Item.maxStack = 1;
|
||||
Item.consumable = false;
|
||||
}
|
||||
|
||||
public override bool AltFunctionUse(Player player) => true;
|
||||
public override bool? UseItem(Player player)
|
||||
{
|
||||
if (player.ItemTimeIsZero)
|
||||
{
|
||||
var calPlayer = player.Calamity();
|
||||
if (player.altFunctionUse == 2)
|
||||
{
|
||||
TryDropBoosterItem(player, ref calPlayer.rageBoostOne, ModContent.ItemType<MushroomPlasmaRoot>());
|
||||
TryDropBoosterItem(player, ref calPlayer.rageBoostTwo, ModContent.ItemType<InfernalBlood>());
|
||||
TryDropBoosterItem(player, ref calPlayer.rageBoostThree, ModContent.ItemType<RedLightningContainer>());
|
||||
TryDropBoosterItem(player, ref calPlayer.adrenalineBoostOne, ModContent.ItemType<ElectrolyteGelPack>());
|
||||
TryDropBoosterItem(player, ref calPlayer.adrenalineBoostTwo, ModContent.ItemType<StarlightFuelCell>());
|
||||
TryDropBoosterItem(player, ref calPlayer.adrenalineBoostThree, ModContent.ItemType<Ectoheart>());
|
||||
TryDropBoosterItem(player, ref calPlayer.nimbleBounderBoost, ModContent.ItemType<NimbleBounder>());
|
||||
}
|
||||
else
|
||||
{
|
||||
if (calPlayer.sTangerine || calPlayer.mFruit || calPlayer.tCloudberry || calPlayer.sStrawberry)
|
||||
{
|
||||
TryDropBoosterItem(player, ref calPlayer.sTangerine, ModContent.ItemType<SanguineTangerine>());
|
||||
TryDropBoosterItem(player, ref calPlayer.mFruit, ModContent.ItemType<MiracleFruit>());
|
||||
TryDropBoosterItem(player, ref calPlayer.tCloudberry, ModContent.ItemType<TaintedCloudberry>());
|
||||
TryDropBoosterItem(player, ref calPlayer.sStrawberry, ModContent.ItemType<SacredStrawberry>());
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < player.ConsumedLifeFruit; i++)
|
||||
{
|
||||
int drop = Item.NewItem(player.GetSource_DropAsItem(), player.Hitbox, ItemID.LifeFruit);
|
||||
Main.item[drop].noGrabDelay = 100;
|
||||
}
|
||||
player.ConsumedLifeFruit = 0;
|
||||
for (int j = 0; j < player.ConsumedLifeCrystals; j++)
|
||||
{
|
||||
int drop = Item.NewItem(player.GetSource_DropAsItem(), player.Hitbox, ItemID.LifeCrystal);
|
||||
Main.item[drop].noGrabDelay = 100;
|
||||
}
|
||||
player.ConsumedLifeCrystals = 0;
|
||||
}
|
||||
|
||||
if (calPlayer.cShard || calPlayer.eCore || calPlayer.pHeart)
|
||||
{
|
||||
TryDropBoosterItem(player, ref calPlayer.cShard, ModContent.ItemType<CometShard>());
|
||||
TryDropBoosterItem(player, ref calPlayer.eCore, ModContent.ItemType<EtherealCore>());
|
||||
TryDropBoosterItem(player, ref calPlayer.pHeart, ModContent.ItemType<PhantomHeart>());
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int k = 0; k < player.ConsumedManaCrystals; k++)
|
||||
{
|
||||
int drop = Item.NewItem(player.GetSource_DropAsItem(), player.Hitbox, ItemID.ManaCrystal);
|
||||
Main.item[drop].noGrabDelay = 100;
|
||||
}
|
||||
player.ConsumedManaCrystals = 0;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private static void TryDropBoosterItem(Player player, ref bool condition, int itemType)
|
||||
{
|
||||
if (condition)
|
||||
{
|
||||
condition = false;
|
||||
int drop = Item.NewItem(player.GetSource_DropAsItem(), player.Hitbox, itemType);
|
||||
Main.item[drop].noGrabDelay = 100;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 3.1 KiB |
@@ -64,7 +64,7 @@ namespace CalamityMod.Items.DraedonMisc
|
||||
rangedDisplay.OverrideColor = new Color(236, 255, 31);
|
||||
list.Insert(insertIndex + 2, rangedDisplay);
|
||||
|
||||
int mageItem = ModContent.ItemType<GatlingLaser>();
|
||||
int mageItem = ModContent.ItemType<CountermeasureMitt>();
|
||||
TooltipLine mageDisplay = new TooltipLine(this.Mod, "CalamityMod:MageDisplay", $"[i:{mageItem}] {CalamityUtils.GetItemName(mageItem)}");
|
||||
mageDisplay.OverrideColor = new Color(255, 64, 31);
|
||||
list.Insert(insertIndex + 3, mageDisplay);
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace CalamityMod.Items.DraedonMisc
|
||||
rangedDisplay.OverrideColor = new Color(149, 243, 43);
|
||||
list.Insert(insertIndex + 2, rangedDisplay);
|
||||
|
||||
int mageItem = ModContent.ItemType<GaussPistol>();
|
||||
int mageItem = ModContent.ItemType<Vulcan>();
|
||||
TooltipLine mageDisplay = new TooltipLine(this.Mod, "CalamityMod:MageDisplay", $"[i:{mageItem}] {CalamityUtils.GetItemName(mageItem)}");
|
||||
mageDisplay.OverrideColor = new Color(236, 255, 31);
|
||||
list.Insert(insertIndex + 3, mageDisplay);
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace CalamityMod.Items.Materials
|
||||
return true;
|
||||
else
|
||||
{
|
||||
spriteBatch.Draw(altTexture.Value, position, null, drawColor, 0, origin, altTexture.Size() / 2, SpriteEffects.None, 0);
|
||||
spriteBatch.Draw(altTexture.Value, position, null, drawColor, 0, altTexture.Size() / 2, scale, SpriteEffects.None, 0);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,6 +91,7 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings
|
||||
"Spider Prov",
|
||||
"StipulateVenus",
|
||||
"Tobias",
|
||||
"Tomat",
|
||||
"Triangle",
|
||||
"TYESKI (Universe)",
|
||||
"Uncle Danny",
|
||||
@@ -189,7 +190,6 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings
|
||||
"ThousandFields",
|
||||
"TikiWiki",
|
||||
"Tinymanx",
|
||||
"Tomat",
|
||||
"Trivaxy",
|
||||
"Uberransy",
|
||||
"Vaikyia",
|
||||
|
||||
@@ -34,12 +34,12 @@ namespace CalamityMod.Items.SummonItems
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
return player.ZoneJungle && !NPC.AnyNPCs(ModContent.NPCType<Bumblefuck>()) && !BossRushEvent.BossRushActive;
|
||||
return player.ZoneJungle && !NPC.AnyNPCs(ModContent.NPCType<Dragonfolly>()) && !BossRushEvent.BossRushActive;
|
||||
}
|
||||
|
||||
public override bool? UseItem(Player player)
|
||||
{
|
||||
CalamityUtils.SpawnBossUsingItem<Bumblefuck>(player, SoundID.Roar);
|
||||
CalamityUtils.SpawnBossUsingItem<Dragonfolly>(player, SoundID.Roar);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace CalamityMod.Items.TreasureBags
|
||||
public override void ModifyItemLoot(ItemLoot itemLoot)
|
||||
{
|
||||
// Money
|
||||
itemLoot.Add(ItemDropRule.CoinsBasedOnNPCValue(ModContent.NPCType<Bumblefuck>()));
|
||||
itemLoot.Add(ItemDropRule.CoinsBasedOnNPCValue(ModContent.NPCType<Dragonfolly>()));
|
||||
|
||||
// Materials
|
||||
itemLoot.Add(ModContent.ItemType<EffulgentFeather>(), 1, 30, 35);
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
{
|
||||
[LegacyName("GatlingLaser")]
|
||||
public class CountermeasureMitt : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.DraedonsArsenal";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
CalamityGlobalItem modItem = Item.Calamity();
|
||||
|
||||
Item.width = 54;
|
||||
Item.height = 56;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.mana = 3;
|
||||
Item.damage = 45;
|
||||
Item.knockBack = 4f;
|
||||
Item.useAnimation = Item.useTime = 11;
|
||||
Item.autoReuse = true;
|
||||
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.channel = true;
|
||||
Item.noUseGraphic = true;
|
||||
|
||||
Item.value = CalamityGlobalItem.RarityYellowBuyPrice;
|
||||
Item.rare = ItemRarityID.Yellow;
|
||||
|
||||
Item.shoot = ModContent.ProjectileType<CountermeasureMittHoldout>();
|
||||
Item.shootSpeed = 24f;
|
||||
}
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 3);
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
|
||||
public override bool AltFunctionUse(Player player) => true;
|
||||
public override void HoldItem(Player player)
|
||||
{
|
||||
if (Main.myPlayer == player.whoAmI)
|
||||
player.Calamity().rightClickListener = true;
|
||||
player.Calamity().mouseWorldListener = true;
|
||||
}
|
||||
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/DraedonsArsenal/CountermeasureMittGlow").Value);
|
||||
}
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
float gunType = 0;
|
||||
if (player.Calamity().mouseRight && player.whoAmI == Main.myPlayer && !Main.mapFullscreen && !Main.blockMouse && player.Calamity().arsenalCooldown <= 0)
|
||||
gunType = 5;
|
||||
Projectile holdout = Projectile.NewProjectileDirect(source, player.MountedCenter, Vector2.Zero, type, damage, knockback, player.whoAmI, 0, 0, gunType);
|
||||
|
||||
holdout.velocity = (player.Calamity().mouseWorld - player.MountedCenter).SafeNormalize(Vector2.Zero);
|
||||
return false;
|
||||
}
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<MysteriousCircuitry>(15).
|
||||
AddIngredient<DubiousPlating>(15).
|
||||
AddIngredient<LifeAlloy>(5).
|
||||
AddIngredient<InfectedArmorPlating>(10).
|
||||
AddCondition(ArsenalTierGatedRecipe.ConstructRecipeCondition(3, out Func<bool> condition), condition).
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
@@ -1,74 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
{
|
||||
public class GatlingLaser : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.DraedonsArsenal";
|
||||
public static readonly SoundStyle FireSound = new("CalamityMod/Sounds/Item/GatlingLaserFireStart");
|
||||
public static readonly SoundStyle FireLoopSound = new("CalamityMod/Sounds/Item/GatlingLaserFireLoop");
|
||||
public static readonly SoundStyle FireEndSound = new("CalamityMod/Sounds/Item/GatlingLaserFireEnd");
|
||||
|
||||
|
||||
// This is the amount of charge consumed every time the holdout projectile fires a laser.
|
||||
public const float HoldoutChargeUse = 0.0075f;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
CalamityGlobalItem modItem = Item.Calamity();
|
||||
|
||||
Item.width = 43;
|
||||
Item.height = 24;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.damage = 43;
|
||||
Item.knockBack = 1f;
|
||||
Item.useTime = 2;
|
||||
Item.useAnimation = 2;
|
||||
Item.noUseGraphic = true;
|
||||
Item.autoReuse = false;
|
||||
Item.channel = true;
|
||||
Item.mana = 4;
|
||||
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.UseSound = FireSound;
|
||||
Item.noMelee = true;
|
||||
|
||||
Item.value = CalamityGlobalItem.RarityYellowBuyPrice;
|
||||
Item.rare = ItemRarityID.Yellow;
|
||||
|
||||
Item.shoot = ModContent.ProjectileType<GatlingLaserProj>();
|
||||
Item.shootSpeed = 24f;
|
||||
|
||||
modItem.UsesCharge = true;
|
||||
modItem.MaxCharge = 135f;
|
||||
modItem.ChargePerUse = 0f; // This weapon is a holdout. Charge is consumed by the holdout projectile.
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 3);
|
||||
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-20, 0);
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<MysteriousCircuitry>(15).
|
||||
AddIngredient<DubiousPlating>(15).
|
||||
AddIngredient<LifeAlloy>(5).
|
||||
AddIngredient<InfectedArmorPlating>(10).
|
||||
AddCondition(ArsenalTierGatedRecipe.ConstructRecipeCondition(3, out Func<bool> condition), condition).
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
using CalamityMod.Sounds;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
{
|
||||
public class GaussPistol : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.DraedonsArsenal";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
CalamityGlobalItem modItem = Item.Calamity();
|
||||
|
||||
Item.width = 40;
|
||||
Item.height = 22;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.mana = 6;
|
||||
Item.damage = 150;
|
||||
Item.knockBack = 11f;
|
||||
Item.useAnimation = Item.useTime = 20;
|
||||
Item.autoReuse = true;
|
||||
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.UseSound = CommonCalamitySounds.GaussWeaponFire;
|
||||
Item.noMelee = true;
|
||||
|
||||
Item.value = CalamityGlobalItem.RarityPinkBuyPrice;
|
||||
Item.rare = ItemRarityID.Pink;
|
||||
|
||||
Item.shoot = ModContent.ProjectileType<GaussPistolShot>();
|
||||
Item.shootSpeed = 14f;
|
||||
|
||||
modItem.MaxCharge = 85f;
|
||||
modItem.UsesCharge = true;
|
||||
modItem.ChargePerUse = 0.05f;
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 2);
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<MysteriousCircuitry>(12).
|
||||
AddIngredient<DubiousPlating>(8).
|
||||
AddRecipeGroup("AnyMythrilBar", 10).
|
||||
AddIngredient(ItemID.SoulofMight, 20).
|
||||
AddCondition(ArsenalTierGatedRecipe.ConstructRecipeCondition(2, out Func<bool> condition), condition).
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 600 B |
@@ -0,0 +1,77 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
{
|
||||
[LegacyName("GaussPistol")]
|
||||
public class Vulcan : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.DraedonsArsenal";
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 28;
|
||||
Item.height = 34;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.mana = 11;
|
||||
Item.damage = 40;
|
||||
Item.knockBack = 11f;
|
||||
Item.useAnimation = Item.useTime = 11;
|
||||
Item.autoReuse = true;
|
||||
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.channel = true;
|
||||
Item.noUseGraphic = true;
|
||||
|
||||
Item.value = CalamityGlobalItem.RarityPinkBuyPrice;
|
||||
Item.rare = ItemRarityID.Pink;
|
||||
|
||||
Item.shoot = ModContent.ProjectileType<VulcanHoldout>();
|
||||
Item.shootSpeed = 14f;
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 2);
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
|
||||
public override bool AltFunctionUse(Player player) => true;
|
||||
public override void HoldItem(Player player)
|
||||
{
|
||||
if (Main.myPlayer == player.whoAmI)
|
||||
player.Calamity().rightClickListener = true;
|
||||
player.Calamity().mouseWorldListener = true;
|
||||
}
|
||||
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/DraedonsArsenal/VulcanGlow").Value);
|
||||
}
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
float gunType = 0;
|
||||
if (player.Calamity().mouseRight && player.whoAmI == Main.myPlayer && !Main.mapFullscreen && !Main.blockMouse && player.Calamity().arsenalCooldown <= 0)
|
||||
gunType = 5;
|
||||
Projectile holdout = Projectile.NewProjectileDirect(source, player.MountedCenter, Vector2.Zero, type, damage, knockback, player.whoAmI, 0, 0, gunType);
|
||||
|
||||
holdout.velocity = (player.Calamity().mouseWorld - player.MountedCenter).SafeNormalize(Vector2.Zero);
|
||||
return false;
|
||||
}
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<MysteriousCircuitry>(12).
|
||||
AddIngredient<DubiousPlating>(8).
|
||||
AddRecipeGroup("AnyMythrilBar", 10).
|
||||
AddIngredient(ItemID.SoulofMight, 20).
|
||||
AddCondition(ArsenalTierGatedRecipe.ConstructRecipeCondition(2, out Func<bool> condition), condition).
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
Item.height = 40;
|
||||
Item.damage = 159;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.mana = 38;
|
||||
Item.mana = 45;
|
||||
Item.useTime = 50;
|
||||
Item.useAnimation = 50;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
@@ -33,6 +33,8 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
}
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
if (player.velocity.Length() <= 12)
|
||||
player.velocity += -velocity.SafeNormalize(Vector2.UnitX) * 5f;
|
||||
bool MaxMana = player.statMana >= (player.statManaMax2 - ((int)(Item.mana * player.manaCost))) && !player.HasBuff(BuffID.ManaSickness);
|
||||
Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, 0f, 0f, MaxMana ? 1f : 0f);
|
||||
|
||||
|
||||
@@ -24,9 +24,9 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
Item.width = 40;
|
||||
Item.height = 56;
|
||||
Item.damage = 3900;
|
||||
Item.damage = 5000;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.mana = 85;
|
||||
Item.mana = 95;
|
||||
Item.useTime = 78;
|
||||
Item.useAnimation = 78;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
@@ -41,6 +41,9 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
}
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
if (player.velocity.Length() <= 16)
|
||||
player.velocity += -velocity.SafeNormalize(Vector2.UnitX) * 7.5f;
|
||||
|
||||
bool MaxMana = player.statMana >= (player.statManaMax2 - ((int)(Item.mana * player.manaCost))) && !player.HasBuff(BuffID.ManaSickness);
|
||||
for (int i = -2; i <= 2; i++)
|
||||
{
|
||||
|
||||
@@ -38,10 +38,14 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
}
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
if (player.velocity.Length() <= 14)
|
||||
player.velocity += -velocity.SafeNormalize(Vector2.UnitX) * 6f;
|
||||
|
||||
Vector2 staticSpeed = Utils.DirectionTo(player.Center, player.Calamity().mouseWorld) * Utils.Distance(player.Center, player.ClampedMouseWorld()) * 0.008f;
|
||||
bool MaxMana = player.statMana >= (player.statManaMax2 - ((int)(Item.mana * player.manaCost))) && !player.HasBuff(BuffID.ManaSickness);
|
||||
float rotation = 0.4f;
|
||||
Projectile.NewProjectile(source, position, velocity.RotatedBy(-rotation), type, damage / 2, knockback, player.whoAmI, 0f, 1f, MaxMana ? 1f : 0f);
|
||||
Projectile.NewProjectile(source, position, velocity.RotatedBy(rotation), type, damage / 2, knockback, player.whoAmI, 0f, 0f, MaxMana ? 1f : 0f);
|
||||
Projectile.NewProjectile(source, position, staticSpeed.RotatedBy(-rotation), type, damage / 2, knockback, player.whoAmI, 0f, 1f, MaxMana ? 1f : 0f);
|
||||
Projectile.NewProjectile(source, position, staticSpeed.RotatedBy(rotation), type, damage / 2, knockback, player.whoAmI, 0f, 0f, MaxMana ? 1f : 0f);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -20,16 +20,17 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
Item.width = 58;
|
||||
Item.height = 56;
|
||||
Item.damage = 205;
|
||||
Item.damage = 285;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.mana = 10;
|
||||
Item.useTime = 12;
|
||||
Item.useAnimation = 12;
|
||||
Item.mana = 15;
|
||||
Item.useTime = 8;
|
||||
Item.useAnimation = 24;
|
||||
Item.reuseDelay = 30;
|
||||
Item.useLimitPerAnimation = 3;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.knockBack = 5f;
|
||||
Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice;
|
||||
Item.UseSound = SoundID.Item72;
|
||||
Item.autoReuse = true;
|
||||
Item.shoot = ModContent.ProjectileType<Shadowbolt>();
|
||||
Item.shootSpeed = 5f;
|
||||
|
||||
@@ -1,85 +1,144 @@
|
||||
using CalamityMod.Dusts;
|
||||
using System;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
public class GreatswordofJudgement : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Melee";
|
||||
private float swingRoatation = 0;
|
||||
private int time = 0;
|
||||
private Color mainColor;
|
||||
private int swordDirection;
|
||||
private int useTime = 20;
|
||||
private int opacityAdjust = 0;
|
||||
private float smearOpacity = 0;
|
||||
public int time = 0;
|
||||
public Vector2 bladeHitboxPos;
|
||||
public float bladeRotation = 0;
|
||||
public int bladeDirection = 0;
|
||||
public float completion = 0;
|
||||
public bool canHit => (completion >= 0.35f && completion <= 0.8f);
|
||||
public int swingCount = 0;
|
||||
public bool spawnProj = true;
|
||||
public bool playSound = true;
|
||||
|
||||
public Color clr = Color.MediumOrchid;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 78;
|
||||
Item.height = 78;
|
||||
Item.damage = 155;
|
||||
Item.damage = 240;
|
||||
Item.DamageType = DamageClass.Melee;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.useAnimation = Item.useTime = useTime;
|
||||
Item.useAnimation = Item.useTime = 20;
|
||||
Item.useTurn = true;
|
||||
Item.knockBack = 7f;
|
||||
Item.UseSound = SoundID.Item60;
|
||||
Item.autoReuse = true;
|
||||
Item.value = CalamityGlobalItem.RarityPurpleBuyPrice;
|
||||
Item.rare = ItemRarityID.Purple;
|
||||
Item.shoot = ModContent.ProjectileType<JudgementProj>();
|
||||
Item.shootSpeed = 5f;
|
||||
Item.shootSpeed = 5.5f;
|
||||
}
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
public override void UseItemHitbox(Player player, ref Rectangle hitbox, ref bool noHitbox)
|
||||
{
|
||||
float scale = 1.1f;
|
||||
// Basically just insures the enemy is always able to be hit if they're in range, the actual collision check is done in CanHitNPC
|
||||
float scale = 8f;
|
||||
Vector2 newSize = new Point(hitbox.Width, hitbox.Height).ToVector2() * scale;
|
||||
hitbox = new Rectangle(hitbox.X - (int)((newSize.X - hitbox.Width) / 2f), hitbox.Y - (int)((newSize.Y - hitbox.Height) / 2f), (int)newSize.X, (int)newSize.Y);
|
||||
hitbox = new Rectangle((int)(bladeHitboxPos.X - newSize.X / 2f), (int)(bladeHitboxPos.Y - newSize.Y / 2f), (int)newSize.X, (int)newSize.Y);
|
||||
}
|
||||
public override bool? CanHitNPC(Player player, NPC target)
|
||||
{
|
||||
Vector2 mPos = player.Calamity().mouseWorld;
|
||||
Vector2 shootDir = player.Center.DirectionTo(mPos);
|
||||
float _ = float.NaN;
|
||||
bool hitCheck = Collision.CheckAABBvLineCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), player.Center - shootDir * 30, player.Center + shootDir * 145, Item.width * 3f, ref _);
|
||||
return ((canHit && hitCheck) ? null : false);
|
||||
}
|
||||
public override void UseAnimation(Player player)
|
||||
{
|
||||
swordDirection = player.direction;
|
||||
swingCount++;
|
||||
time = 0;
|
||||
swingRoatation = 0;
|
||||
mainColor = Main.rand.NextBool() ? Color.MediumPurple : Color.MediumOrchid;
|
||||
opacityAdjust = 0;
|
||||
smearOpacity = 0;
|
||||
bladeDirection = player.direction;
|
||||
bladeHitboxPos = player.Center;
|
||||
bladeRotation = 0;
|
||||
spawnProj = true;
|
||||
playSound = true;
|
||||
int dir = -Math.Sign(player.Center.X - player.Calamity().mouseWorld.X);
|
||||
float startRot = MathHelper.ToRadians(-90) * dir * (swingCount % 2 == 0 ? 1 : -1);
|
||||
|
||||
clr = Main.rand.NextBool() ? Color.MediumPurple : Color.MediumOrchid;
|
||||
}
|
||||
public override void MeleeEffects(Player player, Rectangle hitbox)
|
||||
{
|
||||
opacityAdjust++;
|
||||
if (opacityAdjust >= 5 && opacityAdjust <= 15 && smearOpacity < 0.9f)
|
||||
smearOpacity += 0.1f;
|
||||
else if (smearOpacity > 0)
|
||||
smearOpacity -= 0.2f;
|
||||
Vector2 mPos = player.Calamity().mouseWorld;
|
||||
completion = (float)((float)time / ((float)(Item.useAnimation / player.GetAttackSpeed(DamageClass.Melee))));
|
||||
int dir = -Math.Sign(player.Center.X - mPos.X);
|
||||
|
||||
float startRot = MathHelper.ToRadians(-110) * dir * (swingCount % 2 == 0 ? 1 : -1);
|
||||
float endRot = MathHelper.ToRadians(-110) * dir * (swingCount % 2 == 0 ? -1 : 1);
|
||||
float minRot = MathHelper.ToRadians(-150) * dir * (swingCount % 2 == 0 ? 1 : -1);
|
||||
float cutoff = 0.2f;
|
||||
float cutoff2 = 0.95f;
|
||||
|
||||
Vector2 shootDir = player.Center.DirectionTo(mPos) * Item.shootSpeed;
|
||||
|
||||
if (completion <= cutoff)
|
||||
{
|
||||
float lerp = Utils.GetLerpValue(0, cutoff, completion, true);
|
||||
player.itemRotation = player.Center.DirectionTo(mPos).ToRotation() + MathHelper.Lerp(startRot, minRot, CalamityUtils.EaseInOutExp(lerp, 4f, 4f));
|
||||
player.itemRotation += (MathHelper.Pi) * (dir == 1 ? 0 : 1) + MathHelper.PiOver4 * dir;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (playSound)
|
||||
{
|
||||
SoundStyle swing = new("CalamityMod/Sounds/Item/SwooshMid");
|
||||
SoundEngine.PlaySound(swing with { Pitch = Main.rand.NextFloat(0.1f, 0.3f), Volume = 1f }, player.Center);
|
||||
playSound = false;
|
||||
}
|
||||
if (completion >= 0.65f && spawnProj)
|
||||
{
|
||||
Projectile.NewProjectile(player.GetSource_FromThis(), player.Center, shootDir, Item.shoot, Item.damage, Item.knockBack, player.whoAmI, 0f);
|
||||
|
||||
Particle swipe = new CustomSpark(player.Center - shootDir * 5, shootDir.RotatedBy(0.4f * (dir * (swingCount % 2 == 0 ? 1 : -1))) * 2.5f, "CalamityMod/Particles/VerticalSmearLarge", false, (int)(14 / player.GetAttackSpeed(DamageClass.Melee)), 0.6f, clr, new Vector2(1f, 1f), true, false, 0, false, false);
|
||||
GeneralParticleHandler.SpawnParticle(swipe);
|
||||
|
||||
SoundEngine.PlaySound(SoundID.Item60, player.Center);
|
||||
spawnProj = false;
|
||||
}
|
||||
float lerp = Utils.GetLerpValue(cutoff, cutoff2, completion, true);
|
||||
player.itemRotation = player.Center.DirectionTo(mPos).ToRotation() + MathHelper.Lerp(minRot, endRot, CalamityUtils.EaseInOutExp(lerp, 6f, 2f));
|
||||
player.itemRotation += (MathHelper.Pi) * (dir == 1 ? 0 : 1) + MathHelper.PiOver4 * dir;
|
||||
}
|
||||
|
||||
float extraRot = (dir == 1 ? -MathHelper.PiOver4 : MathHelper.ToRadians(225));
|
||||
bladeHitboxPos = player.Center + (player.itemRotation + extraRot).ToRotationVector2() * 180;
|
||||
|
||||
player.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, player.itemRotation + MathHelper.ToRadians(-130) * dir);
|
||||
player.SetCompositeArmBack(true, Player.CompositeArmStretchAmount.Full, player.itemRotation + MathHelper.ToRadians(-130) * dir);
|
||||
|
||||
player.itemLocation = player.Center;
|
||||
player.direction = dir;
|
||||
|
||||
time++;
|
||||
swingRoatation += swordDirection == 1 ? 0.13f : -0.13f;
|
||||
|
||||
float Rot = (swordDirection == -1 ? 1.8f : -1.8f) + swingRoatation;
|
||||
if (swordDirection != player.direction)
|
||||
}
|
||||
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
int beamDamage = player.CalcIntDamage<MeleeDamageClass>(Item.damage * 0.4f);
|
||||
Vector2 mouseClamped = player.ClampedMouseWorld();
|
||||
SoundEngine.PlaySound(SoundID.Item84 with { Volume = 1f, Pitch = Main.rand.NextFloat(0.5f, 0.7f) }, player.Center);
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
swingRoatation *= -1;
|
||||
swordDirection = player.direction;
|
||||
}
|
||||
Particle Smear = new SemiCircularSmearFade(player.Center, Vector2.Zero, mainColor * smearOpacity, Rot, Main.rand.NextFloat(1.95f, 2.2f), new Vector2(1, 1), 2, true, false, true, player.direction);
|
||||
GeneralParticleHandler.SpawnParticle(Smear);
|
||||
|
||||
if (Main.rand.NextBool(3))
|
||||
{
|
||||
Vector2 dustVel = new Vector2(5 * swordDirection, -5).RotatedByRandom(1.55f) * Main.rand.NextFloat(0.7f, 1.3f);
|
||||
Dust dust = Dust.NewDustPerfect(player.Center + dustVel * 9, 278);
|
||||
dust.scale = Main.rand.NextFloat(0.4f, 0.55f);
|
||||
dust.velocity = dustVel * 0.55f;
|
||||
dust.color = Main.rand.NextBool() ? Color.MediumPurple : Color.MediumOrchid;
|
||||
dust.noGravity = true;
|
||||
Vector2 vel = player.Center.DirectionFrom(target.Center).RotatedByRandom(0.7f) * Main.rand.NextFloat(18, 20);
|
||||
Projectile.NewProjectile(player.GetSource_ItemUse(Item), player.Center, vel, ModContent.ProjectileType<StarofJudgement>(), beamDamage, 0, player.whoAmI, 0, (i == 0 ? -1 : 1), 1);
|
||||
}
|
||||
}
|
||||
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
|
||||
@@ -90,6 +149,8 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient(ItemID.LunarBar, 7).
|
||||
AddIngredient<CoreofCalamity>().
|
||||
AddIngredient<GalacticaSingularity>(5).
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -1,193 +0,0 @@
|
||||
using System;
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
[LegacyName("ElementalExcalibur")]
|
||||
public class IridescentExcalibur : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Melee";
|
||||
|
||||
private int MaxBeamTypes = 12;
|
||||
|
||||
private int BeamType = 0;
|
||||
|
||||
private const int Alpha = 100;
|
||||
|
||||
private const float ShootSpeed = 16f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 112;
|
||||
Item.height = 112;
|
||||
Item.damage = 3000;
|
||||
Item.useAnimation = Item.useTime = 15;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.useTurn = true;
|
||||
Item.DamageType = DamageClass.Melee;
|
||||
Item.knockBack = 8f;
|
||||
Item.UseSound = SoundID.Item1;
|
||||
Item.autoReuse = true;
|
||||
Item.value = CalamityGlobalItem.RarityHotPinkBuyPrice;
|
||||
Item.shoot = ModContent.ProjectileType<GayBeam>();
|
||||
Item.shootSpeed = ShootSpeed;
|
||||
Item.rare = ModContent.RarityType<HotPink>();
|
||||
Item.shootsEveryUse = true;
|
||||
}
|
||||
|
||||
public override void UseStyle(Player player, Rectangle heldItemFrame)
|
||||
{
|
||||
player.itemLocation += new Vector2(-12f * player.direction, 2f * player.gravDir).RotatedBy(player.itemRotation);
|
||||
}
|
||||
|
||||
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/IridescentExcaliburGlow").Value);
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 10;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
if (player.altFunctionUse == 2)
|
||||
{
|
||||
float adjustedItemScale = player.GetAdjustedItemScale(Item);
|
||||
Projectile.NewProjectile(source, player.MountedCenter, new Vector2(player.direction, 0f), ModContent.ProjectileType<IridescentExcaliburSlash>(), damage, knockback, player.whoAmI, (float)player.direction * player.gravDir, player.itemAnimationMax, adjustedItemScale);
|
||||
Projectile.NewProjectile(source, player.MountedCenter, new Vector2(player.direction, 0f), ModContent.ProjectileType<IridescentExcaliburSlash2>(), 0, knockback, player.whoAmI, (float)player.direction * player.gravDir, player.itemAnimationMax, adjustedItemScale);
|
||||
Projectile.NewProjectile(source, player.MountedCenter, new Vector2(player.direction, 0f), ModContent.ProjectileType<IridescentExcaliburSlash3>(), 0, knockback, player.whoAmI, (float)player.direction * player.gravDir, player.itemAnimationMax, adjustedItemScale);
|
||||
NetMessage.SendData(MessageID.PlayerControls, -1, -1, null, player.whoAmI);
|
||||
}
|
||||
else
|
||||
{
|
||||
int proj = Projectile.NewProjectile(source, position, velocity, type, (int)Math.Round(damage * 0.5), knockback * 0.5f, player.whoAmI, (float)BeamType);
|
||||
if (BeamType == 7)
|
||||
Main.projectile[proj].penetrate = 3;
|
||||
|
||||
BeamType++;
|
||||
if (BeamType >= MaxBeamTypes)
|
||||
BeamType = 0;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool AltFunctionUse(Player player) => true;
|
||||
|
||||
public override bool? UseItem(Player player)
|
||||
{
|
||||
Item.noMelee = player.altFunctionUse == 2;
|
||||
return base.UseItem(player);
|
||||
}
|
||||
|
||||
public override void ModifyHitNPC(Player player, NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
if (player.altFunctionUse == 2)
|
||||
modifiers.SourceDamage *= 2;
|
||||
}
|
||||
|
||||
public override void ModifyHitPvp(Player player, Player target, ref Player.HurtModifiers modifiers)
|
||||
{
|
||||
if (player.altFunctionUse == 2)
|
||||
modifiers.SourceDamage *= 2;
|
||||
}
|
||||
|
||||
public override void MeleeEffects(Player player, Rectangle hitbox)
|
||||
{
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Color rainbowColor = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, Alpha);
|
||||
Color color = Color.White;
|
||||
int dustChoice = player.altFunctionUse == 2 ? Main.rand.Next(12) : BeamType;
|
||||
switch (dustChoice)
|
||||
{
|
||||
case 0: // Red
|
||||
color = new Color(255, 0, 0, Alpha);
|
||||
break;
|
||||
case 1: // Orange
|
||||
color = new Color(255, 128, 0, Alpha);
|
||||
break;
|
||||
case 2: // Yellow
|
||||
color = new Color(255, 255, 0, Alpha);
|
||||
break;
|
||||
case 3: // Lime
|
||||
color = new Color(128, 255, 0, Alpha);
|
||||
break;
|
||||
case 4: // Green
|
||||
color = new Color(0, 255, 0, Alpha);
|
||||
break;
|
||||
case 5: // Turquoise
|
||||
color = new Color(0, 255, 128, Alpha);
|
||||
break;
|
||||
case 6: // Cyan
|
||||
color = new Color(0, 255, 255, Alpha);
|
||||
break;
|
||||
case 7: // Light Blue
|
||||
color = new Color(0, 128, 255, Alpha);
|
||||
break;
|
||||
case 8: // Blue
|
||||
color = new Color(0, 0, 255, Alpha);
|
||||
break;
|
||||
case 9: // Purple
|
||||
color = new Color(128, 0, 255, Alpha);
|
||||
break;
|
||||
case 10: // Fuschia
|
||||
color = new Color(255, 0, 255, Alpha);
|
||||
break;
|
||||
case 11: // Hot Pink
|
||||
color = new Color(255, 0, 128, Alpha);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Dust rainbow = Main.dust[Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, DustID.RainbowMk2)];
|
||||
rainbow.velocity *= 0f;
|
||||
rainbow.color = Color.Lerp(rainbowColor, color, (float)Math.Sqrt((MathF.Cos(Main.GlobalTimeWrappedHourly / 60f) + 1f) * 0.5f));
|
||||
rainbow.color.A = 100;
|
||||
rainbow.scale = Main.rand.NextFloat(1.2f, 1.6f);
|
||||
rainbow.fadeIn = Main.rand.NextFloat(0.4f, 1f);
|
||||
rainbow.noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<MiracleBlight>(), 600);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 60);
|
||||
}
|
||||
|
||||
public override void OnHitPvp(Player player, Player target, Player.HurtInfo hurtInfo)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<MiracleBlight>(), 600);
|
||||
target.AddBuff(ModContent.BuffType<GlacialState>(), 60);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient(ItemID.TrueExcalibur).
|
||||
AddIngredient<Orderbringer>().
|
||||
AddIngredient<MiracleMatter>(3).
|
||||
AddIngredient<AshesofAnnihilation>(15).
|
||||
AddTile<DraedonsForge>().
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 666 B |
@@ -1,42 +1,44 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ID;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria.ModLoader;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Basic.Reference.Assemblies;
|
||||
using System;
|
||||
using Mono.Cecil;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
[LegacyName("GreatswordofBlah")]
|
||||
[LegacyName("IridescentExcalibur")]
|
||||
public class Orderbringer : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Melee";
|
||||
private float swingRoatation = 0;
|
||||
private int time = 0;
|
||||
private Color mainColor;
|
||||
private int swordDirection;
|
||||
private int useTime = 18;
|
||||
private int opacityAdjust = 0;
|
||||
private float smearOpacity = 0;
|
||||
public int time = 0;
|
||||
public Vector2 bladeHitboxPos;
|
||||
public float bladeRotation = 0;
|
||||
public int bladeDirection = 0;
|
||||
public float completion = 0;
|
||||
public bool canHit => (completion >= 0.35f && completion <= 0.8f);
|
||||
public int swingCount = 0;
|
||||
public bool spawnProj = true;
|
||||
public bool playSound = true;
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = Item.height = 108;
|
||||
Item.damage = 445;
|
||||
Item.width = Item.height = 112;
|
||||
Item.damage = 840;
|
||||
Item.DamageType = DamageClass.Melee;
|
||||
Item.useAnimation = Item.useTime = useTime;
|
||||
Item.useAnimation = Item.useTime = 16;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.useTurn = true;
|
||||
Item.knockBack = 8f;
|
||||
Item.UseSound = SoundID.Item60;
|
||||
Item.autoReuse = true;
|
||||
Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice;
|
||||
Item.rare = ModContent.RarityType<CosmicPurple>();
|
||||
@@ -45,87 +47,149 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
}
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, 0f);
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
Vector2 vel = (velocity * 2.5f).RotatedByRandom(0.6f);
|
||||
Projectile.NewProjectile(source, player.ClampedMouseWorld() - (velocity * 40) + Main.rand.NextVector2Circular(130, 130), vel * Main.rand.NextFloat(0.8f, 1.2f), ModContent.ProjectileType<StarofJudgement>(), (int)(damage * 0.1f), knockback * 0.2f, player.whoAmI, 0, 0, 1);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public override void UseItemHitbox(Player player, ref Rectangle hitbox, ref bool noHitbox)
|
||||
{
|
||||
float scale = 1.2f;
|
||||
// Basically just insures the enemy is always able to be hit if they're in range, the actual collision check is done in CanHitNPC
|
||||
float scale = 8f;
|
||||
Vector2 newSize = new Point(hitbox.Width, hitbox.Height).ToVector2() * scale;
|
||||
hitbox = new Rectangle(hitbox.X - (int)((newSize.X - hitbox.Width) / 2f), hitbox.Y - (int)((newSize.Y - hitbox.Height) / 2f), (int)newSize.X, (int)newSize.Y);
|
||||
hitbox = new Rectangle((int)(bladeHitboxPos.X - newSize.X / 2f), (int)(bladeHitboxPos.Y - newSize.Y / 2f), (int)newSize.X, (int)newSize.Y);
|
||||
}
|
||||
public override bool? CanHitNPC(Player player, NPC target)
|
||||
{
|
||||
Vector2 mPos = player.Calamity().mouseWorld;
|
||||
Vector2 shootDir = player.Center.DirectionTo(mPos);
|
||||
float _ = float.NaN;
|
||||
bool hitCheck = Collision.CheckAABBvLineCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), player.Center - shootDir * 30, player.Center + shootDir * 245, Item.width * 3f, ref _);
|
||||
return ((canHit && hitCheck) ? null : false);
|
||||
}
|
||||
public override void UseAnimation(Player player)
|
||||
{
|
||||
swordDirection = player.direction;
|
||||
swingCount++;
|
||||
time = 0;
|
||||
swingRoatation = 0;
|
||||
mainColor = Main.rand.NextBool() ? Color.MediumPurple : Color.MediumOrchid;
|
||||
opacityAdjust = 0;
|
||||
smearOpacity = 0;
|
||||
bladeDirection = player.direction;
|
||||
bladeHitboxPos = player.Center;
|
||||
bladeRotation = 0;
|
||||
spawnProj = true;
|
||||
playSound = true;
|
||||
int dir = -Math.Sign(player.Center.X - player.Calamity().mouseWorld.X);
|
||||
float startRot = MathHelper.ToRadians(-90) * dir * (swingCount % 2 == 0 ? 1 : -1);
|
||||
}
|
||||
public override void MeleeEffects(Player player, Rectangle hitbox)
|
||||
{
|
||||
opacityAdjust++;
|
||||
if (opacityAdjust >= 5 && opacityAdjust <= 15 && smearOpacity < 0.9f)
|
||||
smearOpacity += 0.1f;
|
||||
else if (smearOpacity > 0)
|
||||
smearOpacity -= 0.2f;
|
||||
Vector2 mPos = player.Calamity().mouseWorld;
|
||||
completion = (float)((float)time / ((float)(Item.useAnimation / player.GetAttackSpeed(DamageClass.Melee))));
|
||||
int dir = -Math.Sign(player.Center.X - mPos.X);
|
||||
|
||||
float startRot = MathHelper.ToRadians(-110) * dir * (swingCount % 2 == 0 ? 1 : -1);
|
||||
float endRot = MathHelper.ToRadians(-110) * dir * (swingCount % 2 == 0 ? -1 : 1);
|
||||
float minRot = MathHelper.ToRadians(-150) * dir * (swingCount % 2 == 0 ? 1 : -1);
|
||||
float cutoff = 0.2f;
|
||||
float cutoff2 = 0.95f;
|
||||
|
||||
Vector2 shootDir = player.Center.DirectionTo(mPos) * Item.shootSpeed;
|
||||
|
||||
if (completion <= cutoff)
|
||||
{
|
||||
float lerp = Utils.GetLerpValue(0, cutoff, completion, true);
|
||||
player.itemRotation = player.Center.DirectionTo(mPos).ToRotation() + MathHelper.Lerp(startRot, minRot, CalamityUtils.EaseInOutExp(lerp, 4f, 4f));
|
||||
player.itemRotation += (MathHelper.Pi) * (dir == 1 ? 0 : 1) + MathHelper.PiOver4 * dir;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (playSound)
|
||||
{
|
||||
SoundStyle swing = new("CalamityMod/Sounds/Item/SwooshMid");
|
||||
SoundEngine.PlaySound(swing with { Pitch = Main.rand.NextFloat(0.1f, 0.3f), Volume = 1f }, player.Center);
|
||||
playSound = false;
|
||||
}
|
||||
if (completion >= 0.65f && spawnProj)
|
||||
{
|
||||
Projectile.NewProjectile(player.GetSource_FromThis(), player.Center, shootDir, Item.shoot, Item.damage, Item.knockBack, player.whoAmI, 0f);
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
float rot = Main.rand.NextFloat(0.5f, 0.65f) * (Main.rand.NextBool() ? 1 : -1);
|
||||
Vector2 vel = (shootDir * 2.5f).RotatedByRandom(0.6f);
|
||||
Projectile.NewProjectile(player.GetSource_FromThis(), player.ClampedMouseWorld() - (shootDir * 40) + Main.rand.NextVector2Circular(130, 130), vel.RotatedBy(rot) * Main.rand.NextFloat(0.9f, 1.2f), ModContent.ProjectileType<StarofOrder>(), (int)(Item.damage * 0.12f), (int)(Item.knockBack * 0.2f), player.whoAmI, 0, rot, 1);
|
||||
}
|
||||
|
||||
Particle swipe = new CustomSpark(player.Center - shootDir * 5, shootDir.RotatedBy(0.4f * (dir * (swingCount % 2 == 0 ? 1 : -1))) * 2.5f, "CalamityMod/Particles/VerticalSmearLarge", false, (int)(14 / player.GetAttackSpeed(DamageClass.Melee)), 0.8f, player.Calamity().lightRGB, new Vector2(1f, 1f), true, false, 0, false, false);
|
||||
GeneralParticleHandler.SpawnParticle(swipe);
|
||||
|
||||
SoundEngine.PlaySound(SoundID.Item60, player.Center);
|
||||
spawnProj = false;
|
||||
}
|
||||
float lerp = Utils.GetLerpValue(cutoff, cutoff2, completion, true);
|
||||
player.itemRotation = player.Center.DirectionTo(mPos).ToRotation() + MathHelper.Lerp(minRot, endRot, CalamityUtils.EaseInOutExp(lerp, 6f, 2f));
|
||||
player.itemRotation += (MathHelper.Pi) * (dir == 1 ? 0 : 1) + MathHelper.PiOver4 * dir;
|
||||
}
|
||||
|
||||
float extraRot = (dir == 1 ? -MathHelper.PiOver4 : MathHelper.ToRadians(225));
|
||||
bladeHitboxPos = player.Center + (player.itemRotation + extraRot).ToRotationVector2() * 240;
|
||||
Vector2 tipPos = player.Center + (player.itemRotation + extraRot).ToRotationVector2() * 180;
|
||||
|
||||
player.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, player.itemRotation + MathHelper.ToRadians(-130) * dir);
|
||||
player.SetCompositeArmBack(true, Player.CompositeArmStretchAmount.Full, player.itemRotation + MathHelper.ToRadians(-130) * dir);
|
||||
|
||||
player.itemLocation = player.Center;
|
||||
player.direction = dir;
|
||||
|
||||
time++;
|
||||
swingRoatation += swordDirection == 1 ? 0.17f : -0.17f;
|
||||
|
||||
float Rot = (swordDirection == -1 ? 1.8f : -1.8f) + swingRoatation;
|
||||
if (swordDirection != player.direction)
|
||||
{
|
||||
swingRoatation *= -1;
|
||||
swordDirection = player.direction;
|
||||
}
|
||||
Particle Smear = new SemiCircularSmearFade(player.Center, Vector2.Zero, mainColor * smearOpacity, Rot, Main.rand.NextFloat(2.8f, 3.2f), new Vector2(1, 1), 2, true, false, true, player.direction);
|
||||
GeneralParticleHandler.SpawnParticle(Smear);
|
||||
|
||||
if (Main.rand.NextBool())
|
||||
{
|
||||
Vector2 dustVel = new Vector2(5 * swordDirection, -5).RotatedByRandom(1.55f) * Main.rand.NextFloat(0.7f, 1.3f) * 2;
|
||||
Dust dust = Dust.NewDustPerfect(player.Center + dustVel * 9, 278);
|
||||
dust.scale = Main.rand.NextFloat(0.5f, 0.75f);
|
||||
dust.velocity = dustVel * 0.55f;
|
||||
dust.color = Main.rand.NextBool() ? Color.MediumPurple : Color.MediumOrchid;
|
||||
dust.noGravity = true;
|
||||
}
|
||||
}
|
||||
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
int beamDamage = player.CalcIntDamage<MeleeDamageClass>(Item.damage * 0.5f);
|
||||
int beamDamage = player.CalcIntDamage<MeleeDamageClass>(Item.damage * 0.4f);
|
||||
Vector2 mouseClamped = player.ClampedMouseWorld();
|
||||
SoundEngine.PlaySound(SoundID.Item84 with { Volume = 1f, Pitch = Main.rand.NextFloat(0.5f, 0.7f)}, player.Center);
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
Vector2 targetPos = Main.MouseWorld;
|
||||
NPC target2 = Main.MouseWorld.ClosestNPCAt(650);
|
||||
if (target2 != null)
|
||||
targetPos = target2.Center + target2.velocity * 14;
|
||||
targetPos = target2.Center;
|
||||
|
||||
Vector2 spawnPos = mouseClamped + new Vector2(Main.rand.NextFloat(-300, 300), -900);
|
||||
Vector2 vel = (targetPos - spawnPos).SafeNormalize(Vector2.UnitY) * 10;
|
||||
Projectile.NewProjectile(player.GetSource_ItemUse(Item), spawnPos, vel, ModContent.ProjectileType<OrderbringerBeam>(), beamDamage, 0, player.whoAmI);
|
||||
}
|
||||
}
|
||||
public override void ModifyTooltips(List<TooltipLine> list)
|
||||
{
|
||||
Player Owner = Main.LocalPlayer;
|
||||
if (Owner is null)
|
||||
return;
|
||||
|
||||
float rate = Main.GlobalTimeWrappedHourly * 7;
|
||||
List<Color> eColors = new List<Color>()
|
||||
{
|
||||
Color.PaleVioletRed,
|
||||
Color.Coral,
|
||||
Color.Khaki,
|
||||
Color.PaleGreen,
|
||||
Color.Turquoise,
|
||||
Color.Violet
|
||||
};
|
||||
|
||||
int colorIndex = (int)(rate / 2 % eColors.Count);
|
||||
Color currentColor = eColors[colorIndex];
|
||||
Color nextColor = eColors[(colorIndex + 1) % eColors.Count];
|
||||
Color finalColor = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f);
|
||||
TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip2");
|
||||
if (line != null)
|
||||
line.OverrideColor = Color.Lerp(finalColor, Color.White, 0.3f);
|
||||
}
|
||||
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/OrderbringerGlow").Value);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<GreatswordofJudgement>().
|
||||
AddIngredient<CosmiliteBar>(8).
|
||||
AddIngredient<EndothermicEnergy>(20).
|
||||
AddIngredient<AuricBar>(5).
|
||||
AddIngredient<LifeAlloy>(5).
|
||||
AddTile<CosmicAnvil>().
|
||||
Register();
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 666 B |
@@ -36,51 +36,34 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(BuffID.OnFire3, 360);
|
||||
SoundEngine.PlaySound(SoundID.Item14, target.Center);
|
||||
int onHitDamage = player.CalcIntDamage<MeleeDamageClass>(Item.damage);
|
||||
Projectile blast = Projectile.NewProjectileDirect(Item.GetSource_FromThis(), target.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), onHitDamage, 0f, player.whoAmI, target.whoAmI);
|
||||
blast.DamageType = Item.DamageType;
|
||||
float firstDustScale = 1.7f;
|
||||
float secondDustScale = 0.8f;
|
||||
float thirdDustScale = 2f;
|
||||
Vector2 dustRotation = (target.rotation - 1.57079637f).ToRotationVector2();
|
||||
|
||||
Vector2 dustRotation = (target.rotation - MathHelper.PiOver2).ToRotationVector2();
|
||||
Vector2 dustVelocity = dustRotation * target.velocity.Length();
|
||||
SoundEngine.PlaySound(SoundID.Item14, target.Center);
|
||||
int increment;
|
||||
for (int i = 0; i < 40; i = increment + 1)
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
int swingDust = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, DustID.InfernoFork, 0f, 0f, 200, default, firstDustScale);
|
||||
Dust dust = Main.dust[swingDust];
|
||||
dust.position = target.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)target.width / 2f;
|
||||
dust.noGravity = true;
|
||||
dust.velocity.Y -= 6f;
|
||||
dust.velocity *= 3f;
|
||||
dust.velocity += dustVelocity * Main.rand.NextFloat();
|
||||
swingDust = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, DustID.InfernoFork, 0f, 0f, 100, default, secondDustScale);
|
||||
dust.position = target.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)target.width / 2f;
|
||||
dust.velocity.Y -= 6f;
|
||||
dust.velocity *= 2f;
|
||||
dust.noGravity = true;
|
||||
dust.fadeIn = 1f;
|
||||
dust.color = Color.Crimson * 0.5f;
|
||||
dust.velocity += dustVelocity * Main.rand.NextFloat();
|
||||
increment = i;
|
||||
Vector2 mainDustPos = target.Center + Main.rand.NextVector2Circular(target.width / 2, target.width / 2);
|
||||
Dust swingDust = Dust.NewDustPerfect(mainDustPos, DustID.InfernoFork, dustVelocity * Main.rand.NextFloat() - Vector2.UnitY * 18f, 200, Scale: 1.7f);
|
||||
swingDust.noGravity = true;
|
||||
|
||||
Dust swingDust2 = Dust.NewDustPerfect(mainDustPos, DustID.InfernoFork, dustVelocity * Main.rand.NextFloat() - Vector2.UnitY * 12f, 100, Color.Crimson * 0.5f, 0.8f);
|
||||
swingDust2.noGravity = true;
|
||||
swingDust2.fadeIn = 1f;
|
||||
}
|
||||
for (int j = 0; j < 20; j = increment + 1)
|
||||
for (int j = 0; j < 20; j++)
|
||||
{
|
||||
int swingDust2 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, DustID.InfernoFork, 0f, 0f, 0, default, thirdDustScale);
|
||||
Dust dust = Main.dust[swingDust2];
|
||||
dust.position = target.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)target.velocity.ToRotation(), default) * (float)target.width / 3f;
|
||||
dust.noGravity = true;
|
||||
dust.velocity.Y -= 6f;
|
||||
dust.velocity *= 0.5f;
|
||||
dust.velocity += dustVelocity * (0.6f + 0.6f * Main.rand.NextFloat());
|
||||
increment = j;
|
||||
Vector2 dustPos = target.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(target.velocity.ToRotation()) * (target.width / 3f);
|
||||
Dust moreDust = Dust.NewDustPerfect(dustPos, DustID.InfernoFork, dustVelocity * (0.6f + 0.6f * Main.rand.NextFloat()) - Vector2.UnitY * 3f, Scale: 2f);
|
||||
moreDust.noGravity = true;
|
||||
}
|
||||
}
|
||||
|
||||
public override void MeleeEffects(Player player, Rectangle hitbox)
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
if (player.whoAmI == Main.myPlayer && !player.Calamity().bladeArmEnchant)
|
||||
{
|
||||
if (player.itemAnimation == (int)(player.itemAnimationMax * 0.1) ||
|
||||
player.itemAnimation == (int)(player.itemAnimationMax * 0.3) ||
|
||||
@@ -88,65 +71,48 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
player.itemAnimation == (int)(player.itemAnimationMax * 0.7) ||
|
||||
player.itemAnimation == (int)(player.itemAnimationMax * 0.9))
|
||||
{
|
||||
float sparkYVel = 0f;
|
||||
float sparkXVel = 0f;
|
||||
float sparkYSpawn = 0f;
|
||||
float sparkYVel = 0f;
|
||||
float sparkXSpawn = 0f;
|
||||
float sparkYSpawn = 0f;
|
||||
|
||||
if (player.itemAnimation == (int)(player.itemAnimationMax * 0.9))
|
||||
{
|
||||
sparkYVel = -7f;
|
||||
sparkYVel = -10.5f;
|
||||
if (player.direction == -1)
|
||||
sparkXSpawn = -8f;
|
||||
}
|
||||
if (player.itemAnimation == (int)(player.itemAnimationMax * 0.7))
|
||||
{
|
||||
sparkYVel = -6f;
|
||||
sparkXVel = 2f;
|
||||
sparkYVel = -9f;
|
||||
sparkXVel = 3f;
|
||||
sparkXSpawn = player.direction == -1 ? 20f : 26f;
|
||||
}
|
||||
if (player.itemAnimation == (int)(player.itemAnimationMax * 0.5))
|
||||
{
|
||||
sparkYVel = -4f;
|
||||
sparkXVel = 4f;
|
||||
}
|
||||
if (player.itemAnimation == (int)(player.itemAnimationMax * 0.3))
|
||||
{
|
||||
sparkYVel = -2f;
|
||||
sparkYVel = -6f;
|
||||
sparkXVel = 6f;
|
||||
}
|
||||
if (player.itemAnimation == (int)(player.itemAnimationMax * 0.1))
|
||||
{
|
||||
sparkXVel = 7f;
|
||||
}
|
||||
if (player.itemAnimation == (int)(player.itemAnimationMax * 0.7))
|
||||
{
|
||||
sparkXSpawn = 26f;
|
||||
}
|
||||
if (player.itemAnimation == (int)(player.itemAnimationMax * 0.3))
|
||||
{
|
||||
sparkXSpawn -= 4f;
|
||||
sparkYSpawn -= 20f;
|
||||
sparkXVel = 9f;
|
||||
sparkYVel = -3f;
|
||||
sparkXSpawn = -4f;
|
||||
sparkYSpawn = -20f;
|
||||
}
|
||||
if (player.itemAnimation == (int)(player.itemAnimationMax * 0.1))
|
||||
{
|
||||
sparkYSpawn += 6f;
|
||||
sparkXVel = 10.5f;
|
||||
sparkYSpawn = 6f;
|
||||
}
|
||||
if (player.direction == -1)
|
||||
{
|
||||
if (player.itemAnimation == (int)(player.itemAnimationMax * 0.9))
|
||||
{
|
||||
sparkXSpawn -= 8f;
|
||||
}
|
||||
if (player.itemAnimation == (int)(player.itemAnimationMax * 0.7))
|
||||
{
|
||||
sparkXSpawn -= 6f;
|
||||
}
|
||||
}
|
||||
sparkYVel *= 1.5f;
|
||||
sparkXVel *= 1.5f;
|
||||
sparkXSpawn *= (float)player.direction;
|
||||
|
||||
sparkXVel *= player.direction;
|
||||
sparkYVel *= player.gravDir;
|
||||
sparkXSpawn *= player.direction;
|
||||
sparkYSpawn *= player.gravDir;
|
||||
var source = player.GetSource_ItemUse(Item);
|
||||
int damage = (int)player.GetTotalDamage<MeleeDamageClass>().ApplyTo(Item.damage * 0.1f);
|
||||
Projectile.NewProjectile(source, (float)(hitbox.X + hitbox.Width / 2) + sparkXSpawn, (float)(hitbox.Y + hitbox.Height / 2) + sparkYSpawn,
|
||||
(float)player.direction * sparkXVel, sparkYVel * player.gravDir, ModContent.ProjectileType<UltimusCleaverDust>(), damage, 0f, player.whoAmI, 0f, 0f);
|
||||
Projectile.NewProjectile(source, hitbox.X + hitbox.Width / 2 + sparkXSpawn, hitbox.Y + hitbox.Height / 2 + sparkYSpawn, sparkXVel, sparkYVel, ModContent.ProjectileType<UltimusCleaverDust>(), damage, 0f, player.whoAmI);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
|
||||
int bulletAmt = 4;
|
||||
for (int index = 0; index < bulletAmt; ++index)
|
||||
{
|
||||
@@ -87,10 +86,12 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
targetPosition.X = (targetPosition.X + player.Center.X) / 2f + Main.rand.Next(-200, 201);
|
||||
targetPosition.Y -= 100 * j;
|
||||
|
||||
Vector2 extraBulletVel = Vector2.Normalize(Main.npc[targets[j]].Center - targetPosition) * Item.shootSpeed;
|
||||
// Create a dummy projectile to grab the number of max updates the bullet has for predictive aim use
|
||||
Projectile dummy = new Projectile();
|
||||
dummy.SetDefaults(type);
|
||||
Vector2 extraBulletVel = CalamityUtils.CalculatePredictiveAimToTargetMaxUpdates(targetPosition, Main.npc[targets[j]], Item.shootSpeed, dummy.MaxUpdates);
|
||||
|
||||
int proj = Projectile.NewProjectile(source, targetPosition, extraBulletVel, type, extraBulletDamage, knockback, player.whoAmI);
|
||||
Main.projectile[proj].extraUpdates += 14;
|
||||
Main.projectile[proj].tileCollide = false;
|
||||
Main.projectile[proj].timeLeft /= 2;
|
||||
}
|
||||
@@ -107,10 +108,12 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
targetPosition.X = (targetPosition.X + player.Center.X) / 2f + Main.rand.Next(-200, 201);
|
||||
targetPosition.Y -= 100 * randomTarget;
|
||||
|
||||
Vector2 extraBulletVel = Vector2.Normalize(Main.npc[targets[randomTarget]].Center - targetPosition) * Item.shootSpeed;
|
||||
// Create a dummy projectile to grab the number of max updates the bullet has for predictive aim use
|
||||
Projectile dummy = new Projectile();
|
||||
dummy.SetDefaults(type);
|
||||
Vector2 extraBulletVel = CalamityUtils.CalculatePredictiveAimToTargetMaxUpdates(targetPosition, Main.npc[targets[randomTarget]], Item.shootSpeed, dummy.MaxUpdates);
|
||||
|
||||
int proj = Projectile.NewProjectile(source, targetPosition, extraBulletVel, type, extraBulletDamage, knockback, player.whoAmI);
|
||||
Main.projectile[proj].extraUpdates += 14;
|
||||
Main.projectile[proj].tileCollide = false;
|
||||
Main.projectile[proj].timeLeft /= 2;
|
||||
}
|
||||
|
||||
@@ -64,8 +64,8 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
Vector2 helixVel1 = (velocity * Main.rand.NextFloat(0.9f, 1.1f)).RotatedBy(MathHelper.ToRadians(sine));
|
||||
Vector2 helixVel2 = (velocity * Main.rand.NextFloat(0.9f, 1.1f)).RotatedBy(MathHelper.ToRadians(-sine));
|
||||
int shot1 = Projectile.NewProjectile(source, position.X, position.Y, helixVel1.X, helixVel1.Y, shotType, damage, knockback, player.whoAmI, 0f, 0, 1f);
|
||||
int shot2 = Projectile.NewProjectile(source, position.X, position.Y, helixVel2.X, helixVel2.Y, shotType, damage, knockback, player.whoAmI, 0f, 0, 1f);
|
||||
int shot1 = Projectile.NewProjectile(source, position.X, position.Y, helixVel1.X, helixVel1.Y, shotType, damage, knockback, player.whoAmI, 0f, 0, player.altFunctionUse != 2 ? 1 : 0);
|
||||
int shot2 = Projectile.NewProjectile(source, position.X, position.Y, helixVel2.X, helixVel2.Y, shotType, damage, knockback, player.whoAmI, 0f, 0, player.altFunctionUse != 2 ? 1 : 0);
|
||||
}
|
||||
else if (player.altFunctionUse != 2)
|
||||
{
|
||||
|
||||
@@ -65,9 +65,9 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Vector2 helixVel1 = (velocity * Main.rand.NextFloat(0.9f, 1.1f)).RotatedBy(MathHelper.ToRadians(sine));
|
||||
Vector2 helixVel2 = (velocity * Main.rand.NextFloat(0.9f, 1.1f)).RotatedBy(MathHelper.ToRadians(-sine));
|
||||
Vector2 helixVel3 = (velocity * Main.rand.NextFloat(0.9f, 1.1f)).RotatedBy(MathHelper.ToRadians(sine2));
|
||||
int shot1 = Projectile.NewProjectile(source, position.X, position.Y, helixVel1.X, helixVel1.Y, shotType, damage, knockback, player.whoAmI, 0f, 0, 2f);
|
||||
int shot2 = Projectile.NewProjectile(source, position.X, position.Y, helixVel2.X, helixVel2.Y, shotType, damage, knockback, player.whoAmI, 0f, 0, 4f);
|
||||
int shot3 = Projectile.NewProjectile(source, position.X, position.Y, helixVel3.X, helixVel3.Y, shotType, damage, knockback, player.whoAmI, 0f, 0, 3f);
|
||||
int shot1 = Projectile.NewProjectile(source, position.X, position.Y, helixVel1.X, helixVel1.Y, shotType, damage, knockback, player.whoAmI, 0f, 0, player.altFunctionUse != 2 ? 2f : 0);
|
||||
int shot2 = Projectile.NewProjectile(source, position.X, position.Y, helixVel2.X, helixVel2.Y, shotType, damage, knockback, player.whoAmI, 0f, 0, player.altFunctionUse != 2 ? 4f : 0);
|
||||
int shot3 = Projectile.NewProjectile(source, position.X, position.Y, helixVel3.X, helixVel3.Y, shotType, damage, knockback, player.whoAmI, 0f, 0, player.altFunctionUse != 2 ? 3f : 0);
|
||||
}
|
||||
else if (player.altFunctionUse != 2)
|
||||
{
|
||||
|
||||