コード例 #1
0
        public override void AI()
        {
            projectile.rotation += .1f;
            if (projectile.alpha > 0)
            {
                projectile.timeLeft = 180;
                projectile.alpha   -= 5;
            }

            if (projectile.timeLeft < 60)
            {
                projectile.alpha += 5;
            }

            int FountainCount = AAGlobalProjectile.CountProjectiles(ModContent.ProjectileType <GoldFountain>());

            if (FountainCount < 1)
            {
                FountainCount = 1;
            }
            if (Main.netMode != 1 && projectile.ai[0]++ >= 5 * FountainCount)
            {
                Projectile.NewProjectile(projectile.position.X + 30f, projectile.position.Y + 30f, Main.rand.Next(-3, 4), Main.rand.Next(-3, 10), ModContent.ProjectileType <Gold>(), projectile.damage, 1, projectile.owner, 0, 0);
                projectile.ai[0]     = 0;
                projectile.netUpdate = true;
            }

            Player player = Main.player[projectile.owner];

            if (player.inventory[player.selectedItem].type == mod.ItemType("GoldDigger") && player.altFunctionUse == 2 && player.controlUseItem)
            {
                projectile.Kill();
            }
        }
コード例 #2
0
        public override void Kill(int timeLeft)
        {
            Vector2 vector = Vector2.Normalize(projectile.velocity);

            if (!AAGlobalProjectile.AnyProjectiles(mod.ProjectileType("GoldFountain")))
            {
                Projectile.NewProjectile(projectile.position.X - vector.X * 20f, projectile.position.Y - vector.Y * 20f, 0, 0, mod.ProjectileType("GoldFountain"), projectile.damage, 1, projectile.owner, 0, 0);
            }
        }
コード例 #3
0
        public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
        {
            bool AnyOrbiters = AAGlobalProjectile.AnyProjectiles(ModContent.ProjectileType <Projectiles.Akuma.SunstormFireball>());

            for (int Loops = 0; Loops < 4; Loops++)
            {
                Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, Main.myPlayer, 0, 0);
            }

            return(false);
        }
