예제 #1
0
 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 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) ? 10 : 50;
 }
 public override void ScaleExpertStats(int numPlayers, float bossLifeScale)
 {
     if (FargoSoulsWorld.downedFishronEX || !EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.fishBossEX, NPCID.DukeFishron))
     {
         npc.lifeMax = (int)(npc.lifeMax * (1 + FargoSoulsWorld.FishronCount * .025));
         npc.damage  = (int)(npc.damage * (1 + FargoSoulsWorld.FishronCount * .0125));
     }
 }
예제 #4
0
        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 NPCLoot(NPC npc)
        {
            Player      player    = Main.player[npc.lastInteraction];
            FargoPlayer modPlayer = player.GetModPlayer <FargoPlayer>();

            if (modPlayer.PlatinumEnchant && !npc.boss && firstLoot)
            {
                int chance = 5;
                int bonus  = 2;

                if (modPlayer.WillForce || modPlayer.WizardEnchant)
                {
                    bonus = 5;
                }

                if (Main.rand.Next(chance) == 0)
                {
                    firstLoot = false;
                    for (int i = 1; i < bonus; i++)
                    {
                        npc.NPCLoot();
                    }

                    int num1 = 36;
                    for (int index1 = 0; index1 < num1; ++index1)
                    {
                        Vector2 vector2_1 = (Vector2.Normalize(npc.velocity) * new Vector2((float)npc.width / 2f, (float)npc.height) * 0.75f).RotatedBy((double)(index1 - (num1 / 2 - 1)) * 6.28318548202515 / (double)num1, new Vector2()) + npc.Center;
                        Vector2 vector2_2 = vector2_1 - npc.Center;
                        int     index2    = Dust.NewDust(vector2_1 + vector2_2, 0, 0, DustID.PlatinumCoin, vector2_2.X * 2f, vector2_2.Y * 2f, 100, new Color(), 1.4f);
                        Main.dust[index2].noGravity = true;
                        Main.dust[index2].noLight   = true;
                        Main.dust[index2].velocity  = vector2_2;
                    }
                }
            }

            firstLoot = false;

            //patreon gang
            if (SoulConfig.Instance.PatreonOrb && npc.type == NPCID.Golem && Main.rand.Next(10) == 0)
            {
                Item.NewItem(npc.Hitbox, ModContent.ItemType <Patreon.Daawnz.ComputationOrb>());
            }

            if (SoulConfig.Instance.PatreonDoor && npc.type == NPCID.Squid && Main.rand.Next(50) == 0)
            {
                Item.NewItem(npc.Hitbox, ModContent.ItemType <Patreon.Sam.SquidwardDoor>());
            }

            if (SoulConfig.Instance.PatreonKingSlime && npc.type == NPCID.KingSlime && FargoSoulsWorld.MasochistMode && Main.rand.Next(100) == 0)
            {
                Item.NewItem(npc.Hitbox, ModContent.ItemType <Patreon.Catsounds.MedallionoftheFallenKing>());
            }

            if (SoulConfig.Instance.PatreonPlant && npc.type == NPCID.Dryad && Main.bloodMoon && player.ZoneJungle)
            {
                Item.NewItem(npc.Hitbox, ModContent.ItemType <Patreon.LaBonez.PiranhaPlantVoodooDoll>());
            }

            //boss drops
            if (Main.rand.Next(FargoSoulsWorld.MasochistMode ? 3 : 10) == 0)
            {
                switch (npc.type)
                {
                case NPCID.KingSlime:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <SlimeKingsSlasher>());
                    break;

                case NPCID.EyeofCthulhu:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <LeashOfCthulhu>());
                    break;

                case NPCID.EaterofWorldsHead:
                case NPCID.EaterofWorldsBody:
                case NPCID.EaterofWorldsTail:
                    bool dropItems = true;
                    for (int i = 0; i < 200; i++)
                    {
                        if (Main.npc[i].active && i != npc.whoAmI && (Main.npc[i].type == NPCID.EaterofWorldsHead || Main.npc[i].type == NPCID.EaterofWorldsBody || Main.npc[i].type == NPCID.EaterofWorldsTail))
                        {
                            dropItems = false;
                            break;
                        }
                    }
                    if (dropItems)
                    {
                        Item.NewItem(npc.Hitbox, ModContent.ItemType <EaterStaff>());
                    }
                    break;

                case NPCID.BrainofCthulhu:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <BrainStaff>());
                    break;

                case NPCID.QueenBee:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <TheSmallSting>());
                    break;

                case NPCID.SkeletronHead:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <BoneZone>());
                    break;

                case NPCID.WallofFlesh:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <FleshHand>());
                    break;

                case NPCID.TheDestroyer:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <DestroyerGun>());
                    break;

                case NPCID.SkeletronPrime:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <RefractorBlaster>());
                    break;

                case NPCID.Retinazer:
                    if (!EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.spazBoss, NPCID.Spazmatism))
                    {
                        Item.NewItem(npc.Hitbox, ModContent.ItemType <TwinRangs>());
                    }
                    break;

                case NPCID.Spazmatism:
                    if (!EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.retiBoss, NPCID.Retinazer))
                    {
                        Item.NewItem(npc.Hitbox, ModContent.ItemType <TwinRangs>());
                    }
                    break;

                case NPCID.Plantera:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <Dicer>());
                    break;

                case NPCID.Golem:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <RockSlide>());
                    break;

                case NPCID.DukeFishron:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <FishStick>());
                    break;

                case NPCID.DD2Betsy:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <DragonBreath>());
                    break;
                }
            }

            if (npc.type == NPCID.BigMimicJungle)
            {
                switch (Main.rand.Next(3))
                {
                case 0: Item.NewItem(npc.Hitbox, ModContent.ItemType <Vineslinger>()); break;

                case 1: Item.NewItem(npc.Hitbox, ModContent.ItemType <Mahoguny>()); break;

                case 2: Item.NewItem(npc.Hitbox, ModContent.ItemType <OvergrownKey>()); break;
                }
            }

            if (Fargowiltas.Instance.CalamityLoaded && Revengeance && FargoSoulsWorld.MasochistMode && Main.bloodMoon && Main.moonPhase == 0 && Main.raining && Main.rand.Next(10) == 0)
            {
                Mod calamity = ModLoader.GetMod("CalamityMod");

                if (npc.type == calamity.NPCType("DevourerofGodsHeadS"))
                {
                    Item.NewItem(npc.Hitbox, calamity.ItemType("CosmicPlushie"));
                }
            }
        }
