Merge branch 'master' of https://github.com/UncleDanny/CalamityMod
This commit is contained in:
commit
116e4f4a14
14 files changed
+39
-70
No files matched your search
@@ -698,7 +698,7 @@ namespace CalamityMod.Items
|
||||
if (Main.projectile[i].active && Main.projectile[i].type == ModContent.ProjectileType<IgneousBlade>() && Main.projectile[i].owner == player.whoAmI && Main.projectile[i].localAI[1] == 0f)
|
||||
{
|
||||
Main.projectile[i].rotation = MathHelper.PiOver2 + MathHelper.PiOver4;
|
||||
Main.projectile[i].velocity = Main.projectile[i].DirectionTo(Main.MouseWorld) * 16f;
|
||||
Main.projectile[i].velocity = Main.projectile[i].DirectionTo(Main.MouseWorld) * 22f;
|
||||
Main.projectile[i].rotation += Main.projectile[i].velocity.ToRotation();
|
||||
Main.projectile[i].ai[0] = 180f;
|
||||
(Main.projectile[i].modProjectile as IgneousBlade).Firing = true;
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CalamityMod.Items.Placeables
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.createTile = ModContent.TileType<Tiles.Abyss.SulphurousSand>();
|
||||
item.createTile = ModContent.TileType<Tiles.Abyss.SulphurousSandNoWater>();
|
||||
item.useStyle = 1;
|
||||
item.useTurn = true;
|
||||
item.useAnimation = 15;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 17;
|
||||
item.damage = 20;
|
||||
item.magic = true;
|
||||
item.mana = 14;
|
||||
item.width = 36;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
projectile.magic = true;
|
||||
projectile.penetrate = 1;
|
||||
projectile.extraUpdates = 100;
|
||||
projectile.timeLeft = 20;
|
||||
projectile.timeLeft = 30;
|
||||
}
|
||||
|
||||
public override void Kill(int timeLeft)
|
||||
@@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
for (int i = 0; i < numProj; i++)
|
||||
{
|
||||
Vector2 perturbedSpeed = new Vector2(projectile.velocity.X, projectile.velocity.Y).RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1)));
|
||||
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, perturbedSpeed.X, perturbedSpeed.Y, ModContent.ProjectileType<BrimstoneBeam2>(), (int)(double)projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, perturbedSpeed.X, perturbedSpeed.Y, ModContent.ProjectileType<BrimstoneBeam2>(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
projectile.magic = true;
|
||||
projectile.penetrate = 1;
|
||||
projectile.extraUpdates = 100;
|
||||
projectile.timeLeft = 20;
|
||||
projectile.timeLeft = 30;
|
||||
}
|
||||
|
||||
public override void Kill(int timeLeft)
|
||||
@@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
for (int i = 0; i < numProj; i++)
|
||||
{
|
||||
Vector2 perturbedSpeed = new Vector2(projectile.velocity.X, projectile.velocity.Y).RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1)));
|
||||
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, perturbedSpeed.X, perturbedSpeed.Y, ModContent.ProjectileType<BrimstoneBeam3>(), (int)(double)projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, perturbedSpeed.X, perturbedSpeed.Y, ModContent.ProjectileType<BrimstoneBeam3>(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
projectile.magic = true;
|
||||
projectile.penetrate = -1;
|
||||
projectile.extraUpdates = 100;
|
||||
projectile.timeLeft = 20;
|
||||
projectile.timeLeft = 30;
|
||||
}
|
||||
|
||||
public override void Kill(int timeLeft)
|
||||
@@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
for (int i = 0; i < numProj; i++)
|
||||
{
|
||||
Vector2 perturbedSpeed = new Vector2(projectile.velocity.X, projectile.velocity.Y).RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1)));
|
||||
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, perturbedSpeed.X, perturbedSpeed.Y, ModContent.ProjectileType<BrimstoneBeam4>(), (int)(double)projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, perturbedSpeed.X, perturbedSpeed.Y, ModContent.ProjectileType<BrimstoneBeam4>(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
projectile.magic = true;
|
||||
projectile.penetrate = 1;
|
||||
projectile.extraUpdates = 100;
|
||||
projectile.timeLeft = 20;
|
||||
projectile.timeLeft = 30;
|
||||
}
|
||||
|
||||
public override void Kill(int timeLeft)
|
||||
@@ -31,7 +31,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
for (int i = 0; i < numProj; i++)
|
||||
{
|
||||
Vector2 perturbedSpeed = new Vector2(projectile.velocity.X, projectile.velocity.Y).RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1)));
|
||||
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, perturbedSpeed.X, perturbedSpeed.Y, ModContent.ProjectileType<BrimstoneBeam5>(), (int)(double)projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, perturbedSpeed.X, perturbedSpeed.Y, ModContent.ProjectileType<BrimstoneBeam5>(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
projectile.magic = true;
|
||||
projectile.penetrate = 1;
|
||||
projectile.extraUpdates = 100;
|
||||
projectile.timeLeft = 20;
|
||||
projectile.timeLeft = 30;
|
||||
}
|
||||
|
||||
public override void AI()
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using CalamityMod.Dusts;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Projectiles.Magic
|
||||
{
|
||||
@@ -20,7 +21,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
projectile.magic = true;
|
||||
projectile.aiStyle = 1;
|
||||
projectile.penetrate = 4;
|
||||
aiType = 277;
|
||||
aiType = ProjectileID.ThornBall;
|
||||
projectile.timeLeft = 300;
|
||||
}
|
||||
|
||||
@@ -32,7 +33,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
projectile.Kill();
|
||||
if (projectile.owner == Main.myPlayer)
|
||||
{
|
||||
int num251 = Main.rand.Next(3, 5);
|
||||
int num251 = Main.rand.Next(2, 4);
|
||||
for (int num252 = 0; num252 < num251; num252++)
|
||||
{
|
||||
Vector2 value15 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, -51));
|
||||
@@ -42,7 +43,7 @@ namespace CalamityMod.Projectiles.Magic
|
||||
}
|
||||
value15.Normalize();
|
||||
value15 *= (float)Main.rand.Next(70, 101) * 0.1f;
|
||||
Projectile.NewProjectile(projectile.oldPosition.X + (float)(projectile.width / 2), projectile.oldPosition.Y + (float)(projectile.height / 2), value15.X, value15.Y, ModContent.ProjectileType<BrimstoneHomer>(), (int)((double)projectile.damage * 1.35), 0f, projectile.owner, 0f, 0f);
|
||||
Projectile.NewProjectile(projectile.oldPosition.X + (float)(projectile.width / 2), projectile.oldPosition.Y + (float)(projectile.height / 2), value15.X, value15.Y, ModContent.ProjectileType<BrimstoneHomer>(), projectile.damage, 0f, projectile.owner, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace CalamityMod.Projectiles.Summon
|
||||
else
|
||||
{
|
||||
if (projectile.penetrate == -1) //limit penetration for worm memes
|
||||
projectile.penetrate = 4;
|
||||
projectile.penetrate = 3;
|
||||
|
||||
projectile.ai[0]--;
|
||||
if (projectile.ai[0] == 1)
|
||||
|
||||
@@ -9,9 +9,6 @@ namespace CalamityMod.Projectiles.Summon
|
||||
{
|
||||
public class MechwormBody : ModProjectile
|
||||
{
|
||||
private int playerMinionSlots = 0;
|
||||
private bool runCheck = true;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Mechworm");
|
||||
@@ -40,25 +37,11 @@ namespace CalamityMod.Projectiles.Summon
|
||||
{
|
||||
Lighting.AddLight((int)((projectile.position.X + (float)(projectile.width / 2)) / 16f), (int)((projectile.position.Y + (float)(projectile.height / 2)) / 16f), 0.15f, 0.01f, 0.15f);
|
||||
Player player9 = Main.player[projectile.owner];
|
||||
if (player9.maxMinions > playerMinionSlots)
|
||||
{
|
||||
playerMinionSlots = player9.maxMinions;
|
||||
}
|
||||
if (runCheck)
|
||||
{
|
||||
runCheck = false;
|
||||
playerMinionSlots = player9.maxMinions;
|
||||
}
|
||||
CalamityPlayer modPlayer = player9.Calamity();
|
||||
if ((int)Main.time % 120 == 0)
|
||||
{
|
||||
projectile.netUpdate = true;
|
||||
}
|
||||
if (!player9.active || player9.maxMinions < playerMinionSlots)
|
||||
{
|
||||
projectile.active = false;
|
||||
return;
|
||||
}
|
||||
int num1051 = 10;
|
||||
if (player9.dead)
|
||||
{
|
||||
|
||||
@@ -9,9 +9,6 @@ namespace CalamityMod.Projectiles.Summon
|
||||
{
|
||||
public class MechwormBody2 : ModProjectile
|
||||
{
|
||||
private int playerMinionSlots = 0;
|
||||
private bool runCheck = true;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Mechworm");
|
||||
@@ -40,25 +37,11 @@ namespace CalamityMod.Projectiles.Summon
|
||||
{
|
||||
Lighting.AddLight((int)((projectile.position.X + (float)(projectile.width / 2)) / 16f), (int)((projectile.position.Y + (float)(projectile.height / 2)) / 16f), 0.15f, 0.01f, 0.15f);
|
||||
Player player9 = Main.player[projectile.owner];
|
||||
if (player9.maxMinions > playerMinionSlots)
|
||||
{
|
||||
playerMinionSlots = player9.maxMinions;
|
||||
}
|
||||
if (runCheck)
|
||||
{
|
||||
runCheck = false;
|
||||
playerMinionSlots = player9.maxMinions;
|
||||
}
|
||||
CalamityPlayer modPlayer = player9.Calamity();
|
||||
if ((int)Main.time % 120 == 0)
|
||||
{
|
||||
projectile.netUpdate = true;
|
||||
}
|
||||
if (!player9.active || player9.maxMinions < playerMinionSlots)
|
||||
{
|
||||
projectile.active = false;
|
||||
return;
|
||||
}
|
||||
int num1051 = 10;
|
||||
if (player9.dead)
|
||||
{
|
||||
|
||||
@@ -11,9 +11,6 @@ namespace CalamityMod.Projectiles.Summon
|
||||
public class MechwormHead : ModProjectile
|
||||
{
|
||||
private int dust = 3;
|
||||
private int playerMinionSlots = 0;
|
||||
private bool runCheck = true;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Mechworm");
|
||||
@@ -54,26 +51,12 @@ namespace CalamityMod.Projectiles.Summon
|
||||
}
|
||||
dust--;
|
||||
}
|
||||
if (player9.maxMinions > playerMinionSlots)
|
||||
{
|
||||
playerMinionSlots = player9.maxMinions;
|
||||
}
|
||||
if (runCheck)
|
||||
{
|
||||
runCheck = false;
|
||||
playerMinionSlots = player9.maxMinions;
|
||||
}
|
||||
CalamityPlayer modPlayer = player9.Calamity();
|
||||
player9.AddBuff(ModContent.BuffType<Mechworm>(), 3600);
|
||||
if ((int)Main.time % 120 == 0)
|
||||
{
|
||||
projectile.netUpdate = true;
|
||||
}
|
||||
if (!player9.active || player9.maxMinions < playerMinionSlots)
|
||||
{
|
||||
projectile.active = false;
|
||||
return;
|
||||
}
|
||||
int num1051 = 30;
|
||||
if (player9.dead)
|
||||
{
|
||||
|
||||
@@ -54,10 +54,30 @@ namespace CalamityMod.Projectiles.Summon
|
||||
{
|
||||
projectile.netUpdate = true;
|
||||
}
|
||||
int byUUID = Projectile.GetByUUID(projectile.owner, (int)projectile.ai[0]);
|
||||
if (!player9.active || player9.maxMinions < playerMinionSlots)
|
||||
{
|
||||
projectile.active = false;
|
||||
return;
|
||||
int lostSlots = playerMinionSlots - player9.maxMinions;
|
||||
while (lostSlots > 0)
|
||||
{
|
||||
Projectile ahead = Main.projectile[byUUID];
|
||||
// Each body slot is actually 0.5 slots. Kill two segments to lose 1 "true" slot.
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
if (ahead.type != ModContent.ProjectileType<MechwormHead>())
|
||||
{
|
||||
projectile.localAI[1] = ahead.localAI[1];
|
||||
}
|
||||
projectile.ai[0] = ahead.ai[0];
|
||||
projectile.ai[1] = 1f;
|
||||
projectile.netUpdate = true;
|
||||
ahead.Kill();
|
||||
byUUID = Projectile.GetByUUID(projectile.owner, (int)projectile.ai[0]);
|
||||
ahead = Main.projectile[byUUID];
|
||||
}
|
||||
lostSlots--;
|
||||
}
|
||||
playerMinionSlots = player9.maxMinions;
|
||||
}
|
||||
int num1051 = 10;
|
||||
if (player9.dead)
|
||||
@@ -77,7 +97,6 @@ namespace CalamityMod.Projectiles.Summon
|
||||
float num1064;
|
||||
float scaleFactor17;
|
||||
float scaleFactor18;
|
||||
int byUUID = Projectile.GetByUUID(projectile.owner, (int)projectile.ai[0]);
|
||||
if (byUUID >= 0 && Main.projectile[byUUID].active && (Main.projectile[byUUID].type == ModContent.ProjectileType<MechwormHead>() ||
|
||||
Main.projectile[byUUID].type == ModContent.ProjectileType<MechwormBody>() ||
|
||||
Main.projectile[byUUID].type == ModContent.ProjectileType<MechwormBody2>()))
|
||||
|
||||
Reference in new issue
Block a user