Merge branch 'master' of https://github.com/UncleDanny/CalamityMod
No files matched your search
@@ -9,7 +9,6 @@ namespace CalamityMod.Buffs.StatDebuffs
|
||||
{
|
||||
DisplayName.SetDefault("Irradiated");
|
||||
Description.SetDefault("Your skin is burning off");
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.debuff[Type] = true;
|
||||
Main.pvpBuff[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
|
||||
@@ -1921,7 +1921,7 @@ namespace CalamityMod.CalPlayer
|
||||
netMessage.Write(CalamityWorld.bossRushStage);
|
||||
netMessage.Send();
|
||||
}
|
||||
for (int doom = 0; doom < 200; doom++)
|
||||
for (int doom = 0; doom < Main.maxNPCs; doom++)
|
||||
{
|
||||
if (Main.npc[doom].active && Main.npc[doom].boss)
|
||||
{
|
||||
@@ -2352,7 +2352,7 @@ namespace CalamityMod.CalPlayer
|
||||
for (int num227 = 0; num227 < num226; num227++)
|
||||
{
|
||||
Vector2 vector6 = Vector2.Normalize(player.velocity) * new Vector2((float)player.width / 2f, (float)player.height) * 0.75f;
|
||||
vector6 = vector6.RotatedBy((double)((float)(num227 - (num226 / 2 - 1)) * 6.28318548f / (float)num226), default) + player.Center;
|
||||
vector6 = vector6.RotatedBy((double)((float)(num227 - (num226 / 2 - 1)) * MathHelper.TwoPi / (float)num226), default) + player.Center;
|
||||
Vector2 vector7 = vector6 - player.Center;
|
||||
int num228 = Dust.NewDust(vector6 + vector7, 0, 0, 235, vector7.X * 1.5f, vector7.Y * 1.5f, 100, default, 1.4f);
|
||||
Main.dust[num228].noGravity = true;
|
||||
@@ -2365,7 +2365,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
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.dontTakeDamage && Vector2.Distance(player.Center, nPC.Center) <= 3000f)
|
||||
@@ -2506,7 +2506,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (sulfurSet && player.controlJump && player.justJumped && player.jumpAgainSandstorm)
|
||||
{
|
||||
int bubble = Projectile.NewProjectile(new Vector2(Main.LocalPlayer.position.X, Main.LocalPlayer.position.Y + (Main.LocalPlayer.gravDir == -1f ? 20 : -20)), new Vector2(0f, 0f), ModContent.ProjectileType<SulphuricAcidBubbleFriendly>(), (int)(20f * (player.allDamage + throwingDamage - 1f)), 0f, Main.LocalPlayer.whoAmI, 1f, 0f);
|
||||
int bubble = Projectile.NewProjectile(new Vector2(Main.LocalPlayer.position.X, Main.LocalPlayer.position.Y + (Main.LocalPlayer.gravDir == -1f ? 20 : -20)), new Vector2(0f, 0f), ModContent.ProjectileType<SulphuricAcidBubbleFriendly>(), (int)(20f * player.RogueDamage()), 0f, Main.LocalPlayer.whoAmI, 1f, 0f);
|
||||
Main.projectile[bubble].Calamity().forceRogue = true;
|
||||
}
|
||||
}
|
||||
@@ -2751,7 +2751,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
player.grappling[0] = -1;
|
||||
player.grapCount = 0;
|
||||
for (int index = 0; index < 1000; ++index)
|
||||
for (int index = 0; index < Main.maxProjectiles; ++index)
|
||||
{
|
||||
if (Main.projectile[index].active && Main.projectile[index].owner == player.whoAmI && Main.projectile[index].aiStyle == 7)
|
||||
{
|
||||
@@ -3257,7 +3257,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (hInferno)
|
||||
{
|
||||
for (int x = 0; x < 200; x++)
|
||||
for (int x = 0; x < Main.maxNPCs; x++)
|
||||
{
|
||||
if (Main.npc[x].active && Main.npc[x].type == ModContent.NPCType<Providence>())
|
||||
{
|
||||
@@ -6353,7 +6353,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (fBarrier || ((sirenBoobs || sirenBoobsAlt) && NPC.downedBoss3))
|
||||
{
|
||||
Main.PlaySound(2, (int)player.position.X, (int)player.position.Y, 27);
|
||||
for (int m = 0; m < 200; m++)
|
||||
for (int m = 0; m < Main.maxNPCs; m++)
|
||||
{
|
||||
if (Main.npc[m].active && !Main.npc[m].friendly)
|
||||
{
|
||||
@@ -6381,7 +6381,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
if (aBrain)
|
||||
{
|
||||
for (int m = 0; m < 200; m++)
|
||||
for (int m = 0; m < Main.maxNPCs; m++)
|
||||
{
|
||||
if (Main.npc[m].active && !Main.npc[m].friendly)
|
||||
{
|
||||
@@ -7015,7 +7015,7 @@ namespace CalamityMod.CalPlayer
|
||||
Rectangle rect = nPC.getRect();
|
||||
if (rectangle.Intersects(rect) && (nPC.noTileCollide || player.CanHit(nPC)))
|
||||
{
|
||||
float num = 50f * (player.allDamage + player.meleeDamage - 1f);
|
||||
float num = 50f * player.MeleeDamage();
|
||||
float num2 = 3f;
|
||||
bool crit = false;
|
||||
if (player.kbGlove)
|
||||
@@ -7063,7 +7063,7 @@ namespace CalamityMod.CalPlayer
|
||||
Rectangle rect = nPC.getRect();
|
||||
if (rectangle.Intersects(rect) && (nPC.noTileCollide || player.CanHit(nPC)))
|
||||
{
|
||||
float num = 1500f * (player.allDamage + player.meleeDamage - 1f);
|
||||
float num = 1500f * player.MeleeDamage();
|
||||
float num2 = 15f;
|
||||
bool crit = false;
|
||||
if (player.kbGlove)
|
||||
@@ -7114,7 +7114,7 @@ namespace CalamityMod.CalPlayer
|
||||
Rectangle rect = nPC.getRect();
|
||||
if (rectangle.Intersects(rect) && (nPC.noTileCollide || player.CanHit(nPC)))
|
||||
{
|
||||
float num = 500f * (player.allDamage + player.meleeDamage - 1f);
|
||||
float num = 500f * player.MeleeDamage();
|
||||
float num2 = 12f;
|
||||
bool crit = false;
|
||||
if (player.kbGlove)
|
||||
@@ -7164,7 +7164,7 @@ namespace CalamityMod.CalPlayer
|
||||
Rectangle rect = nPC.getRect();
|
||||
if (rectangle.Intersects(rect) && (nPC.noTileCollide || player.CanHit(nPC)))
|
||||
{
|
||||
float num = 100f * (player.allDamage + player.meleeDamage - 1f);
|
||||
float num = 100f * player.MeleeDamage();
|
||||
float num2 = 9f;
|
||||
bool crit = false;
|
||||
if (player.kbGlove)
|
||||
@@ -7902,7 +7902,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
rect.Width = 2;
|
||||
rect.Inflate(6, 12);
|
||||
float damage = 800f * (player.allDamage + player.minionDamage - 1f);
|
||||
float damage = 800f * player.MinionDamage();
|
||||
float knockback = 10f;
|
||||
int nPCImmuneTime = 30;
|
||||
int playerImmuneTime = 6;
|
||||
@@ -7918,7 +7918,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
rect2.Width = 2;
|
||||
rect2.Inflate(6, 12);
|
||||
float damage2 = 50f * (player.allDamage + player.minionDamage - 1f);
|
||||
float damage2 = 50f * player.MinionDamage();
|
||||
float knockback2 = 8f;
|
||||
int nPCImmuneTime2 = 30;
|
||||
int playerImmuneTime2 = 6;
|
||||
@@ -7934,7 +7934,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
rect2.Width = 2;
|
||||
rect2.Inflate(6, 12);
|
||||
float damage2 = 25f * (player.allDamage + player.minionDamage - 1f);
|
||||
float damage2 = 25f * player.MinionDamage();
|
||||
float knockback2 = 5f;
|
||||
int nPCImmuneTime2 = 30;
|
||||
int playerImmuneTime2 = 6;
|
||||
|
||||
@@ -751,7 +751,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<OmegaBlueTentacle>()] < 6)
|
||||
{
|
||||
bool[] tentaclesPresent = new bool[6];
|
||||
for (int i = 0; i < 1000; i++)
|
||||
for (int i = 0; i < Main.maxProjectiles; i++)
|
||||
{
|
||||
Projectile projectile = Main.projectile[i];
|
||||
if (projectile.active && projectile.type == ModContent.ProjectileType<OmegaBlueTentacle>() && projectile.owner == Main.myPlayer && projectile.ai[1] >= 0f && projectile.ai[1] < 6f)
|
||||
@@ -1191,7 +1191,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (random == 0)
|
||||
{
|
||||
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)
|
||||
@@ -1274,7 +1274,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (Main.rand.NextBool(15))
|
||||
{
|
||||
int num = 0;
|
||||
for (int i = 0; i < 1000; i++)
|
||||
for (int i = 0; i < Main.maxProjectiles; i++)
|
||||
{
|
||||
if (Main.projectile[i].active && Main.projectile[i].owner == player.whoAmI && Main.projectile[i].type == ModContent.ProjectileType<TheDeadlyMicrobeProjectile>())
|
||||
num++;
|
||||
@@ -1321,7 +1321,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
if (flag)
|
||||
{
|
||||
for (int k = 0; k < 1000; k++)
|
||||
for (int k = 0; k < Main.maxProjectiles; k++)
|
||||
{
|
||||
if (Main.projectile[k].active && Main.projectile[k].owner == player.whoAmI && Main.projectile[k].type == ModContent.ProjectileType<TheDeadlyMicrobeProjectile>() && (center - Main.projectile[k].Center).Length() < 48f)
|
||||
{
|
||||
@@ -1481,7 +1481,7 @@ namespace CalamityMod.CalPlayer
|
||||
// Ceaseless Hunger Potion buff
|
||||
if (modPlayer.ceaselessHunger)
|
||||
{
|
||||
for (int j = 0; j < 400; j++)
|
||||
for (int j = 0; j < Main.maxItems; j++)
|
||||
{
|
||||
if (Main.item[j].active && Main.item[j].noGrabDelay == 0 && Main.item[j].owner == player.whoAmI)
|
||||
{
|
||||
@@ -1547,7 +1547,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (modPlayer.spectralVeil && modPlayer.spectralVeilImmunity > 0)
|
||||
{
|
||||
Rectangle sVeilRectangle = new Rectangle((int)((double)player.position.X + (double)player.velocity.X * 0.5 - 4.0), (int)((double)player.position.Y + (double)player.velocity.Y * 0.5 - 4.0), player.width + 8, player.height + 8);
|
||||
for (int i = 0; i < 200; i++)
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
{
|
||||
if (Main.npc[i].active && !Main.npc[i].dontTakeDamage && !Main.npc[i].friendly && !Main.npc[i].townNPC && Main.npc[i].immune[player.whoAmI] <= 0 && Main.npc[i].damage > 0)
|
||||
{
|
||||
@@ -1585,7 +1585,7 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 1000; i++)
|
||||
for (int i = 0; i < Main.maxProjectiles; i++)
|
||||
{
|
||||
if (Main.projectile[i].active && !Main.projectile[i].friendly && Main.projectile[i].hostile && Main.projectile[i].damage > 0)
|
||||
{
|
||||
@@ -2453,7 +2453,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
for (int m = 0; m < 200; m++)
|
||||
for (int m = 0; m < Main.maxNPCs; m++)
|
||||
{
|
||||
if (Main.npc[m].active && !Main.npc[m].friendly)
|
||||
{
|
||||
@@ -3187,13 +3187,18 @@ namespace CalamityMod.CalPlayer
|
||||
player.buffImmune[BuffID.Venom] = true;
|
||||
if (player.statLife <= (int)((double)player.statLifeMax2 * 0.75))
|
||||
{
|
||||
player.allDamage += 0.03f;
|
||||
player.allDamage += 0.06f;
|
||||
modPlayer.AllCritBoost(3);
|
||||
}
|
||||
if (player.statLife <= (int)((double)player.statLifeMax2 * 0.5))
|
||||
{
|
||||
player.allDamage += 0.05f;
|
||||
modPlayer.AllCritBoost(5);
|
||||
player.allDamage += 0.06f;
|
||||
modPlayer.AllCritBoost(3);
|
||||
}
|
||||
if (player.statLife <= (int)((double)player.statLifeMax2 * 0.25))
|
||||
{
|
||||
player.allDamage += 0.06f;
|
||||
modPlayer.AllCritBoost(3);
|
||||
}
|
||||
if (player.lifeRegen < 0)
|
||||
{
|
||||
@@ -3314,7 +3319,7 @@ namespace CalamityMod.CalPlayer
|
||||
player.ownedProjectileCounts[ModContent.ProjectileType<SandElementalHealer>()] > 1 || player.ownedProjectileCounts[ModContent.ProjectileType<SandElementalMinion>()] > 1 ||
|
||||
player.ownedProjectileCounts[ModContent.ProjectileType<CloudElementalMinion>()] > 1 || player.ownedProjectileCounts[ModContent.ProjectileType<FungalClumpMinion>()] > 1)
|
||||
{
|
||||
for (int projIndex = 0; projIndex < 1000; projIndex++)
|
||||
for (int projIndex = 0; projIndex < Main.maxProjectiles; projIndex++)
|
||||
{
|
||||
if (Main.projectile[projIndex].active && Main.projectile[projIndex].owner == player.whoAmI)
|
||||
{
|
||||
|
||||
@@ -591,6 +591,7 @@ namespace CalamityMod
|
||||
ProjectileID.DD2PhoenixBow,
|
||||
ProjectileID.IchorDart,
|
||||
ProjectileID.PhantasmArrow,
|
||||
ProjectileID.RainbowBack,
|
||||
ModContent.ProjectileType<PhangasmBow>(),
|
||||
ModContent.ProjectileType<ContagionBow>(),
|
||||
ModContent.ProjectileType<DaemonsFlameBow>(),
|
||||
@@ -1308,7 +1309,11 @@ namespace CalamityMod
|
||||
ItemID.MagicDagger,
|
||||
ItemID.BeamSword,
|
||||
ItemID.MonkStaffT2,
|
||||
ItemID.PaladinsHammer
|
||||
ItemID.PaladinsHammer,
|
||||
ItemID.PearlwoodSword,
|
||||
ItemID.PearlwoodBow,
|
||||
ItemID.TaxCollectorsStickOfDoom,
|
||||
ItemID.StylistKilLaKillScissorsIWish
|
||||
};
|
||||
|
||||
quarterDamageNerfList = new List<int>()
|
||||
@@ -3619,8 +3624,6 @@ namespace CalamityMod
|
||||
CalamityWorld.revenge = revActive;
|
||||
break;
|
||||
case CalamityModMessageType.DeathBoolSync:
|
||||
bool revActive2 = reader.ReadBoolean();
|
||||
CalamityWorld.revenge = revActive2;
|
||||
bool deathActive = reader.ReadBoolean();
|
||||
CalamityWorld.death = deathActive;
|
||||
break;
|
||||
@@ -3651,11 +3654,15 @@ namespace CalamityMod
|
||||
case CalamityModMessageType.AcidRainUIDrawFadeSync:
|
||||
CalamityWorld.acidRainExtraDrawTime = reader.ReadInt32();
|
||||
break;
|
||||
case CalamityModMessageType.AcidRainOldDukeSummonSync:
|
||||
CalamityWorld.triedToSummonOldDuke = reader.ReadBoolean();
|
||||
break;
|
||||
default:
|
||||
Logger.Error($"Failed to parse Calamity packet: No Calamity packet exists with ID {msgType}.");
|
||||
break;
|
||||
}
|
||||
} catch(Exception e)
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
if (e is EndOfStreamException eose)
|
||||
Logger.Error("Failed to parse Calamity packet: Packet was too short, missing data, or otherwise corrupt.", eose);
|
||||
@@ -3729,6 +3736,7 @@ namespace CalamityMod
|
||||
DeathModeBlizzardTimeSync,
|
||||
DeathBossSpawnCountdownSync,
|
||||
AcidRainSync,
|
||||
AcidRainUIDrawFadeSync
|
||||
AcidRainUIDrawFadeSync,
|
||||
AcidRainOldDukeSummonSync
|
||||
}
|
||||
}
|
||||
@@ -32,8 +32,6 @@ namespace CalamityMod.Events
|
||||
( ModContent.NPCType<WaterLeech>(), 1 )
|
||||
};
|
||||
|
||||
// Not readonly so that if anyone else wants to add stuff in here with their own mod, they can.
|
||||
// The first value is the NPC type, the second is the value they're worth in the event
|
||||
public static List<(int, int)> PossibleEnemiesAS = new List<(int, int)>()
|
||||
{
|
||||
( ModContent.NPCType<Radiator>(), 0 ),
|
||||
@@ -48,6 +46,19 @@ namespace CalamityMod.Events
|
||||
( ModContent.NPCType<SulfurousSkater>(), 1 )
|
||||
};
|
||||
|
||||
public static List<(int, int)> PossibleEnemiesPolter = new List<(int, int)>()
|
||||
{
|
||||
( ModContent.NPCType<NuclearToad>(), 0 ),
|
||||
( ModContent.NPCType<AcidEel>(), 0 ),
|
||||
( ModContent.NPCType<Orthocera>(), 1 ),
|
||||
( ModContent.NPCType<GammaSlime>(), 1 ),
|
||||
( ModContent.NPCType<WaterLeech>(), 1 ),
|
||||
( ModContent.NPCType<Skyfin>(), 1 ),
|
||||
( ModContent.NPCType<Trilobite>(), 1 ),
|
||||
( ModContent.NPCType<FlakCrab>(), 1 ),
|
||||
( ModContent.NPCType<SulfurousSkater>(), 1 )
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Broadcasts some text from a given localization key.
|
||||
/// </summary>
|
||||
@@ -77,7 +88,11 @@ namespace CalamityMod.Events
|
||||
if (Main.npc[i].active)
|
||||
{
|
||||
int type = Main.npc[i].type;
|
||||
List<(int, int)> PossibleEnemies = CalamityWorld.downedAquaticScourge ? PossibleEnemiesAS : PossibleEnemiesPreHM;
|
||||
List<(int, int)> PossibleEnemies = PossibleEnemiesPreHM;
|
||||
if (CalamityWorld.downedAquaticScourge)
|
||||
PossibleEnemies = PossibleEnemiesAS;
|
||||
if (CalamityWorld.downedPolterghast)
|
||||
PossibleEnemies = PossibleEnemiesPolter;
|
||||
if (PossibleEnemies.Select(enemy => enemy.Item2).Contains(type))
|
||||
{
|
||||
Rectangle invasionCheckArea = new Rectangle((int)Main.npc[i].Center.X - rectangleCheckSize / 2, (int)Main.npc[i].Center.Y - rectangleCheckSize / 2,
|
||||
@@ -97,7 +112,7 @@ namespace CalamityMod.Events
|
||||
/// </summary>
|
||||
public static void TryStartEvent()
|
||||
{
|
||||
if (CalamityWorld.rainingAcid || (!NPC.downedBoss1 && !Main.hardMode))
|
||||
if (CalamityWorld.rainingAcid || (!NPC.downedBoss1 && !Main.hardMode) || CalamityWorld.bossRushActive)
|
||||
return;
|
||||
int playerCount = 0;
|
||||
for (int i = 0; i < Main.player.Length; i++)
|
||||
@@ -126,6 +141,7 @@ namespace CalamityMod.Events
|
||||
// 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;
|
||||
CalamityWorld.triedToSummonOldDuke = false;
|
||||
}
|
||||
UpdateInvasion();
|
||||
BroadcastEventText("Mods.CalamityMod.AcidRainStart"); // A toxic downpour falls over the wasteland seas!
|
||||
@@ -159,10 +175,15 @@ namespace CalamityMod.Events
|
||||
CalamityWorld.downedEoCAcidRain = true;
|
||||
CalamityWorld.downedAquaticScourgeAcidRain = CalamityWorld.downedAquaticScourge;
|
||||
}
|
||||
CalamityWorld.triedToSummonOldDuke = false;
|
||||
CalamityMod.StopRain();
|
||||
}
|
||||
CalamityMod.UpdateServerBoolean();
|
||||
|
||||
// You will be tempted to turn this into a single if conditional.
|
||||
// Don't do this. Doing so has caused so much misery, with various things being read instead
|
||||
// of the correct thing, look booleans being mixed up in the sending and receiving process.
|
||||
// In short, leave this alone.
|
||||
if (Main.netMode == NetmodeID.Server)
|
||||
{
|
||||
var netMessage = CalamityMod.instance.GetPacket();
|
||||
@@ -178,6 +199,13 @@ namespace CalamityMod.Events
|
||||
netMessage.Write(CalamityWorld.acidRainExtraDrawTime);
|
||||
netMessage.Send();
|
||||
}
|
||||
if (Main.netMode == NetmodeID.Server)
|
||||
{
|
||||
var netMessage = CalamityMod.instance.GetPacket();
|
||||
netMessage.Write((byte)CalamityModMessageType.AcidRainOldDukeSummonSync);
|
||||
netMessage.Write(CalamityWorld.triedToSummonOldDuke);
|
||||
netMessage.Send();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 278 B |
|
After Width: | Height: | Size: 372 B |
|
After Width: | Height: | Size: 178 B |
|
After Width: | Height: | Size: 251 B |
|
After Width: | Height: | Size: 284 B |
|
After Width: | Height: | Size: 200 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 422 B After Width: | Height: | Size: 930 B |
|
Before Width: | Height: | Size: 888 B After Width: | Height: | Size: 3.3 KiB |
@@ -10,8 +10,8 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
DisplayName.SetDefault("Old Duke's Scales");
|
||||
Tooltip.SetDefault("While under the effects of a damaging debuff, you gain 10% increased damage and 5% crit\n" +
|
||||
"When below 75% life, you gain 3% increased damage and crit\n" +
|
||||
"When below 50% life, you gain an additional 5% increased damage and crit\n" +
|
||||
"For every 25% of lost life, you gain an additional 6% increased damage and 3% crit\n" +
|
||||
"This will max out at 18% increased damage and 9% crit when under 25% life\n" +
|
||||
"Provides immunity to poisoned, venom, and sulphruic poisoning");
|
||||
}
|
||||
|
||||
@@ -19,10 +19,10 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
item.width = 28;
|
||||
item.height = 26;
|
||||
item.value = Item.buyPrice(0, 60, 0, 0);
|
||||
item.value = Item.buyPrice(0, 80, 0, 0);
|
||||
item.accessory = true;
|
||||
item.rare = 10;
|
||||
item.Calamity().customRarity = (CalamityRarity)12;
|
||||
item.Calamity().postMoonLordRarity = 13;
|
||||
}
|
||||
|
||||
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace CalamityMod.Items.Accessories
|
||||
DisplayName.SetDefault("Dynamo Stem Cells");
|
||||
Tooltip.SetDefault(@"15% increased movement speed
|
||||
Ranged weapons have a chance to fire miniature birbs");
|
||||
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(4, 4));
|
||||
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(6, 5));
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 2.6 KiB |
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
item.width = 24;
|
||||
item.height = 26;
|
||||
item.value = Item.buyPrice(2, 50, 0, 0);
|
||||
item.value = Item.buyPrice(0, 80, 0, 0);
|
||||
item.rare = 10;
|
||||
item.expert = true;
|
||||
item.accessory = true;
|
||||
@@ -35,12 +35,12 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<MutatedTruffleBuff>(), 3600, true);
|
||||
}
|
||||
const int damage = 1800;
|
||||
const int damage = 2000;
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<YoungDuke>()] < 1)
|
||||
{
|
||||
Projectile.NewProjectile(player.Center, Vector2.Zero,
|
||||
ModContent.ProjectileType<YoungDuke>(),
|
||||
(int)(damage * (player.allDamage + player.minionDamage - 1f)),
|
||||
(int)(damage * player.MinionDamage()),
|
||||
6.5f, Main.myPlayer, 0f, 0f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace CalamityMod.Items.Accessories
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Statis' Blessing");
|
||||
Tooltip.SetDefault("Increased max minions by 3 and 10% increased minion damage\n" +
|
||||
Tooltip.SetDefault("Increased max minions by 2 and 10% increased minion damage\n" +
|
||||
"Increased minion knockback\n" +
|
||||
"Minions cause enemies to cry on hit");
|
||||
}
|
||||
@@ -31,7 +31,7 @@ namespace CalamityMod.Items.Accessories
|
||||
modPlayer.tearMinions = true;
|
||||
player.minionKB += 2.5f;
|
||||
player.minionDamage += 0.1f;
|
||||
player.maxMinions += 3;
|
||||
player.maxMinions += 2;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
"Horizontal speed: 6.25\n" +
|
||||
"Acceleration multiplier: 1\n" +
|
||||
"Average vertical speed\n" +
|
||||
"Flight time: 100\n" +
|
||||
"Flight time: 120\n" +
|
||||
"7% increase to all damage\n" +
|
||||
"All melee attacks and projectiles inflict frostburn\n" +
|
||||
"Icicles rain down as you fly\n" +
|
||||
@@ -62,11 +62,11 @@ namespace CalamityMod.Items.Accessories.Wings
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.cryogenSoul = true;
|
||||
player.allDamage += 0.07f;
|
||||
player.wingTimeMax = 100;
|
||||
player.wingTimeMax = 120;
|
||||
player.noFallDmg = true;
|
||||
if (modPlayer.icicleCooldown <= 0)
|
||||
{
|
||||
if (player.controlJump && player.wingTime > 0f && !player.jumpAgainCloud && player.jump == 0 && player.velocity.Y != 0f)
|
||||
if (player.controlJump && !player.jumpAgainCloud && player.jump == 0 && player.velocity.Y != 0f)
|
||||
{
|
||||
int p = Projectile.NewProjectile(player.Center.X, player.Center.Y, player.velocity.X * 0f, 2f, ModContent.ProjectileType<FrostShardFriendly>(), 25, 3f, player.whoAmI);
|
||||
Main.projectile[p].minion = false;
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace CalamityMod.Items
|
||||
if (CalamityMod.weaponAutoreuseList?.Contains(item.type) ?? false)
|
||||
item.autoReuse = true;
|
||||
|
||||
if (item.type == ItemID.PsychoKnife)
|
||||
if (item.type == ItemID.PsychoKnife || item.type == ItemID.PearlwoodSword || item.type == ItemID.PearlwoodBow || item.type == ItemID.TaxCollectorsStickOfDoom)
|
||||
item.damage *= 4;
|
||||
else if (item.type == ItemID.SpectreStaff)
|
||||
item.damage *= 3;
|
||||
@@ -154,8 +154,26 @@ namespace CalamityMod.Items
|
||||
item.rare = 10;
|
||||
}
|
||||
|
||||
if(item.type == ItemID.SuspiciousLookingTentacle)
|
||||
if (item.type == ItemID.SuspiciousLookingTentacle)
|
||||
item.expert = true;
|
||||
|
||||
if (item.type == ItemID.PearlwoodHammer)
|
||||
{
|
||||
item.hammer += 35; //80% hammer power
|
||||
item.useAnimation = 20;
|
||||
item.useTime = 15;
|
||||
item.damage *= 4;
|
||||
item.tileBoost += 1;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -336,6 +354,23 @@ namespace CalamityMod.Items
|
||||
Main.PlaySound(SoundID.Item11.WithPitchVariance(0.05f), position); // <--- This is optional; if using, add "item.UseSound = null" to GlobalItem.SetDefaults when checking for the Star Cannon's ID
|
||||
return false;
|
||||
}
|
||||
if (item.type == ItemID.PearlwoodBow)
|
||||
{
|
||||
for (int i = 0; i < Main.maxProjectiles; i++)
|
||||
{
|
||||
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)
|
||||
{
|
||||
Vector2 perturbedSpeed = new Vector2(speedX, speedY).RotatedBy(MathHelper.ToRadians(i));
|
||||
int rainbow = Projectile.NewProjectile(position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, ProjectileID.RainbowFront, damage, 0f, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[rainbow].Calamity().forceRanged = true;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
@@ -465,7 +500,7 @@ namespace CalamityMod.Items
|
||||
{
|
||||
Vector2 perturbedspeed = new Vector2(correctedVelocity.X, correctedVelocity.Y + Main.rand.Next(-3, 4)).RotatedBy(MathHelper.ToRadians(spread));
|
||||
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y - 10, perturbedspeed.X, perturbedspeed.Y, ModContent.ProjectileType<ProfanedCrystalMeleeSpear>(), (int)((shouldNerf ? 500 : 1750) * (player.allDamage + player.minionDamage - 1f)), 1f, player.whoAmI, Main.rand.NextBool(player.Calamity().profanedSoulWeaponUsage == 4 ? 5 : 7) ? 1f : 0f);
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y - 10, perturbedspeed.X, perturbedspeed.Y, ModContent.ProjectileType<ProfanedCrystalMeleeSpear>(), (int)((shouldNerf ? 1000 : 1750) * player.MinionDamage()), 1f, player.whoAmI, Main.rand.NextBool(player.Calamity().profanedSoulWeaponUsage == 4 ? 5 : 7) ? 1f : 0f);
|
||||
spread -= Main.rand.Next(2, 4);
|
||||
Main.PlaySound(SoundID.Item20, player.Center);
|
||||
}
|
||||
@@ -473,7 +508,7 @@ namespace CalamityMod.Items
|
||||
}
|
||||
else
|
||||
{
|
||||
Projectile.NewProjectile(player.Center, correctedVelocity * 6.9f, ModContent.ProjectileType<ProfanedCrystalMeleeSpear>(), (int)((shouldNerf ? 250 : 1250) * (player.allDamage + player.minionDamage - 1f)), 1f, player.whoAmI, Main.rand.NextBool(player.Calamity().profanedSoulWeaponUsage == 4 ? 5 : 7) ? 1f : 0f, 1f);
|
||||
Projectile.NewProjectile(player.Center, correctedVelocity * 6.9f, ModContent.ProjectileType<ProfanedCrystalMeleeSpear>(), (int)((shouldNerf ? 500 : 1250) * player.MinionDamage()), 1f, player.whoAmI, Main.rand.NextBool(player.Calamity().profanedSoulWeaponUsage == 4 ? 5 : 7) ? 1f : 0f, 1f);
|
||||
Main.PlaySound(SoundID.Item20, player.Center);
|
||||
}
|
||||
|
||||
@@ -491,7 +526,7 @@ namespace CalamityMod.Items
|
||||
bool isSmallBoomer = Main.rand.NextDouble() <= (enrage ? 0.2 : 0.3); // 20% chance if enraged, else 30% This is intentional due to literally doubling the amount of projectiles fired.
|
||||
bool isThiccBoomer = isSmallBoomer && Main.rand.NextDouble() <= 0.05; // 5%
|
||||
int projType = isSmallBoomer ? isThiccBoomer ? 1 : 2 : 3;
|
||||
int dam = (int)((shouldNerf ? 250 : 1000) * (player.allDamage + player.minionDamage - 1f));
|
||||
int dam = (int)((shouldNerf ? 500 : 1000) * player.MinionDamage());
|
||||
switch (projType)
|
||||
{
|
||||
case 1: //big boomer
|
||||
@@ -530,7 +565,7 @@ namespace CalamityMod.Items
|
||||
player.statMana -= manaCost;
|
||||
correctedVelocity *= 25f;
|
||||
Main.PlaySound(SoundID.Item20, player.Center);
|
||||
int dam = (int)((shouldNerf ? 900 : 4500) * (player.allDamage + player.minionDamage - 1f));
|
||||
int dam = (int)((shouldNerf ? 1800 : 4500) * player.MinionDamage());
|
||||
if (player.HasBuff(BuffID.ManaSickness))
|
||||
{
|
||||
int sickPenalty = (int)(dam * (0.05f * ((player.buffTime[player.FindBuffIndex(BuffID.ManaSickness)] + 60) / 60)));
|
||||
@@ -555,7 +590,7 @@ namespace CalamityMod.Items
|
||||
for (float i = 0; i < crystalCount; i++)
|
||||
{
|
||||
float angle = MathHelper.TwoPi / crystalCount * i;
|
||||
int proj = Projectile.NewProjectile(player.Center, angle.ToRotationVector2() * 8f, ModContent.ProjectileType<ProfanedCrystalRogueShard>(), (int)((shouldNerf ? 169 : 880) * (player.allDamage + player.minionDamage - 1f)), 1f, player.whoAmI, 0f, 0f);
|
||||
int proj = Projectile.NewProjectile(player.Center, angle.ToRotationVector2() * 8f, ModContent.ProjectileType<ProfanedCrystalRogueShard>(), (int)((shouldNerf ? 300 : 880) * player.MinionDamage()), 1f, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[proj].Calamity().forceMinion = true;
|
||||
Main.PlaySound(SoundID.Item20, player.Center);
|
||||
}
|
||||
@@ -564,7 +599,7 @@ namespace CalamityMod.Items
|
||||
else if (player.Calamity().profanedSoulWeaponUsage % (enrage ? 5 : 10) == 0)
|
||||
{
|
||||
float angle = MathHelper.TwoPi / (enrage ? 9 : 18) * (player.Calamity().profanedSoulWeaponUsage / (enrage ? 1 : 10));
|
||||
int proj = Projectile.NewProjectile(player.Center, angle.ToRotationVector2() * 8f, ModContent.ProjectileType<ProfanedCrystalRogueShard>(), (int)((shouldNerf ? 220 : 1100) * (player.allDamage + player.minionDamage - 1f)), 1f, player.whoAmI, 1f, 0f);
|
||||
int proj = Projectile.NewProjectile(player.Center, angle.ToRotationVector2() * 8f, ModContent.ProjectileType<ProfanedCrystalRogueShard>(), (int)((shouldNerf ? 400 : 1100) * player.MinionDamage()), 1f, player.whoAmI, 1f, 0f);
|
||||
Main.projectile[proj].Calamity().forceMinion = true;
|
||||
Main.PlaySound(SoundID.Item20, player.Center);
|
||||
}
|
||||
@@ -649,7 +684,7 @@ namespace CalamityMod.Items
|
||||
}
|
||||
if (item.type == ItemID.MonkStaffT1)
|
||||
{
|
||||
for (int i = 0; i < 1000; ++i)
|
||||
for (int i = 0; i < Main.maxProjectiles; ++i)
|
||||
{
|
||||
if (Main.projectile[i].active && Main.projectile[i].owner == Main.myPlayer && Main.projectile[i].type == item.shoot)
|
||||
{
|
||||
@@ -2247,7 +2282,7 @@ Provides heat and cold protection in Death Mode";
|
||||
}
|
||||
if (item.accessory)
|
||||
{
|
||||
if (item.prefix == 67)
|
||||
if (item.prefix == PrefixID.Precise)
|
||||
{
|
||||
foreach (TooltipLine line2 in tooltips)
|
||||
{
|
||||
@@ -2257,7 +2292,7 @@ Provides heat and cold protection in Death Mode";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (item.prefix == 68)
|
||||
if (item.prefix == PrefixID.Lucky)
|
||||
{
|
||||
foreach (TooltipLine line2 in tooltips)
|
||||
{
|
||||
@@ -2267,7 +2302,7 @@ Provides heat and cold protection in Death Mode";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (item.prefix == 62)
|
||||
if (item.prefix == PrefixID.Hard)
|
||||
{
|
||||
string defenseBoost = "+1 defense\n";
|
||||
if (NPC.downedMoonlord)
|
||||
@@ -2286,7 +2321,7 @@ Provides heat and cold protection in Death Mode";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (item.prefix == 63)
|
||||
if (item.prefix == PrefixID.Guarding)
|
||||
{
|
||||
string defenseBoost = "+2 defense\n";
|
||||
if (NPC.downedMoonlord)
|
||||
@@ -2305,7 +2340,7 @@ Provides heat and cold protection in Death Mode";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (item.prefix == 64)
|
||||
if (item.prefix == PrefixID.Armored)
|
||||
{
|
||||
string defenseBoost = "+3 defense\n";
|
||||
if (NPC.downedMoonlord)
|
||||
@@ -2324,7 +2359,7 @@ Provides heat and cold protection in Death Mode";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (item.prefix == 65)
|
||||
if (item.prefix == PrefixID.Warding)
|
||||
{
|
||||
string defenseBoost = "+4 defense\n";
|
||||
if (NPC.downedMoonlord)
|
||||
@@ -2520,6 +2555,8 @@ Provides heat and cold protection in Death Mode";
|
||||
return "Eskimo";
|
||||
if (head.type == ItemID.MeteorHelmet && body.type == ItemID.MeteorSuit && legs.type == ItemID.MeteorLeggings)
|
||||
return "Meteor";
|
||||
if (head.type == ItemID.PearlwoodHelmet && body.type == ItemID.PearlwoodBreastplate && legs.type == ItemID.PearlwoodGreaves)
|
||||
return "Pearlwood";
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -3048,7 +3085,7 @@ Provides heat and cold protection in Death Mode";
|
||||
bool flag = false;
|
||||
bool canShoot = false;
|
||||
|
||||
for (int i = 54; i < 58; i++)
|
||||
for (int i = 54; i < Main.maxInventory; i++)
|
||||
{
|
||||
if (player.inventory[i].ammo == item.useAmmo && (player.inventory[i].stack >= ammoConsumed || !player.inventory[i].consumable))
|
||||
{
|
||||
@@ -3078,7 +3115,7 @@ Provides heat and cold protection in Death Mode";
|
||||
bool flag = false;
|
||||
bool dontConsumeAmmo = false;
|
||||
|
||||
for (int i = 54; i < 58; i++)
|
||||
for (int i = 54; i < Main.maxInventory; i++)
|
||||
{
|
||||
if (player.inventory[i].ammo == item.useAmmo && player.inventory[i].stack >= ammoConsumed)
|
||||
{
|
||||
|
||||
@@ -78,10 +78,8 @@ namespace CalamityMod.Items.DifficultyItems
|
||||
if (Main.netMode == NetmodeID.Server)
|
||||
{
|
||||
var netMessage = mod.GetPacket();
|
||||
netMessage.Write((uint)CalamityModMessageType.ArmageddonBoolSync);
|
||||
netMessage.Write((byte)CalamityModMessageType.ArmageddonBoolSync);
|
||||
netMessage.Write(CalamityWorld.armageddon);
|
||||
netMessage.Write((uint)CalamityModMessageType.DoGCountdownSync);
|
||||
netMessage.Write(CalamityWorld.DoGSecondStageCountdown);
|
||||
netMessage.Send();
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -93,12 +93,24 @@ namespace CalamityMod.Items.DifficultyItems
|
||||
|
||||
CalamityMod.UpdateServerBoolean();
|
||||
|
||||
if (Main.netMode == NetmodeID.Server)
|
||||
{
|
||||
var netMessage = mod.GetPacket();
|
||||
netMessage.Write((byte)CalamityModMessageType.RevengeanceBoolSync);
|
||||
netMessage.Write(CalamityWorld.revenge);
|
||||
netMessage.Send();
|
||||
}
|
||||
if (Main.netMode == NetmodeID.Server)
|
||||
{
|
||||
var netMessage = mod.GetPacket();
|
||||
netMessage.Write((byte)CalamityModMessageType.DeathBoolSync);
|
||||
netMessage.Write(CalamityWorld.death);
|
||||
netMessage.Write((uint)CalamityModMessageType.DoGCountdownSync);
|
||||
netMessage.Send();
|
||||
}
|
||||
if (Main.netMode == NetmodeID.Server)
|
||||
{
|
||||
var netMessage = mod.GetPacket();
|
||||
netMessage.Write((byte)CalamityModMessageType.DoGCountdownSync);
|
||||
netMessage.Write(CalamityWorld.DoGSecondStageCountdown);
|
||||
netMessage.Send();
|
||||
}
|
||||
|
||||
@@ -88,11 +88,21 @@ namespace CalamityMod.Items.DifficultyItems
|
||||
if (Main.netMode == NetmodeID.Server)
|
||||
{
|
||||
var netMessage = mod.GetPacket();
|
||||
netMessage.Write((byte)CalamityModMessageType.RevengeanceBoolSync);
|
||||
netMessage.Write(CalamityWorld.revenge);
|
||||
netMessage.Write((byte)CalamityModMessageType.DefiledBoolSync);
|
||||
netMessage.Write(CalamityWorld.defiled);
|
||||
netMessage.Write((uint)CalamityModMessageType.DoGCountdownSync);
|
||||
netMessage.Send();
|
||||
}
|
||||
if (Main.netMode == NetmodeID.Server)
|
||||
{
|
||||
var netMessage = mod.GetPacket();
|
||||
netMessage.Write((byte)CalamityModMessageType.RevengeanceBoolSync);
|
||||
netMessage.Write(CalamityWorld.revenge);
|
||||
netMessage.Send();
|
||||
}
|
||||
if (Main.netMode == NetmodeID.Server)
|
||||
{
|
||||
var netMessage = mod.GetPacket();
|
||||
netMessage.Write((byte)CalamityModMessageType.DoGCountdownSync);
|
||||
netMessage.Write(CalamityWorld.DoGSecondStageCountdown);
|
||||
netMessage.Send();
|
||||
}
|
||||
|
||||
@@ -87,7 +87,12 @@ namespace CalamityMod.Items.DifficultyItems
|
||||
var netMessage = mod.GetPacket();
|
||||
netMessage.Write((byte)CalamityModMessageType.IronHeartBoolSync);
|
||||
netMessage.Write(CalamityWorld.ironHeart);
|
||||
netMessage.Write((uint)CalamityModMessageType.DoGCountdownSync);
|
||||
netMessage.Send();
|
||||
}
|
||||
if (Main.netMode == NetmodeID.Server)
|
||||
{
|
||||
var netMessage = mod.GetPacket();
|
||||
netMessage.Write((byte)CalamityModMessageType.DoGCountdownSync);
|
||||
netMessage.Write(CalamityWorld.DoGSecondStageCountdown);
|
||||
netMessage.Send();
|
||||
}
|
||||
|
||||
@@ -133,7 +133,12 @@ namespace CalamityMod.Items.DifficultyItems
|
||||
var netMessage = mod.GetPacket();
|
||||
netMessage.Write((byte)CalamityModMessageType.RevengeanceBoolSync);
|
||||
netMessage.Write(CalamityWorld.revenge);
|
||||
netMessage.Write((uint)CalamityModMessageType.DoGCountdownSync);
|
||||
netMessage.Send();
|
||||
}
|
||||
if (Main.netMode == NetmodeID.Server)
|
||||
{
|
||||
var netMessage = mod.GetPacket();
|
||||
netMessage.Write((byte)CalamityModMessageType.DoGCountdownSync);
|
||||
netMessage.Write(CalamityWorld.DoGSecondStageCountdown);
|
||||
netMessage.Send();
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CalamityMod.Items.Materials
|
||||
{
|
||||
DisplayName.SetDefault("Effulgent Feather");
|
||||
Tooltip.SetDefault("It vibrates with fluffy golden energy");
|
||||
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(3, 12));
|
||||
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(3, 11));
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 752 B After Width: | Height: | Size: 820 B |
|
Before Width: | Height: | Size: 498 B After Width: | Height: | Size: 716 B |
@@ -35,6 +35,7 @@ namespace CalamityMod.Items.SummonItems.Invasion
|
||||
else
|
||||
{
|
||||
CalamityWorld.acidRainPoints = 0;
|
||||
CalamityWorld.triedToSummonOldDuke = false;
|
||||
AcidRainEvent.UpdateInvasion(false);
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Tools
|
||||
item.melee = true;
|
||||
item.width = 70;
|
||||
item.height = 70;
|
||||
item.useTime = 38;
|
||||
item.useTime = 14;
|
||||
item.useAnimation = 38;
|
||||
item.useTurn = true;
|
||||
item.hammer = 110;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Tools
|
||||
item.melee = true;
|
||||
item.width = 44;
|
||||
item.height = 44;
|
||||
item.useTime = 26;
|
||||
item.useTime = 18;
|
||||
item.useAnimation = 26;
|
||||
item.useTurn = true;
|
||||
item.axe = 25;
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Tools
|
||||
item.melee = true;
|
||||
item.width = 60;
|
||||
item.height = 70;
|
||||
item.useTime = 10;
|
||||
item.useTime = 8;
|
||||
item.useAnimation = 20;
|
||||
item.useTurn = true;
|
||||
item.axe = 30;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Tools
|
||||
item.melee = true;
|
||||
item.width = 66;
|
||||
item.height = 56;
|
||||
item.useTime = 27;
|
||||
item.useTime = 7;
|
||||
item.useAnimation = 27;
|
||||
item.useTurn = true;
|
||||
item.axe = 30;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Tools
|
||||
item.melee = true;
|
||||
item.width = 50;
|
||||
item.height = 50;
|
||||
item.useTime = 31;
|
||||
item.useTime = 6;
|
||||
item.useAnimation = 31;
|
||||
item.useTurn = true;
|
||||
item.axe = 40;
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Tools
|
||||
item.melee = true;
|
||||
item.width = 36;
|
||||
item.height = 36;
|
||||
item.useTime = 25;
|
||||
item.useTime = 18;
|
||||
item.useAnimation = 25;
|
||||
item.useTurn = true;
|
||||
item.axe = 15;
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Tools
|
||||
item.melee = true;
|
||||
item.width = 60;
|
||||
item.height = 46;
|
||||
item.useTime = 16;
|
||||
item.useTime = 8;
|
||||
item.useAnimation = 16;
|
||||
item.useTurn = true;
|
||||
item.axe = 27;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Tools
|
||||
item.melee = true;
|
||||
item.width = 44;
|
||||
item.height = 44;
|
||||
item.useTime = 29;
|
||||
item.useTime = 21;
|
||||
item.useAnimation = 29;
|
||||
item.useTurn = true;
|
||||
item.axe = 13;
|
||||
|
||||
@@ -28,6 +28,7 @@ namespace CalamityMod.Items.Tools
|
||||
item.rare = 1;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.autoReuse = true;
|
||||
item.tileBoost += 1;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
@@ -28,6 +28,7 @@ namespace CalamityMod.Items.Tools
|
||||
item.rare = 1;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.autoReuse = true;
|
||||
item.tileBoost += 1;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
|
||||
|
Before Width: | Height: | Size: 785 B After Width: | Height: | Size: 1.1 KiB |
@@ -44,7 +44,6 @@ namespace CalamityMod.Items.TreasureBags
|
||||
DropHelper.DropItemChance(player, ModContent.ItemType<InsidiousImpaler>(), 3);
|
||||
DropHelper.DropItemChance(player, ModContent.ItemType<SepticSkewer>(), 3);
|
||||
DropHelper.DropItemChance(player, ModContent.ItemType<FetidEmesis>(), 3);
|
||||
DropHelper.DropItemChance(player, ModContent.ItemType<Miasma>(), 3);
|
||||
DropHelper.DropItemChance(player, ModContent.ItemType<VitriolicViper>(), 3);
|
||||
DropHelper.DropItemChance(player, ModContent.ItemType<ToxicantTwister>(), 3);
|
||||
DropHelper.DropItemChance(player, ModContent.ItemType<CadaverousCarrion>(), 3);
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
item.rare = 9;
|
||||
item.UseSound = SoundID.Item67;
|
||||
item.autoReuse = true;
|
||||
item.shoot = 250;
|
||||
item.shoot = ProjectileID.RainbowFront;
|
||||
item.shootSpeed = 18f;
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ItemID.RainbowGun);
|
||||
recipe.AddIngredient(ItemID.PearlwoodBow);
|
||||
recipe.AddIngredient(ModContent.ItemType<MeldiateBar>(), 5);
|
||||
recipe.AddIngredient(ModContent.ItemType<CoreofCalamity>());
|
||||
recipe.AddIngredient(ModContent.ItemType<BarofLife>(), 5);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using CalamityMod.Items.Materials;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -17,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 135;
|
||||
item.damage = 50;
|
||||
item.magic = true;
|
||||
item.mana = 16;
|
||||
item.width = 50;
|
||||
@@ -26,9 +27,8 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
item.useStyle = ItemUseStyleID.HoldingOut;
|
||||
item.noMelee = true;
|
||||
item.knockBack = 3f;
|
||||
item.value = Item.buyPrice(1, 40, 0, 0);
|
||||
item.Calamity().postMoonLordRarity = 13;
|
||||
item.rare = 10;
|
||||
item.value = Item.buyPrice(0, 36, 0, 0);
|
||||
item.rare = 5;
|
||||
item.UseSound = SoundID.Item8;
|
||||
item.autoReuse = true;
|
||||
item.shoot = ModContent.ProjectileType<MiasmaGas>();
|
||||
@@ -40,10 +40,21 @@ 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(23f);
|
||||
float angle = Main.rand.NextFloat(-1f, 1f) * MathHelper.ToRadians(25f);
|
||||
Projectile.NewProjectile(position, velocity.RotatedBy(angle), type, damage, knockBack, player.whoAmI);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ItemID.NimbusRod);
|
||||
recipe.AddIngredient(ModContent.ItemType<AquamarineStaff>());
|
||||
recipe.AddIngredient(ModContent.ItemType<CorrodedFossil>(), 10);
|
||||
recipe.AddTile(TileID.MythrilAnvil);
|
||||
recipe.SetResult(this);
|
||||
recipe.AddRecipe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 809 B |
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 121;
|
||||
item.damage = 150;
|
||||
item.magic = true;
|
||||
item.mana = 15;
|
||||
item.width = 60;
|
||||
@@ -32,14 +32,14 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
item.UseSound = SoundID.Item46;
|
||||
item.autoReuse = true;
|
||||
item.shoot = ModContent.ProjectileType<VitriolicViperSpit>();
|
||||
item.shootSpeed = 10f;
|
||||
item.shootSpeed = 15f;
|
||||
}
|
||||
|
||||
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(20f + Main.rand.NextFloat(-2f, 2f));
|
||||
float fangAngleMax = MathHelper.ToRadians(10f + Main.rand.NextFloat(-1f, 1f));
|
||||
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++)
|
||||
{
|
||||
float angle = MathHelper.Lerp(i / 9f, -spitAngleMax, spitAngleMax);
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
public class Bonebreaker : ModItem
|
||||
{
|
||||
public const int BaseDamage = 70;
|
||||
public const int BaseDamage = 60;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
@@ -20,8 +20,8 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.useStyle = 1;
|
||||
item.useAnimation = 10;
|
||||
item.useTime = 10;
|
||||
item.useAnimation = 15;
|
||||
item.useTime = 15;
|
||||
item.width = 32;
|
||||
item.height = 32;
|
||||
item.damage = BaseDamage;
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
for (int i = 0; i < 1000; ++i)
|
||||
for (int i = 0; i < Main.maxProjectiles; ++i)
|
||||
{
|
||||
if (Main.projectile[i].active && Main.projectile[i].owner == Main.myPlayer && Main.projectile[i].type == item.shoot)
|
||||
{
|
||||
|
||||
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 1.3 KiB |
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 66;
|
||||
item.damage = 649;
|
||||
item.damage = 400;
|
||||
item.melee = true;
|
||||
item.noMelee = true;
|
||||
item.useTurn = true;
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 108;
|
||||
item.damage = 170;
|
||||
item.ranged = true;
|
||||
item.width = 76;
|
||||
item.height = 46;
|
||||
|
||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 881 B |
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 472;
|
||||
item.damage = 501;
|
||||
item.ranged = true;
|
||||
item.width = 46;
|
||||
item.height = 24;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
|
||||
public override void SafeSetDefaults()
|
||||
{
|
||||
item.damage = 14;
|
||||
item.damage = 9;
|
||||
item.width = item.height = 24;
|
||||
item.useAnimation = item.useTime = 31;
|
||||
item.noMelee = true;
|
||||
|
||||
@@ -19,10 +19,10 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
item.width = 42;
|
||||
item.height = 46;
|
||||
item.damage = 540;
|
||||
item.damage = 820;
|
||||
item.noMelee = true;
|
||||
item.noUseGraphic = true;
|
||||
item.useAnimation = item.useTime = 30;
|
||||
item.useAnimation = item.useTime = 20;
|
||||
item.useStyle = 1;
|
||||
item.knockBack = 5f;
|
||||
item.UseSound = SoundID.Item1;
|
||||
@@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
item.Calamity().postMoonLordRarity = 13;
|
||||
item.rare = 10;
|
||||
item.shoot = ModContent.ProjectileType<ToxicantTwisterProjectile>();
|
||||
item.shootSpeed = 12f;
|
||||
item.shootSpeed = 18f;
|
||||
item.Calamity().rogue = true;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,6 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
Main.projectile[stealth].velocity *= 1.5f;
|
||||
Main.projectile[stealth].timeLeft = 420;
|
||||
Main.projectile[stealth].penetrate = -1;
|
||||
Main.projectile[stealth].usesLocalNPCImmunity = true;
|
||||
Main.projectile[stealth].localNPCHitCooldown = 6;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 540;
|
||||
item.damage = 680;
|
||||
item.mana = 32;
|
||||
item.summon = true;
|
||||
item.sentry = true;
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 20;
|
||||
item.damage = 8;
|
||||
item.mana = 10;
|
||||
item.width = 10;
|
||||
item.height = 32;
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
item.UseSound = SoundID.DD2_DarkMageHealImpact;
|
||||
item.summon = true;
|
||||
item.mana = 12;
|
||||
item.damage = 80;
|
||||
item.damage = 50;
|
||||
item.knockBack = 2f;
|
||||
item.autoReuse = true;
|
||||
item.useTime = item.useAnimation = 15;
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 97;
|
||||
item.damage = 50;
|
||||
item.mana = 12;
|
||||
item.width = item.height = 32;
|
||||
item.useTime = item.useAnimation = 25;
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 70;
|
||||
item.damage = 75;
|
||||
item.mana = 10;
|
||||
item.width = 46;
|
||||
item.height = 28;
|
||||
@@ -69,7 +69,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
projectile2.Kill();
|
||||
}
|
||||
}
|
||||
float damageMult = ((float)Math.Log(viruliSlots, 8f)) + 1f;
|
||||
float damageMult = ((float)Math.Log(viruliSlots, 10f)) + 1f;
|
||||
position = Main.MouseWorld;
|
||||
speedX = 0;
|
||||
speedY = 0;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 330;
|
||||
item.damage = 260;
|
||||
item.mana = 12;
|
||||
item.width = item.height = 32;
|
||||
item.useTime = item.useAnimation = 10;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Summon
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 100;
|
||||
item.damage = 54;
|
||||
item.mana = 10;
|
||||
item.width = 28;
|
||||
item.height = 20;
|
||||
|
||||
@@ -106,8 +106,8 @@ namespace CalamityMod
|
||||
|
||||
private static readonly Dictionary<string, float> InvasionDifficulty = new Dictionary<string, float>
|
||||
{
|
||||
{ "Acid Rain Initial", 2.5f },
|
||||
{ "Acid Rain Aquatic Scourge", 8.8f }
|
||||
{ "Acid Rain Initial", 2.4f },
|
||||
{ "Acid Rain Aquatic Scourge", 8.51f }
|
||||
};
|
||||
|
||||
public static void Setup()
|
||||
@@ -490,7 +490,7 @@ namespace CalamityMod
|
||||
BossDifficulty.TryGetValue("OldDuke", out float order);
|
||||
List<int> bosses = new List<int>() { NPCType<OldDuke>() };
|
||||
int summon = ItemType<BloodwormItem>();
|
||||
List<int> loot = new List<int>() { ItemType<OldDukeBag>(), ItemType<InsidiousImpaler>(), ItemType<SepticSkewer>(), ItemType<FetidEmesis>(), ItemType<VitriolicViper>(), ItemType<Miasma>(), ItemType<CadaverousCarrion>(), ItemType<ToxicantTwister>(), ItemType<DukeScales>(), ItemType<MutatedTruffle>(), ItemID.SuperHealingPotion };
|
||||
List<int> loot = new List<int>() { ItemType<OldDukeBag>(), ItemType<InsidiousImpaler>(), ItemType<SepticSkewer>(), ItemType<FetidEmesis>(), ItemType<VitriolicViper>(), ItemType<CadaverousCarrion>(), ItemType<ToxicantTwister>(), ItemType<DukeScales>(), ItemType<MutatedTruffle>(), ItemID.SuperHealingPotion };
|
||||
List<int> collection = new List<int>() { ItemType<OldDukeTrophy>(), ItemType<OldDukeMask>(), ItemType<KnowledgeOldDuke>() };
|
||||
string instructions = $"Defeat the Acid Rain event post-Polterghast or fish using a [i:{summon}] in the Sulphurous Sea";
|
||||
string despawn = CalamityUtils.ColorMessage("The old duke disappears amidst the acidic downpour.", new Color(0xF0, 0xE6, 0x8C));
|
||||
@@ -549,7 +549,7 @@ namespace CalamityMod
|
||||
List<int> collection = new List<int>() { ItemType<RadiatingCrystal>() };
|
||||
string instructions = $"Use a [i:{summon}] or wait for the invasion to occur naturally after the Eye of Cthulhu is defeated.";
|
||||
string despawn = CalamityUtils.ColorMessage("The mysterious creatures of the sulphuric sea descended back into the ocean.", new Color(146, 183, 116));
|
||||
string bossLogTex = "CalamityMod/NPCs/DesertScourge/DesertScourge_BossChecklist";
|
||||
string bossLogTex = "CalamityMod/Events/AcidRainT1_BossChecklist";
|
||||
string iconTexture = "CalamityMod/ExtraTextures/UI/AcidRainIcon";
|
||||
AddInvasion(bossChecklist, calamity, "Acid Rain", order, enemies, DownedAcidRainInitial, summon, loot, collection, instructions, despawn, bossLogTex, iconTexture);
|
||||
}
|
||||
@@ -562,9 +562,9 @@ namespace CalamityMod
|
||||
List<int> collection = new List<int>() { ItemType<RadiatingCrystal>() };
|
||||
string instructions = $"Use a [i:{summon}] or wait for the invasion to occur naturally after the Aquatic Scourge is defeated";
|
||||
string despawn = CalamityUtils.ColorMessage("The mysterious creatures of the sulphuric sea descended back into the deep ocean.", new Color(146, 183, 116));
|
||||
string bossLogTex = "CalamityMod/NPCs/DesertScourge/DesertScourge_BossChecklist";
|
||||
string bossLogTex = "CalamityMod/Events/AcidRainT1_BossChecklist";
|
||||
string iconTexture = "CalamityMod/ExtraTextures/UI/AcidRainIcon";
|
||||
AddInvasion(bossChecklist, calamity, "Acid Rain (Post-Aquatic Scourge)", order, enemies, DownedAcidRainHardmode, summon, loot, collection, instructions, despawn, bossLogTex, iconTexture);
|
||||
AddInvasion(bossChecklist, calamity, "Acid Rain (Post-AS)", order, enemies, DownedAcidRainHardmode, summon, loot, collection, instructions, despawn, bossLogTex, iconTexture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
|
||||
if (CalamityWorld.downedPolterghast)
|
||||
{
|
||||
npc.damage = 260;
|
||||
npc.damage = 160;
|
||||
npc.lifeMax = 6650;
|
||||
npc.defense = 45;
|
||||
}
|
||||
|
||||
@@ -124,8 +124,6 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
{
|
||||
npc.frame.Y = 0;
|
||||
}
|
||||
if (npc.ai[1] <= 8)
|
||||
npc.frame.Y = frameHeight;
|
||||
}
|
||||
}
|
||||
public override float SpawnChance(NPCSpawnInfo spawnInfo)
|
||||
|
||||
@@ -6,6 +6,7 @@ using CalamityMod.Projectiles.Enemy;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.IO;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -26,12 +27,10 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
|
||||
npc.damage = 0;
|
||||
npc.lifeMax = 700;
|
||||
npc.defense = 10;
|
||||
|
||||
if (CalamityWorld.downedPolterghast)
|
||||
{
|
||||
npc.lifeMax = 7500;
|
||||
npc.defense = 80;
|
||||
}
|
||||
|
||||
npc.knockBackResist = 0f;
|
||||
@@ -48,6 +47,16 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
banner = npc.type;
|
||||
bannerItem = ModContent.ItemType<FlakCrabBanner>();
|
||||
}
|
||||
public override void SendExtraAI(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(npc.localAI[0]);
|
||||
writer.Write(npc.localAI[1]);
|
||||
}
|
||||
public override void ReceiveExtraAI(BinaryReader reader)
|
||||
{
|
||||
npc.localAI[0] = reader.ReadSingle();
|
||||
npc.localAI[1] = reader.ReadSingle();
|
||||
}
|
||||
public override void ScaleExpertStats(int numPlayers, float bossLifeScale)
|
||||
{
|
||||
npc.lifeMax = (int)(npc.lifeMax * 0.8f * bossLifeScale);
|
||||
@@ -57,9 +66,14 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
{
|
||||
Player closest = Main.player[Player.FindClosest(npc.Top, 0, 0)];
|
||||
|
||||
npc.defense = npc.localAI[1] < 10f ? 999999 : 20;
|
||||
|
||||
if (npc.justHit)
|
||||
{
|
||||
npc.localAI[0] = 240;
|
||||
if (npc.localAI[0] == 0f)
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
if (npc.localAI[0] == 0f || npc.localAI[1] < 10f)
|
||||
{
|
||||
npc.chaseable = false;
|
||||
if (Math.Abs(closest.Center.X - npc.Center.X) < 320f &&
|
||||
@@ -104,6 +118,7 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
npc.ai[2] = 0f;
|
||||
npc.velocity.Y -= jumpSpeed;
|
||||
npc.velocity.X = lungeForwardSpeed * -npc.direction;
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -116,7 +131,7 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position)
|
||||
{
|
||||
// Don't draw the bar if in stealth mode
|
||||
if (npc.localAI[0] == 0f)
|
||||
if (npc.localAI[0] == 0f || npc.localAI[1] < 10f)
|
||||
return false;
|
||||
return null;
|
||||
}
|
||||
@@ -127,6 +142,11 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
}
|
||||
public override void FindFrame(int frameHeight)
|
||||
{
|
||||
if (npc.localAI[1] < 10f)
|
||||
{
|
||||
npc.frame.Y = 0;
|
||||
return;
|
||||
}
|
||||
if (npc.localAI[0] > 0f)
|
||||
{
|
||||
if (npc.ai[0]++ % 6 == 5)
|
||||
@@ -137,6 +157,8 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
{
|
||||
npc.frame.Y = frameHeight * 3; // Frames 1 and 2 are for transitioning. Frame 0 is sitting still, and the rest are walking frames
|
||||
}
|
||||
if (npc.localAI[0] <= 8)
|
||||
npc.frame.Y = frameHeight;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -159,6 +181,7 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/FlakCrab2"), 1f);
|
||||
Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/FlakCrab3"), 1f);
|
||||
}
|
||||
npc.localAI[1]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,197 @@
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Items.Placeables.Banners;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Projectiles.Enemy;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.IO;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
namespace CalamityMod.NPCs.AcidRain
|
||||
{
|
||||
public class GammaSlime : ModNPC
|
||||
{
|
||||
public float angularMultiplier1;
|
||||
public float angularMultiplier2;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Gamma Slime");
|
||||
Main.npcFrameCount[npc.type] = 2;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
npc.width = 40;
|
||||
npc.height = 30;
|
||||
|
||||
npc.damage = 145;
|
||||
npc.lifeMax = 6410;
|
||||
npc.defense = 50;
|
||||
|
||||
npc.aiStyle = aiType = -1;
|
||||
|
||||
npc.knockBackResist = 0f;
|
||||
animationType = 81;
|
||||
for (int k = 0; k < npc.buffImmune.Length; k++)
|
||||
{
|
||||
npc.buffImmune[k] = true;
|
||||
}
|
||||
npc.value = Item.buyPrice(0, 0, 8, 30);
|
||||
npc.alpha = 50;
|
||||
npc.lavaImmune = false;
|
||||
npc.noGravity = false;
|
||||
npc.noTileCollide = false;
|
||||
npc.HitSound = SoundID.NPCHit1;
|
||||
npc.DeathSound = SoundID.NPCDeath1;
|
||||
// banner = npc.type;
|
||||
// bannerItem = ModContent.ItemType<IrradiatedSlimeBanner>();
|
||||
}
|
||||
public override void SendExtraAI(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(angularMultiplier1);
|
||||
writer.Write(angularMultiplier2);
|
||||
}
|
||||
public override void ReceiveExtraAI(BinaryReader reader)
|
||||
{
|
||||
angularMultiplier1 = reader.ReadSingle();
|
||||
angularMultiplier2 = reader.ReadSingle();
|
||||
}
|
||||
public override void ScaleExpertStats(int numPlayers, float bossLifeScale)
|
||||
{
|
||||
npc.lifeMax = (int)(npc.lifeMax * 0.8f * bossLifeScale);
|
||||
npc.damage = (int)(npc.damage * 0.85f);
|
||||
}
|
||||
public override void AI()
|
||||
{
|
||||
Lighting.AddLight((int)((npc.position.X + (float)(npc.width / 2)) / 16f), (int)((npc.position.Y + (float)(npc.height / 2)) / 16f), 0.6f, 0.8f, 0.6f);
|
||||
npc.TargetClosest(false);
|
||||
Player player = Main.player[npc.target];
|
||||
if (npc.velocity.Y == 0f && npc.ai[3] <= 0f)
|
||||
{
|
||||
npc.velocity.X *= 0.8f;
|
||||
if (npc.ai[0]++ >= 30f)
|
||||
{
|
||||
npc.velocity.Y -= MathHelper.Clamp(Math.Abs(player.Center.Y - npc.Center.Y) / 16f, 5f, 15f);
|
||||
npc.velocity.X = npc.DirectionTo(player.Center).X * 16f;
|
||||
npc.ai[0] = 0f;
|
||||
npc.ai[1]++;
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
float angle = MathHelper.TwoPi / 5f * i + (npc.ai[1] % 2) * MathHelper.PiOver2;
|
||||
Projectile.NewProjectile(npc.Center, angle.ToRotationVector2() * 7f, ModContent.ProjectileType<GammaAcid>(),
|
||||
45, 3f);
|
||||
}
|
||||
}
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.velocity.X *= 0.9935f;
|
||||
}
|
||||
if (npc.ai[3] > 0f)
|
||||
npc.ai[3]--;
|
||||
if (npc.ai[3] > 240f)
|
||||
{
|
||||
npc.velocity.X *= 0.95f;
|
||||
npc.velocity.Y += 0.2f;
|
||||
}
|
||||
// Hold energy for laser
|
||||
if (npc.ai[3] > 480f)
|
||||
{
|
||||
float scale = npc.ai[3] < 530 ? 2.25f : 1.65f;
|
||||
Vector2 destination = npc.Top + new Vector2(0f, 6f);
|
||||
Dust dust = Dust.NewDustPerfect(destination + new Vector2(0f, 12f).RotatedByRandom(MathHelper.TwoPi), (int)CalamityDusts.SulfurousSeaAcid);
|
||||
dust.velocity = Vector2.Normalize(destination - dust.position) * 3f;
|
||||
dust.scale = scale;
|
||||
dust.noGravity = true;
|
||||
if (npc.ai[3] <= 540f)
|
||||
{
|
||||
float length = MathHelper.Lerp(20f, 550f, (npc.ai[3] - 480f) / 60f);
|
||||
float outwardness = MathHelper.Lerp(1f, 0f, (npc.ai[3] - 480f) / 60f);
|
||||
for (float i = npc.Top.Y + 4f; i >= npc.Top.Y + 4f - length; i -= 8f)
|
||||
{
|
||||
float angle = i / 24f;
|
||||
Vector2 spawnPosition = new Vector2(npc.Center.X, i);
|
||||
dust = Dust.NewDustPerfect(spawnPosition, (int)CalamityDusts.SulfurousSeaAcid);
|
||||
dust.scale = 1.5f;
|
||||
dust.velocity = Vector2.UnitX * (float)Math.Cos(angle) * 4f * outwardness;
|
||||
dust.noGravity = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Release laser
|
||||
if (npc.ai[3] == 480f)
|
||||
{
|
||||
angularMultiplier1 = Main.rand.NextFloat(3f);
|
||||
angularMultiplier2 = Main.rand.NextFloat(4f);
|
||||
npc.netUpdate = true;
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
Main.PlaySound(SoundID.Zombie, (int)npc.position.X, (int)npc.position.Y, 104); // Moon lord beam sound
|
||||
Projectile.NewProjectile(npc.Center, -Vector2.UnitY, ModContent.ProjectileType<GammaBeam>(), 120, 4f, Main.myPlayer, 0f, npc.whoAmI);
|
||||
}
|
||||
}
|
||||
// Very complex particle effects while releasing the beam
|
||||
else if (npc.ai[3] >= 300f)
|
||||
{
|
||||
float angle = (npc.ai[3] / 30f) % MathHelper.TwoPi;
|
||||
float x = (float)Math.Sin(angle * angularMultiplier1) * (float)Math.Cos(angle);
|
||||
float y = (float)Math.Cos(angle * angularMultiplier1) * (float)Math.Sin(angle);
|
||||
Vector2 velocity = new Vector2(x * 4.5f, y * 2f);
|
||||
Dust dust = Dust.NewDustPerfect(npc.Center + angle.ToRotationVector2() * 8f, (int)CalamityDusts.SulfurousSeaAcid);
|
||||
dust.velocity = velocity;
|
||||
dust.scale = (float)Math.Cos(angle) + 2f;
|
||||
dust.noGravity = true;
|
||||
|
||||
dust = Dust.NewDustPerfect(npc.Center + angle.ToRotationVector2() * 8f, (int)CalamityDusts.SulfurousSeaAcid);
|
||||
dust.velocity = -velocity;
|
||||
dust.scale = (float)Math.Cos(angle) + 2f;
|
||||
dust.noGravity = true;
|
||||
}
|
||||
if (Math.Abs(player.Center.X - npc.Center.X) < 250f &&
|
||||
player.Center.X - npc.Center.X < 0f &&
|
||||
npc.ai[3] == 0f &&
|
||||
Main.rand.NextBool(110))
|
||||
{
|
||||
npc.ai[3] = 600f;
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
}
|
||||
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
{
|
||||
for (int k = 0; k < 10; k++)
|
||||
{
|
||||
Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.SulfurousSeaAcid, hitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (npc.life <= 0)
|
||||
{
|
||||
for (int k = 0; k < 20; k++)
|
||||
{
|
||||
Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.SulfurousSeaAcid, hitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void PostDraw(SpriteBatch spriteBatch, Color drawColor)
|
||||
{
|
||||
if (npc.ai[3] >= 480f && npc.ai[3] <= 540f)
|
||||
{
|
||||
float length = MathHelper.Lerp(20f, 550f, (npc.ai[3] - 480f) / 60f);
|
||||
float opacity = MathHelper.Lerp(0.3f, 0.9f, (npc.ai[3] - 480f) / 60f);
|
||||
Utils.DrawLine(spriteBatch, npc.Top + new Vector2(0f, 4f), npc.Top + new Vector2(0f, 4f) - Vector2.UnitY * length, Color.Lerp(Color.Lime, Color.Transparent, opacity));
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player target, int damage, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 300);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -1,4 +1,5 @@
|
||||
using CalamityMod.Dusts;
|
||||
using CalamityMod.Buffs.StatDebuffs;
|
||||
using CalamityMod.Items.Accessories;
|
||||
using CalamityMod.Items.Placeables.Banners;
|
||||
using CalamityMod.Projectiles.Enemy;
|
||||
@@ -63,7 +64,7 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
public override void AI()
|
||||
{
|
||||
Lighting.AddLight((int)((npc.position.X + (float)(npc.width / 2)) / 16f), (int)((npc.position.Y + (float)(npc.height / 2)) / 16f), 0.6f, 0.8f, 0.6f);
|
||||
if (CalamityWorld.downedPolterghast && !Main.player[npc.target].dead && CalamityWorld.rainingAcid)
|
||||
if (CalamityWorld.downedAquaticScourge && !Main.player[npc.target].dead && CalamityWorld.rainingAcid)
|
||||
{
|
||||
npc.aiStyle = aiType = -1;
|
||||
|
||||
@@ -338,5 +339,10 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
{
|
||||
DropHelper.DropItemChance(npc, ModContent.ItemType<LeadCore>(), 100);
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player target, int damage, bool crit)
|
||||
{
|
||||
target.AddBuff(ModContent.BuffType<Irradiated>(), 300);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,7 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
|
||||
if (CalamityWorld.downedPolterghast)
|
||||
{
|
||||
npc.damage = 300;
|
||||
npc.damage = 180;
|
||||
npc.lifeMax = 5700;
|
||||
npc.defense = 65;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
|
||||
if (CalamityWorld.downedPolterghast)
|
||||
{
|
||||
npc.damage = 285;
|
||||
npc.damage = 175;
|
||||
npc.lifeMax = 6300;
|
||||
npc.defense = 58;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
|
||||
if (CalamityWorld.downedPolterghast)
|
||||
{
|
||||
npc.damage = 210;
|
||||
npc.damage = 140;
|
||||
npc.lifeMax = 6600;
|
||||
npc.defense = 33;
|
||||
}
|
||||
@@ -89,7 +89,10 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
if (npc.wet)
|
||||
{
|
||||
if (npc.velocity.Y >= 0f)
|
||||
{
|
||||
npc.velocity.Y = -3f;
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (closestBubble != null && minimumDistance < 200f)
|
||||
@@ -99,8 +102,8 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
if (closestBubble.Hitbox.Intersects(npc.Hitbox))
|
||||
{
|
||||
npc.ai[0] = 1f;
|
||||
npc.netUpdate = true;
|
||||
closestBubble.Kill();
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
}
|
||||
if (npc.velocity.Y == 0f || npc.wet)
|
||||
@@ -108,18 +111,19 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
npc.TargetClosest(false);
|
||||
npc.velocity.X *= 0.85f;
|
||||
npc.ai[1]++;
|
||||
float lungeForwardSpeed = 13f;
|
||||
float jumpSpeed = 3f;
|
||||
float lungeForwardSpeed = 15f;
|
||||
float jumpSpeed = 4f;
|
||||
if (Collision.CanHit(npc.Center, 1, 1, Main.player[npc.target].Center, 1, 1))
|
||||
{
|
||||
lungeForwardSpeed *= 1.2f;
|
||||
}
|
||||
if (npc.ai[1] >= 10)
|
||||
if (npc.ai[1] >= 17)
|
||||
{
|
||||
npc.ai[1] = 0f;
|
||||
npc.velocity.Y -= jumpSpeed;
|
||||
npc.velocity.X = lungeForwardSpeed * (npc.Center.X - destination.X < 0).ToDirectionInt();
|
||||
npc.spriteDirection = (npc.Center.X - destination.X < 0).ToDirectionInt();
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -135,40 +139,21 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
if (npc.Distance(player.Center) < 200f)
|
||||
inertia *= 0.667f;
|
||||
npc.velocity = (npc.velocity * inertia + npc.DirectionTo(player.Center) * speed) / (inertia + 1f);
|
||||
|
||||
float SAImovement = 0.5f;
|
||||
for (int index = 0; index < Main.npc.Length; index++)
|
||||
{
|
||||
NPC other = Main.npc[index];
|
||||
if (index != npc.whoAmI &&
|
||||
other.active &&
|
||||
other.type == npc.type && Math.Abs(npc.position.X - other.position.X) + Math.Abs(npc.position.Y - other.position.Y) < npc.width)
|
||||
{
|
||||
if (npc.position.X < other.position.X)
|
||||
{
|
||||
npc.velocity.X -= SAImovement;
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.velocity.X += SAImovement;
|
||||
}
|
||||
if (npc.position.Y < other.position.Y)
|
||||
{
|
||||
npc.velocity.Y -= SAImovement;
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.velocity.Y += SAImovement;
|
||||
}
|
||||
}
|
||||
}
|
||||
npc.spriteDirection = (npc.velocity.X > 0).ToDirectionInt();
|
||||
if (player.dead && npc.Distance(player.Center) < 20f)
|
||||
{
|
||||
npc.ai[0] = 0f;
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
|
||||
{
|
||||
if (npc.ai[0] != 0f)
|
||||
{
|
||||
npc.ai[0] = 0f;
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
}
|
||||
public override void FindFrame(int frameHeight)
|
||||
{
|
||||
@@ -196,10 +181,16 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
{
|
||||
for (int k = 0; k < 8; k++)
|
||||
for (int k = 0; k < 5; k++)
|
||||
{
|
||||
Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.SulfurousSeaAcid, hitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
if (npc.life <= 0)
|
||||
{
|
||||
Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/AcidRain/SulfurousSkaterGore"), npc.scale);
|
||||
Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/AcidRain/SulfurousSkaterGore2"), npc.scale);
|
||||
Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/AcidRain/SulfurousSkaterGore3"), npc.scale);
|
||||
}
|
||||
}
|
||||
public override void OnHitPlayer(Player target, int damage, bool crit)
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
|
||||
if (CalamityWorld.downedPolterghast)
|
||||
{
|
||||
npc.damage = 233;
|
||||
npc.damage = 160;
|
||||
npc.lifeMax = 7200;
|
||||
npc.defense = 78;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
|
||||
if (CalamityWorld.downedPolterghast)
|
||||
{
|
||||
npc.damage = 315;
|
||||
npc.damage = 172;
|
||||
npc.lifeMax = 4000;
|
||||
npc.defense = 30;
|
||||
}
|
||||
@@ -72,6 +72,7 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
{
|
||||
// Revert back to swimming around after successfully devouring the player
|
||||
npc.ai[0] = 0f;
|
||||
npc.netUpdate = true;
|
||||
return;
|
||||
}
|
||||
// Stick to player and make them bleed
|
||||
@@ -122,6 +123,7 @@ namespace CalamityMod.NPCs.AcidRain
|
||||
{
|
||||
npc.ai[0] = 1f;
|
||||
npc.ai[1] = 300f;
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
npc.velocity = (npc.velocity * (swimIntertia - 1f) + npc.DirectionTo(player.Center) * speed) / swimIntertia;
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 888 B |
@@ -8,15 +8,11 @@ using CalamityMod.Items.TreasureBags;
|
||||
using CalamityMod.Items.Weapons.Magic;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Projectiles.Boss;
|
||||
using CalamityMod.World;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader.Config;
|
||||
using CalamityMod;
|
||||
|
||||
namespace CalamityMod.NPCs.Bumblebirb
|
||||
{
|
||||
@@ -26,17 +22,20 @@ namespace CalamityMod.NPCs.Bumblebirb
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Bumblebirb");
|
||||
Main.npcFrameCount[npc.type] = 10;
|
||||
Main.npcFrameCount[npc.type] = 6;
|
||||
}
|
||||
|
||||
public override string Texture => "CalamityMod/NPCs/Bumblebirb/Birb";
|
||||
public override string BossHeadTexture => "CalamityMod/NPCs/Bumblebirb/Birb_Head_Boss";
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
npc.npcSlots = 32f;
|
||||
npc.aiStyle = -1;
|
||||
aiType = -1;
|
||||
npc.damage = 160;
|
||||
npc.width = 80;
|
||||
npc.height = 80;
|
||||
npc.width = 130;
|
||||
npc.height = 100;
|
||||
npc.defense = 40;
|
||||
npc.LifeMaxNERB(227500, 252500, 3000000);
|
||||
double HPBoost = CalamityMod.CalamityConfig.BossHealthPercentageBoost * 0.01;
|
||||
@@ -79,6 +78,7 @@ namespace CalamityMod.NPCs.Bumblebirb
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
npc.visualOffset = new Vector2(20f, 50f);
|
||||
CalamityAI.BumblebirbAI(npc, mod);
|
||||
}
|
||||
|
||||
@@ -90,32 +90,27 @@ namespace CalamityMod.NPCs.Bumblebirb
|
||||
|
||||
public override void FindFrame(int frameHeight)
|
||||
{
|
||||
npc.frameCounter += (double)(npc.velocity.Length() / 4f);
|
||||
npc.frameCounter += 1.0;
|
||||
if (npc.ai[0] < 4f)
|
||||
bool lightningBreathAttack = false; //leaving this for fabbo to sort
|
||||
if (lightningBreathAttack)
|
||||
{
|
||||
if (npc.frameCounter >= 6.0)
|
||||
{
|
||||
npc.frameCounter = 0.0;
|
||||
npc.frame.Y = npc.frame.Y + frameHeight;
|
||||
}
|
||||
if (npc.frame.Y / frameHeight > 4)
|
||||
{
|
||||
npc.frame.Y = 0;
|
||||
}
|
||||
npc.frame.Y = npc.frame.Height * 5;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (npc.frameCounter >= 6.0)
|
||||
if (npc.frameCounter >= 5) //iban said the time between frames was 5 so using that as a base
|
||||
{
|
||||
npc.frameCounter = 0.0;
|
||||
npc.frame.Y = npc.frame.Y + frameHeight;
|
||||
}
|
||||
if (npc.frame.Y / frameHeight > 9)
|
||||
{
|
||||
npc.frame.Y = frameHeight * 5;
|
||||
if (npc.frame.Y >= npc.frame.Height * 4) //frame 5 or 6 for transitioning from open jaw
|
||||
{
|
||||
npc.frame.Y = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.frame.Y += npc.frame.Height;
|
||||
}
|
||||
npc.frameCounter = -1; //set to -1 to account for the framecounter increment shortly after
|
||||
}
|
||||
}
|
||||
npc.frameCounter++;
|
||||
}
|
||||
|
||||
public override void BossLoot(ref string name, ref int potionType)
|
||||
@@ -171,17 +166,12 @@ namespace CalamityMod.NPCs.Bumblebirb
|
||||
{
|
||||
Dust.NewDust(npc.position, npc.width, npc.height, 244, hitDirection, -1f, 0, default, 1f);
|
||||
}
|
||||
float randomSpread = (float)(Main.rand.Next(-200, 200) / 100);
|
||||
Gore.NewGore(npc.position, npc.velocity * randomSpread, mod.GetGoreSlot("Gores/BumbleHead"), 1f);
|
||||
for (int wing = 0; wing < 2; wing++)
|
||||
for (int i = 0; i < 6; i++) // 1 head, 1 wing, 4 legs = 6. one wing due to them being chonky boyes now
|
||||
{
|
||||
randomSpread = (float)(Main.rand.Next(-200, 200) / 100);
|
||||
Gore.NewGore(npc.position, npc.velocity * randomSpread, mod.GetGoreSlot("Gores/BumbleWing"), 1f);
|
||||
}
|
||||
for (int leg = 0; leg < 4; leg++)
|
||||
{
|
||||
randomSpread = (float)(Main.rand.Next(-200, 200) / 100);
|
||||
Gore.NewGore(npc.position, npc.velocity * randomSpread, mod.GetGoreSlot("Gores/BumbleLeg"), 1f);
|
||||
string gore = "Gores/Bumble";
|
||||
float randomSpread = (float)(Main.rand.Next(-200, 200) / 100);
|
||||
gore += i == 0 ? "Head" : i > 1 ? "Leg" : "Wing";
|
||||
Gore.NewGore(npc.position, npc.velocity * randomSpread, mod.GetGoreSlot(gore), 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 9.5 KiB |
@@ -12,16 +12,18 @@ namespace CalamityMod.NPCs.Bumblebirb
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Bumblebirb");
|
||||
Main.npcFrameCount[npc.type] = 10;
|
||||
Main.npcFrameCount[npc.type] = 6;
|
||||
}
|
||||
|
||||
public override string Texture => "CalamityMod/NPCs/Bumblebirb/Birb";
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
npc.npcSlots = 1f;
|
||||
npc.aiStyle = -1;
|
||||
aiType = -1;
|
||||
npc.damage = 110;
|
||||
npc.width = 80;
|
||||
npc.width = 120;
|
||||
npc.height = 80;
|
||||
npc.scale = 0.66f;
|
||||
npc.defense = 20;
|
||||
@@ -57,6 +59,7 @@ namespace CalamityMod.NPCs.Bumblebirb
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
npc.visualOffset = new Vector2(10, 40);
|
||||
Player player = Main.player[npc.target];
|
||||
Vector2 vector = npc.Center;
|
||||
npc.damage = npc.defDamage;
|
||||
@@ -309,32 +312,27 @@ namespace CalamityMod.NPCs.Bumblebirb
|
||||
|
||||
public override void FindFrame(int frameHeight)
|
||||
{
|
||||
npc.frameCounter += (double)(npc.velocity.Length() / 4f);
|
||||
npc.frameCounter += 1.0;
|
||||
if (npc.ai[0] < 4f)
|
||||
bool lightningBreathAttack = false; //leaving this for fabbo to sort
|
||||
if (lightningBreathAttack)
|
||||
{
|
||||
if (npc.frameCounter >= 6.0)
|
||||
{
|
||||
npc.frameCounter = 0.0;
|
||||
npc.frame.Y = npc.frame.Y + frameHeight;
|
||||
}
|
||||
if (npc.frame.Y / frameHeight > 4)
|
||||
{
|
||||
npc.frame.Y = 0;
|
||||
}
|
||||
}
|
||||
npc.frame.Y = npc.frame.Height * 5;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (npc.frameCounter >= 6.0)
|
||||
if (npc.frameCounter >= 5) //iban said the time between frames was 5 so using that as a base
|
||||
{
|
||||
npc.frameCounter = 0.0;
|
||||
npc.frame.Y = npc.frame.Y + frameHeight;
|
||||
}
|
||||
if (npc.frame.Y / frameHeight > 9)
|
||||
{
|
||||
npc.frame.Y = frameHeight * 5;
|
||||
if (npc.frame.Y >= npc.frame.Height * 4) //frame 5 or 6 for transitioning from open jaw
|
||||
{
|
||||
npc.frame.Y = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
npc.frame.Y += npc.frame.Height;
|
||||
}
|
||||
npc.frameCounter = -1; //set to -1 to account for the framecounter increment shortly after
|
||||
}
|
||||
}
|
||||
npc.frameCounter++;
|
||||
}
|
||||
|
||||
public override void HitEffect(int hitDirection, double damage)
|
||||
|
||||
|
Before Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 403 B |
@@ -3195,7 +3195,7 @@ namespace CalamityMod.NPCs
|
||||
bool flag95 = true;
|
||||
if (npc.position.Y > player.position.Y)
|
||||
{
|
||||
for (int num955 = 0; num955 < 255; num955++)
|
||||
for (int num955 = 0; num955 < Main.maxPlayers; num955++)
|
||||
{
|
||||
if (Main.player[num955].active)
|
||||
{
|
||||
@@ -3482,7 +3482,7 @@ namespace CalamityMod.NPCs
|
||||
Main.dust[dust].scale = 0.5f;
|
||||
}
|
||||
|
||||
for (int num475 = 0; num475 < 255; num475++)
|
||||
for (int num475 = 0; num475 < Main.maxPlayers; num475++)
|
||||
{
|
||||
if (Collision.CanHit(npc.Center, 1, 1, Main.player[num475].Center, 1, 1))
|
||||
{
|
||||
@@ -4301,6 +4301,7 @@ namespace CalamityMod.NPCs
|
||||
if (npc.timeLeft == 1)
|
||||
{
|
||||
CalamityWorld.acidRainPoints = 0;
|
||||
CalamityWorld.triedToSummonOldDuke = false;
|
||||
AcidRainEvent.UpdateInvasion(false);
|
||||
npc.timeLeft = 0;
|
||||
}
|
||||
|
||||
@@ -1595,7 +1595,7 @@ namespace CalamityMod.NPCs
|
||||
num35 /= 2;
|
||||
|
||||
bool flag3 = true;
|
||||
for (int num36 = 0; num36 < 255; num36++)
|
||||
for (int num36 = 0; num36 < Main.maxPlayers; num36++)
|
||||
{
|
||||
if (Main.player[num36].active)
|
||||
{
|
||||
@@ -1730,7 +1730,7 @@ namespace CalamityMod.NPCs
|
||||
if (flag4 && !CalamityWorld.bossRushActive)
|
||||
{
|
||||
bool flag5 = true;
|
||||
for (int num58 = 0; num58 < 255; num58++)
|
||||
for (int num58 = 0; num58 < Main.maxPlayers; num58++)
|
||||
{
|
||||
if (Main.player[num58].active && !Main.player[num58].dead && Main.player[num58].ZoneCorrupt)
|
||||
flag5 = false;
|
||||
@@ -2513,7 +2513,7 @@ namespace CalamityMod.NPCs
|
||||
// Increase bee spawn rate during bee spawning phase based on number of players near the boss
|
||||
int playerNearBoss = 0;
|
||||
int num;
|
||||
for (int num593 = 0; num593 < 255; num593 = num + 1)
|
||||
for (int num593 = 0; num593 < Main.maxPlayers; num593 = num + 1)
|
||||
{
|
||||
if (Main.player[num593].active && !Main.player[num593].dead && (npc.Center - Main.player[num593].Center).Length() < 1000f)
|
||||
playerNearBoss++;
|
||||
@@ -4559,7 +4559,7 @@ namespace CalamityMod.NPCs
|
||||
|
||||
if (npc.position.Y > player.position.Y)
|
||||
{
|
||||
for (int m = 0; m < 255; m++)
|
||||
for (int m = 0; m < Main.maxPlayers; m++)
|
||||
{
|
||||
if (Main.player[m].active)
|
||||
{
|
||||
@@ -8284,7 +8284,7 @@ namespace CalamityMod.NPCs
|
||||
else if ((lifeRatio < 0.8f || death) && Main.rand.NextBool(4))
|
||||
{
|
||||
int thornBallCount = 0;
|
||||
for (int i = 0; i < 1000; i++)
|
||||
for (int i = 0; i < Main.maxProjectiles; i++)
|
||||
{
|
||||
if (Main.projectile[i].active && Main.projectile[i].type == ProjectileID.ThornBall)
|
||||
thornBallCount++;
|
||||
@@ -12247,7 +12247,7 @@ namespace CalamityMod.NPCs
|
||||
|
||||
if (npc.ai[1] == 60f)
|
||||
{
|
||||
for (int num1161 = 0; num1161 < 1000; num1161++)
|
||||
for (int num1161 = 0; num1161 < Main.maxProjectiles; num1161++)
|
||||
{
|
||||
Projectile projectile = Main.projectile[num1161];
|
||||
if (projectile.active && (projectile.type == ProjectileID.MoonLeech || projectile.type == ProjectileID.PhantasmalBolt ||
|
||||
@@ -12411,7 +12411,7 @@ namespace CalamityMod.NPCs
|
||||
|
||||
if (npc.ai[1] == 40f)
|
||||
{
|
||||
for (int num1171 = 0; num1171 < 1000; num1171++)
|
||||
for (int num1171 = 0; num1171 < Main.maxProjectiles; num1171++)
|
||||
{
|
||||
Projectile projectile2 = Main.projectile[num1171];
|
||||
if (projectile2.active && (projectile2.type == ProjectileID.MoonLeech || projectile2.type == ProjectileID.PhantasmalBolt ||
|
||||
@@ -12435,10 +12435,10 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
}
|
||||
|
||||
for (int num1173 = 0; num1173 < 500; num1173++)
|
||||
for (int num1173 = 0; num1173 < Main.maxGore; num1173++)
|
||||
{
|
||||
Gore gore2 = Main.gore[num1173];
|
||||
if (gore2.active && gore2.type >= 619 && gore2.type <= 622)
|
||||
if (gore2.active && gore2.type >= GoreID.MoonLordHeart1 && gore2.type <= GoreID.MoonLordHeart4)
|
||||
gore2.active = false;
|
||||
}
|
||||
}
|
||||
@@ -12477,7 +12477,7 @@ namespace CalamityMod.NPCs
|
||||
|
||||
if (!flag89)
|
||||
{
|
||||
for (int num1175 = 0; num1175 < 255; num1175++)
|
||||
for (int num1175 = 0; num1175 < Main.maxPlayers; num1175++)
|
||||
{
|
||||
if (Main.player[num1175].active && !Main.player[num1175].dead)
|
||||
{
|
||||
@@ -12795,7 +12795,7 @@ namespace CalamityMod.NPCs
|
||||
if (num1207 == 0f && Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
Vector2 vector201 = npc.Center + value21;
|
||||
for (int num1228 = 0; num1228 < 255; num1228++)
|
||||
for (int num1228 = 0; num1228 < Main.maxPlayers; num1228++)
|
||||
{
|
||||
Player player6 = Main.player[num1228];
|
||||
if (player6.active && !player6.dead && Vector2.Distance(player6.Center, vector201) <= 3000f)
|
||||
@@ -12811,7 +12811,7 @@ namespace CalamityMod.NPCs
|
||||
|
||||
if ((num1207 == 120f || num1207 == 180f || num1207 == 240f) && Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
for (int num1229 = 0; num1229 < 1000; num1229++)
|
||||
for (int num1229 = 0; num1229 < Main.maxProjectiles; num1229++)
|
||||
{
|
||||
Projectile projectile6 = Main.projectile[num1229];
|
||||
if (projectile6.active && projectile6.type == ProjectileID.MoonLeech && Main.player[(int)projectile6.ai[1]].FindBuffIndex(145) != -1)
|
||||
@@ -13300,7 +13300,7 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
|
||||
vector176 *= velocity;
|
||||
for (int num1194 = 0; num1194 < 1000; num1194++)
|
||||
for (int num1194 = 0; num1194 < Main.maxProjectiles; num1194++)
|
||||
{
|
||||
Projectile projectile3 = Main.projectile[num1194];
|
||||
if (projectile3.active && projectile3.type == ProjectileID.PhantasmalSphere && projectile3.ai[1] == (float)npc.whoAmI && projectile3.ai[0] != -1f)
|
||||
@@ -13781,7 +13781,7 @@ namespace CalamityMod.NPCs
|
||||
|
||||
npc.velocity = Vector2.UnitY * -7f;
|
||||
|
||||
for (int num1255 = 0; num1255 < 1000; num1255++)
|
||||
for (int num1255 = 0; num1255 < Main.maxProjectiles; num1255++)
|
||||
{
|
||||
Projectile projectile7 = Main.projectile[num1255];
|
||||
if (projectile7.active && projectile7.type == ProjectileID.PhantasmalSphere && projectile7.ai[1] == (float)npc.whoAmI && projectile7.ai[0] != -1f)
|
||||
@@ -13813,7 +13813,7 @@ namespace CalamityMod.NPCs
|
||||
Vector2 velocity6 = (npc.ai[2] - 1.57079637f).ToRotationVector2() * velocity;
|
||||
npc.velocity = velocity6 * 2f;
|
||||
|
||||
for (int num1256 = 0; num1256 < 1000; num1256++)
|
||||
for (int num1256 = 0; num1256 < Main.maxProjectiles; num1256++)
|
||||
{
|
||||
Projectile projectile9 = Main.projectile[num1256];
|
||||
if (projectile9.active && projectile9.type == ProjectileID.PhantasmalSphere && projectile9.ai[1] == (float)npc.whoAmI && projectile9.ai[0] != -1f)
|
||||
@@ -16878,7 +16878,7 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
int solarFlareCount = 0;
|
||||
int maxFlareCount = 6;
|
||||
for (int k = 0; k < 200; k++)
|
||||
for (int k = 0; k < Main.maxNPCs; k++)
|
||||
{
|
||||
if (Main.npc[k].active && Main.npc[k].type == NPCID.SolarFlare)
|
||||
{
|
||||
@@ -20226,7 +20226,7 @@ namespace CalamityMod.NPCs
|
||||
Rectangle rectangle = new Rectangle((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height);
|
||||
int num35 = 1000;
|
||||
bool flag3 = true;
|
||||
for (int num36 = 0; num36 < 255; num36++)
|
||||
for (int num36 = 0; num36 < Main.maxPlayers; num36++)
|
||||
{
|
||||
if (Main.player[num36].active)
|
||||
{
|
||||
@@ -20427,7 +20427,7 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
if (num41 > 0)
|
||||
{
|
||||
for (int num50 = 0; num50 < 200; num50++)
|
||||
for (int num50 = 0; num50 < Main.maxNPCs; num50++)
|
||||
{
|
||||
if (Main.npc[num50].active && Main.npc[num50].type == npc.type && num50 != npc.whoAmI)
|
||||
{
|
||||
@@ -20444,7 +20444,7 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int num51 = 0; num51 < 200; num51++)
|
||||
for (int num51 = 0; num51 < Main.maxNPCs; num51++)
|
||||
{
|
||||
if (Main.npc[num51].active && Main.npc[num51].type == npc.type && num51 != npc.whoAmI)
|
||||
{
|
||||
@@ -20593,7 +20593,7 @@ namespace CalamityMod.NPCs
|
||||
if (flag4)
|
||||
{
|
||||
bool flag5 = true;
|
||||
for (int num58 = 0; num58 < 255; num58++)
|
||||
for (int num58 = 0; num58 < Main.maxPlayers; num58++)
|
||||
{
|
||||
if (Main.player[num58].active && !Main.player[num58].dead && Main.player[num58].ZoneCorrupt)
|
||||
{
|
||||
@@ -20606,7 +20606,7 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
npc.active = false;
|
||||
int num59 = (int)npc.ai[0];
|
||||
while (num59 > 0 && num59 < 200 && Main.npc[num59].active && Main.npc[num59].aiStyle == npc.aiStyle)
|
||||
while (num59 > 0 && num59 < Main.maxNPCs && Main.npc[num59].active && Main.npc[num59].aiStyle == npc.aiStyle)
|
||||
{
|
||||
int arg_2853_0 = (int)Main.npc[num59].ai[0];
|
||||
Main.npc[num59].active = false;
|
||||
@@ -20777,7 +20777,7 @@ namespace CalamityMod.NPCs
|
||||
int num;
|
||||
for (int num68 = 0; num68 < 50; num68 = num + 1)
|
||||
{
|
||||
if (npc.type == 29 || npc.type == 45)
|
||||
if (npc.type == NPCID.GoblinSorcerer || npc.type == NPCID.Tim)
|
||||
{
|
||||
int num69 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 27, 0f, 0f, 100, default(Color), (float)Main.rand.Next(1, 3));
|
||||
Dust dust = Main.dust[num69];
|
||||
@@ -20787,42 +20787,42 @@ namespace CalamityMod.NPCs
|
||||
Main.dust[num69].noGravity = true;
|
||||
}
|
||||
}
|
||||
else if (npc.type == 32)
|
||||
else if (npc.type == NPCID.DarkCaster)
|
||||
{
|
||||
int num70 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 172, 0f, 0f, 100, default(Color), 1.5f);
|
||||
Dust dust = Main.dust[num70];
|
||||
dust.velocity *= 3f;
|
||||
Main.dust[num70].noGravity = true;
|
||||
}
|
||||
else if (npc.type == 283 || npc.type == 284)
|
||||
else if (npc.type == NPCID.Necromancer || npc.type == NPCID.NecromancerArmored)
|
||||
{
|
||||
int num71 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 173, 0f, 0f, 0, default(Color), 1f);
|
||||
Dust dust = Main.dust[num71];
|
||||
dust.velocity *= 2f;
|
||||
Main.dust[num71].scale = 1.4f;
|
||||
}
|
||||
else if (npc.type == 285 || npc.type == 286)
|
||||
else if (npc.type == NPCID.DiabolistRed || npc.type == NPCID.DiabolistWhite)
|
||||
{
|
||||
int num72 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 174, 0f, 0f, 100, default(Color), 1.5f);
|
||||
Dust dust = Main.dust[num72];
|
||||
dust.velocity *= 3f;
|
||||
Main.dust[num72].noGravity = true;
|
||||
}
|
||||
else if (npc.type == 281 || npc.type == 282)
|
||||
else if (npc.type == NPCID.RaggedCaster || npc.type == NPCID.RaggedCasterOpenCoat)
|
||||
{
|
||||
int num73 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 175, 0f, 0f, 100, default(Color), 1.5f);
|
||||
Dust dust = Main.dust[num73];
|
||||
dust.velocity *= 3f;
|
||||
Main.dust[num73].noGravity = true;
|
||||
}
|
||||
else if (npc.type == 172)
|
||||
else if (npc.type == NPCID.RuneWizard)
|
||||
{
|
||||
int num74 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 106, 0f, 0f, 100, default(Color), 2.5f);
|
||||
Dust dust = Main.dust[num74];
|
||||
dust.velocity *= 3f;
|
||||
Main.dust[num74].noGravity = true;
|
||||
}
|
||||
else if (npc.type == 533)
|
||||
else if (npc.type == NPCID.DesertDjinn)
|
||||
{
|
||||
int num75 = Dust.NewDust(npc.position, npc.width, npc.height, 27, 0f, 0f, 100, default(Color), 2.5f);
|
||||
Dust dust = Main.dust[num75];
|
||||
@@ -20847,7 +20847,7 @@ namespace CalamityMod.NPCs
|
||||
Main.PlaySound(SoundID.Item8, npc.position);
|
||||
for (int num77 = 0; num77 < 50; num77 = num + 1)
|
||||
{
|
||||
if (npc.type == 29 || npc.type == 45)
|
||||
if (npc.type == NPCID.GoblinSorcerer || npc.type == NPCID.Tim)
|
||||
{
|
||||
int num78 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 27, 0f, 0f, 100, default(Color), (float)Main.rand.Next(1, 3));
|
||||
Dust dust = Main.dust[num78];
|
||||
@@ -20857,42 +20857,42 @@ namespace CalamityMod.NPCs
|
||||
Main.dust[num78].noGravity = true;
|
||||
}
|
||||
}
|
||||
else if (npc.type == 32)
|
||||
else if (npc.type == NPCID.DarkCaster)
|
||||
{
|
||||
int num79 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 172, 0f, 0f, 100, default(Color), 1.5f);
|
||||
Dust dust = Main.dust[num79];
|
||||
dust.velocity *= 3f;
|
||||
Main.dust[num79].noGravity = true;
|
||||
}
|
||||
else if (npc.type == 172)
|
||||
else if (npc.type == NPCID.RuneWizard)
|
||||
{
|
||||
int num80 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 106, 0f, 0f, 100, default(Color), 2.5f);
|
||||
Dust dust = Main.dust[num80];
|
||||
dust.velocity *= 3f;
|
||||
Main.dust[num80].noGravity = true;
|
||||
}
|
||||
else if (npc.type == 283 || npc.type == 284)
|
||||
else if (npc.type == NPCID.Necromancer || npc.type == NPCID.NecromancerArmored)
|
||||
{
|
||||
int num81 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 173, 0f, 0f, 0, default(Color), 1f);
|
||||
Dust dust = Main.dust[num81];
|
||||
dust.velocity *= 2f;
|
||||
Main.dust[num81].scale = 1.4f;
|
||||
}
|
||||
else if (npc.type == 285 || npc.type == 286)
|
||||
else if (npc.type == NPCID.DiabolistRed || npc.type == NPCID.DiabolistWhite)
|
||||
{
|
||||
int num82 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 174, 0f, 0f, 100, default(Color), 1.5f);
|
||||
Dust dust = Main.dust[num82];
|
||||
dust.velocity *= 3f;
|
||||
Main.dust[num82].noGravity = true;
|
||||
}
|
||||
else if (npc.type == 281 || npc.type == 282)
|
||||
else if (npc.type == NPCID.RaggedCaster || npc.type == NPCID.RaggedCasterOpenCoat)
|
||||
{
|
||||
int num83 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 175, 0f, 0f, 100, default(Color), 1.5f);
|
||||
Dust dust = Main.dust[num83];
|
||||
dust.velocity *= 3f;
|
||||
Main.dust[num83].noGravity = true;
|
||||
}
|
||||
else if (npc.type == 533)
|
||||
else if (npc.type == NPCID.DesertDjinn)
|
||||
{
|
||||
int num84 = Dust.NewDust(npc.position, npc.width, npc.height, 27, 0f, 0f, 100, default(Color), 2.5f);
|
||||
Dust dust = Main.dust[num84];
|
||||
@@ -20910,7 +20910,7 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
}
|
||||
npc.ai[0] += 2f;
|
||||
if (npc.type == 283 || npc.type == 284)
|
||||
if (npc.type == NPCID.Necromancer || npc.type == NPCID.NecromancerArmored)
|
||||
{
|
||||
if (npc.ai[0] % 50f == 0f && npc.ai[0] <= 250f)
|
||||
{
|
||||
@@ -20922,7 +20922,7 @@ namespace CalamityMod.NPCs
|
||||
npc.ai[0] = 700f;
|
||||
}
|
||||
}
|
||||
else if (npc.type == 172)
|
||||
else if (npc.type == NPCID.RuneWizard)
|
||||
{
|
||||
if (npc.ai[0] == 80f || npc.ai[0] == 150f || npc.ai[0] == 230f || npc.ai[0] == 300f || npc.ai[0] == 380f || npc.ai[0] == 450f)
|
||||
{
|
||||
@@ -20930,7 +20930,7 @@ namespace CalamityMod.NPCs
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
}
|
||||
else if (npc.type == 533)
|
||||
else if (npc.type == NPCID.DesertDjinn)
|
||||
{
|
||||
if (npc.ai[0] == 180f)
|
||||
{
|
||||
@@ -20938,7 +20938,7 @@ namespace CalamityMod.NPCs
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
}
|
||||
else if (npc.type == 281 || npc.type == 282)
|
||||
else if (npc.type == NPCID.RaggedCaster || npc.type == NPCID.RaggedCasterOpenCoat)
|
||||
{
|
||||
if (npc.ai[0] == 20f || npc.ai[0] == 40f || npc.ai[0] == 60f || npc.ai[0] == 120f || npc.ai[0] == 140f || npc.ai[0] == 160f || npc.ai[0] == 220f || npc.ai[0] == 240f || npc.ai[0] == 260f)
|
||||
{
|
||||
@@ -20955,11 +20955,11 @@ namespace CalamityMod.NPCs
|
||||
npc.ai[1] = 30f;
|
||||
npc.netUpdate = true;
|
||||
}
|
||||
if ((npc.type == 285 || npc.type == 286) && npc.ai[0] > 400f)
|
||||
if ((npc.type == NPCID.DiabolistRed || npc.type == NPCID.DiabolistWhite) && npc.ai[0] > 400f)
|
||||
{
|
||||
npc.ai[0] = 650f;
|
||||
}
|
||||
if (npc.type == 533 && npc.ai[0] >= 360f)
|
||||
if (npc.type == NPCID.DesertDjinn && npc.ai[0] >= 360f)
|
||||
{
|
||||
npc.ai[0] = 650f;
|
||||
}
|
||||
@@ -20989,7 +20989,7 @@ namespace CalamityMod.NPCs
|
||||
if ((num94 < num87 - 4 || num94 > num87 + 4 || num92 < num86 - 4 || num92 > num86 + 4) && (num94 < num89 - 1 || num94 > num89 + 1 || num92 < num88 - 1 || num92 > num88 + 1) && Main.tile[num92, num94].nactive())
|
||||
{
|
||||
bool flag5 = true;
|
||||
if ((npc.type == 32 || (npc.type >= 281 && npc.type <= 286)) && !Main.wallDungeon[(int)Main.tile[num92, num94 - 1].wall])
|
||||
if ((npc.type == NPCID.DarkCaster || (npc.type >= NPCID.RaggedCaster && npc.type <= NPCID.DiabolistWhite)) && !Main.wallDungeon[(int)Main.tile[num92, num94 - 1].wall])
|
||||
{
|
||||
flag5 = false;
|
||||
}
|
||||
@@ -21014,7 +21014,7 @@ namespace CalamityMod.NPCs
|
||||
if (npc.ai[1] > 0f)
|
||||
{
|
||||
npc.ai[1] -= 1f;
|
||||
if (npc.type == 533)
|
||||
if (npc.type == NPCID.DesertDjinn)
|
||||
{
|
||||
if (npc.ai[1] % 30f == 0f && npc.ai[1] / 30f < 5f)
|
||||
{
|
||||
@@ -21066,16 +21066,16 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
else if (npc.ai[1] == 25f)
|
||||
{
|
||||
if (npc.type >= 281 && npc.type <= 286)
|
||||
if (npc.type >= NPCID.RaggedCaster && npc.type <= NPCID.DiabolistWhite)
|
||||
{
|
||||
if (Main.netMode != 1)
|
||||
{
|
||||
float num102 = 6f;
|
||||
if (npc.type == 285 || npc.type == 286)
|
||||
if (npc.type == NPCID.DiabolistRed || npc.type == NPCID.DiabolistWhite)
|
||||
{
|
||||
num102 = 8f;
|
||||
}
|
||||
if (npc.type == 281 || npc.type == 282)
|
||||
if (npc.type == NPCID.RaggedCaster || npc.type == NPCID.RaggedCasterOpenCoat)
|
||||
{
|
||||
num102 = 4f;
|
||||
}
|
||||
@@ -21088,12 +21088,12 @@ namespace CalamityMod.NPCs
|
||||
num104 *= num105;
|
||||
int num106 = 16;
|
||||
int num107 = 290;
|
||||
if (npc.type == 285 || npc.type == 286)
|
||||
if (npc.type == NPCID.DiabolistRed || npc.type == NPCID.DiabolistWhite)
|
||||
{
|
||||
num107 = 291;
|
||||
num106 = 32;
|
||||
}
|
||||
if (npc.type == 281 || npc.type == 282)
|
||||
if (npc.type == NPCID.RaggedCaster || npc.type == NPCID.RaggedCasterOpenCoat)
|
||||
{
|
||||
num107 = 293;
|
||||
num106 = 32;
|
||||
@@ -21111,21 +21111,21 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
else
|
||||
{
|
||||
if (npc.type != 172)
|
||||
if (npc.type != NPCID.RuneWizard)
|
||||
{
|
||||
Main.PlaySound(SoundID.Item8, npc.position);
|
||||
}
|
||||
if (Main.netMode != 1)
|
||||
{
|
||||
if (npc.type == 29 || npc.type == 45)
|
||||
if (npc.type == NPCID.GoblinSorcerer || npc.type == NPCID.Tim)
|
||||
{
|
||||
NPC.NewNPC((int)npc.position.X + npc.width / 2, (int)npc.position.Y - 8, 30, 0, 0f, 0f, 0f, 0f, 255);
|
||||
NPC.NewNPC((int)npc.position.X + npc.width / 2, (int)npc.position.Y - 8, NPCID.ChaosBall, 0, 0f, 0f, 0f, 0f, 255);
|
||||
}
|
||||
else if (npc.type == 32)
|
||||
else if (npc.type == NPCID.DarkCaster)
|
||||
{
|
||||
NPC.NewNPC((int)npc.position.X + npc.width / 2, (int)npc.position.Y - 8, 33, 0, 0f, 0f, 0f, 0f, 255);
|
||||
NPC.NewNPC((int)npc.position.X + npc.width / 2, (int)npc.position.Y - 8, NPCID.WaterSphere, 0, 0f, 0f, 0f, 0f, 255);
|
||||
}
|
||||
else if (npc.type == 172)
|
||||
else if (npc.type == NPCID.RuneWizard)
|
||||
{
|
||||
float num109 = 10f;
|
||||
Vector2 vector14 = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)npc.height * 0.5f);
|
||||
@@ -21136,7 +21136,7 @@ namespace CalamityMod.NPCs
|
||||
num110 *= num112;
|
||||
num111 *= num112;
|
||||
int num113 = 40;
|
||||
int num114 = 129;
|
||||
int num114 = ProjectileID.RuneBlast;
|
||||
int num115 = Projectile.NewProjectile(vector14.X, vector14.Y, num110, num111, num114, num113, 0f, Main.myPlayer, 0f, 0f);
|
||||
Main.projectile[num115].timeLeft = 300;
|
||||
npc.localAI[0] = 0f;
|
||||
@@ -21149,15 +21149,15 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
}
|
||||
}
|
||||
if (npc.type == 29 || npc.type == 45)
|
||||
if (npc.type == NPCID.GoblinSorcerer || npc.type == NPCID.Tim)
|
||||
{
|
||||
if (Main.rand.Next(5) == 0)
|
||||
{
|
||||
int num116 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + 2f), npc.width, npc.height, 27, npc.velocity.X * 0.2f, npc.velocity.Y * 0.2f, 100, default(Color), 1.5f);
|
||||
Main.dust[num116].noGravity = true;
|
||||
Dust var_9_43F8_cp_0_cp_0 = Main.dust[num116];
|
||||
var_9_43F8_cp_0_cp_0.velocity.X = var_9_43F8_cp_0_cp_0.velocity.X * 0.5f;
|
||||
Main.dust[num116].velocity.Y = -2f;
|
||||
Dust dust = Main.dust[num116];
|
||||
dust.noGravity = true;
|
||||
dust.velocity.X *= 0.5f;
|
||||
dust.velocity.Y = -2f;
|
||||
}
|
||||
}
|
||||
else if (npc.type == 32)
|
||||
@@ -21165,18 +21165,16 @@ namespace CalamityMod.NPCs
|
||||
if (Main.rand.Next(3) != 0)
|
||||
{
|
||||
int num117 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + 2f), npc.width, npc.height, 172, npc.velocity.X * 0.2f, npc.velocity.Y * 0.2f, 100, default(Color), 0.9f);
|
||||
Main.dust[num117].noGravity = true;
|
||||
Dust var_9_44C7_cp_0_cp_0 = Main.dust[num117];
|
||||
var_9_44C7_cp_0_cp_0.velocity.X = var_9_44C7_cp_0_cp_0.velocity.X * 0.3f;
|
||||
Dust var_9_44E7_cp_0_cp_0 = Main.dust[num117];
|
||||
var_9_44E7_cp_0_cp_0.velocity.Y = var_9_44E7_cp_0_cp_0.velocity.Y * 0.2f;
|
||||
Dust var_9_4507_cp_0_cp_0 = Main.dust[num117];
|
||||
var_9_4507_cp_0_cp_0.velocity.Y = var_9_4507_cp_0_cp_0.velocity.Y - 1f;
|
||||
Dust dust = Main.dust[num117];
|
||||
dust.noGravity = true;
|
||||
dust.velocity.X *= 0.3f;
|
||||
dust.velocity.Y *= 0.2f;
|
||||
dust.velocity.Y -= 1f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (npc.type == 172)
|
||||
if (npc.type == NPCID.RuneWizard)
|
||||
{
|
||||
int num118 = 1;
|
||||
if (npc.alpha == 255)
|
||||
@@ -21189,68 +21187,63 @@ namespace CalamityMod.NPCs
|
||||
if (Main.rand.Next(255) > 255 - npc.alpha)
|
||||
{
|
||||
int num120 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + 2f), npc.width, npc.height, 106, npc.velocity.X * 0.2f, npc.velocity.Y * 0.2f, 100, default(Color), 1.2f);
|
||||
Main.dust[num120].noGravity = true;
|
||||
Dust var_9_45EA_cp_0_cp_0 = Main.dust[num120];
|
||||
var_9_45EA_cp_0_cp_0.velocity.X = var_9_45EA_cp_0_cp_0.velocity.X * (0.1f + (float)Main.rand.Next(30) * 0.01f);
|
||||
Dust var_9_461E_cp_0_cp_0 = Main.dust[num120];
|
||||
var_9_461E_cp_0_cp_0.velocity.Y = var_9_461E_cp_0_cp_0.velocity.Y * (0.1f + (float)Main.rand.Next(30) * 0.01f);
|
||||
Dust dust = Main.dust[num120];
|
||||
dust.noGravity = true;
|
||||
dust.velocity.X *= (0.1f + (float)Main.rand.Next(30) * 0.01f);
|
||||
dust.velocity.Y *= (0.1f + (float)Main.rand.Next(30) * 0.01f);
|
||||
dust.scale *= 1f + (float)Main.rand.Next(6) * 0.1f;
|
||||
}
|
||||
num = num119;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (npc.type == 283 || npc.type == 284)
|
||||
if (npc.type == NPCID.Necromancer || npc.type == NPCID.NecromancerArmored)
|
||||
{
|
||||
if (Main.rand.Next(2) == 0)
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
int num121 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + 2f), npc.width, npc.height, 173, 0f, 0f, 0, default(Color), 1f);
|
||||
Dust var_9_4715_cp_0_cp_0 = Main.dust[num121];
|
||||
var_9_4715_cp_0_cp_0.velocity.X = var_9_4715_cp_0_cp_0.velocity.X * 0.5f;
|
||||
Dust var_9_4735_cp_0_cp_0 = Main.dust[num121];
|
||||
var_9_4735_cp_0_cp_0.velocity.Y = var_9_4735_cp_0_cp_0.velocity.Y * 0.5f;
|
||||
Dust dust = Main.dust[num121];
|
||||
dust.velocity.X *= 0.5f;
|
||||
dust.velocity.Y *= 0.5f;
|
||||
}
|
||||
}
|
||||
else if (npc.type == 285 || npc.type == 286)
|
||||
else if (npc.type == NPCID.DiabolistRed || npc.type == NPCID.DiabolistWhite)
|
||||
{
|
||||
if (Main.rand.Next(2) == 0)
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
int num122 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + 2f), npc.width, npc.height, 174, npc.velocity.X * 0.2f, npc.velocity.Y * 0.2f, 100, default(Color), 1f);
|
||||
Main.dust[num122].noGravity = true;
|
||||
Dust dust = Main.dust[num122];
|
||||
dust.noGravity = true;
|
||||
dust.velocity *= 0.4f;
|
||||
Dust var_9_481F_cp_0_cp_0 = Main.dust[num122];
|
||||
var_9_481F_cp_0_cp_0.velocity.Y = var_9_481F_cp_0_cp_0.velocity.Y - 0.7f;
|
||||
dust.velocity.Y -= 0.7f;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (npc.type == 281 || npc.type == 282)
|
||||
else if (npc.type == NPCID.RaggedCaster || npc.type == NPCID.RaggedCasterOpenCoat)
|
||||
{
|
||||
if (Main.rand.Next(2) == 0)
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
int num123 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + 2f), npc.width, npc.height, 175, npc.velocity.X * 0.2f, npc.velocity.Y * 0.2f, 100, default(Color), 0.1f);
|
||||
Main.dust[num123].noGravity = true;
|
||||
Dust dust = Main.dust[num123];
|
||||
dust.noGravity = true;
|
||||
dust.velocity *= 0.5f;
|
||||
Main.dust[num123].fadeIn = 1.2f;
|
||||
dust.fadeIn = 1.2f;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (npc.type == 533)
|
||||
if (npc.type == NPCID.DesertDjinn)
|
||||
{
|
||||
Lighting.AddLight(npc.Top, 0.6f, 0.6f, 0.3f);
|
||||
return false;
|
||||
}
|
||||
if (Main.rand.Next(2) == 0)
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
int num124 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + 2f), npc.width, npc.height, 6, npc.velocity.X * 0.2f, npc.velocity.Y * 0.2f, 100, default(Color), 2f);
|
||||
Main.dust[num124].noGravity = true;
|
||||
Dust var_9_49CA_cp_0_cp_0 = Main.dust[num124];
|
||||
var_9_49CA_cp_0_cp_0.velocity.X = var_9_49CA_cp_0_cp_0.velocity.X * 1f;
|
||||
Dust var_9_49EA_cp_0_cp_0 = Main.dust[num124];
|
||||
var_9_49EA_cp_0_cp_0.velocity.Y = var_9_49EA_cp_0_cp_0.velocity.Y * 1f;
|
||||
Dust dust = Main.dust[num124];
|
||||
dust.noGravity = true;
|
||||
dust.velocity.X *= 1f;
|
||||
dust.velocity.Y *= 1f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23251,7 +23244,7 @@ namespace CalamityMod.NPCs
|
||||
{
|
||||
num2 = 3;
|
||||
bool flag4 = npc.velocity.Y == 0f;
|
||||
for (int i = 0; i < 200; i++)
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
{
|
||||
if (i != npc.whoAmI && Main.npc[i].active && Main.npc[i].type == npc.type && Math.Abs(npc.position.X - Main.npc[i].position.X) + Math.Abs(npc.position.Y - Main.npc[i].position.Y) < (float)npc.width)
|
||||
{
|
||||
@@ -23320,7 +23313,7 @@ namespace CalamityMod.NPCs
|
||||
bool flag5 = npc.ai[1] >= 120f;
|
||||
if (!flag5 && npc.velocity.Y == 0f)
|
||||
{
|
||||
for (int j = 0; j < 255; j++)
|
||||
for (int j = 0; j < Main.maxPlayers; j++)
|
||||
{
|
||||
if (Main.player[j].active && !Main.player[j].dead && Main.player[j].Distance(npc.Center) < 800f && Main.player[j].Center.Y < npc.Center.Y && Math.Abs(Main.player[j].Center.X - npc.Center.X) < 20f)
|
||||
{
|
||||
@@ -24182,10 +24175,10 @@ namespace CalamityMod.NPCs
|
||||
if (Main.rand.Next(3) < 2)
|
||||
{
|
||||
int num555 = Dust.NewDust(npc.Center - new Vector2(30f), 60, 60, 6, npc.velocity.X * 0.5f, npc.velocity.Y * 0.5f, 90, default(Color), 1.5f);
|
||||
Main.dust[num555].noGravity = true;
|
||||
Dust dust = Main.dust[num555];
|
||||
dust.noGravity = true;
|
||||
dust.velocity *= 0.2f;
|
||||
Main.dust[num555].fadeIn = 1f;
|
||||
dust.fadeIn = 1f;
|
||||
}
|
||||
|
||||
npc.ai[1] += 1f;
|
||||
@@ -24197,13 +24190,12 @@ namespace CalamityMod.NPCs
|
||||
for (int num556 = 0; num556 < 32; num556++)
|
||||
{
|
||||
int num557 = Dust.NewDust(vector68, 100, 100, 6, 0f, 0f, 100, default(Color), 2.5f);
|
||||
Main.dust[num557].noGravity = true;
|
||||
Dust dust = Main.dust[num557];
|
||||
dust.noGravity = true;
|
||||
dust.velocity *= 3f;
|
||||
num557 = Dust.NewDust(vector68, 100, 100, 6, 0f, 0f, 100, default(Color), 1.5f);
|
||||
dust = Main.dust[num557];
|
||||
dust.velocity *= 2f;
|
||||
Main.dust[num557].noGravity = true;
|
||||
dust.noGravity = true;
|
||||
}
|
||||
|
||||
for (int num558 = 0; num558 < 4; num558++)
|
||||
@@ -24211,17 +24203,15 @@ namespace CalamityMod.NPCs
|
||||
int num559 = Gore.NewGore(vector68 + new Vector2((float)(50 * Main.rand.Next(100)) / 100f, (float)(50 * Main.rand.Next(100)) / 100f) - Vector2.One * 10f, default(Vector2), Main.rand.Next(61, 64), 1f);
|
||||
Gore gore = Main.gore[num559];
|
||||
gore.velocity *= 0.3f;
|
||||
Gore var_9_1E2CE_cp_0_cp_0 = Main.gore[num559];
|
||||
var_9_1E2CE_cp_0_cp_0.velocity.X = var_9_1E2CE_cp_0_cp_0.velocity.X + (float)Main.rand.Next(-10, 11) * 0.05f;
|
||||
Gore var_9_1E302_cp_0_cp_0 = Main.gore[num559];
|
||||
var_9_1E302_cp_0_cp_0.velocity.Y = var_9_1E302_cp_0_cp_0.velocity.Y + (float)Main.rand.Next(-10, 11) * 0.05f;
|
||||
gore.velocity.X += (float)Main.rand.Next(-10, 11) * 0.05f;
|
||||
gore.velocity.Y += (float)Main.rand.Next(-10, 11) * 0.05f;
|
||||
}
|
||||
}
|
||||
|
||||
for (int num560 = 0; num560 < 5; num560++)
|
||||
{
|
||||
int num561 = Dust.NewDust(npc.position, npc.width, npc.height, 31, 0f, 0f, 100, default(Color), 1.5f);
|
||||
Main.dust[num561].velocity = Main.dust[num561].velocity * Main.rand.NextFloat();
|
||||
Main.dust[num561].velocity *= Main.rand.NextFloat();
|
||||
}
|
||||
|
||||
npc.ai[3] += 1f;
|
||||
@@ -24536,27 +24526,27 @@ namespace CalamityMod.NPCs
|
||||
}
|
||||
if (!flag36)
|
||||
{
|
||||
if (npc.type == 237)
|
||||
if (npc.type == NPCID.JungleCreeperWall)
|
||||
{
|
||||
npc.Transform(236);
|
||||
npc.Transform(NPCID.JungleCreeper);
|
||||
return false;
|
||||
}
|
||||
if (npc.type == 238)
|
||||
if (npc.type == NPCID.BlackRecluseWall)
|
||||
{
|
||||
npc.Transform(163);
|
||||
npc.Transform(NPCID.BlackRecluse);
|
||||
return false;
|
||||
}
|
||||
if (npc.type == 240)
|
||||
if (npc.type == NPCID.BloodCrawlerWall)
|
||||
{
|
||||
npc.Transform(239);
|
||||
npc.Transform(NPCID.BloodCrawler);
|
||||
return false;
|
||||
}
|
||||
if (npc.type == 531)
|
||||
if (npc.type == NPCID.DesertScorpionWall)
|
||||
{
|
||||
npc.Transform(530);
|
||||
npc.Transform(NPCID.DesertScorpionWalk);
|
||||
return false;
|
||||
}
|
||||
npc.Transform(164);
|
||||
npc.Transform(NPCID.WallCreeper);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@@ -24836,7 +24826,7 @@ namespace CalamityMod.NPCs
|
||||
num639 = Main.player[npc.target].Center.Y - (float)(npc.height / 2);
|
||||
npc.rotation = npc.velocity.X * 0.1f;
|
||||
int num;
|
||||
for (int num640 = 0; num640 < 200; num640 = num + 1)
|
||||
for (int num640 = 0; num640 < Main.maxNPCs; num640 = num + 1)
|
||||
{
|
||||
if (num640 != npc.whoAmI && Main.npc[num640].active && Main.npc[num640].type == npc.type && Math.Abs(npc.position.X - Main.npc[num640].position.X) + Math.Abs(npc.position.Y - Main.npc[num640].position.Y) < (float)npc.width)
|
||||
{
|
||||
|
||||
@@ -3905,7 +3905,11 @@ namespace CalamityMod.NPCs
|
||||
|
||||
if (!(CalamityWorld.downedPolterghast && CalamityWorld.acidRainPoints == 2))
|
||||
{
|
||||
List<(int, int)> PossibleEnemies = CalamityWorld.downedAquaticScourge ? AcidRainEvent.PossibleEnemiesAS : AcidRainEvent.PossibleEnemiesPreHM;
|
||||
List<(int, int)> PossibleEnemies = AcidRainEvent.PossibleEnemiesPreHM;
|
||||
if (CalamityWorld.downedAquaticScourge)
|
||||
PossibleEnemies = AcidRainEvent.PossibleEnemiesAS;
|
||||
if (CalamityWorld.downedPolterghast)
|
||||
PossibleEnemies = AcidRainEvent.PossibleEnemiesPolter;
|
||||
foreach (int enemy in PossibleEnemies.Select(enemyType => enemyType.Item1))
|
||||
{
|
||||
pool.Add(enemy, 1f);
|
||||
@@ -4822,7 +4826,7 @@ namespace CalamityMod.NPCs
|
||||
|
||||
case NPCID.Steampunker:
|
||||
bool hasPortalGun = false;
|
||||
for (int k = 0; k < 255; k++)
|
||||
for (int k = 0; k < Main.maxPlayers; k++)
|
||||
{
|
||||
Player player = Main.player[k];
|
||||
if (player.active && player.HasItem(ItemID.PortalGun))
|
||||
@@ -4868,7 +4872,7 @@ namespace CalamityMod.NPCs
|
||||
|
||||
case NPCID.TaxCollector:
|
||||
int platinumCoins = 0;
|
||||
for (int k = 0; k < 255; k++)
|
||||
for (int k = 0; k < Main.maxPlayers; k++)
|
||||
{
|
||||
Player player = Main.player[k];
|
||||
if (player.active)
|
||||
@@ -5073,7 +5077,7 @@ namespace CalamityMod.NPCs
|
||||
#region Any Boss NPCs
|
||||
public static bool AnyBossNPCS()
|
||||
{
|
||||
for (int i = 0; i < 200; i++)
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
{
|
||||
if (Main.npc[i].active && Main.npc[i].type != NPCID.MartianSaucerCore &&
|
||||
(Main.npc[i].boss || Main.npc[i].type == NPCID.EaterofWorldsHead || Main.npc[i].type == NPCID.EaterofWorldsTail || Main.npc[i].type == ModContent.NPCType<SlimeGodRun>() ||
|
||||
@@ -5089,7 +5093,7 @@ namespace CalamityMod.NPCs
|
||||
#region Any Living Players
|
||||
public static bool AnyLivingPlayers()
|
||||
{
|
||||
for (int i = 0; i < 255; i++)
|
||||
for (int i = 0; i < Main.maxPlayers; i++)
|
||||
{
|
||||
if (Main.player[i].active && !Main.player[i].dead && !Main.player[i].ghost)
|
||||
{
|
||||
|
||||
@@ -1595,7 +1595,11 @@ namespace CalamityMod.NPCs
|
||||
#region Acid Rain
|
||||
private void AcidRainProgression(NPC npc)
|
||||
{
|
||||
List<(int, int)> PossibleEnemies = CalamityWorld.downedAquaticScourge ? AcidRainEvent.PossibleEnemiesAS : AcidRainEvent.PossibleEnemiesPreHM;
|
||||
List<(int, int)> PossibleEnemies = AcidRainEvent.PossibleEnemiesPreHM;
|
||||
if (CalamityWorld.downedAquaticScourge)
|
||||
PossibleEnemies = AcidRainEvent.PossibleEnemiesAS;
|
||||
if (CalamityWorld.downedPolterghast)
|
||||
PossibleEnemies = AcidRainEvent.PossibleEnemiesPolter;
|
||||
if (PossibleEnemies.Select(enemy => enemy.Item1).Contains(npc.type) && CalamityWorld.rainingAcid)
|
||||
{
|
||||
CalamityWorld.acidRainPoints -= PossibleEnemies.Find(enemy => enemy.Item1 == npc.type).Item2;
|
||||
@@ -1608,6 +1612,7 @@ namespace CalamityMod.NPCs
|
||||
npc.type == ModContent.NPCType<OldDuke.OldDuke>() &&
|
||||
CalamityWorld.acidRainPoints <= 2f)
|
||||
{
|
||||
CalamityWorld.triedToSummonOldDuke = false;
|
||||
CalamityWorld.acidRainPoints = 0;
|
||||
}
|
||||
AcidRainEvent.UpdateInvasion();
|
||||
|
||||
@@ -45,8 +45,6 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
CalamityGlobalNPC global = npc.Calamity();
|
||||
global.DR = 0.6f;
|
||||
global.customDR = true;
|
||||
//global.multDRReductions.Add(BuffID.Ichor, 0.88f);
|
||||
//global.multDRReductions.Add(BuffID.CursedInferno, 0.9f);
|
||||
npc.lifeMax = CalamityWorld.revenge ? 1000000 : 750000;
|
||||
npc.knockBackResist = 0f;
|
||||
npc.noTileCollide = true;
|
||||
@@ -68,16 +66,6 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
{
|
||||
npc.buffImmune[k] = true;
|
||||
}
|
||||
/*npc.buffImmune[BuffID.Ichor] = false;
|
||||
npc.buffImmune[BuffID.CursedInferno] = false;
|
||||
npc.buffImmune[BuffID.Daybreak] = false;
|
||||
npc.buffImmune[BuffID.StardustMinionBleed] = false;
|
||||
npc.buffImmune[BuffID.Oiled] = false;
|
||||
npc.buffImmune[ModContent.BuffType<AbyssalFlames>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<DemonFlames>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<GodSlayerInferno>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<Nightwither>()] = false;
|
||||
npc.buffImmune[ModContent.BuffType<Shred>()] = false;*/
|
||||
}
|
||||
|
||||
public override void SendExtraAI(BinaryWriter writer)
|
||||
@@ -387,7 +375,7 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
|
||||
DropHelper.DropItemChance(npc, ModContent.ItemType<OldDukeTrophy>(), 10);
|
||||
DropHelper.DropItemCondition(npc, ModContent.ItemType<KnowledgeOldDuke>(), true, !CalamityWorld.downedBoomerDuke);
|
||||
DropHelper.DropResidentEvilAmmo(npc, !CalamityWorld.downedBoomerDuke, 6, 3, 2);
|
||||
DropHelper.DropResidentEvilAmmo(npc, CalamityWorld.downedBoomerDuke, 6, 3, 2);
|
||||
|
||||
// All other drops are contained in the bag, so they only drop directly on Normal
|
||||
if (!Main.expertMode)
|
||||
@@ -396,7 +384,6 @@ namespace CalamityMod.NPCs.OldDuke
|
||||
DropHelper.DropItemChance(npc, ModContent.ItemType<InsidiousImpaler>(), 4);
|
||||
DropHelper.DropItemChance(npc, ModContent.ItemType<SepticSkewer>(), 4);
|
||||
DropHelper.DropItemChance(npc, ModContent.ItemType<FetidEmesis>(), 4);
|
||||
DropHelper.DropItemChance(npc, ModContent.ItemType<Miasma>(), 4);
|
||||
DropHelper.DropItemChance(npc, ModContent.ItemType<VitriolicViper>(), 4);
|
||||
DropHelper.DropItemChance(npc, ModContent.ItemType<ToxicantTwister>(), 4);
|
||||
DropHelper.DropItemChance(npc, ModContent.ItemType<CadaverousCarrion>(), 4);
|
||||
|
||||
@@ -143,7 +143,7 @@ namespace CalamityMod.NPCs.TownNPCs
|
||||
|
||||
if (CalamityWorld.downedDoG)
|
||||
{
|
||||
dialogue.Add("I suppose that witch was mistaken. Defeating the Ceaseless Void and the Devourer has not caused our world to collapse… but I would not lower my guard if I were you.");
|
||||
dialogue.Add("I suppose that witch was mistaken. Defeating the Ceaseless Void and the Devourer has not caused our world to collapse... but I would not lower my guard if I were you.");
|
||||
}
|
||||
|
||||
/*if (CalamityWorld.downedYharon)
|
||||
|
||||
@@ -151,35 +151,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
}
|
||||
for (int num625 = 0; num625 < 3; num625++)
|
||||
{
|
||||
float scaleFactor10 = 0.33f;
|
||||
if (num625 == 1)
|
||||
{
|
||||
scaleFactor10 = 0.66f;
|
||||
}
|
||||
if (num625 == 2)
|
||||
{
|
||||
scaleFactor10 = 1f;
|
||||
}
|
||||
int num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f);
|
||||
Gore gore = Main.gore[num626];
|
||||
gore.velocity *= scaleFactor10;
|
||||
gore.velocity.X += 1f;
|
||||
gore.velocity.Y += 1f;
|
||||
num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f);
|
||||
gore.velocity *= scaleFactor10;
|
||||
gore.velocity.X -= 1f;
|
||||
gore.velocity.Y += 1f;
|
||||
num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f);
|
||||
gore.velocity *= scaleFactor10;
|
||||
gore.velocity.X += 1f;
|
||||
gore.velocity.Y -= 1f;
|
||||
num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f);
|
||||
gore.velocity *= scaleFactor10;
|
||||
gore.velocity.X -= 1f;
|
||||
gore.velocity.Y -= 1f;
|
||||
}
|
||||
CalamityUtils.ExplosionGores(projectile, 3);
|
||||
}
|
||||
|
||||
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
|
||||
|
||||
@@ -80,35 +80,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
}
|
||||
for (int num625 = 0; num625 < 3; num625++)
|
||||
{
|
||||
float scaleFactor10 = 0.33f;
|
||||
if (num625 == 1)
|
||||
{
|
||||
scaleFactor10 = 0.66f;
|
||||
}
|
||||
if (num625 == 2)
|
||||
{
|
||||
scaleFactor10 = 1f;
|
||||
}
|
||||
int num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f);
|
||||
Gore gore = Main.gore[num626];
|
||||
gore.velocity *= scaleFactor10;
|
||||
gore.velocity.X += 1f;
|
||||
gore.velocity.Y += 1f;
|
||||
num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f);
|
||||
gore.velocity *= scaleFactor10;
|
||||
gore.velocity.X -= 1f;
|
||||
gore.velocity.Y += 1f;
|
||||
num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f);
|
||||
gore.velocity *= scaleFactor10;
|
||||
gore.velocity.X += 1f;
|
||||
gore.velocity.Y -= 1f;
|
||||
num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f);
|
||||
gore.velocity *= scaleFactor10;
|
||||
gore.velocity.X -= 1f;
|
||||
gore.velocity.Y -= 1f;
|
||||
}
|
||||
CalamityUtils.ExplosionGores(projectile, 3);
|
||||
projectile.damage = Main.expertMode ? 75 : 90;
|
||||
projectile.Damage();
|
||||
}
|
||||
|
||||
@@ -95,35 +95,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
}
|
||||
for (int num625 = 0; num625 < 3; num625++)
|
||||
{
|
||||
float scaleFactor10 = 0.33f;
|
||||
if (num625 == 1)
|
||||
{
|
||||
scaleFactor10 = 0.66f;
|
||||
}
|
||||
if (num625 == 2)
|
||||
{
|
||||
scaleFactor10 = 1f;
|
||||
}
|
||||
int num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f);
|
||||
Gore gore = Main.gore[num626];
|
||||
gore.velocity *= scaleFactor10;
|
||||
gore.velocity.X += 1f;
|
||||
gore.velocity.Y += 1f;
|
||||
num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f);
|
||||
gore.velocity *= scaleFactor10;
|
||||
gore.velocity.X -= 1f;
|
||||
gore.velocity.Y += 1f;
|
||||
num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f);
|
||||
gore.velocity *= scaleFactor10;
|
||||
gore.velocity.X += 1f;
|
||||
gore.velocity.Y -= 1f;
|
||||
num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f);
|
||||
gore.velocity *= scaleFactor10;
|
||||
gore.velocity.X -= 1f;
|
||||
gore.velocity.Y -= 1f;
|
||||
}
|
||||
CalamityUtils.ExplosionGores(projectile, 3);
|
||||
}
|
||||
|
||||
public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit)
|
||||
|
||||
@@ -113,35 +113,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 89, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
}
|
||||
for (int num625 = 0; num625 < 3; num625++)
|
||||
{
|
||||
float scaleFactor10 = 0.33f;
|
||||
if (num625 == 1)
|
||||
{
|
||||
scaleFactor10 = 0.66f;
|
||||
}
|
||||
if (num625 == 2)
|
||||
{
|
||||
scaleFactor10 = 1f;
|
||||
}
|
||||
int num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f);
|
||||
Gore gore = Main.gore[num626];
|
||||
gore.velocity *= scaleFactor10;
|
||||
gore.velocity.X += 1f;
|
||||
gore.velocity.Y += 1f;
|
||||
num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f);
|
||||
gore.velocity *= scaleFactor10;
|
||||
gore.velocity.X -= 1f;
|
||||
gore.velocity.Y += 1f;
|
||||
num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f);
|
||||
gore.velocity *= scaleFactor10;
|
||||
gore.velocity.X += 1f;
|
||||
gore.velocity.Y -= 1f;
|
||||
num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f);
|
||||
gore.velocity *= scaleFactor10;
|
||||
gore.velocity.X -= 1f;
|
||||
gore.velocity.Y -= 1f;
|
||||
}
|
||||
CalamityUtils.ExplosionGores(projectile, 3);
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player target, int damage, bool crit)
|
||||
|
||||
@@ -127,7 +127,6 @@ namespace CalamityMod.Projectiles.Boss
|
||||
}
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/OldDukeRoar").SoundId, (int)projectile.Top.X, (int)projectile.Top.Y, volumeScale: 1.45f);
|
||||
int boomer = NPC.NewNPC((int)projectile.Top.X, (int)projectile.Top.Y + 100, ModContent.NPCType<OldDuke>());
|
||||
string boomerName = Main.npc[boomer].TypeName;
|
||||
|
||||
@@ -149,11 +148,14 @@ namespace CalamityMod.Projectiles.Boss
|
||||
Main.npc[boomer].alpha = 255;
|
||||
Main.npc[boomer].Calamity().newAI[3] = 1f; // To signal that Old Duke should not deccelerate as it normally would
|
||||
Main.npc[boomer].netUpdate = true;
|
||||
CalamityWorld.triedToSummonOldDuke = true;
|
||||
AcidRainEvent.UpdateInvasion(false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CalamityWorld.acidRainPoints = 0;
|
||||
CalamityWorld.triedToSummonOldDuke = false;
|
||||
AcidRainEvent.UpdateInvasion(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 813 B After Width: | Height: | Size: 1.6 KiB |
@@ -119,42 +119,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 244, 0f, 0f, 100, default, 2f);
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
}
|
||||
for (int num625 = 0; num625 < 3; num625++)
|
||||
{
|
||||
float scaleFactor10 = 0.33f;
|
||||
if (num625 == 1)
|
||||
{
|
||||
scaleFactor10 = 0.66f;
|
||||
}
|
||||
if (num625 == 2)
|
||||
{
|
||||
scaleFactor10 = 1f;
|
||||
}
|
||||
int num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f);
|
||||
Main.gore[num626].velocity *= scaleFactor10;
|
||||
Gore expr_13AB6_cp_0 = Main.gore[num626];
|
||||
expr_13AB6_cp_0.velocity.X += 1f;
|
||||
Gore expr_13AD6_cp_0 = Main.gore[num626];
|
||||
expr_13AD6_cp_0.velocity.Y += 1f;
|
||||
num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f);
|
||||
Main.gore[num626].velocity *= scaleFactor10;
|
||||
Gore expr_13B79_cp_0 = Main.gore[num626];
|
||||
expr_13B79_cp_0.velocity.X -= 1f;
|
||||
Gore expr_13B99_cp_0 = Main.gore[num626];
|
||||
expr_13B99_cp_0.velocity.Y += 1f;
|
||||
num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f);
|
||||
Main.gore[num626].velocity *= scaleFactor10;
|
||||
Gore expr_13C3C_cp_0 = Main.gore[num626];
|
||||
expr_13C3C_cp_0.velocity.X += 1f;
|
||||
Gore expr_13C5C_cp_0 = Main.gore[num626];
|
||||
expr_13C5C_cp_0.velocity.Y -= 1f;
|
||||
num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f);
|
||||
Main.gore[num626].velocity *= scaleFactor10;
|
||||
Gore expr_13CFF_cp_0 = Main.gore[num626];
|
||||
expr_13CFF_cp_0.velocity.X -= 1f;
|
||||
Gore expr_13D1F_cp_0 = Main.gore[num626];
|
||||
expr_13D1F_cp_0.velocity.Y -= 1f;
|
||||
}
|
||||
CalamityUtils.ExplosionGores(projectile, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -63,7 +63,7 @@ namespace CalamityMod.Projectiles.Boss
|
||||
if (projectile.ai[1] > 0f)
|
||||
{
|
||||
int num625 = (int)projectile.ai[1] - 1;
|
||||
if (num625 < 255)
|
||||
if (num625 < Main.maxPlayers)
|
||||
{
|
||||
Vector2 value16 = Main.player[num625].Center - projectile.Center;
|
||||
if (value16.Length() < 200f || counter > 0)
|
||||
|
||||
@@ -492,13 +492,13 @@ namespace CalamityMod.Projectiles
|
||||
{
|
||||
if (setDamageValues)
|
||||
{
|
||||
spawnedPlayerMinionDamageValue = (player.allDamage + player.minionDamage - 1f);
|
||||
spawnedPlayerMinionDamageValue = player.MinionDamage();
|
||||
spawnedPlayerMinionProjectileDamageValue = projectile.damage;
|
||||
setDamageValues = false;
|
||||
}
|
||||
if ((player.allDamage + player.minionDamage - 1f) != spawnedPlayerMinionDamageValue)
|
||||
if (player.MinionDamage() != spawnedPlayerMinionDamageValue)
|
||||
{
|
||||
int damage2 = (int)((float)spawnedPlayerMinionProjectileDamageValue / spawnedPlayerMinionDamageValue * (player.allDamage + player.minionDamage - 1f));
|
||||
int damage2 = (int)((float)spawnedPlayerMinionProjectileDamageValue / spawnedPlayerMinionDamageValue * player.MinionDamage());
|
||||
projectile.damage = damage2;
|
||||
}
|
||||
}
|
||||
@@ -598,6 +598,14 @@ namespace CalamityMod.Projectiles
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (projectile.type == ProjectileID.RainbowBack)
|
||||
{
|
||||
if (player.inventory[player.selectedItem].type == ItemID.PearlwoodBow)
|
||||
{
|
||||
projectile.magic = false;
|
||||
projectile.ranged = true;
|
||||
}
|
||||
}
|
||||
else if (projectile.type == ProjectileID.SoulDrain)
|
||||
projectile.magic = true;
|
||||
|
||||
@@ -1094,7 +1102,7 @@ namespace CalamityMod.Projectiles
|
||||
Main.player[Main.myPlayer].lifeSteal -= num12 * 1.5f;
|
||||
float num13 = 0f;
|
||||
int num14 = projectile.owner;
|
||||
for (int i = 0; i < 255; i++)
|
||||
for (int i = 0; i < Main.maxPlayers; i++)
|
||||
{
|
||||
if (Main.player[i].active && !Main.player[i].dead && ((!player.hostile && !Main.player[i].hostile) || player.team == Main.player[i].team))
|
||||
{
|
||||
@@ -1128,7 +1136,7 @@ namespace CalamityMod.Projectiles
|
||||
Main.player[Main.myPlayer].lifeSteal -= num12 * 1.5f;
|
||||
float num13 = 0f;
|
||||
int num14 = projectile.owner;
|
||||
for (int i = 0; i < 255; i++)
|
||||
for (int i = 0; i < Main.maxPlayers; i++)
|
||||
{
|
||||
if (Main.player[i].active && !Main.player[i].dead && ((!player.hostile && !Main.player[i].hostile) || player.team == Main.player[i].team))
|
||||
{
|
||||
@@ -1226,10 +1234,10 @@ namespace CalamityMod.Projectiles
|
||||
{
|
||||
int num = projectile.damage / 2;
|
||||
modPlayer.ataxiaDmg += (float)num;
|
||||
int[] array = new int[200];
|
||||
int[] array = new int[Main.maxNPCs];
|
||||
int num3 = 0;
|
||||
int num4 = 0;
|
||||
for (int i = 0; i < 200; i++)
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
{
|
||||
if (Main.npc[i].CanBeChasedBy(projectile, false))
|
||||
{
|
||||
@@ -1290,7 +1298,7 @@ namespace CalamityMod.Projectiles
|
||||
Main.player[Main.myPlayer].lifeSteal -= num12 * 1.5f;
|
||||
float num13 = 0f;
|
||||
int num14 = projectile.owner;
|
||||
for (int i = 0; i < 255; i++)
|
||||
for (int i = 0; i < Main.maxPlayers; i++)
|
||||
{
|
||||
if (Main.player[i].active && !Main.player[i].dead && ((!player.hostile && !Main.player[i].hostile) || player.team == Main.player[i].team))
|
||||
{
|
||||
@@ -1309,10 +1317,10 @@ namespace CalamityMod.Projectiles
|
||||
{
|
||||
int num = projectile.damage / 2;
|
||||
modPlayer.godSlayerDmg += (float)num;
|
||||
int[] array = new int[200];
|
||||
int[] array = new int[Main.maxNPCs];
|
||||
int num3 = 0;
|
||||
int num4 = 0;
|
||||
for (int i = 0; i < 200; i++)
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
{
|
||||
if (Main.npc[i].CanBeChasedBy(projectile, false))
|
||||
{
|
||||
@@ -1374,7 +1382,7 @@ namespace CalamityMod.Projectiles
|
||||
Main.player[Main.myPlayer].lifeSteal -= num12 * 1.5f;
|
||||
float num13 = 0f;
|
||||
int num14 = projectile.owner;
|
||||
for (int i = 0; i < 255; i++)
|
||||
for (int i = 0; i < Main.maxPlayers; i++)
|
||||
{
|
||||
if (Main.player[i].active && !Main.player[i].dead && ((!player.hostile && !Main.player[i].hostile) || player.team == Main.player[i].team))
|
||||
{
|
||||
@@ -1410,10 +1418,10 @@ namespace CalamityMod.Projectiles
|
||||
{
|
||||
int num = projectile.damage / 2;
|
||||
modPlayer.xerocDmg += (float)num;
|
||||
int[] array = new int[200];
|
||||
int[] array = new int[Main.maxNPCs];
|
||||
int num3 = 0;
|
||||
int num4 = 0;
|
||||
for (int i = 0; i < 200; i++)
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
{
|
||||
if (Main.npc[i].CanBeChasedBy(projectile, false))
|
||||
{
|
||||
@@ -1459,10 +1467,10 @@ namespace CalamityMod.Projectiles
|
||||
{
|
||||
int num = projectile.damage / 2;
|
||||
modPlayer.xerocDmg += (float)num;
|
||||
int[] array = new int[200];
|
||||
int[] array = new int[Main.maxNPCs];
|
||||
int num3 = 0;
|
||||
int num4 = 0;
|
||||
for (int i = 0; i < 200; i++)
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
{
|
||||
if (Main.npc[i].CanBeChasedBy(projectile, false))
|
||||
{
|
||||
@@ -1523,7 +1531,7 @@ namespace CalamityMod.Projectiles
|
||||
Main.player[Main.myPlayer].lifeSteal -= num12 * 1.5f;
|
||||
float num13 = 0f;
|
||||
int num14 = projectile.owner;
|
||||
for (int i = 0; i < 255; i++)
|
||||
for (int i = 0; i < Main.maxPlayers; i++)
|
||||
{
|
||||
if (Main.player[i].active && !Main.player[i].dead && ((!player.hostile && !Main.player[i].hostile) || player.team == Main.player[i].team))
|
||||
{
|
||||
@@ -1560,10 +1568,10 @@ namespace CalamityMod.Projectiles
|
||||
{
|
||||
int num = projectile.damage / 2;
|
||||
modPlayer.xerocDmg += (float)num;
|
||||
int[] array = new int[200];
|
||||
int[] array = new int[Main.maxNPCs];
|
||||
int num3 = 0;
|
||||
int num4 = 0;
|
||||
for (int i = 0; i < 200; i++)
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
{
|
||||
if (Main.npc[i].CanBeChasedBy(projectile, false))
|
||||
{
|
||||
@@ -1680,10 +1688,10 @@ namespace CalamityMod.Projectiles
|
||||
{
|
||||
int num = projectile.damage / 2;
|
||||
modPlayer.jellyDmg += (float)num;
|
||||
int[] array = new int[200];
|
||||
int[] array = new int[Main.maxNPCs];
|
||||
int num3 = 0;
|
||||
int num4 = 0;
|
||||
for (int i = 0; i < 200; i++)
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
{
|
||||
if (Main.npc[i].CanBeChasedBy(projectile, false))
|
||||
{
|
||||
@@ -1740,10 +1748,10 @@ namespace CalamityMod.Projectiles
|
||||
int num = projectile.damage / 2;
|
||||
float ai1 = Main.rand.NextFloat() + 0.5f;
|
||||
modPlayer.godSlayerDmg += (float)num;
|
||||
int[] array = new int[200];
|
||||
int[] array = new int[Main.maxNPCs];
|
||||
int num3 = 0;
|
||||
int num4 = 0;
|
||||
for (int i = 0; i < 200; i++)
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
{
|
||||
if (Main.npc[i].CanBeChasedBy(projectile, false))
|
||||
{
|
||||
@@ -1790,11 +1798,6 @@ namespace CalamityMod.Projectiles
|
||||
{
|
||||
int boom = Projectile.NewProjectile(projectile.Center, Vector2.Zero, ModContent.ProjectileType<SummonAstralExplosion>(),
|
||||
(int)(projectile.damage * 0.5f), 3f, projectile.owner);
|
||||
if (modPlayer.starTaintedGenerator)
|
||||
{
|
||||
Main.projectile[boom].localNPCHitCooldown = 15;
|
||||
Main.projectile[boom].penetrate = 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -76,35 +76,7 @@ namespace CalamityMod.Projectiles.Enemy
|
||||
num624 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 8, 0f, 0f, 100, default, 1f);
|
||||
Main.dust[num624].velocity *= 2f;
|
||||
}
|
||||
for (int num625 = 0; num625 < 3; num625++)
|
||||
{
|
||||
float scaleFactor10 = 0.33f;
|
||||
if (num625 == 1)
|
||||
{
|
||||
scaleFactor10 = 0.66f;
|
||||
}
|
||||
if (num625 == 2)
|
||||
{
|
||||
scaleFactor10 = 1f;
|
||||
}
|
||||
int num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f);
|
||||
Gore gore = Main.gore[num626];
|
||||
gore.velocity *= scaleFactor10;
|
||||
gore.velocity.X += 1f;
|
||||
gore.velocity.Y += 1f;
|
||||
num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f);
|
||||
gore.velocity *= scaleFactor10;
|
||||
gore.velocity.X -= 1f;
|
||||
gore.velocity.Y += 1f;
|
||||
num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f);
|
||||
gore.velocity *= scaleFactor10;
|
||||
gore.velocity.X += 1f;
|
||||
gore.velocity.Y -= 1f;
|
||||
num626 = Gore.NewGore(new Vector2(projectile.position.X + (float)(projectile.width / 2) - 24f, projectile.position.Y + (float)(projectile.height / 2) - 24f), default, Main.rand.Next(61, 64), 1f);
|
||||
gore.velocity *= scaleFactor10;
|
||||
gore.velocity.X -= 1f;
|
||||
gore.velocity.Y -= 1f;
|
||||
}
|
||||
CalamityUtils.ExplosionGores(projectile, 3);
|
||||
}
|
||||
|
||||
public override void OnHitPlayer(Player target, int damage, bool crit)
|
||||
|
||||