Merge branch '1.4.4' into evenmoressenemies
No files matched your search
@@ -93,12 +93,12 @@ namespace CalamityMod.Balancing
|
||||
NPCSpecificBalancingChanges = new List<NPCBalancingChange>();
|
||||
|
||||
#region Desert Scourge
|
||||
// 25% resist to true melee.
|
||||
// 20% resist to true melee.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(DesertScourgeIDList.List, Do(ResistTrueMelee(0.8f))));
|
||||
#endregion
|
||||
|
||||
#region Crabulon
|
||||
// 25% resist to true melee.
|
||||
// 20% resist to true melee.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<Crabulon>(), ResistTrueMelee(0.8f)));
|
||||
#endregion
|
||||
|
||||
@@ -185,9 +185,6 @@ namespace CalamityMod.Balancing
|
||||
#region Astrum Aureus
|
||||
// 30% resist to The Ballista's greatarrows.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<AstrumAureus>(), Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<BallistaGreatArrow>()))));
|
||||
|
||||
// 30% resist to Whitewater.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<AstrumAureus>(), Do(new ProjectileResistBalancingRule(0.7f, ProjectileType<WhitewaterProj>(), ProjectileType<WhitewaterAura>(), ProjectileType<WhitewaterSpear>()))));
|
||||
#endregion
|
||||
|
||||
#region Duke Fishron
|
||||
@@ -216,9 +213,6 @@ namespace CalamityMod.Balancing
|
||||
// 50% resist to Icicle Arrows.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<IcicleArrowProj>()))));
|
||||
|
||||
// 50% resist to Whitewater.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<WhitewaterAura>(), ProjectileType<WhitewaterProj>(), ProjectileType<WhitewaterSpear>()))));
|
||||
|
||||
// 35% resist to Flying Dragon.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(RavagerIDList.List, Do(new ProjectileResistBalancingRule(0.65f, ProjectileID.DD2SquireSonicBoom))));
|
||||
|
||||
@@ -259,15 +253,15 @@ namespace CalamityMod.Balancing
|
||||
// 70% resist to Stardust Dragon Staff.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.3f, ProjectileID.StardustDragon1, ProjectileID.StardustDragon2, ProjectileID.StardustDragon3, ProjectileID.StardustDragon4))));
|
||||
|
||||
// 65% resist to Atlantis (Atlantis gaming!).
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.35f, ProjectileType<AtlantisSpear>()))));
|
||||
|
||||
// 55% resist to Flak Kraken.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.45f, ProjectileType<FlakKrakenProjectile>()))));
|
||||
|
||||
// 50% resist to true melee.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(ResistTrueMelee(0.5f))));
|
||||
|
||||
// 50% resist to Atlantis (Atlantis gaming!).
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AtlantisSpear>()))));
|
||||
|
||||
// 50% resist to Aurora Blazer.
|
||||
NPCSpecificBalancingChanges.AddRange(Bundle(AstrumDeusIDList.List, Do(new ProjectileResistBalancingRule(0.5f, ProjectileType<AuroraFire>()))));
|
||||
|
||||
@@ -306,6 +300,9 @@ namespace CalamityMod.Balancing
|
||||
// 50% resist to Galactus Blade.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<DarkEnergy>(), new ProjectileResistBalancingRule(0.5f, ProjectileType<GalacticaComet>())));
|
||||
|
||||
// 40% resist to Pristine Fury's alt fire.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<DarkEnergy>(), new ProjectileResistBalancingRule(0.6f, ProjectileType<PristineSecondary>())));
|
||||
|
||||
// 40% resist to Stellar Torus Staff.
|
||||
NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType<DarkEnergy>(), new ProjectileResistBalancingRule(0.6f, ProjectileType<StellarTorusBeam>())));
|
||||
#endregion
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
#region Dashes and Dodges
|
||||
// Dash cooldowns (in frames)
|
||||
internal const int UniversalDashCooldown = 30;
|
||||
internal const int UniversalSashDashCooldown = 23;
|
||||
internal const int UniversalShieldSlamCooldown = 30;
|
||||
internal const int UniversalShieldBonkCooldown = 30;
|
||||
internal const int OnShieldBonkCooldown = 30;
|
||||
|
||||
@@ -21,12 +21,15 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
if (modPlayer.abyssalDivingSuitPrevious)
|
||||
{
|
||||
if (player.IsUnderwater())
|
||||
{
|
||||
if (player.maxFallSpeed < 9f)
|
||||
player.maxFallSpeed = 9f;
|
||||
player.gills = true;
|
||||
}
|
||||
modPlayer.abyssalDivingSuitPower = true;
|
||||
modPlayer.depthCharm = true;
|
||||
modPlayer.jellyfishNecklace = true;
|
||||
modPlayer.anechoicPlating = true;
|
||||
modPlayer.ironBoots = true;
|
||||
player.arcticDivingGear = true;
|
||||
player.accFlipper = true;
|
||||
player.accDivingHelm = true;
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.StatBuffs
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
player.Calamity().omegaBlueHentai = true;
|
||||
player.Calamity().omegaBlueAbyssalMadness = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -300,6 +300,7 @@ namespace CalamityMod.CalPlayer
|
||||
public int GalaxyHammer = 0;
|
||||
/// <summary> Variable used to apply Ontological Despoiler's nerfs when continuously using a single firing mode. </summary>
|
||||
public bool despoilerNerf = false;
|
||||
/// <summary> Variable used to trigger Molten Amputator's stealth effect on right-click. </summary>
|
||||
public int amputatorBuff = 0;
|
||||
public int rOfResilienceCooldown = 0;
|
||||
public int rOfResilienceEffect = 0;
|
||||
@@ -312,7 +313,7 @@ namespace CalamityMod.CalPlayer
|
||||
public int hideOfDeusMeleeBoostTimer = 0;
|
||||
/// <summary>
|
||||
/// The player's alcohol level. Increased by 1 for each alcohol the player has drank, 2 for Everclear.<br/>
|
||||
/// Is this value is greater than 3, the player is inflicted with Alcohol Poisoning.
|
||||
/// If this value is greater than 3, the player is inflicted with Alcohol Poisoning.
|
||||
/// </summary>
|
||||
public int alcoholPoisonLevel = 0;
|
||||
public int dashTimeMod;
|
||||
@@ -361,7 +362,7 @@ namespace CalamityMod.CalPlayer
|
||||
public int giantShellPostHit = 0;
|
||||
public int tortShellPostHit = 0;
|
||||
public int RustyMedallionCooldown = 0;
|
||||
public int MiniSwamerCooldown = 0;
|
||||
public int MiniSwarmerCooldown = 0;
|
||||
public float SulphWaterPoisoningLevel;
|
||||
public float holyInfernoFadeIntensity;
|
||||
public NPC unstableSelectedTarget;
|
||||
@@ -736,6 +737,10 @@ namespace CalamityMod.CalPlayer
|
||||
/// <summary> Used to prevent dodges from triggering The Bee's full health damage reduction cooldown. </summary>
|
||||
public bool shouldTriggerBeeCooldown = false;
|
||||
public int theBeeCooldown = 0;
|
||||
public bool aFossil = false;
|
||||
public bool aPowder = false;
|
||||
public bool fallingBlockProtection = false;
|
||||
public bool trapProtection = false;
|
||||
public bool alluringBait = false;
|
||||
public bool enchantedPearl = false;
|
||||
public bool fishingStation = false;
|
||||
@@ -780,6 +785,9 @@ namespace CalamityMod.CalPlayer
|
||||
public bool eTalisman = false;
|
||||
/// <summary> Counter variable used for spawning Statis' Void Sash's scythes when dashing. </summary>
|
||||
public int statisTimer = 0;
|
||||
public bool statisNinjaBelt = false;
|
||||
public bool voidSashVisuals = true;
|
||||
public bool statisVoidSash = false;
|
||||
public bool nucleogenesis = false;
|
||||
public bool nuclearFuelRod = false;
|
||||
public bool nebulousCore = false;
|
||||
@@ -799,9 +807,11 @@ namespace CalamityMod.CalPlayer
|
||||
public bool rampartOfDeities = false;
|
||||
public bool gShell = false;
|
||||
public bool lAmbergris = false;
|
||||
public bool lAmbergrisVisual = false;
|
||||
public bool tortShell = false;
|
||||
public bool absorber = false;
|
||||
public bool alwaysHoneyRegen = false;
|
||||
public float alwaysHoneyRegenAmount = 0;
|
||||
public bool honeyTurboRegen = false;
|
||||
public bool honeyDewHalveDebuffs = false;
|
||||
public bool livingDewHalveDebuffs = false;
|
||||
@@ -818,6 +828,9 @@ namespace CalamityMod.CalPlayer
|
||||
public float pulseRate = 1;
|
||||
public bool aAmpoule = false;
|
||||
public bool rOoze = false;
|
||||
public float radiantOozeRegen = 0;
|
||||
public float ambrosialAmpouleRegen = 0;
|
||||
public float purityRegen = 0;
|
||||
public bool fBarrier = false;
|
||||
public bool aBrain = false;
|
||||
public bool amalgam = false;
|
||||
@@ -886,7 +899,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool anechoicPlating = false;
|
||||
/// <summary> Used for increasing light level in the Abyss. </summary>
|
||||
public bool jellyfishNecklace = false;
|
||||
/// <summary> Calamity's Fairy Boots effect; makes fairies spawn around you which give stats. </summary>
|
||||
/// <summary> Calamity's Fairy Boots effect; makes fairies spawn around the player which give stats. </summary>
|
||||
public bool fairyBoots = false;
|
||||
/// <summary> Calamity's Flame Waker Boots effect; multiplies heat debuff damage and makes attacks inflict On Fire. </summary>
|
||||
public bool flameWakerBoots = false;
|
||||
@@ -911,6 +924,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool baroclaw = false;
|
||||
public bool HasIncreasedDashFirstFrame = false;
|
||||
public bool IsFirstDashFrame = true;
|
||||
public int fallingBootVelCheckTimer = 0;
|
||||
public bool voidOfCalamity = false;
|
||||
public bool voidOfExtinction = false;
|
||||
public bool eArtifact = false;
|
||||
@@ -925,7 +939,8 @@ namespace CalamityMod.CalPlayer
|
||||
public bool flameLickedShell = false;
|
||||
public int flameLickedShellParry = 0;
|
||||
public bool flameLickedShellEmpoweredParry = false;
|
||||
public bool Pauldron = false;
|
||||
public bool sPauldron = false;
|
||||
public bool sPauldronVisual = false;
|
||||
public bool XykVisualsBlue = false;
|
||||
public bool XykVisualsOrange = false;
|
||||
public bool manaOverloader = false;
|
||||
@@ -1007,7 +1022,7 @@ namespace CalamityMod.CalPlayer
|
||||
public int phantomicHeartRegen = 0;
|
||||
public bool silvaWings = false;
|
||||
public int silvaWingsLifeRegenTimer = 0;
|
||||
/// <summary> General cooldown variable for spawning projectiles from wing bonus effects. Used by Soul of Cryogen, Harpy Wings, Tattered Fairy Wings, and Festive Wings. </summary>
|
||||
/// <summary> General cooldown variable for spawning projectiles from wing bonus effects. Used by Soul of Cryogen, Tattered Fairy Wings, and Festive Wings. </summary>
|
||||
public int wingProjectileCooldown = 0;
|
||||
public bool RustyMedallionDroplets = false;
|
||||
public bool noStupidNaturalARSpawns = false;
|
||||
@@ -1029,7 +1044,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
#region Armor Set
|
||||
public int ArmorSetBonusKeyHeldTimer;
|
||||
/// <summary> Calamity's Silver armor set bonus; taking over 20 damage heals 10 health if you avoid damage for 2 seconds. </summary>
|
||||
/// <summary> Calamity's Silver armor set bonus; taking over 20 damage heals 10 health if the player avoids damage for 2 seconds. </summary>
|
||||
public bool silverMedkit = false;
|
||||
public int silverMedkitTimer = 0;
|
||||
/// <summary> Calamity's Gold armor set bonus; makes enemies drop Gold Coins. </summary>
|
||||
@@ -1044,7 +1059,7 @@ namespace CalamityMod.CalPlayer
|
||||
public int tornadoCooldown = 0;
|
||||
/// <summary> Calamity's Snow armor set bonus; reduces cold enemy damage and increases cold debuff damage. </summary>
|
||||
public bool eskimoSet = false;
|
||||
/// <summary> Calamity's Rain armor set bonus; gives jump speed and makes jumps create a splash. </summary>
|
||||
/// <summary> Calamity's Rain armor set bonus; increases jump speed and makes jumps create a damaging splash. </summary>
|
||||
public bool rainSet = false;
|
||||
/// <summary> Calamity's Meteor armor set bonus; makes all magic guns cost 33% mana instead of Space Gun costing 0 mana. </summary>
|
||||
public bool meteorSet = false;
|
||||
@@ -1156,7 +1171,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool auricSet = false;
|
||||
public bool omegaBlueChestplate = false;
|
||||
public bool omegaBlueSet = false;
|
||||
public bool omegaBlueHentai = false;
|
||||
public bool omegaBlueAbyssalMadness = false;
|
||||
/// <summary> Aerospec armor's summoner set bonus minion. </summary>
|
||||
public bool valkyrie = false;
|
||||
/// <summary> Statigel armor's summoner set bonus minion. </summary>
|
||||
@@ -1395,7 +1410,6 @@ namespace CalamityMod.CalPlayer
|
||||
/// <summary> Sun Spirit Staff. </summary>
|
||||
public bool SP = false;
|
||||
public bool dCreeper = false;
|
||||
public bool bClot = false;
|
||||
public bool eAxe = false;
|
||||
public bool endoCooper = false;
|
||||
/// <summary> Vengeful Sun Staff. </summary>
|
||||
@@ -2105,7 +2119,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
omegaBlueChestplate = false;
|
||||
omegaBlueSet = false;
|
||||
omegaBlueHentai = false;
|
||||
omegaBlueAbyssalMadness = false;
|
||||
|
||||
molluskHelmet = false;
|
||||
molluskChest = false;
|
||||
@@ -2143,6 +2157,10 @@ namespace CalamityMod.CalPlayer
|
||||
arcFlashRingVisual = false;
|
||||
bGlassBand = false;
|
||||
bGlassBandVisual = false;
|
||||
aFossil = false;
|
||||
aPowder = false;
|
||||
fallingBlockProtection = false;
|
||||
trapProtection = false;
|
||||
alluringBait = false;
|
||||
enchantedPearl = false;
|
||||
fishingStation = false;
|
||||
@@ -2163,11 +2181,15 @@ namespace CalamityMod.CalPlayer
|
||||
tortShell = false;
|
||||
absorber = false;
|
||||
alwaysHoneyRegen = false;
|
||||
alwaysHoneyRegenAmount = 0;
|
||||
honeyTurboRegen = false;
|
||||
honeyDewHalveDebuffs = false;
|
||||
livingDewHalveDebuffs = false;
|
||||
aAmpoule = false;
|
||||
rOoze = false;
|
||||
radiantOozeRegen = 0;
|
||||
ambrosialAmpouleRegen = 0;
|
||||
purityRegen = 0;
|
||||
fBarrier = false;
|
||||
aBrain = false;
|
||||
amalgam = false;
|
||||
@@ -2186,6 +2208,8 @@ namespace CalamityMod.CalPlayer
|
||||
eGauntlet = false;
|
||||
eGauntletVisuals = true;
|
||||
gloveLevel = 0;
|
||||
statisNinjaBelt = false;
|
||||
statisVoidSash = false;
|
||||
alreadyHasFrogLeg = false;
|
||||
eTalisman = false;
|
||||
nucleogenesis = false;
|
||||
@@ -2231,7 +2255,7 @@ namespace CalamityMod.CalPlayer
|
||||
shieldOfTheOcean = false;
|
||||
normalityRelocator = false;
|
||||
flameLickedShell = false;
|
||||
Pauldron = false;
|
||||
sPauldron = false;
|
||||
XykVisualsBlue = false;
|
||||
XykVisualsOrange = false;
|
||||
manaOverloader = false;
|
||||
@@ -2546,7 +2570,6 @@ namespace CalamityMod.CalPlayer
|
||||
aquaticStar = false;
|
||||
SP = false;
|
||||
dCreeper = false;
|
||||
bClot = false;
|
||||
eAxe = false;
|
||||
endoCooper = false;
|
||||
apexShark = false;
|
||||
@@ -3279,7 +3302,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
//Only increment hotkey holdtime if not on ground, not mounted, not on rope, not hooked, not tongued, otherwise reset hold time to zero
|
||||
if (CalamityKeybinds.GravistarSabatonHotkey.Current && gSabaton && Main.myPlayer == Player.whoAmI && (Player.velocity.Y != Player.oldVelocity.Y) && !Player.pulley && !Player.mount.Active && Player.grappling[0] == -1 && !Player.tongued)
|
||||
if (CalamityKeybinds.GravistarSabatonHotkey.Current && gSabaton && Main.myPlayer == Player.whoAmI && (Player.velocity.Y != 0) && !Player.pulley && !Player.mount.Active && Player.grappling[0] == -1 && !Player.tongued)
|
||||
{
|
||||
gSabatonHotkeyHoldTime++;
|
||||
if (gSabatonHotkeyHoldTime < 30 && gSabatonHotkeyHoldTime % 3f == 0)
|
||||
@@ -4084,7 +4107,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
// Cancel fall and don't give 'on ground' effects if on rope, on mount, grappled, or tongued
|
||||
// Also cancel fall if the player has upwards Y velocity (Goodbye Inner Tube cheese)
|
||||
if (Player.velocity.Y < 0f || Player.pulley || Player.mount.Active || Player.grappling[0] != -1 || Player.tongued)
|
||||
if ((Player.gravDir == 1 && Player.velocity.Y < 0f) || (Player.gravDir == -1 && Player.velocity.Y > 1f) || Player.pulley || Player.mount.Active || Player.grappling[0] != -1 || Player.tongued)
|
||||
{
|
||||
gSabatonFall = 0;
|
||||
gSabatonFalling = false;
|
||||
@@ -4103,7 +4126,7 @@ namespace CalamityMod.CalPlayer
|
||||
Player.controlJump = false;
|
||||
|
||||
// Check if player hit some form of solid resistance (the ground)
|
||||
if (Player.oldVelocity.Y == Player.velocity.Y)
|
||||
if (0 == Player.velocity.Y)
|
||||
{
|
||||
var source = Player.GetSource_Accessory(FindAccessory(ItemType<InterstellarStompers>()));
|
||||
//Spawn explosion. ai[0] is used for transferring the recorded falling time
|
||||
@@ -4397,6 +4420,8 @@ namespace CalamityMod.CalPlayer
|
||||
(getSandCloakAccelBoost ? 0.75f : 0f) +
|
||||
(nimbleBounderBoost ? NimbleBounder.AccelerationBoost : 0f) +
|
||||
(ascendantInsignia ? 0.25f : 0f ) + // Added to Soaring Insignia's 1.25x multiplier to get 1.5x
|
||||
(statisNinjaBelt ? 0.6f : 0f) +
|
||||
(statisVoidSash ? 0.85f : 0f) +
|
||||
(blueCandle ? WeightlessCandle.AccelerationBoost : 0f) +
|
||||
(planarSpeedBoost > 0 ? (0.01f * planarSpeedBoost) : 0f) +
|
||||
//(exaltedKillMode ? 7f : devilsDevastationKillMode ? 11f : 0) +
|
||||
@@ -4458,6 +4483,8 @@ namespace CalamityMod.CalPlayer
|
||||
ModDashMovement();
|
||||
}
|
||||
#endregion
|
||||
|
||||
Player.oldVelocity = Player.velocity; // Apparently this value is not updated on its own, so we do it
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -120,6 +120,8 @@ namespace CalamityMod.CalPlayer
|
||||
dashDelayToApply = BalancingConstants.UniversalShieldBonkCooldown;
|
||||
if (DashID == DeepDiverDash.ID)
|
||||
dashDelayToApply = 23;
|
||||
if (DashID == StatisNinjaBeltDash.ID || DashID == StatisVoidSashDash.ID || Player.dashType == 1)
|
||||
dashDelayToApply = BalancingConstants.UniversalSashDashCooldown;
|
||||
|
||||
float dashSpeed = 12f;
|
||||
float dashSpeedDecelerationFactor = 0.985f;
|
||||
|
||||
@@ -442,7 +442,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
#endregion Profaned Moonlight Dye Colors
|
||||
|
||||
#region Tanks/Backpacks
|
||||
#region Vanity Accessories and Tanks/Backpacks
|
||||
public override void ModifyDrawInfo(ref PlayerDrawSet drawInfo)
|
||||
{
|
||||
if (drawInfo.shadow != 0f)
|
||||
@@ -451,6 +451,52 @@ namespace CalamityMod.CalPlayer
|
||||
Player drawPlayer = drawInfo.drawPlayer;
|
||||
Item item = drawPlayer.ActiveItem();
|
||||
|
||||
// Vanity accessory effects, allows them to draw while the game is paused
|
||||
if (drawPlayer.Calamity().ghostBracelet)
|
||||
{
|
||||
drawPlayer.legs = EquipLoader.GetEquipSlot(Mod, "GhostBracelet", EquipType.Legs);
|
||||
drawPlayer.body = EquipLoader.GetEquipSlot(Mod, "GhostBracelet", EquipType.Body);
|
||||
drawPlayer.head = EquipLoader.GetEquipSlot(Mod, "GhostBracelet", EquipType.Head);
|
||||
}
|
||||
else if ((drawPlayer.Calamity().snowmanPower || drawPlayer.Calamity().snowmanForce) && !drawPlayer.Calamity().snowmanHide)
|
||||
{
|
||||
drawPlayer.legs = EquipLoader.GetEquipSlot(Mod, "Popo", EquipType.Legs);
|
||||
drawPlayer.body = EquipLoader.GetEquipSlot(Mod, "Popo", EquipType.Body);
|
||||
drawPlayer.head = EquipLoader.GetEquipSlot(Mod, snowmanNoseless ? "PopoNoseless" : "Popo", EquipType.Head);
|
||||
drawPlayer.face = -1;
|
||||
}
|
||||
else if (drawPlayer.Calamity().punchCard)
|
||||
{
|
||||
drawPlayer.legs = EquipLoader.GetEquipSlot(Mod, "PunchCard", EquipType.Legs);
|
||||
drawPlayer.body = EquipLoader.GetEquipSlot(Mod, "PunchCard", EquipType.Body);
|
||||
drawPlayer.head = EquipLoader.GetEquipSlot(Mod, "PunchCard", EquipType.Head);
|
||||
}
|
||||
else if ((drawPlayer.Calamity().abyssalDivingSuitPower || drawPlayer.Calamity().abyssalDivingSuitForce) && !drawPlayer.Calamity().abyssalDivingSuitHide)
|
||||
{
|
||||
drawPlayer.legs = EquipLoader.GetEquipSlot(Mod, "AbyssalDivingSuit", EquipType.Legs);
|
||||
drawPlayer.body = EquipLoader.GetEquipSlot(Mod, "AbyssalDivingSuit", EquipType.Body);
|
||||
drawPlayer.head = EquipLoader.GetEquipSlot(Mod, "AbyssalDivingSuit", EquipType.Head);
|
||||
drawPlayer.face = -1;
|
||||
}
|
||||
else if ((drawPlayer.Calamity().aquaticHeartPower || drawPlayer.Calamity().aquaticHeartForce) && !drawPlayer.Calamity().aquaticHeartHide)
|
||||
{
|
||||
drawPlayer.legs = EquipLoader.GetEquipSlot(Mod, "AquaticHeart", EquipType.Legs);
|
||||
drawPlayer.body = EquipLoader.GetEquipSlot(Mod, "AquaticHeart", EquipType.Body);
|
||||
drawPlayer.head = EquipLoader.GetEquipSlot(Mod, "AquaticHeart", EquipType.Head);
|
||||
drawPlayer.face = -1;
|
||||
}
|
||||
// Need to set all of these so that certain vanity pieces like Capricorn Tail don't screw it up
|
||||
if (drawPlayer.Calamity().ghostBracelet || ((drawPlayer.Calamity().snowmanPower || drawPlayer.Calamity().snowmanForce) && !drawPlayer.Calamity().snowmanHide) ||
|
||||
drawPlayer.Calamity().punchCard || ((drawPlayer.Calamity().abyssalDivingSuitPower || drawPlayer.Calamity().abyssalDivingSuitForce) && !drawPlayer.Calamity().abyssalDivingSuitHide) ||
|
||||
((drawPlayer.Calamity().aquaticHeartPower || drawPlayer.Calamity().aquaticHeartForce) && !drawPlayer.Calamity().aquaticHeartHide))
|
||||
{
|
||||
drawInfo.legsGlowMask = -1;
|
||||
drawInfo.legsOffset = Vector2.Zero;
|
||||
drawInfo.bodyGlowMask = -1;
|
||||
drawInfo.headGlowMask = -1;
|
||||
drawInfo.helmetOffset = Vector2.Zero;
|
||||
}
|
||||
|
||||
if (!drawPlayer.frozen &&
|
||||
(item.IsAir || item.type > ItemID.None) &&
|
||||
!drawPlayer.dead &&
|
||||
|
||||
@@ -814,7 +814,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
if (trinketOfChiBuff)
|
||||
contactDamageReduction += 0.04;
|
||||
contactDamageReduction += 0.08;
|
||||
|
||||
// Fearmonger set provides 15% multiplicative DR that ignores caps during the Holiday Moons.
|
||||
// To prevent abuse, this effect does not work if there are any bosses alive.
|
||||
@@ -995,7 +995,7 @@ namespace CalamityMod.CalPlayer
|
||||
modifiers.SourceDamage *= 0.65f;
|
||||
|
||||
// 80 in normal, 100 in expert, 150 in master
|
||||
else if (proj.type == ProjectileID.SpikyBallTrap || proj.type == ProjectileID.FlamethrowerTrap || proj.type == ProjectileID.PoisonDartTrap)
|
||||
else if (proj.type == ProjectileID.SpikyBallTrap || proj.type == ProjectileID.FlamethrowerTrap || proj.type == ProjectileID.FlamesTrap || proj.type == ProjectileID.PoisonDartTrap)
|
||||
modifiers.SourceDamage *= 0.625f;
|
||||
|
||||
// 120 in normal, 144 in expert, 216 in master
|
||||
@@ -1003,6 +1003,20 @@ namespace CalamityMod.CalPlayer
|
||||
modifiers.SourceDamage *= 0.6f;
|
||||
}
|
||||
|
||||
bool isFallingBlock = (proj.type == ProjectileID.SandBallFalling) || (proj.type == ProjectileID.SiltBall) || (proj.type == ProjectileID.AshBallFalling) ||
|
||||
(proj.type == ProjectileID.CrimsandBallFalling) || (proj.type == ProjectileID.EbonsandBallFalling) || (proj.type == ProjectileID.PearlSandBallFalling) ||
|
||||
(proj.type == ProjectileID.ShellPileFalling) || (proj.type == ProjectileID.SlushBall) || (proj.type == ModContent.ProjectileType<AstralSandBallFalling>());
|
||||
if (Player.Calamity().fallingBlockProtection && isFallingBlock)
|
||||
modifiers.Cancel();
|
||||
|
||||
bool isIgnoredTrap = (proj.type == ProjectileID.PoisonDartTrap) || (proj.type == ProjectileID.VenomDartTrap) || (proj.type == ProjectileID.PoisonDart);
|
||||
if (Player.Calamity().trapProtection && isIgnoredTrap)
|
||||
modifiers.Cancel();
|
||||
|
||||
bool isReducedTrap = (proj.trap || proj.type == ProjectileID.RollingCactusSpike || proj.type == ProjectileID.Landmine) && !isIgnoredTrap;
|
||||
if (Player.Calamity().trapProtection && isReducedTrap)
|
||||
modifiers.SourceDamage *= 0.35f;
|
||||
|
||||
// Reduce damage dealt by rainbow trails depending on how faded they are.
|
||||
if (proj.type == ProjectileID.HallowBossLastingRainbow)
|
||||
{
|
||||
@@ -1049,7 +1063,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
if (trinketOfChiBuff)
|
||||
projectileDamageReduction += 0.04;
|
||||
projectileDamageReduction += 0.08;
|
||||
|
||||
// Fearmonger set provides 15% multiplicative DR that ignores caps during the Holiday Moons.
|
||||
// To prevent abuse, this effect does not work if there are any bosses alive.
|
||||
|
||||
@@ -310,6 +310,7 @@ namespace CalamityMod.CalPlayer
|
||||
// Exact copy of vanilla Honey behavior, but does not stack with actually standing in Honey
|
||||
if (!Player.honey)
|
||||
{
|
||||
alwaysHoneyRegenAmount += 1;
|
||||
Player.lifeRegen += 2;
|
||||
Player.lifeRegenTime += 1;
|
||||
|
||||
@@ -317,6 +318,7 @@ namespace CalamityMod.CalPlayer
|
||||
// However, this can't bring regen into the positives.
|
||||
if (Player.lifeRegen < 0)
|
||||
{
|
||||
alwaysHoneyRegenAmount += Math.Min(1f, 0 - Player.lifeRegen/2f);
|
||||
Player.lifeRegen += 2;
|
||||
if (Player.lifeRegen > 0)
|
||||
Player.lifeRegen = 0;
|
||||
@@ -392,10 +394,13 @@ namespace CalamityMod.CalPlayer
|
||||
// Grant life regen based on missing health for Radiant Ooze, Ambrosial Ampule, and purity
|
||||
if (rOoze || aAmpoule || purity)
|
||||
{
|
||||
float missingLifeRatio = (Player.statLifeMax2 - Player.statLife) / Player.statLifeMax2;
|
||||
float missingLifeRatio = (Player.statLifeMax2 - Player.statLife) / (float)Player.statLifeMax2;
|
||||
//Ambrosial Ampule and ooze give between 2 and 6 hp/s
|
||||
float lifeRegenToGive = MathHelper.Lerp(4f, 12f, missingLifeRatio);
|
||||
Player.lifeRegen += (int)lifeRegenToGive;
|
||||
int lifeRegenToGive = (int)Math.Round(MathHelper.Lerp((purity || aAmpoule? 2f : 4f), (purity || aAmpoule ? 8f : 12f), missingLifeRatio));//Rounding is needed for it to ever actually give +6 hp/s, as the integer conversion would otherwise floor it.
|
||||
Player.lifeRegen += lifeRegenToGive;
|
||||
radiantOozeRegen += lifeRegenToGive / 2f;
|
||||
ambrosialAmpouleRegen += lifeRegenToGive / 2f;
|
||||
purityRegen += lifeRegenToGive / 2f;
|
||||
}
|
||||
|
||||
if (purity)
|
||||
@@ -428,6 +433,7 @@ namespace CalamityMod.CalPlayer
|
||||
// Count up total frames spent healing for slowdown.
|
||||
if (PurityHealSlowdownFrames < 900)
|
||||
++PurityHealSlowdownFrames;
|
||||
purityRegen += (60 / (float)healFrameCadence);
|
||||
}
|
||||
|
||||
// If the defense should be ticking down to some lower value, do that.
|
||||
@@ -771,6 +777,8 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
Player.lifeRegen += turboRegenPower;
|
||||
Player.lifeRegenTime += turboRegenPower;
|
||||
purityRegen += turboRegenPower/2f;
|
||||
if (!shadeRegen || cFreeze || purity) ambrosialAmpouleRegen += turboRegenPower/2f;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -227,6 +227,17 @@ namespace CalamityMod.CalPlayer
|
||||
Player.velocity.X *= 0.9f;
|
||||
}
|
||||
|
||||
// Tabi/Master Ninja Gear dash change
|
||||
if (Player.dashType == 1)
|
||||
{
|
||||
if (dashStart)
|
||||
Player.velocity.X *= 3.5f;
|
||||
if (Player.dashDelay == -1)
|
||||
{
|
||||
Player.velocity.X *= 0.9f;
|
||||
}
|
||||
}
|
||||
|
||||
if ((devilsDevastationKillMode || exaltedKillMode) && !Player.mount.Active)
|
||||
{
|
||||
float fxScale = 1;
|
||||
@@ -296,49 +307,19 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (dashStart)
|
||||
{
|
||||
Player.velocity.X *= 1.2f;
|
||||
Player.velocity.X *= 3f; // +200% dash speed
|
||||
int damage = (int)Player.GetBestClassDamage().ApplyTo(LeviathanAmbergris.ambergrisDashDamage);
|
||||
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center + Player.velocity * 1.5f, Vector2.Zero, ModContent.ProjectileType<LeviAmberDash>(), damage, 0f, Player.whoAmI);
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Vector2.Zero, ModContent.ProjectileType<LeviAmberDash>(), damage, 0f, Player.whoAmI);
|
||||
}
|
||||
|
||||
if (Player.miscCounter % 3 == 2 && Player.dashDelay > 0) // Reduced dash cooldown by 33%
|
||||
Player.dashDelay--;
|
||||
|
||||
if (Player.dashDelay == -1)// TODO: prevent working with special dashes, this was inconsitent with my old solution so I didn't keep it. not huge deal)
|
||||
{
|
||||
float numberOfDusts = 10f;
|
||||
float rotFactor = 180f / numberOfDusts;
|
||||
for (int i = 0; i < numberOfDusts; i++)
|
||||
{
|
||||
float rot = MathHelper.ToRadians(i * rotFactor);
|
||||
Vector2 offset = new Vector2(Player.velocity.X * dir * 0.7f + 6f, 0).RotatedBy(rot * Main.rand.NextFloat(4f, 5f));
|
||||
Vector2 velOffset = Vector2.Zero;
|
||||
Dust dust = Dust.NewDustPerfect(Player.Center + offset + Player.velocity, Main.rand.NextBool() ? 160 : 307, new Vector2(velOffset.X, velOffset.Y));
|
||||
dust.noGravity = true;
|
||||
dust.velocity = velOffset;
|
||||
dust.alpha = 100;
|
||||
dust.scale = (Player.velocity.X * dir * 0.08f);
|
||||
}
|
||||
if (Player.miscCounter % 4 == 0)
|
||||
{
|
||||
float sparkscale = (Player.velocity.X * dir * 0.07f);
|
||||
Vector2 SparkVelocity1 = Player.velocity.RotatedBy(dir * 2, default) * 0.1f - Player.velocity / 2f;
|
||||
LineParticle spark = new LineParticle(Player.Center + Player.velocity.RotatedBy(2f * dir) * 1.5f, SparkVelocity1, false, Main.rand.Next(11, 13), sparkscale, Main.rand.NextBool() ? Color.DarkTurquoise : Color.DodgerBlue);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
Vector2 SparkVelocity2 = Player.velocity.RotatedBy(dir * -2, default) * 0.1f - Player.velocity / 2f;
|
||||
LineParticle spark2 = new LineParticle(Player.Center + Player.velocity.RotatedBy(-2f * dir) * 1.5f, SparkVelocity2, false, Main.rand.Next(11, 13), sparkscale, Main.rand.NextBool() ? Color.DarkTurquoise : Color.DodgerBlue);
|
||||
GeneralParticleHandler.SpawnParticle(spark2);
|
||||
}
|
||||
if (Player.miscCounter % 4 == 0 && Player.velocity != Vector2.Zero) //every other frame spawn the hitbox
|
||||
{
|
||||
int damage = (int)Player.GetBestClassDamage().ApplyTo(LeviathanAmbergris.ambergrisDashDamage);
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center + Player.velocity * 1.5f, Vector2.Zero, ModContent.ProjectileType<LeviAmberDash>(), damage, 0f, Player.whoAmI);
|
||||
}
|
||||
}
|
||||
if (Player.dashDelay == -1)
|
||||
Player.velocity.X *= 0.9f;
|
||||
}
|
||||
|
||||
if (Pauldron)
|
||||
if (sPauldron)
|
||||
{
|
||||
if (dashStart)
|
||||
{
|
||||
@@ -346,37 +327,9 @@ namespace CalamityMod.CalPlayer
|
||||
int damage = (int)Player.GetBestClassDamage().ApplyTo(SlagsplitterPauldron.PauldronSlamDamage);
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center + Player.velocity * 1.5f, Vector2.Zero, ModContent.ProjectileType<PauldronDash>(), damage, 0, Player.whoAmI);
|
||||
}
|
||||
if (Player.dashDelay == -1)// TODO: prevent working with special dashes, this was inconsitent with my old solution so I didn't keep it. not huge deal)
|
||||
{
|
||||
int damage = (int)Player.GetBestClassDamage().ApplyTo(SlagsplitterPauldron.PauldronSlamDamage);
|
||||
if (Player.dashDelay == -1)
|
||||
Player.endurance += 0.1f;
|
||||
|
||||
float numberOfDusts = 10f;
|
||||
float rotFactor = 180f / numberOfDusts;
|
||||
for (int i = 0; i < numberOfDusts; i++)
|
||||
{
|
||||
float rot = MathHelper.ToRadians(i * rotFactor);
|
||||
Vector2 offset = new Vector2(MathF.Min(Player.velocity.X * dir * 0.7f + 8f, 20f), 0).RotatedBy(rot * Main.rand.NextFloat(4f, 5f));
|
||||
Vector2 velOffset = Vector2.Zero;
|
||||
Dust dust = Dust.NewDustPerfect(Player.Center + offset + Player.velocity, Main.rand.NextBool() ? 35 : 127, new Vector2(velOffset.X, velOffset.Y));
|
||||
dust.noGravity = true;
|
||||
dust.velocity = velOffset;
|
||||
dust.alpha = 100;
|
||||
dust.scale = MathF.Min(Player.velocity.X * dir * 0.08f, 1.2f);
|
||||
}
|
||||
float sparkscale = MathF.Min(Player.velocity.X * dir * 0.08f, 1.2f);
|
||||
Vector2 SparkVelocity1 = Player.velocity.RotatedBy(dir * -3, default) * 0.1f - Player.velocity / 2f;
|
||||
SparkParticle spark = new SparkParticle(Player.Center + Player.velocity.RotatedBy(2f * dir) * 1.5f, SparkVelocity1, false, Main.rand.Next(11, 13), sparkscale, Main.rand.NextBool() ? Color.DarkOrange : Color.OrangeRed);
|
||||
GeneralParticleHandler.SpawnParticle(spark);
|
||||
Vector2 SparkVelocity2 = Player.velocity.RotatedBy(dir * 3, default) * 0.1f - Player.velocity / 2f;
|
||||
SparkParticle spark2 = new SparkParticle(Player.Center + Player.velocity.RotatedBy(-2f * dir) * 1.5f, SparkVelocity2, false, Main.rand.Next(11, 13), sparkscale, Main.rand.NextBool() ? Color.DarkOrange : Color.OrangeRed);
|
||||
GeneralParticleHandler.SpawnParticle(spark2);
|
||||
|
||||
if (Player.miscCounter % 6 == 0 && Player.velocity != Vector2.Zero)
|
||||
{
|
||||
Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center + Player.velocity * 1.5f, Vector2.Zero, ModContent.ProjectileType<PauldronDash>(), SlagsplitterPauldron.PauldronSlamDamage, 0, Player.whoAmI);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (XykVisualsBlue || XykVisualsOrange)
|
||||
@@ -532,13 +485,17 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
float rageGen = 0f;
|
||||
|
||||
// Shattered Community provides constant rage generation (stronger than Heart of Darkness).
|
||||
// Shattered Community provides constant rage generation and overrides the value from Heart of Darkness.
|
||||
if (shatteredCommunity)
|
||||
{
|
||||
float scRageGen = rageMax * ShatteredCommunity.RagePerSecond / 60f;
|
||||
if (rageGen < scRageGen)
|
||||
rageGen = scRageGen;
|
||||
}
|
||||
|
||||
// 26MAR2025: Ozzatron: Shattered Community and Heart of Darkness have equal rage generation now.
|
||||
// It's easier to not change the code here to unify the cases, because there is no reason to.
|
||||
//
|
||||
// Heart of Darkness grants constant rage generation.
|
||||
else if (heartOfDarkness)
|
||||
{
|
||||
@@ -1270,9 +1227,6 @@ namespace CalamityMod.CalPlayer
|
||||
// Increase fall speed
|
||||
if (!Player.mount.Active)
|
||||
{
|
||||
if (Player.IsUnderwater() && ironBoots)
|
||||
Player.maxFallSpeed = 9f;
|
||||
|
||||
if (!Player.wet)
|
||||
{
|
||||
if (cirrusDress)
|
||||
@@ -1283,6 +1237,15 @@ namespace CalamityMod.CalPlayer
|
||||
Player.maxFallSpeed = 20f;
|
||||
}
|
||||
|
||||
if (Player.controlDown && ironBoots)
|
||||
{
|
||||
Player.maxFallSpeed = 23f; // This is slightly faster than slimy saddle (so it can be viable)
|
||||
if (Player.gravDir == 1 ? Player.velocity.Y <= 0 : Player.velocity.Y >= 0)
|
||||
Player.velocity.Y *= 0.7f;
|
||||
else if (Player.gravDir == 1 ? Player.velocity.Y < Player.maxFallSpeed : Player.velocity.Y > Player.maxFallSpeed)
|
||||
Player.velocity.Y = MathHelper.Lerp(Player.velocity.Y, Player.maxFallSpeed, 0.1f);
|
||||
}
|
||||
|
||||
if (LungingDown)
|
||||
{
|
||||
Player.maxFallSpeed = 80f;
|
||||
@@ -1403,7 +1366,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (!tentaclesPresent[i])
|
||||
{
|
||||
int damage = (int)Player.GetBestClassDamage().ApplyTo(390);
|
||||
int damage = (int)Player.GetBestClassDamage().ApplyTo(350);
|
||||
|
||||
var source = Player.GetSource_FromThis(OmegaBlueHelmet.TentacleEntitySourceContext);
|
||||
Vector2 vel = new Vector2(Main.rand.Next(-13, 14), Main.rand.Next(-13, 14)) * 0.25f;
|
||||
@@ -1414,10 +1377,10 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
float damageUp = 0.1f;
|
||||
int critUp = 10;
|
||||
if (omegaBlueHentai)
|
||||
if (omegaBlueAbyssalMadness)
|
||||
{
|
||||
damageUp *= 2f;
|
||||
critUp *= 2;
|
||||
damageUp += 0.1f;
|
||||
critUp += 10;
|
||||
}
|
||||
Player.GetDamage<GenericDamageClass>() += damageUp;
|
||||
Player.GetCritChance<GenericDamageClass>() += critUp;
|
||||
@@ -1726,6 +1689,49 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
if (ironBoots)
|
||||
{
|
||||
if (Player.controlDown)
|
||||
{
|
||||
if (Player.gravDir == 1 ? Player.velocity.Y > 0 : Player.velocity.Y < 0)
|
||||
fallingBootVelCheckTimer++;
|
||||
|
||||
if (Player.velocity.Y == 0 && fallingBootVelCheckTimer > 10)
|
||||
{
|
||||
float power = Utils.Remap(fallingBootVelCheckTimer, 10, 40, 0.1f, 1);
|
||||
float scaledPower = (float)Math.Pow(power, 3);
|
||||
int damage = (int)Player.GetBestClassDamage().ApplyTo(1500 * scaledPower); // Damage scales down thrice
|
||||
Vector2 playerFeet = Player.Center + Vector2.UnitY * 26 * Player.gravDir;
|
||||
|
||||
float blastSize = 120 * power;
|
||||
float minMultiplier = 0.1f;
|
||||
int hitsToMinMult = 6;
|
||||
int debuff = ModContent.BuffType<ArmorCrunch>();
|
||||
int debuffTime = (int)(300 * power);
|
||||
Projectile blast = Projectile.NewProjectileDirect(Player.GetSource_FromThis(), playerFeet, Vector2.Zero, ModContent.ProjectileType<BasicBurst>(), (int)(damage), -25 * power, Player.whoAmI, blastSize, minMultiplier, hitsToMinMult);
|
||||
blast.localAI[0] = debuff;
|
||||
blast.localAI[1] = debuffTime;
|
||||
blast.timeLeft = 5;
|
||||
|
||||
int particleNumber = (int)Math.Max(15 * power, 2);
|
||||
for (int i = -particleNumber; i <= particleNumber; i++)
|
||||
{
|
||||
Particle sparks = new AltSparkParticle(playerFeet, (Vector2.UnitX * (5 + Math.Abs(i)) * Math.Sign(i)).RotatedByRandom(0.25f) * Main.rand.NextFloat(0.5f, 1) * power, false, Main.rand.Next(17, 30 + 1), Main.rand.NextFloat(0.2f, 0.8f), Main.rand.NextBool() ? Color.Lerp(Color.Gold, Color.Silver, 0.3f) : Color.Silver);
|
||||
GeneralParticleHandler.SpawnParticle(sparks);
|
||||
}
|
||||
|
||||
SoundStyle sound = new("CalamityMod/Sounds/NPCHit/ExoHit3");
|
||||
SoundEngine.PlaySound(sound with { Volume = 0.6f * power, Pitch = Main.rand.NextFloat(0.6f, 0.8f) }, playerFeet);
|
||||
|
||||
Player.Calamity().GeneralScreenShakePower = 4 * scaledPower;
|
||||
fallingBootVelCheckTimer = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (Player.gravDir == 1 ? Player.velocity.Y <= 0 : Player.velocity.Y >= 0)
|
||||
fallingBootVelCheckTimer = 0;
|
||||
}
|
||||
|
||||
if (unstableGraniteCore)
|
||||
{
|
||||
zapActivity += 1;
|
||||
@@ -1861,6 +1867,8 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (arsenalCooldown > 0)
|
||||
arsenalCooldown--;
|
||||
if (Main.zenithWorld)
|
||||
arsenalCooldown = 0;
|
||||
if (killModeCooldown > 0)
|
||||
killModeCooldown--;
|
||||
if (ascendantInsigniaCooldown > 0 && ascendantInsigniaBuffTime <= 0)
|
||||
@@ -2109,8 +2117,8 @@ namespace CalamityMod.CalPlayer
|
||||
miningSetCooldown--;
|
||||
if (RustyMedallionCooldown > 0)
|
||||
RustyMedallionCooldown--;
|
||||
if (MiniSwamerCooldown > 0)
|
||||
MiniSwamerCooldown--;
|
||||
if (MiniSwarmerCooldown > 0)
|
||||
MiniSwarmerCooldown--;
|
||||
|
||||
// God Slayer Armor dash debuff immunity
|
||||
if (DashID == GodSlayerDash.ID && Player.dashDelay < 0)
|
||||
@@ -3652,8 +3660,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (vexation)
|
||||
{
|
||||
if (Player.statLife <= (int)(Player.statLifeMax2 * 0.5))
|
||||
Player.GetDamage<GenericDamageClass>() += 0.2f;
|
||||
Player.GetDamage<GenericDamageClass>() += 0.3f* (1 - Player.statLife / (float)Player.statLifeMax2);
|
||||
}
|
||||
|
||||
if (ataxiaBlaze)
|
||||
|
||||
@@ -774,9 +774,9 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
}
|
||||
if (dynamoStemCells && MiniSwamerCooldown <= 0 && proj.CountsAsClass<RangedDamageClass>())
|
||||
if (dynamoStemCells && MiniSwarmerCooldown <= 0 && proj.CountsAsClass<RangedDamageClass>())
|
||||
{
|
||||
MiniSwamerCooldown = DynamoStemCells.MiniSwamerCooldown;
|
||||
MiniSwarmerCooldown = DynamoStemCells.MiniSwarmerCooldown;
|
||||
|
||||
Vector2 velocity = proj.velocity.SafeNormalize(Vector2.UnitY) * 19;
|
||||
int MiniSwamerDamage = (int)Player.GetTotalDamage<RangedDamageClass>().ApplyTo(DynamoStemCells.MiniSwamerDamage);
|
||||
@@ -1256,12 +1256,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (vexation)
|
||||
{
|
||||
if ((Player.armor[0].type == ItemType<ReaverHeadTank>() || Player.armor[0].type == ItemType<ReaverHeadExplore>() ||
|
||||
Player.armor[0].type == ItemType<ReaverHeadMobility>()) && Player.armor[1].type == ItemType<ReaverScaleMail>() &&
|
||||
Player.armor[2].type == ItemType<ReaverCuisses>())
|
||||
{
|
||||
target.AddBuff(BuffID.Venom, 120, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
using CalamityMod.Enums;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Enums;
|
||||
using CalamityMod.Particles;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.CalPlayer.Dashes
|
||||
{
|
||||
@@ -13,45 +15,45 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
public override bool IsOmnidirectional => false;
|
||||
public int Time = 0;
|
||||
|
||||
public override float CalculateDashSpeed(Player player) => 20f;
|
||||
public override float CalculateDashSpeed(Player player) => (50f * player.moveSpeed);
|
||||
|
||||
public override void OnDashEffects(Player player)
|
||||
{
|
||||
Time = 0;
|
||||
for (int i = 0; i < 12; i++)
|
||||
for (int i = 0; i < 15; i++)
|
||||
{
|
||||
Vector2 smokePos = player.Center + new Vector2(Main.rand.Next(-player.width, player.width), Main.rand.Next(-player.height, player.height)) * 0.8f;
|
||||
Vector2 smokeVel = Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * Main.rand.NextFloat(1.25f, 1.75f);
|
||||
HeavySmokeParticle onDashSmoke = new(smokePos, smokeVel, Color.Gray, 30, 0.5f, 0.75f, 0.2f * Main.rand.NextFloatDirection());
|
||||
GeneralParticleHandler.SpawnParticle(onDashSmoke);
|
||||
Vector2 intenededVel = (MathHelper.TwoPi * i / 15f).ToRotationVector2() * 1.5f;
|
||||
Vector2 fxVel = new Vector2(intenededVel.X, intenededVel.Y * 2.3f).RotatedBy(player.velocity.ToRotation());
|
||||
Vector2 fxPlace = player.Center + fxVel.RotatedBy(player.velocity.ToRotation()) + player.velocity.SafeNormalize(Vector2.UnitX) * 60;
|
||||
|
||||
Color dustColor = Main.rand.NextBool() ? Color.Purple : Color.DarkSlateBlue;
|
||||
|
||||
int dustStyle = ModContent.DustType<SquashDust>();
|
||||
Dust dust2 = Dust.NewDustPerfect(fxPlace, dustStyle, (fxVel - player.velocity.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(4, 5)) * Main.rand.NextFloat(1.2f, 1.5f));
|
||||
dust2.scale = Main.rand.NextFloat(1.6f, 2.3f) * 1.8f;
|
||||
dust2.color = dustColor;
|
||||
dust2.noGravity = true;
|
||||
dust2.fadeIn = 1.5f;
|
||||
}
|
||||
}
|
||||
|
||||
public override void MidDashEffects(Player player, ref float dashSpeed, ref float dashSpeedDecelerationFactor, ref float runSpeedDecelerationFactor)
|
||||
{
|
||||
Time++;
|
||||
if (Time % 3 == 0)
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
int colorType = Main.rand.Next(3);
|
||||
Color smokeColor = Color.White;
|
||||
switch (colorType)
|
||||
{
|
||||
case 0:
|
||||
smokeColor = Color.Gray;
|
||||
break;
|
||||
case 1:
|
||||
smokeColor = new Color(28, 75, 163);
|
||||
break;
|
||||
case 2:
|
||||
smokeColor = new Color(195, 0, 255);
|
||||
break;
|
||||
}
|
||||
|
||||
Vector2 smokePos = player.Center - (player.velocity * 1.25f) + Main.rand.NextVector2Circular(10, 20);
|
||||
float smokeScale = player.velocity.X * 0.045f;
|
||||
HeavySmokeParticle midDashSmoke = new(smokePos, player.velocity * 0.2f, smokeColor, 20, smokeScale, 0.75f, 0.2f * Main.rand.NextFloatDirection(), true);
|
||||
HeavySmokeParticle midDashSmoke = new(player.Center + Main.rand.NextVector2Circular(15, 15), -player.velocity.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(5, 9), Main.rand.NextBool() ? Color.Purple : Color.DarkSlateBlue, 16, Main.rand.NextFloat(0.7f, 0.9f), 0.55f, 0.2f * Main.rand.NextFloatDirection(), true);
|
||||
GeneralParticleHandler.SpawnParticle(midDashSmoke);
|
||||
}
|
||||
|
||||
int dustStyle = ModContent.DustType<SquashDust>();
|
||||
Dust dust2 = Dust.NewDustPerfect(player.Center + Main.rand.NextVector2Circular(15, 15), dustStyle, player.velocity.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(5, 9));
|
||||
dust2.scale = Main.rand.NextFloat(0.9f, 1.7f);
|
||||
dust2.color = Main.rand.NextBool() ? Color.Purple : Color.DarkSlateBlue;
|
||||
dust2.noGravity = true;
|
||||
dust2.fadeIn = 0.5f;
|
||||
|
||||
player.velocity.X *= 0.93f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,14 @@
|
||||
using CalamityMod.Enums;
|
||||
using System;
|
||||
using System.Security.Policy;
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Enums;
|
||||
using CalamityMod.Graphics.Metaballs;
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using Microsoft.Xna.Framework;
|
||||
using rail;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.CalPlayer.Dashes
|
||||
@@ -16,29 +22,84 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
public override bool IsOmnidirectional => false;
|
||||
public int Time = 0;
|
||||
public bool AngleSwap = true;
|
||||
public Vector2 aimVel;
|
||||
public bool strongVisuals = true;
|
||||
|
||||
public override float CalculateDashSpeed(Player player) => 25.4f;
|
||||
public override float CalculateDashSpeed(Player player) => (75f * player.moveSpeed);
|
||||
|
||||
public override void OnDashEffects(Player player)
|
||||
{
|
||||
strongVisuals = player.Calamity().voidSashVisuals;
|
||||
Time = 0;
|
||||
aimVel = player.velocity;
|
||||
|
||||
if (strongVisuals)
|
||||
{
|
||||
SoundStyle sound = new("CalamityMod/Sounds/Item/VoidDash");
|
||||
SoundEngine.PlaySound(sound with { Volume = 0.7f, Pitch = Main.rand.NextFloat(-0.15f, 0.15f) }, player.Center);
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
Vector2 intenededVel = (MathHelper.TwoPi * i / 40f).ToRotationVector2() * 5.5f;
|
||||
Vector2 fxVel = new Vector2(intenededVel.X, intenededVel.Y * 2.3f).RotatedBy(player.velocity.ToRotation());
|
||||
Vector2 fxPlace = player.Center + fxVel.RotatedBy(player.velocity.ToRotation()) + player.velocity.SafeNormalize(Vector2.UnitX) * 60;
|
||||
|
||||
SignusMetaball.SpawnParticle(fxPlace, fxVel - player.velocity.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(6, 9), 60f * Main.rand.NextFloat(0.7f, 1), 60, new Vector2(1.8f, 0.9f), 0.06f, 0);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 30; i++)
|
||||
{
|
||||
Vector2 intenededVel = (MathHelper.TwoPi * i / 30f).ToRotationVector2() * 5.5f;
|
||||
Vector2 fxVel = new Vector2(intenededVel.X, intenededVel.Y * 2.3f).RotatedBy(player.velocity.ToRotation());
|
||||
Vector2 fxPlace = player.Center + fxVel.RotatedBy(player.velocity.ToRotation()) + player.velocity.SafeNormalize(Vector2.UnitX) * 60;
|
||||
|
||||
Color dustColor = Main.rand.NextBool(3) ? Color.Indigo : Color.DarkOrchid;
|
||||
|
||||
int dustStyle = ModContent.DustType<SquashDust>();
|
||||
Dust dust2 = Dust.NewDustPerfect(fxPlace, dustStyle, (fxVel - player.velocity.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(6, 9)) * Main.rand.NextFloat(1.2f, 1.5f));
|
||||
dust2.scale = Main.rand.NextFloat(1.6f, 2.3f) * 2.3f;
|
||||
dust2.color = dustColor;
|
||||
dust2.noGravity = true;
|
||||
dust2.fadeIn = 1.5f;
|
||||
}
|
||||
}
|
||||
|
||||
public override void MidDashEffects(Player player, ref float dashSpeed, ref float dashSpeedDecelerationFactor, ref float runSpeedDecelerationFactor)
|
||||
{
|
||||
Time++;
|
||||
if (Time % 3 == 0)
|
||||
aimVel = Vector2.Lerp(aimVel, player.velocity, 0.2f);
|
||||
|
||||
float fxFade = Utils.GetLerpValue(5, 15, Math.Abs(aimVel.X), true);
|
||||
|
||||
Vector2 trailPos = player.Center - (aimVel * 2) + Main.rand.NextVector2Circular(10, 20);
|
||||
float trailScale = 1 * fxFade;
|
||||
Color trailColor = Main.rand.NextBool(3) ? Color.Indigo : Color.DarkOrchid;
|
||||
|
||||
int dustStyle = ModContent.DustType<SquashDust>();
|
||||
Dust dust2 = Dust.NewDustPerfect(trailPos, dustStyle, aimVel.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(9, 15));
|
||||
dust2.scale = Main.rand.NextFloat(0.9f, 1.7f);
|
||||
dust2.color = trailColor;
|
||||
dust2.noGravity = true;
|
||||
dust2.fadeIn = 0.5f;
|
||||
|
||||
if (strongVisuals)
|
||||
{
|
||||
Vector2 trailPos = player.Center - (player.velocity * 2) + Main.rand.NextVector2Circular(10, 20);
|
||||
float trailScale = player.velocity.X * player.direction * 0.08f;
|
||||
Color trailColor = Main.rand.NextBool(3) ? Color.Indigo : Color.DarkOrchid;
|
||||
Particle Trail = new SparkParticle(trailPos, player.velocity * 0.2f, false, 35, trailScale, trailColor);
|
||||
GeneralParticleHandler.SpawnParticle(Trail);
|
||||
SignusMetaball.SpawnParticle(player.Center + Main.rand.NextVector2Circular(20, 20), -aimVel.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(5, 15), 120f * Main.rand.NextFloat(0.7f, 1f), 60, new Vector2(0.8f, 1.2f), 0.08f, 0);
|
||||
|
||||
int dir = MathF.Sign(aimVel.X);
|
||||
Vector2 safeVel = aimVel.SafeNormalize(Vector2.UnitX);
|
||||
float sparkscale2 = 0.35f * Math.Max(fxFade, 0.5f);
|
||||
for (int i = -1; i <= 1; i += 2)
|
||||
{
|
||||
Vector2 fxVelocity = safeVel.RotatedBy(dir * MathHelper.ToRadians(75) * -i) - safeVel * 3;
|
||||
Vector2 fxPlace = player.Center + (safeVel * 35).RotatedBy(-0.2f * dir * i) * 1.5f;
|
||||
|
||||
SignusMetaball.SpawnParticle(fxPlace, fxVelocity * Main.rand.NextFloat(5, 8), 50f * Main.rand.NextFloat(0.7f, 1f), 8, new Vector2(0.8f, 1.2f), 0.18f, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// Periodically release scythes.
|
||||
player.Calamity().statisTimer++;
|
||||
if (Main.myPlayer == player.whoAmI && player.Calamity().statisTimer % 5 == 0)
|
||||
if (Main.myPlayer == player.whoAmI && player.Calamity().statisTimer % 2 == 0 && false)
|
||||
{
|
||||
int scytheDamage = (int)player.GetBestClassDamage().ApplyTo(250);
|
||||
|
||||
@@ -54,8 +115,7 @@ namespace CalamityMod.CalPlayer.Dashes
|
||||
|
||||
}
|
||||
|
||||
// Dash at a faster speed than the default value.
|
||||
dashSpeed = 14f;
|
||||
player.velocity.X *= 0.912f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -84,6 +84,8 @@ namespace CalamityMod.CalPlayer.DrawLayers
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Melee/PrismaticBreakerGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<PulseRifle>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/DraedonsArsenal/PulseRifleGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<GaussRifle>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/DraedonsArsenal/GaussRifleGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<SoulPiercer>())
|
||||
glowMask = ModContent.Request<Texture2D>("CalamityMod/Items/Weapons/Magic/SoulPiercerGlow").Value;
|
||||
else if (itemType == ModContent.ItemType<StarburstShiv>())
|
||||
|
||||
@@ -10,4 +10,4 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="tModLoader.CodeAssist" Version="0.1.5" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -2,7 +2,6 @@
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.Localization;
|
||||
using static CalamityMod.CalamityUtils;
|
||||
|
||||
namespace CalamityMod.Cooldowns
|
||||
{
|
||||
@@ -15,7 +14,13 @@ namespace CalamityMod.Cooldowns
|
||||
public override Color OutlineColor => Color.White;
|
||||
public override Color CooldownStartColor => Color.Sienna;
|
||||
public override Color CooldownEndColor => Color.LightSlateGray;
|
||||
public override void Tick()
|
||||
{
|
||||
if (Main.zenithWorld)
|
||||
instance.timeLeft = -1;
|
||||
|
||||
}
|
||||
|
||||
public override SoundStyle? EndSound => new("CalamityMod/Sounds/Item/ArsenalOffCooldown");
|
||||
public override SoundStyle? EndSound => (Main.zenithWorld ? null : new("CalamityMod/Sounds/Item/ArsenalOffCooldown"));
|
||||
}
|
||||
}
|
||||
@@ -707,13 +707,13 @@ namespace CalamityMod
|
||||
{ new Tuple<int, int>(ModContent.NPCType<AstrumAureus>(), ModContent.ProjectileType<AstralFlame>()), new int[] { 100, 172, 208, 244, 366 } },
|
||||
{ new Tuple<int, int>(ModContent.NPCType<AureusSpawn>(), ModContent.ProjectileType<AstralLaser>()), new int[] { 88, 156, 184, 212, 318 } },
|
||||
|
||||
{ new Tuple<int, int>(NPCID.Golem, ProjectileID.Fireball), new int[] { 72, 132, 160, 188, 282 } },
|
||||
{ new Tuple<int, int>(NPCID.Golem, ProjectileID.Fireball), new int[] { 60, 120, 140, 180, 270 } },
|
||||
{ new Tuple<int, int>(NPCID.Golem, ProjectileID.EyeBeam), new int[] { 80, 140, 172, 204, 306 } },
|
||||
{ new Tuple<int, int>(NPCID.GolemHead, ProjectileID.Fireball), new int[] { 60, 120, 160, 200, 300 } },
|
||||
{ new Tuple<int, int>(NPCID.GolemHead, ProjectileID.Fireball), new int[] { 60, 120, 140, 180, 270 } },
|
||||
{ new Tuple<int, int>(NPCID.GolemHead, ProjectileID.EyeBeam), new int[] { 80, 140, 172, 204, 306 } },
|
||||
{ new Tuple<int, int>(NPCID.GolemFistLeft, ProjectileID.InfernoHostileBolt), new int[] { 88, 156, 184, 212, 318 } },
|
||||
{ new Tuple<int, int>(NPCID.GolemFistRight, ProjectileID.InfernoHostileBolt), new int[] { 88, 156, 184, 212, 318 } },
|
||||
{ new Tuple<int, int>(NPCID.GolemHeadFree, ProjectileID.Fireball), new int[] { 60, 120, 160, 200, 300 } },
|
||||
{ new Tuple<int, int>(NPCID.GolemHeadFree, ProjectileID.Fireball), new int[] { 60, 120, 140, 180, 270 } },
|
||||
{ new Tuple<int, int>(NPCID.GolemHeadFree, ProjectileID.EyeBeam), new int[] { 80, 140, 172, 204, 306 } },
|
||||
{ new Tuple<int, int>(NPCID.GolemHeadFree, ProjectileID.InfernoHostileBolt), new int[] { 88, 156, 184, 212, 318 } },
|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Dusts
|
||||
{
|
||||
public class DiamondDust : ModDust
|
||||
{
|
||||
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
||||
public override void OnSpawn(Dust dust)
|
||||
{
|
||||
dust.scale *= Main.rand.NextFloat(0.8f, 1f);
|
||||
}
|
||||
|
||||
public override bool Update(Dust dust)
|
||||
{
|
||||
dust.rotation = dust.velocity.ToRotation() + MathHelper.PiOver2;
|
||||
|
||||
dust.velocity *= 0.96f;
|
||||
if (dust.noGravity)
|
||||
dust.scale -= 0.045f;
|
||||
else
|
||||
{
|
||||
dust.scale -= 0.03f;
|
||||
dust.velocity.Y += Main.rand.NextFloat(0.1f, 0.35f);
|
||||
}
|
||||
|
||||
float light = MathHelper.Clamp(dust.scale * 0.8f, 0f, 1f);
|
||||
if (!dust.noLightEmittence)
|
||||
Lighting.AddLight(dust.position, dust.color.ToVector3() * light);
|
||||
|
||||
if (dust.scale <= 0)
|
||||
dust.active = false;
|
||||
|
||||
dust.position += dust.velocity;
|
||||
dust.fadeIn++; // Fade in is used for the time strech instead
|
||||
|
||||
return false;
|
||||
}
|
||||
public override bool PreDraw(Dust dust)
|
||||
{
|
||||
Vector2 dustCenter = dust.position + new Vector2(0.25f, 0.25f);
|
||||
|
||||
Texture2D bloom = ModContent.Request<Texture2D>("CalamityMod/Particles/SquareRotated").Value;
|
||||
|
||||
// dust.fadeIn is used to determine how intense the squash is, 1 is no squash, 0 is normal squash
|
||||
float squashLerp = Utils.GetLerpValue(10, 25, dust.fadeIn, true);
|
||||
Vector2 squash = new Vector2(MathHelper.Lerp(1, 0.3f, squashLerp), MathHelper.Lerp(1, 7f, squashLerp));
|
||||
|
||||
// Glow Orb
|
||||
Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.1f, SpriteEffects.None, 0);
|
||||
if (dust.alpha < 1)
|
||||
Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.2f) with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.09f, SpriteEffects.None, 0);
|
||||
if (!dust.noLight)
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.4f) with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha) * (i == 0 ? 1f : 0.7f), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.08f * (i == 0 ? 0.7f : 1), SpriteEffects.None, 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
using System;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Dusts
|
||||
{
|
||||
public class SquareDust : ModDust
|
||||
{
|
||||
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
||||
public override void OnSpawn(Dust dust)
|
||||
{
|
||||
dust.scale *= Main.rand.NextFloat(0.8f, 1f);
|
||||
dust.rotation = Main.rand.NextFloat(-5, 5);
|
||||
}
|
||||
|
||||
public override bool Update(Dust dust)
|
||||
{
|
||||
float fadeSpeed = (dust.fadeIn + 1);
|
||||
float rotDir = Math.Sign(dust.rotation);
|
||||
dust.rotation += 0.04f * dust.scale * rotDir;
|
||||
dust.velocity *= 0.96f * fadeSpeed;
|
||||
if (dust.noGravity)
|
||||
dust.scale -= 0.045f * fadeSpeed;
|
||||
else
|
||||
{
|
||||
dust.scale -= 0.03f * fadeSpeed;
|
||||
dust.velocity.Y += Main.rand.NextFloat(0.1f, 0.35f) * fadeSpeed;
|
||||
}
|
||||
|
||||
float light = MathHelper.Clamp(dust.scale * 0.8f, 0f, 1f);
|
||||
if (!dust.noLightEmittence)
|
||||
Lighting.AddLight(dust.position, dust.color.ToVector3() * light);
|
||||
|
||||
if (dust.scale <= 0)
|
||||
dust.active = false;
|
||||
|
||||
dust.position += dust.velocity;
|
||||
|
||||
return false;
|
||||
}
|
||||
public override bool PreDraw(Dust dust)
|
||||
{
|
||||
Vector2 dustCenter = dust.position + new Vector2(0.25f, 0.25f);
|
||||
|
||||
Texture2D bloom = ModContent.Request<Texture2D>("CalamityMod/Particles/GlowSquareParticleThick").Value;
|
||||
|
||||
Vector2 squash = Vector2.One;
|
||||
|
||||
// Glow Orb
|
||||
Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.1f, SpriteEffects.None, 0);
|
||||
if (dust.alpha < 1)
|
||||
Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.3f) with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.095f, SpriteEffects.None, 0);
|
||||
if (!dust.noLight)
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.3f) with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.09f, SpriteEffects.None, 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Dusts
|
||||
{
|
||||
public class SquashDust : ModDust
|
||||
{
|
||||
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
||||
public override void OnSpawn(Dust dust)
|
||||
{
|
||||
dust.scale *= Main.rand.NextFloat(0.8f, 1f);
|
||||
}
|
||||
|
||||
public override bool Update(Dust dust)
|
||||
{
|
||||
float fadeSpeed = (dust.fadeIn + 1);
|
||||
dust.rotation = dust.velocity.ToRotation() + MathHelper.PiOver2;
|
||||
dust.velocity *= 0.96f;
|
||||
if (dust.noGravity)
|
||||
dust.scale -= 0.045f * fadeSpeed;
|
||||
else
|
||||
{
|
||||
dust.scale -= 0.03f * fadeSpeed;
|
||||
dust.velocity.Y += Main.rand.NextFloat(0.1f, 0.35f) * fadeSpeed;
|
||||
}
|
||||
|
||||
float light = MathHelper.Clamp(dust.scale * 0.8f, 0f, 1f);
|
||||
if (!dust.noLightEmittence)
|
||||
Lighting.AddLight(dust.position, dust.color.ToVector3() * light);
|
||||
|
||||
if (dust.scale <= 0)
|
||||
dust.active = false;
|
||||
|
||||
dust.position += dust.velocity;
|
||||
|
||||
return false;
|
||||
}
|
||||
public override bool PreDraw(Dust dust)
|
||||
{
|
||||
Vector2 dustCenter = dust.position + new Vector2(0.25f, 0.25f);
|
||||
Texture2D solidCenter = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/BasicCircle").Value;
|
||||
|
||||
Texture2D bloom = ModContent.Request<Texture2D>("CalamityMod/Particles/BloomCircle").Value;
|
||||
|
||||
Vector2 squash = new Vector2(Utils.Remap(dust.velocity.Length(), 2, 7, 1, 0.5f), Utils.Remap(dust.velocity.Length(), 2, 7, 1, 2.5f));
|
||||
|
||||
// Glow Orb
|
||||
Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.1f, SpriteEffects.None, 0);
|
||||
if (dust.alpha < 1)
|
||||
Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.04f, SpriteEffects.None, 0);
|
||||
if (!dust.noLight)
|
||||
{
|
||||
Main.EntitySpriteDraw(solidCenter, dustCenter - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.3f) with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, solidCenter.Size() * 0.5f, squash * dust.scale * 0.075f, SpriteEffects.None, 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Dusts
|
||||
{
|
||||
public class SquashDustHollow : ModDust
|
||||
{
|
||||
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
||||
public override void OnSpawn(Dust dust)
|
||||
{
|
||||
dust.scale *= Main.rand.NextFloat(0.8f, 1f);
|
||||
}
|
||||
|
||||
public override bool Update(Dust dust)
|
||||
{
|
||||
dust.rotation = dust.velocity.ToRotation() + MathHelper.PiOver2;
|
||||
dust.velocity *= 0.96f;
|
||||
if (dust.noGravity)
|
||||
dust.scale -= 0.045f;
|
||||
else
|
||||
{
|
||||
dust.scale -= 0.03f;
|
||||
dust.velocity.Y += Main.rand.NextFloat(0.1f, 0.35f);
|
||||
}
|
||||
|
||||
float light = MathHelper.Clamp(dust.scale * 0.8f, 0f, 1f);
|
||||
if (!dust.noLightEmittence)
|
||||
Lighting.AddLight(dust.position, dust.color.ToVector3() * light);
|
||||
|
||||
if (dust.scale <= 0)
|
||||
dust.active = false;
|
||||
|
||||
dust.position += dust.velocity;
|
||||
|
||||
return false;
|
||||
}
|
||||
public override bool PreDraw(Dust dust)
|
||||
{
|
||||
Vector2 dustCenter = dust.position + new Vector2(0.25f, 0.25f);
|
||||
|
||||
Texture2D bloom = ModContent.Request<Texture2D>("CalamityMod/Particles/BloomRing").Value;
|
||||
|
||||
// dust.fadeIn is used to determine how intense the squash is, 1 is no squash, 0 is normal squash
|
||||
Vector2 squash = Vector2.Lerp(new Vector2(Utils.Remap(dust.velocity.Length(), 2, 7, 1, 0.5f), Utils.Remap(dust.velocity.Length(), 2, 7, 1, 2.5f)), Vector2.One, dust.fadeIn);
|
||||
|
||||
// Glow Orb
|
||||
Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.1f, SpriteEffects.None, 0);
|
||||
if (dust.alpha < 1)
|
||||
Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.2f) with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.09f, SpriteEffects.None, 0);
|
||||
if (!dust.noLight)
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.4f) with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.075f, SpriteEffects.None, 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Dusts
|
||||
{
|
||||
public class SquashDustTileTouch : ModDust
|
||||
{
|
||||
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
||||
public override void OnSpawn(Dust dust)
|
||||
{
|
||||
dust.scale *= Main.rand.NextFloat(0.8f, 1f);
|
||||
}
|
||||
|
||||
public override bool Update(Dust dust)
|
||||
{
|
||||
bool touchedTiles = false;
|
||||
int size = (int)(2);
|
||||
if (Collision.SolidCollision(dust.position, size, size))
|
||||
{
|
||||
touchedTiles = true;
|
||||
dust.velocity = Vector2.Zero;
|
||||
}
|
||||
float fadeSpeed = (dust.fadeIn + 1); // For this dust, fadeIn is used to increase the power of gravity if it's active, otherwise it makes it's lifetime change
|
||||
dust.rotation = dust.velocity.ToRotation() + MathHelper.PiOver2;
|
||||
dust.velocity *= 0.96f;
|
||||
if (dust.noGravity)
|
||||
dust.scale -= 0.045f * (touchedTiles ? 0.4f : 1) * fadeSpeed;
|
||||
else
|
||||
{
|
||||
dust.scale -= 0.03f * (touchedTiles ? 0.4f : 1);
|
||||
dust.velocity.Y += Main.rand.NextFloat(0.1f, 0.35f) * fadeSpeed;
|
||||
}
|
||||
|
||||
float light = MathHelper.Clamp(dust.scale * 0.8f, 0f, 1f);
|
||||
if (!dust.noLightEmittence)
|
||||
Lighting.AddLight(dust.position, dust.color.ToVector3() * light);
|
||||
|
||||
if (dust.scale <= 0)
|
||||
dust.active = false;
|
||||
|
||||
if (!touchedTiles)
|
||||
dust.position += dust.velocity;
|
||||
|
||||
return false;
|
||||
}
|
||||
public override bool PreDraw(Dust dust)
|
||||
{
|
||||
Vector2 dustCenter = dust.position + new Vector2(0.25f, 0.25f);
|
||||
Texture2D solidCenter = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/BasicCircle").Value;
|
||||
|
||||
Texture2D bloom = ModContent.Request<Texture2D>("CalamityMod/Particles/BloomCircle").Value;
|
||||
|
||||
Vector2 squash = new Vector2(Utils.Remap(dust.velocity.Length(), 2, 7, 1, 0.5f), Utils.Remap(dust.velocity.Length(), 2, 7, 1, 2.5f));
|
||||
|
||||
// Glow Orb
|
||||
Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.1f, SpriteEffects.None, 0);
|
||||
if (dust.alpha < 1)
|
||||
Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.04f, SpriteEffects.None, 0);
|
||||
if (!dust.noLight)
|
||||
{
|
||||
Main.EntitySpriteDraw(solidCenter, dustCenter - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.3f) with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, solidCenter.Size() * 0.5f, squash * dust.scale * 0.075f, SpriteEffects.None, 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
using System;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Dusts
|
||||
{
|
||||
public class UnstableDust : ModDust
|
||||
{
|
||||
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
||||
public override void OnSpawn(Dust dust)
|
||||
{
|
||||
dust.scale *= Main.rand.NextFloat(0.8f, 1f);
|
||||
dust.rotation = Main.rand.NextFloat(-5, 5);
|
||||
}
|
||||
|
||||
public override bool Update(Dust dust)
|
||||
{
|
||||
float rotDir = Math.Sign(dust.rotation);
|
||||
dust.rotation += 0.5f * dust.scale * rotDir;
|
||||
dust.velocity *= 0.96f;
|
||||
if (dust.noGravity)
|
||||
dust.scale -= 0.045f;
|
||||
else
|
||||
{
|
||||
dust.scale -= 0.03f;
|
||||
dust.velocity.Y += Main.rand.NextFloat(0.1f, 0.35f);
|
||||
}
|
||||
|
||||
float light = MathHelper.Clamp(dust.scale * 0.8f, 0f, 1f);
|
||||
if (!dust.noLightEmittence)
|
||||
Lighting.AddLight(dust.position, dust.color.ToVector3() * light);
|
||||
|
||||
if (dust.scale <= 0)
|
||||
dust.active = false;
|
||||
|
||||
dust.position += dust.velocity;
|
||||
// dust.fadeIn is used to change the shake intensity, -2 will negate it
|
||||
dust.position += Main.rand.NextVector2Circular(dust.fadeIn + 2, dust.fadeIn + 2);
|
||||
|
||||
return false;
|
||||
}
|
||||
public override bool PreDraw(Dust dust)
|
||||
{
|
||||
Vector2 dustCenter = dust.position + new Vector2(0.25f, 0.25f);
|
||||
|
||||
Texture2D bloom = ModContent.Request<Texture2D>("CalamityMod/Particles/FullStar").Value;
|
||||
|
||||
Vector2 squash = new Vector2(0.4f, 1);
|
||||
float texScaling = 6;
|
||||
|
||||
Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.1f * texScaling, SpriteEffects.None, 0);
|
||||
if (dust.alpha < 1)
|
||||
Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, dust.color with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.04f * texScaling, SpriteEffects.None, 0);
|
||||
if (!dust.noLight)
|
||||
{
|
||||
Main.EntitySpriteDraw(bloom, dustCenter - Main.screenPosition, null, Color.Lerp(dust.color, Color.White, 0.3f) with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, bloom.Size() * 0.5f, squash * dust.scale * 0.025f * texScaling, SpriteEffects.None, 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Effects
|
||||
{
|
||||
public class ArsenalEffects
|
||||
{
|
||||
public static int ArsenalDust = 278; // Colorable firework dust, simple and effective. Most visuals use a mix of the energy respective dust and this
|
||||
|
||||
// Plasma
|
||||
public static int ArsenalPlasmaDust = ModContent.DustType<SquashDustTileTouch>();
|
||||
public static Color ArsenalPlasmaColor = Color.Lerp(Color.Green, Color.Chartreuse, 0.45f);
|
||||
// Laser
|
||||
public static int ArsenalLaserDust = ModContent.DustType<DiamondDust>();
|
||||
public static Color ArsenalLaserColor = Color.Lerp(Color.Crimson, Color.Red, 0.45f);
|
||||
// Pulse
|
||||
public static int ArsenalPulseDust = ModContent.DustType<SquashDustHollow>();
|
||||
public static Color ArsenalPulseColor = Color.Lerp(Color.DarkOrchid, Color.Magenta, 0.35f);
|
||||
// Electric
|
||||
public static int ArsenalElectricDust = ModContent.DustType<UnstableDust>();
|
||||
public static Color ArsenalElectricColor = Color.Lerp(Color.Aqua, Color.Aquamarine, 0.35f);
|
||||
// Gauss
|
||||
public static int ArsenalGaussDust = ModContent.DustType<SquareDust>();
|
||||
public static Color ArsenalGaussColor = Color.Lerp(Color.Yellow, Color.Goldenrod, 0.25f);
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
@@ -0,0 +1,144 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using ReLogic.Content;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Graphics.Metaballs
|
||||
{
|
||||
public class SignusMetaball : Metaball
|
||||
{
|
||||
public Color borderColor = Color.Purple;
|
||||
public Vector2 goalDir = Vector2.Zero;
|
||||
public Vector2 scrollDir = Vector2.Zero;
|
||||
public class CosmicParticle
|
||||
{
|
||||
public float Size;
|
||||
|
||||
public Vector2 Velocity;
|
||||
|
||||
public Vector2 Center;
|
||||
public Vector2 BaseSquash = Vector2.One;
|
||||
public float Rotation;
|
||||
public float ShrinkSpeed = 0;
|
||||
public int Lifetime;
|
||||
public float SquashPower = 0;
|
||||
public int time = 0;
|
||||
|
||||
public CosmicParticle(Vector2 center, Vector2 velocity, float size, int lifetime, Vector2 squash, float shrinkSpeed = 0, float velocitySquash = 0)
|
||||
{
|
||||
Center = center;
|
||||
Velocity = velocity;
|
||||
Size = size;
|
||||
Rotation = Velocity.ToRotation() + MathHelper.PiOver2;
|
||||
BaseSquash = squash;
|
||||
Lifetime = lifetime;
|
||||
ShrinkSpeed = shrinkSpeed;
|
||||
SquashPower = velocitySquash;
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
Center += Velocity;
|
||||
Velocity *= 0.95f;
|
||||
if ((float)time / (float)Lifetime > 0.5f)
|
||||
{
|
||||
Size *= 0.94f;
|
||||
}
|
||||
BaseSquash.X *= (1 - 0.2f * ShrinkSpeed);
|
||||
BaseSquash.Y *= (1 + 0.2f * ShrinkSpeed);
|
||||
Rotation = Velocity.ToRotation() + MathHelper.PiOver2;
|
||||
time++;
|
||||
}
|
||||
}
|
||||
public static Asset<Texture2D> LayerAsset
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
public static List<CosmicParticle> Particles
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
} = new();
|
||||
|
||||
public override bool AnythingToDraw => Particles.Any();
|
||||
|
||||
public override IEnumerable<Texture2D> Layers
|
||||
{
|
||||
get
|
||||
{
|
||||
yield return LayerAsset.Value;
|
||||
}
|
||||
}
|
||||
|
||||
public override MetaballDrawLayer DrawContext => MetaballDrawLayer.BeforeNPCs;
|
||||
public override void Load()
|
||||
{
|
||||
if (Main.dedServ)
|
||||
return;
|
||||
|
||||
// Load the layer asset wrapper.
|
||||
LayerAsset = ModContent.Request<Texture2D>($"CalamityMod/Graphics/Metaballs/SignusLayer", AssetRequestMode.ImmediateLoad);
|
||||
}
|
||||
|
||||
public override void Update()
|
||||
{
|
||||
if (goalDir == Vector2.Zero)
|
||||
goalDir = Vector2.One.RotatedByRandom(Math.PI);
|
||||
if ((int)(Main.GlobalTimeWrappedHourly * 50) % 5 == 0)
|
||||
{
|
||||
goalDir = goalDir.RotatedByRandom(0.13f);
|
||||
}
|
||||
scrollDir = Vector2.Lerp(scrollDir, goalDir, 0.01f);
|
||||
|
||||
float rate = Main.GlobalTimeWrappedHourly * 19;
|
||||
List<Color> colors = new List<Color>()
|
||||
{
|
||||
Color.Purple,
|
||||
Color.BlueViolet,
|
||||
Color.DarkViolet
|
||||
};
|
||||
|
||||
int colorIndex = (int)(rate / 2 % colors.Count);
|
||||
Color currentColor = colors[colorIndex];
|
||||
Color nextColor = colors[(colorIndex + 1) % colors.Count];
|
||||
borderColor = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f);
|
||||
|
||||
// Update all particle instances.
|
||||
// Once sufficiently small, they vanish.
|
||||
for (int i = 0; i < Particles.Count; i++)
|
||||
Particles[i].Update();
|
||||
Particles.RemoveAll(p => p.Size <= 2f);
|
||||
}
|
||||
public override Color EdgeColor => borderColor with { A = 0 };
|
||||
|
||||
public static void SpawnParticle(Vector2 position, Vector2 velocity, float size, int lifetime, Vector2 squash, float shrinkSpeed = 0, float velocitySquash = 0) =>
|
||||
Particles.Add(new(position, velocity, size, lifetime, squash, shrinkSpeed, velocitySquash));
|
||||
|
||||
// Make the texture scroll.
|
||||
public override Vector2 CalculateManualOffsetForLayer(int layerIndex)
|
||||
{
|
||||
return scrollDir * 0.5f;
|
||||
}
|
||||
|
||||
public override void DrawInstances()
|
||||
{
|
||||
Texture2D tex = ModContent.Request<Texture2D>("CalamityMod/ExtraTextures/BasicMess").Value;
|
||||
|
||||
foreach (CosmicParticle particle in Particles)
|
||||
{
|
||||
Vector2 squash = Vector2.Lerp(particle.BaseSquash, new Vector2(Utils.Remap(particle.Velocity.Length(), 2, 7, 1, 0.5f), Utils.Remap(particle.Velocity.Length(), 2, 7, 1, 2.5f)), particle.SquashPower);
|
||||
Vector2 drawPosition = particle.Center - Main.screenPosition;
|
||||
Vector2 origin = tex.Size() * 0.5f;
|
||||
Vector2 scale = Vector2.One * particle.Size / tex.Size();
|
||||
Main.spriteBatch.Draw(tex, drawPosition, null, Color.White, particle.Rotation, origin, squash * scale, SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -177,7 +177,6 @@ namespace CalamityMod.ILEditing
|
||||
IL_WorldGen.Chlorophyte += AdjustChlorophyteSpawnLimits;
|
||||
IL_UIWorldCreation.SetDefaultOptions += ChangeDefaultWorldSize;
|
||||
IL_UIWorldCreation.AddWorldSizeOptions += SwapSmallDescriptionKey;
|
||||
IL_UIWorldCreation.AddWorldDifficultyOptions += SwapMasterModeDescriptionKey;
|
||||
Terraria.IO.On_WorldFile.ClearTempTiles += ClearModdedTempTiles;
|
||||
On_WorldGen.MakeDungeon += LimitDungeonEntranceXPosition;
|
||||
IL_WorldGen.DungeonHalls += LimitDungeonHallsXPosition;
|
||||
|
||||
@@ -1868,7 +1868,7 @@ namespace CalamityMod.ILEditing
|
||||
#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 (Main.masterMode && CalamityWorld.revenge && type == NPCID.Retinazer)
|
||||
if (CalamityWorld.death && type == NPCID.Retinazer)
|
||||
{
|
||||
int retinazerIndex = NPC.NewNPC(NPC.GetBossSpawnSource(targetPlayerIndex), x, y, type, 1);
|
||||
if (retinazerIndex == 200)
|
||||
@@ -1896,7 +1896,7 @@ namespace CalamityMod.ILEditing
|
||||
|
||||
public static void PreventFoveanatorDefeatMessageIfNotKilledLast(On_NPC.orig_DoDeathEvents_BeforeLoot orig, NPC self, Player closestPlayer)
|
||||
{
|
||||
if (Main.masterMode && CalamityWorld.revenge && self.type == ModContent.NPCType<Foveanator>() && (NPC.AnyNPCs(NPCID.Spazmatism) || NPC.AnyNPCs(NPCID.Retinazer)))
|
||||
if (CalamityWorld.death && self.type == ModContent.NPCType<Foveanator>() && (NPC.AnyNPCs(NPCID.Spazmatism) || NPC.AnyNPCs(NPCID.Retinazer)))
|
||||
{
|
||||
self.value = 0f;
|
||||
self.boss = false;
|
||||
@@ -1911,7 +1911,7 @@ namespace CalamityMod.ILEditing
|
||||
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 (Main.masterMode && CalamityWorld.revenge && correctNPCType)
|
||||
if (CalamityWorld.death && correctNPCType)
|
||||
{
|
||||
if (Main.netMode == NetmodeID.SinglePlayer)
|
||||
Main.NewText(Language.GetTextValue("Announcement.HasBeenDefeated_Plural", CalamityUtils.GetTextValue("Status.Boss.TripletsDefeatName")), 175, 75, 255);
|
||||
|
||||
@@ -161,7 +161,7 @@ namespace CalamityMod.ILEditing
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Change World Generation Descriptions
|
||||
#region Change Small World Description
|
||||
/// <summary>
|
||||
/// Changes the description of Small worlds to serve as a warning.
|
||||
/// </summary>
|
||||
@@ -184,26 +184,6 @@ namespace CalamityMod.ILEditing
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Changes the description of Master Mode to mention boss changes.
|
||||
/// </summary>
|
||||
private static void SwapMasterModeDescriptionKey(ILContext il)
|
||||
{
|
||||
// Swap vanilla's Master Mode description string (UI.WorldDescriptionMaster) with Calamity's edited version (Mods.CalamityMod.UI.WorldMaster).
|
||||
var cursor = new ILCursor(il);
|
||||
|
||||
// Move to after the string.
|
||||
if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdstr("UI.WorldDescriptionMaster")))
|
||||
{
|
||||
LogFailure("Change Master Mode Description", "Could not match string \"UI.WorldDescriptionMaster\".");
|
||||
return;
|
||||
}
|
||||
|
||||
// Pop this value off, then replace it with Calamity's new string.
|
||||
cursor.EmitPop();
|
||||
cursor.Emit(OpCodes.Ldstr, "Mods.CalamityMod.UI.WorldMaster");
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Clear temporary modded tiles
|
||||
|
||||
@@ -65,7 +65,6 @@ namespace CalamityMod.Items.Accessories
|
||||
CreateRecipe().
|
||||
AddIngredient<AbyssalDivingGear>().
|
||||
AddIngredient<AnechoicPlating>().
|
||||
AddIngredient<IronBoots>().
|
||||
AddIngredient(ItemID.LunarBar, 5).
|
||||
AddIngredient<MolluskHusk>(15).
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
@@ -37,6 +38,15 @@ namespace CalamityMod.Items.Accessories
|
||||
Lighting.AddLight(player.Center, new Vector3(1.2f, 1.2f, 0.72f));
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> list)
|
||||
{
|
||||
var player = Main.LocalPlayer;
|
||||
if (player != null)
|
||||
{
|
||||
list.FindAndReplace("[REGEN]", (player.Calamity().ambrosialAmpouleRegen + player.Calamity().alwaysHoneyRegenAmount).ToString("0.##"));
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
|
||||
@@ -19,6 +19,8 @@ namespace CalamityMod.Items.Accessories
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
player.pickSpeed -= 0.1f;
|
||||
player.Calamity().aFossil = true;
|
||||
player.Calamity().fallingBlockProtection = true;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -20,20 +20,25 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
player.pickSpeed -= 0.15f;
|
||||
if (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight || player.ZoneUnderworldHeight)
|
||||
{
|
||||
player.statDefense += 10;
|
||||
player.endurance += 0.05f;
|
||||
}
|
||||
player.pickSpeed -= 0.3f;
|
||||
player.Calamity().aPowder = true;
|
||||
player.Calamity().fallingBlockProtection = true;
|
||||
player.Calamity().trapProtection = true;
|
||||
|
||||
// Doesn't stack with downgrades
|
||||
if (player.chiselSpeed)
|
||||
player.pickSpeed += 0.15f;
|
||||
if (player.Calamity().aFossil)
|
||||
player.pickSpeed += 0.1f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<AncientFossil>().
|
||||
AddIngredient(ItemID.AncientChisel).
|
||||
AddIngredient<AncientBoneDust>(3).
|
||||
AddIngredient<ScorchedBone>(15).
|
||||
AddIngredient<ScorchedBone>(10).
|
||||
AddIngredient(ItemID.Bone, 15).
|
||||
AddTile(TileID.Anvils).
|
||||
Register();
|
||||
|
||||
@@ -19,11 +19,11 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
public Color? TooltipExtensionColor => new(195, 223, 255);
|
||||
|
||||
public const int ShieldSlamDamage = 900;
|
||||
public const int ShieldSlamDamage = 1000;
|
||||
public const float ShieldSlamKnockback = 15f;
|
||||
public const int ShieldSlamIFrames = 12;
|
||||
|
||||
public const int RamExplosionDamage = 450;
|
||||
public const int RamExplosionDamage = 300;
|
||||
public const float RamExplosionKnockback = 20f;
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public class DynamoStemCells : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public const int MiniSwamerCooldown = 180;
|
||||
public const int MiniSwarmerCooldown = 180;
|
||||
public static int MiniSwamerDamage = 1000;
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
|
||||
@@ -16,11 +16,11 @@ namespace CalamityMod.Items.Accessories
|
||||
public bool HasFlavorTooltip => true;
|
||||
public Color? TooltipExtensionColor => new(195, 223, 255);
|
||||
|
||||
public const int ShieldSlamDamage = 400;
|
||||
public const int ShieldSlamDamage = 500;
|
||||
public const float ShieldSlamKnockback = 12f;
|
||||
public const int ShieldSlamIFrames = 12;
|
||||
|
||||
public const int RamExplosionDamage = 200;
|
||||
public const int RamExplosionDamage = 100;
|
||||
public const float RamExplosionKnockback = 15f;
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -13,7 +10,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
// The percentage of a full Rage bar that is gained every second with Heart of Darkness equipped.
|
||||
public const float RagePerSecond = 0.01f;
|
||||
public const float RagePerSecond = 0.02f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.ironBoots = true;
|
||||
player.noFallDmg = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public class LeviathanAmbergris : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public static int ambergrisDashDamage = 90;
|
||||
public static int ambergrisDashDamage = 650;
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 20;
|
||||
@@ -24,6 +24,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.lAmbergris = true;
|
||||
modPlayer.lAmbergrisVisual = !hideVisual;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -92,6 +92,8 @@ namespace CalamityMod.Items.Accessories
|
||||
Projectile.tileCollide = false;
|
||||
Projectile.ArmorPenetration = 20;
|
||||
Projectile.netImportant = true;
|
||||
Projectile.usesIDStaticNPCImmunity = true;
|
||||
Projectile.idStaticNPCHitCooldown = 10;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
@@ -32,5 +33,12 @@ namespace CalamityMod.Items.Accessories
|
||||
AddTile(TileID.MythrilAnvil).
|
||||
Register();
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> list)
|
||||
{
|
||||
var player = Main.LocalPlayer;
|
||||
if (player != null)
|
||||
list.FindAndReplace("[DAMAGE]", (0.3f * (1 - player.statLife / (float)player.statLifeMax2)).ToPercent());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Rarities;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
@@ -11,7 +12,7 @@ using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
[LegacyName("AstralArcanum", "Purity")]
|
||||
public class Radiance : ModItem, ILocalizedModType
|
||||
public class Radiance : ModItem, ILocalizedModType, IHoldShiftTooltipItem
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public override void SetStaticDefaults()
|
||||
@@ -48,6 +49,17 @@ namespace CalamityMod.Items.Accessories
|
||||
Lighting.AddLight(player.Center, new Vector3(1.32f, 1.32f, 1.82f));
|
||||
}
|
||||
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> list)
|
||||
{
|
||||
var player = Main.LocalPlayer;
|
||||
if (player != null)
|
||||
{
|
||||
list.FindAndReplace("[REGEN]", (player.Calamity().purityRegen + player.Calamity().alwaysHoneyRegenAmount).ToString("0.##"));
|
||||
list.FindAndReplace("[DEFENSE]", player.Calamity().jewelBonusDefense.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
@@ -31,6 +32,15 @@ namespace CalamityMod.Items.Accessories
|
||||
Lighting.AddLight(player.Center, new Vector3(1f, 1f, 0.6f));
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> list)
|
||||
{
|
||||
var player = Main.LocalPlayer;
|
||||
if (player != null)
|
||||
{
|
||||
list.FindAndReplace("[REGEN]", (player.Calamity().radiantOozeRegen).ToString("0.##"));
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.Crags;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using CalamityMod.Rarities;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.GameContent;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -16,7 +11,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public class SlagsplitterPauldron : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
public static int PauldronSlamDamage = 170;
|
||||
public static int PauldronSlamDamage = 330;
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 54;
|
||||
@@ -29,7 +24,8 @@ namespace CalamityMod.Items.Accessories
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.Pauldron = true;
|
||||
modPlayer.sPauldron = true;
|
||||
modPlayer.sPauldronVisual = !hideVisual;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -30,18 +30,16 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
player.autoJump = true;
|
||||
player.jumpSpeedBoost += 1.6f;
|
||||
player.moveSpeed += 0.1f;
|
||||
player.noFallDmg = true;
|
||||
player.blackBelt = true;
|
||||
player.dashType = 0;
|
||||
player.Calamity().DashID = StatisNinjaBeltDash.ID;
|
||||
player.spikedBoots = 2;
|
||||
player.accFlipper = true;
|
||||
player.hasMagiluminescence = true;
|
||||
player.Calamity().statisNinjaBelt = true;
|
||||
|
||||
player.MountedCenter.ToTileCoordinates();
|
||||
DelegateMethods.v3_1 = new Vector3(0.8f, 0.5f, 1f);
|
||||
Utils.PlotTileLine(player.Center, player.Center + player.velocity * 6f, 20f, DelegateMethods.CastLightOpen);
|
||||
Utils.PlotTileLine(player.Left, player.Right, 20f, DelegateMethods.CastLightOpen);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
@@ -51,8 +49,7 @@ namespace CalamityMod.Items.Accessories
|
||||
CreateRecipe().
|
||||
AddIngredient(ItemID.MasterNinjaGear).
|
||||
AddIngredient(ItemID.FrogFlipper).
|
||||
AddIngredient(ItemID.Magiluminescence).
|
||||
AddIngredient<PurifiedGel>(50).
|
||||
AddIngredient<PurifiedGel>(25).
|
||||
AddIngredient<Necroplasm>(5).
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
Register();
|
||||
@@ -61,8 +58,7 @@ namespace CalamityMod.Items.Accessories
|
||||
AddIngredient(ItemID.Tabi).
|
||||
AddIngredient(ItemID.BlackBelt).
|
||||
AddIngredient(ItemID.FrogGear).
|
||||
AddIngredient(ItemID.Magiluminescence).
|
||||
AddIngredient<PurifiedGel>(50).
|
||||
AddIngredient<PurifiedGel>(25).
|
||||
AddIngredient<Necroplasm>(5).
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
Register();
|
||||
|
||||
@@ -35,20 +35,21 @@ namespace CalamityMod.Items.Accessories
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
|
||||
modPlayer.voidSashVisuals = !hideVisual;
|
||||
|
||||
player.autoJump = true;
|
||||
player.jumpSpeedBoost += 1.6f;
|
||||
player.moveSpeed += 0.2f;
|
||||
player.noFallDmg = true;
|
||||
player.blackBelt = true;
|
||||
modPlayer.DashID = StatisVoidSashDash.ID;
|
||||
player.dashType = 0;
|
||||
player.spikedBoots = 2;
|
||||
player.accFlipper = true;
|
||||
player.hasMagiluminescence = true;
|
||||
player.Calamity().statisVoidSash = true;
|
||||
|
||||
player.MountedCenter.ToTileCoordinates();
|
||||
DelegateMethods.v3_1 = new Vector3(0.8f, 0.5f, 1f);
|
||||
Utils.PlotTileLine(player.Center, player.Center + player.velocity * 6f, 20f, DelegateMethods.CastLightOpen);
|
||||
Utils.PlotTileLine(player.Left, player.Right, 20f, DelegateMethods.CastLightOpen);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public class TrinketofChi : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
internal const int ChiBuffTimerMax = 300;
|
||||
internal const int ChiBuffTimerMax = 600;
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
@@ -104,5 +105,27 @@ namespace CalamityMod.Items.Accessories.Vanity
|
||||
Player.HideAccessories();
|
||||
}
|
||||
}
|
||||
|
||||
public override void ModifyDrawInfo(ref PlayerDrawSet drawInfo)
|
||||
{
|
||||
if (forceHelmetOn || transformationActive)
|
||||
{
|
||||
drawInfo.drawPlayer.head = EquipLoader.GetEquipSlot(Mod, "WulfrumOldSetHead", EquipType.Head);
|
||||
drawInfo.headGlowMask = -1;
|
||||
drawInfo.helmetOffset = Vector2.Zero;
|
||||
drawInfo.drawPlayer.face = -1;
|
||||
}
|
||||
|
||||
if (transformationActive)
|
||||
{
|
||||
drawInfo.drawPlayer.legs = EquipLoader.GetEquipSlot(Mod, "AbandonedWulfrumHelmet", EquipType.Legs);
|
||||
drawInfo.legsGlowMask = -1;
|
||||
drawInfo.legsOffset = Vector2.Zero;
|
||||
drawInfo.drawPlayer.body = EquipLoader.GetEquipSlot(Mod, "AbandonedWulfrumHelmet", EquipType.Body);
|
||||
drawInfo.bodyGlowMask = -1;
|
||||
|
||||
drawInfo.drawPlayer.HideAccessories();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
using Terraria;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -82,5 +84,21 @@ namespace CalamityMod.Items.Accessories.Vanity
|
||||
//Player.HideAccessories();
|
||||
}
|
||||
}
|
||||
|
||||
public override void ModifyDrawInfo(ref PlayerDrawSet drawInfo)
|
||||
{
|
||||
if (vanityEquipped)
|
||||
{
|
||||
drawInfo.drawPlayer.back = EquipLoader.GetEquipSlot(Mod, "CrystalHeartVodka", EquipType.Back);
|
||||
drawInfo.drawPlayer.legs = EquipLoader.GetEquipSlot(Mod, "CrystalHeartVodka", EquipType.Legs);
|
||||
drawInfo.legsGlowMask = -1;
|
||||
drawInfo.legsOffset = Vector2.Zero;
|
||||
drawInfo.drawPlayer.body = EquipLoader.GetEquipSlot(Mod, "CrystalHeartVodka", EquipType.Body);
|
||||
drawInfo.bodyGlowMask = -1;
|
||||
drawInfo.drawPlayer.head = EquipLoader.GetEquipSlot(Mod, "CrystalHeartVodka", EquipType.Head);
|
||||
drawInfo.headGlowMask = -1;
|
||||
drawInfo.helmetOffset = Vector2.Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
using Terraria;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -76,5 +78,20 @@ namespace CalamityMod.Items.Accessories.Vanity
|
||||
Player.head = EquipLoader.GetEquipSlot(Mod, "GoldenBomb", EquipType.Head);
|
||||
}
|
||||
}
|
||||
|
||||
public override void ModifyDrawInfo(ref PlayerDrawSet drawInfo)
|
||||
{
|
||||
if (vanityEquipped)
|
||||
{
|
||||
drawInfo.drawPlayer.legs = EquipLoader.GetEquipSlot(Mod, "GoldenBomb", EquipType.Legs);
|
||||
drawInfo.legsGlowMask = -1;
|
||||
drawInfo.legsOffset = Vector2.Zero;
|
||||
drawInfo.drawPlayer.body = EquipLoader.GetEquipSlot(Mod, "GoldenBomb", EquipType.Body);
|
||||
drawInfo.bodyGlowMask = -1;
|
||||
drawInfo.drawPlayer.head = EquipLoader.GetEquipSlot(Mod, "GoldenBomb", EquipType.Head);
|
||||
drawInfo.headGlowMask = -1;
|
||||
drawInfo.helmetOffset = Vector2.Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
@@ -84,5 +85,20 @@ namespace CalamityMod.Items.Accessories.Vanity
|
||||
//Player.HideAccessories();
|
||||
}
|
||||
}
|
||||
|
||||
public override void ModifyDrawInfo(ref PlayerDrawSet drawInfo)
|
||||
{
|
||||
if (vanityEquipped)
|
||||
{
|
||||
drawInfo.drawPlayer.back = EquipLoader.GetEquipSlot(Mod, "HapuFruit", EquipType.Back);
|
||||
drawInfo.drawPlayer.legs = EquipLoader.GetEquipSlot(Mod, "HapuFruit", EquipType.Legs);
|
||||
drawInfo.legsGlowMask = -1;
|
||||
drawInfo.legsOffset = Vector2.Zero;
|
||||
drawInfo.drawPlayer.body = EquipLoader.GetEquipSlot(Mod, "HapuFruit", EquipType.Body);
|
||||
drawInfo.drawPlayer.head = EquipLoader.GetEquipSlot(Mod, "HapuFruit", EquipType.Head);
|
||||
drawInfo.headGlowMask = -1;
|
||||
drawInfo.helmetOffset = Vector2.Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
using Terraria;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -81,5 +83,21 @@ namespace CalamityMod.Items.Accessories.Vanity
|
||||
//Player.HideAccessories();
|
||||
}
|
||||
}
|
||||
|
||||
public override void ModifyDrawInfo(ref PlayerDrawSet drawInfo)
|
||||
{
|
||||
if (vanityEquipped)
|
||||
{
|
||||
drawInfo.drawPlayer.back = EquipLoader.GetEquipSlot(Mod, "OracleHeadphones", EquipType.Back);
|
||||
drawInfo.drawPlayer.legs = EquipLoader.GetEquipSlot(Mod, "OracleHeadphones", EquipType.Legs);
|
||||
drawInfo.legsGlowMask = -1;
|
||||
drawInfo.legsOffset = Vector2.Zero;
|
||||
drawInfo.drawPlayer.body = EquipLoader.GetEquipSlot(Mod, "OracleHeadphones", EquipType.Body);
|
||||
drawInfo.bodyGlowMask = -1;
|
||||
drawInfo.drawPlayer.head = EquipLoader.GetEquipSlot(Mod, "OracleHeadphones", EquipType.Head);
|
||||
drawInfo.headGlowMask = -1;
|
||||
drawInfo.helmetOffset = Vector2.Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
using System;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.Graphics.Renderers;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -78,5 +81,20 @@ namespace CalamityMod.Items.Accessories.Vanity
|
||||
Player.head = EquipLoader.GetEquipSlot(Mod, "SharkyPlush", EquipType.Head);
|
||||
}
|
||||
}
|
||||
|
||||
public override void ModifyDrawInfo(ref PlayerDrawSet drawInfo)
|
||||
{
|
||||
if (vanityEquipped)
|
||||
{
|
||||
drawInfo.drawPlayer.legs = EquipLoader.GetEquipSlot(Mod, "SharkyPlush", EquipType.Legs);
|
||||
drawInfo.legsGlowMask = -1;
|
||||
drawInfo.legsOffset = Vector2.Zero;
|
||||
drawInfo.drawPlayer.body = EquipLoader.GetEquipSlot(Mod, "SharkyPlush", EquipType.Body);
|
||||
drawInfo.bodyGlowMask = -1;
|
||||
drawInfo.drawPlayer.head = EquipLoader.GetEquipSlot(Mod, "SharkyPlush", EquipType.Head);
|
||||
drawInfo.headGlowMask = -1;
|
||||
drawInfo.helmetOffset = Vector2.Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Rarities;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -89,5 +91,20 @@ namespace CalamityMod.Items.Accessories.Vanity
|
||||
Player.head = EquipLoader.GetEquipSlot(Mod, "XyksBlessingBlue", EquipType.Head);
|
||||
}
|
||||
}
|
||||
|
||||
public override void ModifyDrawInfo(ref PlayerDrawSet drawInfo)
|
||||
{
|
||||
if (vanityEquipped)
|
||||
{
|
||||
drawInfo.drawPlayer.legs = EquipLoader.GetEquipSlot(Mod, "XyksBlessingBlue", EquipType.Legs);
|
||||
drawInfo.legsGlowMask = -1;
|
||||
drawInfo.legsOffset = Vector2.Zero;
|
||||
drawInfo.drawPlayer.body = EquipLoader.GetEquipSlot(Mod, "XyksBlessingBlue", EquipType.Body);
|
||||
drawInfo.bodyGlowMask = -1;
|
||||
drawInfo.drawPlayer.head = EquipLoader.GetEquipSlot(Mod, "XyksBlessingBlue", EquipType.Head);
|
||||
drawInfo.headGlowMask = -1;
|
||||
drawInfo.helmetOffset = Vector2.Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Rarities;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -89,5 +91,20 @@ namespace CalamityMod.Items.Accessories.Vanity
|
||||
Player.head = EquipLoader.GetEquipSlot(Mod, "XyksBlessingOrange", EquipType.Head);
|
||||
}
|
||||
}
|
||||
|
||||
public override void ModifyDrawInfo(ref PlayerDrawSet drawInfo)
|
||||
{
|
||||
if (vanityEquipped)
|
||||
{
|
||||
drawInfo.drawPlayer.legs = EquipLoader.GetEquipSlot(Mod, "XyksBlessingOrange", EquipType.Legs);
|
||||
drawInfo.legsGlowMask = -1;
|
||||
drawInfo.legsOffset = Vector2.Zero;
|
||||
drawInfo.drawPlayer.body = EquipLoader.GetEquipSlot(Mod, "XyksBlessingOrange", EquipType.Body);
|
||||
drawInfo.bodyGlowMask = -1;
|
||||
drawInfo.drawPlayer.head = EquipLoader.GetEquipSlot(Mod, "XyksBlessingOrange", EquipType.Head);
|
||||
drawInfo.headGlowMask = -1;
|
||||
drawInfo.helmetOffset = Vector2.Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public class WarbanneroftheRighteous : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Accessories";
|
||||
internal const float MaxBonus = 0.8f;
|
||||
internal const float MaxBonus = 0.6f;
|
||||
internal const float MaxDistance = 350f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
@@ -57,8 +57,8 @@ namespace CalamityMod.Items.Accessories
|
||||
}
|
||||
|
||||
int maxValue = (int)(MaxBonus * 100);
|
||||
float bonus = CalculateBonus(player) - 0.6f;
|
||||
float displayBonus = (int)((bonus + 0.6f) * 100); // Should range from 0 to the maxValue
|
||||
float bonus = CalculateBonus(player) - 0.4f;
|
||||
float displayBonus = (int)((bonus + 0.4f) * 100); // Should range from 0 to the maxValue
|
||||
|
||||
if (player.Calamity().cooldowns.TryGetValue(WarbanneroftheRighteousBuff.ID, out var cooldown))
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace CalamityMod.Items.Armor.GodSlayer
|
||||
player.thorns += 0.5f;
|
||||
player.statLifeMax2 += 60;
|
||||
player.GetDamage<GenericDamageClass>() += 0.11f;
|
||||
player.GetCritChance<GenericDamageClass>() += 6;
|
||||
player.GetCritChance<GenericDamageClass>() += 8;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -21,9 +21,9 @@ namespace CalamityMod.Items.Armor.GodSlayer
|
||||
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.moveSpeed += 0.05f;
|
||||
player.GetDamage<GenericDamageClass>() += 0.1f;
|
||||
player.GetCritChance<GenericDamageClass>() += 10;
|
||||
player.moveSpeed += 0.1f;
|
||||
player.GetDamage<GenericDamageClass>() += 0.11f;
|
||||
player.GetCritChance<GenericDamageClass>() += 11;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -70,7 +70,6 @@ namespace CalamityMod.Items.Armor.OmegaBlue
|
||||
player.setBonus = this.GetLocalization("SetBonus").Format(hotkey);
|
||||
|
||||
var mp = player.Calamity();
|
||||
player.GetArmorPenetration<GenericDamageClass>() += 15;
|
||||
player.maxMinions += 2;
|
||||
mp.wearingRogueArmor = true;
|
||||
mp.omegaBlueSet = true;
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Armor.Silva
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.statLifeMax2 += 80;
|
||||
player.GetDamage<GenericDamageClass>() += 0.12f;
|
||||
player.GetDamage<GenericDamageClass>() += 0.11f;
|
||||
player.GetCritChance<GenericDamageClass>() += 8;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@ namespace CalamityMod.Items.Armor.Silva
|
||||
public override void UpdateEquip(Player player)
|
||||
{
|
||||
player.moveSpeed += 0.1f;
|
||||
player.GetDamage<GenericDamageClass>() += 0.12f;
|
||||
player.GetCritChance<GenericDamageClass>() += 12;
|
||||
player.GetDamage<GenericDamageClass>() += 0.11f;
|
||||
player.GetCritChance<GenericDamageClass>() += 11;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -10,6 +10,7 @@ using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Potions;
|
||||
using CalamityMod.Items.Potions.Alcohol;
|
||||
using CalamityMod.Items.VanillaArmorChanges;
|
||||
using CalamityMod.Items.Weapons.Magic;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using CalamityMod.Items.Weapons.Summon;
|
||||
using CalamityMod.NPCs.Other;
|
||||
@@ -543,15 +544,23 @@ namespace CalamityMod.Items
|
||||
#endregion
|
||||
|
||||
#region Pickup Item Changes
|
||||
public override bool CanPickup(Item item, Player player)
|
||||
{
|
||||
// Prevent Mana Stars from being picked up while wielding Ion Blaster or Apoctosis Array
|
||||
if (item.type == ItemID.Star || item.type == ItemID.SoulCake || item.type == ItemID.SugarPlum)
|
||||
{
|
||||
if (player.ActiveItem().type == ModContent.ItemType<IonBlaster>() || player.ActiveItem().type == ModContent.ItemType<ApoctosisArray>())
|
||||
return false;
|
||||
}
|
||||
return base.CanPickup(item, player);
|
||||
}
|
||||
|
||||
public override bool OnPickup(Item item, Player player)
|
||||
{
|
||||
if (item.type == ItemID.Heart || item.type == ItemID.CandyApple || item.type == ItemID.CandyCane)
|
||||
if (item.type == ItemID.Heart || item.type == ItemID.CandyApple || item.type == ItemID.CandyCane) // On heart pickup
|
||||
{
|
||||
bool boostedHeart = player.Calamity().photosynthesis;
|
||||
if (boostedHeart)
|
||||
{
|
||||
if (player.Calamity().photosynthesis)
|
||||
player.HealPlayer(PhotosynthesisPotion.IncreasedHeartHeal);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace CalamityMod.Items.DraedonMisc
|
||||
meleeDisplay.OverrideColor = new Color(201, 41, 255);
|
||||
list.Insert(insertIndex + 1, meleeDisplay);
|
||||
|
||||
int rangedItem = ModContent.ItemType<HeavyLaserRifle>();
|
||||
int rangedItem = ModContent.ItemType<ScattershotSkewer>();
|
||||
TooltipLine rangedDisplay = new TooltipLine(this.Mod, "CalamityMod:RangedDisplay", $"[i:{rangedItem}] {CalamityUtils.GetItemName(rangedItem)}");
|
||||
rangedDisplay.OverrideColor = new Color(255, 64, 31);
|
||||
list.Insert(insertIndex + 2, rangedDisplay);
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace CalamityMod.Items.DraedonMisc
|
||||
meleeDisplay.OverrideColor = new Color(31, 242, 245);
|
||||
list.Insert(insertIndex + 1, meleeDisplay);
|
||||
|
||||
int rangedItem = ModContent.ItemType<MatterModulator>();
|
||||
int rangedItem = ModContent.ItemType<HolofiberImmolator>();
|
||||
TooltipLine rangedDisplay = new TooltipLine(this.Mod, "CalamityMod:RangedDisplay", $"[i:{rangedItem}] {CalamityUtils.GetItemName(rangedItem)}");
|
||||
rangedDisplay.OverrideColor = new Color(149, 243, 43);
|
||||
list.Insert(insertIndex + 2, rangedDisplay);
|
||||
|
||||
@@ -66,6 +66,7 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings
|
||||
"Dandy",
|
||||
"Dia",
|
||||
"dozezoze",
|
||||
"Eddie Spaghetti",
|
||||
"enamoured",
|
||||
"ENNWAY",
|
||||
"Flowaria",
|
||||
@@ -73,7 +74,6 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings
|
||||
"HaguriHat",
|
||||
"Heart Plus Up!",
|
||||
"Hugekraken",
|
||||
"Lilac Olligoci",
|
||||
"LordMetarex",
|
||||
"Memes",
|
||||
"Mercutio 'Merkalto' Takle",
|
||||
@@ -85,6 +85,7 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings
|
||||
"PokerFace",
|
||||
"Poroboros",
|
||||
"Raesh",
|
||||
"Sagittariod",
|
||||
"Shade",
|
||||
"SharZz",
|
||||
"Shayy",
|
||||
@@ -146,6 +147,7 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings
|
||||
"L0st",
|
||||
"Leon",
|
||||
"Leviathan",
|
||||
"Lilac Olligoci",
|
||||
"Lompl Allimath",
|
||||
"Lucille Karma",
|
||||
"MarieArk",
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.Walls;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Placeables.FurnitureWulfrum
|
||||
{
|
||||
public class ChargedWulfrumEnergyBarrier : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Placeables";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 100;
|
||||
}
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableTile(ModContent.TileType<Tiles.FurnitureWulfrum.ChargedWulfrumEnergyBarrier>());
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe(25).
|
||||
AddIngredient(ItemID.Glass, 25).
|
||||
AddIngredient<EnergyCore>().
|
||||
AddTile(TileID.HeavyWorkBench).
|
||||
Register();
|
||||
//CreateRecipe().
|
||||
// AddIngredient<WulfrumPlatingWall>(4).
|
||||
// AddTile(TileID.WorkBenches).
|
||||
// DisableDecraft().
|
||||
// Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 317 B |
@@ -0,0 +1,32 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.Walls;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Placeables.FurnitureWulfrum
|
||||
{
|
||||
public class WulfrumEnergyBarrier : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Placeables";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 100;
|
||||
}
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableTile(ModContent.TileType<Tiles.FurnitureWulfrum.WulfrumEnergyBarrier>());
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe(25).
|
||||
AddIngredient(ItemID.Glass, 25).
|
||||
AddIngredient<EnergyCore>().
|
||||
AddTile(TileID.HeavyWorkBench).
|
||||
Register();
|
||||
//CreateRecipe().
|
||||
// AddIngredient<WulfrumPlatingWall>(4).
|
||||
// AddTile(TileID.WorkBenches).
|
||||
// DisableDecraft().
|
||||
// Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 285 B |
@@ -0,0 +1,32 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.Walls;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Placeables.FurnitureWulfrum
|
||||
{
|
||||
public class WulfrumPanels : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Placeables";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 100;
|
||||
}
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableTile(ModContent.TileType<Tiles.FurnitureWulfrum.WulfrumPanels>());
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe(25).
|
||||
AddRecipeGroup("AnyStoneBlock", 25).
|
||||
AddIngredient<WulfrumMetalScrap>().
|
||||
AddTile(TileID.HeavyWorkBench).
|
||||
Register();
|
||||
//CreateRecipe().
|
||||
// AddIngredient<WulfrumPlatingWall>(4).
|
||||
// AddTile(TileID.WorkBenches).
|
||||
// DisableDecraft().
|
||||
// Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 331 B |
@@ -0,0 +1,26 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureWulfrum;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using WallTiles = CalamityMod.Walls;
|
||||
|
||||
namespace CalamityMod.Items.Placeables.Walls
|
||||
{
|
||||
public class ChargedWulfrumEnergyBarrierWall : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Placeables";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 400;
|
||||
}
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.ChargedWulfrumEnergyBarrierWall>());
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe(4).
|
||||
AddIngredient<ChargedWulfrumEnergyBarrier>().
|
||||
AddTile(TileID.WorkBenches).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 362 B |
@@ -0,0 +1,26 @@
|
||||
using CalamityMod.Items.Placeables.FurnitureWulfrum;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using WallTiles = CalamityMod.Walls;
|
||||
|
||||
namespace CalamityMod.Items.Placeables.Walls
|
||||
{
|
||||
public class WulfrumEnergyBarrierWall : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Placeables";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 400;
|
||||
}
|
||||
|
||||
public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType<WallTiles.WulfrumEnergyBarrierWall>());
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe(4).
|
||||
AddIngredient<WulfrumEnergyBarrier>().
|
||||
AddTile(TileID.WorkBenches).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 351 B |
@@ -0,0 +1,39 @@
|
||||
using CalamityMod.Items.Critters;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Potions.Food
|
||||
{
|
||||
public class ShroomBowl : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Potions";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
Item.ResearchUnlockCount = 5;
|
||||
ItemID.Sets.FoodParticleColors[Type] = [
|
||||
new Color(248, 195, 96),
|
||||
new Color(115, 57, 15),
|
||||
new Color(230, 124, 45)
|
||||
];
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.DefaultToFood(30, 24, BuffID.WellFed2, CalamityUtils.MinutesToFrames(10));
|
||||
Item.value = Item.sellPrice(silver: 10);
|
||||
Item.rare = ItemRarityID.Blue;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient(ItemID.Bowl).
|
||||
AddIngredient<ShroombleItem>().
|
||||
AddTile(TileID.CookingPots).
|
||||
DisableDecraft().
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 611 B |
@@ -45,7 +45,6 @@ namespace CalamityMod.Items.SummonItems
|
||||
{
|
||||
switch (npc.type)
|
||||
{
|
||||
case NPCID.CultistTablet:
|
||||
case NPCID.CultistBoss:
|
||||
case NPCID.LunarTowerSolar:
|
||||
case NPCID.LunarTowerVortex:
|
||||
|
||||
@@ -5,6 +5,7 @@ using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
using CalamityMod.Sounds;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
@@ -22,34 +23,62 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
{
|
||||
CalamityGlobalItem modItem = Item.Calamity();
|
||||
|
||||
Item.width = 112;
|
||||
Item.height = 36;
|
||||
Item.width = 70;
|
||||
Item.height = 30;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.damage = 150;
|
||||
Item.knockBack = 30f;
|
||||
Item.useAnimation = Item.useTime = 32;
|
||||
Item.damage = 100;
|
||||
Item.knockBack = 0.2f;
|
||||
Item.useTime = Item.useAnimation = 10;
|
||||
Item.autoReuse = true;
|
||||
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.UseSound = CommonCalamitySounds.GaussWeaponFire;
|
||||
Item.UseSound = new SoundStyle("CalamityMod/Sounds/Item/GaussFire") with { Volume = 0.7f, Pitch = Main.rand.NextFloat(0.5f, 0.65f) };
|
||||
Item.noMelee = true;
|
||||
|
||||
Item.value = CalamityGlobalItem.RarityYellowBuyPrice;
|
||||
Item.rare = ItemRarityID.Yellow;
|
||||
|
||||
Item.shoot = ModContent.ProjectileType<GaussRifleBlast>();
|
||||
Item.shootSpeed = 27f;
|
||||
Item.shootSpeed = 7f;
|
||||
|
||||
modItem.UsesCharge = true;
|
||||
modItem.MaxCharge = 135f;
|
||||
modItem.ChargePerUse = 0.1125f;
|
||||
modItem.ChargePerUse = 0.0225f;
|
||||
}
|
||||
|
||||
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, ModContent.ProjectileType<GaussRifleBlast>(), damage, knockback, player.whoAmI);
|
||||
Projectile.NewProjectile(source, position + velocity * 6, velocity.RotatedByRandom(0.03f), ModContent.ProjectileType<GaussRifleBlast>(), damage, knockback, player.whoAmI);
|
||||
return false;
|
||||
}
|
||||
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/GaussRifleGlow").Value);
|
||||
}
|
||||
public override void UseStyle(Player player, Rectangle heldItemFrame)
|
||||
{
|
||||
player.ChangeDir(Math.Sign((player.Calamity().mouseWorld - player.Center).X));
|
||||
float itemRotation = player.compositeFrontArm.rotation + MathHelper.PiOver2 * player.gravDir;
|
||||
|
||||
Vector2 itemPosition = player.MountedCenter + itemRotation.ToRotationVector2() * 7f;
|
||||
Vector2 itemSize = new Vector2(70, 30);
|
||||
Vector2 itemOrigin = new Vector2(-18, 6);
|
||||
|
||||
CalamityUtils.CleanHoldStyle(player, itemRotation, itemPosition, itemSize, itemOrigin);
|
||||
|
||||
base.UseStyle(player, heldItemFrame);
|
||||
}
|
||||
public override void UseItemFrame(Player player)
|
||||
{
|
||||
player.ChangeDir(Math.Sign((player.Calamity().mouseWorld - player.Center).X));
|
||||
|
||||
float animProgress = 0.5f - player.itemTime / (float)player.itemTimeMax;
|
||||
float rotation = (player.Center - player.Calamity().mouseWorld).ToRotation() * player.gravDir + MathHelper.PiOver2;
|
||||
if (animProgress < 0.4f)
|
||||
rotation += -0.025f * (float)Math.Pow((0.6f - animProgress) / 0.6f, 2) * player.direction;
|
||||
|
||||
player.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, rotation);
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 3);
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 946 B After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
@@ -1,85 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
using CalamityMod.Rarities;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
{
|
||||
[LegacyName("LaserRifle")]
|
||||
public class HeavyLaserRifle : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.DraedonsArsenal";
|
||||
public static readonly SoundStyle FireSound = new("CalamityMod/Sounds/Item/LaserRifleFire");
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
CalamityGlobalItem modItem = Item.Calamity();
|
||||
|
||||
Item.width = 84;
|
||||
Item.height = 28;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.damage = 210;
|
||||
Item.knockBack = 4f;
|
||||
Item.useTime = 25;
|
||||
Item.useAnimation = 25;
|
||||
Item.autoReuse = true;
|
||||
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.UseSound = FireSound;
|
||||
Item.noMelee = true;
|
||||
|
||||
Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice;
|
||||
Item.rare = ModContent.RarityType<Turquoise>();
|
||||
|
||||
Item.shoot = ModContent.ProjectileType<LaserRifleShot>();
|
||||
Item.shootSpeed = 5f;
|
||||
|
||||
modItem.UsesCharge = true;
|
||||
modItem.MaxCharge = 190f;
|
||||
modItem.ChargePerUse = 0.125f;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
if (velocity.Length() > 5f)
|
||||
{
|
||||
velocity.Normalize();
|
||||
velocity *= 5f;
|
||||
}
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
float SpeedX = velocity.X + Main.rand.Next(-1, 2) * 0.05f;
|
||||
float SpeedY = velocity.Y + Main.rand.Next(-1, 2) * 0.05f;
|
||||
Projectile.NewProjectile(source, position, new Vector2(SpeedX, SpeedY), ModContent.ProjectileType<LaserRifleShot>(), damage, knockback, player.whoAmI, i, 0f);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 4);
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(-20, 0);
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<MysteriousCircuitry>(15).
|
||||
AddIngredient<DubiousPlating>(15).
|
||||
AddIngredient<UelibloomBar>(8).
|
||||
AddIngredient(ItemID.LunarBar, 4).
|
||||
AddCondition(ArsenalTierGatedRecipe.ConstructRecipeCondition(4, out Func<bool> condition), condition).
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1016 B |
@@ -3,51 +3,57 @@ using System.Collections.Generic;
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
using CalamityMod.Sounds;
|
||||
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
|
||||
{
|
||||
public class MatterModulator : ModItem, ILocalizedModType
|
||||
[LegacyName("MatterModulator")]
|
||||
public class HolofiberImmolator : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.DraedonsArsenal";
|
||||
public static readonly SoundStyle PlasmaSound = new("CalamityMod/Sounds/Item/PlasmaSmall");
|
||||
public override void SetDefaults()
|
||||
{
|
||||
CalamityGlobalItem modItem = Item.Calamity();
|
||||
|
||||
Item.width = 40;
|
||||
Item.height = 22;
|
||||
Item.width = 30;
|
||||
Item.height = 62;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.damage = 100;
|
||||
Item.knockBack = 11f;
|
||||
Item.useAnimation = Item.useTime = 33;
|
||||
Item.damage = 57;
|
||||
Item.knockBack = 0.8f;
|
||||
Item.useTime = Item.useAnimation = 14;
|
||||
Item.autoReuse = true;
|
||||
Item.noUseGraphic = true;
|
||||
Item.channel = true;
|
||||
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.UseSound = CommonCalamitySounds.PlasmaBoltSound;
|
||||
Item.UseSound = null;
|
||||
Item.noMelee = true;
|
||||
|
||||
Item.value = CalamityGlobalItem.RarityPinkBuyPrice;
|
||||
Item.rare = ItemRarityID.Pink;
|
||||
|
||||
Item.shoot = ModContent.ProjectileType<UnstableMatter>();
|
||||
Item.shoot = ModContent.ProjectileType<HolofiberImmolatorHoldout>();
|
||||
Item.shootSpeed = 12f;
|
||||
|
||||
modItem.UsesCharge = true;
|
||||
modItem.MaxCharge = 85f;
|
||||
modItem.ChargePerUse = 0.075f;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
|
||||
public override bool CanConsumeAmmo(Item ammo, Player player) => false;
|
||||
public override void HoldItem(Player player) => 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/HolofiberImmolatorGlow").Value);
|
||||
}
|
||||
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 < Main.rand.Next(3, 5 + 1); i++)
|
||||
{
|
||||
Projectile.NewProjectile(source, position, velocity.RotatedByRandom(0.4f) * Main.rand.NextFloat(0.8f, 1.3f), type, damage, knockback, player.whoAmI);
|
||||
}
|
||||
Projectile holdout = Projectile.NewProjectileDirect(source, player.MountedCenter, Vector2.Zero, ModContent.ProjectileType<HolofiberImmolatorHoldout>(), damage, knockback, player.whoAmI, 0, 1);
|
||||
holdout.velocity = (player.Calamity().mouseWorld - player.MountedCenter).SafeNormalize(Vector2.Zero);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 677 B |
@@ -6,6 +6,7 @@ using CalamityMod.Items.Placeables.SunkenSea;
|
||||
using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -18,31 +19,62 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
{
|
||||
CalamityGlobalItem modItem = Item.Calamity();
|
||||
|
||||
Item.width = 62;
|
||||
Item.height = 22;
|
||||
Item.damage = 22;
|
||||
Item.width = 54;
|
||||
Item.height = 38;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.mana = 6;
|
||||
Item.useAnimation = Item.useTime = 23;
|
||||
Item.knockBack = 0.25f;
|
||||
Item.shoot = ModContent.ProjectileType<PulsePistolShot>();
|
||||
Item.shootSpeed = 5.2f; // This may seem low but the shot has 10 extra updates.
|
||||
|
||||
Item.UseSound = PulseRifle.FireSound;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.damage = 49;
|
||||
Item.knockBack = 3f;
|
||||
Item.useTime = 64;
|
||||
Item.useAnimation = 64;
|
||||
Item.autoReuse = true;
|
||||
Item.mana = 15;
|
||||
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.UseSound = PulseRifle.FireSound with { Pitch = 0.3f, Volume = 0.7f };
|
||||
Item.noMelee = true;
|
||||
|
||||
Item.value = CalamityGlobalItem.RarityOrangeBuyPrice;
|
||||
Item.rare = ItemRarityID.Orange;
|
||||
|
||||
modItem.UsesCharge = true;
|
||||
modItem.MaxCharge = 50f;
|
||||
modItem.ChargePerUse = 0.05f;
|
||||
Item.shoot = ModContent.ProjectileType<PulsePistolShot>();
|
||||
Item.shootSpeed = 8.2f;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset() => new Vector2(10f, 0f);
|
||||
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 * 4, velocity, ModContent.ProjectileType<PulsePistolShot>(), damage, knockback, player.whoAmI);
|
||||
return false;
|
||||
}
|
||||
public override void UseStyle(Player player, Rectangle heldItemFrame)
|
||||
{
|
||||
player.ChangeDir(Math.Sign((player.Calamity().mouseWorld - player.Center).X));
|
||||
float itemRotation = player.compositeFrontArm.rotation + MathHelper.PiOver2 * player.gravDir;
|
||||
|
||||
float pullback = 7f;
|
||||
|
||||
float animProgress = 0.5f - player.itemTime / (float)player.itemTimeMax;
|
||||
float rotation = (player.Center - player.Calamity().mouseWorld).ToRotation() * player.gravDir + MathHelper.PiOver2;
|
||||
if (animProgress < 0.4f)
|
||||
pullback -= (2.75f) * (float)Math.Pow((0.6f - animProgress) / 0.6f, 2);
|
||||
|
||||
Vector2 itemPosition = player.MountedCenter + itemRotation.ToRotationVector2() * pullback;
|
||||
Vector2 itemSize = new Vector2(54, 38);
|
||||
Vector2 itemOrigin = new Vector2(-24, 4);
|
||||
|
||||
CalamityUtils.CleanHoldStyle(player, itemRotation, itemPosition, itemSize, itemOrigin);
|
||||
|
||||
base.UseStyle(player, heldItemFrame);
|
||||
}
|
||||
|
||||
public override void UseItemFrame(Player player)
|
||||
{
|
||||
player.ChangeDir(Math.Sign((player.Calamity().mouseWorld - player.Center).X));
|
||||
|
||||
float animProgress = 0.5f - player.itemTime / (float)player.itemTimeMax;
|
||||
float rotation = (player.Center - player.Calamity().mouseWorld).ToRotation() * player.gravDir + MathHelper.PiOver2;
|
||||
|
||||
player.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, rotation);
|
||||
}
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 1);
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
|
Before Width: | Height: | Size: 489 B After Width: | Height: | Size: 1.3 KiB |
@@ -42,16 +42,43 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
|
||||
Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice;
|
||||
Item.rare = ModContent.RarityType<DarkBlue>();
|
||||
|
||||
modItem.UsesCharge = true;
|
||||
modItem.MaxCharge = 250f;
|
||||
modItem.ChargePerUse = 0.24f;
|
||||
}
|
||||
|
||||
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/PulseRifleGlow").Value);
|
||||
}
|
||||
public override void UseStyle(Player player, Rectangle heldItemFrame)
|
||||
{
|
||||
player.ChangeDir(Math.Sign((player.Calamity().mouseWorld - player.Center).X));
|
||||
float itemRotation = player.compositeFrontArm.rotation + MathHelper.PiOver2 * player.gravDir;
|
||||
|
||||
float pullback = 13f;
|
||||
|
||||
|
||||
float animProgress = 0.5f - player.itemTime / (float)player.itemTimeMax;
|
||||
float rotation = (player.Center - player.Calamity().mouseWorld).ToRotation() * player.gravDir + MathHelper.PiOver2;
|
||||
if (animProgress < 0.8f)
|
||||
pullback -= (5.75f) * (float)Math.Pow((0.85f - animProgress) / 0.85f, 2);
|
||||
|
||||
Vector2 itemPosition = player.MountedCenter + itemRotation.ToRotationVector2() * pullback;
|
||||
Vector2 itemSize = new Vector2(100, 32);
|
||||
Vector2 itemOrigin = new Vector2(-44, 4);
|
||||
|
||||
CalamityUtils.CleanHoldStyle(player, itemRotation, itemPosition, itemSize, itemOrigin);
|
||||
|
||||
base.UseStyle(player, heldItemFrame);
|
||||
}
|
||||
|
||||
public override void UseItemFrame(Player player)
|
||||
{
|
||||
player.ChangeDir(Math.Sign((player.Calamity().mouseWorld - player.Center).X));
|
||||
|
||||
float animProgress = 0.5f - player.itemTime / (float)player.itemTimeMax;
|
||||
float rotation = (player.Center - player.Calamity().mouseWorld).ToRotation() * player.gravDir + MathHelper.PiOver2;
|
||||
|
||||
player.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, rotation);
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset() => new Vector2(-15, 0);
|
||||
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
using CalamityMod.Rarities;
|
||||
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("HeavyLaserRifle")]
|
||||
public class ScattershotSkewer : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.DraedonsArsenal";
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true;
|
||||
ItemID.Sets.IsRangedSpecialistWeapon[Type] = true;
|
||||
}
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Item.width = 64;
|
||||
Item.height = 36;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.damage = 135;
|
||||
Item.knockBack = 4f;
|
||||
Item.useTime = 30;
|
||||
Item.useAnimation = 30;
|
||||
Item.autoReuse = true;
|
||||
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
Item.channel = true;
|
||||
Item.noUseGraphic = true;
|
||||
|
||||
Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice;
|
||||
Item.rare = ModContent.RarityType<Turquoise>();
|
||||
|
||||
Item.shoot = ModContent.ProjectileType<ScattershotSkewerHoldout>();
|
||||
Item.shootSpeed = 5f;
|
||||
}
|
||||
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/ScattershotSkewerGlow").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);
|
||||
|
||||
// 14NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction
|
||||
// We set the rotation to the direction to the mouse so the first frame doesn't appear bugged out.
|
||||
holdout.velocity = (player.Calamity().mouseWorld - player.MountedCenter).SafeNormalize(Vector2.Zero);
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 4);
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<MysteriousCircuitry>(15).
|
||||
AddIngredient<DubiousPlating>(15).
|
||||
AddIngredient<UelibloomBar>(8).
|
||||
AddIngredient(ItemID.LunarBar, 4).
|
||||
AddCondition(ArsenalTierGatedRecipe.ConstructRecipeCondition(4, out Func<bool> condition), condition).
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
Register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 256 B |
@@ -4,9 +4,12 @@ using CalamityMod.CustomRecipes;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.SunkenSea;
|
||||
using CalamityMod.Projectiles.DraedonsArsenal;
|
||||
using CalamityMod.Sounds;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.Audio;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
@@ -14,36 +17,108 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
public class Taser : ModItem, ILocalizedModType
|
||||
{
|
||||
public new string LocalizationCategory => "Items.Weapons.DraedonsArsenal";
|
||||
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(10);
|
||||
public static readonly SoundStyle Fire = new("CalamityMod/Sounds/Item/TaserLaunch") { Volume = 0.6f };
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true;
|
||||
ItemID.Sets.IsRangedSpecialistWeapon[Type] = true;
|
||||
}
|
||||
public override void SetDefaults()
|
||||
{
|
||||
CalamityGlobalItem modItem = Item.Calamity();
|
||||
|
||||
Item.width = 50;
|
||||
Item.height = 26;
|
||||
Item.damage = 16;
|
||||
Item.width = 42;
|
||||
Item.height = 24;
|
||||
Item.DamageType = DamageClass.Ranged;
|
||||
Item.useAnimation = Item.useTime = 28;
|
||||
Item.knockBack = 0.25f;
|
||||
Item.shoot = ModContent.ProjectileType<TaserHook>();
|
||||
Item.shootSpeed = 25f;
|
||||
|
||||
Item.UseSound = CommonCalamitySounds.PlasmaBoltSound;
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.damage = 9;
|
||||
Item.knockBack = 7f;
|
||||
Item.useTime = Item.useAnimation = 8;
|
||||
Item.autoReuse = true;
|
||||
|
||||
Item.useStyle = ItemUseStyleID.Shoot;
|
||||
Item.noMelee = true;
|
||||
|
||||
Item.value = CalamityGlobalItem.RarityOrangeBuyPrice;
|
||||
Item.rare = ItemRarityID.Orange;
|
||||
|
||||
modItem.UsesCharge = true;
|
||||
modItem.MaxCharge = 50f;
|
||||
modItem.ChargePerUse = 0.05f;
|
||||
Item.shoot = ModContent.ProjectileType<TaserShot>();
|
||||
Item.shootSpeed = 6f;
|
||||
}
|
||||
public override float UseSpeedMultiplier(Player player)
|
||||
{
|
||||
if (player.altFunctionUse == 2)
|
||||
return 0.3f;
|
||||
|
||||
return 1f;
|
||||
}
|
||||
public override bool CanUseItem(Player player) => (player.altFunctionUse == 2 && player.ownedProjectileCounts[ModContent.ProjectileType<TaserHook>()] <= 0) || player.altFunctionUse == 0;
|
||||
public override bool AltFunctionUse(Player player) => true;
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
{
|
||||
if (player.altFunctionUse == 2 && player.whoAmI == Main.myPlayer && !Main.mapFullscreen && !Main.blockMouse && player.Calamity().arsenalCooldown <= 0)
|
||||
{
|
||||
SoundEngine.PlaySound(Fire with { Pitch = -0.1f }, position);
|
||||
Projectile hook = Projectile.NewProjectileDirect(source, position, velocity, ModContent.ProjectileType<TaserHook>(), (int)(damage * 1.2f), 0, player.whoAmI);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (player.altFunctionUse == 0)
|
||||
{
|
||||
SoundStyle fire = new("CalamityMod/Sounds/Item/GunShotSmall");
|
||||
SoundEngine.PlaySound(fire with { Pitch = Main.rand.NextFloat(0.5f, 0.65f), Volume = 0.2f, MaxInstances = -1 }, position);
|
||||
Projectile shot = Projectile.NewProjectileDirect(source, position + velocity - Vector2.UnitY * 5, (velocity * 1.5f).RotatedByRandom(0.15f), type, damage, 0, player.whoAmI);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
public override void HoldItem(Player player)
|
||||
{
|
||||
if (Main.myPlayer == player.whoAmI)
|
||||
player.Calamity().rightClickListener = true;
|
||||
player.Calamity().mouseWorldListener = true;
|
||||
}
|
||||
public override void UseStyle(Player player, Rectangle heldItemFrame)
|
||||
{
|
||||
if (player.altFunctionUse == 0)
|
||||
{
|
||||
player.ChangeDir(Math.Sign((player.Calamity().mouseWorld - player.Center).X));
|
||||
float itemRotation = player.compositeFrontArm.rotation + MathHelper.PiOver2 * player.gravDir;
|
||||
|
||||
float pullback = 7f;
|
||||
|
||||
float animProgress = 0.5f - player.itemTime / (float)player.itemTimeMax;
|
||||
float rotation = (player.Center - player.Calamity().mouseWorld).ToRotation() * player.gravDir + MathHelper.PiOver2;
|
||||
if (animProgress < 0.4f)
|
||||
pullback -= (2.75f) * (float)Math.Pow((0.6f - animProgress) / 0.6f, 2);
|
||||
|
||||
Vector2 itemPosition = player.MountedCenter + itemRotation.ToRotationVector2() * pullback;
|
||||
Vector2 itemSize = new Vector2(42, 24);
|
||||
Vector2 itemOrigin = new Vector2(-24, 4);
|
||||
|
||||
CalamityUtils.CleanHoldStyle(player, itemRotation, itemPosition, itemSize, itemOrigin);
|
||||
|
||||
base.UseStyle(player, heldItemFrame);
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
|
||||
public override void UseItemFrame(Player player)
|
||||
{
|
||||
if (player.altFunctionUse == 0)
|
||||
{
|
||||
player.ChangeDir(Math.Sign((player.Calamity().mouseWorld - player.Center).X));
|
||||
|
||||
float animProgress = 0.5f - player.itemTime / (float)player.itemTimeMax;
|
||||
float rotation = (player.Center - player.Calamity().mouseWorld).ToRotation() * player.gravDir + MathHelper.PiOver2;
|
||||
if (animProgress < 0.4f)
|
||||
rotation += (player.altFunctionUse == 2 ? -0.15f : 0) * (float)Math.Pow((0.6f - animProgress) / 0.6f, 2) * player.direction;
|
||||
|
||||
player.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, rotation);
|
||||
}
|
||||
}
|
||||
public override Vector2? HoldoutOffset() => new Vector2(0f, 0f);
|
||||
public override void ModifyTooltips(List<TooltipLine> tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 1);
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
CreateRecipe().
|
||||
|
||||
|
Before Width: | Height: | Size: 711 B After Width: | Height: | Size: 685 B |
@@ -20,8 +20,8 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
{
|
||||
CalamityGlobalItem modItem = Item.Calamity();
|
||||
|
||||
Item.width = 30;
|
||||
Item.height = 34;
|
||||
Item.width = 58;
|
||||
Item.height = 48;
|
||||
Item.damage = 16;
|
||||
Item.DamageType = RogueDamageClass.Instance;
|
||||
Item.useTime = 40;
|
||||
@@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
|
||||
modItem.UsesCharge = true;
|
||||
modItem.MaxCharge = 50f;
|
||||
modItem.ChargePerUse = 0.07f;
|
||||
modItem.ChargePerUse = 0.05f;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
|
||||
|
||||
|
Before Width: | Height: | Size: 737 B After Width: | Height: | Size: 1.5 KiB |
@@ -39,7 +39,6 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
CreateRecipe().
|
||||
AddIngredient<PlasmaRod>().
|
||||
AddIngredient<Lazhar>().
|
||||
AddIngredient<TwistingNether>(3).
|
||||
AddTile(TileID.LunarCraftingStation).
|
||||
Register();
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
Item.width = 56;
|
||||
Item.height = 50;
|
||||
Item.damage = 77;
|
||||
Item.damage = 127;
|
||||
Item.DamageType = DamageClass.Magic;
|
||||
Item.mana = 7;
|
||||
Item.useTime = 22;
|
||||
|
||||