brought this branch up to speed

This commit is contained in:
termigator1359 committed 2020-05-12 16:15:45 -04:00
commit ef33074bba
441 files changed
+7720 -5751

No files matched your search

-8
View File
@@ -26,14 +26,6 @@ namespace CalamityMod.Buffs
{
player.lavaMax += 420;
}
else if (type == BuffID.Rage)
{
player.Calamity().throwingCrit += 10;
}
else if (type == BuffID.WellFed)
{
player.Calamity().throwingCrit += 2;
}
else if (type >= BuffID.NebulaUpDmg1 && type <= BuffID.NebulaUpDmg3)
{
float nebulaDamage = 0.075f * (float)player.nebulaLevelDamage; //7.5% to 22.5%
+24
View File
@@ -0,0 +1,24 @@
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Cooldowns
{
public class EnergyShellCooldown : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Energy Shell Cooldown");
Description.SetDefault("Your energy shell is recharging");
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
longerExpertDebuff = false;
canBeCleared = false;
}
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().energyShellCooldown = true;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 551 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 627 B

After

Width:  |  Height:  |  Size: 528 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 540 B

After

Width:  |  Height:  |  Size: 535 B

+18
View File
@@ -0,0 +1,18 @@
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatDebuffs
{
public class ProfanedWeakness : ModBuff
{
public override void SetDefaults()
{
DisplayName.SetDefault("Profaned Weakness");
Description.SetDefault("You do less damage");
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
longerExpertDebuff = false;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 599 B

+160 -97
View File
@@ -35,6 +35,7 @@ using CalamityMod.Projectiles.Rogue;
using CalamityMod.Projectiles.Summon;
using CalamityMod.Projectiles.Typeless;
using CalamityMod.Projectiles.Environment;
using CalamityMod.Tiles;
using CalamityMod.UI;
using CalamityMod.World;
using Microsoft.Xna.Framework;
@@ -42,6 +43,7 @@ using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Terraria;
using Terraria.DataStructures;
using Terraria.GameInput;
@@ -185,6 +187,7 @@ namespace CalamityMod.CalPlayer
public float shieldInvinc = 5f;
public GaelSwitchPhase gaelSwitchTimer = 0;
public int galileoCooldown = 0;
public int soundCooldown = 0;
public int planarSpeedBoost = 0;
public int profanedSoulWeaponUsage = 0;
public int profanedSoulWeaponType = 0;
@@ -231,7 +234,7 @@ namespace CalamityMod.CalPlayer
public float throwingDamage = 1f;
public float throwingVelocity = 1f;
public int throwingCrit = 4;
public int throwingCrit = 0;
public bool throwingAmmoCost75 = false;
public bool throwingAmmoCost66 = false;
public bool throwingAmmoCost50 = false;
@@ -410,6 +413,7 @@ namespace CalamityMod.CalPlayer
public bool pAmulet = false;
public bool fBarrier = false;
public bool aBrain = false;
public bool amalgam = false;
public bool lol = false;
public bool raiderTalisman = false;
public int raiderStack = 0;
@@ -533,6 +537,7 @@ namespace CalamityMod.CalPlayer
public bool snowRuffianSet = false;
public bool forbiddenCirclet = false;
public int forbiddenCooldown = 0;
public int tornadoCooldown = 0;
public bool eskimoSet = false; //vanilla armor
public bool meteorSet = false; //vanilla armor, for space gun nerf
public bool victideSet = false;
@@ -676,6 +681,7 @@ namespace CalamityMod.CalPlayer
public bool iCantBreathe = false; //Frozen Lungs debuff
public bool cragsLava = false;
public bool vaporfied = false;
public bool energyShellCooldown = false;
#endregion
#region Buff
@@ -1252,7 +1258,7 @@ namespace CalamityMod.CalPlayer
throwingDamage = 1f;
throwingVelocity = 1f;
throwingCrit = 4;
throwingCrit = 0;
throwingAmmoCost75 = false;
throwingAmmoCost66 = false;
throwingAmmoCost50 = false;
@@ -1426,6 +1432,7 @@ namespace CalamityMod.CalPlayer
pAmulet = false;
fBarrier = false;
aBrain = false;
amalgam = false;
frostFlare = false;
beeResist = false;
uberBees = false;
@@ -1637,6 +1644,7 @@ namespace CalamityMod.CalPlayer
iCantBreathe = false;
cragsLava = false;
vaporfied = false;
energyShellCooldown = false;
revivify = false;
trinketOfChiBuff = false;
@@ -1847,6 +1855,7 @@ namespace CalamityMod.CalPlayer
andromedaState = AndromedaPlayerState.Inactive;
planarSpeedBoost = 0;
galileoCooldown = 0;
soundCooldown = 0;
rage = 0;
adrenaline = 0;
raiderStack = 0;
@@ -1881,6 +1890,7 @@ namespace CalamityMod.CalPlayer
doubledHorror = false;
sulphurBubbleCooldown = 0;
forbiddenCooldown = 0;
tornadoCooldown = 0;
ladHearts = 0;
alcoholPoisoning = false;
@@ -1927,6 +1937,7 @@ namespace CalamityMod.CalPlayer
iCantBreathe = false;
cragsLava = false;
vaporfied = false;
energyShellCooldown = false;
#endregion
#region Rogue
@@ -1937,7 +1948,7 @@ namespace CalamityMod.CalPlayer
throwingDamage = 1f;
throwingVelocity = 1f;
throwingCrit = 4;
throwingCrit = 0;
throwingAmmoCost75 = false;
throwingAmmoCost66 = false;
throwingAmmoCost50 = false;
@@ -2282,6 +2293,24 @@ namespace CalamityMod.CalPlayer
(double)point.Y > (Main.rockLayer + y * 0.26);
ZoneSulphur = (CalamityWorld.sulphurTiles > 30 || (player.ZoneOverworldHeight && sulphurPosX)) && !ZoneAbyss;
Mod fargos = ModLoader.GetMod("Fargowiltas");
if (fargos != null)
{
//Fargo's fountain effects
if (Main.fountainColor == CalamityGlobalTile.WaterStyles.FirstOrDefault((style) => style.Name == "SunkenSeaWater").Type)
{
ZoneSunkenSea = true;
}
if (Main.fountainColor == CalamityGlobalTile.WaterStyles.FirstOrDefault((style) => style.Name == "SulphuricWater").Type)
{
ZoneSulphur = true;
}
if (Main.fountainColor == CalamityGlobalTile.WaterStyles.FirstOrDefault((style) => style.Name == "AstralWater").Type)
{
ZoneAstral = true;
}
}
}
public override bool CustomBiomesMatch(Player other)
@@ -2375,8 +2404,6 @@ namespace CalamityMod.CalPlayer
if (!mediumcoreDeath)
{
if (player.name == "Aleksh" || player.name == "Shark Lad")
items.Add(createItem(ModContent.ItemType<JoyfulHeart>()));
items.Add(createItem(ModContent.ItemType<StarterBag>()));
items.Add(createItem(ModContent.ItemType<Revenge>()));
items.Add(createItem(ModContent.ItemType<IronHeart>()));
@@ -2656,8 +2683,9 @@ namespace CalamityMod.CalPlayer
}
if (plagueReaper && plagueReaperCooldown <= 0)
plagueReaperCooldown = 1800;
if (forbiddenCirclet)
if (forbiddenCirclet && forbiddenCooldown <= 0)
{
forbiddenCooldown = 20;
int stormMana = (int)(ForbiddenCirclet.manaCost * player.manaCost);
if (player.statMana < stormMana)
{
@@ -2713,7 +2741,7 @@ namespace CalamityMod.CalPlayer
}
if (CalamityMod.RageHotKey.JustPressed)
{
if (gaelRageCooldown == 0 && player.HeldItem.type == ModContent.ItemType<GaelsGreatsword>() &&
if (gaelRageCooldown == 0 && player.ActiveItem().type == ModContent.ItemType<GaelsGreatsword>() &&
rage > 0)
{
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/SilvaDispel"), (int)player.position.X, (int)player.position.Y);
@@ -3220,7 +3248,21 @@ namespace CalamityMod.CalPlayer
{
meleeSpeedMult += 0.1f;
}
if (CalamityMod.CalamityConfig.ProficiencyEnabled)
if (bloodyWormTooth)
{
if (player.statLife < (int)(player.statLifeMax2 * 0.5))
meleeSpeedMult += 0.1f;
else
meleeSpeedMult += 0.05f;
}
if (aquaticScourgeLore)
{
if (player.wellFed)
meleeSpeedMult += 0.025f;
else
meleeSpeedMult -= 0.025f;
}
if (CalamityMod.CalamityConfig.ProficiencyEnabled)
{
meleeSpeedMult += GetMeleeSpeedBonus();
}
@@ -3349,12 +3391,12 @@ namespace CalamityMod.CalPlayer
{
CalamityPlayerMiscEffects.CalamityPostUpdateMiscEffects(player, mod);
if (player.HeldItem.type == ModContent.ItemType<GaelsGreatsword>())
if (player.ActiveItem().type == ModContent.ItemType<GaelsGreatsword>())
{
gaelSwitchTimer = GaelSwitchPhase.LoseRage;
rage += (int)MathHelper.Min(5, 10000 - rage);
}
else if (player.HeldItem.type != ModContent.ItemType<GaelsGreatsword>() && gaelSwitchTimer == GaelSwitchPhase.LoseRage)
else if (player.ActiveItem().type != ModContent.ItemType<GaelsGreatsword>() && gaelSwitchTimer == GaelSwitchPhase.LoseRage)
{
rage = 0;
gaelSwitchTimer = GaelSwitchPhase.None;
@@ -3574,7 +3616,7 @@ namespace CalamityMod.CalPlayer
}
}
}
if (invincible && player.inventory[player.selectedItem].type != ModContent.ItemType<ColdheartIcicle>())
if (invincible && player.ActiveItem().type != ModContent.ItemType<ColdheartIcicle>())
{
if (player.statLife <= 0)
{
@@ -4400,7 +4442,7 @@ namespace CalamityMod.CalPlayer
{
target.AddBuff(BuffID.Midas, 120, false);
}
if (ZoneCalamity && CalamityMod.fireWeaponList.Contains(player.inventory[player.selectedItem].type))
if (ZoneCalamity && CalamityMod.fireWeaponList.Contains(player.ActiveItem().type))
{
target.AddBuff(ModContent.BuffType<AbyssalFlames>(), 240, false);
}
@@ -4718,7 +4760,7 @@ namespace CalamityMod.CalPlayer
{
target.AddBuff(BuffID.Midas, 120, false);
}
if (ZoneCalamity && CalamityMod.fireWeaponList.Contains(player.inventory[player.selectedItem].type))
if (ZoneCalamity && CalamityMod.fireWeaponList.Contains(player.ActiveItem().type))
{
target.AddBuff(ModContent.BuffType<AbyssalFlames>(), 240, false);
}
@@ -4735,7 +4777,7 @@ namespace CalamityMod.CalPlayer
target.AddBuff(BuffID.Venom, 120, false);
}
}
if (proj.type == ProjectileID.IchorArrow && player.inventory[player.selectedItem].type == ModContent.ItemType<RaidersGlory>())
if (proj.type == ProjectileID.IchorArrow && player.ActiveItem().type == ModContent.ItemType<RaidersGlory>())
{
target.AddBuff(BuffID.Midas, 300, false);
}
@@ -4975,7 +5017,7 @@ namespace CalamityMod.CalPlayer
bool isSummon = proj.minion || proj.sentry || CalamityMod.projectileMinionList.Contains(proj.type);
bool hasClassType = proj.melee || proj.ranged || proj.magic || isSummon || proj.Calamity().rogue;
Item heldItem = player.inventory[player.selectedItem];
Item heldItem = player.ActiveItem();
if (isTrueMelee && soaring)
{
@@ -5393,12 +5435,7 @@ namespace CalamityMod.CalPlayer
}
if (umbraphileSet && proj.Calamity().rogue && (Main.rand.NextBool(4) || proj.Calamity().stealthStrike))
{
int newDamage = (int)(proj.damage * 0.25);
if (newDamage > 50)
{
newDamage = (int)((proj.damage * 0.25 - 50) * 0.1) + 50;
}
Projectile.NewProjectile(proj.Center.X, proj.Center.Y, 0f, 0f, ModContent.ProjectileType<UmbraphileBoom>(), newDamage, 0f, player.whoAmI, 0f, 0f);
Projectile.NewProjectile(proj.Center.X, proj.Center.Y, 0f, 0f, ModContent.ProjectileType<UmbraphileBoom>(), CalamityUtils.DamageSoftCap(proj.damage * 0.25, 50), 0f, player.whoAmI, 0f, 0f);
}
if (bloodflareMelee && isTrueMelee)
{
@@ -5622,25 +5659,28 @@ namespace CalamityMod.CalPlayer
#region Modify Hit By Proj
public override void ModifyHitByProjectile(Projectile proj, ref int damage, ref bool crit)
{
if (player.HeldItem.type == ModContent.ItemType<GaelsGreatsword>()
&& proj.active && proj.hostile && player.altFunctionUse == 2 && Main.rand.NextBool(2))
{
for (int j = 0; j < 3; j++)
{
int dustIndex = Dust.NewDust(proj.position, proj.width, proj.height, 31, 0f, 0f, 0, default, 1f);
Main.dust[dustIndex].velocity *= 0.3f;
}
int damage2 = (int)(GaelsGreatsword.BaseDamage * Main.LocalPlayer.MeleeDamage());
proj.hostile = false;
proj.friendly = true;
proj.velocity *= -1f;
proj.damage = damage2;
proj.penetrate = 1;
player.immune = true;
player.immuneNoBlink = true;
player.immuneTime = 4;
damage = 0;
}
if (CalamityMod.projectileDestroyExceptionList.TrueForAll(x => proj.type != x))
{
if (player.ActiveItem().type == ModContent.ItemType<GaelsGreatsword>()
&& proj.active && proj.hostile && player.altFunctionUse == 2 && Main.rand.NextBool(2))
{
for (int j = 0; j < 3; j++)
{
int dustIndex = Dust.NewDust(proj.position, proj.width, proj.height, 31, 0f, 0f, 0, default, 1f);
Main.dust[dustIndex].velocity *= 0.3f;
}
int damage2 = (int)(GaelsGreatsword.BaseDamage * Main.LocalPlayer.MeleeDamage());
proj.hostile = false;
proj.friendly = true;
proj.velocity *= -1f;
proj.damage = damage2;
proj.penetrate = 1;
player.immune = true;
player.immuneNoBlink = true;
player.immuneTime = 4;
damage = 0;
}
}
int bossRushDamage = (Main.expertMode ? 125 : 150) + (CalamityWorld.bossRushStage / 2);
if (CalamityWorld.bossRushActive)
{
@@ -5824,46 +5864,49 @@ namespace CalamityMod.CalPlayer
//1 second for DM lightning, 2 seconds for Storm Weaver/Cultist lightning
}
}
if (projRef && proj.active && !proj.friendly && proj.hostile && damage > 0 && Main.rand.NextBool(20))
{
player.statLife += damage;
player.HealEffect(damage);
proj.hostile = false;
proj.friendly = true;
proj.velocity.X = -proj.velocity.X;
proj.velocity.Y = -proj.velocity.Y;
}
if (projRefRare && proj.active && !proj.friendly && proj.hostile && damage > 0 && Main.rand.NextBool(2))
{
proj.hostile = false;
proj.friendly = true;
proj.velocity.X = -proj.velocity.X * 2f;
proj.velocity.Y = -proj.velocity.Y * 2f;
proj.damage *= 10;
projRefRareLifeRegenCounter = 120;
projTypeJustHitBy = proj.type;
}
if (aSparkRare && proj.active && !proj.friendly && proj.hostile && damage > 0)
{
if (proj.type == ProjectileID.BulletSnowman || proj.type == ProjectileID.BulletDeadeye || proj.type == ProjectileID.SniperBullet)
{
proj.hostile = false;
proj.friendly = true;
proj.velocity.X = -proj.velocity.X;
proj.velocity.Y = -proj.velocity.Y;
proj.damage *= 8;
}
}
if (daedalusReflect && proj.active && !proj.friendly && proj.hostile && damage > 0 && Main.rand.NextBool(3))
{
int healAmt = damage / 5;
player.statLife += healAmt;
player.HealEffect(healAmt);
proj.hostile = false;
proj.friendly = true;
proj.velocity.X = -proj.velocity.X;
proj.velocity.Y = -proj.velocity.Y;
}
if (CalamityMod.projectileDestroyExceptionList.TrueForAll(x => proj.type != x))
{
if (projRef && proj.active && !proj.friendly && proj.hostile && damage > 0 && Main.rand.NextBool(20))
{
player.statLife += damage;
player.HealEffect(damage);
proj.hostile = false;
proj.friendly = true;
proj.velocity.X = -proj.velocity.X;
proj.velocity.Y = -proj.velocity.Y;
}
if (projRefRare && proj.active && !proj.friendly && proj.hostile && damage > 0 && Main.rand.NextBool(2))
{
proj.hostile = false;
proj.friendly = true;
proj.velocity.X = -proj.velocity.X * 2f;
proj.velocity.Y = -proj.velocity.Y * 2f;
proj.damage *= 10;
projRefRareLifeRegenCounter = 120;
projTypeJustHitBy = proj.type;
}
if (aSparkRare && proj.active && !proj.friendly && proj.hostile && damage > 0)
{
if (proj.type == ProjectileID.BulletSnowman || proj.type == ProjectileID.BulletDeadeye || proj.type == ProjectileID.SniperBullet)
{
proj.hostile = false;
proj.friendly = true;
proj.velocity.X = -proj.velocity.X;
proj.velocity.Y = -proj.velocity.Y;
proj.damage *= 8;
}
}
if (daedalusReflect && proj.active && !proj.friendly && proj.hostile && damage > 0 && Main.rand.NextBool(3))
{
int healAmt = damage / 5;
player.statLife += healAmt;
player.HealEffect(healAmt);
proj.hostile = false;
proj.friendly = true;
proj.velocity.X = -proj.velocity.X;
proj.velocity.Y = -proj.velocity.Y;
}
}
}
#endregion
@@ -6134,7 +6177,7 @@ namespace CalamityMod.CalPlayer
}
}
if (lol || (invincible && player.inventory[player.selectedItem].type != ModContent.ItemType<ColdheartIcicle>()))
if (lol || (invincible && player.ActiveItem().type != ModContent.ItemType<ColdheartIcicle>()))
{
return false;
}
@@ -6225,6 +6268,10 @@ namespace CalamityMod.CalPlayer
if (encased)
{
damage = (int)(damage * 0.7);
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<EnergyShell>()] > 0 && player.ActiveItem().type == ModContent.ItemType<LionHeart>())
{
damage = (int)(damage * 0.5);
}
if (theBee && player.statLife >= player.statLifeMax2 && theBeeCooldown <= 0)
{
@@ -6427,34 +6474,41 @@ namespace CalamityMod.CalPlayer
}
}
}
if (aBrain)
if (aBrain || amalgam)
{
for (int m = 0; m < Main.maxNPCs; m++)
{
if (Main.npc[m].active && !Main.npc[m].friendly)
{
float arg_67A_0 = (Main.npc[m].Center - player.Center).Length();
float num10 = (float)Main.rand.Next(200 + (int)damage / 2, 301 + (int)damage * 2);
if (num10 > 500f)
float npcDist = (Main.npc[m].Center - player.Center).Length();
float range = (float)Main.rand.Next(200 + (int)damage / 2, 301 + (int)damage * 2);
if (range > 500f)
{
num10 = 500f + (num10 - 500f) * 0.75f;
range = 500f + (range - 500f) * 0.75f;
}
if (num10 > 700f)
if (range > 700f)
{
num10 = 700f + (num10 - 700f) * 0.5f;
range = 700f + (range - 700f) * 0.5f;
}
if (num10 > 900f)
if (range > 900f)
{
num10 = 900f + (num10 - 900f) * 0.25f;
range = 900f + (range - 900f) * 0.25f;
}
if (arg_67A_0 < num10)
if (npcDist < range)
{
float num11 = (float)Main.rand.Next(90 + (int)damage / 3, 300 + (int)damage / 2);
Main.npc[m].AddBuff(BuffID.Confused, (int)num11, false);
float duration = (float)Main.rand.Next(90 + (int)damage / 3, 300 + (int)damage / 2);
Main.npc[m].AddBuff(BuffID.Confused, (int)duration, false);
if (amalgam)
{
Main.npc[m].AddBuff(ModContent.BuffType<BrimstoneFlames>(), (int)duration, false);
Main.npc[m].AddBuff(ModContent.BuffType<GodSlayerInferno>(), (int)duration, false);
Main.npc[m].AddBuff(ModContent.BuffType<SulphuricPoisoning>(), (int)duration, false);
Main.npc[m].AddBuff(ModContent.BuffType<Irradiated>(), (int)duration, false);
}
}
}
}
//spawn the harmless brain images that are actually projectiles
//Spawn the harmless brain images that are actually projectiles
Projectile.NewProjectile(player.Center.X + (float)Main.rand.Next(-40, 40), player.Center.Y - (float)Main.rand.Next(20, 60), player.velocity.X * 0.3f, player.velocity.Y * 0.3f, ProjectileID.BrainOfConfusion, 0, 0f, player.whoAmI, 0f, 0f);
}
if (polarisBoost)
@@ -9285,7 +9339,8 @@ namespace CalamityMod.CalPlayer
player.rangedCrit += boost;
player.magicCrit += boost;
player.thrownCrit += boost;
throwingCrit += boost;
// Rogue weapons benefit from throwing crit AND rogue crit, so don't add both.
// throwingCrit += boost;
}
#endregion
@@ -9346,7 +9401,15 @@ namespace CalamityMod.CalPlayer
// This doesn't trigger stealth strike effects (ConsumeStealthStrike instead of StealthStrike)
// so non-rogue weapons can't call lasers down from the sky and such.
// Using any item which deals no damage or is a tool doesn't consume stealth.
bool playerUsingWeapon = player.HeldItem.damage > 0 && player.HeldItem.pick <= 0 && player.HeldItem.hammer <= 0 && player.HeldItem.axe <= 0;
Item it = player.ActiveItem();
bool hasDamage = it.damage > 0;
bool hasHitboxes = !it.noMelee || it.shoot > 0;
bool isPickaxe = it.pick > 0;
bool isAxe = it.axe > 0;
bool isHammer = it.hammer > 0;
bool isPlaced = it.createTile != -1;
bool hasNonWeaponFunction = isPickaxe || isAxe || isHammer || isPlaced;
bool playerUsingWeapon = hasDamage && hasHitboxes && !hasNonWeaponFunction;
if (!stealthStrikeThisFrame && player.itemAnimation == player.itemAnimationMax - 1 && playerUsingWeapon)
ConsumeStealthByAttacking();
}
@@ -9396,7 +9459,7 @@ namespace CalamityMod.CalPlayer
stealthGenMoving += 0.15f;
}
if (CalamityMod.daggerList.Contains(player.inventory[player.selectedItem].type) && player.invis)
if (CalamityMod.daggerList.Contains(player.ActiveItem().type) && player.invis)
{
stealthGenStandstill += 0.08f;
stealthGenMoving += 0.08f;
+1 -1
View File
@@ -591,7 +591,7 @@ namespace CalamityMod.CalPlayer
if (modPlayer.ZoneAbyss || modPlayer.ZoneSulphur)
canSulphurFish = true;
Item item = player.inventory[player.selectedItem];
Item item = player.ActiveItem();
if (!canSulphurFish || item.fishingPole <= 0 || item.holdStyle != 1)
fishingLevel = -1;
}
+5 -1
View File
@@ -272,6 +272,10 @@ namespace CalamityMod.CalPlayer
{
modPlayer.alcoholPoisonLevel++;
}
if (modPlayer.fabsolVodka)
{
modPlayer.alcoholPoisonLevel++;
}
if (modPlayer.fireball)
{
modPlayer.alcoholPoisonLevel++;
@@ -533,7 +537,7 @@ namespace CalamityMod.CalPlayer
}
}
if (modPlayer.weakPetrification || CalamityWorld.bossRushActive)
if (modPlayer.weakPetrification)
{
if (player.mount.Active)
player.mount.Dismount(player);
+23 -25
View File
@@ -280,7 +280,7 @@ namespace CalamityMod.CalPlayer
}
// If Revengeance Mode is not active, then set rippers to zero
else if(player.whoAmI == Main.myPlayer)
else if (player.whoAmI == Main.myPlayer)
{
modPlayer.rage = 0;
modPlayer.adrenaline = 0;
@@ -595,7 +595,7 @@ namespace CalamityMod.CalPlayer
if (Main.raining)
{
float frequencyMult = 1f - Main.cloudAlpha; // 1 to 0.11
float frequencyMult = (1f - Main.cloudAlpha) * CalamityMod.CalamityConfig.WeatherEffectRateMultiplier; // 3 to 0.055
Vector2 spawnPoint = new Vector2(player.Center.X + (float)Main.rand.Next(-1000, 1001), player.Center.Y - (float)Main.rand.Next(700, 801));
Tile tileSafely = Framing.GetTileSafely((int)(spawnPoint.X / 16f), (int)(spawnPoint.Y / 16f));
@@ -609,7 +609,7 @@ namespace CalamityMod.CalPlayer
Vector2 velocity = new Vector2(windVelocity * 0.2f, 3f * Main.rand.NextFloat());
if (player.miscCounter % divisor == 0 && Main.rand.NextBool(3))
Projectile.NewProjectile(spawnPoint.X, spawnPoint.Y, velocity.X, velocity.Y, ModContent.ProjectileType<IceRain>(), 20, 0f, player.whoAmI, 1f, 0f);
Projectile.NewProjectile(spawnPoint.X, spawnPoint.Y, velocity.X, velocity.Y, ModContent.ProjectileType<IceRain>(), 20, 0f, player.whoAmI, 2f, 0f);
}
}
else
@@ -885,6 +885,8 @@ namespace CalamityMod.CalPlayer
modPlayer.gainRageCooldown--;
if (modPlayer.galileoCooldown > 0)
modPlayer.galileoCooldown--;
if (modPlayer.soundCooldown > 0)
modPlayer.soundCooldown--;
if (modPlayer.raiderCooldown > 0)
modPlayer.raiderCooldown--;
if (modPlayer.gSabatonCooldown > 0)
@@ -945,6 +947,8 @@ namespace CalamityMod.CalPlayer
modPlayer.sulphurBubbleCooldown--;
if (modPlayer.forbiddenCooldown > 0)
modPlayer.forbiddenCooldown--;
if (modPlayer.tornadoCooldown > 0)
modPlayer.tornadoCooldown--;
if (modPlayer.ladHearts > 0)
modPlayer.ladHearts--;
if (modPlayer.titanBoost > 0)
@@ -1305,7 +1309,7 @@ namespace CalamityMod.CalPlayer
player.endurance += 0.01f;
player.statDefense += 2;
}
if (!modPlayer.polarisBoost || player.inventory[player.selectedItem].type != ModContent.ItemType<PolarisParrotfish>())
if (!modPlayer.polarisBoost || player.ActiveItem().type != ModContent.ItemType<PolarisParrotfish>())
{
modPlayer.polarisBoost = false;
if (player.FindBuffIndex(ModContent.BuffType<PolarisBuff>()) > -1)
@@ -1436,7 +1440,6 @@ namespace CalamityMod.CalPlayer
player.statDefense += 1;
player.allDamage += 0.025f;
modPlayer.AllCritBoost(1);
player.meleeSpeed += 0.025f;
player.minionKB += 0.25f;
player.moveSpeed += 0.1f;
}
@@ -1445,7 +1448,6 @@ namespace CalamityMod.CalPlayer
player.statDefense -= 1;
player.allDamage -= 0.025f;
modPlayer.AllCritBoost(-1);
player.meleeSpeed -= 0.025f;
player.minionKB -= 0.25f;
player.moveSpeed -= 0.1f;
}
@@ -2563,27 +2565,27 @@ namespace CalamityMod.CalPlayer
}
}
if (CalamityMod.scopedWeaponList.Contains(player.inventory[player.selectedItem].type))
if (CalamityMod.scopedWeaponList.Contains(player.ActiveItem().type))
player.scope = true;
if (CalamityMod.highTestFishList.Contains(player.inventory[player.selectedItem].type))
if (CalamityMod.highTestFishList.Contains(player.ActiveItem().type))
player.accFishingLine = true;
if (CalamityMod.boomerangList.Contains(player.inventory[player.selectedItem].type) && player.invis)
if (CalamityMod.boomerangList.Contains(player.ActiveItem().type) && player.invis)
modPlayer.throwingDamage += 0.1f;
if (CalamityMod.javelinList.Contains(player.inventory[player.selectedItem].type) && player.invis)
if (CalamityMod.javelinList.Contains(player.ActiveItem().type) && player.invis)
player.armorPenetration += 5;
if (CalamityMod.flaskBombList.Contains(player.inventory[player.selectedItem].type) && player.invis)
if (CalamityMod.flaskBombList.Contains(player.ActiveItem().type) && player.invis)
modPlayer.throwingVelocity += 0.1f;
if (CalamityMod.spikyBallList.Contains(player.inventory[player.selectedItem].type) && player.invis)
if (CalamityMod.spikyBallList.Contains(player.ActiveItem().type) && player.invis)
modPlayer.throwingCrit += 10;
if (modPlayer.planarSpeedBoost != 0)
{
if (player.inventory[player.selectedItem].type != ModContent.ItemType<PrideHuntersPlanarRipper>())
if (player.ActiveItem().type != ModContent.ItemType<PrideHuntersPlanarRipper>())
modPlayer.planarSpeedBoost = 0;
}
@@ -2593,10 +2595,10 @@ namespace CalamityMod.CalPlayer
!modPlayer.ZoneSunkenSea && !player.ZoneSnow && !player.ZoneCorrupt && !player.ZoneCrimson && !player.ZoneHoly &&
!player.ZoneDesert && !player.ZoneUndergroundDesert && !player.ZoneGlowshroom && !player.ZoneDungeon && !player.ZoneBeach && !player.ZoneMeteor;
if (player.ZoneUnderworldHeight && !modPlayer.ZoneCalamity && CalamityMod.fireWeaponList.Contains(player.inventory[player.selectedItem].type))
if (player.ZoneUnderworldHeight && !modPlayer.ZoneCalamity && CalamityMod.fireWeaponList.Contains(player.ActiveItem().type))
player.endurance += 0.03f;
if ((player.ZoneDesert || player.ZoneUndergroundDesert) && CalamityMod.daggerList.Contains(player.inventory[player.selectedItem].type))
if ((player.ZoneDesert || player.ZoneUndergroundDesert) && CalamityMod.daggerList.Contains(player.ActiveItem().type))
player.scope = true;
if (modPlayer.ZoneSunkenSea)
@@ -2605,7 +2607,7 @@ namespace CalamityMod.CalPlayer
player.ignoreWater = true;
}
if (player.ZoneSnow && CalamityMod.iceWeaponList.Contains(player.inventory[player.selectedItem].type))
if (player.ZoneSnow && CalamityMod.iceWeaponList.Contains(player.ActiveItem().type))
player.statDefense += 5;
if (modPlayer.ZoneAstral)
@@ -2614,7 +2616,7 @@ namespace CalamityMod.CalPlayer
player.wingTimeMax = (int)((double)player.wingTimeMax * 1.05);
}
if (player.ZoneJungle && CalamityMod.natureWeaponList.Contains(player.inventory[player.selectedItem].type))
if (player.ZoneJungle && CalamityMod.natureWeaponList.Contains(player.ActiveItem().type))
player.AddBuff(BuffID.DryadsWard, 5, true); // Dryad's Blessing
if (modPlayer.ZoneAbyss)
@@ -2634,7 +2636,7 @@ namespace CalamityMod.CalPlayer
player.endurance += 0.05f;
}
if (player.ZoneRockLayerHeight && ZoneForest && CalamityMod.flaskBombList.Contains(player.inventory[player.selectedItem].type))
if (player.ZoneRockLayerHeight && ZoneForest && CalamityMod.flaskBombList.Contains(player.ActiveItem().type))
player.blackBelt = true;
if (player.ZoneHoly)
@@ -2949,8 +2951,6 @@ namespace CalamityMod.CalPlayer
if (modPlayer.manaOverloader)
{
player.magicDamage += 0.06f;
if (player.statMana < (int)(player.statManaMax2 * 0.1))
player.ghostHeal = true;
}
if (modPlayer.twinsLore)
@@ -2979,13 +2979,11 @@ namespace CalamityMod.CalPlayer
if (player.statLife < (int)(player.statLifeMax2 * 0.5))
{
player.meleeDamage += 0.1f;
player.meleeSpeed += 0.1f;
player.endurance += 0.1f;
}
else
{
player.meleeDamage += 0.05f;
player.meleeSpeed += 0.05f;
player.endurance += 0.05f;
}
}
@@ -3193,7 +3191,7 @@ namespace CalamityMod.CalPlayer
}
// Navy Fishing Rod's electric aura when in-use
if (player.inventory[player.selectedItem].type == ModContent.ItemType<NavyFishingRod>() && player.ownedProjectileCounts[ModContent.ProjectileType<NavyBobber>()] != 0)
if (player.ActiveItem().type == ModContent.ItemType<NavyFishingRod>() && player.ownedProjectileCounts[ModContent.ProjectileType<NavyBobber>()] != 0)
{
const int FramesPerHit = 120;
@@ -3503,8 +3501,8 @@ namespace CalamityMod.CalPlayer
}
}
if (player.meleeSpeed < 0.5f)
player.meleeSpeed = 0.5f;
/*if (player.meleeSpeed < 0.5f)
player.meleeSpeed = 0.5f;*/
// 10% is converted to 9%, 25% is converted to 20%, 50% is converted to 33%, 75% is converted to 43%, 100% is converted to 50%
if (player.endurance > 0f)
+133 -15
View File
@@ -9,7 +9,7 @@ using CalamityMod.Items.Accessories.Wings;
using CalamityMod.Items.Ammo.FiniteUse;
using CalamityMod.Items.Armor;
using CalamityMod.Items.Armor.Vanity;
using CalamityMod.Items.Dyes;
using CalamityMod.Items.Dyes.HairDye;
using CalamityMod.Items.Fishing.AstralCatches;
using CalamityMod.Items.Fishing.BrimstoneCragCatches;
using CalamityMod.Items.Fishing.FishingRods;
@@ -124,9 +124,10 @@ namespace CalamityMod
// DR data structure
public static SortedDictionary<int, float> DRValues;
public static SortedDictionary<int, int> bossKillTimes;
// Lists
public static IList<string> donatorList;
// Lists
public static IList<string> donatorList;
public static List<int> rangedProjectileExceptionList;
public static List<int> projectileDestroyExceptionList;
public static List<int> projectileMinionList;
@@ -149,7 +150,9 @@ namespace CalamityMod
public static List<int> thirtyThreeDamageBuffList; //33% buff
public static List<int> twentyFiveDamageBuffList; //25% buff
public static List<int> twentyDamageBuffList; //20% buff
public static List<int> tenDamageBuffList; //10% buff
public static List<int> weaponAutoreuseList;
public static List<int> tenDamageNerfList; //10% nerf
public static List<int> quarterDamageNerfList; //25% nerf
public static List<int> pumpkinMoonBuffList;
public static List<int> frostMoonBuffList;
@@ -236,6 +239,7 @@ namespace CalamityMod
SetupLists();
SetupVanillaDR();
SetupBossKillTimes();
SetupThoriumBossDR(thorium);
CalamityLocalization.AddLocalizations();
@@ -339,6 +343,8 @@ namespace CalamityMod
DRValues?.Clear();
DRValues = null;
bossKillTimes?.Clear();
bossKillTimes = null;
donatorList = null;
rangedProjectileExceptionList = null;
@@ -362,7 +368,9 @@ namespace CalamityMod
fiftyDamageBuffList = null;
thirtyThreeDamageBuffList = null;
twentyFiveDamageBuffList = null;
tenDamageBuffList = null;
weaponAutoreuseList = null;
tenDamageNerfList = null;
quarterDamageNerfList = null;
pumpkinMoonBuffList = null;
frostMoonBuffList = null;
@@ -649,7 +657,16 @@ namespace CalamityMod
ModContent.ProjectileType<FlakKrakenProj>(),
ModContent.ProjectileType<SylvanSlashAttack>(),
ModContent.ProjectileType<InfernadoFriendly>()
ModContent.ProjectileType<InfernadoFriendly>(),
//Some hostile boss projectiles
ModContent.ProjectileType<BrimstoneMonster>(),
ModContent.ProjectileType<InfernadoRevenge>(),
ModContent.ProjectileType<OverlyDramaticDukeSummoner>(),
ModContent.ProjectileType<ProvidenceHolyRay>(),
ModContent.ProjectileType<OldDukeVortex>(),
ModContent.ProjectileType<BrimstoneRay>(),
ModContent.ProjectileType<BrimstoneTargetRay>()
};
projectileMinionList = new List<int>()
@@ -1244,7 +1261,8 @@ namespace CalamityMod
ItemID.BreakerBlade,
ItemID.MonkStaffT2,
ItemID.ProximityMineLauncher,
ItemID.FireworksLauncher
ItemID.FireworksLauncher,
ItemID.ShadowbeamStaff
};
sixtySixDamageBuffList = new List<int>()
@@ -1311,6 +1329,12 @@ namespace CalamityMod
ItemID.TacticalShotgun
};
tenDamageBuffList = new List<int>()
{
ItemID.MagnetSphere,
ItemID.BatScepter
};
weaponAutoreuseList = new List<int>()
{
ItemID.NightsEdge,
@@ -1328,12 +1352,20 @@ namespace CalamityMod
ItemID.StylistKilLaKillScissorsIWish
};
tenDamageNerfList = new List<int>()
{
ItemID.Phantasm
};
quarterDamageNerfList = new List<int>()
{
ItemID.Razorpine,
ItemID.DaedalusStormbow,
ItemID.PhoenixBlaster,
ItemID.BlizzardStaff,
ItemID.DD2BetsyBow
ItemID.DD2BetsyBow,
ItemID.InfluxWaver,
ItemID.Xenopopper,
ItemID.ElectrosphereLauncher
};
pumpkinMoonBuffList = new List<int>()
@@ -2525,13 +2557,14 @@ namespace CalamityMod
{ NPCID.Crab, 0.05f },
{ NPCID.Crawdad, 0.2f },
{ NPCID.Crawdad2, 0.2f },
{ NPCID.CultistBoss, 0.05f },
{ NPCID.CultistBoss, 0.1f },
{ NPCID.DD2Betsy, 0.1f },
{ NPCID.DD2OgreT2, 0.1f },
{ NPCID.DD2OgreT3, 0.15f },
{ NPCID.DeadlySphere, 0.4f },
{ NPCID.DiabolistRed, 0.2f },
{ NPCID.DiabolistWhite, 0.2f },
{ NPCID.DukeFishron, 0.1f },
{ NPCID.DungeonGuardian, 0.999999f },
{ NPCID.DungeonSpirit, 0.2f },
{ NPCID.ElfCopter, 0.15f },
@@ -2576,7 +2609,9 @@ namespace CalamityMod
{ NPCID.Paladin, 0.45f },
{ NPCID.PirateCaptain, 0.05f },
{ NPCID.PirateShipCannon, 0.15f },
{ NPCID.PossessedArmor, 0.25f },
{ NPCID.Plantera, 0.15f },
{ NPCID.PlanterasTentacle, 0.1f },
{ NPCID.PossessedArmor, 0.25f },
{ NPCID.PresentMimic, 0.3f },
{ NPCID.PrimeCannon, 0.2f },
{ NPCID.PrimeLaser, 0.2f },
@@ -2617,7 +2652,7 @@ namespace CalamityMod
#region Thorium Boss DR
private void SetupThoriumBossDR(Mod thorium)
{
if (thorium is null || !CalamityMod.CalamityConfig.RevengeanceAndDeathThoriumBossBuff)
if (thorium is null || !CalamityConfig.RevengeanceAndDeathThoriumBossBuff)
return;
void ThoriumDR(string npcName, float dr) {
@@ -2650,10 +2685,93 @@ namespace CalamityMod
ThoriumDR("Omnicide", 0.3f);
ThoriumDR("Abyssion", 0.35f);
}
#endregion
#endregion
#region Music
public override void UpdateMusic(ref int music, ref MusicPriority priority)
#region Boss Kill Times
private void SetupBossKillTimes()
{
bossKillTimes = new SortedDictionary<int, int> {
{ NPCID.KingSlime, 3600 },
{ NPCID.EyeofCthulhu, 5400 },
{ NPCID.EaterofWorldsHead, 7200 },
{ NPCID.EaterofWorldsBody, 7200 },
{ NPCID.EaterofWorldsTail, 7200 },
{ NPCID.BrainofCthulhu, 5400 },
{ NPCID.QueenBee, 7200 },
{ NPCID.SkeletronHead, 9000 },
{ NPCID.WallofFlesh, 10800 },
{ NPCID.WallofFleshEye, 10800 },
{ NPCID.Spazmatism, 10800 },
{ NPCID.Retinazer, 10800 },
{ NPCID.TheDestroyer, 10800 },
{ NPCID.TheDestroyerBody, 10800 },
{ NPCID.TheDestroyerTail, 10800 },
{ NPCID.SkeletronPrime, 10800 },
{ NPCID.Plantera, 10800 },
{ NPCID.Golem, 10800 },
{ NPCID.GolemHead, 3600 },
{ NPCID.DukeFishron, 9000 },
{ NPCID.CultistBoss, 9000 },
{ NPCID.MoonLordCore, 14400 },
{ NPCID.MoonLordHand, 7200 },
{ NPCID.MoonLordHead, 7200 },
{ ModContent.NPCType<DesertScourgeHead>(), 3600 },
{ ModContent.NPCType<DesertScourgeBody>(), 3600 },
{ ModContent.NPCType<DesertScourgeTail>(), 3600 },
{ ModContent.NPCType<CrabulonIdle>(), 5400 },
{ ModContent.NPCType<HiveMind>(), 1800 },
{ ModContent.NPCType<HiveMindP2>(), 5400 },
{ ModContent.NPCType<PerforatorHive>(), 7200 },
{ ModContent.NPCType<SlimeGodCore>(), 10800 },
{ ModContent.NPCType<SlimeGod>(), 3600 },
{ ModContent.NPCType<SlimeGodRun>(), 3600 },
{ ModContent.NPCType<SlimeGodSplit>(), 3600 },
{ ModContent.NPCType<SlimeGodRunSplit>(), 3600 },
{ ModContent.NPCType<Cryogen>(), 10800 },
{ ModContent.NPCType<AquaticScourgeHead>(), 7200 },
{ ModContent.NPCType<AquaticScourgeBody>(), 7200 },
{ ModContent.NPCType<AquaticScourgeBodyAlt>(), 7200 },
{ ModContent.NPCType<AquaticScourgeTail>(), 7200 },
{ ModContent.NPCType<BrimstoneElemental>(), 10800 },
{ ModContent.NPCType<Calamitas>(), 1200 },
{ ModContent.NPCType<CalamitasRun3>(), 11400 },
{ ModContent.NPCType<Leviathan>(), 9000 },
{ ModContent.NPCType<Siren>(), 9000 },
{ ModContent.NPCType<AstrumAureus>(), 10800 },
{ ModContent.NPCType<AstrumDeusHeadSpectral>(), 10800 },
{ ModContent.NPCType<AstrumDeusBodySpectral>(), 10800 },
{ ModContent.NPCType<AstrumDeusTailSpectral>(), 10800 },
{ ModContent.NPCType<AstrumDeusHead>(), 7200 },
{ ModContent.NPCType<AstrumDeusBody>(), 7200 },
{ ModContent.NPCType<AstrumDeusTail>(), 7200 },
{ ModContent.NPCType<PlaguebringerGoliath>(), 10800 },
{ ModContent.NPCType<RavagerBody>(), 10800 },
{ ModContent.NPCType<ProfanedGuardianBoss>(), 5400 },
{ ModContent.NPCType<Bumblefuck>(), 7200 },
{ ModContent.NPCType<Providence>(), 14400 },
{ ModContent.NPCType<DarkEnergy>(), 1200 },
{ ModContent.NPCType<DarkEnergy2>(), 1200 },
{ ModContent.NPCType<DarkEnergy3>(), 1200 },
{ ModContent.NPCType<StormWeaverHeadNaked>(), 5400 },
{ ModContent.NPCType<StormWeaverBodyNaked>(), 5400 },
{ ModContent.NPCType<StormWeaverTailNaked>(), 5400 },
{ ModContent.NPCType<Signus>(), 7200 },
{ ModContent.NPCType<Polterghast>(), 10800 },
{ ModContent.NPCType<OldDuke>(), 10800 },
{ ModContent.NPCType<DevourerofGodsHead>(), 7200 },
{ ModContent.NPCType<DevourerofGodsBody>(), 7200 },
{ ModContent.NPCType<DevourerofGodsTail>(), 7200 },
{ ModContent.NPCType<DevourerofGodsHeadS>(), 10800 },
{ ModContent.NPCType<DevourerofGodsBodyS>(), 10800 },
{ ModContent.NPCType<DevourerofGodsTailS>(), 10800 },
{ ModContent.NPCType<Yharon>(), 10800 },
{ ModContent.NPCType<SupremeCalamitas>(), 14400 }
};
}
#endregion
#region Music
public override void UpdateMusic(ref int music, ref MusicPriority priority)
{
Mod calamityModMusic = ModLoader.GetMod("CalamityModMusic");
if (Main.musicVolume != 0)
@@ -3298,7 +3416,7 @@ namespace CalamityMod
#region Lighting
const float MaxCaveDarkness = -0.3f;
const float MaxSignusDarkness = -0.5f;
const float MaxSignusDarkness = -0.4f;
const float MaxAbyssDarkness = -0.7f;
public override void ModifyLightingBrightness(ref float scale)
{
@@ -3566,6 +3684,6 @@ namespace CalamityMod
AcidRainUIDrawFadeSync,
AcidRainOldDukeSummonSync,
GaelsGreatswordSwingSync,
SpawnSuperDummy,
SpawnSuperDummy
}
}
+13
View File
@@ -88,6 +88,11 @@ namespace CalamityMod
[Tooltip("Boosts the player's mining speed by 75%")]
public bool MiningSpeedBoost { get; set; }
[DefaultValue(false)]
[Label("Extra Damage Reduction for Bosses")]
[Tooltip("Grants extra damage reduction for bosses for every boss encounter, regardless if you've defeated the boss already or not")]
public bool ExtraBossDR { get; set; }
[Label("Boss Health Percentage Boost")]
[Tooltip("Boosts the health of bosses to a maximum of +900% health")]
[Range(0f, 900f)]
@@ -158,6 +163,14 @@ namespace CalamityMod
[Tooltip("Buffs the health of Thorium bosses if Revengeance or Death is enabled")]
public bool RevengeanceAndDeathThoriumBossBuff { get; set; }
[Header("Death Mode Changes")]
[DefaultValue(1f)]
[Range(0.5f, 3f)]
[Label("Weather Effect Rate Multiplier")]
[Tooltip("Affects all Death Mode weather projectiles, increase to decrease the amount of projectiles, decrease to increase the amount of projectiles")]
public float WeatherEffectRateMultiplier { get; set; }
[Header("Boss Rush Curses")]
[DefaultValue(false)]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 334 B

After

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 285 B

After

Width:  |  Height:  |  Size: 406 B

+1 -1
View File
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Accessories
Tooltip.SetDefault("While under the effects of a damaging debuff, you gain 10% increased damage and 5% crit\n" +
"For every 25% of lost life, you gain 6% increased damage and 3% crit\n" +
"This will max out at 18% increased damage and 9% crit when under 25% life\n" +
"Provides immunity to poisoned, venom, and sulphruic poisoning");
"Provides immunity to poisoned, venom, and sulphuric poisoning");
}
public override void SetDefaults()
+2 -3
View File
@@ -14,8 +14,8 @@ namespace CalamityMod.Items.Accessories
DisplayName.SetDefault("Elemental Quiver");
Tooltip.SetDefault("Ranged projectiles have a chance to split\n" +
"Ranged weapons have a chance to instantly kill normal enemies\n" +
"10% increased ranged damage and 5% increased ranged critical strike chance\n" +
"20% reduced ammo usage and increased life regen, minion knockback, defense, and pick speed\n" +
"10% increased ranged damage, 5% increased ranged critical strike chance, and 20% reduced ammo usage\n" +
"5 increased defense, 2 increased life regen, and 15% increased pick speed\n" +
"Greatly increases arrow speed and grants a 20% chance to not consume arrows");
}
@@ -38,7 +38,6 @@ namespace CalamityMod.Items.Accessories
player.lifeRegen += 2;
player.statDefense += 5;
player.pickSpeed -= 0.15f;
player.minionKB += 0.5f;
}
public override void AddRecipes()
Binary file not shown.

