public override void AI(NPC npc) { base.AI(npc); EModeGlobalNPC.Aura(npc, 300, BuffID.WitheredArmor, false, 119); EModeGlobalNPC.Aura(npc, 300, BuffID.WitheredWeapon, false, 14); }
public override void AI(NPC npc) { base.AI(npc); EModeGlobalNPC.Aura(npc, 450, BuffID.WitheredWeapon, true, 15); EModeGlobalNPC.Aura(npc, 150, BuffID.Cursed, false, 20); }
public override void AI(NPC npc) { base.AI(npc); if (!spawned) { spawned = true; SpawnedDuringLunarEvent = NPC.LunarApocalypseIsUp; npc.damage += 150; npc.defDamage += 150; npc.netUpdate = true; npc.buffImmune[ModContent.BuffType <ClippedWings>()] = true; } if (SpawnedDuringLunarEvent) { if (ShieldStrength > NPC.LunarShieldPowerExpert) { ShieldStrength = NPC.LunarShieldPowerExpert; } void Aura(int debuff) { if (DebuffNotToInflict != debuff) { EModeGlobalNPC.Aura(npc, 5000, debuff, dustid: AuraDust); } } Aura(ModContent.BuffType <Atrophied>()); Aura(ModContent.BuffType <Jammed>()); Aura(ModContent.BuffType <ReverseManaFlow>()); Aura(ModContent.BuffType <Antisocial>()); } if (npc.dontTakeDamage) { npc.life = npc.lifeMax; } else { ShieldsDownAI(npc); if (++HealCounter > 60) { HealCounter = 0; npc.TargetClosest(false); if (!npc.HasValidTarget || npc.Distance(Main.player[npc.target].Center) > 4000) { const int heal = 2000; npc.life += heal; if (npc.life > npc.lifeMax) { npc.life = npc.lifeMax; } CombatText.NewText(npc.Hitbox, CombatText.HealLife, heal); } } } }
public override void AI(NPC npc) { base.AI(npc); if (npc.HasPlayerTarget) { if (npc.velocity.Y < 0f && npc.position.Y < Main.player[npc.target].position.Y) { npc.velocity.Y = 0f; } if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) < 200) { Counter++; } } if (Counter >= 60) { if (!Main.dedServ) { SoundEngine.PlaySound(new SoundStyle("FargowiltasSouls/Sounds/Navi") { Pitch = 0.5f }, npc.Center); } Counter = 0; } EModeGlobalNPC.Aura(npc, 100, ModContent.BuffType <SqueakyToy>()); }
public override void AI(NPC npc) { base.AI(npc); if (npc.type == NPCID.Nymph) { npc.knockBackResist = 0f; EModeGlobalNPC.Aura(npc, 250, ModContent.BuffType <Lovestruck>(), true, DustID.PinkTorch); if (--Counter < 0) { Counter = 300; if (Main.netMode != NetmodeID.MultiplayerClient && npc.HasPlayerTarget && npc.Distance(Main.player[npc.target].Center) < 1000) { Vector2 spawnVel = npc.DirectionFrom(Main.player[npc.target].Center) * 10f; for (int i = -3; i < 3; i++) { Projectile.NewProjectile(npc.GetSource_FromThis(), npc.Center, spawnVel.RotatedBy(Math.PI / 7 * i), ModContent.ProjectileType <FakeHeart2>(), 20, 0f, Main.myPlayer, 30, 90 + 10 * i); } } } } }
public override void AI(NPC npc) { base.AI(npc); EModeGlobalNPC.Aura(npc, 200, ModContent.BuffType <Shadowflame>(), false, DustID.Shadowflame); if (++AttackTimer > 180) { AttackTimer = 0; Main.PlaySound(SoundID.Item8, npc.Center); if (npc.HasPlayerTarget && Main.netMode != NetmodeID.MultiplayerClient) { for (int i = 0; i < 4; i++) { Vector2 spawnPos = npc.Center + new Vector2(200f, 0f).RotatedBy(Math.PI / 2 * (i + 0.5)); //Vector2 speed = Vector2.Normalize(Main.player[npc.target].Center - spawnPos) * 10f; int n = NPC.NewNPC((int)spawnPos.X, (int)spawnPos.Y, NPCID.ChaosBall); if (n != 200 && Main.netMode == NetmodeID.Server) { NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, n); } for (int j = 0; j < 20; j++) { int d = Dust.NewDust(spawnPos, 0, 0, DustID.Shadowflame); Main.dust[d].noGravity = true; Main.dust[d].scale += 0.5f; Main.dust[d].velocity *= 6f; } } } } }
public override void AI(NPC npc) { base.AI(npc); EModeGlobalNPC.Aura(npc, 450, BuffID.Silenced, true, 15); EModeGlobalNPC.Aura(npc, 150, BuffID.Cursed, false, 20); }
public override void AI(NPC npc) { base.AI(npc); EModeGlobalNPC.Aura(npc, 200, BuffID.Bleeding, false, DustID.Blood); if (++Counter > 10) { Counter = 0; if (Main.LocalPlayer.active && !Main.LocalPlayer.ghost && !Main.LocalPlayer.dead && Main.LocalPlayer.bleed && npc.Distance(Main.LocalPlayer.Center) < 200) { const int damage = 5; Player target = Main.LocalPlayer; target.statLife -= damage; CombatText.NewText(target.Hitbox, Color.Red, damage, false, true); if (target.statLife < 0) { target.KillMe(PlayerDeathReason.ByCustomReason(target.name + " was sucked dry."), 999, 0); } npc.life += damage; if (npc.life > npc.lifeMax) { npc.life = npc.lifeMax; } npc.HealEffect(damage); } } }
public override void AI(NPC npc) { base.AI(npc); EModeGlobalNPC.Aura(npc, 80, BuffID.Obstructed, false, 199); npc.aiStyle = 5; }
public override void AI(NPC npc) { base.AI(npc); npc.position += npc.velocity / 2f; EModeGlobalNPC.Aura(npc, 400, BuffID.WitheredArmor, true, 119); EModeGlobalNPC.Aura(npc, 400, BuffID.WitheredWeapon, true, 14); if (npc.ai[0] == 2f) //spinning up { npc.ai[1] += 6f * (1f - (float)npc.life / npc.lifeMax); //FINISH SPINNING FASTER } }
public override void AI(NPC npc) { base.AI(npc); int radius = npc.type == NPCID.DD2DarkMageT1 ? 600 : 900; EModeGlobalNPC.Aura(npc, radius, ModContent.BuffType <Lethargic>(), false, 254); foreach (NPC n in Main.npc.Where(n => n.active && !n.friendly && n.type != npc.type && n.Distance(npc.Center) < radius)) { n.GetGlobalNPC <EModeGlobalNPC>().PaladinsShield = true; if (Main.rand.NextBool()) { int d = Dust.NewDust(n.position, n.width, n.height, 254, 0f, -3f, 0, new Color(), 1.5f); Main.dust[d].noGravity = true; Main.dust[d].noLight = true; } } }
public override void AI(NPC npc) { base.AI(npc); if (++Counter > 120) { Counter = 0; int t = npc.HasPlayerTarget ? npc.target : npc.FindClosestPlayer(); if (t != -1 && npc.Distance(Main.player[t].Center) < 600 && Main.netMode != NetmodeID.MultiplayerClient) { npc.velocity *= 5; npc.netUpdate = true; NetSync(npc); } } EModeGlobalNPC.Aura(npc, 100, BuffID.Burning, false, DustID.Torch); }
public override void AI(NPC npc) { base.AI(npc); if (IsSmallPaladin && Main.netMode == NetmodeID.Server && ++Counter <= 65 && Counter % 15 == 5) //mp sync { npc.netUpdate = true; NetSync(npc); } if (IsSmallPaladin && !FinishedSpawning) { FinishedSpawning = true; npc.Center = npc.Bottom; npc.width = (int)(npc.width * .65f); npc.height = (int)(npc.height * .65f); npc.scale = .65f; npc.lifeMax /= 2; if (npc.life > npc.lifeMax) { npc.life = npc.lifeMax; } npc.Bottom = npc.Center; } EModeGlobalNPC.Aura(npc, 800f, BuffID.BrokenArmor, false, 246); foreach (NPC n in Main.npc.Where(n => n.active && !n.friendly && n.type != NPCID.Paladin && n.Distance(npc.Center) < 800f)) { n.GetGlobalNPC <EModeGlobalNPC>().PaladinsShield = true; if (Main.rand.NextBool()) { int d = Dust.NewDust(n.position, n.width, n.height, 246, 0f, -1.5f, 0, new Color()); Main.dust[d].velocity *= 0.5f; Main.dust[d].noLight = true; } } }
public override void AI(NPC npc) { base.AI(npc); if (++AttackTimer > 300) { AttackTimer = 0; if (Main.netMode != NetmodeID.MultiplayerClient && npc.HasPlayerTarget) { Vector2 vel = npc.DirectionFrom(Main.player[npc.target].Center) * 8f; for (int i = 0; i < 5; i++) { int p = Projectile.NewProjectile(npc.Center, vel.RotatedBy(2 * Math.PI / 5 * i), ProjectileID.RuneBlast, 30, 0f, Main.myPlayer, 1); if (p != Main.maxProjectiles) { Main.projectile[p].timeLeft = 300; } } } } EModeGlobalNPC.Aura(npc, 450f, true, 74, Color.GreenYellow, ModContent.BuffType <Hexed>()); EModeGlobalNPC.Aura(npc, 150f, false, 73, default, ModContent.BuffType <Hexed>(), BuffID.Suffocation);
public override void AI(NPC npc) { base.AI(npc); EModeGlobalNPC.Aura(npc, 400, ModContent.BuffType <LightningRod>(), false, DustID.Vortex); }
public override void AI(NPC npc) { base.AI(npc); EModeGlobalNPC.Aura(npc, 250, BuffID.Burning, false, DustID.Torch); }
public override bool PreAI(NPC npc) { EModeGlobalNPC.retiBoss = npc.whoAmI; if (FargoSoulsWorld.SwarmActive) { return(true); } NPC spazmatism = FargoSoulsUtil.NPCExists(EModeGlobalNPC.spazBoss, NPCID.Spazmatism); if (FargoSoulsWorld.MasochistModeReal && spazmatism == null && npc.HasValidTarget && ++RespawnTimer > 600) { RespawnTimer = 0; if (Main.netMode != NetmodeID.MultiplayerClient) { int n = FargoSoulsUtil.NewNPCEasy(npc.GetSource_FromThis(), npc.Center + new Vector2(Main.rand.NextFloat(-1000, 1000), Main.rand.NextFloat(-800, -600)), NPCID.Spazmatism, target: npc.target); if (n != Main.maxNPCs) { Main.npc[n].life = Main.npc[n].lifeMax / 4; if (Main.netMode == NetmodeID.Server) { NetMessage.SendData(MessageID.SyncNPC, number: n); } string text = Language.GetTextValue($"Mods.{mod.Name}.Message.TwinsRevive"); FargoSoulsUtil.PrintText($"{Main.npc[n].FullName} {text}", new Color(175, 75, 255)); } } } if (!ForcedPhase2OnSpawn) //start phase 2 { ForcedPhase2OnSpawn = true; npc.ai[0] = 1f; npc.ai[1] = 0.0f; npc.ai[2] = 0.0f; npc.ai[3] = 0.0f; npc.netUpdate = true; } if (npc.life <= npc.lifeMax / 2 || npc.dontTakeDamage) { npc.dontTakeDamage = npc.life == 1 || !npc.HasValidTarget; if (npc.life != 1 && npc.HasValidTarget) { npc.dontTakeDamage = false; } //become vulnerable again when both twins at low life if (npc.dontTakeDamage && npc.HasValidTarget && (spazmatism == null || spazmatism.life == 1)) { npc.dontTakeDamage = false; } } if (Main.dayTime) { if (npc.velocity.Y > 0) { npc.velocity.Y = 0; } npc.velocity.Y -= 0.5f; npc.dontTakeDamage = true; if (spazmatism != null) { if (npc.timeLeft < 60) { npc.timeLeft = 60; } if (spazmatism.timeLeft < 60) { spazmatism.timeLeft = 60; } npc.TargetClosest(false); spazmatism.TargetClosest(false); if (npc.Distance(Main.player[npc.target].Center) > 2000 && spazmatism.Distance(Main.player[spazmatism.target].Center) > 2000) { if (Main.netMode != NetmodeID.MultiplayerClient) { npc.active = false; if (Main.netMode == NetmodeID.Server) { NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, npc.whoAmI); } spazmatism.active = false; if (Main.netMode == NetmodeID.Server) { NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, EModeGlobalNPC.spazBoss); } } } } return(true); } if (npc.ai[0] < 4f) //going to phase 3 { if (npc.life <= npc.lifeMax / 2) { //npc.ai[0] = 4f; npc.ai[0] = 604f; //initiate spin immediately npc.netUpdate = true; SoundEngine.PlaySound(SoundID.Roar, npc.Center); if (Main.netMode != NetmodeID.MultiplayerClient) { Projectile.NewProjectile(npc.GetSource_FromThis(), npc.Center, Vector2.Zero, ModContent.ProjectileType <GlowRingHollow>(), 0, 0f, Main.myPlayer, 11, npc.whoAmI); } } } else //in phase 3 { if (FargoSoulsWorld.MasochistModeReal && npc.life == 1 && --DarkStarTimer < 0) //when brought to 1hp, begin shooting dark stars { DarkStarTimer = 240; if (Main.netMode != NetmodeID.MultiplayerClient && npc.HasPlayerTarget) { Vector2 distance = Main.player[npc.target].Center - npc.Center; distance.Normalize(); distance *= 10f; for (int i = 0; i < 12; i++) { Projectile.NewProjectile(npc.GetSource_FromThis(), npc.Center, distance.RotatedBy(2 * Math.PI / 12 * i), ModContent.ProjectileType <DarkStar>(), FargoSoulsUtil.ScaledProjectileDamage(npc.damage, 0.8f), 0f, Main.myPlayer); } } } //dust code if (Main.rand.Next(4) < 3) { int dust = Dust.NewDust(npc.position - new Vector2(2f, 2f), npc.width + 4, npc.height + 4, 90, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default(Color), 3.5f); Main.dust[dust].noGravity = true; Main.dust[dust].velocity *= 1.8f; Main.dust[dust].velocity.Y -= 0.5f; if (Main.rand.NextBool(4)) { Main.dust[dust].noGravity = false; Main.dust[dust].scale *= 0.5f; } } if (npc.localAI[1] >= (npc.ai[1] == 0 ? 175 : 55)) //hijacking vanilla laser code { npc.localAI[1] = 0; Vector2 vel = npc.DirectionTo(Main.player[npc.target].Center); Projectile.NewProjectile(npc.GetSource_FromThis(), npc.Center + (npc.width - 24) * vel, vel, ModContent.ProjectileType <DarkStarTwins>(), FargoSoulsUtil.ScaledProjectileDamage(npc.damage), 0f, Main.myPlayer, npc.target); } if (DeathrayState == 0 || DeathrayState == 3) //not doing deathray, grow arena { AuraRadiusCounter--; if (AuraRadiusCounter < 0) { AuraRadiusCounter = 0; } } else //doing deathray, shrink arena { AuraRadiusCounter++; if (AuraRadiusCounter > 180) { AuraRadiusCounter = 180; } } float auraDistance = 2000 - 1200 * AuraRadiusCounter / 180f; if (FargoSoulsWorld.MasochistModeReal) { auraDistance *= 0.75f; } if (auraDistance < 2000) { EModeGlobalNPC.Aura(npc, auraDistance, true, DustID.Torch, default, ModContent.BuffType <Oiled>(), BuffID.OnFire, BuffID.Burning);
public override void AI(NPC npc) { base.AI(npc); EModeGlobalNPC.Aura(npc, 400, BuffID.BrokenArmor, false, 37); }
public override void AI(NPC npc) { base.AI(npc); EModeGlobalNPC.Aura(npc, 200, BuffID.Poisoned, false, 188); }
public override void AI(NPC npc) { base.AI(npc); EModeGlobalNPC.Aura(npc, 40, false, 199, default, ModContent.BuffType <MarkedforDeath>(), BuffID.Obstructed);
public override bool PreAI(NPC npc) { EModeGlobalNPC.betsyBoss = npc.whoAmI; if (FargoSoulsWorld.SwarmActive) { return(true); } if (FargoSoulsWorld.MasochistModeReal) { for (int i = 0; i < 3; i++) { Rectangle rectangle = new Rectangle((int)Main.screenPosition.X + Main.screenWidth / 3, (int)Main.screenPosition.Y + Main.screenHeight / 3, Main.screenWidth / 3, Main.screenHeight / 3); CombatText.NewText(rectangle, new Color(100 + Main.rand.Next(150), 100 + Main.rand.Next(150), 100 + Main.rand.Next(150)), Main.rand.Next(new List <string> { "CRINGE", "NOT POGGERS", "MONKAS", "SHOW WINGS", "AERIAL BANE POG", "REAL BOSS WHEN?", "#NOTMYMASOMODE", "OOA BAD ANYWAY", "COPE MALD SEETHE", "GET REAL", "GET FAKE", "POGGERS", "ResidentSleeper", "If you can read this say 22", "GuraSit", "play calamity", "play thorium", "hardcore 1hp challenge when?", "now do it with a copper shortsword", "Zenith Yoyo?", "guys how do i beat moon lord", "GUYS I GOT TERRAPRISMA", "how do i install this update", "Hi YouTube!", "<Message was deleted by staff>", $"<User {Main.rand.Next(10)}{Main.rand.Next(10)}{Main.rand.Next(10)}{Main.rand.Next(10)}{Main.rand.Next(10)} was banned>", $"<User {Main.rand.Next(10)}{Main.rand.Next(10)}{Main.rand.Next(10)}{Main.rand.Next(10)}{Main.rand.Next(10)} was muted>", }), Main.rand.NextBool(), Main.rand.NextBool()); } if (Main.rand.NextBool(30) && npc.HasPlayerTarget) { switch (Main.rand.Next(12)) { case 0: if (!Main.dedServ) { SoundEngine.PlaySound(new SoundStyle("FargowiltasSouls/Sounds/Thunder"), Main.player[npc.target].Center); } break; case 1: SoundEngine.PlaySound(SoundID.ScaryScream, Main.player[npc.target].Center); //arte scream break; case 2: SoundEngine.PlaySound(SoundID.Roar, Main.player[npc.target].Center); break; case 3: SoundEngine.PlaySound(SoundID.ForceRoarPitched, Main.player[npc.target].Center); //eoc roar break; case 4: if (!Main.dedServ) { SoundEngine.PlaySound(new SoundStyle("FargowiltasSouls/Sounds/Monster94"), Main.player[npc.target].Center); } break; case 5: if (!Main.dedServ) { SoundEngine.PlaySound(new SoundStyle("FargowiltasSouls/Sounds/Monster5") { Volume = 1.5f }, Main.player[npc.target].Center); } break; case 6: if (!Main.dedServ) { SoundEngine.PlaySound(new SoundStyle("FargowiltasSouls/Sounds/Thunder") { Volume = 1.5f, Pitch = 1.5f }, Main.player[npc.target].Center); } break; case 7: if (!Main.dedServ) { SoundEngine.PlaySound(new SoundStyle("FargowiltasSouls/Sounds/Zombie_104"), Main.player[npc.target].Center); } break; case 8: if (!Main.dedServ) { SoundEngine.PlaySound(new SoundStyle("FargowiltasSouls/Sounds/Monster70"), Main.player[npc.target].Center); } break; case 9: if (!Main.dedServ) { SoundEngine.PlaySound(new SoundStyle("FargowiltasSouls/Sounds/Railgun"), Main.player[npc.target].Center); } break; case 10: if (!Main.dedServ) { SoundEngine.PlaySound(new SoundStyle("FargowiltasSouls/Sounds/Navi"), Main.player[npc.target].Center); } break; case 11: if (!Main.dedServ) { SoundEngine.PlaySound(new SoundStyle("FargowiltasSouls/Sounds/ZaWarudo") { Volume = 1.5f }, Main.player[npc.target].Center); } break; default: SoundEngine.PlaySound(SoundID.NPCDeath10, Main.player[npc.target].Center); break; } } } if (!InPhase2 && npc.life < npc.lifeMax / 2) { InPhase2 = true; SoundEngine.PlaySound(SoundID.Roar, npc.Center); } if (npc.ai[0] == 6f) //when approaching for roar { if (npc.ai[1] == 0f) { npc.position += npc.velocity; } else if (npc.ai[1] == 1f) { DoFuryRingAttack = true; } } if (DoFuryRingAttack) { npc.velocity = Vector2.Zero; if (FuryRingTimer == 0) { if (Main.netMode != NetmodeID.MultiplayerClient) { Projectile.NewProjectile(npc.GetSource_FromThis(), npc.Center, Vector2.Zero, ModContent.ProjectileType <GlowRingHollow>(), FargoSoulsUtil.ScaledProjectileDamage(npc.damage, 4f / 3), 0f, Main.myPlayer, 4); } if (FargoSoulsWorld.MasochistModeReal) { if (NPC.CountNPCS(NPCID.DD2DarkMageT3) < 3) { FargoSoulsUtil.NewNPCEasy(npc.GetSource_FromAI(), npc.Center, NPCID.DD2DarkMageT3, target: npc.target); } } } FuryRingTimer++; if (FuryRingTimer % 2 == 0) { if (Main.netMode != NetmodeID.MultiplayerClient) { float rotation = FuryRingShotRotationCounter; if (FargoSoulsWorld.MasochistModeReal && FuryRingTimer >= 30 && FuryRingTimer <= 60) { rotation += 1; //staggers each wave instead of lining them up behind each other } Projectile.NewProjectile(npc.GetSource_FromThis(), npc.Center, -Vector2.UnitY.RotatedBy(2 * Math.PI / 30 * rotation), ModContent.ProjectileType <BetsyFury>(), FargoSoulsUtil.ScaledProjectileDamage(npc.damage, 4f / 3), 0f, Main.myPlayer, npc.target); Projectile.NewProjectile(npc.GetSource_FromThis(), npc.Center, -Vector2.UnitY.RotatedBy(2 * Math.PI / 30 * -rotation), ModContent.ProjectileType <BetsyFury>(), FargoSoulsUtil.ScaledProjectileDamage(npc.damage, 4f / 3), 0f, Main.myPlayer, npc.target); } FuryRingShotRotationCounter++; } if (FuryRingTimer > (InPhase2 ? 90 : 30) + 2) { DoFuryRingAttack = false; InFuryRingAttackCooldown = true; FuryRingTimer = 0; FuryRingShotRotationCounter = 0; } EModeGlobalNPC.Aura(npc, 1200, BuffID.WitheredWeapon, true, 226); EModeGlobalNPC.Aura(npc, 1200, BuffID.WitheredArmor, true, 226); } if (InFuryRingAttackCooldown) { EModeGlobalNPC.Aura(npc, 1200, BuffID.WitheredWeapon, true, 226); EModeGlobalNPC.Aura(npc, 1200, BuffID.WitheredArmor, true, 226); if (++FuryRingShotRotationCounter > 90) { InFuryRingAttackCooldown = false; FuryRingTimer = 0; FuryRingShotRotationCounter = 0; } npc.position -= npc.velocity * 0.5f; if (FuryRingTimer % 2 == 0) { return(false); } } if (!DD2Event.Ongoing && npc.HasPlayerTarget && (!Main.player[npc.target].active || Main.player[npc.target].dead || npc.Distance(Main.player[npc.target].Center) > 3000)) { int p = Player.FindClosest(npc.Center, 0, 0); //extra despawn code for when summoned outside event if (p < 0 || !Main.player[p].active || Main.player[p].dead || npc.Distance(Main.player[p].Center) > 3000) { npc.active = false; } } EModeUtils.DropSummon(npc, "BetsyEgg", FargoSoulsWorld.downedBetsy, ref DroppedSummon, NPC.downedGolemBoss); return(true); }
public override void AI(NPC npc) { base.AI(npc); EModeGlobalNPC.Aura(npc, 100, ModContent.BuffType <Shadowflame>(), false, DustID.Shadowflame); }
public override void AI(NPC npc) { base.AI(npc); EModeGlobalNPC.Aura(npc, 500, BuffID.Stinky, false, 188); }
public override void AI(NPC npc) { base.AI(npc); EModeGlobalNPC.Aura(npc, 250, ModContent.BuffType <Infested>(), false, 188); }
public override void AI(NPC npc) { base.AI(npc); EModeGlobalNPC.Aura(npc, 150, false, 199, default, BuffID.Blackout, BuffID.Darkness);
public override void AI(NPC npc) { base.AI(npc); EModeGlobalNPC.Aura(npc, 200, ModContent.BuffType <Berserked>(), false, 60); }
public override bool PreAI(NPC npc) { EModeGlobalNPC.retiBoss = npc.whoAmI; if (FargoSoulsWorld.SwarmActive) { return(true); } NPC spazmatism = FargoSoulsUtil.NPCExists(EModeGlobalNPC.spazBoss, NPCID.Spazmatism); if (!ForcedPhase2OnSpawn) //start phase 2 { ForcedPhase2OnSpawn = true; npc.ai[0] = 1f; npc.ai[1] = 0.0f; npc.ai[2] = 0.0f; npc.ai[3] = 0.0f; npc.netUpdate = true; } if (npc.life <= npc.lifeMax / 2 || npc.dontTakeDamage) { npc.dontTakeDamage = npc.life == 1 || !npc.HasValidTarget; if (npc.life != 1 && npc.HasValidTarget) { npc.dontTakeDamage = false; } //become vulnerable again when both twins at low life if (npc.dontTakeDamage && npc.HasValidTarget && (spazmatism == null || spazmatism.life == 1)) { npc.dontTakeDamage = false; } } if (Main.dayTime) { if (npc.velocity.Y > 0) { npc.velocity.Y = 0; } npc.velocity.Y -= 0.5f; npc.dontTakeDamage = true; if (spazmatism != null) { if (npc.timeLeft < 60) { npc.timeLeft = 60; } if (spazmatism.timeLeft < 60) { spazmatism.timeLeft = 60; } npc.TargetClosest(false); spazmatism.TargetClosest(false); if (npc.Distance(Main.player[npc.target].Center) > 2000 && spazmatism.Distance(Main.player[spazmatism.target].Center) > 2000) { if (Main.netMode != NetmodeID.MultiplayerClient) { npc.active = false; if (Main.netMode == NetmodeID.Server) { NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, npc.whoAmI); } spazmatism.active = false; if (Main.netMode == NetmodeID.Server) { NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, EModeGlobalNPC.spazBoss); } } } } return(true); } if (npc.ai[0] < 4f) //going to phase 3 { if (npc.life <= npc.lifeMax / 2) { //npc.ai[0] = 4f; npc.ai[0] = 604f; //initiate spin immediately npc.netUpdate = true; Main.PlaySound(SoundID.Roar, (int)npc.Center.X, (int)npc.Center.Y, 0); if (Main.netMode != NetmodeID.MultiplayerClient) { Projectile.NewProjectile(npc.Center, Vector2.Zero, ModContent.ProjectileType <GlowRingHollow>(), 0, 0f, Main.myPlayer, 11, npc.whoAmI); } } } else //in phase 3 { /*if (npc.life == 1 && --Counter1 < 0) //when brought to 1hp, begin shooting dark stars * { * Counter1 = 240; * if (Main.netMode != NetmodeID.MultiplayerClient && npc.HasPlayerTarget) * { * Vector2 distance = Main.player[npc.target].Center - npc.Center; * distance.Normalize(); * distance *= 10f; * for (int i = 0; i < 12; i++) * Projectile.NewProjectile(npc.Center, distance.RotatedBy(2 * Math.PI / 12 * i), * ModContent.ProjectileType<DarkStar>(), npc.damage / 5, 0f, Main.myPlayer); * } * }*/ //dust code if (Main.rand.Next(4) < 3) { int dust = Dust.NewDust(npc.position - new Vector2(2f, 2f), npc.width + 4, npc.height + 4, 90, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 100, default(Color), 3.5f); Main.dust[dust].noGravity = true; Main.dust[dust].velocity *= 1.8f; Main.dust[dust].velocity.Y -= 0.5f; if (Main.rand.NextBool(4)) { Main.dust[dust].noGravity = false; Main.dust[dust].scale *= 0.5f; } } if (npc.localAI[1] >= (npc.ai[1] == 0 ? 175 : 55)) //hijacking vanilla laser code { npc.localAI[1] = 0; Vector2 vel = npc.DirectionTo(Main.player[npc.target].Center); int proj = Projectile.NewProjectile(npc.Center + (npc.width - 24) * vel, vel, ModContent.ProjectileType <DarkStarHoming>(), npc.damage / 4, 0f, Main.myPlayer, -1, 1f); if (proj != Main.maxProjectiles) { Main.projectile[proj].timeLeft = 120; } } if (DeathrayState == 0 || DeathrayState == 3) //not doing deathray, grow arena { AuraRadiusCounter--; if (AuraRadiusCounter < 0) { AuraRadiusCounter = 0; } } else //doing deathray, shrink arena { AuraRadiusCounter++; if (AuraRadiusCounter > 180) { AuraRadiusCounter = 180; } } float auraDistance = 2000 - 1200 * AuraRadiusCounter / 180f; if (FargoSoulsWorld.MasochistModeReal) { auraDistance *= 0.75f; } EModeGlobalNPC.Aura(npc, auraDistance, true, DustID.Fire, default, ModContent.BuffType <Oiled>(), BuffID.OnFire, BuffID.Burning);
public override void AI(NPC npc) { base.AI(npc); EModeGlobalNPC.Aura(npc, 100, BuffID.Cursed, false, 20); }
public override void AI(NPC npc) { base.AI(npc); EModeGlobalNPC.Aura(npc, 300, ModContent.BuffType <SqueakyToy>()); }
public override void AI(NPC npc) { base.AI(npc); EModeGlobalNPC.Aura(npc, 500, BuffID.Slow, false, 0); }