This commit is contained in:
Ozzatron committed 2020-04-06 23:35:49 -04:00
commit a378dffe75
55 files changed
+194 -210

No files matched your search

Binary file not shown.

Before

Width:  |  Height:  |  Size: 525 B

After

Width:  |  Height:  |  Size: 434 B

+16 -2
View File
@@ -3633,7 +3633,7 @@ namespace CalamityMod.CalPlayer
#region Get Weapon Damage And KB
public override void ModifyWeaponDamage(Item item, ref float add, ref float mult, ref float flat)
{
bool isTrueMelee = item.melee && (item.shoot == 0 || (item.noMelee && item.noUseGraphic && item.useStyle == 5 && !CalamityMod.trueMeleeBoostExceptionList.Contains(item.type) && ItemID.Sets.Yoyo[item.type] != true));
bool isTrueMelee = item.melee && (item.shoot == 0 || item.Calamity().trueMelee);
if (isTrueMelee)
{
if (tScale)
@@ -3760,7 +3760,7 @@ namespace CalamityMod.CalPlayer
}
}
}
bool isTrueMelee = item.melee && (item.shoot == 0 || (item.noMelee && item.noUseGraphic && item.useStyle == 5 && !CalamityMod.trueMeleeBoostExceptionList.Contains(item.type) && ItemID.Sets.Yoyo[item.type] != true));
bool isTrueMelee = item.melee && (item.shoot == 0 || item.Calamity().trueMelee);
if (isTrueMelee)
{
if (fungalSymbiote && player.whoAmI == Main.myPlayer)
@@ -9138,6 +9138,20 @@ namespace CalamityMod.CalPlayer
fullBright = true;
}
}
if (cadence && !player.loveStruck)
{
if (Main.rand.NextBool(5) && drawInfo.shadow == 0f)
{
Vector2 vector2_2 = new Vector2((float)Main.rand.Next(-10, 11), (float)Main.rand.Next(-10, 11));
vector2_2.Normalize();
vector2_2.X *= 0.66f;
int heart = Gore.NewGore(drawInfo.position + new Vector2((float)Main.rand.Next(player.width + 1), (float)Main.rand.Next(player.height + 1)), vector2_2 * (float)Main.rand.Next(3, 6) * 0.33f, 331, (float)Main.rand.Next(40, 121) * 0.01f);
Main.gore[heart].sticky = false;
Main.gore[heart].velocity *= 0.4f;
Main.gore[heart].velocity.Y -= 0.6f;
Main.playerDrawGore.Add(heart);
}
}
}
#endregion
+1 -1
View File
@@ -164,7 +164,7 @@ namespace CalamityMod.CalPlayer
player.lifeRegen = 0;
player.lifeRegenTime = 0;
lifeRegenLost += 12;
lifeRegenLost += 6;
}
if (modPlayer.hFlames)
-1
View File
@@ -2687,7 +2687,6 @@ namespace CalamityMod.CalPlayer
player.discount = true;
player.lifeMagnet = true;
player.calmed = true;
player.loveStruck = true;
}
if (modPlayer.community)
-69
View File
@@ -165,7 +165,6 @@ namespace CalamityMod
public static List<int> movementImpairImmuneList;
public static List<int> trapProjectileList;
public static List<int> scopedWeaponList;
public static List<int> trueMeleeBoostExceptionList;
public static List<int> boomerangList;
public static List<int> javelinList;
public static List<int> daggerList;
@@ -374,7 +373,6 @@ namespace CalamityMod
movementImpairImmuneList = null;
trapProjectileList = null;
scopedWeaponList = null;
trueMeleeBoostExceptionList = null;
boomerangList = null;
javelinList = null;
daggerList = null;
@@ -1820,73 +1818,6 @@ namespace CalamityMod
ModContent.ItemType<Skullmasher>()
};
trueMeleeBoostExceptionList = new List<int>()
{
ItemID.FlowerPow,
ItemID.Flairon,
ItemID.ChlorophytePartisan,
ItemID.MushroomSpear,
ItemID.NorthPole,
ItemID.WoodYoyo,
ItemID.CorruptYoyo,
ItemID.CrimsonYoyo,
ItemID.JungleYoyo,
ItemID.Cascade,
ItemID.Chik,
ItemID.Code1,
ItemID.Code2,
ItemID.Rally,
ItemID.Yelets,
ItemID.RedsYoyo,
ItemID.ValkyrieYoyo,
ItemID.Amarok,
ItemID.HelFire,
ItemID.Kraken,
ItemID.TheEyeOfCthulhu,
ItemID.FormatC,
ItemID.Gradient,
ItemID.Valor,
ItemID.Terrarian,
// flails
ModContent.ItemType<BallOFugu>(),
ModContent.ItemType<DragonPow>(),
// spears
ModContent.ItemType<AmidiasTrident>(),
ModContent.ItemType<EarthenPike>(),
ModContent.ItemType<GoldplumeSpear>(),
ModContent.ItemType<HellionFlowerSpear>(),
ModContent.ItemType<SpatialLance>(),
ModContent.ItemType<StarnightLance>(),
ModContent.ItemType<StreamGouge>(),
ModContent.ItemType<TerraLance>(),
ModContent.ItemType<UrchinSpear>(),
// yoyos
ModContent.ItemType<AirSpinner>(),
ModContent.ItemType<Aorta>(),
ModContent.ItemType<Azathoth>(),
ModContent.ItemType<Chaotrix>(),
ModContent.ItemType<Cnidarian>(),
ModContent.ItemType<Lacerator>(),
ModContent.ItemType<Oracle>(),
ModContent.ItemType<Quagmire>(),
ModContent.ItemType<Shimmerspark>(),
ModContent.ItemType<SolarFlare>(),
ModContent.ItemType<TheEyeofCalamitas>(),
ModContent.ItemType<TheGodsGambit>(),
ModContent.ItemType<TheObliterator>(),
ModContent.ItemType<ThePlaguebringer>(),
ModContent.ItemType<Verdant>(),
ModContent.ItemType<Whirlpool>(),
ModContent.ItemType<YinYo>(),
// other
ModContent.ItemType<BansheeHook>(),
ModContent.ItemType<TyphonsGreed>()
};
boomerangList = new List<int>()
{
ModContent.ItemType<Brimblade>(),
+6 -6
View File
@@ -63,12 +63,6 @@ namespace CalamityMod
[Tooltip("Prevents the movement of the Adrenaline, Rage and Stealth bars with the Mouse")]
public bool MeterPosLock { get; set; }
[DefaultValue(2f)]
[Range(0f, 4f)]
[Label("Adrenaline and Rage Meter Shake")]
[Tooltip("How much the Adrenaline and Rage Meter shake while in use. Set to 0 to disable.")]
public float MeterShake { get; set; }
[DefaultValue(true)]
[Label("Boss Health Bar Small Text")]
[Tooltip("Enables the small text below the health bar\nThis displays the exact health amount or remaining boss parts")]
@@ -143,6 +137,12 @@ namespace CalamityMod
[DefaultValue(RipperUI.DefaultAdrenPosY)]
public float AdrenalineMeterPosY { get; set; }
[DefaultValue(2f)]
[Range(0f, 4f)]
[Label("Adrenaline and Rage Meter Shake")]
[Tooltip("How much the Adrenaline and Rage Meter shake while in use. Set to 0 to disable.")]
public float MeterShake { get; set; }
[DefaultValue(false)]
[Label("Revengeance and Death Thorium Boss buff")]
[Tooltip("Buffs the health of Thorium bosses if Revengeance or Death is enabled")]
+2 -1
View File
@@ -36,7 +36,8 @@ namespace CalamityMod.Items.Armor
public override void UpdateArmorSet(Player player)
{
player.setBonus = "Attacking and being attacked by enemies inflicts poison\n" +
"Grants a sulphurous bubble jump that applies venom on hit\n" +
"Grants an additional jump\n" +
"Jumping off the ground leaves behind a sulphurous bubble that applies venom on hit\n" +
"Slightly reduces breath loss in the abyss\n" +
"Rogue stealth builds while not attacking and slower while moving, up to a max of 100\n" +
"Once you have built max stealth, you will be able to perform a Stealth Strike\n" +
+39 -2
View File
@@ -6,6 +6,7 @@ using CalamityMod.Items.DifficultyItems;
using CalamityMod.Items.Materials;
using CalamityMod.Items.PermanentBoosters;
using CalamityMod.Items.Potions;
using CalamityMod.Items.Tools;
using CalamityMod.Items.Weapons.Magic;
using CalamityMod.Items.Weapons.Melee;
using CalamityMod.Items.Weapons.Ranged;
@@ -54,6 +55,7 @@ namespace CalamityMod.Items
#endregion
public bool rogue = false;
public bool trueMelee = false;
public int timesUsed = 0;
@@ -180,6 +182,29 @@ namespace CalamityMod.Items
item.damage *= 4;
item.rare = 4;
}
switch (item.type)
{
case ItemID.Spear:
case ItemID.TheRottedFork:
case ItemID.Swordfish:
case ItemID.Arkhalis:
case ItemID.DarkLance:
case ItemID.CobaltNaginata:
case ItemID.PalladiumPike:
case ItemID.MythrilHalberd:
case ItemID.OrichalcumHalberd:
case ItemID.AdamantiteGlaive:
case ItemID.TitaniumTrident:
case ItemID.Gungnir:
case ItemID.ObsidianSwordfish:
case ItemID.MonkStaffT3:
case ItemID.MonkStaffT1:
trueMelee = true;
break;
default:
break;
}
}
#endregion
@@ -851,7 +876,19 @@ namespace CalamityMod.Items
if (item.type == ModContent.ItemType<NanoblackReaperMelee>() || item.type == ModContent.ItemType<NanoblackReaperRogue>())
tt2.overrideColor = new Color(0.34f, 0.34f + 0.66f * Main.DiscoG / 255f, 0.34f + 0.5f * Main.DiscoG / 255f);
if (item.type == ModContent.ItemType<ProfanedSoulCrystal>())
tt2.overrideColor = new Color(255 - Main.DiscoG < 80 ? 80 : Main.DiscoG < 50 ? 255 : 255 - Main.DiscoG, Main.DiscoG < 126 ? 126 : Main.DiscoG, 0); //alternates between emerald green and amber (BanditHueh)
tt2.overrideColor = CalamityUtils.ColorSwap(new Color(255, 166, 0), new Color(25, 250, 25), 4f); //alternates between emerald green and amber (BanditHueh)
if (item.type == ModContent.ItemType<BensUmbrella>())
tt2.overrideColor = CalamityUtils.ColorSwap(new Color(210, 0, 255), new Color(255, 248, 24), 2f);
if (item.type == ModContent.ItemType<Endogenesis>())
tt2.overrideColor = CalamityUtils.ColorSwap(new Color(131, 239, 255), new Color(36, 55, 230), 2f);
if (item.type == ModContent.ItemType<DraconicDestruction>())
tt2.overrideColor = CalamityUtils.ColorSwap(new Color(255, 69, 0), new Color(139, 0, 0), 2f);
if (item.type == ModContent.ItemType<ScarletDevil>())
tt2.overrideColor = CalamityUtils.ColorSwap(new Color(191, 45, 71), new Color(185, 187, 253), 2f);
if (item.type == ModContent.ItemType<GaelsGreatsword>())
tt2.overrideColor = new Color(146, 0, 0);
if (item.type == ModContent.ItemType<CrystylCrusher>())
tt2.overrideColor = new Color(129, 29, 149);
// Uniquely colored legendary weapons and Yharim's Crystal
if (item.type == ModContent.ItemType<AegisBlade>() || item.type == ModContent.ItemType<YharimsCrystal>())
@@ -871,7 +908,7 @@ namespace CalamityMod.Items
if (item.type == ModContent.ItemType<Vesuvius>())
tt2.overrideColor = new Color(255, Main.DiscoG, 0);
if (item.type == ModContent.ItemType<PristineFury>())
tt2.overrideColor = new Color(255, 255, Main.DiscoB);
tt2.overrideColor = CalamityUtils.ColorSwap(new Color(255, 168, 53), new Color(255, 249, 0), 2f);
break;
}
}
+1 -1
View File
@@ -40,7 +40,7 @@ namespace CalamityMod.Items.Tools
item.rare = 10;
item.UseSound = mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/CrystylCharge");
item.shoot = ModContent.ProjectileType<CrystylCrusherRay>();
item.Calamity().customRarity = CalamityRarity.Developer;
item.Calamity().customRarity = CalamityRarity.ItemSpecific;
}
public override Vector2? HoldoutOrigin()
+1 -1
View File
@@ -80,7 +80,7 @@ namespace CalamityMod.Items.Tools
recipe.AddIngredient(ItemID.PurificationPowder, 20);
recipe.AddIngredient(ItemID.PixieDust, 10);
recipe.AddIngredient(ItemID.CrystalShard, 5);
recipe.AddTile(TileID.Anvils);
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this);
recipe.AddRecipe();
}
+1
View File
@@ -32,6 +32,7 @@ namespace CalamityMod.Items.Weapons.Melee
item.rare = 5;
item.shoot = ModContent.ProjectileType<BrimlanceProj>();
item.shootSpeed = 12f;
item.Calamity().trueMelee = true;
}
}
}
+2 -2
View File
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee
public override void SetDefaults()
{
item.width = 50;
item.damage = 63;
item.damage = 70;
item.melee = true;
item.useAnimation = 23;
item.useTime = 23;
@@ -88,7 +88,7 @@ namespace CalamityMod.Items.Weapons.Melee
default:
break;
}
Projectile.NewProjectile(vector2.X, vector2.Y, 0f, 0f, type, damage, knockBack, player.whoAmI, 0f, (float)Main.rand.Next(3));
Projectile.NewProjectile(vector2.X, vector2.Y, 0f, 0f, type, (int)(damage * 0.8), knockBack, player.whoAmI, 0f, (float)Main.rand.Next(3));
}
return false;
}
+1 -1
View File
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Melee
public override void SetDefaults()
{
item.damage = 140;
item.damage = 100;
item.melee = true;
item.width = 40;
item.height = 60;
+1
View File
@@ -38,6 +38,7 @@ namespace CalamityMod.Items.Weapons.Melee
item.shoot = ModContent.ProjectileType<DevilsSunriseProj>();
item.shootSpeed = 24f;
item.Calamity().trueMelee = true;
}
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)
+1
View File
@@ -32,6 +32,7 @@ namespace CalamityMod.Items.Weapons.Melee
item.rare = 8;
item.shoot = ModContent.ProjectileType<DiseasedPikeSpear>();
item.shootSpeed = 10f;
item.Calamity().trueMelee = true;
}
public override bool CanUseItem(Player player)
+1 -1
View File
@@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee
item.rare = 10;
item.shoot = ModContent.ProjectileType<DracoBeam>();
item.shootSpeed = 14f;
item.Calamity().customRarity = CalamityRarity.Developer;
item.Calamity().customRarity = CalamityRarity.ItemSpecific;
}
public override void AddRecipes()
+3 -1
View File
@@ -42,7 +42,9 @@ namespace CalamityMod.Items.Weapons.Melee
dust.noGravity = true;
dust.fadeIn = 0.9473684f;
}
return true;
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, (int)(damage * 0.7), knockBack, player.whoAmI, 0f, 0f);
return false;
}
}
}
@@ -33,6 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee
item.rare = 8;
item.shoot = ModContent.ProjectileType<ExsanguinationLanceProjectile>();
item.shootSpeed = 8f;
item.Calamity().trueMelee = true;
}
public override bool CanUseItem(Player player)
+6
View File
@@ -33,6 +33,12 @@ namespace CalamityMod.Items.Weapons.Melee
item.shootSpeed = 5f;
}
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, type, (int)(damage * 0.8), knockBack, player.whoAmI, 0f, 0f);
return false;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
@@ -31,6 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee
item.value = Item.buyPrice(0, 36, 0, 0);
item.rare = 5;
item.shootSpeed = 6f;
item.Calamity().trueMelee = true;
}
public override bool AltFunctionUse(Player player)
+1 -1
View File
@@ -64,7 +64,7 @@ namespace CalamityMod.Items.Weapons.Melee
item.rare = 10;
item.shoot = ModContent.ProjectileType<GaelSkull>();
item.shootSpeed = 15f;
item.Calamity().customRarity = CalamityRarity.Violet;
item.Calamity().customRarity = CalamityRarity.ItemSpecific;
item.useStyle = ItemUseStyleID.SwingThrow;
}
public override void HoldItem(Player player)
+1
View File
@@ -34,6 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee
item.shoot = ModContent.ProjectileType<GildedProboscisProj>();
item.shootSpeed = 13f;
item.Calamity().customRarity = CalamityRarity.Turquoise;
item.Calamity().trueMelee = true;
}
public override bool CanUseItem(Player player)
+1
View File
@@ -32,6 +32,7 @@ namespace CalamityMod.Items.Weapons.Melee
item.rare = 5;
item.shoot = ModContent.ProjectileType<HeartRapierProjectile>();
item.shootSpeed = 5f;
item.Calamity().trueMelee = true;
}
public override void AddRecipes()
+1
View File
@@ -31,6 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee
item.rare = 2;
item.shoot = ModContent.ProjectileType<MarniteSpearProjectile>();
item.shootSpeed = 5f;
item.Calamity().trueMelee = true;
}
public override void AddRecipes()
+1
View File
@@ -34,6 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee
item.shoot = ModContent.ProjectileType<MurasamaProj>();
item.shootSpeed = 24f;
item.Calamity().customRarity = CalamityRarity.Violet;
item.Calamity().trueMelee = true;
}
public override bool CanUseItem(Player player)
+1
View File
@@ -33,6 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee
item.rare = 3;
item.shoot = ModContent.ProjectileType<SausageMakerSpear>();
item.shootSpeed = 6f;
item.Calamity().trueMelee = true;
}
public override void AddRecipes()
+17 -2
View File
@@ -11,13 +11,14 @@ namespace CalamityMod.Items.Weapons.Melee
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Storm Saber");
Tooltip.SetDefault("Fires a storm beam");
Tooltip.SetDefault("Fires two storm beams\n" +
"One from blade and one from the sky");
}
public override void SetDefaults()
{
item.width = 58;
item.damage = 42;
item.damage = 50;
item.melee = true;
item.useAnimation = 23;
item.useTime = 23;
@@ -33,6 +34,20 @@ namespace CalamityMod.Items.Weapons.Melee
item.shootSpeed = 12f;
}
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, type, (int)(damage * 0.8), knockBack, player.whoAmI, 0f, 0f);
Vector2 spawnPos = new Vector2(player.MountedCenter.X + Main.rand.Next(-200, 201), player.MountedCenter.Y - 600f);
Vector2 targetPos = Main.MouseWorld + new Vector2(Main.rand.Next(-30, 31), Main.rand.Next(-30, 31));
Vector2 velocity = targetPos - spawnPos;
velocity.Normalize();
velocity *= 13f;
Projectile.NewProjectile(spawnPos, velocity, type, (int)(damage * 0.6), knockBack, player.whoAmI);
return false;
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.NextBool(5))
+8 -10
View File
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee
public override void SetDefaults()
{
item.width = 64;
item.damage = 42;
item.damage = 75;
item.melee = true;
item.useAnimation = 28;
item.useStyle = 1;
@@ -34,19 +34,17 @@ namespace CalamityMod.Items.Weapons.Melee
item.shootSpeed = 16f;
}
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, type, (int)(damage * 0.8), knockBack, player.whoAmI, 0f, 0f);
return false;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<CausticEdge>());
recipe.AddIngredient(ItemID.FlaskofCursedFlames, 5);
recipe.AddIngredient(ItemID.FlaskofPoison, 5);
recipe.AddIngredient(ItemID.Deathweed, 3);
recipe.AddTile(TileID.DemonAltar);
recipe.SetResult(this);
recipe.AddRecipe();
recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<CausticEdge>());
recipe.AddIngredient(ItemID.FlaskofIchor, 5);
recipe.AddRecipeGroup("AnyEvilFlask", 5);
recipe.AddIngredient(ItemID.FlaskofPoison, 5);
recipe.AddIngredient(ItemID.Deathweed, 3);
recipe.AddTile(TileID.DemonAltar);
+2
View File
@@ -60,6 +60,7 @@ namespace CalamityMod.Items.Weapons.Melee
item.useAnimation = 33;
item.useTime = 33;
item.shootSpeed = 4.5f;
item.Calamity().trueMelee = true;
}
else
{
@@ -68,6 +69,7 @@ namespace CalamityMod.Items.Weapons.Melee
item.useAnimation = 22;
item.useTime = 22;
item.shootSpeed = ShootSpeed;
item.Calamity().trueMelee = false;
}
return base.CanUseItem(player);
}
+1 -1
View File
@@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Ranged
public override void SetDefaults()
{
item.damage = 20;
item.damage = 23;
item.ranged = true;
item.width = 30;
item.height = 42;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

+1 -1
View File
@@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Rogue
item.shoot = ModContent.ProjectileType<ScarletDevilProjectile>();
item.shootSpeed = 30f;
item.Calamity().rogue = true;
item.Calamity().customRarity = CalamityRarity.Developer;
item.Calamity().customRarity = CalamityRarity.ItemSpecific;
}
public override void AddRecipes()
+1 -1
View File
@@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Summon
item.noMelee = true;
item.knockBack = 1f;
item.value = Item.buyPrice(5, 0, 0, 0);
item.Calamity().customRarity = CalamityRarity.Developer;
item.Calamity().customRarity = CalamityRarity.ItemSpecific;
item.rare = 10;
item.UseSound = SoundID.Item68;
item.shoot = ModContent.ProjectileType<MagicHat>();
+1 -1
View File
@@ -46,7 +46,7 @@ namespace CalamityMod.Items.Weapons.Summon
item.shootSpeed = 10f;
item.value = Item.buyPrice(5, 0, 0, 0);
item.Calamity().customRarity = CalamityRarity.Developer;
item.Calamity().customRarity = CalamityRarity.ItemSpecific;
}
public override bool CanUseItem(Player player)
-11
View File
@@ -73,31 +73,20 @@ namespace CalamityMod.Projectiles
switch (projectile.type)
{
case ProjectileID.Spear:
case ProjectileID.ChainKnife:
case ProjectileID.TheRottedFork:
case ProjectileID.BallOHurt:
case ProjectileID.TheMeatball:
case ProjectileID.Swordfish:
case ProjectileID.Arkhalis:
case ProjectileID.BlueMoon:
case ProjectileID.DarkLance:
case ProjectileID.Sunfury:
case ProjectileID.Anchor:
case ProjectileID.BoxingGlove:
case ProjectileID.CobaltNaginata:
case ProjectileID.PalladiumPike:
case ProjectileID.MythrilHalberd:
case ProjectileID.OrichalcumHalberd:
case ProjectileID.AdamantiteGlaive:
case ProjectileID.TitaniumTrident:
case ProjectileID.TheDaoofPow:
case ProjectileID.GolemFist:
case ProjectileID.Gungnir:
case ProjectileID.ObsidianSwordfish:
case ProjectileID.ChainGuillotine:
case ProjectileID.MonkStaffT3:
case ProjectileID.MonkStaffT1:
case ProjectileID.SolarWhipSword:
trueMelee = true;
break;
case ProjectileID.StarWrath:
-1
View File
@@ -26,7 +26,6 @@ namespace CalamityMod.Projectiles.Melee
projectile.melee = true;
projectile.alpha = 255;
projectile.tileCollide = false;
projectile.Calamity().trueMelee = true;
}
public override void AI()
@@ -30,7 +30,6 @@ namespace CalamityMod.Projectiles.Melee
projectile.ignoreWater = true;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 4;
projectile.Calamity().trueMelee = true;
projectile.coldDamage = true;
}
public override Color SpecialDrawColor => new Color(150, 255, 255);
-1
View File
@@ -21,7 +21,6 @@ namespace CalamityMod.Projectiles.Melee
projectile.ignoreWater = true;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 10;
projectile.Calamity().trueMelee = true;
}
}
}
-1
View File
@@ -27,7 +27,6 @@ namespace CalamityMod.Projectiles.Melee
projectile.ignoreWater = true;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 2;
projectile.Calamity().trueMelee = true;
}
public override Color SpecialDrawColor => new Color(255, 200, 0);
public override int ExudeDustType => ModContent.DustType<AstralOrange>();
-1
View File
@@ -21,7 +21,6 @@ namespace CalamityMod.Projectiles.Melee
projectile.penetrate = -1;
projectile.melee = true;
projectile.alpha = 255;
projectile.Calamity().trueMelee = true;
}
public override void AI()
-1
View File
@@ -27,7 +27,6 @@ namespace CalamityMod.Projectiles.Melee
projectile.alpha = 255;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 3;
projectile.Calamity().trueMelee = true;
}
public override void AI()
-1
View File
@@ -22,7 +22,6 @@ namespace CalamityMod.Projectiles.Melee
projectile.penetrate = -1;
projectile.melee = true;
projectile.alpha = 255;
projectile.Calamity().trueMelee = true;
}
public override void AI()
+7 -6
View File
@@ -1,6 +1,7 @@
using CalamityMod.Buffs.DamageOverTime;
using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
@@ -57,7 +58,7 @@ namespace CalamityMod.Projectiles.Ranged
Main.dust[num448].scale = (float)Main.rand.Next(70, 110) * 0.013f;
Main.dust[num448].velocity *= 0.2f;
Main.dust[num448].noLight = true;
Main.dust[num448].color = new Color(255, 255, Main.DiscoB);
Main.dust[num448].color = CalamityUtils.ColorSwap(new Color(255, 168, 53), new Color(255, 249, 0), 2f);
}
projectile.ai[0] += 1f;
if (projectile.ai[0] == 48f)
@@ -84,7 +85,7 @@ namespace CalamityMod.Projectiles.Ranged
Main.dust[num42].position = projectile.Center + value8;
Main.dust[num42].velocity = projectile.velocity;
Main.dust[num42].noLight = true;
Main.dust[num42].color = new Color(255, 255, Main.DiscoB);
Main.dust[num42].color = CalamityUtils.ColorSwap(new Color(255, 168, 53), new Color(255, 249, 0), 2f);
}
}
}
@@ -124,14 +125,14 @@ namespace CalamityMod.Projectiles.Ranged
dust.noGravity = true;
dust.velocity *= 3f;
dust.velocity += value4 * Main.rand.NextFloat();
dust.color = new Color(255, 255, Main.DiscoB);
num54 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, dustType, 0f, 0f, 100, new Color(255, 255, Main.DiscoB), num51);
dust.color = CalamityUtils.ColorSwap(new Color(255, 168, 53), new Color(255, 249, 0), 2f);
num54 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, dustType, 0f, 0f, 100, default, num51);
dust.position = projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * (float)projectile.width / 2f;
dust.velocity *= 2f;
dust.noGravity = true;
dust.fadeIn = 1f;
dust.velocity += value4 * Main.rand.NextFloat();
dust.color = new Color(255, 255, Main.DiscoB);
dust.color = CalamityUtils.ColorSwap(new Color(255, 168, 53), new Color(255, 249, 0), 2f);
}
for (int num55 = 0; num55 < 20; num55++)
{
@@ -141,7 +142,7 @@ namespace CalamityMod.Projectiles.Ranged
dust.noGravity = true;
dust.velocity *= 0.5f;
dust.velocity += value4 * (0.6f + 0.6f * Main.rand.NextFloat());
dust.color = new Color(255, 255, Main.DiscoB);
dust.color = CalamityUtils.ColorSwap(new Color(255, 168, 53), new Color(255, 249, 0), 2f);
}
}
}
+1 -1
View File
@@ -86,7 +86,7 @@ namespace CalamityMod.Projectiles.Ranged
dust.velocity.Y *= 1.2f;
dust.scale *= num296;
dust.noLight = true;
dust.color = new Color(255, 255, Main.DiscoB);
dust.color = CalamityUtils.ColorSwap(new Color(255, 168, 53), new Color(255, 249, 0), 2f);
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

