Merge branch 'master' of https://github.com/UncleDanny/CalamityMod
No files matched your search
|
Before Width: | Height: | Size: 525 B After Width: | Height: | Size: 520 B |
|
Before Width: | Height: | Size: 305 B After Width: | Height: | Size: 536 B |
|
Before Width: | Height: | Size: 688 B After Width: | Height: | Size: 596 B |
@@ -319,6 +319,9 @@ namespace CalamityMod.CalPlayer
|
||||
public bool eGauntlet = false;
|
||||
public bool eTalisman = false;
|
||||
public bool statisBeltOfCurses = false;
|
||||
public int statisTimer = 0;
|
||||
public bool nucleogenesis = false;
|
||||
public bool nuclearRod = false;
|
||||
public bool elysianAegis = false;
|
||||
public bool elysianGuard = false;
|
||||
public bool nCore = false;
|
||||
@@ -403,6 +406,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool handWarmer = false;
|
||||
public bool oldDie = false;
|
||||
public bool ursaSergeant = false;
|
||||
public bool scuttlersJewel = false;
|
||||
public bool thiefsDime = false;
|
||||
public bool dynamoStemCells = false;
|
||||
public bool etherealExtorter = false;
|
||||
@@ -1237,6 +1241,8 @@ namespace CalamityMod.CalPlayer
|
||||
eGauntlet = false;
|
||||
eTalisman = false;
|
||||
statisBeltOfCurses = false;
|
||||
nucleogenesis = false;
|
||||
nuclearRod = false;
|
||||
heartOfDarkness = false;
|
||||
shadowMinions = false;
|
||||
tearMinions = false;
|
||||
@@ -1284,6 +1290,7 @@ namespace CalamityMod.CalPlayer
|
||||
cTracers = false;
|
||||
oldDie = false;
|
||||
ursaSergeant = false;
|
||||
scuttlersJewel = false;
|
||||
thiefsDime = false;
|
||||
dynamoStemCells = false;
|
||||
etherealExtorter = false;
|
||||
@@ -1653,6 +1660,7 @@ namespace CalamityMod.CalPlayer
|
||||
fleshTotemCooldown = false;
|
||||
sandCloakCooldown = false;
|
||||
icicleCooldown = 0;
|
||||
statisTimer = 0;
|
||||
|
||||
alcoholPoisoning = false;
|
||||
shadowflame = false;
|
||||
@@ -2994,7 +3002,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (player.mount.Active || player.mount.Cart || (CalamityMod.CalamityConfig.BossRushDashCurse && CalamityWorld.bossRushActive))
|
||||
{
|
||||
player.dashDelay = 60;
|
||||
player.dashDelay = 10;
|
||||
dashMod = 0;
|
||||
}
|
||||
|
||||
@@ -3020,7 +3028,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (player.mount.Active || player.mount.Cart || (CalamityMod.CalamityConfig.BossRushDashCurse && CalamityWorld.bossRushActive))
|
||||
{
|
||||
player.dashDelay = 60;
|
||||
player.dashDelay = 10;
|
||||
dashMod = 0;
|
||||
}
|
||||
|
||||
@@ -6794,8 +6802,10 @@ namespace CalamityMod.CalPlayer
|
||||
num18 = (float)num17 / num18;
|
||||
num15 *= num18;
|
||||
num16 *= num18;
|
||||
int num19 = Projectile.NewProjectile(x, y, num15, num16, 294, 3000, 7f, player.whoAmI, 0f, 0f);
|
||||
int num19 = Projectile.NewProjectile(x, y, num15, num16, ProjectileID.ShadowBeamFriendly, 3000, 7f, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[num19].ai[1] = player.position.Y;
|
||||
Main.projectile[num19].usesLocalNPCImmunity = true;
|
||||
Main.projectile[num19].localNPCHitCooldown = 10;
|
||||
}
|
||||
for (int l = 0; l < 5; l++)
|
||||
{
|
||||
@@ -6810,8 +6820,10 @@ namespace CalamityMod.CalPlayer
|
||||
num18 = (float)num17 / num18;
|
||||
num15 *= num18;
|
||||
num16 *= num18;
|
||||
int num19 = Projectile.NewProjectile(x, y, num15, num16, 45, 5000, 7f, player.whoAmI, 0f, 0f);
|
||||
int num19 = Projectile.NewProjectile(x, y, num15, num16, ProjectileID.DemonScythe, 5000, 7f, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[num19].ai[1] = player.position.Y;
|
||||
Main.projectile[num19].usesLocalNPCImmunity = true;
|
||||
Main.projectile[num19].localNPCHitCooldown = 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7243,7 +7255,7 @@ namespace CalamityMod.CalPlayer
|
||||
float num9 = Math.Max(player.accRunSpeed, player.maxRunSpeed);
|
||||
float num10 = 0.94f;
|
||||
int num11 = 20;
|
||||
if (dashMod == 1) //Counter Scarf
|
||||
if (dashMod == 1) //Counter Scarf
|
||||
{
|
||||
for (int k = 0; k < 2; k++)
|
||||
{
|
||||
@@ -7340,6 +7352,33 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
num7 = 12.5f; //14
|
||||
}
|
||||
else if (dashMod == 7) //Statis' Belt of Curses
|
||||
{
|
||||
statisTimer++;
|
||||
for (int k = 0; k < 2; k++)
|
||||
{
|
||||
int num12;
|
||||
if (player.velocity.Y == 0f)
|
||||
{
|
||||
num12 = Dust.NewDust(new Vector2(player.position.X, player.position.Y + (float)player.height - 4f), player.width, 8, 70, 0f, 0f, 100, default, 1.4f);
|
||||
}
|
||||
else
|
||||
{
|
||||
num12 = Dust.NewDust(new Vector2(player.position.X, player.position.Y + (float)(player.height / 2) - 8f), player.width, 16, 70, 0f, 0f, 100, default, 1.4f);
|
||||
}
|
||||
Main.dust[num12].velocity *= 0.1f;
|
||||
Main.dust[num12].scale *= 1f + (float)Main.rand.Next(20) * 0.01f;
|
||||
Main.dust[num12].shader = GameShaders.Armor.GetSecondaryShader(player.cShoe, player);
|
||||
}
|
||||
num7 = 14f; //14
|
||||
if (statisTimer % 5 == 0)
|
||||
{
|
||||
int scythe = Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType<CosmicScythe>(), (int)(500 * player.allDamage), 5f, player.whoAmI, 1f);
|
||||
Main.projectile[scythe].Calamity().rogue = false;
|
||||
Main.projectile[scythe].usesIDStaticNPCImmunity = true;
|
||||
Main.projectile[scythe].idStaticNPCHitCooldown = 10 * Main.projectile[scythe].extraUpdates;
|
||||
}
|
||||
}
|
||||
if (dashMod > 0)
|
||||
{
|
||||
player.vortexStealthActive = false;
|
||||
@@ -7746,6 +7785,68 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (dashMod == 7) //Statis' Belt of Curses
|
||||
{
|
||||
dashDistance = 21.9f;
|
||||
int direction = 0;
|
||||
bool justDashed = false;
|
||||
if (dashTimeMod > 0)
|
||||
{
|
||||
dashTimeMod--;
|
||||
}
|
||||
if (dashTimeMod < 0)
|
||||
{
|
||||
dashTimeMod++;
|
||||
}
|
||||
if (player.controlRight && player.releaseRight)
|
||||
{
|
||||
if (dashTimeMod > 0)
|
||||
{
|
||||
direction = 1;
|
||||
justDashed = true;
|
||||
dashTimeMod = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
dashTimeMod = 15;
|
||||
}
|
||||
}
|
||||
else if (player.controlLeft && player.releaseLeft)
|
||||
{
|
||||
if (dashTimeMod < 0)
|
||||
{
|
||||
direction = -1;
|
||||
justDashed = true;
|
||||
dashTimeMod = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
dashTimeMod = -15;
|
||||
}
|
||||
}
|
||||
if (justDashed)
|
||||
{
|
||||
player.velocity.X = dashDistance * (float)direction; //solar dash amount
|
||||
Point point = (player.Center + new Vector2((float)(direction * player.width / 2 + 2), player.gravDir * (float)-(float)player.height / 2f + player.gravDir * 2f)).ToTileCoordinates();
|
||||
Point point2 = (player.Center + new Vector2((float)(direction * player.width / 2 + 2), 0f)).ToTileCoordinates();
|
||||
if (WorldGen.SolidOrSlopedTile(point.X, point.Y) || WorldGen.SolidOrSlopedTile(point2.X, point2.Y))
|
||||
{
|
||||
player.velocity.X = player.velocity.X / 2f;
|
||||
}
|
||||
player.dashDelay = -1;
|
||||
for (int num17 = 0; num17 < 20; num17++)
|
||||
{
|
||||
int num18 = Dust.NewDust(new Vector2(player.position.X, player.position.Y), player.width, player.height, 70, 0f, 0f, 100, default, 2f);
|
||||
Dust dust = Main.dust[num18];
|
||||
dust.position.X += (float)Main.rand.Next(-5, 6);
|
||||
dust.position.Y += (float)Main.rand.Next(-5, 6);
|
||||
dust.velocity *= 0.2f;
|
||||
dust.scale *= 1f + (float)Main.rand.Next(20) * 0.01f;
|
||||
dust.shader = GameShaders.Armor.GetSecondaryShader(player.cShoe, player);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7795,7 +7896,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
num3 -= player.height;
|
||||
}
|
||||
if (dashMod == 1)
|
||||
if (dashMod == 1)
|
||||
{
|
||||
int num7 = Dust.NewDust(new Vector2(player.position.X - 4f, player.position.Y + (float)player.height + (float)num3), player.width + 8, 4, 235, -player.velocity.X * 0.5f, player.velocity.Y * 0.5f, 50, default, 1.5f);
|
||||
Main.dust[num7].velocity.X = Main.dust[num7].velocity.X * 0.2f;
|
||||
@@ -7837,6 +7938,13 @@ namespace CalamityMod.CalPlayer
|
||||
Main.dust[num7].velocity.Y = Main.dust[num7].velocity.Y * 0.2f;
|
||||
Main.dust[num7].shader = GameShaders.Armor.GetSecondaryShader(player.cShoe, player);
|
||||
}
|
||||
else if (dashMod == 7)
|
||||
{
|
||||
int num7 = Dust.NewDust(new Vector2(player.position.X - 4f, player.position.Y + (float)player.height + (float)num3), player.width + 8, 4, 70, -player.velocity.X * 0.5f, player.velocity.Y * 0.5f, 50, default, 1.5f);
|
||||
Main.dust[num7].velocity.X = Main.dust[num7].velocity.X * 0.2f;
|
||||
Main.dust[num7].velocity.Y = Main.dust[num7].velocity.Y * 0.2f;
|
||||
Main.dust[num7].shader = GameShaders.Armor.GetSecondaryShader(player.cShoe, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (player.controlRight && player.velocity.X < player.accRunSpeed && player.dashDelay >= 0)
|
||||
@@ -7848,7 +7956,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
num8 -= player.height;
|
||||
}
|
||||
if (dashMod == 1)
|
||||
if (dashMod == 1)
|
||||
{
|
||||
int num12 = Dust.NewDust(new Vector2(player.position.X - 4f, player.position.Y + (float)player.height + (float)num8), player.width + 8, 4, 235, -player.velocity.X * 0.5f, player.velocity.Y * 0.5f, 50, default, 1.5f);
|
||||
Main.dust[num12].velocity.X = Main.dust[num12].velocity.X * 0.2f;
|
||||
@@ -7876,7 +7984,7 @@ namespace CalamityMod.CalPlayer
|
||||
Main.dust[num12].velocity.Y = Main.dust[num12].velocity.Y * 0.2f;
|
||||
Main.dust[num12].shader = GameShaders.Armor.GetSecondaryShader(player.cShoe, player);
|
||||
}
|
||||
else if (dashMod == 5)
|
||||
else if (dashMod == 5)
|
||||
{
|
||||
int num12 = Dust.NewDust(new Vector2(player.position.X - 4f, player.position.Y + (float)player.height + (float)num8), player.width + 8, 4, 33, -player.velocity.X * 0.5f, player.velocity.Y * 0.5f, 50, default, 3f);
|
||||
Main.dust[num12].velocity.X = Main.dust[num12].velocity.X * 0.2f;
|
||||
@@ -7890,6 +7998,13 @@ namespace CalamityMod.CalPlayer
|
||||
Main.dust[num12].velocity.Y = Main.dust[num12].velocity.Y * 0.2f;
|
||||
Main.dust[num12].shader = GameShaders.Armor.GetSecondaryShader(player.cShoe, player);
|
||||
}
|
||||
else if (dashMod == 7)
|
||||
{
|
||||
int num12 = Dust.NewDust(new Vector2(player.position.X - 4f, player.position.Y + (float)player.height + (float)num8), player.width + 8, 4, 70, -player.velocity.X * 0.5f, player.velocity.Y * 0.5f, 50, default, 1.5f);
|
||||
Main.dust[num12].velocity.X = Main.dust[num12].velocity.X * 0.2f;
|
||||
Main.dust[num12].velocity.Y = Main.dust[num12].velocity.Y * 0.2f;
|
||||
Main.dust[num12].shader = GameShaders.Armor.GetSecondaryShader(player.cShoe, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10185,9 +10300,9 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
#region Profaned Soul Crystal Stuffs
|
||||
|
||||
internal void rollBabSpears(int randAmt)
|
||||
internal void rollBabSpears(int randAmt, bool chaseable)
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer && randAmt > 0 && !endoCooper && !magicHat && Main.rand.NextBool(randAmt)) //disallow other dev summons due to damage being bonkers
|
||||
if (player.whoAmI == Main.myPlayer && randAmt > 0 && !endoCooper && !magicHat && Main.rand.NextBool(randAmt) && chaseable) //disallow other dev summons due to damage being bonkers
|
||||
{
|
||||
int spearsFired = 0;
|
||||
for (int i = 0; i < Main.projectile.Length; i++)
|
||||
@@ -10351,15 +10466,11 @@ namespace CalamityMod.CalPlayer
|
||||
if (player.redFairy || player.greenFairy || player.blueFairy)
|
||||
light += 2;
|
||||
if (babyGhostBell)
|
||||
light += 2;
|
||||
else if (babyGhostBell && !underwater) //for Death caverns
|
||||
light += 1;
|
||||
light += underwater ? 2 : 1;
|
||||
if (player.petFlagDD2Ghost)
|
||||
light += 2;
|
||||
if (sirenPet && underwater)
|
||||
light += 3;
|
||||
else if (sirenPet && !underwater) //for Death caverns
|
||||
light += 1;
|
||||
if (sirenPet)
|
||||
light += underwater ? 3 : 1;
|
||||
if (player.wisp)
|
||||
light += 3;
|
||||
if (player.suspiciouslookingTentacle)
|
||||
|
||||
@@ -408,15 +408,17 @@ namespace CalamityMod.CalPlayer
|
||||
// Acid rain droplets
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
if (CalamityWorld.rainingAcid && player.Calamity().ZoneSulphur && !CalamityPlayer.areThereAnyDamnBosses)
|
||||
if (CalamityWorld.rainingAcid && player.Calamity().ZoneSulphur && !CalamityPlayer.areThereAnyDamnBosses && player.Center.Y < Main.worldSurface * 16f + 800f)
|
||||
{
|
||||
int acidRainDropRate = (int)MathHelper.Clamp(Main.invasionSize * 0.4f, 13.5f, 50);
|
||||
Vector2 spawnPoint = new Vector2(player.Center.X + Main.rand.Next(-1000, 1001), player.Center.Y - Main.rand.Next(700, 801));
|
||||
|
||||
int acidDmg = CalamityWorld.downedPolterghast ? 35 : CalamityWorld.downedAquaticScourge ? 25 : 15;
|
||||
|
||||
if (player.miscCounter % acidRainDropRate == 0f && Main.rand.NextBool(2))
|
||||
{
|
||||
Projectile.NewProjectile(spawnPoint, Vector2.UnitY * Main.rand.NextFloat(7f, 11f),
|
||||
ModContent.ProjectileType<AcidDrop>(), 28, 0f);
|
||||
ModContent.ProjectileType<AcidDrop>(), acidDmg, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -887,6 +889,8 @@ namespace CalamityMod.CalPlayer
|
||||
modPlayer.hurtSoundTimer--;
|
||||
if (modPlayer.icicleCooldown > 0)
|
||||
modPlayer.icicleCooldown--;
|
||||
if (modPlayer.statisTimer > 0 && player.dashDelay >= 0)
|
||||
modPlayer.statisTimer = 0;
|
||||
|
||||
// Silva invincibility effects
|
||||
if (modPlayer.silvaCountdown > 0 && modPlayer.hasSilvaEffect && modPlayer.silvaSet)
|
||||
|
||||
@@ -54,6 +54,7 @@ using CalamityMod.NPCs.Yharon;
|
||||
using CalamityMod.Projectiles.Boss;
|
||||
using CalamityMod.Projectiles.Enemy;
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using CalamityMod.Projectiles.Melee;
|
||||
using CalamityMod.Projectiles.Ranged;
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
@@ -1964,7 +1965,8 @@ namespace CalamityMod
|
||||
ModContent.ProjectileType<ButcherKnife>(),
|
||||
ModContent.ProjectileType<TerraDiskProjectile>(),
|
||||
ModContent.ProjectileType<TerraDiskProjectile2>(),
|
||||
ModContent.ProjectileType<ToxicantTwisterProjectile>()
|
||||
ModContent.ProjectileType<ToxicantTwisterProjectile>(),
|
||||
ModContent.ProjectileType<ToxicantTwisterTwoPointZero>()
|
||||
};
|
||||
|
||||
javelinList = new List<int>()
|
||||
@@ -2006,6 +2008,7 @@ namespace CalamityMod
|
||||
ModContent.ProjectileType<ScarletDevilProjectile>(),
|
||||
ModContent.ProjectileType<ScourgeoftheDesertProj>(),
|
||||
ModContent.ProjectileType<ScourgeoftheSeasProjectile>(),
|
||||
ModContent.ProjectileType<ScourgeoftheCosmosProj>(),
|
||||
ModContent.ProjectileType<SpearofDestinyProjectile>(),
|
||||
ModContent.ProjectileType<SpearofPaleolithProj>(),
|
||||
ModContent.ProjectileType<XerocPitchforkProjectile>(),
|
||||
@@ -2120,7 +2123,8 @@ namespace CalamityMod
|
||||
ModContent.ItemType<StarofDestruction>(),
|
||||
ModContent.ItemType<CraniumSmasher>(),
|
||||
ModContent.ItemType<ContaminatedBile>(),
|
||||
ModContent.ItemType<AcidicRainBarrel>()
|
||||
ModContent.ItemType<AcidicRainBarrel>(),
|
||||
ModContent.ItemType<SkyfinBombers>()
|
||||
};
|
||||
|
||||
flaskBombProjList = new List<int>()
|
||||
@@ -2146,7 +2150,8 @@ namespace CalamityMod
|
||||
ModContent.ProjectileType<DestructionStar>(),
|
||||
ModContent.ProjectileType<DestructionBolt>(),
|
||||
ModContent.ProjectileType<ContaminatedBileFlask>(),
|
||||
ModContent.ProjectileType<GreenDonkeyKongReference>()
|
||||
ModContent.ProjectileType<GreenDonkeyKongReference>(),
|
||||
ModContent.ProjectileType<SkyfinNuke>()
|
||||
};
|
||||
|
||||
spikyBallList = new List<int>()
|
||||
@@ -3015,6 +3020,19 @@ namespace CalamityMod
|
||||
AstralArcanumUI.UpdateAndDraw(Main.spriteBatch);
|
||||
return true;
|
||||
}, InterfaceScaleType.None));
|
||||
|
||||
int invasionIndex = layers.FindIndex(layer => layer.Name == "Vanilla: Diagnose Net");
|
||||
if (invasionIndex != -1)
|
||||
{
|
||||
layers.Insert(invasionIndex, new LegacyGameInterfaceLayer("Acid Rain Invasion UI", () =>
|
||||
{
|
||||
if (CalamityWorld.rainingAcid)
|
||||
{
|
||||
AcidRainUI.Draw(Main.spriteBatch);
|
||||
}
|
||||
return true;
|
||||
}, InterfaceScaleType.None));
|
||||
}
|
||||
}
|
||||
|
||||
public static Color GetNPCColor(NPC npc, Vector2? position = null, bool effects = true, float shadowOverride = 0f)
|
||||
|
||||
@@ -18,6 +18,8 @@ namespace CalamityMod.Events
|
||||
// Any other mods are changing the invasion ID as well.
|
||||
public const int InvasionID = 57;
|
||||
|
||||
public const int MinibossDeathValue = 5;
|
||||
|
||||
// A partially bright pale-ish cyan with a hint of yellow.
|
||||
public static readonly Color TextColor = new Color(115, 194, 147);
|
||||
|
||||
@@ -25,7 +27,7 @@ namespace CalamityMod.Events
|
||||
// The first value is the NPC type, the second is the value they're worth in the event
|
||||
public static List<(int, int)> PossibleEnemiesPreHM = new List<(int, int)>()
|
||||
{
|
||||
( ModContent.NPCType<Radiator>(), 0 ),
|
||||
( ModContent.NPCType<Radiator>(), 1 ),
|
||||
( ModContent.NPCType<NuclearToad>(), 1 ),
|
||||
( ModContent.NPCType<AcidEel>(), 1 ),
|
||||
( ModContent.NPCType<Skyfin>(), 1 ),
|
||||
@@ -48,6 +50,7 @@ namespace CalamityMod.Events
|
||||
|
||||
public static List<(int, int)> PossibleEnemiesPolter = new List<(int, int)>()
|
||||
{
|
||||
( ModContent.NPCType<Radiator>(), 0 ),
|
||||
( ModContent.NPCType<NuclearToad>(), 0 ),
|
||||
( ModContent.NPCType<AcidEel>(), 0 ),
|
||||
( ModContent.NPCType<Orthocera>(), 1 ),
|
||||
@@ -59,6 +62,31 @@ namespace CalamityMod.Events
|
||||
( ModContent.NPCType<SulfurousSkater>(), 1 )
|
||||
};
|
||||
|
||||
public static List<int> PossibleMinibossesAS = new List<int>()
|
||||
{
|
||||
ModContent.NPCType<CragmawMire>()
|
||||
};
|
||||
|
||||
public static List<int> PossibleMinibossesPolter = new List<int>()
|
||||
{
|
||||
ModContent.NPCType<CragmawMire>()
|
||||
};
|
||||
|
||||
public static bool AnyRainMinibosses
|
||||
{
|
||||
get
|
||||
{
|
||||
for (int i = 0; i < Main.npc.Length; i++)
|
||||
{
|
||||
if (Main.npc[i].active && (PossibleMinibossesAS.Contains(Main.npc[i].type)) || PossibleMinibossesPolter.Contains(Main.npc[i].type))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Broadcasts some text from a given localization key.
|
||||
/// </summary>
|
||||
@@ -99,7 +127,6 @@ namespace CalamityMod.Events
|
||||
rectangleCheckSize, rectangleCheckSize);
|
||||
if (screen.Intersects(invasionCheckArea))
|
||||
{
|
||||
Main.invasionProgressDisplayLeft = 480;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -124,23 +151,16 @@ namespace CalamityMod.Events
|
||||
}
|
||||
if (playerCount > 0)
|
||||
{
|
||||
// So that vanilla doesn't shit itself
|
||||
Main.invasionType = -1;
|
||||
|
||||
CalamityWorld.rainingAcid = true;
|
||||
// The E - 1 part is to ensure that we start at 1 as a multiple instead of 0
|
||||
// At a maximum of 255 players, the max multiplier is 9.98, or 998 enemies that need to be killed.
|
||||
CalamityWorld.acidRainPoints = (int)(180 * Math.Log(playerCount + Math.E - 1));
|
||||
Main.invasionProgress = 0;
|
||||
Main.invasionProgressIcon = -1;
|
||||
Main.invasionProgressWave = 0;
|
||||
|
||||
// Make it rain normally
|
||||
Main.raining = true;
|
||||
|
||||
// If abyssSide is true, then the abyss was generated on the left side of the world.
|
||||
// If false, the right.
|
||||
Main.invasionX = CalamityWorld.abyssSide ? 0 : Main.maxTilesX;
|
||||
if (CalamityWorld.startAcidicDownpour)
|
||||
{
|
||||
Main.raining = true;
|
||||
}
|
||||
CalamityWorld.triedToSummonOldDuke = false;
|
||||
}
|
||||
UpdateInvasion();
|
||||
@@ -159,9 +179,6 @@ namespace CalamityMod.Events
|
||||
{
|
||||
CalamityWorld.rainingAcid = false;
|
||||
BroadcastEventText("Mods.CalamityMod.AcidRainEnd"); // The sulphuric skies begin to clear...
|
||||
Main.invasionType = 0;
|
||||
Main.invasionDelay = 0;
|
||||
Main.invasionProgressNearInvasion = false;
|
||||
CalamityWorld.acidRainExtraDrawTime = 40;
|
||||
|
||||
// Turn off the rain from the event
|
||||
|
||||
|
After Width: | Height: | Size: 9.1 KiB |
|
After Width: | Height: | Size: 304 B |
|
After Width: | Height: | Size: 362 B |
|
After Width: | Height: | Size: 271 B |
|
After Width: | Height: | Size: 682 B |
|
After Width: | Height: | Size: 357 B |
|
After Width: | Height: | Size: 379 B |
|
After Width: | Height: | Size: 580 B |
|
After Width: | Height: | Size: 728 B |
|
After Width: | Height: | Size: 541 B |
|
After Width: | Height: | Size: 560 B |
|
After Width: | Height: | Size: 690 B |
|
After Width: | Height: | Size: 435 B |
|
After Width: | Height: | Size: 484 B |
|
Before Width: | Height: | Size: 576 B After Width: | Height: | Size: 260 B |
|
Before Width: | Height: | Size: 513 B After Width: | Height: | Size: 227 B |
|
Before Width: | Height: | Size: 263 B After Width: | Height: | Size: 285 B |
|
After Width: | Height: | Size: 318 B |
@@ -19,232 +19,6 @@ namespace CalamityMod.ILEditing
|
||||
/// </summary>
|
||||
public static void Initialize()
|
||||
{
|
||||
IL.Terraria.Main.DrawInvasionProgress += (il) =>
|
||||
{
|
||||
var cursor = new ILCursor(il)
|
||||
{
|
||||
Index = 1
|
||||
};
|
||||
cursor.EmitDelegate<Action>(() =>
|
||||
{
|
||||
if (Main.invasionProgressMode == 2 && (Main.invasionProgressNearInvasion || AcidRainEvent.NearInvasionCheck(7500)) && Main.invasionProgressDisplayLeft < 160)
|
||||
{
|
||||
Main.invasionProgressDisplayLeft = 160;
|
||||
}
|
||||
if (!Main.gamePaused && Main.invasionProgressDisplayLeft > 0)
|
||||
{
|
||||
Main.invasionProgressDisplayLeft--;
|
||||
}
|
||||
if (Main.invasionProgressDisplayLeft > 0)
|
||||
{
|
||||
Main.invasionProgressAlpha += 0.05f;
|
||||
}
|
||||
else
|
||||
{
|
||||
Main.invasionProgressAlpha -= 0.05f;
|
||||
}
|
||||
if (Main.invasionProgressAlpha < 0f)
|
||||
{
|
||||
Main.invasionProgressAlpha = 0f;
|
||||
}
|
||||
if (Main.invasionProgressAlpha > 1f)
|
||||
{
|
||||
Main.invasionProgressAlpha = 1f;
|
||||
}
|
||||
if (CalamityWorld.rainingAcid)
|
||||
{
|
||||
Main.invasionProgressAlpha = 1f;
|
||||
}
|
||||
if (Main.invasionProgressAlpha <= 0f)
|
||||
{
|
||||
return;
|
||||
}
|
||||
bool draw = CalamityWorld.rainingAcid || CalamityWorld.acidRainExtraDrawTime > 0;
|
||||
if ((draw && !Main.LocalPlayer.Calamity().ZoneSulphur) ||
|
||||
(!draw && Main.LocalPlayer.Calamity().ZoneSulphur))
|
||||
return;
|
||||
|
||||
float progressAlpha = 0.5f + Main.invasionProgressAlpha * 0.5f;
|
||||
if (CalamityWorld.acidRainExtraDrawTime > 0)
|
||||
{
|
||||
progressAlpha = 0.5f + CalamityWorld.acidRainExtraDrawTime / 40f * 0.5f;
|
||||
CalamityWorld.acidRainExtraDrawTime--;
|
||||
}
|
||||
Vector2 screenCoords = new Vector2(Main.screenWidth - 120, Main.screenHeight - 40);
|
||||
int sizeX = (int)(200f * progressAlpha);
|
||||
int sizeY = (int)(45f * progressAlpha);
|
||||
Rectangle screenCoordsRectangle =
|
||||
new Rectangle((int)screenCoords.X - sizeX / 2,
|
||||
(int)screenCoords.Y - sizeY / 2, sizeX, sizeY);
|
||||
Texture2D barTexture = Main.colorBarTexture;
|
||||
|
||||
// If you touch the netcode behind this without a good reason your life will come to an abrupt end -Dominic
|
||||
if (CalamityWorld.rainingAcid || CalamityWorld.acidRainExtraDrawTime > 0)
|
||||
{
|
||||
Utils.DrawInvBG(Main.spriteBatch, screenCoordsRectangle, new Color(63, 65, 151, 255) * 0.785f);
|
||||
|
||||
float progressRatio = 1f - CalamityWorld.AcidRainCompletionRatio;
|
||||
string progressText = $"{((int)(100 * progressRatio)).ToString()}%";
|
||||
progressText = Language.GetTextValue("Game.WaveCleared", progressText);
|
||||
Main.spriteBatch.Draw(barTexture, screenCoords, null, Color.White * Main.invasionProgressAlpha, 0f, new Vector2(barTexture.Width / 2, 0f), progressAlpha, SpriteEffects.None, 0f);
|
||||
Vector2 textMeasurement = Main.fontMouseText.MeasureString(progressText);
|
||||
float adjustedAlpha = progressAlpha;
|
||||
if (textMeasurement.Y > 22f)
|
||||
{
|
||||
adjustedAlpha *= 22f / textMeasurement.Y;
|
||||
}
|
||||
float barDrawOffsetX = 169f * progressAlpha;
|
||||
float scaleY = 8f * progressAlpha;
|
||||
Vector2 barDrawPosition = screenCoords + Vector2.UnitY * scaleY + Vector2.UnitX * 1f;
|
||||
Utils.DrawBorderString(Main.spriteBatch, progressText, barDrawPosition + new Vector2(0f, -4f), Color.White * Main.invasionProgressAlpha, adjustedAlpha, 0.5f, 1f, -1);
|
||||
barDrawPosition += Vector2.UnitX * (progressRatio - 0.5f) * barDrawOffsetX;
|
||||
Main.spriteBatch.Draw(Main.magicPixel, barDrawPosition, new Rectangle?(new Rectangle(0, 0, 1, 1)), new Color(255, 241, 51) * Main.invasionProgressAlpha, 0f, new Vector2(1f, 0.5f), new Vector2(barDrawOffsetX * progressRatio, scaleY), SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(Main.magicPixel, barDrawPosition, new Rectangle?(new Rectangle(0, 0, 1, 1)), new Color(255, 165, 0, 127) * Main.invasionProgressAlpha, 0f, new Vector2(1f, 0.5f), new Vector2(2f, scaleY), SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(Main.magicPixel, barDrawPosition, new Rectangle?(new Rectangle(0, 0, 1, 1)), Color.Black * Main.invasionProgressAlpha, 0f, new Vector2(0f, 0.5f), new Vector2(barDrawOffsetX * (1f - progressRatio), scaleY), SpriteEffects.None, 0f);
|
||||
|
||||
string invasionNameText = "Acid Rain";
|
||||
Vector2 textMeasurement2 = Main.fontMouseText.MeasureString(invasionNameText);
|
||||
float x = 120f;
|
||||
if (textMeasurement2.X > 200f)
|
||||
{
|
||||
x += textMeasurement2.X - 200f;
|
||||
}
|
||||
Texture2D iconTexture = ModContent.GetTexture("CalamityMod/ExtraTextures/UI/AcidRainIcon");
|
||||
Rectangle iconRectangle = Utils.CenteredRectangle(new Vector2(Main.screenWidth - x, Main.screenHeight - 80), (textMeasurement2 + new Vector2(iconTexture.Width + 12, 6f)) * progressAlpha);
|
||||
Utils.DrawInvBG(Main.spriteBatch, iconRectangle, AcidRainEvent.TextColor * 0.5f);
|
||||
Main.spriteBatch.Draw(iconTexture, iconRectangle.Left() + Vector2.UnitX * progressAlpha * 8f, null, Color.White * Main.invasionProgressAlpha, 0f, new Vector2(0f, iconTexture.Height / 2), progressAlpha * 0.8f, SpriteEffects.None, 0f);
|
||||
Utils.DrawBorderString(Main.spriteBatch, invasionNameText, iconRectangle.Right() + Vector2.UnitX * progressAlpha * -22f, Color.White * Main.invasionProgressAlpha, progressAlpha * 0.9f, 1f, 0.4f, -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Main.invasionProgress == -1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Texture2D iconTexture = Main.extraTexture[9];
|
||||
string invasionNameText = "";
|
||||
Color drawColor = Color.White;
|
||||
if (Main.invasionProgressIcon == 1)
|
||||
{
|
||||
iconTexture = Main.extraTexture[8];
|
||||
invasionNameText = Language.GetTextValue("LegacyInterface.83");
|
||||
drawColor = new Color(64, 109, 164) * 0.5f;
|
||||
}
|
||||
else if (Main.invasionProgressIcon == 2)
|
||||
{
|
||||
iconTexture = Main.extraTexture[12];
|
||||
invasionNameText = Language.GetTextValue("LegacyInterface.84");
|
||||
drawColor = new Color(112, 86, 114) * 0.5f;
|
||||
}
|
||||
else if (Main.invasionProgressIcon == 3)
|
||||
{
|
||||
iconTexture = Main.extraTexture[79];
|
||||
invasionNameText = Language.GetTextValue("DungeonDefenders2.InvasionProgressTitle");
|
||||
drawColor = new Color(88, 0, 160) * 0.5f;
|
||||
}
|
||||
else if (Main.invasionProgressIcon == 7)
|
||||
{
|
||||
iconTexture = Main.extraTexture[10];
|
||||
invasionNameText = Language.GetTextValue("LegacyInterface.85");
|
||||
drawColor = new Color(165, 160, 155) * 0.5f;
|
||||
}
|
||||
else if (Main.invasionProgressIcon == 6)
|
||||
{
|
||||
iconTexture = Main.extraTexture[11];
|
||||
invasionNameText = Language.GetTextValue("LegacyInterface.86");
|
||||
drawColor = new Color(148, 122, 72) * 0.5f;
|
||||
}
|
||||
else if (Main.invasionProgressIcon == 5)
|
||||
{
|
||||
iconTexture = Main.extraTexture[7];
|
||||
invasionNameText = Language.GetTextValue("LegacyInterface.87");
|
||||
drawColor = new Color(173, 135, 140) * 0.5f;
|
||||
}
|
||||
else if (Main.invasionProgressIcon == 4)
|
||||
{
|
||||
iconTexture = Main.extraTexture[9];
|
||||
invasionNameText = Language.GetTextValue("LegacyInterface.88");
|
||||
drawColor = new Color(94, 72, 131) * 0.5f;
|
||||
}
|
||||
else return;
|
||||
if (Main.invasionProgressWave > 0)
|
||||
{
|
||||
Utils.DrawInvBG(Main.spriteBatch, screenCoordsRectangle, new Color(63, 65, 151, 255) * 0.785f);
|
||||
string pointsText;
|
||||
if (Main.invasionProgressMax == 0)
|
||||
{
|
||||
pointsText = Language.GetTextValue("Game.InvasionPoints", Main.invasionProgress);
|
||||
}
|
||||
else
|
||||
{
|
||||
pointsText = ((int)((float)Main.invasionProgress * 100f / (float)Main.invasionProgressMax)).ToString() + "%";
|
||||
}
|
||||
pointsText = Language.GetTextValue("Game.WaveMessage", Main.invasionProgressWave, pointsText);
|
||||
float progressRatio = MathHelper.Clamp(Main.invasionProgress / (float)Main.invasionProgressMax, 0f, 1f);
|
||||
if (Main.invasionProgressMax == 0)
|
||||
{
|
||||
progressRatio = 1f;
|
||||
}
|
||||
float barDrawOffsetX = 169f * progressAlpha;
|
||||
float scaleY = 8f * progressAlpha;
|
||||
Vector2 barDrawPosition = screenCoords + Vector2.UnitY * scaleY + Vector2.UnitX * 1f;
|
||||
Utils.DrawBorderString(Main.spriteBatch, pointsText, barDrawPosition, Color.White * Main.invasionProgressAlpha, progressAlpha, 0.5f, 1f, -1);
|
||||
Main.spriteBatch.Draw(barTexture, screenCoords, null, Color.White * Main.invasionProgressAlpha, 0f, new Vector2(barTexture.Width / 2, 0f), progressAlpha, SpriteEffects.None, 0f);
|
||||
barDrawPosition += Vector2.UnitX * (progressRatio - 0.5f) * barDrawOffsetX;
|
||||
Main.spriteBatch.Draw(Main.magicPixel, barDrawPosition, new Rectangle?(new Rectangle(0, 0, 1, 1)), new Color(255, 241, 51) * Main.invasionProgressAlpha, 0f, new Vector2(1f, 0.5f), new Vector2(barDrawOffsetX * progressRatio, scaleY), SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(Main.magicPixel, barDrawPosition, new Rectangle?(new Rectangle(0, 0, 1, 1)), new Color(255, 165, 0, 127) * Main.invasionProgressAlpha, 0f, new Vector2(1f, 0.5f), new Vector2(2f, scaleY), SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(Main.magicPixel, barDrawPosition, new Rectangle?(new Rectangle(0, 0, 1, 1)), Color.Black * Main.invasionProgressAlpha, 0f, new Vector2(0f, 0.5f), new Vector2(barDrawOffsetX * (1f - progressRatio), scaleY), SpriteEffects.None, 0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
Vector2 vectorIconRectangle = new Vector2(Main.screenWidth - 120, Main.screenHeight - 40);
|
||||
Utils.DrawInvBG(Main.spriteBatch, screenCoordsRectangle, new Color(63, 65, 151, 255) * 0.785f);
|
||||
string progressText;
|
||||
if (Main.invasionProgressMax == 0)
|
||||
{
|
||||
progressText = Main.invasionProgress.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
progressText = ((int)(Main.invasionProgress * 100f / Main.invasionProgressMax)).ToString() + "%";
|
||||
}
|
||||
progressText = Language.GetTextValue("Game.WaveCleared", progressText);
|
||||
if (Main.invasionProgressMax != 0)
|
||||
{
|
||||
Main.spriteBatch.Draw(barTexture, vectorIconRectangle, null, Color.White * Main.invasionProgressAlpha, 0f, new Vector2((float)(barTexture.Width / 2), 0f), progressAlpha, SpriteEffects.None, 0f);
|
||||
float progressRatio = MathHelper.Clamp(Main.invasionProgress / (float)Main.invasionProgressMax, 0f, 1f);
|
||||
Vector2 textMeasurement = Main.fontMouseText.MeasureString(progressText);
|
||||
float adjustedAlpha = progressAlpha;
|
||||
if (textMeasurement.Y > 22f)
|
||||
{
|
||||
adjustedAlpha *= 22f / textMeasurement.Y;
|
||||
}
|
||||
float barDrawOffsetX = 169f * progressAlpha;
|
||||
float scaleY = 8f * progressAlpha;
|
||||
Vector2 barDrawPosition = vectorIconRectangle + Vector2.UnitY * scaleY + Vector2.UnitX * 1f;
|
||||
Utils.DrawBorderString(Main.spriteBatch, progressText, barDrawPosition + new Vector2(0f, -4f), Color.White * Main.invasionProgressAlpha, adjustedAlpha, 0.5f, 1f, -1);
|
||||
barDrawPosition += Vector2.UnitX * (progressRatio - 0.5f) * barDrawOffsetX;
|
||||
Main.spriteBatch.Draw(Main.magicPixel, barDrawPosition, new Rectangle?(new Rectangle(0, 0, 1, 1)), new Color(255, 241, 51) * Main.invasionProgressAlpha, 0f, new Vector2(1f, 0.5f), new Vector2(barDrawOffsetX * progressRatio, scaleY), SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(Main.magicPixel, barDrawPosition, new Rectangle?(new Rectangle(0, 0, 1, 1)), new Color(255, 165, 0, 127) * Main.invasionProgressAlpha, 0f, new Vector2(1f, 0.5f), new Vector2(2f, scaleY), SpriteEffects.None, 0f);
|
||||
Main.spriteBatch.Draw(Main.magicPixel, barDrawPosition, new Rectangle?(new Rectangle(0, 0, 1, 1)), Color.Black * Main.invasionProgressAlpha, 0f, new Vector2(0f, 0.5f), new Vector2(barDrawOffsetX * (1f - progressRatio), scaleY), SpriteEffects.None, 0f);
|
||||
}
|
||||
}
|
||||
Vector2 textMeasurement2 = Main.fontMouseText.MeasureString(invasionNameText);
|
||||
float x = 120f;
|
||||
if (textMeasurement2.X > 200f)
|
||||
{
|
||||
x += textMeasurement2.X - 200f;
|
||||
}
|
||||
Rectangle iconRectangle = Utils.CenteredRectangle(new Vector2(Main.screenWidth - x, Main.screenHeight - 80), (textMeasurement2 + new Vector2(iconTexture.Width + 12, 6f)) * progressAlpha);
|
||||
Utils.DrawInvBG(Main.spriteBatch, iconRectangle, drawColor);
|
||||
Main.spriteBatch.Draw(iconTexture, iconRectangle.Left() + Vector2.UnitX * progressAlpha * 8f, null, Color.White * Main.invasionProgressAlpha, 0f, new Vector2(0f, iconTexture.Height / 2), progressAlpha * 0.8f, SpriteEffects.None, 0f);
|
||||
Utils.DrawBorderString(Main.spriteBatch, invasionNameText, iconRectangle.Right() + Vector2.UnitX * progressAlpha * -22f, Color.White * Main.invasionProgressAlpha, progressAlpha * 0.9f, 1f, 0.4f, -1);
|
||||
}
|
||||
});
|
||||
cursor.Emit(Pop);
|
||||
cursor.Emit(Ret);
|
||||
};
|
||||
|
||||
IL.Terraria.WorldGen.MakeDungeon += (il) =>
|
||||
{
|
||||
var cursor = new ILCursor(il)
|
||||
|
||||
@@ -54,6 +54,8 @@ namespace CalamityMod.Items.Accessories
|
||||
int num19 = Projectile.NewProjectile(x, y, num15, num16, ModContent.ProjectileType<AuraRain>(), 60, 2f, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[num19].ai[1] = player.position.Y;
|
||||
Main.projectile[num19].tileCollide = false;
|
||||
Main.projectile[num19].usesLocalNPCImmunity = true;
|
||||
Main.projectile[num19].localNPCHitCooldown = 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
using CalamityMod.Buffs.DamageOverTime;
|
||||
using CalamityMod.Projectiles.Typeless;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class NuclearRod : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Nuclear Rod");
|
||||
Tooltip.SetDefault("Minions release an irradiated aura on enemy hits\n" +
|
||||
"+1 max minion");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 28;
|
||||
item.height = 32;
|
||||
item.value = Item.buyPrice(0, 25, 0, 0);
|
||||
item.rare = 5;
|
||||
item.accessory = true;
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
player.maxMinions++;
|
||||
player.Calamity().nuclearRod = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 580 B |
@@ -0,0 +1,56 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class Nucleogenesis : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Nucleogenesis");
|
||||
Tooltip.SetDefault("Increased max minions by 4 and 15% increased minion damage\n" +
|
||||
"Increased minion knockback\n" +
|
||||
"Minions inflict a variety of debuffs\n" +
|
||||
"Minions spawn damaging sparks on enemy hits\n" + //subject to change to be "cooler"
|
||||
"Minion attacks have a chance to instantly kill normal enemies");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 28;
|
||||
item.height = 32;
|
||||
item.value = Item.buyPrice(0, 90, 0, 0);
|
||||
item.accessory = true;
|
||||
item.Calamity().customRarity = CalamityRarity.DarkBlue;
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.nucleogenesis = true;
|
||||
modPlayer.shadowMinions = true; //shadowflame
|
||||
modPlayer.tearMinions = true; //temporal sadness
|
||||
modPlayer.voltaicJelly = true; //electrified
|
||||
modPlayer.starTaintedGenerator = true; //astral infection and irradiated
|
||||
player.minionKB += 2.5f;
|
||||
player.minionDamage += 0.15f;
|
||||
player.maxMinions += 4;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<StarTaintedGenerator>());
|
||||
recipe.AddIngredient(ModContent.ItemType<StatisCurse>());
|
||||
recipe.AddIngredient(ModContent.ItemType<Phantoplasm>(), 20);
|
||||
recipe.AddIngredient(ModContent.ItemType<NightmareFuel>(), 20);
|
||||
recipe.AddIngredient(ModContent.ItemType<EndothermicEnergy>(), 20);
|
||||
recipe.AddTile(ModContent.TileType<DraedonsForge>());
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 829 B |
@@ -50,6 +50,8 @@ namespace CalamityMod.Items.Accessories
|
||||
int num19 = Projectile.NewProjectile(x, y, num15, num16, ModContent.ProjectileType<AuraRain>(), 18, 2f, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[num19].ai[1] = player.position.Y;
|
||||
Main.projectile[num19].tileCollide = false;
|
||||
Main.projectile[num19].usesLocalNPCImmunity = true;
|
||||
Main.projectile[num19].localNPCHitCooldown = 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public class ScuttlersJewel : ModItem
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Scuttler's Jewel");
|
||||
Tooltip.SetDefault("Javelin projectiles have a chance spawn a jewel spike when destroyed");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 26;
|
||||
item.height = 26;
|
||||
item.value = Item.buyPrice(0, 3, 0, 0);
|
||||
item.rare = 1;
|
||||
item.accessory = true;
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.scuttlersJewel = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 796 B |
@@ -9,9 +9,9 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Star Tainted Generator");
|
||||
DisplayName.SetDefault("Star-tainted Generator");
|
||||
Tooltip.SetDefault("+2 max minions and 7% minion damage\n" +
|
||||
"Minion attacks spawn astral explosions and inflict Astral Infection and Electrified");
|
||||
"Minion attacks spawn astral explosions and inflict several debuffs");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -36,6 +36,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<JellyChargedBattery>());
|
||||
recipe.AddIngredient(ModContent.ItemType<NuclearRod>());
|
||||
recipe.AddIngredient(ModContent.ItemType<StarbusterCore>());
|
||||
recipe.AddIngredient(ModContent.ItemType<BarofLife>(), 3);
|
||||
recipe.AddTile(TileID.MythrilAnvil);
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Accessories
|
||||
@@ -10,17 +12,12 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Statis' Belt of Curses");
|
||||
DisplayName.SetDefault("Statis' Void Sash");
|
||||
Tooltip.SetDefault("Increases jump speed and allows constant jumping\n" +
|
||||
"Can climb walls, dash, and dodge attacks\n" +
|
||||
"10% increased rogue damage and velocity\n" +
|
||||
"5% increased rogue crit chance\n" +
|
||||
"Increased max minions by 3 and 10% increased minion damage\n" +
|
||||
"Increased minion knockback\n" +
|
||||
"Grants shadowflame powers to all minions\n" +
|
||||
"Minions make enemies cry on hit\n" +
|
||||
"Minion attacks have a chance to instantly kill normal enemies\n" +
|
||||
"Dashes leave homing scythes in your wake\n" +
|
||||
"Toggle visibility of this accessory to enable/disable the dash");
|
||||
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(8, 3));
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -29,38 +26,28 @@ namespace CalamityMod.Items.Accessories
|
||||
item.height = 32;
|
||||
item.value = Item.buyPrice(0, 90, 0, 0);
|
||||
item.accessory = true;
|
||||
item.Calamity().customRarity = CalamityRarity.DarkBlue;
|
||||
item.Calamity().postMoonLordRarity = 14;
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.statisBeltOfCurses = true;
|
||||
modPlayer.shadowMinions = true;
|
||||
modPlayer.tearMinions = true;
|
||||
player.minionKB += 2.5f;
|
||||
player.minionDamage += 0.1f;
|
||||
player.maxMinions += 3;
|
||||
player.autoJump = true;
|
||||
player.jumpSpeedBoost += 1.2f;
|
||||
player.extraFall += 50;
|
||||
player.blackBelt = true;
|
||||
if (!hideVisual)
|
||||
player.dash = 1;
|
||||
modPlayer.dashMod = 7;
|
||||
player.spikedBoots = 2;
|
||||
player.Calamity().throwingDamage += 0.1f;
|
||||
player.Calamity().throwingCrit += 5;
|
||||
player.Calamity().throwingVelocity += 0.1f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<StatisNinjaBelt>());
|
||||
recipe.AddIngredient(ModContent.ItemType<StatisCurse>());
|
||||
recipe.AddIngredient(ModContent.ItemType<Phantoplasm>(), 20);
|
||||
recipe.AddIngredient(ModContent.ItemType<NightmareFuel>(), 20);
|
||||
recipe.AddIngredient(ModContent.ItemType<EndothermicEnergy>(), 20);
|
||||
recipe.AddIngredient(ModContent.ItemType<TwistingNether>(), 10);
|
||||
//This is not a mistake. Only Nightmare Fuel is intentional for thematics.
|
||||
recipe.AddIngredient(ModContent.ItemType<NightmareFuel>(), 10);
|
||||
recipe.AddTile(ModContent.TileType<DraedonsForge>());
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
|
||||
|
Before Width: | Height: | Size: 549 B After Width: | Height: | Size: 959 B |
@@ -13,8 +13,6 @@ namespace CalamityMod.Items.Accessories
|
||||
DisplayName.SetDefault("Statis' Ninja Belt");
|
||||
Tooltip.SetDefault("Increases jump speed and allows constant jumping\n" +
|
||||
"Can climb walls, dash, and dodge attacks\n" +
|
||||
"5% increased rogue damage and velocity\n" +
|
||||
"5% increased rogue crit chance\n" +
|
||||
"Toggle visibility of this accessory to enable/disable the dash");
|
||||
}
|
||||
|
||||
@@ -37,9 +35,6 @@ namespace CalamityMod.Items.Accessories
|
||||
if (!hideVisual)
|
||||
player.dash = 1;
|
||||
player.spikedBoots = 2;
|
||||
modPlayer.throwingDamage += 0.05f;
|
||||
modPlayer.throwingCrit += 5;
|
||||
modPlayer.throwingVelocity += 0.05f;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace CalamityMod.Items.Accessories
|
||||
}
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<FungalClumpMinion>()] < 1)
|
||||
{
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<FungalClumpMinion>(), (int)(1000f * (player.allDamage + player.minionDamage - 1f)), 1f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ModContent.ProjectileType<FungalClumpMinion>(), (int)(1000f * player.MinionDamage()), 1f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
player.allDamage += 0.15f;
|
||||
@@ -116,6 +116,8 @@ namespace CalamityMod.Items.Accessories
|
||||
int type = Main.rand.NextBool(2) ? ModContent.ProjectileType<AuraRain>() : ModContent.ProjectileType<StandingFire>();
|
||||
int num19 = Projectile.NewProjectile(x, y, num15, num16, type, 2000, 1f, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[num19].tileCollide = false;
|
||||
Main.projectile[num19].usesLocalNPCImmunity = true;
|
||||
Main.projectile[num19].localNPCHitCooldown = 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -131,7 +133,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
if (random == 0 && player.immune && Collision.DrownCollision(player.position, player.width, player.height, player.gravDir))
|
||||
{
|
||||
for (int l = 0; l < 200; l++)
|
||||
for (int l = 0; l < Main.maxNPCs; l++)
|
||||
{
|
||||
NPC nPC = Main.npc[l];
|
||||
if (nPC.active && !nPC.friendly && nPC.damage > 0 && !nPC.dontTakeDamage && !nPC.buffImmune[num] && Vector2.Distance(player.Center, nPC.Center) <= num2)
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<ThiefsDimeProj>()] < 1)
|
||||
{
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<ThiefsDimeProj>(), 100, 6f, Main.myPlayer, 0f, 0f);
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, 0f, ModContent.ProjectileType<ThiefsDimeProj>(), (int)(100 * player.RogueDamage()), 6f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,9 +66,9 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
player.noFallDmg = true;
|
||||
if (modPlayer.icicleCooldown <= 0)
|
||||
{
|
||||
if (player.controlJump && !player.jumpAgainCloud && player.jump == 0 && player.velocity.Y != 0f)
|
||||
if (player.controlJump && !player.jumpAgainCloud && player.jump == 0 && player.velocity.Y != 0f && !player.mount.Active && !player.mount.Cart)
|
||||
{
|
||||
int p = Projectile.NewProjectile(player.Center.X, player.Center.Y, player.velocity.X * 0f, 2f, ModContent.ProjectileType<FrostShardFriendly>(), 25, 3f, player.whoAmI);
|
||||
int p = Projectile.NewProjectile(player.Center.X, player.Center.Y, player.velocity.X * 0f, 2f, ModContent.ProjectileType<FrostShardFriendly>(), (int)(25 * player.allDamage), 3f, player.whoAmI);
|
||||
Main.projectile[p].minion = false;
|
||||
Main.projectile[p].Calamity().rogue = false;
|
||||
Main.projectile[p].frame = Main.rand.Next(5);
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace CalamityMod.Items.Armor
|
||||
if (player.wingTime <= 0) //ignore flippers while the player can fly
|
||||
player.accFlipper = true;
|
||||
}
|
||||
|
||||
|
||||
public override void UpdateVanity(Player player, EquipType type)
|
||||
{
|
||||
player.Calamity().fathomSwarmerTail = true;
|
||||
|
||||
|
Before Width: | Height: | Size: 403 B After Width: | Height: | Size: 492 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 419 B After Width: | Height: | Size: 326 B |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 772 B After Width: | Height: | Size: 620 B |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.6 KiB |
@@ -84,36 +84,36 @@ namespace CalamityMod.Items
|
||||
if (CalamityMod.weaponAutoreuseList?.Contains(item.type) ?? false)
|
||||
item.autoReuse = true;
|
||||
|
||||
if (item.type == ItemID.PsychoKnife || item.type == ItemID.PearlwoodSword || item.type == ItemID.PearlwoodBow || item.type == ItemID.TaxCollectorsStickOfDoom)
|
||||
if (item.type == ItemID.PsychoKnife || item.type == ItemID.TaxCollectorsStickOfDoom)
|
||||
item.damage *= 4;
|
||||
else if (item.type == ItemID.SpectreStaff)
|
||||
item.damage *= 3;
|
||||
else if (CalamityMod.doubleDamageBuffList?.Contains(item.type) ?? false)
|
||||
item.damage *= 2;
|
||||
else if (item.type == ItemID.RainbowRod)
|
||||
item.damage = (int)((double)item.damage * 1.75);
|
||||
item.damage = (int)(item.damage * 1.75);
|
||||
else if (CalamityMod.sixtySixDamageBuffList?.Contains(item.type) ?? false)
|
||||
item.damage = (int)((double)item.damage * 1.66);
|
||||
item.damage = (int)(item.damage * 1.66);
|
||||
else if (CalamityMod.fiftyDamageBuffList?.Contains(item.type) ?? false)
|
||||
item.damage = (int)((double)item.damage * 1.5);
|
||||
item.damage = (int)(item.damage * 1.5);
|
||||
else if (CalamityMod.thirtyThreeDamageBuffList?.Contains(item.type) ?? false)
|
||||
item.damage = (int)((double)item.damage * 1.33);
|
||||
item.damage = (int)(item.damage * 1.33);
|
||||
else if (CalamityMod.twentyFiveDamageBuffList?.Contains(item.type) ?? false)
|
||||
item.damage = (int)((double)item.damage * 1.25);
|
||||
item.damage = (int)(item.damage * 1.25);
|
||||
else if (CalamityMod.twentyDamageBuffList?.Contains(item.type) ?? false)
|
||||
item.damage = (int)((double)item.damage * 1.2);
|
||||
item.damage = (int)(item.damage * 1.2);
|
||||
else if (item.type == ItemID.Frostbrand || item.type == ItemID.MagnetSphere)
|
||||
item.damage = (int)((double)item.damage * 1.1);
|
||||
item.damage = (int)(item.damage * 1.1);
|
||||
else if (item.type == ItemID.Razorpine)
|
||||
item.damage = (int)((double)item.damage * 0.95);
|
||||
item.damage = (int)(item.damage * 0.95);
|
||||
else if (item.type == ItemID.Phantasm)
|
||||
item.damage = (int)((double)item.damage * 0.9);
|
||||
item.damage = (int)(item.damage * 0.9);
|
||||
else if (item.type == ItemID.LastPrism)
|
||||
item.damage = (int)((double)item.damage * 0.85);
|
||||
item.damage = (int)(item.damage * 0.85);
|
||||
else if (CalamityMod.quarterDamageNerfList?.Contains(item.type) ?? false)
|
||||
item.damage = (int)((double)item.damage * 0.75);
|
||||
item.damage = (int)(item.damage * 0.75);
|
||||
else if (item.type == ItemID.StardustDragonStaff)
|
||||
item.damage = (int)((double)item.damage * 0.5);
|
||||
item.damage = (int)(item.damage * 0.5);
|
||||
|
||||
if (item.type == ItemID.BookStaff)
|
||||
item.mana = 10;
|
||||
@@ -164,15 +164,21 @@ namespace CalamityMod.Items
|
||||
item.useTime = 15;
|
||||
item.damage *= 4;
|
||||
item.tileBoost += 1;
|
||||
item.rare = 4;
|
||||
}
|
||||
|
||||
if (item.type == ItemID.PearlwoodBow)
|
||||
{
|
||||
item.useAnimation += 8; //35
|
||||
item.useTime += 8; //35
|
||||
item.shootSpeed += 3.4f; //10f
|
||||
item.knockBack += 1f; //1f
|
||||
item.shoot = ProjectileID.RainbowFront;
|
||||
item.rare = 4;
|
||||
item.damage = (int)(item.damage * 2.5);
|
||||
}
|
||||
if (item.type == ItemID.PearlwoodSword)
|
||||
{
|
||||
item.damage *= 4;
|
||||
item.rare = 4;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -361,7 +367,6 @@ namespace CalamityMod.Items
|
||||
if (Main.projectile[i].active && (Main.projectile[i].type == ProjectileID.RainbowFront || Main.projectile[i].type == ProjectileID.RainbowBack) && Main.projectile[i].owner == player.whoAmI)
|
||||
{
|
||||
Main.projectile[i].Kill();
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (int i = -8; i <= 8; i += 8)
|
||||
@@ -1866,7 +1871,8 @@ Provides heat and cold protection in Death Mode";
|
||||
"Acceleration multiplier: 1\n" +
|
||||
"Average vertical speed\n" +
|
||||
"Flight time: 170\n" +
|
||||
"+50 max life";
|
||||
"+50 max life\n" +
|
||||
"Ornaments rain down as you fly";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2863,6 +2869,16 @@ Provides heat and cold protection in Death Mode";
|
||||
{
|
||||
player.noFallDmg = true;
|
||||
player.statLifeMax2 += 50;
|
||||
if (modPlayer.icicleCooldown <= 0)
|
||||
{
|
||||
if (player.controlJump && !player.jumpAgainCloud && player.jump == 0 && player.velocity.Y != 0f && !player.mount.Active && !player.mount.Cart)
|
||||
{
|
||||
int p = Projectile.NewProjectile(player.Center.X, player.Center.Y, player.velocity.X * 0f, 2f, ProjectileID.OrnamentFriendly, (int)(100 * player.allDamage), 5f, player.whoAmI);
|
||||
Main.projectile[p].melee = false;
|
||||
Main.projectile[p].Calamity().lineColor = 1;
|
||||
modPlayer.icicleCooldown = 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (item.type == ItemID.SpookyWings) // Bonus to summon stats while wearing spooky armor
|
||||
{
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
using CalamityMod.Tiles;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.Items.Placeables.Banners
|
||||
{
|
||||
public class AnthozoanCrabBanner : ModItem
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 10;
|
||||
item.height = 24;
|
||||
item.maxStack = 99;
|
||||
item.useTurn = true;
|
||||
item.autoReuse = true;
|
||||
item.useAnimation = 15;
|
||||
item.useTime = 10;
|
||||
item.useStyle = 1;
|
||||
item.consumable = true;
|
||||
item.rare = 1;
|
||||
item.value = Item.buyPrice(0, 0, 10, 0);
|
||||
item.createTile = ModContent.TileType<MonsterBanner>();
|
||||
item.placeStyle = 120;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 341 B |
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.World;
|
||||
using CalamityMod.Events;
|
||||
using CalamityMod.World;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -83,19 +84,33 @@ namespace CalamityMod.Items.Tools.ClimateChange
|
||||
num3 += 0.2f;
|
||||
}
|
||||
Main.rainTime = (int)((float)Main.rainTime * num3);
|
||||
AdjustRainSeverity(false);
|
||||
Main.raining = true;
|
||||
AdjustRainSeverity(false);
|
||||
Main.raining = true;
|
||||
}
|
||||
else if (CalamityWorld.death)
|
||||
{
|
||||
if (Main.rainTime > 3600)
|
||||
{
|
||||
Main.rainTime = 3600;
|
||||
AdjustRainSeverity(true);
|
||||
}
|
||||
if (CalamityWorld.rainingAcid)
|
||||
{
|
||||
CalamityWorld.acidRainPoints = 0;
|
||||
CalamityWorld.triedToSummonOldDuke = false;
|
||||
AcidRainEvent.UpdateInvasion(false);
|
||||
}
|
||||
}
|
||||
else if (CalamityWorld.death)
|
||||
{
|
||||
if (Main.rainTime > 3600)
|
||||
{
|
||||
Main.rainTime = 3600;
|
||||
AdjustRainSeverity(true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Main.raining = false;
|
||||
if (CalamityWorld.rainingAcid)
|
||||
{
|
||||
CalamityWorld.acidRainPoints = 0;
|
||||
CalamityWorld.triedToSummonOldDuke = false;
|
||||
AcidRainEvent.UpdateInvasion(false);
|
||||
}
|
||||
}
|
||||
|
||||
CalamityMod.UpdateServerBoolean();
|
||||
return true;
|
||||
|
||||
@@ -38,14 +38,16 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal
|
||||
item.rare = 10;
|
||||
item.Calamity().customRarity = CalamityRarity.RareVariant;
|
||||
|
||||
item.shoot = ModContent.ProjectileType<Projectiles.DraedonsArsenal.GatlingLaser>();
|
||||
item.shoot = ModContent.ProjectileType<GatlingLaserProj>();
|
||||
item.shootSpeed = 24f;
|
||||
item.useAmmo = AmmoID.Bullet;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
|
||||
public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType<Projectiles.DraedonsArsenal.GatlingLaser>(), damage, knockBack, player.whoAmI, 0f, 0f);
|
||||
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType<GatlingLaserProj>(), damage, knockBack, player.whoAmI, 0f, 0f);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 369;
|
||||
item.damage = 420;
|
||||
item.magic = true;
|
||||
item.mana = 42;
|
||||
item.width = 30;
|
||||
@@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
item.UseSound = SoundID.Item92;
|
||||
item.autoReuse = true;
|
||||
item.shoot = ModContent.ProjectileType<ApothMark>();
|
||||
item.shootSpeed = 15;
|
||||
item.shootSpeed = 15.69f;
|
||||
item.Calamity().customRarity = CalamityRarity.Developer;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
public class BelchingSaxophone : ModItem
|
||||
{
|
||||
public const int BaseDamage = 30;
|
||||
private int counter = 0;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Belching Saxophone");
|
||||
Tooltip.SetDefault("Doot\n" +
|
||||
"Fires an array of dirty reeds, music notes, and sulphuric bubbles");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = BaseDamage;
|
||||
item.magic = true;
|
||||
item.mana = 10;
|
||||
item.width = 46;
|
||||
item.height = 22;
|
||||
item.useTime = 12;
|
||||
item.useAnimation = 24;
|
||||
item.useStyle = 5;
|
||||
item.noMelee = true;
|
||||
item.knockBack = 2f;
|
||||
item.value = Item.buyPrice(0, 36, 0, 0);
|
||||
item.rare = 5;
|
||||
item.autoReuse = true;
|
||||
item.shoot = ModContent.ProjectileType<AcidicReed>();
|
||||
//If a saxophone actually fired reeds, I'd be concerned.
|
||||
item.shootSpeed = 20f;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
counter++;
|
||||
if (counter > 1)
|
||||
counter = 0;
|
||||
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
Vector2 speed = new Vector2(speedX, speedY).RotatedBy(MathHelper.ToRadians(Main.rand.Next(-15, 16)));
|
||||
speed.Normalize();
|
||||
speed *= 15f;
|
||||
speed.Y -= Math.Abs(speed.X) * 0.2f;
|
||||
Projectile.NewProjectile(position, speed, ModContent.ProjectileType<AcidicSaxBubble>(), damage, knockBack, player.whoAmI);
|
||||
}
|
||||
|
||||
speedX += Main.rand.Next(-40, 41) * 0.05f;
|
||||
speedY += Main.rand.Next(-40, 41) * 0.05f;
|
||||
Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, counter == 1 ? 1f : 0f);
|
||||
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
int noteProj = ProjectileID.QuarterNote;
|
||||
switch (Main.rand.Next(3))
|
||||
{
|
||||
case 0:
|
||||
noteProj = ProjectileID.EighthNote;
|
||||
break;
|
||||
case 1:
|
||||
noteProj = ProjectileID.TiedEighthNote;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
int note = Projectile.NewProjectile(position.X, position.Y, speedX * 0.75f, speedY * 0.75f, noteProj, (int)(damage * 0.75), knockBack, player.whoAmI);
|
||||
Main.projectile[note].Calamity().forceMagic = true; //why are these notes also internally ranged
|
||||
Main.projectile[note].usesLocalNPCImmunity = true;
|
||||
Main.projectile[note].localNPCHitCooldown = 10;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
return new Vector2(0, 18);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 952 B |
@@ -40,18 +40,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
item.Calamity().customRarity = CalamityRarity.Dedicated;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
for (int i = 0; i < Main.projectile.Length; i++)
|
||||
{
|
||||
Projectile p = Main.projectile[i];
|
||||
if (p.active && p.type == ModContent.ProjectileType<DarkSparkPrism>() && p.owner == player.whoAmI)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
|
||||
public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
public class Eternity : ModItem
|
||||
{
|
||||
public const int BaseDamage = 7200;
|
||||
public const int BaseDamage = 6969;
|
||||
public const int ExplosionDamage = 50000;
|
||||
public const int MaxHomers = 40;
|
||||
public const int dustID = 16;
|
||||
|
||||
@@ -19,13 +19,13 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 600;
|
||||
item.damage = 700;
|
||||
item.magic = true;
|
||||
item.mana = 9;
|
||||
item.width = 28;
|
||||
item.height = 30;
|
||||
item.useTime = 12;
|
||||
item.useAnimation = 12;
|
||||
item.useTime = 10;
|
||||
item.useAnimation = 10;
|
||||
item.useStyle = 5;
|
||||
item.noMelee = true;
|
||||
item.knockBack = 4f;
|
||||
@@ -91,8 +91,8 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
num80 = num72 / num80;
|
||||
num78 *= num80;
|
||||
num79 *= num80;
|
||||
float speedX4 = num78 + (float)Main.rand.Next(-30, 31) * 0.02f;
|
||||
float speedY5 = num79 + (float)Main.rand.Next(-30, 31) * 0.02f;
|
||||
float speedX4 = num78 + (float)Main.rand.Next(-20, 21) * 0.02f;
|
||||
float speedY5 = num79 + (float)Main.rand.Next(-20, 21) * 0.02f;
|
||||
Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, type, damage, knockBack, player.whoAmI, 0f, (float)Main.rand.Next(15));
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 50;
|
||||
item.damage = 35;
|
||||
item.magic = true;
|
||||
item.mana = 16;
|
||||
item.width = 50;
|
||||
@@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
item.UseSound = SoundID.Item8;
|
||||
item.autoReuse = true;
|
||||
item.shoot = ModContent.ProjectileType<MiasmaGas>();
|
||||
item.shootSpeed = 12f;
|
||||
item.shootSpeed = 10f;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
@@ -40,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
for (int i = 0; i < Main.rand.Next(5, 8 + 1); i++)
|
||||
{
|
||||
Vector2 velocity = new Vector2(speedX, speedY) * Main.rand.NextFloat(0.9f, 1.1f);
|
||||
float angle = Main.rand.NextFloat(-1f, 1f) * MathHelper.ToRadians(25f);
|
||||
float angle = Main.rand.NextFloat(-1f, 1f) * MathHelper.ToRadians(30f);
|
||||
Projectile.NewProjectile(position, velocity.RotatedBy(angle), type, damage, knockBack, player.whoAmI);
|
||||
}
|
||||
return false;
|
||||
|
||||
|
Before Width: | Height: | Size: 755 B After Width: | Height: | Size: 719 B |
@@ -34,18 +34,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
item.shootSpeed = 24f;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
for (int i = 0; i < Main.projectile.Length; i++)
|
||||
{
|
||||
Projectile p = Main.projectile[i];
|
||||
if (p.active && p.type == ModContent.ProjectileType<PurgeProj>() && p.owner == player.whoAmI)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
|
Before Width: | Height: | Size: 618 B After Width: | Height: | Size: 600 B |
@@ -36,18 +36,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
item.Calamity().customRarity = CalamityRarity.DarkBlue;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
for (int i = 0; i < Main.projectile.Length; i++)
|
||||
{
|
||||
Projectile p = Main.projectile[i];
|
||||
if (p.active && p.type == ModContent.ProjectileType<T1000Proj>() && p.owner == player.whoAmI)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 150;
|
||||
item.damage = 175;
|
||||
item.magic = true;
|
||||
item.mana = 15;
|
||||
item.width = 60;
|
||||
@@ -32,24 +32,20 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
item.UseSound = SoundID.Item46;
|
||||
item.autoReuse = true;
|
||||
item.shoot = ModContent.ProjectileType<VitriolicViperSpit>();
|
||||
item.shootSpeed = 15f;
|
||||
item.shootSpeed = 20f;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
Vector2 velocity = new Vector2(speedX, speedY);
|
||||
float spitAngleMax = MathHelper.ToRadians(14f + Main.rand.NextFloat(-2f, 2f));
|
||||
float fangAngleMax = MathHelper.ToRadians(7f + Main.rand.NextFloat(-1f, 1f));
|
||||
for (int i = 0; i < 9; i++)
|
||||
for (int i = -4; i <= 4; i += 1)
|
||||
{
|
||||
float angle = MathHelper.Lerp(i / 9f, -spitAngleMax, spitAngleMax);
|
||||
Projectile.NewProjectile(position, velocity.RotatedBy(angle) * 1.65f, type, (int)(damage * 0.7f), knockBack, player.whoAmI);
|
||||
Vector2 perturbedSpeed = new Vector2(speedX, speedY).RotatedBy(MathHelper.ToRadians(i));
|
||||
Projectile.NewProjectile(position.X, position.Y, perturbedSpeed.X * 1.65f, perturbedSpeed.Y * 1.65f, type, (int)(damage * 0.7f), knockBack * 0.7f, player.whoAmI, 0f, 0f);
|
||||
}
|
||||
for (int i = 0; i < 5; i++)
|
||||
for (int j = -2; j <= 2; j += 1)
|
||||
{
|
||||
float angle = MathHelper.Lerp(i / 5f, -fangAngleMax, fangAngleMax);
|
||||
Projectile.NewProjectile(position, velocity.RotatedBy(angle),
|
||||
ModContent.ProjectileType<VitriolicViperFang>(), damage, knockBack, player.whoAmI);
|
||||
Vector2 perturbedSpeed2 = new Vector2(speedX, speedY).RotatedBy(MathHelper.ToRadians(j));
|
||||
Projectile.NewProjectile(position.X, position.Y, perturbedSpeed2.X, perturbedSpeed2.Y, ModContent.ProjectileType<VitriolicViperFang>(), damage, knockBack, player.whoAmI, 0f, 0f);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 658 B After Width: | Height: | Size: 1.1 KiB |
@@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
item.rare = 5;
|
||||
item.UseSound = SoundID.Item12;
|
||||
item.autoReuse = true;
|
||||
item.shoot = 88;
|
||||
item.shoot = ProjectileID.PurpleLaser;
|
||||
item.shootSpeed = 20f;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,12 +44,12 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, ModContent.ProjectileType<FossilSpike>(), (int)(item.damage * (player.allDamage + player.meleeDamage - 1f)), knockback, Main.myPlayer);
|
||||
Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, ModContent.ProjectileType<FossilSpike>(), (int)(item.damage * player.MeleeDamage()), knockback, Main.myPlayer);
|
||||
}
|
||||
|
||||
public override void OnHitPvp(Player player, Player target, int damage, bool crit)
|
||||
{
|
||||
Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, ModContent.ProjectileType<FossilSpike>(), (int)(item.damage * (player.allDamage + player.meleeDamage - 1f)), item.knockBack, Main.myPlayer);
|
||||
Projectile.NewProjectile(target.Center.X, target.Center.Y, 0f, 0f, ModContent.ProjectileType<FossilSpike>(), (int)(item.damage * player.MeleeDamage()), item.knockBack, Main.myPlayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,8 +16,8 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 30;
|
||||
item.height = 52;
|
||||
item.width = 40;
|
||||
item.height = 42;
|
||||
item.damage = 17;
|
||||
item.melee = true;
|
||||
item.useAnimation = item.useTime = 26;
|
||||
|
||||
|
Before Width: | Height: | Size: 478 B After Width: | Height: | Size: 858 B |
@@ -18,8 +18,8 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
item.damage = 130;
|
||||
item.melee = true;
|
||||
item.width = 46;
|
||||
item.height = 76;
|
||||
item.width = 64;
|
||||
item.height = 78;
|
||||
item.useTime = 38;
|
||||
item.useAnimation = 38;
|
||||
item.useStyle = 1;
|
||||
|
||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 909 B After Width: | Height: | Size: 581 B |
|
Before Width: | Height: | Size: 477 B After Width: | Height: | Size: 533 B |
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 66;
|
||||
item.damage = 400;
|
||||
item.damage = 390;
|
||||
item.melee = true;
|
||||
item.noMelee = true;
|
||||
item.useTurn = true;
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 18;
|
||||
item.damage = 1800;
|
||||
item.damage = 2000;
|
||||
item.melee = true;
|
||||
item.noMelee = true;
|
||||
item.noUseGraphic = true;
|
||||
@@ -72,11 +72,11 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
num146++;
|
||||
}
|
||||
if (Main.rand.NextBool(8))
|
||||
if (Main.rand.NextBool(6))
|
||||
{
|
||||
num146++;
|
||||
}
|
||||
if (Main.rand.NextBool(16))
|
||||
if (Main.rand.NextBool(8))
|
||||
{
|
||||
num146++;
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 971 B |
@@ -37,18 +37,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
item.Calamity().customRarity = CalamityRarity.Developer;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
for (int i = 0; i < Main.projectile.Length; i++)
|
||||
{
|
||||
Projectile p = Main.projectile[i];
|
||||
if (p.active && p.type == ModContent.ProjectileType<ContagionBow>() && p.owner == player.whoAmI)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -38,18 +38,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
item.Calamity().customRarity = CalamityRarity.PureGreen;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
for (int i = 0; i < Main.projectile.Length; i++)
|
||||
{
|
||||
Projectile p = Main.projectile[i];
|
||||
if (p.active && p.type == ModContent.ProjectileType<DaemonsFlameBow>() && p.owner == player.whoAmI)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
|
||||
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
|
||||
{
|
||||
|
||||
@@ -67,14 +67,10 @@ Right click to fire two devastating barrages of five empowered fireballs.
|
||||
item.useTime = 9;
|
||||
item.reuseDelay = 0;
|
||||
item.noUseGraphic = true;
|
||||
for (int i = 0; i < Main.projectile.Length; i++)
|
||||
{
|
||||
Projectile p = Main.projectile[i];
|
||||
if (p.active && p.type == ModContent.ProjectileType<DrataliornusBow>() && p.owner == player.whoAmI)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (player.ownedProjectileCounts[item.shoot] > 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return base.CanUseItem(player);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 170;
|
||||
item.damage = 200;
|
||||
item.ranged = true;
|
||||
item.width = 76;
|
||||
item.height = 46;
|
||||
|
||||
@@ -36,18 +36,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
item.shootSpeed = 30f; //30
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
for (int i = 0; i < Main.projectile.Length; i++)
|
||||
{
|
||||
Projectile p = Main.projectile[i];
|
||||
if (p.active && p.type == ModContent.ProjectileType<FlakKrakenGun>() && p.owner == player.whoAmI)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
|
||||
public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
|
||||
@@ -41,18 +41,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
item.shootSpeed = 18f;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
for (int i = 0; i < Main.projectile.Length; i++)
|
||||
{
|
||||
Projectile p = Main.projectile[i];
|
||||
if (p.active && p.type == ModContent.ProjectileType<FlurrystormCannonShooting>() && p.owner == player.whoAmI)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
|
||||
@@ -38,18 +38,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
item.Calamity().customRarity = CalamityRarity.RareVariant;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
for (int i = 0; i < Main.projectile.Length; i++)
|
||||
{
|
||||
Projectile p = Main.projectile[i];
|
||||
if (p.active && p.type == ModContent.ProjectileType<NorfleetCannon>() && p.owner == player.whoAmI)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
|
||||
|
Before Width: | Height: | Size: 651 B After Width: | Height: | Size: 571 B |
@@ -39,18 +39,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
item.Calamity().customRarity = CalamityRarity.DarkBlue;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
for (int i = 0; i < Main.projectile.Length; i++)
|
||||
{
|
||||
Projectile p = Main.projectile[i];
|
||||
if (p.active && p.type == ModContent.ProjectileType<PhangasmBow>() && p.owner == player.whoAmI)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ItemID.SDMG);
|
||||
recipe.AddIngredient(ItemID.ShrimpyTruffle);
|
||||
recipe.AddIngredient(ModContent.ItemType<FetidEmesis>());
|
||||
recipe.AddIngredient(ModContent.ItemType<CosmiliteBar>(), 4);
|
||||
recipe.AddIngredient(ModContent.ItemType<Phantoplasm>(), 4);
|
||||
recipe.AddIngredient(ModContent.ItemType<DepthCells>(), 10);
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
item.rare = 10;
|
||||
item.UseSound = SoundID.Item10;
|
||||
item.autoReuse = true;
|
||||
item.shootSpeed = 25f;
|
||||
item.shootSpeed = 20f;
|
||||
item.shoot = ModContent.ProjectileType<SepticSkewerHarpoon>();
|
||||
}
|
||||
|
||||
|
||||
@@ -41,18 +41,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
item.Calamity().customRarity = CalamityRarity.DarkBlue;
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
for (int i = 0; i < Main.projectile.Length; i++)
|
||||
{
|
||||
Projectile p = Main.projectile[i];
|
||||
if (p.active && p.type == ModContent.ProjectileType<StarfleetMK2Gun>() && p.owner == player.whoAmI)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] <= 0;
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
{
|
||||
|
||||
@@ -16,12 +16,12 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 250;
|
||||
item.damage = 175;
|
||||
item.ranged = true;
|
||||
item.width = 50;
|
||||
item.height = 30;
|
||||
item.useTime = 30;
|
||||
item.useAnimation = 30;
|
||||
item.useTime = 40;
|
||||
item.useAnimation = 40;
|
||||
item.useStyle = 5;
|
||||
item.noMelee = true;
|
||||
item.knockBack = 7f;
|
||||
|
||||
|
Before Width: | Height: | Size: 474 B After Width: | Height: | Size: 588 B |
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 90;
|
||||
item.damage = 80;
|
||||
item.ranged = true;
|
||||
item.width = 46;
|
||||
item.height = 24;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
public override void SafeSetDefaults()
|
||||
{
|
||||
item.width = 74;
|
||||
item.damage = 160;
|
||||
item.damage = 110;
|
||||
item.noMelee = true;
|
||||
item.noUseGraphic = true;
|
||||
item.useAnimation = 12;
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
public override void SafeSetDefaults()
|
||||
{
|
||||
item.width = 42;
|
||||
item.damage = 465;
|
||||
item.damage = 400;
|
||||
item.noMelee = true;
|
||||
item.noUseGraphic = true;
|
||||
item.useAnimation = 15;
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
public override void SafeSetDefaults()
|
||||
{
|
||||
item.width = 18;
|
||||
item.damage = 1800;
|
||||
item.damage = 2000;
|
||||
item.noMelee = true;
|
||||
item.noUseGraphic = true;
|
||||
item.useAnimation = 12;
|
||||
@@ -72,11 +72,11 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
num146++;
|
||||
}
|
||||
if (Main.rand.NextBool(8))
|
||||
if (Main.rand.NextBool(6))
|
||||
{
|
||||
num146++;
|
||||
}
|
||||
if (Main.rand.NextBool(16))
|
||||
if (Main.rand.NextBool(8))
|
||||
{
|
||||
num146++;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
using CalamityMod.Projectiles.Rogue;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
public class SkyfinBombers : RogueWeapon
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Skyfin Bombers");
|
||||
Tooltip.SetDefault("Fishy bombers inbound!\n" +
|
||||
"Launches a skyfin nuke that homes in on enemies below it\n" +
|
||||
"Stealth strikes throw three skyfin nukes that home in regardless of enemy position");
|
||||
}
|
||||
|
||||
public override void SafeSetDefaults()
|
||||
{
|
||||
item.width = 28;
|
||||
item.damage = 40;
|
||||
item.noMelee = true;
|
||||
item.noUseGraphic = true;
|
||||
item.useAnimation = 35;
|
||||
item.useStyle = 1;
|
||||
item.useTime = 35;
|
||||
item.knockBack = 6.5f;
|
||||
item.UseSound = SoundID.Item11;
|
||||
item.autoReuse = true;
|
||||
item.height = 30;
|
||||
item.value = Item.buyPrice(0, 36, 0, 0);
|
||||
item.rare = 5;
|
||||
item.shoot = ModContent.ProjectileType<SkyfinNuke>();
|
||||
item.shootSpeed = 12f;
|
||||
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()) //setting the stealth strike
|
||||
{
|
||||
for (int i = -8; i <= 8; i += 8)
|
||||
{
|
||||
Vector2 perturbedSpeed = new Vector2(speedX, speedY).RotatedBy(MathHelper.ToRadians(i));
|
||||
int stealth = Projectile.NewProjectile(position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, 0f, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[stealth].Calamity().stealthStrike = true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 874 B |