public override bool CanHitPlayer(Player target) { if (projectile.Colliding(projectile.Hitbox, target.Hitbox)) { if (target.GetModPlayer <FargoPlayer>().DevianttHearts) { target.statLife += 1; target.HealEffect(1); } else { target.hurtCooldowns[0] = 0; int defense = target.statDefense; float endurance = target.endurance; target.statDefense = 0; target.endurance = 0; target.Hurt(PlayerDeathReason.ByCustomReason(target.name + " felt heartbroken."), projectile.damage, 0, false, false, false, 0); target.statDefense = defense; target.endurance = endurance; if (EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.deviBoss, mod.NPCType("DeviBoss"))) { target.AddBuff(mod.BuffType("Lovestruck"), 240); } } projectile.timeLeft = 0; } return(false); }
public override void AI() { int index = Dust.NewDust(projectile.Center, 0, 0, 229, 0.0f, 0.0f, 100, new Color(), 1f); Main.dust[index].noLight = true; Main.dust[index].noGravity = true; Main.dust[index].velocity = projectile.velocity; Main.dust[index].position -= Vector2.One * 4f; Main.dust[index].scale = 0.8f; if (++projectile.frameCounter >= 6 * 4) //projectile extra updates + 1 { projectile.frameCounter = 0; if (++projectile.frame >= 5) { projectile.frame = 0; } } if (projectile.timeLeft % (projectile.extraUpdates + 1) == 0 && ++projectile.localAI[1] > 30) //only run once per tick { if (projectile.localAI[1] < 90) //accelerate { projectile.velocity *= 1.04f; } else if (projectile.localAI[1] < 150 && EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.moonBoss, NPCID.MoonLordCore) && Main.npc[EModeGlobalNPC.moonBoss].HasValidTarget) //home { float rotation = projectile.velocity.ToRotation(); Vector2 vel = Main.player[Main.npc[EModeGlobalNPC.moonBoss].target].Center + Main.player[Main.npc[EModeGlobalNPC.moonBoss].target].velocity * 10f - projectile.Center; float targetAngle = vel.ToRotation(); projectile.velocity = new Vector2(projectile.velocity.Length(), 0f).RotatedBy(rotation.AngleLerp(targetAngle, 0.03f)); } } }
public override void OnHitPlayer(Player target, int damage, bool crit) { target.AddBuff(mod.BuffType("Defenseless"), 600); //target.AddBuff(BuffID.WitheredWeapon, 600); target.AddBuff(mod.BuffType("OceanicMaul"), 1800); target.GetModPlayer <FargoPlayer>().MaxLifeReduction += EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.fishBossEX, NPCID.DukeFishron) ? 100 : 25; }
public override void Update(Player player, ref int buffIndex) { player.GetModPlayer <FargoPlayer>().MutantPresence = true; //LUL player.GetModPlayer <FargoPlayer>().noDodge = true; player.GetModPlayer <FargoPlayer>().noSupersonic = true; player.moonLeech = true; if (EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.fishBoss, NPCID.DukeFishron)) { player.buffTime[buffIndex] = 2; if (player.whoAmI == Main.npc[EModeGlobalNPC.fishBoss].target && player.whoAmI == Main.myPlayer && player.ownedProjectileCounts[mod.ProjectileType("FishronRitual2")] < 1) { Projectile.NewProjectile(Main.npc[EModeGlobalNPC.fishBoss].Center, Vector2.Zero, mod.ProjectileType("FishronRitual2"), 0, 0f, player.whoAmI, 0f, EModeGlobalNPC.fishBoss); } } else { return; } /*float distance = player.Distance(Main.npc[FargoSoulsGlobalNPC.fishBoss].Center); * const float threshold = 1200f; * if (distance > threshold) * { * if (distance > threshold * 1.5f) * { * if (distance > threshold * 2f) * { * player.KillMe(PlayerDeathReason.ByCustomReason(player.name + " tried to escape."), 7777, 0); * return; * } * * player.frozen = true; * player.controlHook = false; * player.controlUseItem = false; * if (player.mount.Active) * player.mount.Dismount(player); * player.velocity.X = 0f; * player.velocity.Y = -0.4f; * } * * Vector2 movement = Main.npc[FargoSoulsGlobalNPC.fishBoss].Center - player.Center; * float difference = movement.Length() - 1200f; * movement.Normalize(); * movement *= difference < 17f ? difference : 17f; * player.position += movement; * * for (int i = 0; i < 20; i++) * { * int d = Dust.NewDust(player.position, player.width, player.height, 135, 0f, 0f, 0, default(Color), 2.5f); * Main.dust[d].noGravity = true; * Main.dust[d].noLight = true; * Main.dust[d].velocity *= 5f; * } * }*/ }
public override void AI() { if (projectile.localAI[0] == 0) { for (int i = 0; i < 5; i++) { int d = Dust.NewDust(projectile.position, projectile.width, projectile.height, DustID.Fire, projectile.velocity.X, projectile.velocity.Y, 0, default(Color), 1.5f); Main.dust[d].velocity *= 6f; } } if (++projectile.localAI[0] > 30 && projectile.localAI[0] < 120) { projectile.velocity *= projectile.ai[0]; } if (projectile.localAI[0] > 60 && projectile.localAI[0] < 180) { if (EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.championBoss, ModContent.NPCType <NPCs.Champions.ShadowChampion>())) { float rotation = projectile.velocity.ToRotation(); Vector2 vel = Main.player[Main.npc[EModeGlobalNPC.championBoss].target].Center - projectile.Center; float targetAngle = vel.ToRotation(); projectile.velocity = new Vector2(projectile.velocity.Length(), 0f).RotatedBy(rotation.AngleLerp(targetAngle, projectile.ai[1])); } } projectile.rotation = projectile.velocity.ToRotation() + (float)Math.PI / 2; }
public override void FindFrame(int frameHeight) { if (EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.brainBoss, NPCID.BrainofCthulhu)) { npc.frame.Y = Main.npc[EModeGlobalNPC.brainBoss].frame.Y; } }
public override void AI() { int index = Dust.NewDust(projectile.Center, 0, 0, 229, 0.0f, 0.0f, 100, new Color(), 1f); Main.dust[index].noLight = true; Main.dust[index].noGravity = true; Main.dust[index].velocity = projectile.velocity; Main.dust[index].position -= Vector2.One * 4f; Main.dust[index].scale = 0.8f; /*if (++projectile.frameCounter >= 12 * 12) * { * projectile.frameCounter = 0; * if (++projectile.frame >= 5) * projectile.frame = 0; * }*/ if (FargoSoulsWorld.MasochistMode && EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.championBoss, ModContent.NPCType <NPCs.Champions.CosmosChampion>())) { float rotation = projectile.velocity.ToRotation(); Vector2 vel = Main.player[Main.npc[EModeGlobalNPC.championBoss].target].Center - projectile.Center; float targetAngle = vel.ToRotation(); projectile.velocity = new Vector2(projectile.velocity.Length(), 0f).RotatedBy(rotation.AngleLerp(targetAngle, 0.001f)); } }
public override void Update(Player player, ref int buffIndex) { FargoPlayer fargoPlayer = player.GetModPlayer <FargoPlayer>(); player.poisoned = true; player.venom = true; player.ichor = true; player.onFire2 = true; player.electrified = true; //fargoPlayer.OceanicMaul = true; fargoPlayer.CurseoftheMoon = true; if (fargoPlayer.FirstInfection) { fargoPlayer.MaxInfestTime = player.buffTime[buffIndex]; fargoPlayer.FirstInfection = false; } fargoPlayer.Infested = true; fargoPlayer.Rotting = true; fargoPlayer.MutantNibble = true; fargoPlayer.noDodge = true; fargoPlayer.noSupersonic = true; fargoPlayer.MutantPresence = true; player.moonLeech = true; player.potionDelay = player.buffTime[buffIndex]; if (Fargowiltas.Instance.MasomodeEXLoaded && !FargoSoulsWorld.downedFishronEX && player.buffTime[buffIndex] > 1 && EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.mutantBoss, mod.NPCType("MutantBoss"))) { player.AddBuff(ModLoader.GetMod("MasomodeEX").BuffType("MutantJudgement"), player.buffTime[buffIndex]); player.buffTime[buffIndex] = 1; } }
public override void AI() { if (EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.mutantBoss, ModContent.NPCType <NPCs.MutantBoss.MutantBoss>()) && !Main.npc[EModeGlobalNPC.mutantBoss].dontTakeDamage) { int modifier = Math.Min(60, 90 - projectile.timeLeft); projectile.scale = 4f - 3f / 60f * modifier; //start big, shrink down projectile.rotation = (float)Math.PI * 2 / 30 * modifier; } else { projectile.Kill(); } if (projectile.timeLeft < 10) { projectile.alpha += 25; } else { projectile.alpha -= 4; if (projectile.alpha < 0) //fade in { projectile.alpha = 0; } } }
public override void OnHitPlayer(Player target, int damage, bool crit) { target.AddBuff(BuffID.Wet, 420); //target.AddBuff(mod.BuffType("SqueakyToy"), Main.rand.Next(60, 180)); target.AddBuff(mod.BuffType("OceanicMaul"), 1800); target.GetModPlayer <FargoPlayer>().MaxLifeReduction += EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.fishBossEX, NPCID.DukeFishron) ? 100 : 25; }
public override void OnHitPlayer(Player target, int damage, bool crit) { target.AddBuff(mod.BuffType("Defenseless"), 300); target.AddBuff(mod.BuffType("Lethargic"), 300); if (EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.guardBoss, NPCID.DungeonGuardian)) { target.AddBuff(mod.BuffType("MarkedForDeath"), 300); } }
public override void OnHitPlayer(Player target, int damage, bool crit) { if (EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.guardBoss, NPCID.DungeonGuardian)) { target.AddBuff(mod.BuffType("GodEater"), 420); target.AddBuff(mod.BuffType("FlamesoftheUniverse"), 420); target.AddBuff(mod.BuffType("MarkedforDeath"), 420); target.immune = false; target.immuneTime = 0; target.hurtCooldowns[1] = 0; } target.AddBuff(mod.BuffType("Lethargic"), 300); }
public override void OnHitPlayer(Player target, int damage, bool crit) { target.AddBuff(BuffID.Darkness, 300); if (FargoSoulsWorld.MasochistMode) { target.AddBuff(BuffID.Blackout, 300); target.AddBuff(mod.BuffType("Defenseless"), 300); target.AddBuff(mod.BuffType("Lethargic"), 300); } if (EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.guardBoss, NPCID.DungeonGuardian)) { target.AddBuff(mod.BuffType("MarkedForDeath"), 300); } }
public override void AI() { Lighting.AddLight(projectile.Center, 0.1f, 0.5f, 0.7f); if (projectile.ai[0] == 0) { projectile.ai[0] = 1; projectile.localAI[0] = projectile.Center.X; projectile.localAI[1] = projectile.Center.Y; Main.projectileTexture[projectile.type] = Main.npcTexture[NPCID.TheHungry]; } if (projectile.velocity != Vector2.Zero && Main.rand.Next(3) == 0) { int dust = Dust.NewDust(projectile.position, projectile.width, projectile.height, 88, projectile.velocity.X * 0.4f, projectile.velocity.Y * 0.4f, 114, default(Color), 2f); Main.dust[dust].noGravity = true; Main.dust[dust].velocity *= 1.8f; Main.dust[dust].velocity.Y -= 0.5f; } //stop moving at vertical limits of underworld if ((projectile.velocity.Y > 0 && projectile.Center.Y / 16 >= Main.maxTilesY) || (projectile.velocity.Y < 0 && projectile.Center.Y / 16 <= Main.maxTilesY - 200)) { projectile.position -= projectile.velocity * 2f; projectile.velocity = Vector2.Zero; } if (EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.wallBoss, NPCID.WallofFlesh) && Math.Abs(projectile.Center.X - Main.npc[EModeGlobalNPC.wallBoss].Center.X) < 50) { projectile.Kill(); //chain dies when wall moves over it } if (projectile.velocity != Vector2.Zero) { projectile.rotation = projectile.velocity.ToRotation(); if (++projectile.frameCounter > 6 * (projectile.extraUpdates + 1)) { projectile.frameCounter = 0; if (++projectile.frame >= Main.projFrames[projectile.type]) { projectile.frame = 0; } } } }
public override void OnHitPlayer(Player target, int damage, bool crit) { if (EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.destroyBoss, NPCID.TheDestroyer)) { target.AddBuff(BuffID.Electrified, 60); } if (EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.brainBoss, NPCID.BrainofCthulhu)) { target.AddBuff(BuffID.Poisoned, 120); target.AddBuff(BuffID.Darkness, 120); target.AddBuff(BuffID.Bleeding, 120); target.AddBuff(BuffID.Slow, 120); target.AddBuff(BuffID.Weak, 120); target.AddBuff(BuffID.BrokenArmor, 120); } }
public override void AI() { if (projectile.localAI[1] == 0) { projectile.localAI[1] = 1; Main.PlaySound(SoundID.Item, projectile.Center, 14); } if (projectile.timeLeft % (projectile.extraUpdates + 1) == 0 && ++projectile.localAI[1] > 30) { if (projectile.localAI[1] < 90) //accelerate { projectile.velocity *= 1.035f; } if (projectile.localAI[1] > 60 && projectile.localAI[1] < 150 && EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.championBoss, ModContent.NPCType <NPCs.Champions.EarthChampion>()) && Main.npc[EModeGlobalNPC.championBoss].HasValidTarget) //home { float rotation = projectile.velocity.ToRotation(); Vector2 vel = Main.player[Main.npc[EModeGlobalNPC.championBoss].target].Center + Main.player[Main.npc[EModeGlobalNPC.championBoss].target].velocity * 10f - projectile.Center; float targetAngle = vel.ToRotation(); projectile.velocity = new Vector2(projectile.velocity.Length(), 0f).RotatedBy(rotation.AngleLerp(targetAngle, 0.03f)); } } int index2 = Dust.NewDust(projectile.position, projectile.width, projectile.height, Main.rand.Next(2) == 0 ? 174 : 259, 0f, 0f, 100, new Color(), 2f); Main.dust[index2].noGravity = true; Main.dust[index2].velocity *= 3; int index3 = Dust.NewDust(projectile.position, projectile.width, projectile.height, Main.rand.Next(2) == 0 ? 174 : 259, 0f, 0f, 100, new Color(), 1f); Main.dust[index3].velocity *= 2f; Main.dust[index3].noGravity = true; projectile.rotation += 0.4f; if (++projectile.frameCounter > 3) { projectile.frameCounter = 0; if (++projectile.frame >= Main.projFrames[projectile.type]) { projectile.frame = 0; } } }
public override void Update(GameTime gameTime) { const float increment = 0.01f; if (EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.mutantBoss, ModContent.NPCType <MutantBoss>()) && (Main.npc[EModeGlobalNPC.mutantBoss].ai[0] < 0 || Main.npc[EModeGlobalNPC.mutantBoss].ai[0] > 10 || (Main.npc[EModeGlobalNPC.mutantBoss].ai[0] == 10 && Main.npc[EModeGlobalNPC.mutantBoss].ai[1] > 120))) { intensity += increment; if (intensity > 1f) { intensity = 1f; } if (Main.npc[EModeGlobalNPC.mutantBoss].ai[0] != 10) { lifeIntensity = 1f - (float)Main.npc[EModeGlobalNPC.mutantBoss].life / Main.npc[EModeGlobalNPC.mutantBoss].lifeMax; if (!FargoSoulsWorld.MasochistMode) { lifeIntensity -= 0.5f; if (lifeIntensity < 0) { lifeIntensity = 0; } } } } else { intensity -= increment; lifeIntensity -= increment; if (lifeIntensity < 0f) { lifeIntensity = 0f; } if (intensity < 0f) { intensity = 0f; lifeIntensity = 0f; delay = 0; Deactivate(); } } }
public override void OnHitPlayer(Player target, int damage, bool crit) { if (EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.deviBoss, mod.NPCType("DeviBoss"))) { target.AddBuff(mod.BuffType("Berserked"), 240); target.AddBuff(mod.BuffType("MutantNibble"), 240); target.AddBuff(mod.BuffType("Guilty"), 240); target.AddBuff(mod.BuffType("Lovestruck"), 240); target.AddBuff(mod.BuffType("Rotting"), 240); } else { for (int i = 0; i < 5; i++) { int d = Main.rand.Next(Fargowiltas.DebuffIDs.Count); target.AddBuff(Fargowiltas.DebuffIDs[d], 240); } } }
public override void OnHitPlayer(Player target, int damage, bool crit) { target.AddBuff(BuffID.OnFire, 300); if (NPC.golemBoss != -1 && Main.npc[NPC.golemBoss].active && Main.npc[NPC.golemBoss].type == NPCID.Golem) { target.AddBuff(BuffID.BrokenArmor, 600); target.AddBuff(ModContent.BuffType <Defenseless>(), 600); target.AddBuff(BuffID.WitheredArmor, 600); if (Main.tile[(int)Main.npc[NPC.golemBoss].Center.X / 16, (int)Main.npc[NPC.golemBoss].Center.Y / 16] == null || //outside temple Main.tile[(int)Main.npc[NPC.golemBoss].Center.X / 16, (int)Main.npc[NPC.golemBoss].Center.Y / 16].wall != WallID.LihzahrdBrickUnsafe) { target.AddBuff(BuffID.Burning, 120); } } if (EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.championBoss, ModContent.NPCType <EarthChampion>())) { target.AddBuff(BuffID.Burning, 300); } }
public override void AI() { if (EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.abomBoss, ModContent.NPCType <NPCs.AbomBoss.AbomBoss>()) && !Main.npc[EModeGlobalNPC.abomBoss].dontTakeDamage) { if (projectile.localAI[0] == 0) { projectile.localAI[0] = Main.rand.Next(2) == 0 ? -1 : 1; projectile.rotation = Main.rand.NextFloat(2 * MathHelper.Pi); } int modifier = Math.Min(60, 70 - projectile.timeLeft); projectile.scale = 1.5f - 0.5f / 60f * modifier; //start big, shrink down projectile.velocity = Vector2.Zero; if (++projectile.localAI[1] < 15) { projectile.rotation += MathHelper.ToRadians(12) * projectile.localAI[0]; } } if (projectile.timeLeft < 10) //fade in and out { projectile.alpha += 26; } else { projectile.alpha -= 26; } if (projectile.alpha < 0) { projectile.alpha = 0; } else if (projectile.alpha > 255) { projectile.alpha = 255; } }
public override void OnHitPlayer(Player target, int damage, bool crit) { if (NPC.golemBoss != -1 && Main.npc[NPC.golemBoss].active && Main.npc[NPC.golemBoss].type == NPCID.Golem) //during golem fight { target.AddBuff(BuffID.OnFire, 600); target.AddBuff(BuffID.BrokenArmor, 600); target.AddBuff(mod.BuffType("Defenseless"), 600); target.AddBuff(BuffID.WitheredArmor, 600); if (Framing.GetTileSafely(Main.npc[NPC.golemBoss].Center).wall != WallID.LihzahrdBrickUnsafe) //outside temple { target.AddBuff(BuffID.Burning, 120); } } if (EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.championBoss, ModContent.NPCType <EarthChampion>())) { target.AddBuff(BuffID.OnFire, 300); target.AddBuff(BuffID.Burning, 300); } }
public override void Kill(int timeLeft) { for (int i = 0; i < 10; i++) { int d = Dust.NewDust(projectile.position, projectile.width, projectile.height, 86, 0f, 0f, 0, default(Color), 2f); Main.dust[d].noGravity = true; Main.dust[d].velocity *= 8f; } if (EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.deviBoss, mod.NPCType("DeviBoss"))) { if (Main.netMode != NetmodeID.MultiplayerClient) { for (int i = 0; i < 4; i++) { Projectile.NewProjectile(projectile.Center, Vector2.UnitX.RotatedBy(projectile.rotation + (float)Math.PI / 2 * i), mod.ProjectileType("DeviDeathray"), projectile.damage, projectile.knockBack, projectile.owner); } } } }
public override void Update(GameTime gameTime) { const float increment = 0.01f; if (EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.mutantBoss, ModContent.NPCType <MutantBoss>())) { intensity += increment; if (intensity > 1f) { intensity = 1f; } } else { intensity -= increment; if (intensity < 0f) { intensity = 0f; Deactivate(); } } }
public override void AI() { if (projectile.localAI[0] == 0) { Main.PlaySound(SoundID.Item8, projectile.Center); for (int i = 0; i < 5; i++) { int d = Dust.NewDust(projectile.position, projectile.width, projectile.height, DustID.Fire, projectile.velocity.X, projectile.velocity.Y, 0, default(Color), 1.5f); Main.dust[d].velocity *= 6f; } } if (++projectile.localAI[0] > 30 && projectile.localAI[0] < 120) { projectile.velocity *= projectile.ai[0]; } if (projectile.localAI[0] > 60 && projectile.localAI[0] < 180) { if (EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.championBoss, ModContent.NPCType <NPCs.Champions.SpiritChampion>())) { float rotation = projectile.velocity.ToRotation(); Vector2 vel = Main.player[Main.npc[EModeGlobalNPC.championBoss].target].Center - projectile.Center; float targetAngle = vel.ToRotation(); projectile.velocity = new Vector2(projectile.velocity.Length(), 0f).RotatedBy(rotation.AngleLerp(targetAngle, projectile.ai[1])); } } projectile.direction = projectile.spriteDirection = projectile.velocity.X > 0 ? -1 : 1; projectile.rotation = projectile.velocity.ToRotation(); if (projectile.spriteDirection < 0) { projectile.rotation += (float)Math.PI; } Main.dust[Dust.NewDust(projectile.position, projectile.width, projectile.height, 54, 0f, 0f, 0, default(Color), 2f)].noGravity = true; }
public override void AI() { if (!npc.GetGlobalNPC <EModeGlobalNPC>().masoBool[0]) { npc.GetGlobalNPC <EModeGlobalNPC>().masoBool[0] = true; Main.npcTexture[npc.type] = Main.npcTexture[NPCID.QueenBee]; } if (!EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.beeBoss, NPCID.QueenBee) && !NPC.AnyNPCs(NPCID.QueenBee)) { npc.StrikeNPCNoInteraction(9999, 0f, 0); } //tries to stinger, force into dash if (npc.ai[0] == 1 || npc.ai[0] == 3) { npc.ai[0] = 0f; npc.netUpdate = true; } npc.position -= npc.velocity / 3; }
public override void AI() { if (EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.mutantBoss, ModContent.NPCType <NPCs.MutantBoss.MutantBoss>()) && !Main.npc[EModeGlobalNPC.mutantBoss].dontTakeDamage) { if (projectile.localAI[0] == 0) { projectile.localAI[0] = Main.rand.Next(2) == 0 ? -1 : 1; projectile.rotation = Main.rand.NextFloat((float)System.Math.PI * 2); } int modifier = Math.Min(60, 90 - projectile.timeLeft); projectile.scale = 1.5f - 0.5f / 60f * modifier; //start big, shrink down projectile.velocity = Vector2.Zero; projectile.rotation += MathHelper.ToRadians(6) * projectile.localAI[0]; } else { projectile.Kill(); } if (projectile.timeLeft < 15) { projectile.alpha += 17; } else { projectile.alpha -= 4; if (projectile.alpha < 0) //fade in { projectile.alpha = 0; } } }
public override void AI() { if (projectile.localAI[0] == 0) { projectile.hide = false; projectile.rotation = Main.rand.NextFloat((float)Math.PI / 2); projectile.direction = projectile.spriteDirection = Main.rand.Next(2) == 0 ? 1 : -1; Main.PlaySound(SoundID.Item8, projectile.Center); } if (++projectile.localAI[0] < 160) { projectile.velocity *= 1.025f; } if (projectile.ai[0] == 0) { if (projectile.localAI[0] == 140) { projectile.Kill(); } } else { if (EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.championBoss, ModContent.NPCType <NPCs.Champions.ShadowChampion>()) && Main.npc[EModeGlobalNPC.championBoss].HasValidTarget) //home { float rotation = projectile.velocity.ToRotation(); Vector2 vel = Main.player[Main.npc[EModeGlobalNPC.championBoss].target].Center - projectile.Center; float targetAngle = vel.ToRotation(); projectile.velocity = new Vector2(projectile.velocity.Length(), 0f).RotatedBy(rotation.AngleLerp(targetAngle, 0.035f)); } } projectile.rotation += projectile.velocity.Length() * 0.015f * Math.Sign(projectile.velocity.X); }
public override void AI() { projectile.frameCounter++; if (projectile.frameCounter > 4) { projectile.frameCounter = 0; projectile.frame++; if (projectile.frame > 5) { projectile.frame = 0; } } projectile.velocity.X *= 0.95f; projectile.position.Y += projectile.velocity.Y / 2; if (EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.abomBoss, ModContent.NPCType <NPCs.AbomBoss.AbomBoss>())) { if (projectile.position.Y > Main.npc[EModeGlobalNPC.abomBoss].Center.Y + (Main.npc[EModeGlobalNPC.abomBoss].localAI[3] == 1 ? 2000 : 1400)) { projectile.Kill(); } } }
public override void Update(GameTime gameTime) { const float increment = 0.01f; if (EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.mutantBoss, ModContent.NPCType <MutantBoss>()) && (Main.npc[EModeGlobalNPC.mutantBoss].ai[0] < 0 || Main.npc[EModeGlobalNPC.mutantBoss].ai[0] > 10 || (Main.npc[EModeGlobalNPC.mutantBoss].ai[0] == 10 && Main.npc[EModeGlobalNPC.mutantBoss].ai[1] > 120))) { intensity += increment; if (intensity > 1f) { intensity = 1f; } } else { intensity -= increment; if (intensity < 0f) { intensity = 0f; Deactivate(); } } }
public override void PostAI(Projectile proj) { if (FargoSoulsWorld.MasochistMode) { if (ThoriumProj(proj)) { if (proj.damage != CachedDamage) { if ( proj.type == ProjectileType <GrandThunderBirdZap>() || proj.type == ProjectileType <ThunderGust>() ) { if (EModeGlobalNPC.BossIsAlive(ref MasoThoriumGlobalNPC.birdBoss, NPCType <TheGrandThunderBirdv2>())) { proj.damage = (int)(proj.damage * (1 + MasoDLCWorld.ThunderBirdCount * .0125)); } } else if ( proj.type == ProjectileType <BubbleBomb>() || proj.type == ProjectileType <BubblePulse>() || proj.type == ProjectileType <QueenTorrent>() ) { if (EModeGlobalNPC.BossIsAlive(ref MasoThoriumGlobalNPC.jellyfishBoss, NPCType <QueenJelly>())) { proj.damage = (int)(proj.damage * (1 + MasoDLCWorld.JellyCount * .0125)); } } else if ( proj.type == ProjectileType <ViscountBlood>() || proj.type == ProjectileType <ViscountStomp>() || proj.type == ProjectileType <ViscountStomp2>() || proj.type == ProjectileType <ViscountRipple>() || proj.type == ProjectileType <ViscountRipple2>() || proj.type == ProjectileType <ViscountRockFall>() || proj.type == ProjectileType <ViscountRockSummon>() || proj.type == ProjectileType <ViscountRockSummon2>() ) { if (EModeGlobalNPC.BossIsAlive(ref MasoThoriumGlobalNPC.viscountBoss, NPCType <Viscount>())) { proj.damage = (int)(proj.damage * (1 + MasoDLCWorld.VisCount * .0125)); } } else if ( proj.type == ProjectileType <GraniteCharge>() ) { if (EModeGlobalNPC.BossIsAlive(ref MasoThoriumGlobalNPC.graniteBoss, NPCType <GraniteEnergyStorm>())) { proj.damage = (int)(proj.damage * (1 + MasoDLCWorld.GraniteCount * .0125)); } } else if ( proj.type == ProjectileType <BuriedMagicPro2>() || proj.type == ProjectileType <BuriedShock>() || proj.type == ProjectileType <BuriedDagger>() || proj.type == ProjectileType <BuriedArrow>() || proj.type == ProjectileType <BuriedArrow2>() || proj.type == ProjectileType <BuriedArrowC>() || proj.type == ProjectileType <BuriedArrowP>() || proj.type == ProjectileType <BuriedArrowF>() || proj.type == ProjectileType <BuriedMagic>() || proj.type == ProjectileType <BuriedArrowFBoom>() || proj.type == ProjectileType <BuriedMagicPop>() ) { if (EModeGlobalNPC.BossIsAlive(ref MasoThoriumGlobalNPC.buriedBoss, NPCType <TheBuriedWarrior>())) { proj.damage = (int)(proj.damage * (1 + MasoDLCWorld.ChampionCount * .0125)); } } else if ( proj.type == ProjectileType <BioCoreBeam>() || proj.type == ProjectileType <BioVaporize>() || proj.type == ProjectileType <CryoCoreBeam>() || proj.type == ProjectileType <CryoVaporize>() || proj.type == ProjectileType <MoltenCoreBeam>() || proj.type == ProjectileType <MoltenVaporize>() || proj.type == ProjectileType <MainBeam>() || proj.type == ProjectileType <MainBeamOuter>() || proj.type == ProjectileType <MainBeamCheese>() || proj.type == ProjectileType <VaporizeBlast>() || proj.type == ProjectileType <GravitonSurge>() || proj.type == ProjectileType <Vaporize>() || proj.type == ProjectileType <VaporizeBlast>() || proj.type == ProjectileType <GravitonCharge>() || proj.type == ProjectileType <VaporizePulse>() || proj.type == ProjectileType <VaporizeBoom>() || proj.type == ProjectileType <GravitonBoom>() || proj.type == ProjectileType <GravitySpark>() ) { if (EModeGlobalNPC.BossIsAlive(ref MasoThoriumGlobalNPC.scouterBoss, NPCType <ThePrimeScouter>())) { proj.damage = (int)(proj.damage * (1 + MasoDLCWorld.ScouterCount * .0125)); } } else if ( proj.type == ProjectileType <FrostSurgeR>() || proj.type == ProjectileType <FrostSurge>() || proj.type == ProjectileType <BlizzardStart>() || proj.type == ProjectileType <BlizzardFang>() || proj.type == ProjectileType <IceAnomaly>() || proj.type == ProjectileType <FrostMytePro>() || proj.type == ProjectileType <BlizzardCascade>() || proj.type == ProjectileType <BlizzardBoom>() ) { if (EModeGlobalNPC.BossIsAlive(ref MasoThoriumGlobalNPC.striderBoss, NPCType <BoreanStrider>()) || EModeGlobalNPC.BossIsAlive(ref MasoThoriumGlobalNPC.striderBoss, NPCType <BoreanStriderPopped>())) { proj.damage = (int)(proj.damage * (1 + MasoDLCWorld.StriderCount * .0125)); } } else if ( proj.type == ProjectileType <BeholderBeam>() || proj.type == ProjectileType <DoomBeholderBeam>() || proj.type == ProjectileType <VoidLaserPro>() || proj.type == ProjectileType <BeholderLavaCascade>() ) { if (EModeGlobalNPC.BossIsAlive(ref MasoThoriumGlobalNPC.coznixBoss, NPCType <FallenDeathBeholder>()) || EModeGlobalNPC.BossIsAlive(ref MasoThoriumGlobalNPC.coznixBoss, NPCType <FallenDeathBeholder2>())) { proj.damage = (int)(proj.damage * (1 + MasoDLCWorld.BeholderCount * .0125)); } } else if ( proj.type == ProjectileType <LichGazeB>() || proj.type == ProjectileType <LichGaze>() || proj.type == ProjectileType <LichFlareSpawn>() || proj.type == ProjectileType <LichPulse>() || proj.type == ProjectileType <SoulRenderLich>() || proj.type == ProjectileType <SoulSiphon>() || proj.type == ProjectileType <LichFlareDeathD>() || proj.type == ProjectileType <LichFlareDeathU>() || proj.type == ProjectileType <LichFlare>() || proj.type == ProjectileType <LichSing>() || proj.type == ProjectileType <LichMatter>() ) { if (EModeGlobalNPC.BossIsAlive(ref MasoThoriumGlobalNPC.lichBoss, NPCType <Lich>()) || EModeGlobalNPC.BossIsAlive(ref MasoThoriumGlobalNPC.lichBoss, NPCType <LichHeadless>())) { proj.damage = (int)(proj.damage * (1 + MasoDLCWorld.LichCount * .0125)); } } else if ( proj.type == ProjectileType <Whirlpool>() || proj.type == ProjectileType <AbyssionSpit>() || proj.type == ProjectileType <AbyssionSpit2>() || proj.type == ProjectileType <AquaRipple>() || proj.type == ProjectileType <AbyssalStrike>() || proj.type == ProjectileType <AbyssalStrike2>() || proj.type == ProjectileType <OldGodSpit>() || proj.type == ProjectileType <OldGodSpit2>() ) { if (EModeGlobalNPC.BossIsAlive(ref MasoThoriumGlobalNPC.abyssBoss, NPCType <Abyssion>()) || EModeGlobalNPC.BossIsAlive(ref MasoThoriumGlobalNPC.abyssBoss, NPCType <AbyssionCracked>()) || EModeGlobalNPC.BossIsAlive(ref MasoThoriumGlobalNPC.abyssBoss, NPCType <AbyssionReleased>())) { proj.damage = (int)(proj.damage * (1 + MasoDLCWorld.AbyssionCount * .0125)); } } else if ( proj.type == ProjectileType <FlameLash>() || proj.type == ProjectileType <WaterPulse>() || proj.type == ProjectileType <TyphoonBlastHostile>() || proj.type == ProjectileType <TyphoonBlastHostileSmaller>() || proj.type == ProjectileType <AquaBarrage>() || proj.type == ProjectileType <AquaBlast>() || proj.type == ProjectileType <UFOBlast>() || proj.type == ProjectileType <OmniSphereOrb>() || proj.type == ProjectileType <DeathRaySpawn>() || proj.type == ProjectileType <RealityDreadPro>() || proj.type == ProjectileType <DeathRaySpawnR>() || proj.type == ProjectileType <DeathRaySpawnL>() || proj.type == ProjectileType <OmniDeath>() || proj.type == ProjectileType <RealityFury>() || proj.type == ProjectileType <FlamePulsePro>() || proj.type == ProjectileType <FlameNova>() || proj.type == ProjectileType <FlamePulseTorn>() || proj.type == ProjectileType <MoltenFury>() || proj.type == ProjectileType <DeathRay>() || proj.type == ProjectileType <OmniBurstHostile>() || proj.type == ProjectileType <GravitonBoom>() || proj.type == ProjectileType <FlameNovaBoom>() || proj.type == ProjectileType <SlagTornado>() || proj.type == ProjectileType <TornSlag>() ) { if ( EModeGlobalNPC.BossIsAlive(ref MasoThoriumGlobalNPC.aquaBoss, NPCType <Aquaius>()) || EModeGlobalNPC.BossIsAlive(ref MasoThoriumGlobalNPC.aquaBoss, NPCType <AquaiusBubblePrime>()) || EModeGlobalNPC.BossIsAlive(ref MasoThoriumGlobalNPC.aquaBoss, NPCType <Aquaius2>()) || EModeGlobalNPC.BossIsAlive(ref MasoThoriumGlobalNPC.omniBoss, NPCType <Omnicide>()) || EModeGlobalNPC.BossIsAlive(ref MasoThoriumGlobalNPC.slagBoss, NPCType <SlagFury>()) || EModeGlobalNPC.BossIsAlive(ref MasoThoriumGlobalNPC.ragBoss, NPCType <RealityBreaker>()) ) { proj.damage = (int)(proj.damage * (1 + MasoDLCWorld.RagnarokCount * .0125)); } } CachedDamage = proj.damage; } } } }