+2 -8
View File
@@ -11,9 +11,6 @@ namespace CalamityMod.Projectiles.Rogue
{
public class LuminousStrikerProj : ModProjectile
{
public int shardRainTimer = 3;
bool stealthStrike = false;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Luminous Striker");
@@ -37,29 +34,26 @@ namespace CalamityMod.Projectiles.Rogue
if (projectile.ai[0] == 0f && modPlayer.StealthStrikeAvailable())
{
projectile.Calamity().stealthStrike = true;
stealthStrike = true;
projectile.timeLeft = 600;
projectile.ai[0] = 1f;
}
shardRainTimer--;
if (Main.rand.NextBool(4))
Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 176, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f);
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 0.785f;
if (shardRainTimer == 0)
if (projectile.timeLeft % 4 == 0)
{
if (projectile.owner == Main.myPlayer)
{
if (stealthStrike)
if (projectile.Calamity().stealthStrike)
{
Projectile.NewProjectile(projectile.Center.X + Main.rand.NextFloat(-15f, 15f), projectile.Center.Y + Main.rand.NextFloat(-15f, 15f), projectile.velocity.X, projectile.velocity.Y, ModContent.ProjectileType<LuminousShard>(), (int)((double)projectile.damage * 0.25), projectile.knockBack * 0.25f, projectile.owner, 0f, 0f);
}
else
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0f, -2f, ModContent.ProjectileType<LuminousShard>(), (int)((double)projectile.damage * 0.25), projectile.knockBack * 0.25f, projectile.owner, 0f, 0f);
}
shardRainTimer = 4;
}
}
+7 -15
View File
@@ -37,7 +37,7 @@ namespace CalamityMod.Projectiles.Rogue
if (projectile.Calamity().stealthStrike)
{
if (Main.rand.Next(8) == 0)
if (Main.rand.NextBool(8))
{
int projectileDamage = (int)(projectile.damage * 0.75f);
int projectileType = ModContent.ProjectileType<NightsGazeStar>();
@@ -127,20 +127,12 @@ namespace CalamityMod.Projectiles.Rogue
{
for (int i = 0; i < 5; i++)
{
int dustToUse = Main.rand.Next(0, 3);
int dustType = 0;
switch (dustToUse)
{
case 0:
dustType = 109;
break;
case 1:
dustType = 111;
break;
case 2:
dustType = 132;
break;
}
int dustType = Utils.SelectRandom(Main.rand, new int[]
{
109,
111,
132
});
int dust = Dust.NewDust(projectile.Center, 1, 1, dustType, projectile.velocity.X / 3f, projectile.velocity.Y / 3f, 0, default, 1.5f);
Main.dust[dust].noGravity = true;
+7 -7
View File
@@ -10,8 +10,6 @@ namespace CalamityMod.Projectiles.Rogue
{
public class PhantasmalRuinProj : ModProjectile
{
private int projCount = 18;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Phantasmal Ruin");
@@ -41,8 +39,7 @@ namespace CalamityMod.Projectiles.Rogue
{
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 0.785f;
Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 175, projectile.velocity.X * 0.25f, projectile.velocity.Y * 0.25f, 0, default(Color), 0.85f);
projCount--;
if (projCount <= 0)
if (projectile.timeLeft % 18 == 0)
{
if (projectile.owner == Main.myPlayer)
{
@@ -54,13 +51,12 @@ namespace CalamityMod.Projectiles.Rogue
{
if (Main.rand.NextBool(3))
{
int soul = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0f, Main.rand.Next(-2,3), ProjectileID.LostSoulFriendly, (int)((double)projectile.damage * 0.5), projectile.knockBack, projectile.owner, 0f, 0f);
int soul = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0f, Main.rand.NextFloat(-2,2), ProjectileID.LostSoulFriendly, (int)((double)projectile.damage * 0.5), projectile.knockBack, projectile.owner, 0f, 0f);
Main.projectile[soul].Calamity().forceRogue = true;
Main.projectile[soul].timeLeft = 180;
}
}
}
projCount = 18;
}
}
@@ -87,7 +83,7 @@ namespace CalamityMod.Projectiles.Rogue
}
else
{
damage = (int)((double)damage * 0.9);
damage = (int)(damage * 0.9);
}
}
}
@@ -111,6 +107,10 @@ namespace CalamityMod.Projectiles.Rogue
int num24 = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, (float)(-Math.Sin(offsetAngle) * 5f), (float)(-Math.Cos(offsetAngle) * 5f) + randomSpeed2, ModContent.ProjectileType<PhantasmalSoul>(), (int)((double)projectile.damage * 0.05), 0f, projectile.owner, 1f, ai1);
}
}
else
{
damage = (int)(damage * 0.9);
}
}
}
}
+2 -5
View File
@@ -10,8 +10,6 @@ namespace CalamityMod.Projectiles.Rogue
{
public class ScarletDevilProjectile : ModProjectile
{
bool lifesteal = false;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Spear the Gungnir");
@@ -41,7 +39,6 @@ namespace CalamityMod.Projectiles.Rogue
if (projectile.ai[0] == 1f && modPlayer.StealthStrikeAvailable())
{
projectile.Calamity().stealthStrike = true;
lifesteal = true;
}
if ((projectile.ai[0] %= 5f) == 0f)
{
@@ -79,7 +76,7 @@ namespace CalamityMod.Projectiles.Rogue
projectile.position.X = projectile.position.X - (float)(projectile.width / 2);
projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2);
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType<ScarletBlast>(), (int)((double)projectile.damage * 0.0075), 0f, projectile.owner, 0f, 0f);
if (target.type == NPCID.TargetDummy || !lifesteal)
if (target.type == NPCID.TargetDummy || !projectile.Calamity().stealthStrike)
{
return;
}
@@ -94,7 +91,7 @@ namespace CalamityMod.Projectiles.Rogue
projectile.position.X = projectile.position.X - (float)(projectile.width / 2);
projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2);
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType<ScarletBlast>(), (int)((double)projectile.damage * 0.0075), 0f, projectile.owner, 0f, 0f);
if (!lifesteal)
if (!projectile.Calamity().stealthStrike)
{
return;
}
+2 -6
View File
@@ -10,7 +10,6 @@ namespace CalamityMod.Projectiles.Rogue
{
public class SpearofPaleolithProj : ModProjectile
{
private int shardRainTimer = 3;
private bool stealthInit = false;
public override void SetStaticDefaults()
@@ -40,8 +39,6 @@ namespace CalamityMod.Projectiles.Rogue
projectile.timeLeft = 1800;
stealthInit = true;
}
shardRainTimer--;
if (Main.rand.NextBool(4))
{
@@ -52,13 +49,12 @@ namespace CalamityMod.Projectiles.Rogue
{
projectile.rotation -= 1.57f;
}
if (shardRainTimer == 0)
if (projectile.timeLeft % 3 == 0)
{
if (projectile.owner == Main.myPlayer)
{
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0f, projectile.velocity.Y * 0f, ModContent.ProjectileType<FossilShardThrown>(), (int)((double)projectile.damage * 0.5), projectile.knockBack, projectile.owner, 0f, 0f);
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0f, projectile.velocity.Y * 0f, ModContent.ProjectileType<FossilShardThrown>(), (int)(projectile.damage * 0.5), projectile.knockBack, projectile.owner, 0f, 0f);
}
shardRainTimer = 3;
}
}
+1 -5
View File
@@ -11,8 +11,6 @@ namespace CalamityMod.Projectiles.Rogue
{
public class SupernovaBomb : ModProjectile
{
private int stealthTimer = 8;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Supernova Bomb");
@@ -68,14 +66,12 @@ namespace CalamityMod.Projectiles.Rogue
//stealth strike
if (projectile.Calamity().stealthStrike == true)
{
stealthTimer--;
if (stealthTimer == 0)
if (projectile.timeLeft % 8 == 0)
{
if (projectile.owner == Main.myPlayer)
{
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0f, 2f, ModContent.ProjectileType<SupernovaHoming>(), (int)((double)projectile.damage * 0.8), projectile.knockBack, projectile.owner, 0f, 0f);
}
stealthTimer = 8;
}
}
}
+8 -13
View File
@@ -9,8 +9,6 @@ namespace CalamityMod.Projectiles.Rogue
{
public class SylvanSlashAttack : ModProjectile
{
public int cooldown = 6;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Sylvan Slash");
@@ -36,7 +34,7 @@ namespace CalamityMod.Projectiles.Rogue
Vector2 vector = player.RotatedRelativePoint(player.MountedCenter, true);
if (projectile.spriteDirection == -1)
{
num = 3.14159274f;
num = MathHelper.Pi;
}
if (++projectile.frame >= Main.projFrames[projectile.type])
{
@@ -93,8 +91,7 @@ namespace CalamityMod.Projectiles.Rogue
player.itemAnimation = 2;
player.itemRotation = (float)Math.Atan2((double)(projectile.velocity.Y * (float)projectile.direction), (double)(projectile.velocity.X * (float)projectile.direction));
if (cooldown < 5)
cooldown++;
projectile.ai[0]++;
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
@@ -103,7 +100,7 @@ namespace CalamityMod.Projectiles.Rogue
CalamityPlayer modPlayer = player.Calamity();
if (projectile.owner == Main.myPlayer)
{
if (cooldown == 5)
if (projectile.ai[0] % 5 == 0)
{
if ((target.damage > 5 || target.boss) && !target.SpawnedFromStatue)
{
@@ -111,16 +108,15 @@ namespace CalamityMod.Projectiles.Rogue
{
if (modPlayer.rogueStealth < modPlayer.rogueStealthMax)
modPlayer.rogueStealth += 0.01f;
cooldown = 0;
}
}
}
if (Main.rand.NextBool(8))
{
float speedMult = Main.rand.Next(3,6);
float speedMult = Main.rand.NextFloat(3,6);
Vector2 vector1 = new Vector2(projectile.Center.X - player.Center.X, projectile.Center.Y - player.Center.Y);
vector1.Normalize();
Projectile.NewProjectile(player.Center.X, player.Center.Y, -vector1.X * speedMult, -vector1.Y * speedMult, ModContent.ProjectileType<SylvanSlash>(), (int)((double)projectile.damage * 0.5), projectile.knockBack, projectile.owner, 0f, 0f);
Projectile.NewProjectile(player.Center.X, player.Center.Y, -vector1.X * speedMult, -vector1.Y * speedMult, ModContent.ProjectileType<SylvanSlash>(), (int)(projectile.damage * 0.5), projectile.knockBack, projectile.owner, 0f, 0f);
}
}
}
@@ -131,21 +127,20 @@ namespace CalamityMod.Projectiles.Rogue
CalamityPlayer modPlayer = player.Calamity();
if (projectile.owner == Main.myPlayer)
{
if (cooldown == 5)
if (projectile.ai[0] >= 5)
{
if (modPlayer.wearingRogueArmor && modPlayer.rogueStealthMax != 0)
{
if (modPlayer.rogueStealth < modPlayer.rogueStealthMax)
modPlayer.rogueStealth += 0.01f;
cooldown = 0;
}
}
if (Main.rand.NextBool(8))
{
float speedMult = Main.rand.Next(3,6);
float speedMult = Main.rand.NextFloat(3,6);
Vector2 vector1 = new Vector2(projectile.Center.X - player.Center.X, projectile.Center.Y - player.Center.Y);
vector1.Normalize();
Projectile.NewProjectile(player.Center.X, player.Center.Y, -vector1.X * speedMult, -vector1.Y * speedMult, ModContent.ProjectileType<SylvanSlash>(), (int)((double)projectile.damage * 0.5), projectile.knockBack, projectile.owner, 0f, 0f);
Projectile.NewProjectile(player.Center.X, player.Center.Y, -vector1.X * speedMult, -vector1.Y * speedMult, ModContent.ProjectileType<SylvanSlash>(), (int)(projectile.damage * 0.5), projectile.knockBack, projectile.owner, 0f, 0f);
}
}
}
+16 -20
View File
@@ -8,8 +8,6 @@ namespace CalamityMod.Projectiles.Rogue
{
public class TotalityFlask : ModProjectile
{
private int tarTimer = 10;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Totality Flask");
@@ -30,36 +28,34 @@ namespace CalamityMod.Projectiles.Rogue
{
if (projectile.Calamity().stealthStrike == true)
{
tarTimer--;
if (tarTimer == 0)
if (projectile.timeLeft % 10 == 0)
{
if (projectile.owner == Main.myPlayer)
{
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0f, projectile.velocity.Y * 0f, ModContent.ProjectileType<TotalityTar>(), (int)((double)projectile.damage * 0.6), projectile.knockBack, projectile.owner, 0f, 0f);
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, projectile.velocity.X * 0f, projectile.velocity.Y * 0f, ModContent.ProjectileType<TotalityTar>(), (int)(projectile.damage * 0.6), projectile.knockBack, projectile.owner, 0f, 0f);
}
tarTimer = 10;
}
}
Vector2 spinningpoint = new Vector2(4f, -8f);
float rotation = projectile.rotation;
if (projectile.direction == -1)
spinningpoint.X = -4f;
Vector2 vector2 = spinningpoint.RotatedBy((double) rotation, new Vector2());
spinningpoint.X = -4f;
Vector2 vector2 = spinningpoint.RotatedBy((double)rotation, new Vector2());
for (int index1 = 0; index1 < 1; ++index1)
{
int index2 = Dust.NewDust(projectile.Center + vector2 - Vector2.One * 5f, 4, 4, 6, 0.0f, 0.0f, 0, new Color(), 1f);
Main.dust[index2].scale = 1.5f;
Main.dust[index2].noGravity = true;
Main.dust[index2].velocity = Main.dust[index2].velocity * 0.25f + Vector2.Normalize(vector2) * 1f;
Main.dust[index2].velocity = Main.dust[index2].velocity.RotatedBy(-1.57079637050629 * (double) projectile.direction, new Vector2());
int index2 = Dust.NewDust(projectile.Center + vector2 - Vector2.One * 5f, 4, 4, 6, 0.0f, 0.0f, 0, new Color(), 1f);
Main.dust[index2].scale = 1.5f;
Main.dust[index2].noGravity = true;
Main.dust[index2].velocity = Main.dust[index2].velocity * 0.25f + Vector2.Normalize(vector2) * 1f;
Main.dust[index2].velocity = Main.dust[index2].velocity.RotatedBy(-MathHelper.PiOver2 * (double)projectile.direction, new Vector2());
}
}
public override void Kill(int timeLeft)
{
Main.PlaySound(13, (int) projectile.position.X, (int) projectile.position.Y, 1, 1f, 0.0f);
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 10;
//projectile.usesLocalNPCImmunity = true;
//projectile.localNPCHitCooldown = 10;
Vector2 vector2 = new Vector2(20f, 20f);
for (int index = 0; index < 5; ++index)
Dust.NewDust(projectile.Center - vector2 / 2f, (int) vector2.X, (int) vector2.Y, 191, 0.0f, 0.0f, 0, Color.Red, 1f);
@@ -67,17 +63,17 @@ namespace CalamityMod.Projectiles.Rogue
{
int index2 = Dust.NewDust(projectile.Center - vector2 / 2f, (int) vector2.X, (int) vector2.Y, 31, 0.0f, 0.0f, 100, new Color(), 1.5f);
Dust dust = Main.dust[index2];
dust.velocity = dust.velocity * 1.4f;
dust.velocity *= 1.4f;
}
for (int index1 = 0; index1 < 20; ++index1)
{
int index2 = Dust.NewDust(projectile.Center - vector2 / 2f, (int) vector2.X, (int) vector2.Y, 6, 0.0f, 0.0f, 100, new Color(), 2.5f);
Main.dust[index2].noGravity = true;
Dust dust1 = Main.dust[index2];
dust1.velocity = dust1.velocity * 5f;
dust1.noGravity = true;
dust1.velocity *= 5f;
int index3 = Dust.NewDust(projectile.Center - vector2 / 2f, (int) vector2.X, (int) vector2.Y, 6, 0.0f, 0.0f, 100, new Color(), 1.5f);
Dust dust2 = Main.dust[index3];
dust2.velocity = dust2.velocity * 3f;
dust2.velocity *= 3f;
}
int num251 = Main.rand.Next(2, 4);
if (projectile.owner == Main.myPlayer)
@@ -91,7 +87,7 @@ namespace CalamityMod.Projectiles.Rogue
}
value15.Normalize();
value15 *= (float)Main.rand.Next(70, 101) * 0.1f;
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value15.X, value15.Y, ModContent.ProjectileType<TotalityTar>(), (int)((double)projectile.damage * 0.6), 0f, Main.myPlayer, 0f, 0f);
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value15.X, value15.Y, ModContent.ProjectileType<TotalityTar>(), (int)(projectile.damage * 0.6), 0f, Main.myPlayer, 0f, 0f);
}
}
}
+7
View File
@@ -963,6 +963,13 @@ namespace CalamityMod
});
RecipeGroup.RegisterGroup("CursedFlameIchor", group);
group = new RecipeGroup(() => "Any Evil Flask", new int[]
{
ItemID.FlaskofCursedFlames,
ItemID.FlaskofIchor
});
RecipeGroup.RegisterGroup("AnyEvilFlask", group);
group = new RecipeGroup(() => "Any Evil Water", new int[]
{
ItemID.UnholyWater,
+13
View File
@@ -2311,6 +2311,19 @@ namespace CalamityMod
sb.Append("[c/").Append(color.Hex3()).Append(':').Append(msg).Append(']');
return sb.ToString();
}
/// <summary>
/// Returns a color lerp that allows for smooth transitioning between two given colors
/// </summary>
/// <param name="firstColor">The first color you want it to switch between</param>
/// <param name="secondColor">The second color you want it to switch between</param>
/// <param name="seconds">How long you want it to take to swap between colors</param>
public static Color ColorSwap(Color firstColor, Color secondColor, float seconds)
{
double timeMult = (double)(MathHelper.TwoPi / seconds);
float colorMePurple = (float)((Math.Sin(timeMult * Main.GlobalTime) + 1) * 0.5f);
return Color.Lerp(firstColor, secondColor, colorMePurple);
}
#endregion
#region Miscellaneous Utilities