Merge: Bane debuff logic
No files matched your search
@@ -12,7 +12,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 400,
|
||||
EnemyLostRegen = 350, //175 dps
|
||||
WaterDebuffScaling = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 240,
|
||||
EnemyLostRegen = 350, //175 dps
|
||||
SicknessDebuffScaling = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData(DebuffData.DebuffBehavior.Electric)
|
||||
{
|
||||
EnemyLostRegen = 100,
|
||||
EnemyLostRegen = 75, //150 dps when moving, 37.5 dps when stationary
|
||||
ElectricDebuffScaling = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Buffs.DamageOverTime
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 400,
|
||||
EnemyLostRegen = 500, //250 dps is extra strong for its tier due to being difficult to inflict
|
||||
ColdDebuffScaling = 1
|
||||
};
|
||||
public override void SetStaticDefaults()
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
using System;
|
||||
using CalamityMod.DataStructures;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using Terraria;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.StatBuffs
|
||||
{
|
||||
public class SmashedEvil : ModBuff
|
||||
{
|
||||
public static DebuffData debuffData = new DebuffData()
|
||||
{
|
||||
EnemyLostRegen = 40,
|
||||
SicknessDebuffScaling = 1,
|
||||
HeatDebuffScaling = 1,
|
||||
ColdDebuffScaling = 1,
|
||||
ElectricDebuffScaling = 1,
|
||||
WaterDebuffScaling = 1,
|
||||
NPCLifeRegenMethod = SmashedEvilNPCRegen
|
||||
|
||||
};
|
||||
|
||||
public static void SmashedEvilNPCRegen(NPC npc, int buffType, ref int buffIndex, ref int damage)
|
||||
{
|
||||
var cnpc = npc.Calamity();
|
||||
float totalDPS = debuffData.EnemyLostRegen;
|
||||
|
||||
var heat = cnpc.ActiveHeatDebuffMultiplier;
|
||||
var cold = cnpc.ActiveColdDebuffMultiplier;
|
||||
var sick = cnpc.ActiveSicknessDebuffMultiplier;
|
||||
var elec = cnpc.ActiveElectricDebuffMultiplier;
|
||||
var water = cnpc.ActiveWaterDebuffMultiplier;
|
||||
StatModifier totalScaling =
|
||||
DebuffData.ForceModifierPositiveWithScaling(cnpc.ActiveHeatDebuffMultiplier, debuffData.HeatDebuffScaling)
|
||||
.CombineWith(DebuffData.ForceModifierPositiveWithScaling(cnpc.ActiveColdDebuffMultiplier, debuffData.ColdDebuffScaling)
|
||||
.CombineWith(DebuffData.ForceModifierPositiveWithScaling(cnpc.ActiveSicknessDebuffMultiplier, debuffData.SicknessDebuffScaling)
|
||||
.CombineWith(DebuffData.ForceModifierPositiveWithScaling(cnpc.ActiveWaterDebuffMultiplier, debuffData.WaterDebuffScaling)
|
||||
.CombineWith(DebuffData.ForceModifierPositiveWithScaling(cnpc.ActiveElectricDebuffMultiplier, debuffData.ElectricDebuffScaling)
|
||||
))));
|
||||
totalDPS = totalScaling.ApplyTo(totalDPS);
|
||||
var totalDPSAdjusted = totalDPS - debuffData.EnemyVanillaRegenToCancelOut;
|
||||
npc.Calamity().ApplyDPSDebuff((int)(totalDPSAdjusted), (int)Math.Max(totalDPS * debuffData.MultiplierDamageTickSize, debuffData.MinimumDamageTickSize), ref npc.lifeRegen, ref damage);
|
||||
}
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Main.debuff[Type] = false;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
BuffDatasets.DebuffDataset[Type] = debuffData;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.lifeRegenTime += 2;
|
||||
player.GetDamage<GenericDamageClass>() += 0.1f;
|
||||
player.moveSpeed += 0.2f;
|
||||
}
|
||||
|
||||
public override void Update(NPC npc, ref int buffIndex)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 665 B |
|
Before Width: | Height: | Size: 750 B After Width: | Height: | Size: 819 B |
@@ -454,6 +454,9 @@ namespace CalamityMod.CalPlayer
|
||||
public int consecutiveCaughtFish = 0;
|
||||
public float WeakTimeFreezeUseTimer = 0;
|
||||
public bool WeakTimeFreezeInUse = false;
|
||||
|
||||
public int DemonAltarDialogueCounter = 0;
|
||||
public int DemonAltarDialogueCooldown = 0;
|
||||
#endregion
|
||||
|
||||
#region Sound
|
||||
@@ -722,8 +725,8 @@ namespace CalamityMod.CalPlayer
|
||||
public bool drawnAnyShieldThisFrame = false;
|
||||
|
||||
// TODO -- Some way to show the player their total shield points.
|
||||
public int TotalEnergyShielding => RoverDriveShieldDurability + LunicCorpsShieldDurability + pSoulShieldDurability + SpongeShieldDurability;
|
||||
public int TotalMaxShieldDurability => (roverDrive ? RoverDrive.ShieldDurabilityMax : 0) + (lunicCorpsSet ? LunicCorpsHelmet.ShieldDurabilityMax : 0) + (profanedCrystalBuffs ? ProfanedSoulCrystal.ShieldDurabilityMax : ((pSoulArtifact && !profanedCrystal) ? ProfanedSoulArtifact.ShieldDurabilityMax : 0)) + (sponge ? TheSponge.ShieldDurabilityMax : 0);
|
||||
public int TotalEnergyShielding => RoverDriveShieldDurability + LunicCorpsShieldDurability + pSoulShieldDurability + SpongeShieldDurability + (Starshield > 0 ? StratusStarburst : 0);
|
||||
public int TotalMaxShieldDurability => (roverDrive ? RoverDrive.ShieldDurabilityMax : 0) + (lunicCorpsSet ? LunicCorpsHelmet.ShieldDurabilityMax : 0) + (profanedCrystalBuffs ? ProfanedSoulCrystal.ShieldDurabilityMax : ((pSoulArtifact && !profanedCrystal) ? ProfanedSoulArtifact.ShieldDurabilityMax : 0)) + (sponge ? TheSponge.ShieldDurabilityMax : 0) + (Starshield > 0 ? 100 : 0);
|
||||
|
||||
public int RoverDriveShieldDurability = 0;
|
||||
public int LunicCorpsShieldDurability = 0;
|
||||
@@ -810,6 +813,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
#region Accessory
|
||||
public bool shieldOfTheHighRulerDashVelocityBoosted = false;
|
||||
public bool yharimsGift = false;
|
||||
public bool luxorsGift = false;
|
||||
public bool luxorHit = false;
|
||||
public bool luxorsGiftVanity = false;
|
||||
@@ -2353,6 +2357,7 @@ namespace CalamityMod.CalPlayer
|
||||
blazingCursorDamage = false;
|
||||
blazingCursorVisuals = false;
|
||||
|
||||
yharimsGift = false;
|
||||
luxorsGift = false;
|
||||
luxorsGiftVanity = false;
|
||||
fungalSymbiote = false;
|
||||
@@ -2645,6 +2650,9 @@ namespace CalamityMod.CalPlayer
|
||||
blunderBoosterVisibility = true;
|
||||
veneratedLocket = false;
|
||||
|
||||
if (DemonAltarDialogueCooldown > 0)
|
||||
DemonAltarDialogueCooldown--;
|
||||
|
||||
alcoholPoisoning = false;
|
||||
shadowflame = false;
|
||||
daybroken = false;
|
||||
@@ -4485,6 +4493,10 @@ namespace CalamityMod.CalPlayer
|
||||
if (HasCustomDash && UsedDash.IsOmnidirectional)
|
||||
Player.maxFallSpeed = 50f;
|
||||
|
||||
// If the player isn't moving yet is still dashing, disable the dash (prevents weird hook jank)
|
||||
if (Player.velocity == Vector2.Zero && Player.dashDelay == -1)
|
||||
Player.dashDelay = 0;
|
||||
|
||||
tailFrameUp++;
|
||||
if (tailFrameUp == 8)
|
||||
{
|
||||
|
||||
@@ -460,7 +460,23 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region OnHitNPC
|
||||
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
if (Player.Calamity().yharimsGift)
|
||||
target.AddBuff(ModContent.BuffType<AuricRebuke>(),120);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Modify Hit NPC
|
||||
public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
if (target.HasBuff<SmashedEvil>())
|
||||
{
|
||||
//This is essentially 10 AP, but independent of armor amount
|
||||
modifiers.FlatBonusDamage += 5;
|
||||
}
|
||||
}
|
||||
public override void ModifyHitNPCWithItem(Item item, NPC target, ref NPC.HitModifiers modifiers)
|
||||
{
|
||||
modifiers.CritDamage += critDamage;
|
||||
@@ -886,7 +902,7 @@ namespace CalamityMod.CalPlayer
|
||||
float cooldownDurationScalar = MathHelper.Clamp((actualProjDamage - dodgeDamageGateValue) / (float)maxCooldownDurationDamageValue, 0f, 1f);
|
||||
|
||||
// The Evolution
|
||||
if (evolution)
|
||||
if (evolution && !Player.HasBuff<SilvaRevival>())
|
||||
{
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
@@ -1925,10 +1941,6 @@ namespace CalamityMod.CalPlayer
|
||||
Rectangle location = new Rectangle((int)Player.position.X, (int)Player.position.Y - 16, Player.width, Player.height);
|
||||
CombatText.NewText(location, Color.LightBlue, Language.GetTextValue(shieldDamageText));
|
||||
|
||||
// Give the player iframes for taking a shield hit, regardless of whether or not the shields broke.
|
||||
int shieldHitIFrames = Player.ComputeHitIFrames(info);
|
||||
Player.GiveIFrames(info.CooldownCounter, shieldHitIFrames, true);
|
||||
|
||||
// Spawn particles when hit with the shields up, regardless of whether or not the shields broke.
|
||||
// More particles spawn if a shield broke.
|
||||
if (pSoulArtifact)
|
||||
@@ -1999,6 +2011,10 @@ namespace CalamityMod.CalPlayer
|
||||
// If the shields completely absorbed the hit, then delete the hit using reflection.
|
||||
if (shieldsFullyAbsorbedHit)
|
||||
{
|
||||
// Give the player iframes for taking a shield hit
|
||||
int shieldHitIFrames = Player.ComputeHitIFrames(info);
|
||||
Player.GiveIFrames(info.CooldownCounter, shieldHitIFrames, true);
|
||||
|
||||
freeDodgeFromShieldAbsorption = true;
|
||||
|
||||
// Cancel defense damage, if it was going to occur this frame.
|
||||
@@ -2404,7 +2420,7 @@ namespace CalamityMod.CalPlayer
|
||||
Player.AddBuff(BuffID.Honey, 300, false);
|
||||
|
||||
// Handle hit effects from the gem tech armor set.
|
||||
Player.Calamity().GemTechState.PlayerOnHitEffects((int)hurtInfo.Damage);
|
||||
Player.Calamity().GemTechState.PlayerOnHitEffects(hurtInfo);
|
||||
|
||||
if (Player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
@@ -2446,10 +2462,10 @@ namespace CalamityMod.CalPlayer
|
||||
if (dAmulet)
|
||||
{
|
||||
var source = Player.GetSource_Accessory_OnHurt(FindAccessory<DeificAmulet>(), hurtInfo.DamageSource);
|
||||
int projAmount = (rampartOfDeities ? 12 : 6);
|
||||
var projAmount = (rampartOfDeities ? 12 : 6) * (Player.strongBees ? 1.5f : 1f);
|
||||
for (int n = 0; n < projAmount; n++)
|
||||
{
|
||||
int deificProjDamage = (int)(Player.GetBestClassDamage().ApplyTo(DeificAmulet.StarDamage) * (Player.strongBees ? 0.85f : 1f));
|
||||
int deificProjDamage = (int)(Player.GetBestClassDamage().ApplyTo(DeificAmulet.StarDamage));
|
||||
|
||||
Projectile onHitProj = Main.projectile[Projectile.NewProjectile(source, Player.Center, new Vector2(0,-15 * (rampartOfDeities && n % 2 == 0 ? 0.75f: 1.25f)).RotatedBy(MathHelper.TwoPi/projAmount*n), ModContent.ProjectileType<AstralStar>(), deificProjDamage, 4f, Player.whoAmI)];
|
||||
if (onHitProj.whoAmI.WithinBounds(Main.maxProjectiles))
|
||||
@@ -2460,8 +2476,6 @@ namespace CalamityMod.CalPlayer
|
||||
onHitProj.tileCollide = false;
|
||||
onHitProj.extraUpdates = 1;
|
||||
onHitProj.Calamity().conditionalHomingRange = 600f;
|
||||
if (Player.strongBees)
|
||||
onHitProj.penetrate += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,6 +69,8 @@ using CalamityMod.Tiles.Abyss.AbyssAmbient;
|
||||
using CalamityMod.Tiles.FurnitureAuric;
|
||||
using CalamityMod.Tiles.Ores;
|
||||
using CalamityMod.UI;
|
||||
using CalamityMod.UI.DialogueDisplay;
|
||||
using CalamityMod.UI.DialogueDisplay.DisplayEffects;
|
||||
using CalamityMod.Utilities;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -205,15 +207,24 @@ namespace CalamityMod.CalPlayer
|
||||
if (Player.HeldItem.type != ModContent.ItemType<SaharaSlicers>())
|
||||
saharaSlicersBolts = 0;
|
||||
|
||||
if (Player.whoAmI == Main.myPlayer && Player.HeldItem.type == ModContent.ItemType<Starfleet>() && (Player.ownedProjectileCounts[ModContent.ProjectileType<StarfleetHoldout>()] == 0) && !Player.dead && !Main.mapFullscreen && !Player.mouseInterface)
|
||||
// Spawning for items that have holdouts active when held
|
||||
if (Player.whoAmI == Main.myPlayer && !Player.dead && !Main.mapFullscreen && !Player.mouseInterface)
|
||||
{
|
||||
int damage = (int)Player.GetTotalDamage<RangedDamageClass>().ApplyTo(Player.HeldItem.damage);
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Player.Center.DirectionTo(Player.Calamity().mouseWorld), ModContent.ProjectileType<StarfleetHoldout>(), damage, Player.HeldItem.knockBack, Player.whoAmI);
|
||||
}
|
||||
if (Player.whoAmI == Main.myPlayer && Player.HeldItem.type == ModContent.ItemType<Starmada>() && (Player.ownedProjectileCounts[ModContent.ProjectileType<StarmadaHoldout>()] == 0) && !Player.dead && !Main.mapFullscreen && !Player.mouseInterface)
|
||||
{
|
||||
int damage = (int)Player.GetTotalDamage<RangedDamageClass>().ApplyTo(Player.HeldItem.damage);
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Player.Center.DirectionTo(Player.Calamity().mouseWorld), ModContent.ProjectileType<StarmadaHoldout>(), damage, Player.HeldItem.knockBack, Player.whoAmI);
|
||||
if (Player.HeldItem.type == ModContent.ItemType<Starfleet>() && (Player.ownedProjectileCounts[ModContent.ProjectileType<StarfleetHoldout>()] == 0))
|
||||
{
|
||||
int damage = (int)Player.GetTotalDamage<RangedDamageClass>().ApplyTo(Player.HeldItem.damage);
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Player.Center.DirectionTo(Player.Calamity().mouseWorld), ModContent.ProjectileType<StarfleetHoldout>(), damage, Player.HeldItem.knockBack, Player.whoAmI);
|
||||
}
|
||||
if (Player.HeldItem.type == ModContent.ItemType<Starmada>() && (Player.ownedProjectileCounts[ModContent.ProjectileType<StarmadaHoldout>()] == 0))
|
||||
{
|
||||
int damage = (int)Player.GetTotalDamage<RangedDamageClass>().ApplyTo(Player.HeldItem.damage);
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Player.Center.DirectionTo(Player.Calamity().mouseWorld), ModContent.ProjectileType<StarmadaHoldout>(), damage, Player.HeldItem.knockBack, Player.whoAmI);
|
||||
}
|
||||
if (Player.HeldItem.type == ModContent.ItemType<Basher>() && (Player.ownedProjectileCounts[ModContent.ProjectileType<BasherHoldout>()] == 0))
|
||||
{
|
||||
int damage = (int)Player.GetTotalDamage<TrueMeleeDamageClass>().ApplyTo(Player.HeldItem.damage);
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Player.Center.DirectionTo(Player.Calamity().mouseWorld), ModContent.ProjectileType<BasherHoldout>(), damage, Player.HeldItem.knockBack, Player.whoAmI);
|
||||
}
|
||||
}
|
||||
|
||||
// De-equipping Gael's Greatsword deletes all rage.
|
||||
@@ -1130,8 +1141,39 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
private void DemonAltarTalking()
|
||||
{
|
||||
|
||||
for (var h = -15; h < 15; h++)
|
||||
{
|
||||
for (var j = -15; j < 15; j++)
|
||||
{
|
||||
var tilePos = Player.Center.ToTileCoordinates() + new Point(h, j);
|
||||
if (Main.tile[tilePos.X, tilePos.Y].TileType == TileID.DemonAltar)
|
||||
{
|
||||
string type = WorldGen.crimson ? "Mods.CalamityMod.EvilSmasher.CrimsonAltar" : "Mods.CalamityMod.EvilSmasher.DemonAltar";
|
||||
if (DialogueDisplaySystem.ContainsDialogueKey(type))
|
||||
DialogueDisplaySystem.RemoveDialogue(DialogueDisplaySystem.GetSlot(type));
|
||||
DialogueDisplaySystem.StartDialogueOnClient(type, new Vector2(tilePos.X * 16 + 16, tilePos.Y * 16), DemonAltarDialogueCounter, 180, false, new AltarText());
|
||||
DemonAltarDialogueCounter++;
|
||||
DemonAltarDialogueCooldown = 300;
|
||||
if (DemonAltarDialogueCounter >= 4)
|
||||
{
|
||||
DemonAltarDialogueCooldown = 3600;
|
||||
DemonAltarDialogueCounter = 0;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
private void MiscEffects()
|
||||
{
|
||||
if (Player.inventory.Any(x => x.type == ItemID.Pwnhammer) && !Player.inventory.Any(x => x.type == ModContent.ItemType<EvilSmasher>()) && Player.adjTile[TileID.DemonAltar] && DemonAltarDialogueCooldown <= 0 && Player.miscCounter % 30 == 0)
|
||||
{
|
||||
DemonAltarTalking();
|
||||
}
|
||||
|
||||
//Mana Burn update
|
||||
if (ManaBurnFireDrawer != null)
|
||||
{
|
||||
|
||||
@@ -695,14 +695,14 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (alchFlask && AlchFlaskCooldown == 0 && proj.type != ProjectileType<BasicPlagueBee>())
|
||||
{
|
||||
int seekerDamage = (int)Player.GetBestClassDamage().ApplyTo(10);
|
||||
int seekerDamage = (int)Player.GetBestClassDamage().ApplyTo(Player.strongBees ? 15 : 10);
|
||||
Vector2 seekerVelocity = new Vector2(5, 5).RotatedByRandom(100) * Main.rand.NextFloat(0.5f, 1.2f);
|
||||
|
||||
Projectile bee = Projectile.NewProjectileDirect(source, position, seekerVelocity, ProjectileType<BasicPlagueBee>(), seekerDamage, 0f, Player.whoAmI, -20, 30, 2);
|
||||
bee.ArmorPenetration = 20;
|
||||
bee.penetrate = 2;
|
||||
bee.extraUpdates = 1;
|
||||
AlchFlaskCooldown = Player.strongBees ? 6 : 7;
|
||||
AlchFlaskCooldown = 7;
|
||||
}
|
||||
|
||||
bool lifeAndShieldCondition = Player.statLife >= Player.statLifeMax2 && (!HasAnyEnergyShield || TotalEnergyShielding >= TotalMaxShieldDurability);
|
||||
@@ -1252,10 +1252,10 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (amalgam)
|
||||
{
|
||||
target.AddBuff(BuffID.Daybreak, 120);
|
||||
target.AddBuff(BuffType<Nightwither>(), 120);
|
||||
target.AddBuff(BuffType<BrimstoneFlames>(), 120);
|
||||
target.AddBuff(BuffID.Frostburn2, 120);
|
||||
target.AddBuff(BuffType<Plague>(), 120);
|
||||
target.AddBuff(BuffType<VermillionFlux>(), 120);
|
||||
target.AddBuff(BuffID.Electrified, 120);
|
||||
target.AddBuff(BuffType<CrushDepth>(), 120);
|
||||
}
|
||||
if (frostFlare)
|
||||
|
||||
@@ -6,7 +6,6 @@ using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
// TODO -- This can be made into a ModSystem with simple OnModLoad and Unload hooks.
|
||||
public sealed class CooldownRegistry : ModSystem
|
||||
{
|
||||
// Indexed by ushort netID. Contains every registered cooldown.
|
||||
|
||||
@@ -421,7 +421,7 @@ namespace CalamityMod.DataStructures
|
||||
};
|
||||
public static DebuffData Electrified = new DebuffData(DebuffBehavior.Electric)
|
||||
{
|
||||
EnemyLostRegen = 21,
|
||||
EnemyLostRegen = 30, // 15 dps stationary, 60 dps moving
|
||||
EnemyVanillaRegenToCancelOut = 8,
|
||||
ElectricDebuffScaling = 1
|
||||
};
|
||||
|
||||
@@ -202,7 +202,7 @@ namespace CalamityMod.DataStructures
|
||||
PreviouslyUsedGem = usedGemType;
|
||||
}
|
||||
|
||||
public void PlayerOnHitEffects(int hitDamage)
|
||||
public void PlayerOnHitEffects(Player.HurtInfo hurtInfo)
|
||||
{
|
||||
// Don't do anything if the player is not wearing the Gem Tech set.
|
||||
var cgp = Owner.Calamity();
|
||||
@@ -211,6 +211,7 @@ namespace CalamityMod.DataStructures
|
||||
|
||||
bool gemWasLost = false;
|
||||
int gemDamage = 0;
|
||||
int hitDamage = (int)hurtInfo.Damage;
|
||||
bool largeEnoughRegularHit = hitDamage >= GemTechHeadgear.GemBreakDamageLowerBound;
|
||||
// 09FEB2024: Ozzatron: chalice of the blood god no longer protects you when using gem tech armor.
|
||||
// It is now slightly anti-synergetic, in that taking tiny hits when you're already bleeding will make you keep losing gems.
|
||||
@@ -275,7 +276,7 @@ namespace CalamityMod.DataStructures
|
||||
gemDamage = CalamityUtils.DamageSoftCap(gemDamage, GemTechHeadgear.GemDamageSoftcapThreshold);
|
||||
|
||||
if (Main.myPlayer == OwnerIndex)
|
||||
Projectile.NewProjectile(Owner.GetSource_ItemUse(Owner.HeldItem), gemPosition, Vector2.Zero, ModContent.ProjectileType<GemTechArmorGem>(), gemDamage, 0f, OwnerIndex, 0f, (int)GemThatShouldBeLost);
|
||||
Projectile.NewProjectile(Owner.GetSource_OnHurt(hurtInfo.DamageSource), gemPosition, Vector2.Zero, ModContent.ProjectileType<GemTechArmorGem>(), gemDamage, 0f, OwnerIndex, 0f, (int)GemThatShouldBeLost);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"Revision": 1,
|
||||
"DefaultColor": "FF0000",
|
||||
"DefaultSpeaker": "DemonAltar",
|
||||
"AlignType": 1,
|
||||
"TextDelay": 2,
|
||||
"BasePunctuationDelay": {
|
||||
"Delay": 10,
|
||||
"ForceSet": false,
|
||||
"Locks": false
|
||||
},
|
||||
"PunctuationDelayCap": 30,
|
||||
"PunctuationDelays": {
|
||||
"!": {
|
||||
"Delay": 20,
|
||||
"ForceSet": true,
|
||||
"Locks": true
|
||||
},
|
||||
"?": {
|
||||
"Delay": 20,
|
||||
"ForceSet": true,
|
||||
"Locks": true
|
||||
}
|
||||
},
|
||||
"Pages": [
|
||||
{
|
||||
"Lines": [
|
||||
"You, slayer of the flesh tower...[Pause(0.25)] we have an offer fitting of your deeds."
|
||||
]
|
||||
},
|
||||
{
|
||||
"Lines": [
|
||||
"We can bestow you might untold...[Pause(0.25)] [Shaking:to grind your enemies to dust!]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Lines": [
|
||||
"Simply yield the holy hammer unto the altar."
|
||||
]
|
||||
},
|
||||
{
|
||||
"Lines": [
|
||||
"Kneel, and we shall render you the strength."
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"Revision": 1,
|
||||
"DefaultColor": "FF00FF",
|
||||
"DefaultSpeaker": "DemonAltar",
|
||||
"AlignType": 1,
|
||||
"TextDelay": 2,
|
||||
"BasePunctuationDelay": {
|
||||
"Delay": 10,
|
||||
"ForceSet": false,
|
||||
"Locks": false
|
||||
},
|
||||
"PunctuationDelayCap": 30,
|
||||
"PunctuationDelays": {
|
||||
"!": {
|
||||
"Delay": 20,
|
||||
"ForceSet": true,
|
||||
"Locks": true
|
||||
},
|
||||
"?": {
|
||||
"Delay": 20,
|
||||
"ForceSet": true,
|
||||
"Locks": true
|
||||
}
|
||||
},
|
||||
"Pages": [
|
||||
{
|
||||
"Lines": [
|
||||
"Bearer of the Holy Hammer...[Pause(0.25)] [Wavy:desirest thou to taste true power?]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Lines": [
|
||||
"Thine eyes shall be opened...[Pause(0.25)] [Shaking:thou shalt be even as the gods!]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Lines": [
|
||||
"Yield the hammer unto us upon the altar."
|
||||
]
|
||||
},
|
||||
{
|
||||
"Lines": [
|
||||
"Surrender, and thou shalt surely receive our might."
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 834 B |
|
Before Width: | Height: | Size: 647 B After Width: | Height: | Size: 407 B |
@@ -10,7 +10,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public class ChaosStone : ModItem, ILocalizedModType
|
||||
{
|
||||
public static float LostRegenPer100Mana => 8;
|
||||
public static float DamageMultPer100Mana => 0.04f;
|
||||
public static float DamageMultPer100Mana => 0.05f;
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips)
|
||||
{
|
||||
|
||||
@@ -14,8 +14,8 @@ namespace CalamityMod.Items.Accessories
|
||||
public static int PauldronSlamDamage = 330;
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 54;
|
||||
Item.height = 56;
|
||||
Item.width = 42;
|
||||
Item.height = 34;
|
||||
Item.value = CalamityGlobalItem.RarityLightRedBuyPrice;
|
||||
Item.rare = ItemRarityID.LightRed;
|
||||
Item.accessory = true;
|
||||
|
||||
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.1 KiB |
@@ -39,11 +39,11 @@ namespace CalamityMod.Items.Accessories
|
||||
modPlayer.rBrain = true; // Handles shaderain cloud spawning on hit
|
||||
modPlayer.amalgam = true;
|
||||
player.brainOfConfusionItem = Item;
|
||||
modPlayer.HeatDebuffMultiplier += 2f;
|
||||
modPlayer.ColdDebuffMultiplier += 2f;
|
||||
modPlayer.SicknessDebuffMultiplier += 2f;
|
||||
modPlayer.WaterDebuffMultiplier += 2f;
|
||||
modPlayer.ElectricDebuffMultiplier += 2f;
|
||||
modPlayer.HeatDebuffMultiplier += 3f;
|
||||
modPlayer.ColdDebuffMultiplier += 3f;
|
||||
modPlayer.SicknessDebuffMultiplier += 3f;
|
||||
modPlayer.WaterDebuffMultiplier += 3f;
|
||||
modPlayer.ElectricDebuffMultiplier += 3f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -9,13 +9,14 @@ namespace CalamityMod.Items.Accessories
|
||||
public class YharimsGift : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public int dragonTimer = 60;
|
||||
|
||||
public static int MeteorDamage => CalamityUtils.ScaleWithDifficulty(250);
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 20;
|
||||
Item.height = 22;
|
||||
Item.defense = 12;
|
||||
Item.defense = 10;
|
||||
Item.accessory = true;
|
||||
Item.value = CalamityGlobalItem.RarityVioletBuyPrice;
|
||||
Item.rare = ModContent.RarityType<BurnishedAuric>();
|
||||
@@ -24,38 +25,20 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
player.Calamity().yharimsGift = true;
|
||||
var source = player.GetSource_Accessory(Item);
|
||||
player.moveSpeed += 0.15f;
|
||||
player.GetDamage<GenericDamageClass>() += 0.15f;
|
||||
player.moveSpeed += 0.2f;
|
||||
player.GetDamage<GenericDamageClass>() += 0.1f;
|
||||
player.noKnockback = true;
|
||||
if (!player.StandingStill())
|
||||
{
|
||||
dragonTimer--;
|
||||
if (dragonTimer <= 0)
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
int damage = (int)player.GetBestClassDamage().ApplyTo(175);
|
||||
|
||||
int projectile1 = Projectile.NewProjectile(source, player.Center, Vector2.Zero, ModContent.ProjectileType<DragonDust>(), damage, 5f, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[projectile1].timeLeft = 60;
|
||||
}
|
||||
dragonTimer = 60;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dragonTimer = 60;
|
||||
}
|
||||
if (player.immune)
|
||||
if (player.HasIFrames())
|
||||
{
|
||||
if (player.miscCounter % 8 == 0)
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
int damage = (int)player.GetBestClassDamage().ApplyTo(375);
|
||||
int damage = (int)player.GetBestClassDamage().ApplyTo(MeteorDamage);
|
||||
|
||||
CalamityUtils.ProjectileRain(source, player.Center, 400f, 100f, 500f, 800f, 22f, ModContent.ProjectileType<SkyFlareFriendly>(), damage, 9f, player.whoAmI);
|
||||
CalamityUtils.ProjectileRain(source, player.Center, 400f, 400f, 500f, 800f, 22f, ModContent.ProjectileType<SkyFlareFriendly>(), damage, 9f, player.whoAmI).Calamity().conditionalHomingRange = 160;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace CalamityMod.Items.Armor.Plaguebringer
|
||||
public new string LocalizationCategory => "Items.Armor.Hardmode";
|
||||
|
||||
public static int MinionSlotBoost = 1;
|
||||
public static float SummonDamageBoost = 0.15f;
|
||||
public static float SummonDamageBoost = 0.20f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MinionSlotBoost, SummonDamageBoost.ToPercent());
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Armor.Plaguebringer
|
||||
public new string LocalizationCategory => "Items.Armor.Hardmode";
|
||||
|
||||
public static int MinionSlotBoost = 1;
|
||||
public static float SummonDamageBoost = 0.15f;
|
||||
public static float SummonDamageBoost = 0.20f;
|
||||
public static float MoveSpeedBoost = 0.15f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MinionSlotBoost, SummonDamageBoost.ToPercent(), MoveSpeedBoost.ToPercent());
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace CalamityMod.Items.Armor.Plaguebringer
|
||||
public new string LocalizationCategory => "Items.Armor.Hardmode";
|
||||
|
||||
public static int MinionSlotBoost = 1;
|
||||
public static float SummonDamageBoost = 0.15f;
|
||||
public static float SummonDamageBoost = 0.20f;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MinionSlotBoost, SummonDamageBoost.ToPercent());
|
||||
|
||||
// Set Bonus
|
||||
|
||||
@@ -950,6 +950,7 @@ namespace CalamityMod.Items
|
||||
|
||||
public override void ModifyItemScale(Item item, Player player, ref float scale)
|
||||
{
|
||||
// Xyk 3MARCH2026: Doesn't work on any non use style 1 items currently, Doze will fix it
|
||||
if (item.CountsAsClass<MeleeDamageClass>() && player.HasBuff(BuffID.Tipsy))
|
||||
scale += 0.15f;
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@ namespace CalamityMod.Items
|
||||
{ ItemID.RedRyder, Do(DamageExact(24)) },
|
||||
{ ItemID.RedsYoyo, Do(DamageExact(48)) }, // Red's Throw and Valkyrie Yoyo have the same stats
|
||||
{ ItemID.RocketLauncher, Do(DamageExact(60), ShootSpeedExact(9)) },
|
||||
{ ItemID.Sandgun, Do(DamageExact(22), UseExact(20)) },
|
||||
{ ItemID.Sandgun, Do(UseExact(20)) },
|
||||
{ ItemID.SapphireStaff, Do(DamageExact(25)) },
|
||||
{ ItemID.ScourgeoftheCorruptor, Do(DamageExact(63)) },
|
||||
{ ItemID.Seedler, Do(UseMeleeSpeed, DamageExact(45), ShootSpeedExact(16)) },
|
||||
|
||||
|
Before Width: | Height: | Size: 863 B After Width: | Height: | Size: 591 B |
@@ -32,7 +32,7 @@ namespace CalamityMod.Items.LabFinders
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<LabSeekingMechanism>().
|
||||
AddIngredient(ItemID.IceBlock, 50).
|
||||
AddRecipeGroup("AnyIceBlock", 50).
|
||||
AddTile(TileID.Anvils).
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Placeables.Astral
|
||||
Item.ResearchUnlockCount = 100;
|
||||
ItemTrader.ChlorophyteExtractinator.AddOption_OneWay(Type, 1, ItemID.SandBlock, 1);
|
||||
|
||||
ItemID.Sets.SandgunAmmoProjectileData[Type] = new(ModContent.ProjectileType<AstralSandBallGun>(), 0);
|
||||
ItemID.Sets.SandgunAmmoProjectileData[Type] = new(ModContent.ProjectileType<AstralSandBallGun>(), 5);
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Potions.Alcohol
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Potions";
|
||||
|
||||
public static float CritLoss = 75;
|
||||
public static float CritLoss = 50;
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(CritLoss);
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace CalamityMod.Items.SummonItems
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient(ItemID.SandBlock, 40).
|
||||
AddRecipeGroup("Sand", 40).
|
||||
AddIngredient(ItemID.AntlionMandible, 4).
|
||||
AddIngredient<StormlionMandible>(2).
|
||||
AddTile(TileID.DemonAltar).
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace CalamityMod.Items.Tools
|
||||
Item.width = 60;
|
||||
Item.height = 70;
|
||||
Item.damage = 80;
|
||||
Item.crit = 25;
|
||||
Item.knockBack = 5f;
|
||||
Item.useTime = 5;
|
||||
Item.useAnimation = 20;
|
||||
@@ -32,9 +33,6 @@ namespace CalamityMod.Items.Tools
|
||||
Item.autoReuse = true;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 25;
|
||||
|
||||
public override void MeleeEffects(Player player, Rectangle hitbox)
|
||||
{
|
||||
Dust d = CalamityUtils.MeleeDustHelper(player, Main.rand.NextBool() ? ModContent.DustType<AstralOrange>() : ModContent.DustType<AstralBlue>(), 0.48f, 50, 78, -0.1f, 0.1f);
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace CalamityMod.Items.Tools
|
||||
Item.width = 50;
|
||||
Item.height = 60;
|
||||
Item.damage = 65;
|
||||
Item.crit = 25;
|
||||
Item.knockBack = 5f;
|
||||
Item.useTime = 6;
|
||||
Item.useAnimation = 10;
|
||||
@@ -31,9 +32,6 @@ namespace CalamityMod.Items.Tools
|
||||
Item.autoReuse = true;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 25;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace CalamityMod.Items.Tools.ClimateChange
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient(ItemID.SandBlock, 50).
|
||||
AddRecipeGroup("Sand", 50).
|
||||
AddRecipeGroup("AnyAdamantiteBar", 10).
|
||||
AddIngredient(ItemID.AncientCloth, 5).
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
|
||||
@@ -31,6 +31,7 @@ namespace CalamityMod.Items.Tools
|
||||
Item.width = 70;
|
||||
Item.height = 70;
|
||||
Item.damage = 400;
|
||||
Item.crit = 25;
|
||||
Item.knockBack = 9f;
|
||||
Item.useTime = 1;
|
||||
Item.useAnimation = 10;
|
||||
@@ -56,9 +57,6 @@ namespace CalamityMod.Items.Tools
|
||||
return new Vector2(10, 10);
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 25;
|
||||
|
||||
public override bool AltFunctionUse(Player player) => true;
|
||||
|
||||
public override void HoldItem(Player player)
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace CalamityMod.Items.Tools
|
||||
Item.width = 80;
|
||||
Item.height = 66;
|
||||
Item.damage = 110;
|
||||
Item.crit = 10;
|
||||
Item.knockBack = 7f;
|
||||
Item.useTime = 8;
|
||||
Item.useAnimation = 12;
|
||||
@@ -30,9 +31,6 @@ namespace CalamityMod.Items.Tools
|
||||
Item.autoReuse = true;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 10;
|
||||
|
||||
public override void UseItemHitbox(Player player, ref Rectangle hitbox, ref bool noHitbox)
|
||||
{
|
||||
hitbox = CalamityUtils.FixSwingHitbox(54, 54);
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
Item.height = 30;
|
||||
Item.damage = 63;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.crit = 12;
|
||||
Item.mana = 20;
|
||||
Item.useTime = 8;
|
||||
Item.useAnimation = 20;
|
||||
@@ -37,9 +38,6 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void HoldItem(Player player) => player.Calamity().mouseRotationListener = true;
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 12;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Projectile.NewProjectileDirect(source, position, velocity.RotatedByRandom(0.7f), ModContent.ProjectileType<CosmicTentacle>(), damage, knockback, player.whoAmI);
|
||||
|
||||
@@ -22,6 +22,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
Item.height = 72;
|
||||
Item.damage = 245;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.crit = 15;
|
||||
Item.mana = 26;
|
||||
Item.useTime = 18;
|
||||
Item.useAnimation = 18;
|
||||
@@ -36,9 +37,6 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
Item.shootSpeed = 15f;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 15;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Vector2 spawnPos = new Vector2(player.MountedCenter.X + Main.rand.Next(-200, 201), player.MountedCenter.Y - 600f);
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
Item.height = 30;
|
||||
Item.damage = 32;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.crit = 5;
|
||||
Item.mana = 7;
|
||||
Item.useTime = 7;
|
||||
Item.useAnimation = 21;
|
||||
@@ -31,9 +32,6 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
Item.shootSpeed = 12f;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 5;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Vector2 spreadVelocity = velocity.RotatedByRandom(MathHelper.ToRadians(18f)) * Main.rand.NextFloat(0.8f, 1.2f);
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
Item.width = 80;
|
||||
Item.height = 84;
|
||||
Item.damage = 4300;
|
||||
Item.damage = 4100;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.mana = 50;
|
||||
Item.useTime = Item.useAnimation = 50;
|
||||
|
||||
@@ -22,6 +22,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
Item.height = 16;
|
||||
Item.damage = 50;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.crit = 25;
|
||||
Item.mana = 15;
|
||||
Item.useTime = 2;
|
||||
Item.useAnimation = 30;
|
||||
@@ -38,10 +39,6 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
Item.shootSpeed = 28f;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 25;
|
||||
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Vector2 realPlayerPos = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
Item.width = 38;
|
||||
Item.height = 54;
|
||||
Item.damage = 60;
|
||||
Item.crit = 20;
|
||||
Item.mana = 17;
|
||||
Item.noMelee = true;
|
||||
Item.useAnimation = 22;
|
||||
@@ -32,9 +33,6 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 20;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
for (int i = 0; i < 6; i++)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
@@ -92,6 +92,23 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
return soul;
|
||||
}
|
||||
|
||||
public override bool CanRightClick()
|
||||
{
|
||||
if (!Main.keyState.PressingShift())
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void RightClick(Player player)
|
||||
{
|
||||
if (storedSoulpower > 0)
|
||||
{
|
||||
storedSoulpower = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool ConsumeItem(Player player) => false;
|
||||
|
||||
public Color FindColorForSoul()
|
||||
{
|
||||
Color returnColor = new(0, 0, 0);
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
Item.height = 40;
|
||||
Item.damage = 60;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.crit = 25;
|
||||
Item.mana = 15;
|
||||
Item.rare = ItemRarityID.Cyan;
|
||||
Item.useTime = 14;
|
||||
@@ -34,9 +35,6 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
Item.shootSpeed = ShootSpeed;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 25;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Vector2 mouse = player.ClampedMouseWorld();
|
||||
|
||||
@@ -33,9 +33,10 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
Item.width = 40;
|
||||
Item.height = 42;
|
||||
Item.damage = 515;
|
||||
Item.knockBack = 4f;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.crit = 20;
|
||||
Item.mana = 6;
|
||||
Item.knockBack = 4f;
|
||||
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.useTime = 2;
|
||||
@@ -54,9 +55,6 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
Item.Calamity().devItem = true;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 20;
|
||||
|
||||
public override Vector2? HoldoutOffset() => Vector2.Zero;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
Item.width = Item.height = 70;
|
||||
Item.damage = 120;
|
||||
Item.crit = 30;
|
||||
Item.knockBack = 5f;
|
||||
Item.useTime = 3;
|
||||
Item.reuseDelay = Item.useAnimation = 15;
|
||||
@@ -37,9 +38,6 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
Item.rare = ItemRarityID.Purple;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 30;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo projSource, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
Vector2 playerPos = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
|
||||
@@ -30,6 +30,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
Item.damage = 115;
|
||||
Item.knockBack = 8.5f;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.crit = 11;
|
||||
Item.mana = 17;
|
||||
Item.useTime = ChargeFrames + CooldownFrames;
|
||||
Item.useAnimation = ChargeFrames + CooldownFrames;
|
||||
@@ -45,8 +46,6 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
Item.autoReuse = true;
|
||||
}
|
||||
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 11;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient(ItemID.IceBlock, 30).
|
||||
AddRecipeGroup("AnyIceBlock", 30).
|
||||
AddIngredient(ItemID.Feather, 3).
|
||||
AddIngredient(ItemID.FallenStar, 5).
|
||||
AddIngredient(ItemID.Cloud, 10).
|
||||
|
||||
@@ -78,6 +78,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.width = Item.height = 136;
|
||||
Item.damage = 1800;
|
||||
Item.DamageType = DamageClass.MeleeNoSpeed;
|
||||
Item.crit = 15;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.useAnimation = 15;
|
||||
@@ -93,9 +94,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.rare = RarityType<BurnishedAuric>();
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 15;
|
||||
|
||||
public override bool AltFunctionUse(Player player) => true;
|
||||
|
||||
public override void HoldItem(Player player)
|
||||
|
||||
@@ -56,6 +56,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.height = 172;
|
||||
Item.damage = 507;
|
||||
Item.DamageType = DamageClass.MeleeNoSpeed;
|
||||
Item.crit = 10;
|
||||
Item.noUseGraphic = true;
|
||||
Item.noMelee = true;
|
||||
Item.useAnimation = 20;
|
||||
@@ -71,9 +72,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.shootSpeed = 16f;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 10;
|
||||
|
||||
public override bool AltFunctionUse(Player player) => true;
|
||||
|
||||
public override void HoldItem(Player player)
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.height = 50;
|
||||
Item.damage = 90;
|
||||
Item.DamageType = TrueMeleeDamageClass.Instance;
|
||||
Item.crit = 25;
|
||||
Item.noMelee = true;
|
||||
Item.useTurn = true;
|
||||
Item.noUseGraphic = true;
|
||||
@@ -35,9 +36,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.shootSpeed = 13f;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 25;
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.FurnitureAcidwood;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -14,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
Item.width = 56;
|
||||
Item.height = 60;
|
||||
Item.damage = 40;
|
||||
Item.damage = 85;
|
||||
Item.DamageType = TrueMeleeDamageClass.Instance;
|
||||
Item.useAnimation = Item.useTime = 30;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
@@ -30,6 +31,13 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
}
|
||||
public override bool MeleePrefix() => true;
|
||||
public override bool CanUseItem(Player player) => false;
|
||||
public override void HoldItem(Player player)
|
||||
{
|
||||
if (Main.myPlayer == player.whoAmI)
|
||||
player.Calamity().rightClickListener = true;
|
||||
player.Calamity().mouseWorldListener = true;
|
||||
}
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
|
||||
@@ -327,7 +327,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
AddIngredient(ItemType<AerialiteBar>(), 10).
|
||||
AddIngredient(ItemID.HellstoneBar, 10).
|
||||
AddIngredient(ItemID.DirtBlock, 50).
|
||||
AddIngredient(ItemID.StoneBlock, 50).
|
||||
AddRecipeGroup("AnyStoneBlock", 50).
|
||||
AddTile(TileID.Anvils).
|
||||
Register();
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.height = 66;
|
||||
Item.damage = 420;
|
||||
Item.DamageType = DamageClass.MeleeNoSpeed;
|
||||
Item.crit = 10;
|
||||
Item.useAnimation = 25;
|
||||
Item.useTime = 5;
|
||||
Item.noMelee = true;
|
||||
@@ -35,8 +36,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.shootSpeed = 24f;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 10;
|
||||
// You can't use the sword if you've thrown it, silly
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[ModContent.ProjectileType<DevilsSunriseCyclone>()] <= 0;
|
||||
public override void HoldItem(Player player)
|
||||
|
||||
@@ -1,38 +1,203 @@
|
||||
using Terraria;
|
||||
using System;
|
||||
using CalamityMod.Projectiles.BaseProjectiles;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using CalamityMod.Utilities.Daybreak;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
public class EvilSmasher : ModItem, ILocalizedModType
|
||||
public class EvilSmasher : BaseSwordHoldoutItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.Melee";
|
||||
public override int ProjectileType => ModContent.ProjectileType<EvilSmasherProjectile>();
|
||||
|
||||
public bool IsAnimating = false;
|
||||
public int AnimationTime = 0;
|
||||
public override void SetDefaults()
|
||||
{
|
||||
base.SetDefaults();
|
||||
Item.width = 64;
|
||||
Item.height = 66;
|
||||
Item.damage = 120;
|
||||
Item.DamageType = DamageClass.Melee;
|
||||
Item.useAnimation = Item.useTime = 38;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.useTurn = true;
|
||||
Item.damage = 200;
|
||||
Item.DamageType = AverageDamageClass.Instance;
|
||||
Item.useAnimation = Item.useTime = 120;
|
||||
Item.channel = true;
|
||||
Item.knockBack = 6f;
|
||||
Item.UseSound = SoundID.Item1;
|
||||
Item.autoReuse = true;
|
||||
Item.value = CalamityGlobalItem.RarityLightRedBuyPrice;
|
||||
Item.rare = ItemRarityID.LightRed;
|
||||
}
|
||||
|
||||
public override float UseSpeedMultiplier(Player player) => 1f + (player.Calamity().evilSmasherBoost * 0.1f);
|
||||
|
||||
public override void ModifyWeaponDamage(Player player, ref StatModifier damage) => damage *= 1f + player.Calamity().evilSmasherBoost * 0.1f;
|
||||
|
||||
public override void ModifyWeaponKnockback(Player player, ref StatModifier knockback) => knockback *= 1f + (player.Calamity().evilSmasherBoost * 0.1f);
|
||||
|
||||
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
|
||||
public override void UpdateInventory(Player player)
|
||||
{
|
||||
if (target.life <= 0 && player.Calamity().evilSmasherBoost < 10)
|
||||
player.Calamity().evilSmasherBoost += 1;
|
||||
AnimationTime = 300;
|
||||
base.UpdateInventory(player);
|
||||
}
|
||||
|
||||
public override void Update(ref float gravity, ref float maxFallSpeed)
|
||||
{
|
||||
if (!IsAnimating)
|
||||
{
|
||||
if (AnimationTime < 300)
|
||||
AnimationTime++;
|
||||
return;
|
||||
}
|
||||
float completion = AnimationTime / 240f;
|
||||
Item.noGrabDelay = 120;
|
||||
Item.velocity = new Vector2(0, -1f);
|
||||
int dotAmount = 0;
|
||||
for (var i = 0; i < dotAmount; i++)
|
||||
{
|
||||
var ringDir = getRingOffset(i / (float)dotAmount * -MathHelper.TwoPi + MathHelper.TwoPi * completion * 3, ySquish: 3f);
|
||||
Dust.NewDustPerfect(Item.Center + (ringDir * (completion - MathF.Pow(completion, 2)) * 256), i % 2 == 0 ? DustID.Crimson : DustID.Corruption, ringDir);
|
||||
}
|
||||
if (Main.rand.NextFloat() < completion)
|
||||
Dust.NewDustPerfect(Item.Center, Main.rand.NextBool() ? DustID.CursedTorch : DustID.IchorTorch,Vector2.UnitX.RotatedByRandom(MathHelper.TwoPi) * 5);
|
||||
if (completion >= 1)
|
||||
{
|
||||
for (var i = 0; i < 50; i++)
|
||||
{
|
||||
Dust.NewDustPerfect(Item.Center, Main.rand.NextBool() ? DustID.CursedTorch : DustID.IchorTorch, Vector2.UnitX.RotatedByRandom(MathHelper.TwoPi) * 5);
|
||||
Dust.NewDustPerfect(Item.Center, Main.rand.NextBool() ? DustID.Crimson : DustID.Corruption, Vector2.UnitX.RotatedByRandom(MathHelper.TwoPi) * 5);
|
||||
}
|
||||
IsAnimating = false;
|
||||
Item.velocity = new Vector2(0, -5);
|
||||
}
|
||||
AnimationTime++;
|
||||
}
|
||||
|
||||
#region Textures
|
||||
private static Asset<Texture2D> GlowTex = null;
|
||||
private static Texture2D GetGlowTex()
|
||||
{
|
||||
if (GlowTex == null)
|
||||
{
|
||||
GlowTex = ModContent.Request<Texture2D>("CalamityMod/Particles/BloomCircle");
|
||||
}
|
||||
return GlowTex.Value;
|
||||
}
|
||||
|
||||
private static Asset<Texture2D> GlowBeamTex = null;
|
||||
private static Texture2D GetGlowBeamTex()
|
||||
{
|
||||
if (GlowBeamTex == null)
|
||||
{
|
||||
GlowBeamTex = ModContent.Request<Texture2D>("CalamityMod/Particles/BloomLineFade");
|
||||
}
|
||||
return GlowBeamTex.Value;
|
||||
}
|
||||
private static Asset<Texture2D> GlowBeamCapTex = null;
|
||||
private static Texture2D GetGlowBeamCapTex()
|
||||
{
|
||||
if (GlowBeamCapTex == null)
|
||||
{
|
||||
GlowBeamCapTex = ModContent.Request<Texture2D>("CalamityMod/Particles/BloomLineCap");
|
||||
}
|
||||
return GlowBeamCapTex.Value;
|
||||
}
|
||||
#endregion
|
||||
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
|
||||
{
|
||||
if (IsAnimating)
|
||||
{
|
||||
var color = Color.Lerp(Color.Purple, Color.Red, MathF.Sin(Main.GlobalTimeWrappedHourly * 6) * 0.5f + 0.5f);
|
||||
|
||||
using (Main.spriteBatch.Scope())
|
||||
{
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Immediate,
|
||||
BlendState.Additive,
|
||||
SamplerState.PointClamp,
|
||||
DepthStencilState.None,
|
||||
Main.Rasterizer,
|
||||
null,
|
||||
Main.GameViewMatrix.TransformationMatrix
|
||||
);
|
||||
|
||||
Main.spriteBatch.Draw(GetGlowTex(), Item.Center - Main.screenPosition, null, color, 0, GetGlowTex().Size() * 0.5f, 0.1f + 0.7f * (AnimationTime / 240f), SpriteEffects.None, 0);
|
||||
int rep = 0;
|
||||
for (float i = 0; i <= MathHelper.TwoPi; i += MathHelper.TwoPi * 0.166f)
|
||||
{
|
||||
Main.spriteBatch.Draw(GetGlowBeamTex(), Item.Center - Main.screenPosition, null, color, MathHelper.WrapAngle(Main.GlobalTimeWrappedHourly) + i, new(GetGlowBeamTex().Size().X * 0.5f, 0), 0f + 0.06f * (AnimationTime / 240f) * (rep == 0 ? 1 : 0.75f), SpriteEffects.None, 0);
|
||||
rep = (rep + 1) % 2;
|
||||
}
|
||||
|
||||
Main.spriteBatch.End();
|
||||
}
|
||||
|
||||
var tex = TextureAssets.Item[ItemID.Pwnhammer].Value;
|
||||
Main.spriteBatch.Draw(tex, Item.Center - Main.screenPosition, null, Color.Lerp(lightColor, Color.Black, AnimationTime / 240f), 0, tex.Size() * 0.5f, MathHelper.Lerp(1, 1.75f, AnimationTime / 240f), SpriteEffects.None, 0);
|
||||
return false;
|
||||
|
||||
}
|
||||
else if (AnimationTime < 300)
|
||||
{
|
||||
float completion = 1 - (AnimationTime - 240) / 60f;
|
||||
var color = Color.Lerp(Color.Purple, Color.Red, MathF.Sin(Main.GlobalTimeWrappedHourly * 6) * 0.5f + 0.5f);
|
||||
|
||||
using (Main.spriteBatch.Scope())
|
||||
{
|
||||
Main.spriteBatch.Begin(SpriteSortMode.Immediate,
|
||||
BlendState.Additive,
|
||||
SamplerState.PointClamp,
|
||||
DepthStencilState.None,
|
||||
Main.Rasterizer,
|
||||
null,
|
||||
Main.GameViewMatrix.TransformationMatrix
|
||||
);
|
||||
|
||||
Main.spriteBatch.Draw(GetGlowTex(), Item.Center - Main.screenPosition, null, color, 0, GetGlowTex().Size() * 0.5f, 0.1f + 0.7f * completion, SpriteEffects.None, 0);
|
||||
int rep = 0;
|
||||
for (float i = 0; i <= MathHelper.TwoPi; i += MathHelper.TwoPi * 0.166f)
|
||||
{
|
||||
Main.spriteBatch.Draw(GetGlowBeamTex(), Item.Center - Main.screenPosition, null, color, MathHelper.WrapAngle(Main.GlobalTimeWrappedHourly) + i, new(GetGlowBeamTex().Size().X * 0.5f, 0), 0f + 0.06f * completion * (rep == 0 ? 1 : 0.75f), SpriteEffects.None, 0);
|
||||
rep = (rep + 1) % 2;
|
||||
}
|
||||
|
||||
Main.spriteBatch.End();
|
||||
}
|
||||
}
|
||||
return base.PreDrawInWorld(spriteBatch, lightColor, alphaColor, ref rotation, ref scale, whoAmI);
|
||||
}
|
||||
|
||||
private Vector2 getRingOffset(float rad, float xSquish = 1, float ySquish = 1)
|
||||
{
|
||||
return new Vector2((1 / xSquish) * MathF.Cos(rad), (1 / ySquish) * MathF.Sin(rad));
|
||||
}
|
||||
}
|
||||
|
||||
public class EvilSmasherSacrifice : GlobalItem
|
||||
{
|
||||
public override bool AppliesToEntity(Item entity, bool lateInstantiation)
|
||||
{
|
||||
return entity.type == ItemID.Pwnhammer;
|
||||
}
|
||||
|
||||
public override void Update(Item item, ref float gravity, ref float maxFallSpeed)
|
||||
{
|
||||
if (item.noGrabDelay > 0) return; //Only run once the item is fully settled
|
||||
for (var i = 0; i < 5; i++) //Loop a couple times to check different vertical positions for the altar, improving accuracy.
|
||||
{
|
||||
var tileCheckPos = item.Center.ToTileCoordinates() + new Point(0, i);
|
||||
if (Main.tile[tileCheckPos.X, tileCheckPos.Y].TileType == TileID.DemonAltar)
|
||||
{
|
||||
if (!(Main.netMode == NetmodeID.MultiplayerClient))
|
||||
{
|
||||
var newItem = Main.item[Item.NewItem(item.GetSource_FromThis(), item.Hitbox, ModContent.ItemType<EvilSmasher>())];
|
||||
newItem.noGrabDelay = 120;
|
||||
newItem.prefix = item.prefix;
|
||||
(newItem.ModItem as EvilSmasher).IsAnimating = true;
|
||||
}
|
||||
item.stack -= 1;
|
||||
if (item.stack <= 0)
|
||||
item.active = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 575 B |
@@ -22,6 +22,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.width = 88;
|
||||
Item.height = 88;
|
||||
Item.damage = 90;
|
||||
Item.crit = 31;
|
||||
Item.useAnimation = Item.useTime = 45;
|
||||
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
@@ -39,7 +40,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.rare = ItemRarityID.Yellow;
|
||||
}
|
||||
public override bool MeleePrefix() => true;
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 31;
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[ModContent.ProjectileType<ExaltedOathbladeHoldout>()] <= 0 && !player.Calamity().mouseRight;
|
||||
public override void HoldItem(Player player)
|
||||
{
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.width = 74;
|
||||
Item.height = 74;
|
||||
Item.damage = 58;
|
||||
Item.crit = 21;
|
||||
Item.useAnimation = Item.useTime = 50;
|
||||
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
@@ -38,7 +39,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.rare = ItemRarityID.Pink;
|
||||
}
|
||||
public override bool MeleePrefix() => true;
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 21;
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[ModContent.ProjectileType<ForbiddenOathbladeHoldout>()] <= 0 && !player.Calamity().mouseRight;
|
||||
public override void HoldItem(Player player)
|
||||
{
|
||||
|
||||
@@ -33,6 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.height = 134;
|
||||
Item.damage = 2200;
|
||||
Item.DamageType = TrueMeleeNoSpeedDamageClass.Instance;
|
||||
Item.crit = 61;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.channel = true;
|
||||
@@ -47,9 +48,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.rare = ModContent.RarityType<CosmicPurple>();
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 61;
|
||||
|
||||
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
||||
{
|
||||
Texture2D texture;
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.height = 76;
|
||||
Item.damage = 144;
|
||||
Item.DamageType = TrueMeleeDamageClass.Instance;
|
||||
Item.crit = 11;
|
||||
Item.useAnimation = Item.useTime = 90; // Yes it's actually supposed to be this slow
|
||||
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
@@ -38,6 +39,5 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Melee/OldLordClaymoreGlow").Value);
|
||||
}
|
||||
public override bool MeleePrefix() => true;
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 11;
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.height = 146;
|
||||
Item.damage = 100;
|
||||
Item.DamageType = TrueMeleeNoSpeedDamageClass.Instance;
|
||||
Item.crit = 45;
|
||||
Item.useAnimation = 12;
|
||||
Item.useStyle = ItemUseStyleID.Swing;
|
||||
Item.useTime = 12;
|
||||
@@ -31,9 +32,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.rare = ItemRarityID.Yellow;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 45;
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.width = Item.height = 40;
|
||||
Item.damage = 2705;
|
||||
Item.DamageType = TrueMeleeNoSpeedDamageClass.Instance;
|
||||
Item.crit = 10;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.channel = true;
|
||||
@@ -33,9 +34,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.rare = ModContent.RarityType<PureGreen>();
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults.
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 10;
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.width = 134;
|
||||
Item.height = 54;
|
||||
Item.damage = 3725;
|
||||
Item.crit = 18;
|
||||
Item.knockBack = 12f;
|
||||
Item.useTime = 5;
|
||||
Item.useAnimation = 25;
|
||||
@@ -43,8 +44,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.value = CalamityGlobalItem.RarityVioletBuyPrice;
|
||||
}
|
||||
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 18;
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
|
||||
public override bool AltFunctionUse(Player player) => true;
|
||||
public override void HoldItem(Player player)
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.width = 100;
|
||||
Item.height = 100;
|
||||
Item.damage = 180;
|
||||
Item.crit = 8;
|
||||
Item.knockBack = 13f;
|
||||
Item.DamageType = DamageClass.Melee;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
@@ -39,10 +40,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.channel = true;
|
||||
}
|
||||
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit)
|
||||
{
|
||||
crit += 8f;
|
||||
}
|
||||
public override bool CanUseItem(Player player) => Main.hardMode && player.ownedProjectileCounts[Item.shoot] < 1;
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
@@ -61,7 +58,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
.AddIngredient(ItemID.SoulofNight, 10)
|
||||
.AddIngredient<EssenceofHavoc>(5)
|
||||
.AddIngredient(ItemID.Obsidian, 10)
|
||||
.AddIngredient(ItemID.StoneBlock, 100)
|
||||
.AddRecipeGroup("AnyStoneBlock", 100)
|
||||
.AddIngredient(ItemID.Amethyst, 2)
|
||||
.AddTile(TileID.Anvils)
|
||||
.Register();
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.width = 46;
|
||||
Item.height = 58;
|
||||
Item.damage = 69;
|
||||
Item.crit = 100;
|
||||
Item.knockBack = 80f; //This number doesn't mean anything, but it's not 9001f because that caused bugs.
|
||||
Item.useAnimation = Item.useTime = 12;
|
||||
Item.DamageType = DamageClass.Melee;
|
||||
@@ -24,9 +25,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Item.value = CalamityGlobalItem.RarityLimeBuyPrice;
|
||||
}
|
||||
|
||||
// Boosting crit in SetDefaults along with knockback seemed to severely inflate the reforging price. Guaranteed crits for more knockback.
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit = 100;
|
||||
|
||||
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<AstralInfectionDebuff>(), 300);
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.height = 40;
|
||||
Item.damage = 1818;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.crit = 20;
|
||||
Item.useTime = Item.useAnimation = 60;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
@@ -37,9 +38,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void HoldItem(Player player) => player.scope = true;
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 20;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.height = 24;
|
||||
Item.damage = 120;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.crit = 25;
|
||||
Item.useTime = 15;
|
||||
Item.useAnimation = 15;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
@@ -31,9 +32,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 25;
|
||||
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-5, 0);
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
|
||||
@@ -22,6 +22,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.width = 76;
|
||||
Item.height = 42;
|
||||
Item.damage = 56;
|
||||
Item.crit = 21;
|
||||
Item.useTime = 30;
|
||||
Item.useAnimation = 30;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
@@ -37,9 +38,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.shootSpeed = 20f;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 21;
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.height = 38;
|
||||
Item.damage = 75;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.crit = 20;
|
||||
Item.useTime = 45;
|
||||
Item.useAnimation = 45;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
@@ -31,9 +32,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.useAmmo = AmmoID.Arrow;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 20;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
if (CalamityUtils.CheckWoodenAmmo(type, player))
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.height = 22;
|
||||
Item.damage = 60;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.crit = 25;
|
||||
Item.useTime = 60;
|
||||
Item.useAnimation = 60;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
@@ -31,9 +32,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 25;
|
||||
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-7, 0);
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
|
||||
@@ -34,6 +34,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.damage = 444;
|
||||
Item.knockBack = 5.5f;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.crit = 20;
|
||||
|
||||
// Burst of 5, one every 5 frames for 25 total. Cooldown of 39 frames.
|
||||
Item.useTime = 5;
|
||||
@@ -58,8 +59,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 20;
|
||||
public override void HoldItem(Player player)
|
||||
{
|
||||
if (player.mount.Type == MountID.Drill)
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.height = 46;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.damage = 740;
|
||||
Item.crit = 15;
|
||||
Item.knockBack = 16f;
|
||||
Item.useTime = Item.useAnimation = 74;
|
||||
Item.autoReuse = true;
|
||||
@@ -37,9 +38,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.useAmmo = AmmoID.Rocket;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 15;
|
||||
|
||||
public override void ModifyShootStats(Player player, ref Vector2 position, ref Vector2 velocity, ref int type, ref int damage, ref float knockback)
|
||||
{
|
||||
position += velocity.SafeNormalize(Vector2.UnitX) * 48f;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.height = 22;
|
||||
Item.damage = 75;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
|
||||
Item.crit = 10;
|
||||
Item.useTime = 40;
|
||||
Item.useAnimation = 40;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
@@ -35,7 +35,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.rare = ItemRarityID.Orange;
|
||||
}
|
||||
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 10;
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
|
||||
public override void HoldItem(Player player)
|
||||
{
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.height = 110;
|
||||
Item.damage = 39;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.crit = 10;
|
||||
Item.useTime = 5;
|
||||
Item.useAnimation = 15;
|
||||
Item.useLimitPerAnimation = 3;
|
||||
@@ -33,9 +34,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.Calamity().donorItem = true;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 10;
|
||||
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-4, 0);
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.height = 22;
|
||||
Item.damage = 210;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.crit = 10;
|
||||
Item.useTime = 70;
|
||||
Item.useAnimation = 70;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
@@ -35,9 +36,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-10, 8);
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 10;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
|
||||
@@ -39,6 +39,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.height = 34;
|
||||
Item.damage = 445;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.crit = 25;
|
||||
Item.useAnimation = Item.useTime = 8;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
@@ -52,7 +53,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.shoot = ModContent.ProjectileType<OntologicalDespoilerHoldout>();
|
||||
Item.shootSpeed = 12f;
|
||||
}
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 25;
|
||||
public override bool AltFunctionUse(Player player) => true;
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
|
||||
public override void HoldItem(Player player)
|
||||
|
||||
@@ -25,6 +25,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.height = 28;
|
||||
Item.damage = 450;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.crit = 38;
|
||||
Item.knockBack = 10f;
|
||||
Item.useTime = 50;
|
||||
Item.useAnimation = 50;
|
||||
@@ -39,9 +40,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.Calamity().donorItem = true;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 38;
|
||||
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-6, 10);
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
|
||||
@@ -25,6 +25,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.height = 34;
|
||||
Item.damage = 118;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.crit = 15;
|
||||
Item.useTime = Item.useAnimation = 3;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
@@ -38,8 +39,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.rare = ModContent.RarityType<CosmicPurple>();
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 15;
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-10, 0);
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
|
||||
@@ -22,6 +22,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.height = 44;
|
||||
Item.damage = 115;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.crit = 6;
|
||||
Item.useTime = 60;
|
||||
Item.useAnimation = 60;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
@@ -35,9 +36,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.shootSpeed = 50f;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 6;
|
||||
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-10, 0);
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.height = 38;
|
||||
Item.damage = 40;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.crit = 15;
|
||||
Item.useTime = 70;
|
||||
Item.useAnimation = 70;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
@@ -30,9 +31,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.useAmmo = AmmoID.Arrow;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 15;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
if (CalamityUtils.CheckWoodenAmmo(type, player))
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.height = 28;
|
||||
Item.damage = 150;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.crit = 35;
|
||||
Item.useTime = 35;
|
||||
Item.useAnimation = 35;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
@@ -30,9 +31,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.useAmmo = AmmoID.Bullet;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 35;
|
||||
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-25, 0);
|
||||
|
||||
public override void HoldItem(Player player) => player.scope = true;
|
||||
|
||||
@@ -25,6 +25,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.height = 34;
|
||||
Item.damage = 705;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.crit = 26;
|
||||
Item.useAnimation = Item.useTime = 5;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
@@ -40,9 +41,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.Calamity().devItem = true;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 26;
|
||||
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-25, 0);
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.height = 30;
|
||||
Item.damage = 180;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.crit = 16;
|
||||
Item.useTime = 40;
|
||||
Item.useAnimation = 40;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
@@ -33,9 +34,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.shootSpeed = 3f;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 16;
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-5, 0);
|
||||
|
||||
@@ -57,6 +57,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.height = 46;
|
||||
Item.damage = 100;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.crit = 21;
|
||||
Item.useTime = 10;
|
||||
Item.useAnimation = 10;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
@@ -71,8 +72,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.shootSpeed = ShootSpeed;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 21;
|
||||
public override bool AltFunctionUse(Player player) => true;
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.height = 26;
|
||||
Item.damage = 35;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.crit = 6;
|
||||
Item.useTime = 55;
|
||||
Item.useAnimation = 55;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
@@ -37,9 +38,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.shootSpeed = 25f;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 6;
|
||||
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-10, 0);
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
Item.damage = 92;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.crit = 16;
|
||||
Item.useAnimation = Item.useTime = OriginalUseTime;
|
||||
Item.shoot = ProjectileType<TheHiveHoldout>();
|
||||
Item.shootSpeed = 13f;
|
||||
@@ -38,9 +39,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.UseSound = new SoundStyle("CalamityMod/Sounds/Item/DudFire") with { Volume = .4f, Pitch = -.9f, PitchVariance = 0.1f };
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 16;
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] == 0;
|
||||
|
||||
// Spawning the holdout won't consume ammo.
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.height = 46;
|
||||
Item.damage = 1000;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.crit = 8;
|
||||
Item.useTime = Item.useAnimation = 53;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
@@ -34,9 +35,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.Calamity().donorItem = true;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 8;
|
||||
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-40, 0);
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.damage = 2150;
|
||||
Item.knockBack = 9.5f;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.crit = 35;
|
||||
Item.useTime = 60;
|
||||
Item.useAnimation = 60;
|
||||
Item.shoot = ProjectileID.BulletHighVelocity;
|
||||
@@ -35,9 +36,6 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
Item.Calamity().donorItem = true;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 35;
|
||||
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-28, 0);
|
||||
|
||||
public override void HoldItem(Player player) => player.scope = true;
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Item.width = 66;
|
||||
Item.height = 64;
|
||||
Item.damage = 185;
|
||||
Item.crit = 20;
|
||||
Item.shootSpeed = 18f;
|
||||
Item.shoot = ModContent.ProjectileType<ApoctolithProj>();
|
||||
Item.useAnimation = Item.useTime = 26;
|
||||
@@ -32,9 +33,6 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Item.autoReuse = true;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 20;
|
||||
|
||||
public override void UseStyle(Player player, Rectangle heldItemFrame)
|
||||
{
|
||||
ExtraArmAnimations.ThrowArmAnimationFast(player, Item);
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Item.height = 32;
|
||||
Item.damage = 75;
|
||||
Item.DamageType = RogueDamageClass.Instance;
|
||||
Item.crit = 4;
|
||||
Item.autoReuse = true;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
@@ -33,7 +34,6 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
public override float StealthVelocityMultiplier => 1.3f;
|
||||
|
||||
public override float StealthDamageMultiplier => 0.5f;
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 4;
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
var p = Projectile.NewProjectileDirect(source, position, velocity, type, damage, knockback, player.whoAmI, 0f, -1f);
|
||||
|
||||
@@ -14,6 +14,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Item.width = 32;
|
||||
Item.height = 32;
|
||||
Item.damage = 35;
|
||||
Item.crit = 8;
|
||||
Item.rare = ItemRarityID.Orange;
|
||||
Item.knockBack = 5;
|
||||
Item.autoReuse = true;
|
||||
@@ -29,9 +30,6 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Item.DamageType = RogueDamageClass.Instance;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 8;
|
||||
|
||||
public override float StealthDamageMultiplier => 1.5f;
|
||||
public override float StealthVelocityMultiplier => 1.25f;
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Item.width = 50;
|
||||
Item.height = 50;
|
||||
Item.damage = 16;
|
||||
Item.crit = 4;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.useAnimation = 18;
|
||||
@@ -29,9 +30,6 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Item.DamageType = RogueDamageClass.Instance;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 4;
|
||||
|
||||
public override float StealthDamageMultiplier => 1.7f;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Item.height = 58;
|
||||
Item.damage = 81;
|
||||
Item.DamageType = RogueDamageClass.Instance;
|
||||
Item.crit = 16;
|
||||
Item.useTime = Item.useAnimation = 19;
|
||||
Item.knockBack = 12;
|
||||
|
||||
@@ -33,9 +34,6 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Item.noUseGraphic = true;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 16;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Item.height = 32;
|
||||
Item.damage = 22;
|
||||
Item.DamageType = RogueDamageClass.Instance;
|
||||
Item.crit = 6;
|
||||
Item.autoReuse = true;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
@@ -32,7 +33,6 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
public override float StealthVelocityMultiplier => 1.3f;
|
||||
|
||||
public override float StealthDamageMultiplier => 0.6f;
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 6;
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
var p = Projectile.NewProjectileDirect(source, position, velocity, type, damage, knockback, player.whoAmI, 0f, -1f);
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Item.height = 32;
|
||||
Item.damage = 148;
|
||||
Item.DamageType = RogueDamageClass.Instance;
|
||||
Item.crit = 16;
|
||||
Item.useTime = 4;
|
||||
Item.useAnimation = 12;
|
||||
Item.reuseDelay = 1;
|
||||
@@ -39,9 +40,6 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 16;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
Item.width = Item.height = 66;
|
||||
Item.damage = 45;
|
||||
Item.crit = 7;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.useAnimation = 12;
|
||||
@@ -28,9 +29,6 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Item.DamageType = RogueDamageClass.Instance;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 7;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
|
||||
@@ -15,8 +15,10 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Item.width = 34;
|
||||
Item.height = 50;
|
||||
Item.damage = 12;
|
||||
Item.knockBack = 12;
|
||||
Item.DamageType = RogueDamageClass.Instance;
|
||||
Item.crit = 16;
|
||||
Item.knockBack = 12;
|
||||
|
||||
Item.value = CalamityGlobalItem.RarityBlueBuyPrice;
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
Item.useTime = 25;
|
||||
@@ -29,9 +31,6 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Item.noUseGraphic = true;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 16;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Item.width = 54;
|
||||
Item.height = 54;
|
||||
Item.damage = 36;
|
||||
Item.crit = 4;
|
||||
Item.noMelee = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.useAnimation = Item.useTime = 20;
|
||||
@@ -30,9 +31,6 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Item.DamageType = RogueDamageClass.Instance;
|
||||
}
|
||||
|
||||
// Terraria seems to really dislike high crit values in SetDefaults
|
||||
public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 4;
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
if (player.Calamity().StealthStrikeAvailable())
|
||||
|
||||