コード例 #4
0
 public override void AI()
 {
     if (internalAI[3] > 0 || (AAGlobalProjectile.AnyProjectiles(mod.ProjectileType("ShenWaveDeathray")) || AAGlobalProjectile.AnyProjectiles(mod.ProjectileType("ShenWaveDeathraySmall"))))
     {
         npc.TargetClosest(false);
         npc.rotation  = 0;
         npc.velocity *= .2f;
         NPC shen          = Main.npc[(int)internalAI[0]];
         int shotdirection = npc.spriteDirection = npc.direction;
         if (internalAI[4] == 0)
         {
             npc.spriteDirection = npc.direction = shen.spriteDirection;
             shotdirection       = npc.direction;
             npc.Center          = new Vector2(shen.Center.X + internalAI[1] * shotdirection, shen.Center.Y + internalAI[2]);
         }
         if (shen.ai[0] == 0 && shen.ai[2] == 360 && Main.netMode != NetmodeID.MultiplayerClient)
         {
             float ai0 = (float)Math.PI * 2 / 300 * (internalAI[3] == 2 ? 1 : -1) * Math.Sign(internalAI[2]);
             Projectile.NewProjectile(npc.Center + npc.direction * new Vector2(npc.width / 2, 0), Vector2.UnitX * shotdirection, mod.ProjectileType("ShenWaveDeathraySmall"), npc.damage, 0f, Main.myPlayer, ai0, npc.whoAmI);
             internalAI[4] = 1;
             npc.netUpdate = true;
         }
         if (shen.ai[0] == 14 && shen.ai[1] == internalAI[3] * 120 - 30)
         {
             internalAI[4] = 1;
             if (Main.netMode != NetmodeID.MultiplayerClient)
             {
                 Projectile.NewProjectile(npc.Center + npc.direction * new Vector2(npc.width / 2, 0), npc.DirectionTo(Main.player[shen.target].Center), mod.ProjectileType("ShenWaveDeathraySmall"), npc.damage / 4, 0f, Main.myPlayer, 0f, npc.whoAmI);
             }
         }
         if (shen.ai[0] != 0 && shen.ai[0] != 1 && shen.ai[0] != 13 && shen.ai[0] != 14)
         {
             internalAI[3] = 0;
             npc.netUpdate = true;
         }
         return;
     }
     internalAI[4] = 0;
     AI86();
     Lighting.AddLight(npc.Center, AAColor.Shen3.R / 255, AAColor.Shen3.G / 255, AAColor.Shen3.B / 255);
     AAAI.AIShadowflameGhost(npc, ref npc.ai, false, 660f, 0.3f, 15f, 0.2f, 8f, 5f, 10f, 0.4f, 0.4f, 0.95f, 5f);
     if (!NPC.AnyNPCs(mod.NPCType("ShenA")))
     {
         npc.life   = 0;
         npc.active = false;
     }
     if (npc.alpha != 0)
     {
         for (int spawnDust = 0; spawnDust < 2; spawnDust++)
         {
             int num935 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, ModContent.DustType <DiscordDust>(), 0f, 0f, 100, default, 2f);
コード例 #5
0
ファイル: FireSpiritStaff.cs プロジェクト: CC-png-byte/AAMod
        public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
        {
            bool AnyOrbiters = AAGlobalProjectile.AnyProjectiles(Terraria.ModLoader.ModContent.ProjectileType <Projectiles.AH.FireOrbiter>());
            int  SummonCount = 2;

            if (AnyOrbiters)
            {
                SummonCount = 1;
            }
            for (int Loops = 0; Loops < SummonCount; Loops++)
            {
                Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, Main.myPlayer, 0, 0);
            }

            return(false);
        }
コード例 #6
0
ファイル: Vortex.cs プロジェクト: CC-png-byte/AAMod
        public override void PostAI()
        {
            if (Main.netMode != 1)
            {
                ProjTimer++;
                if (ProjTimer >= 20)
                {
                    ProjTimer = 0;
                    int NPCTarget = Target();

                    if (NPCTarget != -1 && AAGlobalProjectile.CountProjectiles(ModContent.ProjectileType <VortexProj>()) < 5)
                    {
                        Projectile.NewProjectile(projectile.position, projectile.velocity, ModContent.ProjectileType <VortexProj>(), projectile.damage, projectile.knockBack, projectile.owner);
                    }
                }
            }
        }
コード例 #7
0
ファイル: ChaosYari.cs プロジェクト: DellyThePuffercat/AAMod
        public override void AI()
        {
            Main.player[projectile.owner].direction = projectile.direction;
            Main.player[projectile.owner].heldProj  = projectile.whoAmI;
            Main.player[projectile.owner].itemTime  = Main.player[projectile.owner].itemAnimation;
            projectile.position.X = Main.player[projectile.owner].position.X + Main.player[projectile.owner].width / 2 - projectile.width / 2;
            projectile.position.Y = Main.player[projectile.owner].position.Y + Main.player[projectile.owner].height / 2 - projectile.height / 2;
            projectile.position  += projectile.velocity * projectile.ai[0];
            if (Main.rand.Next(5) == 0)
            {
                Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, Main.rand.Next(2) == 0 ? ModContent.DustType <Dusts.AkumaDust>() : ModContent.DustType <Dusts.YamataAuraDust>(), projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f);
            }
            if (projectile.ai[0] == 0f)
            {
                projectile.ai[0]     = 3f;
                projectile.netUpdate = true;
            }
            if (Main.player[projectile.owner].itemAnimation < Main.player[projectile.owner].itemAnimationMax / 3)
            {
                projectile.ai[0] -= 2.4f;
                if (projectile.localAI[0] == 0f && Main.myPlayer == projectile.owner && !AAGlobalProjectile.AnyProjectiles(mod.ProjectileType("ChaosYariShot")))
                {
                    projectile.localAI[0] = 1f;
                    Projectile.NewProjectile(Main.player[projectile.owner].position.X, Main.player[projectile.owner].position.Y, projectile.velocity.X * 1.4f, projectile.velocity.Y * 1.4f, mod.ProjectileType("ChaosYariShot"), (int)((double)projectile.damage * 0.85f), projectile.knockBack * 0.85f, projectile.owner, 0f, 0f);
                }
            }
            else
            {
                projectile.ai[0] += 0.95f;
            }

            if (Main.player[projectile.owner].itemAnimation == 0)
            {
                projectile.Kill();
            }

            projectile.rotation = (float)Math.Atan2(projectile.velocity.Y, projectile.velocity.X) + 2.355f;
            if (projectile.spriteDirection == -1)
            {
                projectile.rotation -= 1.57f;
            }
        }