예제 #6
0
        public override void NPCLoot(NPC npc)
        {
            Player      player    = Main.player[npc.lastInteraction];
            FargoPlayer modPlayer = player.GetModPlayer <FargoPlayer>();

            if (modPlayer.PlatinumEnchant && !npc.boss && firstLoot)
            {
                bool midas  = npc.HasBuff(BuffID.Midas);
                int  chance = 10;
                int  bonus  = 4;

                if (midas)
                {
                    chance /= 2;
                    bonus  *= 2;
                }

                if (Main.rand.Next(chance) == 0)
                {
                    firstLoot = false;
                    for (int i = 1; i < bonus; i++)
                    {
                        npc.NPCLoot();
                    }

                    int num1 = 36;
                    for (int index1 = 0; index1 < num1; ++index1)
                    {
                        Vector2 vector2_1 = (Vector2.Normalize(npc.velocity) * new Vector2((float)npc.width / 2f, (float)npc.height) * 0.75f).RotatedBy((double)(index1 - (num1 / 2 - 1)) * 6.28318548202515 / (double)num1, new Vector2()) + npc.Center;
                        Vector2 vector2_2 = vector2_1 - npc.Center;
                        int     index2    = Dust.NewDust(vector2_1 + vector2_2, 0, 0, DustID.PlatinumCoin, vector2_2.X * 2f, vector2_2.Y * 2f, 100, new Color(), 1.4f);
                        Main.dust[index2].noGravity = true;
                        Main.dust[index2].noLight   = true;
                        Main.dust[index2].velocity  = vector2_2;
                    }
                }
            }

            firstLoot = false;

            if (npc.type == NPCID.Golem && Main.rand.Next(10) == 0)
            {
                Item.NewItem(npc.Hitbox, ModContent.ItemType <ComputationOrb>());
            }

            //boss drops
            if (Main.rand.Next(FargoSoulsWorld.MasochistMode ? 3 : 10) == 0)
            {
                switch (npc.type)
                {
                case NPCID.KingSlime:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <SlimeKingsSlasher>());
                    break;

                case NPCID.EyeofCthulhu:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <EyeFlail>());
                    break;

                case NPCID.EaterofWorldsHead:
                case NPCID.EaterofWorldsBody:
                case NPCID.EaterofWorldsTail:
                    bool dropItems = true;
                    for (int i = 0; i < 200; i++)
                    {
                        if (Main.npc[i].active && i != npc.whoAmI && (Main.npc[i].type == 13 || Main.npc[i].type == 14 || Main.npc[i].type == 15))
                        {
                            dropItems = false;
                            break;
                        }
                    }
                    if (dropItems)
                    {
                        Item.NewItem(npc.Hitbox, ModContent.ItemType <EaterStaff>());
                    }
                    break;

                case NPCID.BrainofCthulhu:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <BrainStaff>());
                    break;

                case NPCID.QueenBee:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <HiveStaff>());
                    break;

                case NPCID.SkeletronHead:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <Bonezone>());
                    break;

                case NPCID.WallofFlesh:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <FleshHand>());
                    break;

                case NPCID.TheDestroyer:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <DestroyerGun>());
                    break;

                case NPCID.SkeletronPrime:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <DarkStarCannon>());
                    break;

                case NPCID.Retinazer:
                    if (!EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.spazBoss, NPCID.Spazmatism))
                    {
                        Item.NewItem(npc.Hitbox, ModContent.ItemType <TwinRangs>());
                    }
                    break;

                case NPCID.Spazmatism:
                    if (!EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.retiBoss, NPCID.Retinazer))
                    {
                        Item.NewItem(npc.Hitbox, ModContent.ItemType <TwinRangs>());
                    }
                    break;

                case NPCID.Plantera:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <Dicer>());
                    break;

                case NPCID.Golem:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <GolemTome>());
                    break;

                case NPCID.DukeFishron:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <FishStick>());
                    break;
                }
            }

            if (Fargowiltas.Instance.CalamityLoaded && Revengeance && FargoSoulsWorld.MasochistMode && Main.bloodMoon && Main.moonPhase == 0 && Main.raining && Main.rand.Next(10) == 0)
            {
                Mod calamity = ModLoader.GetMod("CalamityMod");

                if (npc.type == calamity.NPCType("DevourerofGodsHeadS"))
                {
                    Item.NewItem(npc.Hitbox, calamity.ItemType("CosmicPlushie"));
                }
            }
        }
