Revert "Fixes to various items"

This reverts commit 5f6d1d1a53.
This commit is contained in:
DominicKarma committed 2019-10-15 16:40:46 -05:00
1 parent 5f6d1d1a53
commit 316abc970a
5 files changed
+33 -19

No files matched your search

+3 -6
View File
@@ -591,8 +591,7 @@ namespace CalamityMod.Projectiles
}
}
if (Main.player[projectile.owner].Calamity().dragonScales && rogue && projectile.friendly && projectile.type != mod.ProjectileType("Nanotech") &&
projectile.type != mod.ProjectileType("DragonShit"))
if (Main.player[projectile.owner].Calamity().dragonScales && rogue && projectile.friendly && projectile.type != mod.ProjectileType("Nanotech"))
{
if (counter % 50 == 0)
{
@@ -600,7 +599,7 @@ namespace CalamityMod.Projectiles
{
//spawn a dust that does 1/5th of the original damage
int projectileID = Projectile.NewProjectile(projectile.Center, Vector2.One.RotatedByRandom(MathHelper.TwoPi), mod.ProjectileType("DragonShit"),
Math.Max((int)((double)projectile.damage * 0.2), 50), 0f, projectile.owner, 0f, 0f);
(int)((double)projectile.damage * 0.2), 0f, projectile.owner, 0f, 0f);
}
}
}
@@ -631,9 +630,7 @@ namespace CalamityMod.Projectiles
//will always be friendly and rogue if it has this boost
if (Main.player[projectile.owner].Calamity().momentumCapacitor && projectile.Calamity().momentumCapacitatorBoost)
{
if (projectile.type != mod.ProjectileType("Malachite") && projectile.type != mod.ProjectileType("ScourgeoftheDesert2") &&
projectile.velocity.Length() < 3f)
projectile.velocity *= 1.025f;
projectile.velocity *= 1.025f;
}
if (Main.player[projectile.owner].Calamity().theBeeDamage > 0 && projectile.owner == Main.myPlayer && projectile.friendly && projectile.damage > 0 &&
+22
View File
@@ -22,11 +22,33 @@ namespace CalamityMod.Projectiles.Rogue
projectile.alpha = 255;
projectile.Calamity().rogue = true;
}
/// <summary>
/// Checks if a tile is below a designated Vector2
/// </summary>
/// <param name="position">The position to check</param>
/// <param name="usingTileCoords">If the position provided is in tile coordinates or not</param>
/// <returns></returns>
public static bool SolidTileBelow(Vector2 position, bool usingTileCoords = false)
{
//if not in tile coordinates
if (!usingTileCoords)
{
//convert them accordingly
position = position.ToTileCoordinates().ToVector2();
}
int x = (int)position.X;
int y = (int)position.Y;
return Main.tile[x, y + 1].active() && Main.tileSolid[Main.tile[x, y + 1].type];
}
public override void AI()
{
if (projectile.localAI[0] == 0f)
{
projectile.position.Y -= projectile.height / 2; //position adjustments
if (!SolidTileBelow(projectile.Bottom))
{
projectile.Kill();
}
projectile.localAI[0] = 1f;
}
float max = (float)(projectile.width * projectile.height) / 222f;
@@ -34,7 +34,11 @@ namespace CalamityMod.Projectiles.Rogue
projectile.rotation = projectile.velocity.ToRotation();
if (Math.Abs(projectile.velocity.X) > 43f)
{
projectile.velocity = Vector2.Clamp(projectile.velocity, new Vector2(-23f), new Vector2(23f));
projectile.velocity.X = Math.Sign(projectile.velocity.X) * 43f;
}
if (Math.Abs(projectile.velocity.Y) > 43f)
{
projectile.velocity.Y = Math.Sign(projectile.velocity.Y) * 43f;
}
}
public override bool OnTileCollide(Vector2 oldVelocity)
@@ -3,7 +3,6 @@ using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.World.Generation;
namespace CalamityMod.Projectiles.Rogue
{
@@ -44,11 +43,7 @@ namespace CalamityMod.Projectiles.Rogue
//normal
if (projectile.ai[1] == 0f)
{
Point result;
if (WorldUtils.Find(projectile.Top.ToTileCoordinates(), Searches.Chain((GenSearch)new Searches.Down(80), (GenCondition)new Conditions.IsSolid()), out result))
{
Projectile.NewProjectile(result.ToVector2() * 16f, Vector2.Zero, mod.ProjectileType("BlueFlamePillar"), ConsecratedWater.BaseDamage, 2f, projectile.owner);
}
Projectile.NewProjectile(projectile.Bottom, Vector2.Zero, mod.ProjectileType("BlueFlamePillar"), ConsecratedWater.BaseDamage, 2f, projectile.owner);
}
//stealth strike
else if (projectile.ai[1] == 1f)
@@ -56,11 +51,7 @@ namespace CalamityMod.Projectiles.Rogue
//3 pillars instead of 1
for (float i = -1f; i <= 1f; i += 1f)
{
Point result;
if (WorldUtils.Find((projectile.Top + i * Main.rand.NextFloat(56f, 108f) * Vector2.UnitX).ToTileCoordinates(), Searches.Chain((GenSearch)new Searches.Down(80), (GenCondition)new Conditions.IsSolid()), out result))
{
Projectile.NewProjectile(result.ToVector2() * 16f, Vector2.Zero, mod.ProjectileType("BlueFlamePillar"), ConsecratedWater.BaseDamage, 2f, projectile.owner);
}
Projectile.NewProjectile(projectile.Bottom + i * Main.rand.NextFloat(56f, 108f) * Vector2.UnitX, Vector2.Zero, mod.ProjectileType("BlueFlamePillar"), ConsecratedWater.BaseDamage, 2f, projectile.owner);
}
}
}
+1 -1
View File
@@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Typeless
for (int k = 0; k < Main.projectile.Length; k++)
{
if (Main.projectile[k].type == mod.ProjectileType("SlickCaneProjectile")) continue;
if (Main.projectile[k].owner == projectile.owner && Main.projectile[k].Calamity().rogue &&
if (Main.projectile[k].owner == projectile.owner && Main.projectile[k].Calamity().rogue &&
!Main.projectile[k].Calamity().momentumCapacitatorBoost && Main.projectile[k].friendly)
{
Main.projectile[k].damage = (int)(Main.projectile[k].damage * 1.15f);