コード例 #8
0
ファイル: Djinn.cs プロジェクト: DellyThePuffercat/AAMod
        public override void AI()
        {
            if (Main.expertMode)
            {
                damage = npc.damage / 4;
            }
            else
            {
                damage = npc.damage / 2;
            }
            Player player = Main.player[npc.target];

            if (runonce == 0)
            {
                StartSandstorm();
                runonce += 1;
            }
            if (internalAI[0] == 2 && npc.ai[3] < 60)
            {
                npc.velocity.X *= 0.97f;
            }

            if (internalAI[0] == 2 && npc.ai[3] > 120)
            {
                if (npc.velocity.X > 0)
                {
                    npc.direction = 1;
                }
                else
                {
                    npc.direction = -1;
                }
            }
            else
            {
                if (player.Center.X > npc.Center.X)
                {
                    npc.direction = 1;
                }
                else
                {
                    npc.direction = -1;
                }
            }

            if (player.dead || !player.active)
            {
                npc.TargetClosest(true);
                if (player.dead || !player.active)
                {
                    FuriousFlexing();
                    return;
                }
            }
            else if (!player.ZoneDesert)
            {
                if (!soundPlayed)
                {
                    soundPlayed = true;
                    Main.PlaySound(15, (int)npc.position.X, (int)npc.position.Y, 0);
                }
                npc.damage  = 200;
                npc.defense = 1000;
                npc.ai[3]++;
                BaseAI.AIFlier(npc, ref npc.ai, true, 0.3f, 0.3f, 16f, 16f, false, 300);

                if (npc.localAI[0]++ > 50)
                {
                    npc.localAI[0] = 0;
                    Projectile.NewProjectile(npc.Center.X + Main.rand.Next(-200, 200), npc.Center.Y + Main.rand.Next(-100, 100), 0, 0, ModContent.ProjectileType <Menacing>(), 0, 0, Main.myPlayer);
                }
                return;
            }
            else
            {
                soundPlayed        = false;
                npc.defense        = 15;
                Sandstorm.TimeLeft = 10;
                if (npc.alpha <= 0)
                {
                    npc.alpha = 0;
                }
                else
                {
                    npc.alpha -= 2;
                }
            }


            if (Main.netMode != 1)
            {
                npc.damage = 30;
                internalAI[1]++;
                if (internalAI[1] >= 300)
                {
                    selectPoint   = true;;
                    internalAI[0] = Main.rand.Next(3);
                    internalAI[1] = 0;
                    npc.ai[3]     = 0;
                    npc.ai        = new float[4];
                    npc.netUpdate = true;
                }
            }

            if (internalAI[0] == 0)
            {
                npc.damage = 30;
                npc.ai[3]++;
                npc.velocity.X = 0;
                npc.velocity.Y = 0;
                if (npc.ai[3] == 9 || npc.ai[3] == 36 || npc.ai[3] == 72)
                {
                    if (Main.netMode != 1 && AAGlobalProjectile.CountProjectiles(658) < 5)
                    {
                        FireProjectile();
                        npc.netUpdate = true;
                    }
                }
                if (npc.ai[3] > 90 && Main.netMode != 1)
                {
                    internalAI[0] = 10;
                    internalAI[1] = 0;
                    npc.ai        = new float[4];
                    npc.ai[3]     = 0;
                    npc.netUpdate = true;
                }
            }
            else if (internalAI[0] == 1)
            {
                npc.damage = 60;
                npc.ai[3]++;
                BaseAI.AIFlier(npc, ref npc.ai, true, 0.1f, 0.1f, 6f, 6f, false, 300);
                npc.damage = 40;
                if (npc.ai[3] > 200 && Main.netMode != 1)
                {
                    internalAI[0] = 10;
                    internalAI[1] = 0;
                    npc.ai        = new float[4];
                    npc.ai[3]     = 0;
                    npc.netUpdate = true;
                }
            }
            else if (internalAI[0] == 2)
            {
                npc.ai[3]++;

                npc.damage = 50;
                if (npc.ai[3] < 120 && npc.ai[3] > 60)
                {
                    if (Main.netMode != 1)
                    {
                        if (selectPoint)
                        {
                            float point = 700 * npc.direction;
                            MovePoint = player.Center + new Vector2(point, 0);
                            MoveToPoint(MovePoint, 10f);
                            selectPoint   = false;
                            npc.netUpdate = true;
                        }
                        npc.damage    = 20;
                        npc.netUpdate = true;
                    }
                }
                else
                {
                    if (Main.netMode != 1)
                    {
                        if (npc.ai[3] == 120)
                        {
                            //float point = 500 * npc.direction;
                            MovePoint = new Vector2(player.Center.X, npc.position.Y);
                            MoveToPoint(MovePoint, 10f);
                            npc.netUpdate = true;
                        }
                        npc.damage    = 40;
                        npc.netUpdate = true;
                    }
                }



                if (npc.ai[3] > 160 && Main.netMode != 1)
                {
                    npc.damage    = 30;
                    internalAI[0] = 10;
                    internalAI[1] = 0;
                    npc.ai        = new float[4];
                    npc.ai[3]     = 0;
                    npc.netUpdate = true;
                }
            }
            else
            {
                npc.damage = 30;
                BaseAI.AIFlier(npc, ref npc.ai, true, 0.1f, 0.04f, 4f, 2f, false, 300);
            }
        }
