Merge shenanigans

This commit is contained in:
Shucks committed 2019-10-12 19:38:21 -05:00
commit fec4527861
232 files changed
+1125 -507

No files matched your search

+44 -11
View File
@@ -308,6 +308,9 @@ namespace CalamityMod.CalPlayer
public bool eclipseMirrorCooldown = false;
public bool featherCrown = false;
public bool moonCrown = false;
public bool dragonScales = false;
public bool gloveOfPrecision = false;
public bool momentumCapacitor = false;
// Armor Set
public bool victideSet = false;
@@ -1018,6 +1021,9 @@ namespace CalamityMod.CalPlayer
eclipseMirrorCooldown = false;
featherCrown = false;
moonCrown = false;
dragonScales = false;
gloveOfPrecision = false;
momentumCapacitor = false;
shadowflame = false;
wDeath = false;
@@ -1647,6 +1653,13 @@ namespace CalamityMod.CalPlayer
#region HotKeys
public override void ProcessTriggers(TriggersSet triggersSet)
{
if (CalamityMod.MomentumCapacitatorHotkey.JustPressed && momentumCapacitor && Main.myPlayer == player.whoAmI && player.Calamity().rogueStealth >= player.Calamity().rogueStealthMax * 0.25f &&
CalamityUtils.CountProjectiles(mod.ProjectileType("MomentumCapacitorOrb")) == 0)
{
player.Calamity().rogueStealth -= player.Calamity().rogueStealthMax * 0.25f;
Vector2 fieldSpawnCenter = new Vector2(Main.mouseX, Main.mouseY) + Main.screenPosition;
Projectile.NewProjectile(fieldSpawnCenter, Vector2.Zero, mod.ProjectileType("MomentumCapacitorOrb"), 0, 0f, player.whoAmI, 0f, 0f);
}
if (CalamityMod.NormalityRelocatorHotKey.JustPressed && normalityRelocator && Main.myPlayer == player.whoAmI)
{
Vector2 teleportLocation;
@@ -2003,7 +2016,6 @@ namespace CalamityMod.CalPlayer
if (!(Collision.TileCollision(vector - vector3, vector3, player.width, player.height, false, false, (int)player.gravDir) != vector3))
{
flag = true;
num3 += i;
break;
}
}
@@ -2097,7 +2109,6 @@ namespace CalamityMod.CalPlayer
if (!(Collision.TileCollision(vector - vector3, vector3, player.width, player.height, false, false, (int)player.gravDir) != vector3))
{
flag = true;
num3 += i;
break;
}
}
@@ -4450,6 +4461,11 @@ namespace CalamityMod.CalPlayer
player.Calamity().throwingVelocity += 0.1f;
}
}
if (gloveOfPrecision)
{
player.Calamity().throwingCrit += 12;
player.Calamity().throwingVelocity *= 1.2f;
}
if (tarraSummon)
{
int lifeCounter = 0;
@@ -4477,7 +4493,6 @@ namespace CalamityMod.CalPlayer
lifeCounter++;
if (lifeCounter >= 180)
{
lifeCounter = 0;
}
}
if (brimstoneElementalLore && player.inferno)
@@ -4723,34 +4738,52 @@ namespace CalamityMod.CalPlayer
}
#endregion
}
#region Dragon Scale Logic
public override void PostBuyItem(NPC vendor, Item[] shopInventory, Item item)
{
if (item.type == mod.ItemType("DragonScales") && !CalamityWorld.dragonScalesBought)
{
CalamityWorld.dragonScalesBought = true;
}
}
public override bool CanBuyItem(NPC vendor, Item[] shopInventory, Item item)
{
if (item.type == mod.ItemType("DragonScales"))
{
return !CalamityWorld.dragonScalesBought;
}
return base.CanBuyItem(vendor, shopInventory, item);
}
#endregion
public override void PostUpdateRunSpeeds()
{
#region SpeedBoosts
float runAccMult = 1f +
(shadowSpeed ? 0.5f : 0f) +
((stressPills || laudanum || draedonsHeart) ? 0.05f : 0f) +
((abyssalDivingSuit && Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) ? 0.05f : 0f) +
(sirenWaterBuff ? 0.15f : 0f) +
((frostFlare && player.statLife < (int)((double)player.statLifeMax2 * 0.25)) ? 0.15f : 0f) +
(shadowSpeed ? 0.5f : 0f) +
(auricSet ? 0.1f : 0f) +
(silvaSet ? 0.05f : 0f) +
(dragonScales ? 0.1f : 0f) +
(cTracers ? 0.1f : 0f) +
(silvaSet ? 0.05f : 0f) +
(eTracers ? 0.05f : 0f) +
(blueCandle ? 0.05f : 0f) +
((deepDiver && Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) ? 0.15f : 0f) +
(rogueStealthMax > 0f ? (rogueStealth >= rogueStealthMax ? rogueStealth * 0.05f : rogueStealth * 0.025f) : 0f);
float runSpeedMult = 1f +
((stressPills || laudanum || draedonsHeart) ? 0.05f : 0f) +
((abyssalDivingSuit && Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) ? 0.05f : 0f) +
(sirenWaterBuff ? 0.15f : 0f) +
((frostFlare && player.statLife < (int)((double)player.statLifeMax2 * 0.25)) ? 0.15f : 0f) +
(shadowSpeed ? 0.5f : 0f) +
((abyssalDivingSuit && Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) ? 0.05f : 0f) +
((frostFlare && player.statLife < (int)((double)player.statLifeMax2 * 0.25)) ? 0.15f : 0f) +
(sirenWaterBuff ? 0.15f : 0f) +
(auricSet ? 0.1f : 0f) +
(silvaSet ? 0.05f : 0f) +
(dragonScales ? 0.1f : 0f) +
(cTracers ? 0.1f : 0f) +
(silvaSet ? 0.05f : 0f) +
(eTracers ? 0.05f : 0f) +
((stressPills || laudanum || draedonsHeart) ? 0.05f : 0f) +
((deepDiver && Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) ? 0.15f : 0f) +
(rogueStealthMax > 0f ? (rogueStealth >= rogueStealthMax ? rogueStealth * 0.05f : rogueStealth * 0.025f) : 0f);
+4 -1
View File
@@ -39,6 +39,7 @@ namespace CalamityMod
public static ModHotKey AstralArcanumUIHotkey;
public static ModHotKey BossBarToggleHotKey;
public static ModHotKey BossBarToggleSmallTextHotKey;
public static ModHotKey MomentumCapacitatorHotkey;
// Boss Spawners
public static int ghostKillCount = 0;
@@ -122,6 +123,7 @@ namespace CalamityMod
TarraHotKey = RegisterHotKey("Armor Set Bonus", "Y");
AstralTeleportHotKey = RegisterHotKey("Astral Teleport", "P");
AstralArcanumUIHotkey = RegisterHotKey("Astral Arcanum UI Toggle", "O");
MomentumCapacitatorHotkey = RegisterHotKey("Momentom Capacitater Effect", "U");
BossBarToggleHotKey = RegisterHotKey("Boss Health Bar Toggle", "NumPad0");
BossBarToggleSmallTextHotKey = RegisterHotKey("Boss Health Bar Small Text Toggle", "NumPad1");
@@ -207,6 +209,7 @@ namespace CalamityMod
TarraHotKey = null;
AstralTeleportHotKey = null;
AstralArcanumUIHotkey = null;
MomentumCapacitatorHotkey = null;
BossBarToggleHotKey = null;
BossBarToggleSmallTextHotKey = null;
@@ -2756,7 +2759,7 @@ namespace CalamityMod
#endregion
#region Seasons
public static Season season
public static Season CurrentSeason
{
get
{
+34
View File
@@ -0,0 +1,34 @@
using CalamityMod.CalPlayer;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
{
public class DragonScales : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Dragon Scales");
Tooltip.SetDefault("Causes all rogue projectiles to emit a slow fireball as it travels\n" +
"Stealth strikes create infernados on death\n" +
"After Yharon is dead, you are granted 10% movement speed and acceleration\n" +
"'Only a living dragon holds true treasure'");
}
public override void SetDefaults()
{
item.width = 32;
item.height = 34;
item.value = Item.buyPrice(0, 90, 0, 0);
item.rare = 10;
item.Calamity().postMoonLordRarity = 15;
item.accessory = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.dragonScales = true;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 721 B

+31
View File
@@ -0,0 +1,31 @@
using CalamityMod.CalPlayer;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
{
public class GloveOfPrecicion : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Glove Of Precision");
Tooltip.SetDefault("Decreases rogue speed by 20% but increase damage and crit by 12% and velocity by 25%");
}
public override void SetDefaults()
{
item.width = 24;
item.height = 40;
item.value = Item.buyPrice(0, 50, 0, 0);
item.accessory = true;
item.rare = 8;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.gloveOfPrecision = true;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B

+34
View File
@@ -0,0 +1,34 @@
using CalamityMod.CalPlayer;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Accessories
{
public class MomentumCapacitor : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Momentum Capacitor");
Tooltip.SetDefault("Pressing U, for the cost of 25% of max stealth, causes an energy field to appear at the cursor position\n" +
"Rogue projectiles that enter the field get a constant acceleration and 15% damage boost\n" +
"These boosts can only happen to a projectile once\n" +
"There can only be one field");
}
public override void SetDefaults()
{
item.width = 28;
item.height = 32;
item.value = Item.buyPrice(0, 60, 0, 0);
item.accessory = true;
item.rare = 6;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.momentumCapacitor = true;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 445 B

+1 -1
View File
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Accessories
item.width = 24;
item.height = 26;
item.rare = 3;
item.value = Item.buyPrice(0, 40, 0, 0);
item.value = Item.buyPrice(0, 10, 0, 0);
item.accessory = true;
}
-1
View File
@@ -85,7 +85,6 @@ namespace CalamityMod.Items.Accessories
plagueCounter++;
if (plagueCounter >= 180)
{
plagueCounter = 0;
}
}
}
+1 -3
View File
@@ -148,7 +148,6 @@ namespace CalamityMod.Items.Accessories
seaCounter++;
if (seaCounter >= 180)
{
seaCounter = 0;
}
if (FireCountdown == 0)
{
@@ -172,8 +171,7 @@ namespace CalamityMod.Items.Accessories
{
Vector2 spawn = baseSpawn;
spawn.X = spawn.X + i * 30 - (FireProjectiles * 15);
Vector2 velocity = baseVelocity;
velocity = baseVelocity.RotatedBy(MathHelper.ToRadians(-FireAngleSpread / 2 + (FireAngleSpread * i / (float)FireProjectiles)));
Vector2 velocity = baseVelocity.RotatedBy(MathHelper.ToRadians(-FireAngleSpread / 2 + (FireAngleSpread * i / (float)FireProjectiles)));
velocity.X = velocity.X + 3 * Main.rand.NextFloat() - 1.5f;
int projectile = Projectile.NewProjectile(spawn.X, spawn.Y, velocity.X, velocity.Y, mod.ProjectileType("BrimstoneHellfireballFriendly2"), 2000, 5f, Main.myPlayer, 0f, 0f);
Main.projectile[projectile].tileCollide = false;
+1 -2
View File
@@ -112,8 +112,7 @@ namespace CalamityMod.Items.Accessories
{
Vector2 spawn = baseSpawn;
spawn.X = spawn.X + i * 30 - (FireProjectiles * 15);
Vector2 velocity = baseVelocity;
velocity = baseVelocity.RotatedBy(MathHelper.ToRadians(-FireAngleSpread / 2 + (FireAngleSpread * i / (float)FireProjectiles)));
Vector2 velocity = baseVelocity.RotatedBy(MathHelper.ToRadians(-FireAngleSpread / 2 + (FireAngleSpread * i / (float)FireProjectiles)));
velocity.X = velocity.X + 3 * Main.rand.NextFloat() - 1.5f;
int projectile = Projectile.NewProjectile(spawn.X, spawn.Y, velocity.X, velocity.Y, mod.ProjectileType("BrimstoneHellfireballFriendly2"), 70, 5f, Main.myPlayer, 0f, 0f);
Main.projectile[projectile].tileCollide = false;
-3
View File
@@ -50,12 +50,9 @@ namespace CalamityMod.Items.Amidias
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
num79 = 0f;
num80 = num72;
}
else
{
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

+1 -2
View File
@@ -50,8 +50,7 @@ namespace CalamityMod.Items.BrimstoneWaifu
{
Vector2 spawn = baseSpawn;
spawn.X = spawn.X + i * 30 - (FireProjectiles * 15);
Vector2 velocity = baseVelocity;
velocity = baseVelocity.RotatedBy(MathHelper.ToRadians(-FireAngleSpread / 2 + (FireAngleSpread * i / (float)FireProjectiles)));
Vector2 velocity = baseVelocity.RotatedBy(MathHelper.ToRadians(-FireAngleSpread / 2 + (FireAngleSpread * i / (float)FireProjectiles)));
velocity.X = velocity.X + 3 * Main.rand.NextFloat() - 1.5f;
int projectile = Projectile.NewProjectile(spawn.X, spawn.Y, velocity.X, velocity.Y, mod.ProjectileType("BrimstoneHellfireballFriendly2"), 54, 5f, Main.myPlayer, 0f, 0f);
Main.projectile[projectile].tileCollide = false;
@@ -0,0 +1,76 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.CalamityCustomThrowingDamage
{
public class BlazingStar : CalamityDamageItem
{
public static int BaseDamage = 34;
public static float Speed = 9f;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Blazing Star");
Tooltip.SetDefault("Stacks up to 3\n" +
"Stealth Strike Effect: Releases all stars at once with infinite peircing");
}
public override void SafeSetDefaults()
{
item.damage = BaseDamage;
item.crit = 4;
item.Calamity().rogue = true;
item.noMelee = true;
item.noUseGraphic = true;
item.width = 1;
item.height = 1;
item.useTime = 15;
item.useAnimation = 15;
item.useStyle = 1;
item.knockBack = 4f;
item.value = Item.buyPrice(0, 3, 0, 0);
item.rare = 4;
item.UseSound = SoundID.Item1;
item.maxStack = 3;
item.shootSpeed = Speed;
item.shoot = mod.ProjectileType("BlazingStarProj");
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
if (player.Calamity().StealthStrikeAvailable())
{
if (item.stack != 1)
{
for (int i = 0; i < item.stack; i++)
{
Vector2 perturbedSpeed = new Vector2(speedX, speedY).RotatedBy(MathHelper.Lerp(-MathHelper.ToRadians(8f), MathHelper.ToRadians(8f), i / (float)(item.stack - 1)));
Projectile.NewProjectile(position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, i == 1 ? type : mod.ProjectileType("BlazingStarProj"), damage, knockBack, player.whoAmI, 0f, 0f);
int projectileIndex = Projectile.NewProjectile(position, perturbedSpeed, type, damage, knockBack, player.whoAmI, 0f);
Main.projectile[projectileIndex].penetrate = -1;
}
return false;
}
return true;
}
return true;
}
public override bool CanUseItem(Player player)
{
return player.ownedProjectileCounts[item.shoot] < item.stack;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(null, "Glaive", 1);
recipe.AddIngredient(ItemID.HellstoneBar, 3);
recipe.AddIngredient(null, "EssenceofChaos", 4);
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 593 B

@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
@@ -32,7 +33,14 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage
{
crit = item.crit + player.Calamity().throwingCrit;
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (player.Calamity().gloveOfPrecision)
{
item.useTime = (int)(item.useTime * 0.8f);
item.useAnimation = (int)(item.useAnimation * 0.8f);
}
}
// Not needed because the weapon is now internally thrown instead of ranged
/*
public override void GetWeaponKnockback(Player player, ref float knockback)
@@ -30,7 +30,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage
item.rare = 10;
item.UseSound = SoundID.Item71;
item.autoReuse = true;
item.value = Item.buyPrice(platinum: 2); //sell price of 40 gold
item.value = Item.buyPrice(platinum: 1); //sell price of 20 gold
item.shoot = mod.ProjectileType("CelestialReaperProjectile");
item.shootSpeed = 20f;
item.Calamity().rogue = true;
@@ -6,7 +6,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage
{
public class Cinquedea : CalamityDamageItem
{
public static int BaseDamage = 16;
public static int BaseDamage = 36;
public static float Knockback = 5f;
public static float Speed = 8f;
@@ -33,7 +33,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage
item.noUseGraphic = true;
item.shoot = mod.ProjectileType("CinquedeaProj");
item.shootSpeed = Speed;
item.value = Item.buyPrice(0, 9, 0, 0);
item.value = Item.buyPrice(0, 4, 0, 0);
item.Calamity().rogue = true;
}
@@ -48,7 +48,6 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
@@ -0,0 +1,70 @@
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.CalamityCustomThrowingDamage
{
public class EnchantedAxe : CalamityDamageItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Enchanted Axe");
Tooltip.SetDefault("Throws a high velocity axe that returns to you after travelling a short distance or hitting a wall\n" +
"At the furthest point from the player, a magical axe that travels through walls will be cast towards the nearest enemy\n" +
"Stealth Strike Effect: The axe flies further, throwing out many other magical axes in all directions");
}
public override void SafeSetDefaults()
{
item.width = 40;
item.damage = 25;
item.noMelee = true;
item.noUseGraphic = true;
item.useAnimation = 15;
item.useStyle = 1;
item.useTime = 15;
item.knockBack = 1f;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
item.height = 36;
item.maxStack = 1;
item.value = 1000;
item.rare = 3;
item.shoot = mod.ProjectileType("EnchantedAxe");
item.shootSpeed = 30f;
item.Calamity().rogue = true;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
if (player.Calamity().StealthStrikeAvailable())
{
int p = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0f, 1f);
Main.projectile[p].Calamity().stealthStrike = true;
return false;
}
return true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(mod.ItemType("IronFrancisca"), 100);
recipe.AddIngredient(ItemID.FallenStar, 5);
recipe.AddIngredient(mod.ItemType("VictoryShard"), 10);
recipe.AddIngredient(ItemID.Bone, 30);
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this, 1);
recipe.AddRecipe();
recipe = new ModRecipe(mod);
recipe.AddIngredient(mod.ItemType("LeadTomahawk"), 100);
recipe.AddIngredient(ItemID.FallenStar, 5);
recipe.AddIngredient(mod.ItemType("VictoryShard"), 10);
recipe.AddIngredient(ItemID.Bone, 30);
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this, 1);
recipe.AddRecipe();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

+2 -2
View File
@@ -6,7 +6,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage
{
public class Glaive : CalamityDamageItem
{
public static int BaseDamage = 23;
public static int BaseDamage = 50;
public static float Knockback = 3f;
public static float Speed = 10f;
public static float StealthSpeedMult = 1.8f;
@@ -31,7 +31,7 @@ Stealth strikes are super fast and pierce infinitely");
item.useAnimation = 15;
item.useStyle = 1;
item.knockBack = Knockback;
item.value = Item.buyPrice(0, 3, 0, 0);
item.value = Item.buyPrice(0, 4, 0, 0);
item.rare = 3;
item.UseSound = SoundID.Item1;
item.maxStack = 3;
+1 -1
View File
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage
item.knockBack = 12;
item.thrown = true;
item.crit = 16;
item.value = Item.buyPrice(0, 10, 0, 0);
item.value = Item.buyPrice(0, 4, 0, 0);
item.rare = 3;
item.useTime = 25;
item.useAnimation = 25;
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage
public override void SafeSetDefaults()
{
item.damage = 270;
item.damage = 50;
item.knockBack = 4;
item.crit = 18;
item.noMelee = true;
@@ -29,8 +29,8 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage
item.UseSound = SoundID.Item1;
item.useTime = 30;
item.useAnimation = 30;
item.rare = 7;
item.value = Item.buyPrice(0, 0, 4, 0);
item.value = Item.buyPrice(0, 0, 1, 0);
item.rare = 3;
item.shootSpeed = 10.5f;
item.shoot = mod.ProjectileType("MonkeyDart");
item.autoReuse = true;
@@ -48,7 +48,6 @@ namespace CalamityMod.Items.CalamityCustomThrowingDamage
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
-1
View File
@@ -85,7 +85,6 @@ namespace CalamityMod.Items.Leviathan
seaCounter++;
if (seaCounter >= 180)
{
seaCounter = 0;
}
}
}
-2
View File
@@ -80,8 +80,6 @@ Fighting 'til the war's won");
if ((float.IsNaN(mouseDX) && float.IsNaN(mouseDY)) || (mouseDX == 0f && mouseDY == 0f))
{
mouseDX = (float)player.direction;
mouseDY = 0f;
mouseDist = laserSpeed;
}
else
{
+1 -1
View File
@@ -102,7 +102,7 @@ namespace CalamityMod.Items.Patreon
for (int i = 0; i < dustCount; ++i)
{
// Pick a random dust to spawn
int dustID = -1;
int dustID;
switch (Main.rand.Next(5))
{
case 0:
-2
View File
@@ -50,8 +50,6 @@ namespace CalamityMod.Items.Patreon
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
num79 = 0f;
num80 = num72;
}
else
{
-2
View File
@@ -38,8 +38,6 @@ namespace CalamityMod.Items.Patreon
int num6 = Main.rand.Next(2, 5);
for (int index = 0; index < num6; ++index)
{
float num7 = speedX;
float num8 = speedY;
float SpeedX = speedX + (float)Main.rand.Next(-50, 51) * 0.05f;
float SpeedY = speedY + (float)Main.rand.Next(-50, 51) * 0.05f;
Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, (int)(double)damage, knockBack, player.whoAmI, 0.0f, 0.0f);
-1
View File
@@ -51,7 +51,6 @@ namespace CalamityMod.Items.Patreon
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
-1
View File
@@ -66,7 +66,6 @@ namespace CalamityMod.Items.PlaguebringerGoliath
bloomCounter++;
if (bloomCounter >= 180)
{
bloomCounter = 0;
}
if (player.whoAmI == Main.myPlayer && player.velocity.Y == 0f && player.grappling[0] == -1)
{
-1
View File
@@ -60,7 +60,6 @@ namespace CalamityMod.Items.PlaguebringerGoliath
plagueCounter++;
if (plagueCounter >= 180)
{
plagueCounter = 0;
}
}
}
+1 -2
View File
@@ -49,8 +49,7 @@ namespace CalamityMod.Items.SunkenSea
{
Vector2 spawn = baseSpawn;
spawn.X = spawn.X + i * 30 - (ShardProjectiles * 15);
Vector2 velocity = baseVelocity;
velocity = baseVelocity.RotatedBy(MathHelper.ToRadians(-ShardAngleSpread / 2 + (ShardAngleSpread * i / (float)ShardProjectiles)));
Vector2 velocity = baseVelocity.RotatedBy(MathHelper.ToRadians(-ShardAngleSpread / 2 + (ShardAngleSpread * i / (float)ShardProjectiles)));
velocity.X = velocity.X + 3 * Main.rand.NextFloat() - 1.5f;
int type = 0;
int damage = 0;
@@ -48,8 +48,6 @@ namespace CalamityMod.Items.Weapons.AbyssWeapons
int num6 = Main.rand.Next(25, 36);
for (int index = 0; index < num6; ++index)
{
float num7 = speedX;
float num8 = speedY;
float SpeedX = speedX + (float)Main.rand.Next(-10, 11) * 0.05f;
float SpeedY = speedY + (float)Main.rand.Next(-10, 11) * 0.05f;
int shot = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 0.0f, 0.0f);
-4
View File
@@ -34,13 +34,9 @@ namespace CalamityMod.Items.Weapons.AbyssWeapons
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)
{
float SpeedA = speedX;
float SpeedB = speedY;
int num6 = Main.rand.Next(2, 4);
for (int index = 0; index < num6; ++index)
{
float num7 = speedX;
float num8 = speedY;
float SpeedX = speedX + (float)Main.rand.Next(-40, 41) * 0.05f;
float SpeedY = speedY + (float)Main.rand.Next(-40, 41) * 0.05f;
float ai1 = Main.rand.NextFloat() + 0.5f;
@@ -49,8 +49,6 @@ namespace CalamityMod.Items.Weapons.AbyssWeapons
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
num79 = 0f;
num80 = num72;
}
else
{
+1 -3
View File
@@ -44,7 +44,6 @@ namespace CalamityMod.Items.Weapons
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
@@ -55,8 +54,7 @@ namespace CalamityMod.Items.Weapons
{
num80 = num72 / num80;
}
num78 *= num80;
num79 *= num80;
vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f);
vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201);
vector2.Y -= (float)100;
-3
View File
@@ -46,12 +46,9 @@ namespace CalamityMod.Items.Weapons
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
num79 = 0f;
num80 = num72;
}
else
{
+1 -3
View File
@@ -55,7 +55,6 @@ namespace CalamityMod.Items.Weapons
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
@@ -66,8 +65,7 @@ namespace CalamityMod.Items.Weapons
{
num80 = num72 / num80;
}
num78 *= num80;
num79 *= num80;
int num107 = 2;
for (int num108 = 0; num108 < num107; num108++)
{
+1 -3
View File
@@ -66,7 +66,6 @@ namespace CalamityMod.Items.Weapons
num79 = Main.screenPosition.Y + (float)Main.screenHeight + (float)Main.mouseY + vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
@@ -77,8 +76,7 @@ namespace CalamityMod.Items.Weapons
{
num80 = num72 / num80;
}
num78 *= num80;
num79 *= num80;
int num107 = 4;
for (int num108 = 0; num108 < num107; num108++)
{
+1 -3
View File
@@ -64,7 +64,6 @@ namespace CalamityMod.Items.Weapons
num79 = Main.screenPosition.Y + (float)Main.screenHeight + (float)Main.mouseY + vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
@@ -75,8 +74,7 @@ namespace CalamityMod.Items.Weapons
{
num80 = num72 / num80;
}
num78 *= num80;
num79 *= num80;
int num107 = 4;
for (int num108 = 0; num108 < num107; num108++)
{
+1 -3
View File
@@ -57,7 +57,6 @@ namespace CalamityMod.Items.Weapons
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
@@ -68,8 +67,7 @@ namespace CalamityMod.Items.Weapons
{
num80 = num72 / num80;
}
num78 *= num80;
num79 *= num80;
vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (-(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f);
vector2.X = (vector2.X + player.Center.X) / 2f;
vector2.Y -= 100f;
+1 -3
View File
@@ -57,7 +57,6 @@ namespace CalamityMod.Items.Weapons
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
@@ -68,8 +67,7 @@ namespace CalamityMod.Items.Weapons
{
num80 = num72 / num80;
}
num78 *= num80;
num79 *= num80;
int num112 = 3;
for (int num113 = 0; num113 < num112; num113++)
{
-4
View File
@@ -40,13 +40,9 @@ namespace CalamityMod.Items.Weapons
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)
{
float SpeedA = speedX;
float SpeedB = speedY;
int num6 = Main.rand.Next(2, 3);
for (int index = 0; index < num6; ++index)
{
float num7 = speedX;
float num8 = speedY;
float SpeedX = speedX + (float)Main.rand.Next(-10, 11) * 0.05f;
float SpeedY = speedY + (float)Main.rand.Next(-10, 11) * 0.05f;
Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, (int)(double)damage, knockBack, player.whoAmI, 0.0f, 0.0f);
@@ -49,7 +49,6 @@ namespace CalamityMod.Items.Weapons.Calamitas
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
+1 -5
View File
@@ -44,7 +44,6 @@ namespace CalamityMod.Items.Weapons
num79 = Main.screenPosition.Y + (float)Main.screenHeight + (float)Main.mouseY + vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
@@ -55,8 +54,7 @@ namespace CalamityMod.Items.Weapons
{
num80 = num72 / num80;
}
num78 *= num80;
num79 *= num80;
int num107 = 3;
for (int num108 = 0; num108 < num107; num108++)
{
@@ -75,8 +73,6 @@ namespace CalamityMod.Items.Weapons
}
num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
num80 = num72 / num80;
num78 *= num80;
num79 *= num80;
switch (Main.rand.Next(3))
{
case 0:
-2
View File
@@ -47,12 +47,10 @@ namespace CalamityMod.Items.Weapons
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
num79 = 0f;
num80 = num72;
}
else
{
+1 -3
View File
@@ -63,7 +63,6 @@ namespace CalamityMod.Items.Weapons
num79 = Main.screenPosition.Y + (float)Main.screenHeight + (float)Main.mouseY + vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
@@ -74,8 +73,7 @@ namespace CalamityMod.Items.Weapons
{
num80 = num72 / num80;
}
num78 *= num80;
num79 *= num80;
int num130 = 15;
if (Main.rand.NextBool(3))
{
+1 -3
View File
@@ -47,7 +47,6 @@ namespace CalamityMod.Items.Weapons
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
@@ -58,8 +57,7 @@ namespace CalamityMod.Items.Weapons
{
num80 = num72 / num80;
}
num78 *= num80;
num79 *= num80;
int num112 = 3;
for (int num113 = 0; num113 < num112; num113++)
{
+1 -3
View File
@@ -65,7 +65,6 @@ namespace CalamityMod.Items.Weapons
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
@@ -76,8 +75,7 @@ namespace CalamityMod.Items.Weapons
{
num80 = num72 / num80;
}
num78 *= num80;
num79 *= num80;
for (int num108 = 0; num108 < num6; num108++)
{
vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f);
-2
View File
@@ -66,11 +66,9 @@ namespace CalamityMod.Items.Weapons
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
num79 = 0f;
num80 = item.shootSpeed;
}
else
+1 -3
View File
@@ -74,7 +74,6 @@ namespace CalamityMod.Items.Weapons
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
@@ -85,8 +84,7 @@ namespace CalamityMod.Items.Weapons
{
num80 = num72 / num80;
}
num78 *= num80;
num79 *= num80;
for (int num108 = 0; num108 < 2; num108++)
{
vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f);
-3
View File
@@ -47,12 +47,9 @@ namespace CalamityMod.Items.Weapons
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
num79 = 0f;
num80 = num72;
}
else
{
+1 -3
View File
@@ -49,7 +49,6 @@ namespace CalamityMod.Items.Weapons.Crabulon
num79 = Main.screenPosition.Y + (float)Main.screenHeight + (float)Main.mouseY + vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
@@ -60,8 +59,7 @@ namespace CalamityMod.Items.Weapons.Crabulon
{
num80 = num72 / num80;
}
num78 *= num80;
num79 *= num80;
int num107 = 3;
for (int num108 = 0; num108 < num107; num108++)
{
+1 -5
View File
@@ -45,7 +45,6 @@ namespace CalamityMod.Items.Weapons.Cryogen
num79 = Main.screenPosition.Y + (float)Main.screenHeight + (float)Main.mouseY + vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
@@ -56,8 +55,7 @@ namespace CalamityMod.Items.Weapons.Cryogen
{
num80 = num72 / num80;
}
num78 *= num80;
num79 *= num80;
int num107 = 2;
for (int num108 = 0; num108 < num107; num108++)
{
@@ -76,8 +74,6 @@ namespace CalamityMod.Items.Weapons.Cryogen
}
num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
num80 = num72 / num80;
num78 *= num80;
num79 *= num80;
Projectile.NewProjectile(vector2.X, vector2.Y, 0f, 0f, mod.ProjectileType("IceBombFriendly"), (int)((float)item.damage * player.meleeDamage), num74, i, 0f, (float)Main.rand.Next(3));
}
}
-4
View File
@@ -44,12 +44,8 @@ namespace CalamityMod.Items.Weapons.Cryogen
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
float SpeedA = speedX;
float SpeedB = speedY;
for (int index = 0; index < 2; ++index)
{
float num7 = speedX;
float num8 = speedY;
float SpeedX = speedX + (float)Main.rand.Next(-30, 31) * 0.05f;
float SpeedY = speedY + (float)Main.rand.Next(-30, 31) * 0.05f;
Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, mod.ProjectileType("MistArrow"), damage, knockBack, player.whoAmI, 0f, 0f);
+1 -3
View File
@@ -60,7 +60,6 @@ namespace CalamityMod.Items.Weapons
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
@@ -71,8 +70,7 @@ namespace CalamityMod.Items.Weapons
{
num80 = num72 / num80;
}
num78 *= num80;
num79 *= num80;
int num107 = 4;
for (int num108 = 0; num108 < num107; num108++)
{
+1 -3
View File
@@ -54,7 +54,6 @@ namespace CalamityMod.Items.Weapons
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
@@ -65,8 +64,7 @@ namespace CalamityMod.Items.Weapons
{
num80 = num72 / num80;
}
num78 *= num80;
num79 *= num80;
int num107 = 3;
for (int num108 = 0; num108 < num107; num108++)
{
@@ -62,7 +62,6 @@ namespace CalamityMod.Items.Weapons.DevourerofGods
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
@@ -73,8 +72,7 @@ namespace CalamityMod.Items.Weapons.DevourerofGods
{
num80 = num72 / num80;
}
num78 *= num80;
num79 *= num80;
int num107 = 2;
for (int num108 = 0; num108 < num107; num108++)
{
@@ -44,13 +44,9 @@ namespace CalamityMod.Items.Weapons.DevourerofGods
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
float SpeedA = speedX;
float SpeedB = speedY;
int num6 = Main.rand.Next(4, 6);
for (int index = 0; index < num6; ++index)
{
float num7 = speedX;
float num8 = speedY;
float SpeedX = speedX + (float)Main.rand.Next(-20, 21) * 0.05f;
float SpeedY = speedY + (float)Main.rand.Next(-20, 21) * 0.05f;
if (type == ProjectileID.WoodenArrowFriendly)
+1 -3
View File
@@ -48,7 +48,6 @@ namespace CalamityMod.Items.Weapons
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
@@ -59,8 +58,7 @@ namespace CalamityMod.Items.Weapons
{
num80 = num72 / num80;
}
num78 *= num80;
num79 *= num80;
int num107 = 3;
for (int num108 = 0; num108 < num107; num108++)
{
-1
View File
@@ -48,7 +48,6 @@ namespace CalamityMod.Items.Weapons
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
-2
View File
@@ -81,8 +81,6 @@ namespace CalamityMod.Items.Weapons
int num6 = Main.rand.Next(1, 3);
for (int index = 0; index < num6; ++index)
{
float num7 = speedX;
float num8 = speedY;
float SpeedX = speedX + (float)Main.rand.Next(-40, 41) * 0.05f;
float SpeedY = speedY + (float)Main.rand.Next(-40, 41) * 0.05f;
int projectile = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 0.0f, 0.0f);
+1 -3
View File
@@ -61,7 +61,6 @@ namespace CalamityMod.Items.Weapons
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
@@ -72,8 +71,7 @@ namespace CalamityMod.Items.Weapons
{
num80 = num72 / num80;
}
num78 *= num80;
num79 *= num80;
int num107 = 5;
for (int num108 = 0; num108 < num107; num108++)
{
-4
View File
@@ -35,12 +35,8 @@ namespace CalamityMod.Items.Weapons
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
Main.PlaySound(2, (int)player.position.X, (int)player.position.Y, 20);
float SpeedA = speedX;
float SpeedB = speedY;
for (int index = 0; index < 3; ++index)
{
float num7 = speedX;
float num8 = speedY;
float SpeedX = speedX + (float)Main.rand.Next(-40, 41) * 0.05f;
float SpeedY = speedY + (float)Main.rand.Next(-40, 41) * 0.05f;
switch (index)
+1 -3
View File
@@ -56,7 +56,6 @@ namespace CalamityMod.Items.Weapons
num79 = Main.screenPosition.Y + (float)Main.screenHeight + (float)Main.mouseY + vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
@@ -67,8 +66,7 @@ namespace CalamityMod.Items.Weapons
{
num80 = num72 / num80;
}
num78 *= num80;
num79 *= num80;
int num130 = 7;
if (Main.rand.NextBool(6))
{
-2
View File
@@ -36,8 +36,6 @@ namespace CalamityMod.Items.Weapons
{
for (int index = 0; index < 2; ++index)
{
float num7 = speedX;
float num8 = speedY;
float SpeedX = speedX + (float)Main.rand.Next(-10, 11) * 0.05f;
float SpeedY = speedY + (float)Main.rand.Next(-10, 11) * 0.05f;
Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 0f, 0f);
-1
View File
@@ -44,7 +44,6 @@ namespace CalamityMod.Items.Weapons.HiveMind
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
+1 -3
View File
@@ -57,7 +57,6 @@ namespace CalamityMod.Items.Weapons.HiveMind
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
@@ -68,8 +67,7 @@ namespace CalamityMod.Items.Weapons.HiveMind
{
num80 = num72 / num80;
}
num78 *= num80;
num79 *= num80;
int num107 = 10;
for (int num108 = 0; num108 < num107; num108++)
{
+1 -3
View File
@@ -61,7 +61,6 @@ namespace CalamityMod.Items.Weapons
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
@@ -72,8 +71,7 @@ namespace CalamityMod.Items.Weapons
{
num80 = num72 / num80;
}
num78 *= num80;
num79 *= num80;
int num107 = 1;
for (int num108 = 0; num108 < num107; num108++)
{
-2
View File
@@ -70,8 +70,6 @@ namespace CalamityMod.Items.Weapons
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
num79 = 0f;
num80 = num72;
}
else
{
+1 -3
View File
@@ -57,7 +57,6 @@ namespace CalamityMod.Items.Weapons
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
@@ -68,8 +67,7 @@ namespace CalamityMod.Items.Weapons
{
num80 = num72 / num80;
}
num78 *= num80;
num79 *= num80;
int num107 = 3;
for (int num108 = 0; num108 < num107; num108++)
{
+1 -3
View File
@@ -57,7 +57,6 @@ namespace CalamityMod.Items.Weapons.Leviathan
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
@@ -68,8 +67,7 @@ namespace CalamityMod.Items.Weapons.Leviathan
{
num80 = num72 / num80;
}
num78 *= num80;
num79 *= num80;
int num107 = 4;
for (int num108 = 0; num108 < num107; num108++)
{
-4
View File
@@ -43,13 +43,9 @@ namespace CalamityMod.Items.Weapons
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
float SpeedA = speedX;
float SpeedB = speedY;
int num6 = Main.rand.Next(1, 3);
for (int index = 0; index < num6; ++index)
{
float num7 = speedX;
float num8 = speedY;
float SpeedX = speedX + (float)Main.rand.Next(-15, 16) * 0.05f;
float SpeedY = speedY + (float)Main.rand.Next(-15, 16) * 0.05f;
switch (Main.rand.Next(3))
-2
View File
@@ -45,12 +45,10 @@ namespace CalamityMod.Items.Weapons
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
num79 = 0f;
num80 = num72;
}
else
{
+1 -3
View File
@@ -57,7 +57,6 @@ namespace CalamityMod.Items.Weapons.Perforators
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
@@ -68,8 +67,7 @@ namespace CalamityMod.Items.Weapons.Perforators
{
num80 = num72 / num80;
}
num78 *= num80;
num79 *= num80;
int num107 = 2;
if (Main.rand.NextBool(3))
{
+1 -3
View File
@@ -52,7 +52,6 @@ namespace CalamityMod.Items.Weapons
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
@@ -63,8 +62,7 @@ namespace CalamityMod.Items.Weapons
{
num80 = num72 / num80;
}
num78 *= num80;
num79 *= num80;
vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f);
vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201);
vector2.Y -= 100f;
-1
View File
@@ -57,7 +57,6 @@ namespace CalamityMod.Items.Weapons.Polterghast
num83 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - position.Y;
}
float num84 = (float)Math.Sqrt((double)(num82 * num82 + num83 * num83));
float num85 = num84;
if ((float.IsNaN(num82) && float.IsNaN(num83)) || (num82 == 0f && num83 == 0f))
{
num82 = (float)player.direction;
@@ -50,7 +50,6 @@ namespace CalamityMod.Items.Weapons.Polterghast
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
-1
View File
@@ -46,7 +46,6 @@ namespace CalamityMod.Items.Weapons.Polterghast
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
-2
View File
@@ -38,8 +38,6 @@ namespace CalamityMod.Items.Weapons.RareVariants
{
for (int i = 0; i < 3; i++)
{
float num7 = speedX;
float num8 = speedY;
float SpeedX = speedX + (float)Main.rand.Next(-20, 21) * 0.05f;
float SpeedY = speedY + (float)Main.rand.Next(-20, 21) * 0.05f;
int proj = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 0f, 0f);
-2
View File
@@ -37,8 +37,6 @@ namespace CalamityMod.Items.Weapons.RareVariants
{
for (int index = 0; index < 3; ++index)
{
float num7 = speedX;
float num8 = speedY;
float SpeedX = speedX + (float)Main.rand.Next(-15, 16) * 0.05f;
float SpeedY = speedY + (float)Main.rand.Next(-15, 16) * 0.05f;
Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, ProjectileID.ExplosiveBullet, damage, knockBack, player.whoAmI, 0f, 0f);
+1 -3
View File
@@ -60,7 +60,6 @@ namespace CalamityMod.Items.Weapons.RareVariants
num79 = Main.screenPosition.Y + (float)Main.screenHeight + (float)Main.mouseY + vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
@@ -71,8 +70,7 @@ namespace CalamityMod.Items.Weapons.RareVariants
{
num80 = num72 / num80;
}
num78 *= num80;
num79 *= num80;
int num107 = 16;
for (int num108 = 0; num108 < num107; num108++)
{
@@ -59,7 +59,6 @@ namespace CalamityMod.Items.Weapons.RareVariants
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
@@ -70,8 +69,7 @@ namespace CalamityMod.Items.Weapons.RareVariants
{
num80 = num72 / num80;
}
num78 *= num80;
num79 *= num80;
for (int num108 = 0; num108 < bulletAmt; num108++)
{
vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f);
-2
View File
@@ -47,12 +47,10 @@ namespace CalamityMod.Items.Weapons.RareVariants
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
num79 = 0f;
num80 = num72;
}
else
{
+1 -3
View File
@@ -61,7 +61,6 @@ namespace CalamityMod.Items.Weapons
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
@@ -72,8 +71,7 @@ namespace CalamityMod.Items.Weapons
{
num80 = num72 / num80;
}
num78 *= num80;
num79 *= num80;
int num107 = 3;
for (int num108 = 0; num108 < num107; num108++)
{
-1
View File
@@ -48,7 +48,6 @@ namespace CalamityMod.Items.Weapons
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
-4
View File
@@ -34,13 +34,9 @@ namespace CalamityMod.Items.Weapons
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)
{
float SpeedA = speedX;
float SpeedB = speedY;
int num6 = Main.rand.Next(1, 3);
for (int index = 0; index < num6; ++index)
{
float num7 = speedX;
float num8 = speedY;
float SpeedX = speedX + (float)Main.rand.Next(-40, 41) * 0.05f;
float SpeedY = speedY + (float)Main.rand.Next(-40, 41) * 0.05f;
Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, (int)(double)damage, knockBack, player.whoAmI, 0.0f, 0.0f);
-4
View File
@@ -54,8 +54,6 @@ namespace CalamityMod.Items.Weapons
{
for (int index = 0; index < bulletAmt; ++index)
{
float num7 = speedX;
float num8 = speedY;
float SpeedX = speedX + (float)Main.rand.Next(-30, 31) * 0.05f;
float SpeedY = speedY + (float)Main.rand.Next(-30, 31) * 0.05f;
int shot = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 0f, 0f);
@@ -67,8 +65,6 @@ namespace CalamityMod.Items.Weapons
{
for (int index = 0; index < bulletAmt; ++index)
{
float num7 = speedX;
float num8 = speedY;
float SpeedX = speedX + (float)Main.rand.Next(-30, 31) * 0.05f;
float SpeedY = speedY + (float)Main.rand.Next(-30, 31) * 0.05f;
int shot = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, mod.ProjectileType("ChargedBlast"), damage, knockBack, player.whoAmI, 0f, 0f);
+1 -3
View File
@@ -46,7 +46,6 @@ namespace CalamityMod.Items.Weapons
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
@@ -57,8 +56,7 @@ namespace CalamityMod.Items.Weapons
{
num80 = num72 / num80;
}
num78 *= num80;
num79 *= num80;
int num107 = 3;
for (int num108 = 0; num108 < num107; num108++)
{
@@ -49,8 +49,6 @@ namespace CalamityMod.Items.Weapons.SlimeGod
{
for (int index = 0; index < 5; ++index)
{
float num7 = speedX;
float num8 = speedY;
float SpeedX = speedX + (float)Main.rand.Next(-40, 41) * 0.05f;
float SpeedY = speedY + (float)Main.rand.Next(-40, 41) * 0.05f;
Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 0f, 0f);
-2
View File
@@ -45,8 +45,6 @@ namespace CalamityMod.Items.Weapons
int num6 = Main.rand.Next(1, 2);
for (int index = 0; index < num6; ++index)
{
float num7 = speedX;
float num8 = speedY;
float SpeedX = speedX + (float)Main.rand.Next(-40, 41) * 0.05f;
float SpeedY = speedY + (float)Main.rand.Next(-40, 41) * 0.05f;
int projectile = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 0.0f, 0.0f);
-2
View File
@@ -43,8 +43,6 @@ namespace CalamityMod.Items.Weapons
int num6 = Main.rand.Next(1, 3);
for (int index = 0; index < num6; ++index)
{
float num7 = speedX;
float num8 = speedY;
float SpeedX = speedX + (float)Main.rand.Next(-15, 16) * 0.05f;
float SpeedY = speedY + (float)Main.rand.Next(-15, 16) * 0.05f;
switch (Main.rand.Next(3))
-2
View File
@@ -43,8 +43,6 @@ namespace CalamityMod.Items.Weapons
{
for (int index = 0; index < 5; ++index)
{
float num7 = speedX;
float num8 = speedY;
float SpeedX = speedX + (float)Main.rand.Next(-40, 41) * 0.05f;
float SpeedY = speedY + (float)Main.rand.Next(-40, 41) * 0.05f;
Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 0.0f, 0.0f);
+1 -3
View File
@@ -50,7 +50,6 @@ namespace CalamityMod.Items.Weapons
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
@@ -61,8 +60,7 @@ namespace CalamityMod.Items.Weapons
{
num80 = num72 / num80;
}
num78 *= num80;
num79 *= num80;
int num112 = 2;
for (int num113 = 0; num113 < num112; num113++)
{
+1 -2
View File
@@ -59,8 +59,7 @@ namespace CalamityMod.Items.Weapons.SunkenSea
{
dist = num72 / dist;
}
velX *= dist;
velY *= dist;
float num77 = Vector2.Dot(value, vector3);
if (num77 > 0f)
{
-2
View File
@@ -64,12 +64,10 @@ namespace CalamityMod.Items.Weapons
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
}
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
float num81 = num80;
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
{
num78 = (float)player.direction;
num79 = 0f;
num80 = num72;
}
else
{
Loaded 100 of 232 files, more files were not shown because too many files have changed in this diff. Show more