Before

Width:  |  Height:  |  Size: 927 B

After

Width:  |  Height:  |  Size: 1.2 KiB

+4 -10
View File
@@ -7,6 +7,8 @@ namespace CalamityMod.Items.Accessories
{
public class FungalClump : ModItem
{
public const int FungalClumpDamage = 10;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Fungal Clump");
@@ -24,15 +26,7 @@ namespace CalamityMod.Items.Accessories
item.accessory = true;
}
public override bool CanEquipAccessory(Player player, int slot)
{
CalamityPlayer modPlayer = player.Calamity();
if (modPlayer.fungalClump)
{
return false;
}
return true;
}
public override bool CanEquipAccessory(Player player, int slot) => !player.Calamity().fungalClump;
public override void UpdateAccessory(Player player, bool hideVisual)
{
@@ -46,7 +40,7 @@ namespace CalamityMod.Items.Accessories
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<FungalClumpMinion>()] < 1)
{
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<FungalClumpMinion>(), (int)(10 * player.MinionDamage()), 1f, Main.myPlayer, 0f, 0f);
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<FungalClumpMinion>(), (int)(FungalClumpDamage * player.MinionDamage()), 1f, player.whoAmI, 0f, 0f);
}
}
}
+120 -106
View File
@@ -2,10 +2,12 @@
using CalamityMod.CalPlayer;
using CalamityMod.Projectiles.Summon;
using CalamityMod.World;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using static Terraria.ModLoader.ModContent;
namespace CalamityMod.Items.Accessories
{
@@ -48,165 +50,177 @@ namespace CalamityMod.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
//Don't do anything if the player fucked up somehow, somewhere
if (player.whoAmI != Main.myPlayer || player is null || player.dead)
return;
Lighting.AddLight((int)player.Center.X / 16, (int)player.Center.Y / 16, (float)Main.DiscoR / 255f, (float)Main.DiscoG / 255f, (float)Main.DiscoB / 255f);
CalamityPlayer modPlayer = player.Calamity();
modPlayer.allWaifus = !hideVisual;
modPlayer.elementalHeart = true;
player.lifeRegen += hideVisual ? 2 : 1;
player.statLifeMax2 += hideVisual ? 25 : 20;
player.moveSpeed += hideVisual ? 0.12f : 0.1f;
player.jumpSpeedBoost += hideVisual ? 1.1f : 1f;
player.endurance += hideVisual ? 0.06f : 0.05f;
player.statManaMax2 += hideVisual ? 60 : 50;
player.manaCost *= hideVisual ? 0.93f : 0.95f;
player.allDamage += hideVisual ? 0.1f : 0.08f;
int brimmy = ProjectileType<BrimstoneElementalMinion>();
int siren = ProjectileType<WaterElementalMinion>();
int healer = ProjectileType<SandElementalHealer>();
int sandy = ProjectileType<SandElementalMinion>();
int cloudy = ProjectileType<CloudElementalMinion>();
if (!hideVisual)
{
player.lifeRegen += 1;
player.statLifeMax2 += 20;
player.moveSpeed += 0.1f;
player.jumpSpeedBoost += 1.0f;
player.endurance += 0.05f;
player.statManaMax2 += 50;
player.manaCost *= 0.95f;
player.allDamage += 0.08f;
int damage = NPC.downedMoonlord ? 150 : 90;
float damageMult = CalamityWorld.downedDoG ? 2f : 1f;
Vector2 velocity = new Vector2(0f, -1f);
int damage = NPC.downedMoonlord ? 150 : 90;
float damageMult = CalamityWorld.downedDoG ? 2f : 1f;
int elementalDmg = (int)(damage * damageMult * player.MinionDamage());
float kBack = 2f + player.minionKB;
if (player.ownedProjectileCounts[ModContent.ProjectileType<BrimstoneElementalMinion>()] > 1 || player.ownedProjectileCounts[ModContent.ProjectileType<WaterElementalMinion>()] > 1 ||
player.ownedProjectileCounts[ModContent.ProjectileType<SandElementalHealer>()] > 1 || player.ownedProjectileCounts[ModContent.ProjectileType<SandElementalMinion>()] > 1 ||
player.ownedProjectileCounts[ModContent.ProjectileType<CloudElementalMinion>()] > 1)
{
player.ClearBuff(ModContent.BuffType<HotE>());
}
if (player.FindBuffIndex(ModContent.BuffType<HotE>()) == -1)
{
player.AddBuff(ModContent.BuffType<HotE>(), 3600, true);
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<BrimstoneElementalMinion>()] < 1)
{
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<BrimstoneElementalMinion>(), elementalDmg, 2f, Main.myPlayer, 0f, 0f);
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<WaterElementalMinion>()] < 1)
{
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<WaterElementalMinion>(), elementalDmg, 2f, Main.myPlayer, 0f, 0f);
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<SandElementalHealer>()] < 1)
{
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<SandElementalHealer>(), elementalDmg, 2f, Main.myPlayer, 0f, 0f);
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<SandElementalMinion>()] < 1)
{
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<SandElementalMinion>(), elementalDmg, 2f, Main.myPlayer, 0f, 0f);
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<CloudElementalMinion>()] < 1)
{
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<CloudElementalMinion>(), elementalDmg, 2f, Main.myPlayer, 0f, 0f);
}
if (player.ownedProjectileCounts[brimmy] > 1 || player.ownedProjectileCounts[siren] > 1 ||
player.ownedProjectileCounts[healer] > 1 || player.ownedProjectileCounts[sandy] > 1 ||
player.ownedProjectileCounts[cloudy] > 1)
{
player.ClearBuff(BuffType<HotE>());
}
if (player.FindBuffIndex(BuffType<HotE>()) == -1)
{
player.AddBuff(BuffType<HotE>(), 3600, true);
}
if (player.ownedProjectileCounts[brimmy] < 1)
{
Projectile.NewProjectile(player.Center, velocity, brimmy, elementalDmg, kBack, player.whoAmI, 0f, 0f);
}
if (player.ownedProjectileCounts[siren] < 1)
{
Projectile.NewProjectile(player.Center, velocity, siren, elementalDmg, kBack, player.whoAmI, 0f, 0f);
}
if (player.ownedProjectileCounts[healer] < 1)
{
Projectile.NewProjectile(player.Center, velocity, healer, elementalDmg, kBack, player.whoAmI, 0f, 0f);
}
if (player.ownedProjectileCounts[sandy] < 1)
{
Projectile.NewProjectile(player.Center, velocity, sandy, elementalDmg, kBack, player.whoAmI, 0f, 0f);
}
if (player.ownedProjectileCounts[cloudy] < 1)
{
Projectile.NewProjectile(player.Center, velocity, cloudy, elementalDmg, kBack, player.whoAmI, 0f, 0f);
}
}
else
{
player.lifeRegen += 2;
player.statLifeMax2 += 25;
player.moveSpeed += 0.12f;
player.jumpSpeedBoost += 1.1f;
player.endurance += 0.06f;
player.statManaMax2 += 60;
player.manaCost *= 0.93f;
player.allDamage += 0.1f;
if (player.ownedProjectileCounts[ModContent.ProjectileType<BrimstoneElementalMinion>()] > 0 || player.ownedProjectileCounts[ModContent.ProjectileType<WaterElementalMinion>()] > 0 ||
player.ownedProjectileCounts[ModContent.ProjectileType<SandElementalHealer>()] > 0 || player.ownedProjectileCounts[ModContent.ProjectileType<SandElementalMinion>()] > 0 ||
player.ownedProjectileCounts[ModContent.ProjectileType<CloudElementalMinion>()] > 0)
if (player.ownedProjectileCounts[brimmy] > 0 || player.ownedProjectileCounts[siren] > 0 ||
player.ownedProjectileCounts[healer] > 0 || player.ownedProjectileCounts[sandy] > 0 ||
player.ownedProjectileCounts[cloudy] > 0)
{
player.ClearBuff(ModContent.BuffType<HotE>());
player.ClearBuff(BuffType<HotE>());
}
}
//Flower Boots code
if (player.velocity.Y == 0f && player.grappling[0] == -1)
{
int num4 = (int)player.Center.X / 16;
int num5 = (int)(player.position.Y + (float)player.height - 1f) / 16;
if (Main.tile[num4, num5] == null)
int x = (int)player.Center.X / 16;
int y = (int)(player.position.Y + (float)player.height - 1f) / 16;
Tile tile = Main.tile[x, y];
if (tile == null)
{
Main.tile[num4, num5] = new Tile();
tile = new Tile();
}
if (!Main.tile[num4, num5].active() && Main.tile[num4, num5].liquid == 0 && Main.tile[num4, num5 + 1] != null && WorldGen.SolidTile(num4, num5 + 1))
if (!tile.active() && tile.liquid == 0 && Main.tile[x, y + 1] != null && WorldGen.SolidTile(x, y + 1))
{
Main.tile[num4, num5].frameY = 0;
Main.tile[num4, num5].slope(0);
Main.tile[num4, num5].halfBrick(false);
if (Main.tile[num4, num5 + 1].type == 0)
tile.frameY = 0;
tile.slope(0);
tile.halfBrick(false);
//On dirt blocks, there's a small chance to grow a dye plant
if (Main.tile[x, y + 1].type == TileID.Dirt)
{
if (Main.rand.NextBool(1000))
{
Main.tile[num4, num5].active(true);
Main.tile[num4, num5].type = 227;
Main.tile[num4, num5].frameX = (short)(34 * Main.rand.Next(1, 13));
while (Main.tile[num4, num5].frameX == 144)
tile.active(true);
tile.type = TileID.DyePlants;
tile.frameX = (short)(34 * Main.rand.Next(1, 13));
while (tile.frameX == 144)
{
Main.tile[num4, num5].frameX = (short)(34 * Main.rand.Next(1, 13));
tile.frameX = (short)(34 * Main.rand.Next(1, 13));
}
}
if (Main.netMode == NetmodeID.MultiplayerClient)
{
NetMessage.SendTileSquare(-1, num4, num5, 1, TileChangeType.None);
NetMessage.SendTileSquare(-1, x, y, 1, TileChangeType.None);
}
}
if (Main.tile[num4, num5 + 1].type == 2)
//On grass, grow flowers
if (Main.tile[x, y + 1].type == TileID.Grass)
{
if (Main.rand.NextBool(2))
{
Main.tile[num4, num5].active(true);
Main.tile[num4, num5].type = 3;
Main.tile[num4, num5].frameX = (short)(18 * Main.rand.Next(6, 11));
while (Main.tile[num4, num5].frameX == 144)
tile.active(true);
tile.type = TileID.Plants;
tile.frameX = (short)(18 * Main.rand.Next(6, 11));
while (tile.frameX == 144)
{
Main.tile[num4, num5].frameX = (short)(18 * Main.rand.Next(6, 11));
tile.frameX = (short)(18 * Main.rand.Next(6, 11));
}
}
else
{
Main.tile[num4, num5].active(true);
Main.tile[num4, num5].type = 73;
Main.tile[num4, num5].frameX = (short)(18 * Main.rand.Next(6, 21));
while (Main.tile[num4, num5].frameX == 144)
tile.active(true);
tile.type = TileID.Plants2;
tile.frameX = (short)(18 * Main.rand.Next(6, 21));
while (tile.frameX == 144)
{
Main.tile[num4, num5].frameX = (short)(18 * Main.rand.Next(6, 21));
tile.frameX = (short)(18 * Main.rand.Next(6, 21));
}
}
if (Main.netMode == NetmodeID.MultiplayerClient)
{
NetMessage.SendTileSquare(-1, num4, num5, 1, TileChangeType.None);
NetMessage.SendTileSquare(-1, x, y, 1, TileChangeType.None);
}
}
else if (Main.tile[num4, num5 + 1].type == 109)
//On hallowed grass, grow hallowed flowers
else if (Main.tile[x, y + 1].type == TileID.HallowedGrass)
{
if (Main.rand.NextBool(2))
{
Main.tile[num4, num5].active(true);
Main.tile[num4, num5].type = 110;
Main.tile[num4, num5].frameX = (short)(18 * Main.rand.Next(4, 7));
while (Main.tile[num4, num5].frameX == 90)
tile.active(true);
tile.type = TileID.HallowedPlants;
tile.frameX = (short)(18 * Main.rand.Next(4, 7));
while (tile.frameX == 90)
{
Main.tile[num4, num5].frameX = (short)(18 * Main.rand.Next(4, 7));
tile.frameX = (short)(18 * Main.rand.Next(4, 7));
}
}
else
{
Main.tile[num4, num5].active(true);
Main.tile[num4, num5].type = 113;
Main.tile[num4, num5].frameX = (short)(18 * Main.rand.Next(2, 8));
while (Main.tile[num4, num5].frameX == 90)
tile.active(true);
tile.type = TileID.HallowedPlants2;
tile.frameX = (short)(18 * Main.rand.Next(2, 8));
while (tile.frameX == 90)
{
Main.tile[num4, num5].frameX = (short)(18 * Main.rand.Next(2, 8));
tile.frameX = (short)(18 * Main.rand.Next(2, 8));
}
}
if (Main.netMode == NetmodeID.MultiplayerClient)
{
NetMessage.SendTileSquare(-1, num4, num5, 1, TileChangeType.None);
NetMessage.SendTileSquare(-1, x, y, 1, TileChangeType.None);
}
}
else if (Main.tile[num4, num5 + 1].type == 60)
//On jungle grass, grow jungle flowers
else if (Main.tile[x, y + 1].type == TileID.JungleGrass)
{
Main.tile[num4, num5].active(true);
Main.tile[num4, num5].type = 74;
Main.tile[num4, num5].frameX = (short)(18 * Main.rand.Next(9, 17));
tile.active(true);
tile.type = TileID.JunglePlants2;
tile.frameX = (short)(18 * Main.rand.Next(9, 17));
if (Main.netMode == NetmodeID.MultiplayerClient)
{
NetMessage.SendTileSquare(-1, num4, num5, 1, TileChangeType.None);
NetMessage.SendTileSquare(-1, x, y, 1, TileChangeType.None);
}
}
}
@@ -216,15 +230,15 @@ namespace CalamityMod.Items.Accessories
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<WifeinaBottle>());
recipe.AddIngredient(ModContent.ItemType<WifeinaBottlewithBoobs>());
recipe.AddIngredient(ModContent.ItemType<LureofEnthrallment>());
recipe.AddIngredient(ModContent.ItemType<EyeoftheStorm>());
recipe.AddIngredient(ModContent.ItemType<RoseStone>());
recipe.AddIngredient(ModContent.ItemType<AeroStone>());
recipe.AddIngredient(ModContent.ItemType<CryoStone>());
recipe.AddIngredient(ModContent.ItemType<ChaosStone>());
recipe.AddIngredient(ModContent.ItemType<BloomStone>());
recipe.AddIngredient(ItemType<WifeinaBottle>());
recipe.AddIngredient(ItemType<WifeinaBottlewithBoobs>());
recipe.AddIngredient(ItemType<LureofEnthrallment>());
recipe.AddIngredient(ItemType<EyeoftheStorm>());
recipe.AddIngredient(ItemType<RoseStone>());
recipe.AddIngredient(ItemType<AeroStone>());
recipe.AddIngredient(ItemType<CryoStone>());
recipe.AddIngredient(ItemType<ChaosStone>());
recipe.AddIngredient(ItemType<BloomStone>());
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(this);
recipe.AddRecipe();
+2 -1
View File
@@ -11,7 +11,8 @@ namespace CalamityMod.Items.Accessories
DisplayName.SetDefault("Mana Polarizer");
Tooltip.SetDefault("Increases max mana by 50 and magic damage by 6%\n" +
"Life regen lowered by 3 if mana is above 50% of its maximum\n" +
"Spectre healing if mana is below 10% of its maximum");
"Grants spectre healing, the amount healed scales with your mana\n" +
"The more mana you have, the more you heal");
}
public override void SetDefaults()
+1 -1
View File
@@ -33,7 +33,7 @@ namespace CalamityMod.Items.Accessories
Item heldItem = null;
if (player.selectedItem >= 0 && player.selectedItem < Main.maxInventory)
heldItem = player.inventory[player.selectedItem];
heldItem = player.ActiveItem();
// Replace the vanilla tooltip with a full stat readout
foreach (TooltipLine l in list)
+113 -121
View File
@@ -11,6 +11,7 @@ using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;
using static Terraria.ModLoader.ModContent;
namespace CalamityMod.Items.Accessories
{
@@ -18,21 +19,24 @@ namespace CalamityMod.Items.Accessories
{
public const int FireProjectiles = 2;
public const float FireAngleSpread = 120;
public int FireCountdown = 0;
public int counter = 0;
public const int ProjectileDamage = 2000;
public const int FungalClumpDamage = 1000;
public const int AuraDamage = 300;
public bool WaterBonuses = false;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("The Amalgam");
Tooltip.SetDefault("15% increased damage\n" +
"Shade rains down when you are hit\n" +
"You will confuse nearby enemies when you are struck\n" +
"Drops brimstone fireballs from the sky occasionally\n" +
"Brimstone fire rains down while invincibility is active\n" +
"Shade and brimstone fire rain down when you are hit\n" +
"Nearby enemies receive a variety of debuffs when you are hit\n" +
"Brimstone fireballs drop from the sky occasionally\n" +
"Summons a fungal clump to fight for you that leaves behind poisonous seawater\n" +
"75% increased movement speed, 10% increase to all damage, and plus 40 defense while submerged in any liquid\n" +
"The above bonuses also apply when passing through the clump's poisonous seawater\n" +
"Temporary immunity to lava, greatly reduces lava burn damage, and 15% increased damage while in lava\n" +
"Summons a fungal clump to fight for you\n" +
"You leave behind poisonous seawater as you move\n" +
"75% increased movement speed, 10% increase to all damage, and plus 40 defense while submerged in liquid\n" +
"If you are damaged while submerged in liquid you will gain a damaging aura for a short time\n" +
"You have a damaging aura that envenoms nearby enemies and increased movement in liquids\n" +
"Provides heat protection in Death Mode");
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(9, 6));
}
@@ -47,147 +51,135 @@ namespace CalamityMod.Items.Accessories
item.accessory = true;
}
public override bool CanEquipAccessory(Player player, int slot)
{
CalamityPlayer modPlayer = player.Calamity();
if (modPlayer.fungalClump)
{
return false;
}
return true;
}
public override bool CanEquipAccessory(Player player, int slot) => !player.Calamity().fungalClump;
public override void UpdateAccessory(Player player, bool hideVisual)
{
//Counter used for aura and Gehenna effects
counter++;
CalamityPlayer modPlayer = player.Calamity();
modPlayer.aBrain = true;
modPlayer.amalgam = true;
modPlayer.fungalClump = true;
if (player.whoAmI == Main.myPlayer)
{
if (player.FindBuffIndex(ModContent.BuffType<FungalClumpBuff>()) == -1)
{
player.AddBuff(ModContent.BuffType<FungalClumpBuff>(), 3600, true);
}
if (player.ownedProjectileCounts[ModContent.ProjectileType<FungalClumpMinion>()] < 1)
{
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<FungalClumpMinion>(), (int)(1000f * player.MinionDamage()), 1f, Main.myPlayer, 0f, 0f);
}
}
player.allDamage += 0.15f;
player.ignoreWater = true;
player.lavaRose = true;
player.allDamage += 0.15f;
player.lavaMax += 240;
if (player.lavaWet)
{
player.allDamage += 0.15f;
}
if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir))
//emit light
Lighting.AddLight((int)(player.Center.X / 16f), (int)(player.Center.Y / 16f), 0f, 0.5f, 1.25f);
//Summon the Fungal Clump, ai[0] is 1f to indicate this is from the Amalgam, not the Fungal Clump
if (player.whoAmI == Main.myPlayer)
{
if (player.FindBuffIndex(BuffType<FungalClumpBuff>()) == -1)
{
player.AddBuff(BuffType<FungalClumpBuff>(), 3600, true);
}
if (player.ownedProjectileCounts[ProjectileType<FungalClumpMinion>()] < 1)
{
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ProjectileType<FungalClumpMinion>(), (int)(FungalClumpDamage * player.MinionDamage()), 1f, player.whoAmI, 1f, 0f);
}
}
Rectangle rectangle = new Rectangle((int)(player.position.X + player.velocity.X * 0.5f - 4f), (int)(player.position.Y + player.velocity.Y * 0.5f - 4f), player.width + 8, player.height + 8);
for (int i = 0; i < Main.maxProjectiles; i++)
{
Projectile proj = Main.projectile[i];
if (proj.active && proj.friendly && proj.type == ProjectileType<PoisonousSeawater>() && proj.ai[0] == 1f && proj.damage > 0)
{
Rectangle rect = proj.getRect();
if (rectangle.Intersects(rect))
{
WaterBonuses = true;
}
}
}
if (WaterBonuses || player.IsUnderwater())
{
player.allDamage += 0.1f;
player.statDefense += 40;
player.moveSpeed += 0.75f;
}
if ((double)player.velocity.X > 0 || (double)player.velocity.Y > 0 || (double)player.velocity.X < -0.1 || (double)player.velocity.Y < -0.1)
{
if (player.whoAmI == Main.myPlayer)
{
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<PoisonousSeawater>(), (int)(2000 * player.AverageDamage()), 0f, player.whoAmI, 0f, 0f);
}
}
if (player.immune)
{
if (Main.rand.NextBool(20))
{
if (player.whoAmI == Main.myPlayer)
{
for (int l = 0; l < 1; l++)
{
float x = player.position.X + (float)Main.rand.Next(-400, 400);
float y = player.position.Y - (float)Main.rand.Next(500, 800);
Vector2 vector = new Vector2(x, y);
float num15 = player.position.X + (float)(player.width / 2) - vector.X;
float num16 = player.position.Y + (float)(player.height / 2) - vector.Y;
num15 += (float)Main.rand.Next(-100, 101);
int num17 = 22;
float num18 = (float)Math.Sqrt((double)(num15 * num15 + num16 * num16));
num18 = (float)num17 / num18;
num15 *= num18;
num16 *= num18;
int type = Main.rand.NextBool(2) ? ModContent.ProjectileType<AuraRain>() : ModContent.ProjectileType<StandingFire>();
int num19 = Projectile.NewProjectile(x, y, num15, num16, type, (int)(2000 * player.AverageDamage()), 1f, player.whoAmI, 0f, 0f);
Main.projectile[num19].tileCollide = false;
Main.projectile[num19].usesLocalNPCImmunity = true;
Main.projectile[num19].localNPCHitCooldown = 10;
Main.projectile[num19].usesIDStaticNPCImmunity = false;
Main.projectile[num19].Calamity().forceTypeless = true;
}
float x = player.position.X + Main.rand.NextFloat(-400, 400);
float y = player.position.Y - Main.rand.NextFloat(500, 800);
Vector2 projOrigin = new Vector2(x, y);
float xDist = player.Center.X - projOrigin.X;
float yDist = player.Center.Y - projOrigin.Y;
xDist += Main.rand.NextFloat(-100, 100);
float speed = 22f;
Vector2 playerVector = new Vector2(xDist, yDist);
float playerDist = playerVector.Length();
playerDist = speed / playerDist;
playerVector.X *= playerDist;
playerVector.Y *= playerDist;
int type = Main.rand.NextBool(2) ? ProjectileType<AuraRain>() : ProjectileType<StandingFire>();
int rain = Projectile.NewProjectile(projOrigin, playerVector, type, (int)(ProjectileDamage * player.AverageDamage()), 1f, player.whoAmI, 0f, 0f);
Projectile proj = Main.projectile[rain];
proj.tileCollide = false;
proj.usesLocalNPCImmunity = true;
proj.localNPCHitCooldown = 10;
proj.usesIDStaticNPCImmunity = false;
proj.Calamity().forceTypeless = true;
}
}
}
int seaCounter = 0;
Lighting.AddLight((int)(player.Center.X / 16f), (int)(player.Center.Y / 16f), 0f, 0.5f, 1.25f);
int num = BuffID.Venom;
float num2 = 300f;
bool flag = seaCounter % 60 == 0;
int num3 = (int)(320 * player.AverageDamage());
int random = Main.rand.Next(5);
int buffType = BuffID.Venom;
float auraRange = 300f;
int auraDmg = (int)(AuraDamage * player.AverageDamage());
if (player.whoAmI == Main.myPlayer)
{
if (random == 0 && player.immune && Collision.DrownCollision(player.position, player.width, player.height, player.gravDir))
{
for (int l = 0; l < Main.maxNPCs; l++)
{
NPC nPC = Main.npc[l];
if (nPC.active && !nPC.friendly && nPC.damage > 0 && !nPC.dontTakeDamage && !nPC.buffImmune[num] && Vector2.Distance(player.Center, nPC.Center) <= num2)
{
if (nPC.FindBuffIndex(num) == -1)
{
nPC.AddBuff(num, 300, false);
}
if (flag)
{
if (player.whoAmI == Main.myPlayer)
{
Projectile p = Projectile.NewProjectileDirect(nPC.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), num3, 0f, player.whoAmI, l);
}
}
}
}
}
}
seaCounter++;
if (seaCounter >= 180)
{
}
if (FireCountdown == 0)
{
FireCountdown = 600;
}
if (FireCountdown > 0)
{
FireCountdown--;
if (FireCountdown == 0)
{
if (player.whoAmI == Main.myPlayer)
{
int speed2 = 25;
float spawnX = Main.rand.Next(1000) - 500 + player.Center.X;
float spawnY = -1000 + player.Center.Y;
Vector2 baseSpawn = new Vector2(spawnX, spawnY);
Vector2 baseVelocity = player.Center - baseSpawn;
baseVelocity.Normalize();
baseVelocity *= speed2;
for (int i = 0; i < FireProjectiles; i++)
{
Vector2 spawn = baseSpawn;
spawn.X = spawn.X + i * 30 - (FireProjectiles * 15);
Vector2 velocity = baseVelocity.RotatedBy(MathHelper.ToRadians(-FireAngleSpread / 2 + (FireAngleSpread * i / (float)FireProjectiles)));
velocity.X = velocity.X + 3 * Main.rand.NextFloat() - 1.5f;
Projectile.NewProjectile(spawn.X, spawn.Y, velocity.X, velocity.Y, ModContent.ProjectileType<BrimstoneHellfireballFriendly2>(), (int)(2000 * player.AverageDamage()), 5f, Main.myPlayer, 0f, 0f);
}
}
}
for (int l = 0; l < Main.maxNPCs; l++)
{
NPC npc = Main.npc[l];
if (npc.active && !npc.friendly && npc.damage > 0 && !npc.dontTakeDamage && Vector2.Distance(player.Center, npc.Center) <= auraRange)
{
if (npc.FindBuffIndex(buffType) == -1 && !npc.buffImmune[buffType])
{
npc.AddBuff(buffType, 300, false);
}
if (counter % 30 == 0)
{
if (player.whoAmI == Main.myPlayer)
{
Projectile p = Projectile.NewProjectileDirect(npc.Center, Vector2.Zero, ProjectileType<DirectStrike>(), auraDmg, 0f, player.whoAmI, l);
}
}
}
}
}
if (counter % 480 == 0)
{
if (player.whoAmI == Main.myPlayer)
{
int speed = 25;
float spawnX = Main.rand.Next(1000) - 500 + player.Center.X;
float spawnY = -1000 + player.Center.Y;
Vector2 baseSpawn = new Vector2(spawnX, spawnY);
Vector2 baseVelocity = player.Center - baseSpawn;
baseVelocity.Normalize();
baseVelocity *= speed;
for (int i = 0; i < FireProjectiles; i++)
{
Vector2 spawn = baseSpawn;
spawn.X += i * 30 - (FireProjectiles * 15);
Vector2 velocity = baseVelocity.RotatedBy(MathHelper.ToRadians(-FireAngleSpread / 2 + (FireAngleSpread * i / (float)FireProjectiles)));
velocity.X += 3 * Main.rand.NextFloat() - 1.5f;
Projectile.NewProjectile(spawn, velocity, ProjectileType<BrimstoneHellfireballFriendly2>(), (int)(ProjectileDamage * player.AverageDamage()), 5f, player.whoAmI, 0f, 0f);
}
}
}
}
public override void AddRecipes()
+6 -6
View File
@@ -68,13 +68,13 @@ namespace CalamityMod.Items.Accessories
}
}
}
if (player.HeldItem != null && !player.HeldItem.IsAir && player.HeldItem.stack > 0)
if (player.ActiveItem() != null && !player.ActiveItem().IsAir && player.ActiveItem().stack > 0)
{
bool summon = player.HeldItem.summon;
bool rogue = player.HeldItem.Calamity().rogue;
bool melee = player.HeldItem.melee;
bool ranged = player.HeldItem.ranged;
bool magic = player.HeldItem.magic;
bool summon = player.ActiveItem().summon;
bool rogue = player.ActiveItem().Calamity().rogue;
bool melee = player.ActiveItem().melee;
bool ranged = player.ActiveItem().ranged;
bool magic = player.ActiveItem().magic;
if (summon)
{
player.minionKB += 0.10f;
+1
View File
@@ -35,6 +35,7 @@ namespace CalamityMod.Items.Accessories.Wings
player.moveSpeed += 0.4f;
player.lavaMax += 240;
player.wingTimeMax = 200;
player.noFallDmg = true;
modPlayer.elysianFire = true;
if (hideVisual)
{
+3 -2
View File
@@ -10,7 +10,8 @@ namespace CalamityMod.Items.Ammo
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Astral Solution");
Tooltip.SetDefault("Used by the Clentaminator.\nSpreads the Astral.");
Tooltip.SetDefault("Used by the Clentaminator\n" +
"Spreads the Astral Infection");
}
public override void SetDefaults()
@@ -28,7 +29,7 @@ namespace CalamityMod.Items.Ammo
public override bool ConsumeAmmo(Player player)
{
return !(player.itemAnimation < player.HeldItem.useAnimation - 3);
return !(player.itemAnimation < player.ActiveItem().useAnimation - 3);
}
}
}
+1 -1
View File
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Armor
{
DisplayName.SetDefault("Fathom Swarmer Breastplate");
Tooltip.SetDefault("12% increased damage reduction and minion damage\n" +
"+1 max minions\n" +
"+1 max minion\n" +
"Boosted defense and regen increased while submerged in liquid\n" +
"Reduces defense loss within the Abyss");
}
+4 -4
View File
@@ -35,18 +35,18 @@ namespace CalamityMod.Items.Armor
public override void UpdateArmorSet(Player player)
{
player.setBonus = "30% increased minion damage and +1 max minion\n" +
player.setBonus = "10% increased minion damage and +1 max minion\n" +
"Grants the ability to climb walls\n" +
"10% increased minion damage while submerged in liquid\n" +
"30% increased minion damage while submerged in liquid\n" +
"Provides a moderate amount of light and moderately reduces breath loss in the abyss";
CalamityPlayer modPlayer = player.Calamity();
modPlayer.fathomSwarmer = true;
player.spikedBoots = 2;
player.maxMinions++;
player.minionDamage += 0.3f;
player.minionDamage += 0.1f;
if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir))
{
player.minionDamage += 0.1f;
player.minionDamage += 0.3f;
}
}
+1 -1
View File
@@ -48,7 +48,7 @@ namespace CalamityMod.Items.Armor
"Increased heart pickup range\n" +
"Enemies have a chance to drop extra hearts on death\n" +
"On every 5th critical strike you will fire a leaf storm\n" +
"Magic projectiles have a 50% chance to heal you on enemy hits\n" +
"Magic projectiles heal you on enemy hits\n" +
"Amount healed is based on projectile damage";
}
+42 -48
View File
@@ -5,6 +5,7 @@ using CalamityMod.Items.Accessories;
using CalamityMod.Items.DifficultyItems;
using CalamityMod.Items.Materials;
using CalamityMod.Items.PermanentBoosters;
using CalamityMod.Items.Placeables.Furniture.Fountains;
using CalamityMod.Items.Potions;
using CalamityMod.Items.Tools;
using CalamityMod.Items.Weapons.Magic;
@@ -103,16 +104,16 @@ namespace CalamityMod.Items
item.damage = (int)(item.damage * 1.25);
else if (CalamityMod.twentyDamageBuffList?.Contains(item.type) ?? false)
item.damage = (int)(item.damage * 1.2);
else if (item.type == ItemID.MagnetSphere)
else if (CalamityMod.tenDamageBuffList?.Contains(item.type) ?? false)
item.damage = (int)(item.damage * 1.1);
else if (item.type == ItemID.Razorpine)
item.damage = (int)(item.damage * 0.95);
else if (item.type == ItemID.Phantasm)
else if (CalamityMod.tenDamageNerfList?.Contains(item.type) ?? false)
item.damage = (int)(item.damage * 0.9);
else if (item.type == ItemID.LastPrism)
item.damage = (int)(item.damage * 0.85);
else if (CalamityMod.quarterDamageNerfList?.Contains(item.type) ?? false)
item.damage = (int)(item.damage * 0.75);
else if (item.type == ItemID.BlizzardStaff)
item.damage = (int)(item.damage * 0.7);
else if (item.type == ItemID.LaserMachinegun)
item.damage = (int)(item.damage * 0.6);
else if (item.type == ItemID.StardustDragonStaff)
item.damage = (int)(item.damage * 0.5);
@@ -353,7 +354,7 @@ namespace CalamityMod.Items
}
}
}
if (modPlayer.harpyWingBoost)
if (modPlayer.harpyWingBoost && modPlayer.harpyRing)
{
if (Main.rand.NextBool(5))
{
@@ -738,7 +739,7 @@ namespace CalamityMod.Items
}
return false;
}
if (player.HeldItem.type == ModContent.ItemType<IgneousExaltation>())
if (player.ActiveItem().type == ModContent.ItemType<IgneousExaltation>())
{
bool hasBlades = false;
for (int i = 0; i < Main.projectile.Length; i++)
@@ -772,7 +773,7 @@ namespace CalamityMod.Items
}
return false;
}
if (player.HeldItem.type == ModContent.ItemType<ColdDivinity>())
if (player.ActiveItem().type == ModContent.ItemType<ColdDivinity>())
{
bool canContinue = true;
int count = 0;
@@ -2621,6 +2622,27 @@ Provides heat and cold protection in Death Mode";
}
}
}
Mod fargos = ModLoader.GetMod("Fargowiltas");
if (fargos != null)
{
//Fargo's fountain effects
if (item.type == ModContent.ItemType<SunkenSeaFountain>())
{
TooltipLine line = new TooltipLine(mod, "Tooltip0", "Forces surrounding biome state to Sunken Sea upon activation");
tooltips.Add(line);
}
if (item.type == ModContent.ItemType<SulphurousFountainItem>())
{
TooltipLine line = new TooltipLine(mod, "Tooltip0", "Forces surrounding biome state to Sulphurous Sea upon activation");
tooltips.Add(line);
}
if (item.type == ModContent.ItemType<AstralFountainItem>())
{
TooltipLine line = new TooltipLine(mod, "Tooltip0", "Forces surrounding biome state to Astral upon activation");
tooltips.Add(line);
}
}
}
#endregion
@@ -2703,6 +2725,7 @@ Provides heat and cold protection in Death Mode";
// Queen Bee
case ItemID.QueenBeeBossBag:
DropHelper.DropItem(player, ItemID.Stinger, 8, 12);
DropHelper.DropItem(player, ModContent.ItemType<HardenedHoneycomb>(), 50, 75);
break;
@@ -2740,6 +2763,7 @@ Provides heat and cold protection in Death Mode";
float aegisChance = DropHelper.LegendaryDropRateFloat;
DropHelper.DropItemCondition(player, ModContent.ItemType<AegisBlade>(), CalamityWorld.revenge, aegisChance);
DropHelper.DropItem(player, ModContent.ItemType<EssenceofCinder>(), 8, 13);
DropHelper.DropItemChance(player, ModContent.ItemType<LeadWizard>(), DropHelper.RareVariantDropRateInt);
break;
// Duke Fishron
@@ -2890,35 +2914,11 @@ Provides heat and cold protection in Death Mode";
#region Body
if (item.type == ItemID.GladiatorBreastplate || item.type == ItemID.ObsidianShirt)
player.Calamity().throwingCrit += 3;
else if (item.type == ItemID.PalladiumBreastplate)
player.Calamity().throwingCrit += 2;
else if (item.type == ItemID.CobaltBreastplate)
player.Calamity().throwingCrit += 3;
else if (item.type == ItemID.OrichalcumBreastplate)
player.Calamity().throwingCrit += 6;
else if (item.type == ItemID.TitaniumBreastplate)
player.Calamity().throwingCrit += 3;
else if (item.type == ItemID.HallowedPlateMail)
player.Calamity().throwingCrit += 7;
else if (item.type == ItemID.ChlorophytePlateMail)
player.Calamity().throwingCrit += 7;
else if (item.type == ItemID.Gi)
player.Calamity().throwingCrit += 5;
#endregion
#region Legs
if (item.type == ItemID.GladiatorLeggings || item.type == ItemID.ObsidianPants)
player.Calamity().throwingVelocity += 0.03f;
else if (item.type == ItemID.PalladiumLeggings)
player.Calamity().throwingCrit += 1;
else if (item.type == ItemID.MythrilGreaves)
player.Calamity().throwingCrit += 3;
else if (item.type == ItemID.AdamantiteLeggings)
player.Calamity().throwingCrit += 4;
else if (item.type == ItemID.TitaniumLeggings)
player.Calamity().throwingCrit += 3;
else if (item.type == ItemID.ChlorophyteGreaves)
player.Calamity().throwingCrit += 8;
#endregion
}
#endregion
@@ -2992,8 +2992,7 @@ Provides heat and cold protection in Death Mode";
}
else if (item.type == ItemID.HarpyWings)
{
if (modPlayer.harpyRing)
modPlayer.harpyWingBoost = true;
modPlayer.harpyWingBoost = true;
player.moveSpeed += 0.3f;
player.noFallDmg = true;
}
@@ -3201,18 +3200,6 @@ Provides heat and cold protection in Death Mode";
if (item.type == ItemID.HandWarmer)
modPlayer.handWarmer = true;
if (item.type == ItemID.CelestialStone || item.type == ItemID.CelestialShell || (item.type == ItemID.MoonStone && !Main.dayTime) ||
(item.type == ItemID.SunStone && Main.dayTime))
{
player.Calamity().throwingCrit += 2;
}
if (item.type == ItemID.DestroyerEmblem)
player.Calamity().throwingCrit += 8;
if (item.type == ItemID.EyeoftheGolem)
player.Calamity().throwingCrit += 10;
if (item.type == ItemID.PutridScent)
player.Calamity().throwingCrit += 5;
// Hard / Guarding / Armored / Warding give 0.25% / 0.5% / 0.75% / 1% DR
if (item.prefix == PrefixID.Hard)
{
@@ -3258,7 +3245,6 @@ Provides heat and cold protection in Death Mode";
player.rangedCrit -= 1;
player.magicCrit -= 1;
player.thrownCrit -= 1;
player.Calamity().throwingCrit += item.prefix == PrefixID.Lucky ? 3 : 1;
}
}
#endregion
@@ -3456,6 +3442,14 @@ Provides heat and cold protection in Death Mode";
public static readonly int RarityDarkBlueBuyPrice = Item.buyPrice(1, 80, 0, 0);
public static readonly int RarityVioletBuyPrice = Item.buyPrice(2, 50, 0, 0);
public static readonly int RarityHotPinkBuyPrice = Item.buyPrice(5, 0, 0, 0);
//These duplicates are for my sanity...
public static readonly int Rarity12BuyPrice = Item.buyPrice(1, 20, 0, 0);
public static readonly int Rarity13BuyPrice = Item.buyPrice(1, 40, 0, 0);
public static readonly int Rarity14BuyPrice = Item.buyPrice(1, 80, 0, 0);
public static readonly int Rarity15BuyPrice = Item.buyPrice(2, 50, 0, 0);
public static readonly int Rarity16BuyPrice = Item.buyPrice(5, 0, 0, 0);
public static int GetBuyPrice(int rarity)
{
switch (rarity)
+36
View File
@@ -0,0 +1,36 @@
using CalamityMod.Items.Placeables.Ores;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Dyes
{
public class AstralBlueDye : BaseDye
{
public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref<Effect>(mod.GetEffect("Effects/Dyes/AstralBlueDyeShader")), "DyePass").
UseColor(new Color(109, 242, 197)).UseSecondaryColor(new Color(42, 147, 154));
public override void SafeSetStaticDefaults()
{
DisplayName.SetDefault("Astral Blue Dye");
}
public override void SafeSetDefaults()
{
item.rare = 9;
item.value = Item.sellPrice(0, 2, 0, 0);
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.BottledWater);
recipe.AddIngredient(ModContent.ItemType<AstralOre>());
recipe.AddTile(TileID.DyeVat);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 425 B

+36
View File
@@ -0,0 +1,36 @@
using CalamityMod.Items.Placeables.Ores;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Dyes
{
public class AstralOrangeDye : BaseDye
{
public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref<Effect>(mod.GetEffect("Effects/Dyes/AstralOrangeDyeShader")), "DyePass").
UseColor(new Color(255, 166, 94)).UseSecondaryColor(new Color(238, 93, 82));
public override void SafeSetStaticDefaults()
{
DisplayName.SetDefault("Astral Orange Dye");
}
public override void SafeSetDefaults()
{
item.rare = 9;
item.value = Item.sellPrice(0, 2, 0, 0);
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.BottledWater);
recipe.AddIngredient(ModContent.ItemType<AstralOre>());
recipe.AddTile(TileID.DyeVat);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 415 B

+37
View File
@@ -0,0 +1,37 @@
using CalamityMod.Items.Placeables.Ores;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Dyes
{
public class AstralSwirlDye : BaseDye
{
public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref<Effect>(mod.GetEffect("Effects/Dyes/AstralSwirlDyeShader")), "DyePass").
UseColor(new Color(42, 147, 154)).UseSecondaryColor(new Color(238, 93, 82)).UseImage("Images/Misc/Perlin");
public override void SafeSetStaticDefaults()
{
DisplayName.SetDefault("Astral Swirl Dye");
}
public override void SafeSetDefaults()
{
item.rare = 9;
item.value = Item.sellPrice(0, 3, 0, 0);
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<AstralBlueDye>());
recipe.AddIngredient(ModContent.ItemType<AstralOrangeDye>());
recipe.AddIngredient(ModContent.ItemType<AstralOre>(), 5);
recipe.AddTile(TileID.DyeVat);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 451 B

+42
View File
@@ -0,0 +1,42 @@
using Terraria;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Dyes
{
public abstract class BaseDye : ModItem
{
public abstract ArmorShaderData ShaderDataToBind
{
get;
}
public sealed override void SetStaticDefaults()
{
if (!Main.dedServ)
{
GameShaders.Armor.BindShader(item.type, ShaderDataToBind);
}
SafeSetStaticDefaults();
}
public sealed override void SetDefaults()
{
byte dye = item.dye;
item.CloneDefaults(ItemID.GelDye);
item.dye = dye;
SafeSetDefaults();
}
/// <summary>
/// Similar to SetDefaults, but always accounts for defining dye IDs
/// </summary>
public virtual void SafeSetDefaults()
{
}
/// <summary>
/// Similar to SetStaticDefaults, but always accounts for shader binding.
/// </summary>
public virtual void SafeSetStaticDefaults()
{
}
}
}
+36
View File
@@ -0,0 +1,36 @@
using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.Graphics.Shaders;
namespace CalamityMod.Items.Dyes
{
public class CeaselessDye : BaseDye
{
public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref<Effect>(mod.GetEffect("Effects/Dyes/CeaselessDyeShader")), "DyePass");
public override void SafeSetStaticDefaults()
{
DisplayName.SetDefault("Ceaseless Dye");
}
public override void SafeSetDefaults()
{
item.rare = 10;
item.Calamity().customRarity = CalamityRarity.PureGreen;
item.value = Item.sellPrice(0, 4, 0, 0);
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.VoidDye);
recipe.AddIngredient(ItemID.ShadowDye);
recipe.AddIngredient(ModContent.ItemType<DarkPlasma>());
recipe.AddTile(TileID.DyeVat);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

+23
View File
@@ -0,0 +1,23 @@
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.Graphics.Shaders;
using Microsoft.Xna.Framework;
namespace CalamityMod.Items.Dyes
{
public class DefiledFlameDye : BaseDye
{
public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref<Effect>(mod.GetEffect("Effects/Dyes/DefiledFlameDyeShader")), "DyePass").
UseColor(new Color(106, 190, 48)).UseSecondaryColor(new Color(204, 248, 48)).UseImage("Images/Misc/Perlin");
public override void SafeSetStaticDefaults()
{
DisplayName.SetDefault("Defiled Flame Dye");
}
public override void SafeSetDefaults()
{
item.rare = 4;
item.value = CalamityGlobalItem.Rarity4BuyPrice;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 408 B

+36
View File
@@ -0,0 +1,36 @@
using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.Graphics.Shaders;
using Microsoft.Xna.Framework;
namespace CalamityMod.Items.Dyes
{
public class DragonSoulDye : BaseDye
{
public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref<Effect>(mod.GetEffect("Effects/Dyes/DragonSoulDyeShader")), "DyePass");
public override void SafeSetStaticDefaults()
{
DisplayName.SetDefault("Dragon Soul Dye");
}
public override void SafeSetDefaults()
{
item.rare = 10;
item.Calamity().customRarity = CalamityRarity.Violet;
item.value = Item.sellPrice(0, 8, 0, 0);
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.BottledWater);
recipe.AddIngredient(ModContent.ItemType<HellcasterFragment>());
recipe.AddTile(TileID.DyeVat);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

+38
View File
@@ -0,0 +1,38 @@
using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Dyes
{
public class ElementalDye : BaseDye
{
public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref<Effect>(mod.GetEffect("Effects/Dyes/ElementalDyeShader")), "DyePass").UseImage("Images/Misc/Perlin");
public override void SafeSetStaticDefaults()
{
DisplayName.SetDefault("Elemental Dye");
}
public override void SafeSetDefaults()
{
item.rare = 10;
item.Calamity().customRarity = CalamityRarity.Turquoise;
item.value = Item.sellPrice(0, 2, 50, 0);
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.SolarDye);
recipe.AddIngredient(ItemID.VortexDye);
recipe.AddIngredient(ItemID.StardustDye);
recipe.AddIngredient(ItemID.NebulaDye);
recipe.AddIngredient(ModContent.ItemType<GalacticaSingularity>());
recipe.AddTile(TileID.DyeVat);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

+37
View File
@@ -0,0 +1,37 @@
using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.Graphics.Shaders;
using Microsoft.Xna.Framework;
namespace CalamityMod.Items.Dyes
{
public class EndothermicDye : BaseDye
{
public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref<Effect>(mod.GetEffect("Effects/Dyes/EndothermicDyeShader")), "DyePass").
UseColor(new Color(123, 205, 237)).UseSecondaryColor(new Color(85, 85, 171));
public override void SafeSetStaticDefaults()
{
DisplayName.SetDefault("Endothermic Dye");
}
public override void SafeSetDefaults()
{
item.rare = 10;
item.Calamity().customRarity = CalamityRarity.DarkBlue;
item.value = Item.sellPrice(0, 5, 0, 0);
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.BottledWater);
recipe.AddIngredient(ModContent.ItemType<EndothermicEnergy>(), 5);
recipe.AddTile(TileID.DyeVat);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 373 B

@@ -2,7 +2,7 @@ using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Dyes
namespace CalamityMod.Items.Dyes.HairDye
{
public class AdrenalineHairDye : ModItem
{
File renamed without changes.

Before

Width:  |  Height:  |  Size: 506 B

After

Width:  |  Height:  |  Size: 506 B

@@ -2,7 +2,7 @@ using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Dyes
namespace CalamityMod.Items.Dyes.HairDye
{
public class RageHairDye : ModItem
{
File renamed without changes.

Before

Width:  |  Height:  |  Size: 525 B

After

Width:  |  Height:  |  Size: 525 B

@@ -2,7 +2,7 @@ using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Dyes
namespace CalamityMod.Items.Dyes.HairDye
{
public class StealthHairDye : ModItem
{
File renamed without changes.

Before

Width:  |  Height:  |  Size: 466 B

After

Width:  |  Height:  |  Size: 466 B

@@ -2,7 +2,7 @@ using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Dyes
namespace CalamityMod.Items.Dyes.HairDye
{
public class WingTimeHairDye : ModItem
{
File renamed without changes.

Before

Width:  |  Height:  |  Size: 711 B

After

Width:  |  Height:  |  Size: 711 B

+37
View File
@@ -0,0 +1,37 @@
using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.Graphics.Shaders;
using Microsoft.Xna.Framework;
namespace CalamityMod.Items.Dyes
{
public class NightmareDye : BaseDye
{
public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref<Effect>(mod.GetEffect("Effects/Dyes/NightmareDyeShader")), "DyePass").
UseColor(new Color(249, 81, 0)).UseSecondaryColor(new Color(255, 203, 106));
public override void SafeSetStaticDefaults()
{
DisplayName.SetDefault("Nightmare Dye");
}
public override void SafeSetDefaults()
{
item.rare = 10;
item.Calamity().customRarity = CalamityRarity.DarkBlue;
item.value = Item.sellPrice(0, 5, 0, 0);
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.BottledWater);
recipe.AddIngredient(ModContent.ItemType<NightmareFuel>(), 5);
recipe.AddTile(TileID.DyeVat);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 374 B

+37
View File
@@ -0,0 +1,37 @@
using CalamityMod.Items.Placeables.Ores;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.GameContent.Dyes;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Dyes
{
public class ReaverDye : BaseDye
{
public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref<Effect>(mod.GetEffect("Effects/Dyes/ReaverDyeShader")), "DyePass").
UseColor(new Color(54, 164, 66)).UseSecondaryColor(new Color(224, 115, 65));
public override void SafeSetStaticDefaults()
{
DisplayName.SetDefault("Reaver Dye");
}
public override void SafeSetDefaults()
{
item.rare = 7;
item.value = Item.sellPrice(0, 1, 0, 0);
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.BottledWater);
recipe.AddIngredient(ModContent.ItemType<PerennialOre>(), 4);
recipe.AddTile(TileID.DyeVat);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 419 B

+37
View File
@@ -0,0 +1,37 @@
using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.Graphics.Shaders;
using Microsoft.Xna.Framework;
namespace CalamityMod.Items.Dyes
{
public class ShadowspecDye : BaseDye
{
public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref<Effect>(mod.GetEffect("Effects/Dyes/ShadowspecDyeShader")), "DyePass").
UseColor(new Color(46, 27, 60)).UseSecondaryColor(new Color(132, 142, 191)).UseImage("Images/Misc/Perlin");
public override void SafeSetStaticDefaults()
{
DisplayName.SetDefault("Shadowspec Dye");
}
public override void SafeSetDefaults()
{
item.rare = 10;
item.Calamity().customRarity = CalamityRarity.Developer;
item.value = Item.sellPrice(0, 10, 0, 0);
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.BottledWater);
recipe.AddIngredient(ModContent.ItemType<ShadowspecBar>());
recipe.AddTile(TileID.DyeVat);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 395 B

+39
View File
@@ -0,0 +1,39 @@
using CalamityMod.Items.Materials;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.Graphics.Shaders;
using Microsoft.Xna.Framework;
using CalamityMod.Items.Placeables.Ores;
namespace CalamityMod.Items.Dyes
{
public class StratusDye : BaseDye
{
public override ArmorShaderData ShaderDataToBind => new ArmorShaderData(new Ref<Effect>(mod.GetEffect("Effects/Dyes/StratusDyeShader")), "DyePass").
UseColor(new Color(36, 86, 163)).UseSecondaryColor(new Color(124, 204, 223)).UseImage("Images/Misc/Perlin");
public override void SafeSetStaticDefaults()
{
DisplayName.SetDefault("Stratus Dye");
}
public override void SafeSetDefaults()
{
item.rare = 10;
item.Calamity().customRarity = CalamityRarity.PureGreen;
item.value = Item.sellPrice(0, 4, 50, 0);
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.BottledWater);
recipe.AddIngredient(ModContent.ItemType<RuinousSoul>());
recipe.AddIngredient(ModContent.ItemType<ExodiumClusterOre>());
recipe.AddTile(TileID.DyeVat);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 408 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 525 B

After

Width:  |  Height:  |  Size: 522 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 551 B

After

Width:  |  Height:  |  Size: 725 B

@@ -0,0 +1,30 @@
using Terraria;
using Terraria.ModLoader;
using CalamityMod.Tiles.Furniture.Fountains;
namespace CalamityMod.Items.Placeables.Furniture.Fountains
{
public class AbyssFountainItem : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Abyss Water Fountain");
}
public override void SetDefaults()
{
item.width = 22;
item.height = 42;
item.maxStack = 999;
item.useTurn = true;
item.autoReuse = true;
item.useAnimation = 15;
item.useTime = 10;
item.useStyle = 1;
item.consumable = true;
item.value = Item.buyPrice(0, 4, 0, 0);
item.rare = 0;
item.createTile = ModContent.TileType<AbyssFountainTile>();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 777 B

@@ -0,0 +1,30 @@
using Terraria;
using Terraria.ModLoader;
using CalamityMod.Tiles.Furniture.Fountains;
namespace CalamityMod.Items.Placeables.Furniture.Fountains
{
public class AstralFountainItem : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Astral Water Fountain");
}
public override void SetDefaults()
{
item.width = 22;
item.height = 42;
item.maxStack = 999;
item.useTurn = true;
item.autoReuse = true;
item.useAnimation = 15;
item.useTime = 10;
item.useStyle = 1;
item.consumable = true;
item.value = Item.buyPrice(0, 4, 0, 0);
item.rare = 0;
item.createTile = ModContent.TileType<AstralFountainTile>();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 548 B

@@ -0,0 +1,30 @@
using Terraria;
using Terraria.ModLoader;
using CalamityMod.Tiles.Furniture.Fountains;
namespace CalamityMod.Items.Placeables.Furniture.Fountains
{
public class SulphurousFountainItem : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Sulphuric Water Fountain");
}
public override void SetDefaults()
{
item.width = 22;
item.height = 42;
item.maxStack = 999;
item.useTurn = true;
item.autoReuse = true;
item.useAnimation = 15;
item.useTime = 10;
item.useStyle = 1;
item.consumable = true;
item.value = Item.buyPrice(0, 4, 0, 0);
item.rare = 0;
item.createTile = ModContent.TileType<SulphurousFountainTile>();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

@@ -0,0 +1,30 @@
using Terraria;
using Terraria.ModLoader;
using CalamityMod.Tiles.Furniture.Fountains;
namespace CalamityMod.Items.Placeables.Furniture.Fountains
{
public class SunkenSeaFountain : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Sunken Water Fountain");
}
public override void SetDefaults()
{
item.width = 26;
item.height = 32;
item.maxStack = 999;
item.useTurn = true;
item.autoReuse = true;
item.useAnimation = 15;
item.useTime = 10;
item.useStyle = 1;
item.consumable = true;
item.value = Item.buyPrice(0, 4, 0, 0);
item.rare = 0;
item.createTile = ModContent.TileType<SunkenSeaFountainTile>();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 499 B

+1 -1
View File
@@ -15,7 +15,7 @@ namespace CalamityMod.Items.SummonItems
Tooltip.SetDefault("A ritualistic artifact, thought to have brought upon The End many millennia ago\n" +
"Sealed away in the abyss, far from those that would seek to misuse it\n" +
"Activates Boss Rush Mode, using it again will deactivate Boss Rush Mode\n" +
"During the Boss Rush, all wires, wired devices, and mounts will be disabled");
"During the Boss Rush, all wires and wired devices will be disabled");
}
public override void SetDefaults()
+3 -4
View File
@@ -38,6 +38,8 @@ namespace CalamityMod.Items.TreasureBags
return true;
}
public override void PostUpdate() => CalamityUtils.ForceItemIntoWorld(item);
public override void OpenBossBag(Player player)
{
player.TryGettingDevArmor();
@@ -55,10 +57,7 @@ namespace CalamityMod.Items.TreasureBags
DropHelper.DropItemChance(player, ModContent.ItemType<Quasar>(), DropHelper.RareVariantDropRateInt);
// Equipment
float f = Main.rand.NextFloat();
bool replaceWithRare = f <= DropHelper.RareVariantDropRateFloat; // 1/40 chance of getting Hide of Astrum Deus
DropHelper.DropItemCondition(player, ModContent.ItemType<AstralBulwark>(), !replaceWithRare);
DropHelper.DropItemCondition(player, ModContent.ItemType<HideofAstrumDeus>(), replaceWithRare);
DropHelper.DropItemRIV(player, ModContent.ItemType<AstralBulwark>(), ModContent.ItemType<HideofAstrumDeus>(), 1f, DropHelper.RareVariantDropRateFloat);
// Vanity
DropHelper.DropItemChance(player, ModContent.ItemType<AstrumDeusMask>(), 7);
+1 -7
View File
@@ -51,13 +51,7 @@ namespace CalamityMod.Items.TreasureBags
DropHelper.DropItemChance(player, ModContent.ItemType<Barinade>(), 3);
DropHelper.DropItemChance(player, ModContent.ItemType<StormSpray>(), 3);
DropHelper.DropItemChance(player, ModContent.ItemType<SeaboundStaff>(), 3);
float f = Main.rand.NextFloat();
bool replaceWithRare = f <= DropHelper.RareVariantDropRateFloat; // 1/40 chance overall of getting Dune Hopper
if (f < 0.3333f) // 1/3 chance of getting Scourge of the Desert OR Dune Hopper replacing it
{
DropHelper.DropItemCondition(player, ModContent.ItemType<ScourgeoftheDesert>(), !replaceWithRare);
DropHelper.DropItemCondition(player, ModContent.ItemType<DuneHopper>(), replaceWithRare);
}
DropHelper.DropItemRIV(player, ModContent.ItemType<ScourgeoftheDesert>(), ModContent.ItemType<DuneHopper>(), 0.3333f, DropHelper.RareVariantDropRateFloat);
// Equipment
DropHelper.DropItem(player, ModContent.ItemType<OceanCrest>());
+2
View File
@@ -49,6 +49,8 @@ namespace CalamityMod.Items.TreasureBags
return true;
}
public override void PostUpdate() => CalamityUtils.ForceItemIntoWorld(item);
public override void OpenBossBag(Player player)
{
player.TryGettingDevArmor();
@@ -10,6 +10,7 @@ using CalamityMod.Items.Weapons.Summon;
using CalamityMod.NPCs.PlaguebringerGoliath;
using CalamityMod.World;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.TreasureBags
@@ -34,10 +35,7 @@ namespace CalamityMod.Items.TreasureBags
item.expert = true;
}
public override bool CanRightClick()
{
return true;
}
public override bool CanRightClick() => true;
public override void OpenBossBag(Player player)
{
@@ -45,6 +43,7 @@ namespace CalamityMod.Items.TreasureBags
// Materials
DropHelper.DropItem(player, ModContent.ItemType<PlagueCellCluster>(), 13, 17);
DropHelper.DropItem(player, ItemID.Stinger, 4, 8);
// Weapons
DropHelper.DropItemChance(player, ModContent.ItemType<VirulentKatana>(), 3); // Virulence
+8 -8
View File
@@ -1,4 +1,4 @@
using CalamityMod.Items.Pets;
using CalamityMod.Items.DifficultyItems;
using CalamityMod.Items.Weapons.Rogue;
using CalamityMod.Items.Weapons.Summon;
@@ -24,10 +24,7 @@ namespace CalamityMod.Items.TreasureBags
item.rare = 1;
}
public override bool CanRightClick()
{
return true;
}
public override bool CanRightClick() => true;
public override void RightClick(Player player)
{
@@ -54,13 +51,16 @@ namespace CalamityMod.Items.TreasureBags
DropHelper.DropItem(player, ItemID.Torch, 25);
DropHelper.DropItem(player, ItemID.Chest, 3);
// Difficulty items
DropHelper.DropItem(player, ModContent.ItemType<Death>());
DropHelper.DropItem(player, ModContent.ItemType<DefiledRune>());
// Difficulty items (doesn't drop in Normal)
DropHelper.DropItemCondition(player, ModContent.ItemType<Death>(), Main.expertMode);
DropHelper.DropItemCondition(player, ModContent.ItemType<DefiledRune>(), Main.expertMode);
// Speedrun King Slime
DropHelper.DropItem(player, ItemID.SlimeCrown);
// The Lad
DropHelper.DropItemCondition(player, ModContent.ItemType<JoyfulHeart>(), player.name == "Aleksh" || player.name == "Shark Lad");
// Music box (if music mod installed)
Mod musicMod = ModLoader.GetMod("CalamityModMusic");
if (musicMod != null)
@@ -45,7 +45,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType<GatlingLaserProj>(), damage, knockBack, player.whoAmI, 0f, 0f);
return false;
+1 -1
View File
@@ -41,7 +41,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
item.useAmmo = AmmoID.Bullet;
}
public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
Vector2 velocity = new Vector2(speedX, speedY);
if (velocity.Length() > 5f)
@@ -66,7 +66,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
return base.CanUseItem(player);
}
public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
Vector2 velocity = new Vector2(speedX, speedY);
if (velocity.Length() > 5f)
+1 -1
View File
@@ -43,7 +43,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
item.useAmmo = AmmoID.Bullet;
}
public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
Vector2 velocity = new Vector2(speedX, speedY);
if (velocity.Length() > 5f)
+1 -1
View File
@@ -42,7 +42,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
item.useAmmo = AmmoID.Bullet;
}
public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
Vector2 velocity = new Vector2(speedX, speedY);
if (velocity.Length() > 5f)
+6 -4
View File
@@ -12,15 +12,16 @@ namespace CalamityMod.Items.Weapons.Magic
{
DisplayName.SetDefault("Apoctosis Array");
Tooltip.SetDefault("Fires ion blasts that speed up and then explode\n" +
"The higher your mana the more damage they will do");
"The higher your mana the more damage they will do\n" +
"Astral steroids can inhibit the potential of this weapon");
}
public override void SetDefaults()
{
item.width = 98;
item.damage = 58;
item.damage = 45;
item.magic = true;
item.mana = 12;
item.mana = 14;
item.useAnimation = 7;
item.useTime = 7;
item.useStyle = 5;
@@ -45,7 +46,8 @@ namespace CalamityMod.Items.Weapons.Magic
{
float manaAmount = (float)player.statMana * 0.01f;
float damageMult = manaAmount;
int projectile = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, (int)((double)damage * damageMult), knockBack, player.whoAmI, 0.0f, 0.0f);
float injectionNerf = player.Calamity().astralInjection ? 0.6f : 1f;
int projectile = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, (int)(damage * damageMult * injectionNerf), knockBack, player.whoAmI, 0f, 0f);
Main.projectile[projectile].scale = manaAmount * 0.375f;
return false;
}
+2 -2
View File
@@ -38,10 +38,10 @@ namespace CalamityMod.Items.Weapons.Magic
public override Vector2? HoldoutOrigin()
{
return new Vector2(15, 15);
return new Vector2(10, 10);
}
public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
int num6 = Main.rand.Next(2, 3);
for (int index = 0; index < num6; ++index)
+1 -1
View File
@@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Magic
public override void SetDefaults()
{
item.damage = 88;
item.damage = 65;
item.magic = true;
item.mana = 20;
item.width = 28;
+8 -7
View File
@@ -18,18 +18,18 @@ namespace CalamityMod.Items.Weapons.Magic
public override void SetDefaults()
{
item.damage = 30;
item.damage = 50;
item.magic = true;
item.mana = 15;
item.width = 44;
item.height = 46;
item.useTime = 12;
item.useAnimation = 24;
item.useTime = 10;
item.useAnimation = 20;
item.useStyle = 5;
item.noMelee = true;
item.knockBack = 5.25f;
item.value = Item.buyPrice(0, 36, 0, 0);
item.rare = 5;
item.value = Item.buyPrice(0, 60, 0, 0);
item.rare = 7;
item.UseSound = SoundID.Item20;
item.autoReuse = true;
item.shoot = ModContent.ProjectileType<SpiritFlameCurse>();
@@ -44,8 +44,9 @@ namespace CalamityMod.Items.Weapons.Magic
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<EssenceofEleum>(), 3);
recipe.AddIngredient(ItemID.CrystalShard, 15);
recipe.AddIngredient(ModContent.ItemType<CoreofEleum>(), 3);
recipe.AddIngredient(ModContent.ItemType<VerstaltiteBar>(), 8);
recipe.AddIngredient(ItemID.FrostCore);
recipe.AddIngredient(ItemID.FrostStaff);
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this);
Loaded 100 of 441 files, more files were not shown because too many files have changed in this diff. Show more