コード例 #9
0
ファイル: NovaFocus.cs プロジェクト: CC-png-byte/AAMod
        public override void AI()
        {
            if (body == -1)
            {
                int npcID = BaseAI.GetNPC(npc.Center, mod.NPCType("Zero"), 1000, null);
                if (npcID >= 0)
                {
                    body = npcID;
                }
            }

            if (body == -1)
            {
                return;
            }

            NPC zero = Main.npc[body];

            if (zero == null || zero.life <= 0 || !zero.active || zero.type != mod.NPCType("Zero"))
            {
                npc.active = false; return;
            }

            for (int m = npc.oldPos.Length - 1; m > 0; m--)
            {
                npc.oldPos[m] = npc.oldPos[m - 1];
            }
            npc.oldPos[0] = npc.position;

            int probeNumber = ((Zero)zero.modNPC).WeaponCount;

            if (rotValue == -1f)
            {
                rotValue = npc.ai[0] % probeNumber * ((float)Math.PI * 2f / probeNumber);
            }
            rotValue += Main.expertMode ? .05f : 0f;
            while (rotValue > (float)Math.PI * 2f)
            {
                rotValue -= (float)Math.PI * 2f;
            }
            npc.Center = BaseUtility.RotateVector(zero.Center, zero.Center + new Vector2(((Zero)zero.modNPC).Distance, 0f), rotValue);

            if (Main.netMode != 1)
            {
                npc.ai[2]++;
            }

            Player player = Main.player[zero.target];

            int aiTimerFire = Main.expertMode ? 230 : 280;

            Vector2 vector2     = new Vector2(npc.position.X + (npc.width * 0.5f), npc.position.Y + (npc.height * 0.5f));
            float   num1        = Main.player[npc.target].position.X + (player.width / 2) - vector2.X;
            float   num2        = Main.player[npc.target].position.Y + (player.height / 2) - vector2.Y;
            float   NewRotation = (float)Math.Atan2(num2, num1);

            npc.rotation = MathHelper.Lerp(npc.rotation, NewRotation, 1f / 25f);

            if (npc.ai[2] >= aiTimerFire)
            {
                npc.ai[3]++;
                if (npc.ai[3] >= 210)
                {
                    npc.ai[2] = 0;
                    npc.ai[3] = 0;
                    if (Main.netMode != 1)
                    {
                        laser.Kill();
                    }
                }
                else if (!AAGlobalProjectile.AnyProjectiles(ModContent.ProjectileType <NovaRay>()) && Main.netMode != 1)
                {
                    laser          = Main.projectile[Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0f, 0f, ModContent.ProjectileType <NovaRay>(), (int)(npc.damage * 0.75f), 3f, Main.myPlayer, npc.whoAmI, 420)];
                    laser.velocity = BaseUtility.RotateVector(default, new Vector2(14f, 0f), laser.rotation);
コード例 #10
0
ファイル: Rajah.cs プロジェクト: DellyThePuffercat/AAMod
        public override void AI()
        {
            if (Main.expertMode)
            {
                damage = npc.damage / 4;
            }
            else
            {
                damage = npc.damage / 2;
            }
            AAModGlobalNPC.Rajah = npc.whoAmI;
            WeaponPos            = new Vector2(npc.Center.X + (npc.direction == 1 ? -78 : 78), npc.Center.Y - 9);
            StaffPos             = new Vector2(npc.Center.X + (npc.direction == 1 ? 78 : -78), npc.Center.Y - 9);
            if (Roaring)
            {
                roarTimer--;
            }

            if (Main.netMode != 1 && npc.type == ModContent.NPCType <SupremeRajah>() && isSupreme == false)
            {
                isSupreme     = true;
                npc.netUpdate = true;
            }

            if (isSupreme)
            {
                if (npc.ai[3] != 0 && !DefenseLine && !AAWorld.downedRajahsRevenge && Main.netMode != 1)
                {
                    DefenseLine = true;
                    BaseUtility.Chat("Rajah glows with furious energy as he attacks, strengthening his defenses", Color.MediumPurple);
                }
                if (npc.life <= npc.lifeMax / 7 && !SayLine && Main.netMode != 1)
                {
                    SayLine = true;
                    string Name;

                    int bunnyKills = NPC.killCount[Item.NPCtoBanner(NPCID.Bunny)];
                    if (bunnyKills >= 100 && !AAWorld.downedRajahsRevenge)
                    {
                        Name = "MUDERER";
                    }
                    else
                    {
                        if (Main.netMode != 0)
                        {
                            Name = "Terrarians";
                        }
                        else if (!AAWorld.downedRajahsRevenge)
                        {
                            Name = "Terrarian";
                        }
                        else
                        {
                            Name = Main.LocalPlayer.name;
                        }
                    }
                    if (Main.netMode != 1)
                    {
                        BaseUtility.Chat(Lang.BossChat("Rajah5") + Name.ToUpper() + Lang.BossChat("Rajah6"), 107, 137, 179);
                    }
                    music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/LastStand");
                }
            }

            Player player = Main.player[npc.target];

            if (npc.target >= 0 && Main.player[npc.target].dead)
            {
                npc.TargetClosest(true);
                if (Main.player[npc.target].dead)
                {
                    if (isSupreme)
                    {
                        if (Main.netMode != 1)
                        {
                            BaseUtility.Chat(Lang.BossChat("Rajah7"), 107, 137, 179);
                        }
                        if (Main.netMode != 1)
                        {
                            Projectile.NewProjectile(npc.position, npc.velocity, ModContent.ProjectileType <SupremeRajahBookIt>(), damage, 0, Main.myPlayer);
                        }
                    }
                    else
                    {
                        if (Main.netMode != 1)
                        {
                            BaseUtility.Chat(Lang.BossChat("Rajah2"), 107, 137, 179);
                        }
                        if (Main.netMode != 1)
                        {
                            Projectile.NewProjectile(npc.position, npc.velocity, ModContent.ProjectileType <RajahBookIt>(), damage, 0, Main.myPlayer);
                        }
                    }
                    npc.active        = false;
                    npc.noTileCollide = true;
                    npc.netUpdate     = true;
                    return;
                }
            }

            if (Math.Abs(npc.Center.X - Main.player[npc.target].Center.X) + Math.Abs(npc.Center.Y - Main.player[npc.target].Center.Y) > 10000)
            {
                npc.TargetClosest(true);
                if (Math.Abs(npc.Center.X - Main.player[npc.target].Center.X) + Math.Abs(npc.Center.Y - Main.player[npc.target].Center.Y) > 10000)
                {
                    if (Main.netMode != 1)
                    {
                        BaseUtility.Chat(Lang.BossChat("Rajah3"), 107, 137, 179);
                    }
                    if (Main.netMode != 1)
                    {
                        if (isSupreme)
                        {
                            Projectile.NewProjectile(npc.position, npc.velocity, ModContent.ProjectileType <SupremeRajahBookIt>(), damage, 0, Main.myPlayer); //Originally 100 damage
                        }
                        else
                        {
                            Projectile.NewProjectile(npc.position, npc.velocity, ModContent.ProjectileType <RajahBookIt>(), damage, 0, Main.myPlayer);
                        }
                    }
                    npc.active        = false;
                    npc.noTileCollide = true;
                    npc.netUpdate     = true;
                    return;
                }
            }


            if (player.Center.X < npc.Center.X)
            {
                npc.direction = 1;
            }
            else
            {
                npc.direction = -1;
            }
            if (player.Center.Y < npc.position.Y - 30f || TileBelowEmpty() ||
                !Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height) ||
                Math.Abs(npc.Center.X - Main.player[npc.target].Center.X) + Math.Abs(npc.Center.Y - Main.player[npc.target].Center.Y) > 2000 || isDashing)
            {
                npc.noGravity = true;
                FlyAI();
            }
            else
            {
                npc.noTileCollide = false;
                npc.noGravity     = false;
                isDashing         = false;
                JumpAI();
            }

            if (npc.target <= 0 || npc.target == 255 || Main.player[npc.target].dead)
            {
                npc.TargetClosest(true);
            }

            if (Main.netMode != 1)
            {
                npc.ai[2]++;
                internalAI[3]++;
            }
            if (npc.ai[2] >= 500)
            {
                internalAI[3] = 0;
                npc.ai[2]     = 0;
                npc.ai[3]     = 0;
                npc.netUpdate = true;
            }
            else if (npc.ai[3] == 0 && npc.ai[2] >= ChangeRate())
            {
                if (Main.rand.Next(5) == 0)
                {
                    Roar(roarTimerMax);
                }
                if (Main.netMode != 1)
                {
                    internalAI[3] = 0;
                    npc.ai[2]     = 0;
                    if (ModSupport.GetMod("ThoriumMod") != null && Main.rand.Next(7) == 0)
                    {
                        npc.ai[3] = 7;
                    }
                    else
                    {
                        if (isSupreme)
                        {
                            npc.ai[3] = Main.rand.Next(7);
                        }
                        else
                        {
                            npc.ai[3] = Main.rand.Next(4);
                        }
                    }
                }
                npc.netUpdate = true;
            }

            if (Main.netMode != 1)
            {
                if (npc.ai[3] == 0) //Minion Phase
                {
                    if (internalAI[3] >= 80)
                    {
                        internalAI[3] = 0;
                        if (internalAI[1] == 0)
                        {
                            if (NPC.CountNPCS(ModContent.NPCType <RabbitcopterSoldier>()) + AAGlobalProjectile.CountProjectiles(ModContent.ProjectileType <BunnySummon1>()) < 5)
                            {
                                Projectile.NewProjectile(StaffPos, Vector2.Zero, ModContent.ProjectileType <BunnySummon1>(), 0, 0, Main.myPlayer, Main.rand.Next((int)npc.Center.X - 200, (int)npc.Center.X + 200), Main.rand.Next((int)npc.Center.Y - 200, (int)npc.Center.Y - 50));
                                Projectile.NewProjectile(StaffPos, Vector2.Zero, ModContent.ProjectileType <BunnySummon1>(), 0, 0, Main.myPlayer, Main.rand.Next((int)npc.Center.X - 200, (int)npc.Center.X + 200), Main.rand.Next((int)npc.Center.Y - 200, (int)npc.Center.Y - 50));
                                Projectile.NewProjectile(StaffPos, Vector2.Zero, ModContent.ProjectileType <BunnySummon1>(), 0, 0, Main.myPlayer, Main.rand.Next((int)npc.Center.X - 200, (int)npc.Center.X + 200), Main.rand.Next((int)npc.Center.Y - 200, (int)npc.Center.Y - 50));
                            }
                            npc.netUpdate = true;
                        }
                        else
                        {
                            if (npc.ai[1] > 2)
                            {
                                npc.ai[1] = 0;
                            }
                            if (npc.ai[1] == 0)
                            {
                                if (NPC.CountNPCS(ModContent.NPCType <RabbitcopterSoldier>()) + AAGlobalProjectile.CountProjectiles(ModContent.ProjectileType <BunnySummon1>()) < 5)
                                {
                                    Projectile.NewProjectile(StaffPos, Vector2.Zero, ModContent.ProjectileType <BunnySummon1>(), 0, 0, Main.myPlayer, Main.rand.Next((int)npc.Center.X - 500, (int)npc.Center.X + 500), Main.rand.Next((int)npc.Center.Y - 200, (int)npc.Center.Y - 50));
                                    Projectile.NewProjectile(StaffPos, Vector2.Zero, ModContent.ProjectileType <BunnySummon1>(), 0, 0, Main.myPlayer, Main.rand.Next((int)npc.Center.X - 500, (int)npc.Center.X + 500), Main.rand.Next((int)npc.Center.Y - 200, (int)npc.Center.Y - 50));
                                    Projectile.NewProjectile(StaffPos, Vector2.Zero, ModContent.ProjectileType <BunnySummon1>(), 0, 0, Main.myPlayer, Main.rand.Next((int)npc.Center.X - 500, (int)npc.Center.X + 500), Main.rand.Next((int)npc.Center.Y - 200, (int)npc.Center.Y - 50));
                                }
                            }
                            else if (npc.ai[1] == 1)
                            {
                                if (NPC.CountNPCS(ModContent.NPCType <BunnyBrawler>()) + AAGlobalProjectile.CountProjectiles(ModContent.ProjectileType <BunnySummon2>()) < 5)
                                {
                                    Projectile.NewProjectile(StaffPos, Vector2.Zero, ModContent.ProjectileType <BunnySummon2>(), 0, 0, Main.myPlayer, Main.rand.Next((int)npc.Center.X - 500, (int)npc.Center.X + 500), Main.rand.Next((int)npc.Center.Y - 200, (int)npc.Center.Y - 50));
                                    Projectile.NewProjectile(StaffPos, Vector2.Zero, ModContent.ProjectileType <BunnySummon2>(), 0, 0, Main.myPlayer, Main.rand.Next((int)npc.Center.X - 500, (int)npc.Center.X + 500), Main.rand.Next((int)npc.Center.Y - 200, (int)npc.Center.Y - 50));
                                }
                            }
                            else if (npc.ai[1] == 2)
                            {
                                if (NPC.CountNPCS(ModContent.NPCType <BunnyBattler>()) + AAGlobalProjectile.CountProjectiles(ModContent.ProjectileType <BunnySummon3>()) < 8)
                                {
                                    Projectile.NewProjectile(StaffPos, Vector2.Zero, ModContent.ProjectileType <BunnySummon3>(), 0, 0, Main.myPlayer, Main.rand.Next((int)npc.Center.X - 500, (int)npc.Center.X + 500), Main.rand.Next((int)npc.Center.Y - 200, (int)npc.Center.Y - 50));

                                    Projectile.NewProjectile(StaffPos, Vector2.Zero, ModContent.ProjectileType <BunnySummon3>(), 0, 0, Main.myPlayer, Main.rand.Next((int)npc.Center.X - 500, (int)npc.Center.X + 500), Main.rand.Next((int)npc.Center.Y - 200, (int)npc.Center.Y - 50));

                                    Projectile.NewProjectile(StaffPos, Vector2.Zero, ModContent.ProjectileType <BunnySummon3>(), 0, 0, Main.myPlayer, Main.rand.Next((int)npc.Center.X - 500, (int)npc.Center.X + 500), Main.rand.Next((int)npc.Center.Y - 200, (int)npc.Center.Y - 50));

                                    Projectile.NewProjectile(StaffPos, Vector2.Zero, ModContent.ProjectileType <BunnySummon3>(), 0, 0, Main.myPlayer, Main.rand.Next((int)npc.Center.X - 500, (int)npc.Center.X + 500), Main.rand.Next((int)npc.Center.Y - 200, (int)npc.Center.Y - 50));
                                }
                            }
                            npc.ai[1]    += 1;
                            npc.netUpdate = true;
                        }
                    }
                }
                else if (npc.ai[3] == 1) //Bunzooka
                {
                    if (internalAI[3] > 40)
                    {
                        internalAI[3] = 0;
                        int     Rocket = isSupreme ? ModContent.ProjectileType <RajahRocketEXR>() : ModContent.ProjectileType <RajahRocket>();
                        Vector2 dir    = Vector2.Normalize(player.Center - WeaponPos);
                        dir *= ProjSpeed();
                        Projectile.NewProjectile(WeaponPos.X, WeaponPos.Y, dir.X, dir.Y, Rocket, damage, 5, Main.myPlayer);
                        npc.netUpdate = true;
                    }
                }
                else if (npc.ai[3] == 2) //Royal Scepter
                {
                    int     carrots    = isSupreme ? 5 : 3;
                    int     carrotType = isSupreme ? mod.ProjectileType("CarrotEXR") : mod.ProjectileType("CarrotHostile");
                    float   spread     = 45f * 0.0174f;
                    Vector2 dir        = Vector2.Normalize(player.Center - WeaponPos);
                    dir *= ProjSpeed();
                    float  baseSpeed  = (float)Math.Sqrt((dir.X * dir.X) + (dir.Y * dir.Y));
                    double startAngle = Math.Atan2(dir.X, dir.Y) - .1d;
                    double deltaAngle = spread / carrots * 2;
                    if (internalAI[3] > 40)
                    {
                        internalAI[3] = 0;
                        for (int i = 0; i < carrots; i++)
                        {
                            double offsetAngle = startAngle + (deltaAngle * i);
                            Projectile.NewProjectile(WeaponPos.X, WeaponPos.Y, baseSpeed * (float)Math.Sin(offsetAngle), baseSpeed * (float)Math.Cos(offsetAngle), carrotType, damage, 5, Main.myPlayer, 0);
                        }
                        npc.netUpdate = true;
                    }
                }
                else if (npc.ai[3] == 3) //Javelin
                {
                    int Javelin = isSupreme ? ModContent.ProjectileType <BaneTEXR>() : ModContent.ProjectileType <BaneR>();
                    if (internalAI[3] == (isSupreme ? 40 : 60))
                    {
                        Vector2 dir = Vector2.Normalize(player.position - WeaponPos);
                        dir *= ProjSpeed();
                        Projectile.NewProjectile(WeaponPos.X, WeaponPos.Y, dir.X, dir.Y, Javelin, damage, 5, Main.myPlayer);
                    }
                    if (internalAI[3] > (isSupreme ? 60 : 90))
                    {
                        internalAI[3] = 0;
                    }
                    npc.netUpdate = true;
                }
                else if (npc.ai[3] == 4) //Excalihare
                {
                    if (internalAI[3] > 40)
                    {
                        internalAI[3] = 0;
                        Vector2 dir = Vector2.Normalize(player.Center - WeaponPos);
                        dir *= ProjSpeed();
                        Projectile.NewProjectile(WeaponPos.X, WeaponPos.Y, dir.X, dir.Y, ModContent.ProjectileType <ExcalihareR>(), damage, 5, Main.myPlayer);
                        npc.netUpdate = true;
                    }
                }
                else if (npc.ai[3] == 5) //Fluffy Fury
                {
                    int     Arrows = Main.rand.Next(2, 4);
                    float   spread = 45f * 0.0174f;
                    Vector2 dir    = Vector2.Normalize(player.Center - WeaponPos);
                    dir *= ProjSpeed();
                    float  baseSpeed  = (float)Math.Sqrt((dir.X * dir.X) + (dir.Y * dir.Y));
                    double startAngle = Math.Atan2(dir.X, dir.Y) - .1d;
                    double deltaAngle = spread / (Arrows * 2);
                    if (internalAI[3] > 50)
                    {
                        internalAI[3] = 0;
                        for (int i = 0; i < Arrows; i++)
                        {
                            double offsetAngle = startAngle + (deltaAngle * i);
                            Projectile.NewProjectile(WeaponPos.X, WeaponPos.Y, baseSpeed * (float)Math.Sin(offsetAngle), baseSpeed * (float)Math.Cos(offsetAngle), mod.ProjectileType("CarrowR"), damage, 5, Main.myPlayer);
                        }
                        npc.netUpdate = true;
                    }
                }
                else if (npc.ai[3] == 6) //Rabbits Wrath
                {
                    if (internalAI[3] > 5)
                    {
                        internalAI[3] = 0;
                        Vector2 vector12 = new Vector2(player.Center.X, player.Center.Y);
                        float   num75    = 14f;
                        for (int num120 = 0; num120 < 3; num120++)
                        {
                            Vector2 vector2 = player.Center + new Vector2(-(float)Main.rand.Next(0, 401) * player.direction, -600f);
                            vector2.Y -= 120 * num120;
                            Vector2 vector13 = vector12 - vector2;
                            if (vector13.Y < 0f)
                            {
                                vector13.Y *= -1f;
                            }
                            if (vector13.Y < 20f)
                            {
                                vector13.Y = 20f;
                            }
                            vector13.Normalize();
                            vector13 *= num75;
                            float num82   = vector13.X;
                            float num83   = vector13.Y;
                            float speedX5 = num82;
                            float speedY6 = num83 + Main.rand.Next(-40, 41) * 0.02f;
                            int   p       = Projectile.NewProjectile(vector2.X, vector2.Y, speedX5, speedY6, ModContent.ProjectileType <CarrotEXR>(), damage, 6, Main.myPlayer, 0, 0);
                            Main.projectile[p].tileCollide = false;
                        }
                        npc.netUpdate = true;
                    }
                }
                else if (npc.ai[3] == 7) //Carrot Farmer
                {
                    if (!AAGlobalProjectile.AnyProjectiles(ModContent.ProjectileType <CarrotFarmerR>()))
                    {
                        Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0f, 0f, ModContent.ProjectileType <CarrotFarmerR>(), damage, 3f, Main.myPlayer, npc.whoAmI);
                        npc.netUpdate = true;
                    }
                }
            }

            if (Main.expertMode)
            {
                if (npc.life < (npc.lifeMax * .85f)) //The lower the health, the more damage is done
                {
                    npc.damage = (int)(npc.defDamage * 1.1f);
                }
                if (npc.life < (npc.lifeMax * .7f))
                {
                    npc.damage = (int)(npc.defDamage * 1.3f);
                }
                if (npc.life < (npc.lifeMax * .65f))
                {
                    npc.damage = (int)(npc.defDamage * 1.5f);
                }
                if (npc.life < (npc.lifeMax * .4f))
                {
                    npc.damage = (int)(npc.defDamage * 1.7f);
                }
                if (npc.life < (npc.lifeMax * .25f))
                {
                    npc.damage = (int)(npc.defDamage * 1.9f);
                }
                if (npc.life < (npc.lifeMax / 7))
                {
                    npc.damage = (int)(npc.defDamage * 2.2f);
                }
            }
            else
            {
                if (npc.life == npc.lifeMax / 7)
                {
                    npc.damage = (int)(npc.defDamage * 1.5f);
                }
            }

            npc.rotation = 0;
        }