예제 #7
0
        public override void NPCLoot(NPC npc)
        {
            Player      player    = Main.player[npc.lastInteraction];
            FargoPlayer modPlayer = player.GetModPlayer <FargoPlayer>();

            if (modPlayer.NecroEnchant && SoulConfig.Instance.GetValue(SoulConfig.Instance.NecroGuardian) && !npc.boss && modPlayer.NecroCD == 0)
            {
                Projectile.NewProjectile(npc.Center, new Vector2(0, -3), ModContent.ProjectileType <NecroGrave>(), 0, 0, player.whoAmI, modPlayer.HighestDamageTypeScaling(npc.lifeMax / 5));

                if (modPlayer.ShadowForce || modPlayer.WizardEnchant)
                {
                    modPlayer.NecroCD = 30;
                }
                else
                {
                    modPlayer.NecroCD = 60;
                }
            }

            if (modPlayer.PlatinumEnchant && !npc.boss && firstLoot)
            {
                int chance = 5;
                int bonus  = 2;

                if (modPlayer.WillForce || modPlayer.WizardEnchant)
                {
                    bonus = 5;
                }

                if (Main.rand.Next(chance) == 0)
                {
                    firstLoot = false;
                    for (int i = 1; i < bonus; i++)
                    {
                        npc.NPCLoot();
                    }

                    int num1 = 36;
                    for (int index1 = 0; index1 < num1; ++index1)
                    {
                        Vector2 vector2_1 = (Vector2.Normalize(npc.velocity) * new Vector2((float)npc.width / 2f, (float)npc.height) * 0.75f).RotatedBy((double)(index1 - (num1 / 2 - 1)) * 6.28318548202515 / (double)num1, new Vector2()) + npc.Center;
                        Vector2 vector2_2 = vector2_1 - npc.Center;
                        int     index2    = Dust.NewDust(vector2_1 + vector2_2, 0, 0, DustID.PlatinumCoin, vector2_2.X * 2f, vector2_2.Y * 2f, 100, new Color(), 1.4f);
                        Main.dust[index2].noGravity = true;
                        Main.dust[index2].noLight   = true;
                        Main.dust[index2].velocity  = vector2_2;
                    }
                }
            }

            firstLoot = false;

            //patreon gang
            if (npc.type == NPCID.Golem && Main.rand.Next(10) == 0)
            {
                Item.NewItem(npc.Hitbox, ModContent.ItemType <Patreon.Daawnz.ComputationOrb>());
            }

            if (npc.type == NPCID.Squid && Main.rand.Next(50) == 0)
            {
                Item.NewItem(npc.Hitbox, ModContent.ItemType <Patreon.Sam.SquidwardDoor>());
            }

            if (npc.type == NPCID.KingSlime && FargoSoulsWorld.MasochistMode && Main.rand.Next(100) == 0)
            {
                Item.NewItem(npc.Hitbox, ModContent.ItemType <Patreon.Catsounds.MedallionoftheFallenKing>());
            }

            switch (npc.type) //cracked gem
            {
            case NPCID.BlueSlime:
                if (npc.netID == NPCID.Pinky && Main.rand.Next(3) == 0)
                {
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <CrackedGem>(), Main.rand.Next(3) + 1);
                }
                break;

            case NPCID.Nymph:
            case NPCID.DoctorBones:
            case NPCID.DungeonSlime:
            case NPCID.Tim:
            case NPCID.UndeadMiner:
                if (Main.rand.Next(3) == 0)
                {
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <CrackedGem>(), Main.rand.Next(3) + 1);
                }
                break;

            default:
                break;
            }


            //boss drops
            if (Main.rand.Next(FargoSoulsWorld.MasochistMode ? 3 : 10) == 0)
            {
                switch (npc.type)
                {
                case NPCID.KingSlime:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <SlimeKingsSlasher>());
                    break;

                case NPCID.EyeofCthulhu:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <EyeFlail>());
                    break;

                case NPCID.EaterofWorldsHead:
                case NPCID.EaterofWorldsBody:
                case NPCID.EaterofWorldsTail:
                    bool dropItems = true;
                    for (int i = 0; i < 200; i++)
                    {
                        if (Main.npc[i].active && i != npc.whoAmI && (Main.npc[i].type == 13 || Main.npc[i].type == 14 || Main.npc[i].type == 15))
                        {
                            dropItems = false;
                            break;
                        }
                    }
                    if (dropItems)
                    {
                        Item.NewItem(npc.Hitbox, ModContent.ItemType <EaterStaff>());
                    }
                    break;

                case NPCID.BrainofCthulhu:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <BrainStaff>());
                    break;

                case NPCID.QueenBee:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <TheSmallSting>());
                    break;

                case NPCID.SkeletronHead:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <BoneZone>());
                    break;

                case NPCID.WallofFlesh:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <FleshHand>());
                    break;

                case NPCID.TheDestroyer:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <DestroyerGun>());
                    break;

                case NPCID.SkeletronPrime:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <RefractorBlaster>());
                    break;

                case NPCID.Retinazer:
                    if (!EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.spazBoss, NPCID.Spazmatism))
                    {
                        Item.NewItem(npc.Hitbox, ModContent.ItemType <TwinRangs>());
                    }
                    break;

                case NPCID.Spazmatism:
                    if (!EModeGlobalNPC.BossIsAlive(ref EModeGlobalNPC.retiBoss, NPCID.Retinazer))
                    {
                        Item.NewItem(npc.Hitbox, ModContent.ItemType <TwinRangs>());
                    }
                    break;

                case NPCID.Plantera:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <Dicer>());
                    break;

                case NPCID.Golem:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <RockSlide>());
                    break;

                case NPCID.DukeFishron:
                    Item.NewItem(npc.Hitbox, ModContent.ItemType <FishStick>());
                    break;
                }
            }

            if (Fargowiltas.Instance.CalamityLoaded && Revengeance && FargoSoulsWorld.MasochistMode && Main.bloodMoon && Main.moonPhase == 0 && Main.raining && Main.rand.Next(10) == 0)
            {
                Mod calamity = ModLoader.GetMod("CalamityMod");

                if (npc.type == calamity.NPCType("DevourerofGodsHeadS"))
                {
                    Item.NewItem(npc.Hitbox, calamity.ItemType("CosmicPlushie"));
                }
            }
        }