public override void OnHitPlayer(Player target, int damage, bool crit)
 {
     target.AddBuff(BuffID.OnFire, 600);
     target.AddBuff(ModContent.BuffType <LivingWasteland>(), 600);
 }
Example #2
0
 public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
 {
     target.AddBuff(ModContent.BuffType <EnemyFreeze>(), 30);
     base.OnHitNPC(target, damage, knockback, crit);
 }
 public override void OnHitPlayer(Player target, int damage, bool crit)
 {
     target.AddBuff(ModContent.BuffType <Buffs.Masomode.Midas>(), 600);
 }
Example #4
0
 public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
 {
     target.AddBuff(ModContent.BuffType <EssenceTrap>(), 520);
 }
Example #5
0
 public override void OnHitPlayer(Player target, int damage, bool crit)
 {
     target.AddBuff(ModContent.BuffType <Buffs.DragonFire>(), 200);
 }
Example #6
0
        public override void AI(NPC npc)
        {
            EModeGlobalNPC.moonBoss = npc.whoAmI;

            if (FargoSoulsWorld.SwarmActive)
            {
                return;
            }

            if (!SpawnedRituals)
            {
                SpawnedRituals     = true;
                VulnerabilityState = 0;
                if (Main.netMode != NetmodeID.MultiplayerClient)
                {
                    Projectile.NewProjectile(npc.Center, Vector2.Zero, ModContent.ProjectileType <LunarRitual>(), 25, 0f, Main.myPlayer, 0f, npc.whoAmI);
                    Projectile.NewProjectile(npc.Center, Vector2.Zero, ModContent.ProjectileType <FragmentRitual>(), 0, 0f, Main.myPlayer, 0f, npc.whoAmI);
                }
            }

            if (Main.LocalPlayer.active && !Main.LocalPlayer.dead && !Main.LocalPlayer.ghost && VulnerabilityState >= 0 && VulnerabilityState <= 3)
            {
                Main.LocalPlayer.AddBuff(ModContent.BuffType <NullificationCurse>(), 2);
            }

            npc.position -= npc.velocity * 2f / 3f; //SLOW DOWN

            if (npc.dontTakeDamage)
            {
                if (AttackTimer == 370 && Main.netMode != NetmodeID.MultiplayerClient)
                {
                    for (int i = 0; i < 3; i++)
                    {
                        NPC bodyPart = Main.npc[(int)npc.localAI[i]];
                        if (bodyPart.active)
                        {
                            Projectile.NewProjectile(bodyPart.Center, Vector2.Zero, ModContent.ProjectileType <GlowRing>(), 0, 0f, Main.myPlayer, bodyPart.whoAmI, bodyPart.type);
                        }
                    }
                }

                if (AttackTimer > 400)
                {
                    AttackTimer   = 0;
                    npc.netUpdate = true;
                    NetSync(npc);

                    if (Main.netMode != NetmodeID.MultiplayerClient)
                    {
                        switch (VulnerabilityState)
                        {
                        case 0:     //melee
                            for (int i = 0; i < 3; i++)
                            {
                                NPC bodyPart = Main.npc[(int)npc.localAI[i]];

                                if (bodyPart.active)
                                {
                                    int damage = 30;
                                    for (int j = -2; j <= 2; j++)
                                    {
                                        Projectile.NewProjectile(bodyPart.Center,
                                                                 6f * bodyPart.DirectionFrom(Main.player[npc.target].Center).RotatedBy(Math.PI / 2 / 4 * j),
                                                                 ModContent.ProjectileType <MoonLordFireball>(), damage, 0f, Main.myPlayer, 20, 20 + 60);
                                    }
                                }
                            }
                            break;

                        case 1:     //ranged
                            for (int j = 0; j < 6; j++)
                            {
                                Vector2 spawn = Main.player[npc.target].Center + 500 * npc.DirectionFrom(Main.player[npc.target].Center).RotatedBy(MathHelper.TwoPi / 6 * (j + 0.5f));
                                Projectile.NewProjectile(spawn, Vector2.Zero, ModContent.ProjectileType <LightningVortexHostile>(), 30, 0f, Main.myPlayer, 1, Main.player[npc.target].DirectionFrom(spawn).ToRotation());
                            }
                            break;

                        case 2:     //magic
                            for (int i = 0; i < 3; i++)
                            {
                                NPC bodyPart = Main.npc[(int)npc.localAI[i]];

                                if (bodyPart.active &&
                                    ((i == 2 && bodyPart.type == NPCID.MoonLordHead) ||
                                     bodyPart.type == NPCID.MoonLordHand))
                                {
                                    int       damage = 35;
                                    const int max    = 6;
                                    for (int j = 0; j < max; j++)
                                    {
                                        int p = Projectile.NewProjectile(bodyPart.Center,
                                                                         2.5f * bodyPart.DirectionFrom(Main.player[npc.target].Center).RotatedBy(Math.PI * 2 / max * (j + 0.5)),
                                                                         ModContent.ProjectileType <MoonLordNebulaBlaze>(), damage, 0f, Main.myPlayer);
                                        if (p != Main.maxProjectiles)
                                        {
                                            Main.projectile[p].timeLeft = 1200;
                                        }
                                    }
                                }
                            }
                            break;

                        case 3:     //summoner
                            for (int i = 0; i < 3; i++)
                            {
                                NPC bodyPart = Main.npc[(int)npc.localAI[i]];

                                if (bodyPart.active &&
                                    ((i == 2 && bodyPart.type == NPCID.MoonLordHead) ||
                                     bodyPart.type == NPCID.MoonLordHand))
                                {
                                    Vector2 speed = Main.player[npc.target].Center - bodyPart.Center;
                                    speed.Normalize();
                                    speed *= 5f;
                                    for (int j = -1; j <= 1; j++)
                                    {
                                        Vector2 vel = speed.RotatedBy(MathHelper.ToRadians(15) * j);
                                        int     n   = NPC.NewNPC((int)bodyPart.Center.X, (int)bodyPart.Center.Y, NPCID.AncientLight, 0, 0f, (Main.rand.NextFloat() - 0.5f) * 0.3f * 6.28318548202515f / 60f, vel.X, vel.Y);
                                        if (n != Main.maxNPCs)
                                        {
                                            Main.npc[n].velocity  = vel;
                                            Main.npc[n].netUpdate = true;
                                            if (Main.netMode == NetmodeID.Server)
                                            {
                                                NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, n);
                                            }
                                        }
                                    }
                                }
                            }
                            break;

                        default:     //phantasmal eye rings
                            if (Main.netMode != NetmodeID.MultiplayerClient)
                            {
                                const int   max              = 4;
                                const int   speed            = 8;
                                const float rotationModifier = 0.5f;
                                int         damage           = 40;
                                float       rotation         = 2f * (float)Math.PI / max;
                                Vector2     vel              = Vector2.UnitY * speed;
                                int         type             = ModContent.ProjectileType <Projectiles.MutantBoss.MutantSphereRing>();
                                for (int i = 0; i < max; i++)
                                {
                                    vel = vel.RotatedBy(rotation);
                                    int p = Projectile.NewProjectile(npc.Center, vel, type, damage, 0f, Main.myPlayer, rotationModifier, speed);
                                    if (p != Main.maxProjectiles)
                                    {
                                        Main.projectile[p].timeLeft = 1800 - VulnerabilityTimer;
                                    }
                                    p = Projectile.NewProjectile(npc.Center, vel, type, damage, 0f, Main.myPlayer, -rotationModifier, speed);
                                    if (p != Main.maxProjectiles)
                                    {
                                        Main.projectile[p].timeLeft = 1800 - VulnerabilityTimer;
                                    }
                                }
                                Main.PlaySound(SoundID.Item84, npc.Center);
                            }
                            break;
                        }
                    }
                }
            }
            else //only when vulnerable
            {
                if (!EnteredPhase2)
                {
                    EnteredPhase2 = true;
                    AttackTimer   = 0;
                    Main.PlaySound(SoundID.Roar, Main.LocalPlayer.Center, 0);
                    npc.netUpdate = true;
                    NetSync(npc);
                }

                Player player = Main.player[npc.target];
                switch (VulnerabilityState)
                {
                case 0:     //melee
                {
                    if (AttackTimer > 30)
                    {
                        AttackTimer -= 300;
                        AttackMemory = AttackMemory == 0 ? 1 : 0;

                        float handToAttackWith = npc.localAI[AttackMemory];
                        if (Main.netMode != NetmodeID.MultiplayerClient)
                        {
                            Projectile.NewProjectile(Main.npc[(int)handToAttackWith].Center, Vector2.Zero, ModContent.ProjectileType <MoonLordSun>(), 60, 0f, Main.myPlayer, npc.whoAmI, handToAttackWith);
                        }
                    }
                }
                break;

                case 1:                    //vortex
                {
                    if (AttackMemory == 0) //spawn the vortex
                    {
                        AttackMemory = 1;
                        for (int i = -1; i <= 1; i += 2)
                        {
                            if (Main.netMode != NetmodeID.MultiplayerClient)
                            {
                                Projectile.NewProjectile(npc.Center, Vector2.Zero, ModContent.ProjectileType <MoonLordVortex>(), 40, 0f, Main.myPlayer, i, npc.whoAmI);
                            }
                        }
                    }
                }
                break;

                case 2:     //nebula
                {
                    if (AttackTimer > 30)
                    {
                        AttackTimer -= 360;

                        for (int i = 0; i < 3; i++)
                        {
                            NPC bodyPart = Main.npc[(int)npc.localAI[i]];
                            int damage   = 35;
                            for (int j = -2; j <= 2; j++)
                            {
                                if (Main.netMode != NetmodeID.MultiplayerClient)
                                {
                                    Projectile.NewProjectile(bodyPart.Center,
                                                             2.5f * bodyPart.DirectionFrom(Main.player[npc.target].Center).RotatedBy(Math.PI / 2 / 2 * (j + Main.rand.NextFloat(-0.25f, 0.25f))),
                                                             ModContent.ProjectileType <MoonLordNebulaBlaze2>(), damage, 0f, Main.myPlayer, npc.whoAmI);
                                }
                            }
                        }
                    }
                }
                break;

                case 3:     //stardust
                {
                    if (AttackTimer > 360)
                    {
                        AttackTimer -= 360;
                        AttackMemory = 0;
                    }

                    float baseRotation = MathHelper.ToRadians(50);
                    if (++AttackMemory == 10)
                    {
                        if (Main.netMode != NetmodeID.MultiplayerClient)
                        {
                            Projectile.NewProjectile(Main.npc[(int)npc.localAI[0]].Center, Main.npc[(int)npc.localAI[0]].DirectionTo(player.Center), ModContent.ProjectileType <PhantasmalDeathrayMLSmall>(),
                                                     60, 0f, Main.myPlayer, baseRotation * Main.rand.NextFloat(0.9f, 1.1f), npc.localAI[0]);
                        }
                    }
                    else if (AttackMemory == 20)
                    {
                        if (Main.netMode != NetmodeID.MultiplayerClient)
                        {
                            Projectile.NewProjectile(Main.npc[(int)npc.localAI[1]].Center, Main.npc[(int)npc.localAI[2]].DirectionTo(player.Center), ModContent.ProjectileType <PhantasmalDeathrayMLSmall>(),
                                                     60, 0f, Main.myPlayer, -baseRotation * Main.rand.NextFloat(0.9f, 1.1f), npc.localAI[1]);
                        }
                    }
                    else if (AttackMemory == 30)
                    {
                        if (Main.netMode != NetmodeID.MultiplayerClient)
                        {
                            Projectile.NewProjectile(Main.npc[(int)npc.localAI[2]].Center, Main.npc[(int)npc.localAI[1]].DirectionTo(player.Center), ModContent.ProjectileType <PhantasmalDeathrayMLSmall>(),
                                                     60, 0f, Main.myPlayer, baseRotation * Main.rand.NextFloat(0.9f, 1.1f), npc.localAI[2]);
                        }
                    }
                    else if (AttackMemory == 40)
                    {
                        if (Main.netMode != NetmodeID.MultiplayerClient)
                        {
                            Projectile.NewProjectile(npc.Center, npc.DirectionTo(player.Center), ModContent.ProjectileType <PhantasmalDeathrayMLSmall>(),
                                                     60, 0f, Main.myPlayer, -baseRotation * Main.rand.NextFloat(0.9f, 1.1f), npc.whoAmI);
                        }
                    }
                }
                break;

                default:                   //any
                {
                    if (AttackMemory == 0) //spawn the moons
                    {
                        AttackMemory = 1;

                        foreach (Projectile p in Main.projectile.Where(p => p.active && p.hostile))
                        {
                            if (p.type == ModContent.ProjectileType <LunarRitual>() && p.ai[1] == npc.whoAmI)        //find my arena
                            {
                                if (Main.netMode != NetmodeID.MultiplayerClient)
                                {
                                    for (int i = 0; i < 4; i++)
                                    {
                                        Projectile.NewProjectile(npc.Center, p.DirectionTo(Main.player[npc.target].Center).RotatedBy(MathHelper.TwoPi / 4 * i), ModContent.ProjectileType <MoonLordMoon>(),
                                                                 60, 0f, Main.myPlayer, p.identity, 1450);
                                    }
                                    for (int i = 0; i < 4; i++)
                                    {
                                        Projectile.NewProjectile(npc.Center, p.DirectionTo(Main.player[npc.target].Center).RotatedBy(MathHelper.TwoPi / 4 * (i + 0.5f)), ModContent.ProjectileType <MoonLordMoon>(),
                                                                 60, 0f, Main.myPlayer, p.identity, -950);
                                    }
                                }
                                break;
                            }
                        }
                    }
                }
                break;
                }
            }

            if (npc.ai[0] == 2f) //moon lord is dead
            {
                VulnerabilityState = 4;
                VulnerabilityTimer = 0;
                AttackTimer        = 0;
            }
            else //moon lord isn't dead
            {
                int increment = (int)Math.Max(1, (1f - (float)npc.life / npc.lifeMax) * 4);
                if (FargoSoulsWorld.MasochistModeReal)
                {
                    increment++;
                }

                VulnerabilityTimer += increment;
                AttackTimer        += increment;

                if (VulnerabilityTimer > 1800)
                {
                    VulnerabilityState = ++VulnerabilityState % 5;

                    VulnerabilityTimer = 0;
                    AttackTimer        = 0;
                    AttackMemory       = 0;

                    npc.netUpdate = true;
                    NetSync(npc);
                }
            }

            switch (VulnerabilityState)
            {
            case 0: Main.monolithType = 3; break;

            case 1: Main.monolithType = 0; break;

            case 2: Main.monolithType = 1; break;

            case 3:
                Main.monolithType = 2;
                if (VulnerabilityTimer < 120)     //so that player isn't punished for using weapons during prior phase
                {
                    Main.LocalPlayer.GetModPlayer <FargoPlayer>().MasomodeMinionNerfTimer = 0;
                }
                break;

            default: break;
            }

            EModeUtils.DropSummon(npc, ModContent.ItemType <CelestialSigil2>(), NPC.downedMoonlord, ref DroppedSummon, NPC.downedAncientCultist);
        }
 public override void OnHitPvp(Player player, Player target, int damage, bool crit)
 {
     target.AddBuff(ModContent.BuffType <Dissolving>(), 120);
 }
Example #8
0
        public override void ModifyHitNPCWithProj(Projectile proj, NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection)
        {
            if (ggEquip && !target.boss)
            {
                crit = true; damage = target.lifeMax;
            }
            if (crit)
            {
                if (dsEquip)
                {
                    player.armorPenetration += 10; target.AddBuff(ModContent.BuffType <Melting>(), 180);
                }
                if (qaEquip)
                {
                    int[] buffchoice = new int[3] {
                        ModContent.BuffType <Shocked>(), ModContent.BuffType <Burning>(), ModContent.BuffType <Melting>()
                    }; target.AddBuff(Main.rand.Next(buffchoice), 220);
                    for (int i = 0; i < 2; i++)
                    {
                        Projectile.NewProjectile(target.Center.X, target.Center.Y, Main.rand.Next(-5, 5), Main.rand.Next(-5, 5), mod.ProjectileType("AntBiterJaws"), 40, 1f, player.whoAmI);
                    }
                }

                player.armorPenetration += criticalArmorPen;
                damage = (int)(damage * criticalDamageMult);
            }


            if ((proj.minion || ProjectileID.Sets.MinionShot[proj.type]) && target.whoAmI == player.MinionAttackTargetNPC)
            {
                damage += summonTagDamage; if (summonTagCrit > 0)
                {
                    if (Main.rand.Next(1, 101) < summonTagCrit)
                    {
                        crit = true;
                    }
                }
            }
        }
Example #9
0
 public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
 {
     target.AddBuff(ModContent.BuffType <Buffs.Masomode.CurseoftheMoon>(), 360);
 }
Example #10
0
        public override void PostUpdateEquips()
        {
            if (ksEquip)
            {
                player.magicCrit += 5; player.thrownCrit += 5; player.meleeCrit += 5; player.rangedCrit += 5; player.GetModPlayer <ReaperPlayer>().reaperCrit += 5;
            }
            if (player.yoyoGlove)
            {
                maxYoyos += 1;
            }
            if (rockArmorSet)
            {
                maxYoyos += 1; maxFlails += 1;
            }
            if (SuperYoyoBag)
            {
                maxYoyos += 3;
            }
            if (toxicArmorSet && Main.rand.Next(0, 60) == 1)
            {
                Projectile.NewProjectile(player.Center.X + Main.rand.Next(-300, 300), player.Center.Y + Main.rand.Next(-200, 200), 0, 0, mod.ProjectileType("ToxicBubble"), 25, 1f, player.whoAmI);
            }
            else if (snakeArmorSet)
            {
                player.buffImmune[BuffID.Poisoned] = true;;
                player.buffImmune[BuffID.Venom]    = true;
                player.buffImmune[ModContent.BuffType <Buffs.Melting>()] = true;

                if (player.ZoneJungle)
                {
                    player.statDefense += 10;
                }
            }
            else if (cloudArmorSet && (player.ownedProjectileCounts[mod.ProjectileType("Sun")] == 0))
            {
                player.AddBuff(mod.BuffType("Sun"), 2); Projectile.NewProjectile(player.Center.X, player.Center.Y - 10, 0, 0, mod.ProjectileType("Sun"), 100, 1f, player.whoAmI);
            }

            else if (galactiteArmorSet && (player.ownedProjectileCounts[mod.ProjectileType("GalactiteStar")] == 0))
            {
                player.AddBuff(mod.BuffType("GalactiteStar"), 2); Projectile.NewProjectile(player.Center.X, player.Center.Y - 10, 0, 0, mod.ProjectileType("GalactiteStar"), 1000, 1f, player.whoAmI);
            }

            if (eocEquip)
            {
                player.nightVision = true; Lighting.AddLight((int)((player.Center.X + (float)(player.width / 2)) / 16f), (int)((player.Center.Y + (float)(player.height / 2)) / 16f), 2f, 2f, 2f); player.magicCrit += 10; player.thrownCrit += 10; player.meleeCrit += 10; player.rangedCrit += 10; player.GetModPlayer <ReaperPlayer>().reaperCrit += 10;
            }
            if (eowEquip)
            {
                player.allDamageMult *= (1f + (critCountResetable * 0.0025f));
            }
            if (eowEquip || bocEquip || fdEquip)
            {
                player.AddBuff(ModContent.BuffType <CritCounter>(), 2);
            }
            if (rmEquip)
            {
                player.statDefense += 20;
            }
            if (bocEquip)
            {
                lifeSteal += (0.01f * critCountResetable);
            }
            if (tfEquip)
            {
                player.buffImmune[BuffID.Poisoned] = true;;
                player.buffImmune[BuffID.Venom]    = true;
                player.buffImmune[ModContent.BuffType <Buffs.Melting>()] = true;
                if (player.ZoneJungle)
                {
                    player.statDefense += 25;
                }
            }
            if (wofEquip)
            {
                criticalDamageMult += 0.15f; criticalArmorPen += 10;
            }
            if (tvEquip)
            {
                criticalDamageMult += 0.1f;
            }
            if (ksEquip)
            {
                criticalArmorPen += 8;
            }
            if (qbEquip)
            {
                player.honey = true; player.strongBees = true; player.bee = true; player.beeDamage(35); player.beeKB(3);
            }
            if (skEquip)
            {
                player.lavaImmune = true; player.gills = true; player.accFlipper = true; if (player.lavaWet)
                {
                    player.ignoreWater = true; player.moveSpeed *= 3; player.statDefense += 25; player.allDamageMult *= 1.35f;
                }
            }
            if (ifEquip)
            {
                freezeCounterMax = 2800; if (freezecounter < freezeCounterMax)
                {
                    freezecounter += 1;
                }
                else
                {
                    int dustid = Dust.NewDust(player.position, player.width, player.height, DustID.Ice); Main.dust[dustid].noGravity = true;
                }
            }


            if (ptEquip && Main.rand.Next(0, 20) == 1)
            {
                Projectile.NewProjectile(player.Center.X + Main.rand.Next(-400, 400), player.Center.Y + Main.rand.Next(-400, 400), 0, 0, mod.ProjectileType("Bulb"), 0, 1f, player.whoAmI);
            }
            if (gmEquip)
            {
                player.armorPenetration += 15; player.lifeSteal += 0.05f; player.shinyStone = true;
            }
            if (clEquip)
            {
                if (Main.dayTime)
                {
                    player.allDamageMult *= 1.25f;
                }
                else
                {
                    player.statDefense += 30; player.statLifeMax2 += 75;
                }
            }
            if (lcEquip)
            {
                if (NPC.LunarApocalypseIsUp)
                {
                    lifeSteal += 1f; player.longInvince = true; player.shadowDodge = true;
                }
            }
            if (mlEquip)
            {
                player.maxRunSpeed *= 2; player.moveSpeed *= 2; player.maxMinions += 2; player.allDamageMult *= 1.2f; player.jumpSpeedBoost *= 2; player.statDefense += 20;
            }
            if (dfEquip)
            {
                player.wingTime = 1; player.magicQuiver = true; player.frostArmor = true;
            }
            if (fdEquip)
            {
                player.blackBelt = true; player.allDamageMult *= (1f + (critCountResetable * 0.003f)); lifeSteal += (0.01f * critCountResetable); player.statDefense += critCountResetable; player.statLifeMax2 += critCountResetable; player.statManaMax2 += critCountResetable;
            }
            if (spEquip && player.HasBuff(mod.BuffType("Shielded")))
            {
                player.statDefense += (int)((float)player.statDefense * (0.5f + (0.1f * (float)defenseLevel)));
            }
        }
Example #11
0
        public override void ModifyHitNPC(Item item, NPC target, ref int damage, ref float knockback, ref bool crit)
        {
            if (crit)
            {
                if (dsEquip)
                {
                    player.armorPenetration += 10; target.AddBuff(ModContent.BuffType <Melting>(), 180);
                }
                if (qaEquip)
                {
                    int[] buffchoice = new int[3] {
                        ModContent.BuffType <Shocked>(), ModContent.BuffType <Burning>(), ModContent.BuffType <Melting>()
                    }; target.AddBuff(Main.rand.Next(buffchoice), 220);
                    for (int i = 0; i < 2; i++)
                    {
                        Projectile.NewProjectile(target.Center.X, target.Center.Y, Main.rand.Next(-5, 5), Main.rand.Next(-5, 5), mod.ProjectileType("AntBiterJaws"), 40, 1f, player.whoAmI);
                    }
                }

                player.armorPenetration += criticalArmorPen;
                damage = (int)(damage * criticalDamageMult);
            }
        }
Example #12
0
        public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
        {
            int buffType = ModContent.BuffType <WarnedBuff>();

            target.AddBuff(buffType, 5 * 60, target.HasBuff(buffType));
        }
 public override void OnHitPlayer(Player target, int damage, bool crit)
 {
     target.AddBuff(ModContent.BuffType <PerilCorrosion>(), 300);
 }
Example #14
0
 public override bool UseItem(Player player)
 {
     Main.PlaySound(SoundID.Pixie, player.position);
     player.AddBuff(ModContent.BuffType <Buffs.Ghost.Ghost> (), 30);
     return(true);
 }
Example #15
0
 public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
 {
     target.AddBuff(ModContent.BuffType <Buffs.HydraToxin>(), 150);
     target.AddBuff(ModContent.BuffType <Buffs.DragonFire>(), 150);
 }
Example #16
0
        public override void OnHitPlayer(NPC npc, Player target, int damage, bool crit)
        {
            base.OnHitPlayer(npc, target, damage, crit);

            target.AddBuff(ModContent.BuffType <Bloodthirsty>(), 180);
        }
Example #17
0
 public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)           // TODO: Add OnHitPlayer method for PVP?
 {
     target.AddBuff(ModContent.BuffType <Buffs.HolyFlames>(), 480, true);
 }
 public override bool UseItem(Player player)
 {
     player.AddBuff(ModContent.BuffType <ThrowingPowerPotionBuff>(), 5 * 60 * 60, true);
     return(true);
 }
Example #19
0
        public override bool?CanBeHitByItem(NPC npc, Player player, Item item)
        {
            int masoStateML = GetVulnerabilityState(npc);

            if (item.melee && masoStateML > 0 && masoStateML < 4 && !player.buffImmune[ModContent.BuffType <NullificationCurse>()] && !FargoSoulsWorld.SwarmActive)
            {
                return(false);
            }

            return(base.CanBeHitByItem(npc, player, item));
        }
Example #20
0
 public override bool CanUseItem(Player player)
 {
     return(!player.HasBuff(ModContent.BuffType <Buffs.ActionCooldown>()));
 }
Example #21
0
        public override void AI()
        {
            projectile.timeLeft = 9999;
            Lighting.AddLight(projectile.Center, 0.9f, 0.9f, 0.9f);
            Player owner = Main.player[projectile.owner];

            if (!owner.active || owner.dead || owner.ghost)
            {
                projectile.Kill();
                return;
            }
            if (owner.HeldItem.type != ModContent.ItemType <DaCapoItem>())
            {
                projectile.Kill();
                return;
            }
            if (!RightClickChannel(owner))
            {
                projectile.Kill();
                return;
            }
            owner.itemTime      = 2;
            owner.itemAnimation = 2;
            owner.heldProj      = projectile.whoAmI;
            int   dir = owner.direction;
            float rot = dir < 0 ? MathHelper.Pi : 0;

            owner.itemRotation = (float)Math.Atan2(rot.ToRotationVector2().Y *dir * 3, rot.ToRotationVector2().X *dir);
            owner.velocity     = Vector2.Zero;
            projectile.Center  = owner.Center - new Vector2(owner.direction, 0);

            projectile.ai[0]++;
            DaCapoPlayer daCapoPlayer = owner.GetModPlayer <DaCapoPlayer>();

            if (projectile.ai[0] < DaCapoTime.Movement1Begin)          //准备时无敌
            {
                daCapoPlayer.CurrentPlayingMusic = MusicType.Beginning;
                owner.GetModPlayer <DaCapoPlayer>().DaCapoImmune = DamageType.All;
            }
            else if (projectile.ai[0] < DaCapoTime.Movement2Begin)     //第一乐章免疫弹幕
            {
                daCapoPlayer.CurrentPlayingMusic = MusicType.Movement1;
                owner.GetModPlayer <DaCapoPlayer>().DaCapoImmune = DamageType.Projectile;
                owner.AddBuff(ModContent.BuffType <DaCapoMovement1Buff>(), 2);
            }
            else if (projectile.ai[0] < DaCapoTime.Movement3Begin)     //第二乐章免疫近战
            {
                daCapoPlayer.CurrentPlayingMusic = MusicType.Movement2;
                owner.GetModPlayer <DaCapoPlayer>().DaCapoImmune = DamageType.Melee;
                owner.AddBuff(ModContent.BuffType <DaCapoMovement2Buff>(), 2);
            }
            else if (projectile.ai[0] < DaCapoTime.Movement4Begin)       //第三乐章免疫弹幕
            {
                daCapoPlayer.CurrentPlayingMusic = MusicType.Movement3;
                owner.GetModPlayer <DaCapoPlayer>().DaCapoImmune = DamageType.Projectile;
                owner.AddBuff(ModContent.BuffType <DaCapoMovement3Buff>(), 2);
            }
            else if (projectile.ai[0] < DaCapoTime.FinalBegin)        //第四乐章免疫近战
            {
                daCapoPlayer.CurrentPlayingMusic = MusicType.Movement4;
                owner.GetModPlayer <DaCapoPlayer>().DaCapoImmune = DamageType.Melee;
                owner.AddBuff(ModContent.BuffType <DaCapoMovement4Buff>(), 2);
            }
            else                                     //终曲全免
            {
                owner.GetModPlayer <DaCapoPlayer>().DaCapoImmune = DamageType.All;
                if (projectile.ai[0] < DaCapoTime.FinalDamage)
                {
                    owner.GetModPlayer <CurtainPlayer>().ShakeScreen = true;
                    daCapoPlayer.CurrentPlayingMusic = MusicType.Final1;
                    owner.AddBuff(ModContent.BuffType <DaCapoFinalBuff>(), 2);
                }
                else if (projectile.ai[0] < DaCapoTime.EndClap)
                {
                    owner.GetModPlayer <CurtainPlayer>().ShakeScreen = true;
                    daCapoPlayer.CurrentPlayingMusic = MusicType.Final2;
                    owner.AddBuff(ModContent.BuffType <DaCapoFinalBuff>(), 2);
                }
                else
                {
                    daCapoPlayer.CurrentPlayingMusic = MusicType.End;
                }
            }

            if (projectile.ai[0] == DaCapoTime.Movement1Begin - 120)
            {
                Projectile.NewProjectile(owner.Bottom + new Vector2(-100, 5), Vector2.Zero, ModContent.ProjectileType <FirstChair>(), 0, 0, owner.whoAmI);
            }
            if (projectile.ai[0] == DaCapoTime.Movement1Begin)    //第一乐章     //150
            {
                CurtainPlayer.SetTitle(1);
                Projectile.NewProjectile(owner.Center, Vector2.Zero, ModContent.ProjectileType <MusicRing1>(), projectile.damage, 0, owner.whoAmI);
            }
            if (projectile.ai[0] == DaCapoTime.Movement2Begin - 120)
            {
                Projectile.NewProjectile(owner.Bottom + new Vector2(100, 5), Vector2.Zero, ModContent.ProjectileType <SecondChair>(), 0, 0, owner.whoAmI);
            }
            if (projectile.ai[0] == DaCapoTime.Movement2Begin)    //第二乐章
            {
                CurtainPlayer.SetTitle(2);
                Projectile.NewProjectile(owner.Center, Vector2.Zero, ModContent.ProjectileType <MusicRing2>(), projectile.damage, 0, owner.whoAmI);
            }
            if (projectile.ai[0] == DaCapoTime.Movement3Begin - 120)
            {
                Projectile.NewProjectile(owner.Bottom + new Vector2(-60, 5), Vector2.Zero, ModContent.ProjectileType <ThirdChair>(), 0, 0, owner.whoAmI);
            }
            if (projectile.ai[0] == DaCapoTime.Movement3Begin)     //第三乐章
            {
                CurtainPlayer.SetTitle(3);
                Projectile.NewProjectile(owner.Center, Vector2.Zero, ModContent.ProjectileType <MusicRing3>(), projectile.damage, 0, owner.whoAmI);
            }
            if (projectile.ai[0] == DaCapoTime.Movement4Begin - 120)
            {
                Projectile.NewProjectile(owner.Bottom + new Vector2(60, 5), Vector2.Zero, ModContent.ProjectileType <FourthChair>(), 0, 0, owner.whoAmI);
            }
            if (projectile.ai[0] == DaCapoTime.Movement4Begin)       //第四乐章
            {
                CurtainPlayer.SetTitle(4);
                Projectile.NewProjectile(owner.Center, Vector2.Zero, ModContent.ProjectileType <MusicRing4>(), projectile.damage, 0, owner.whoAmI);
            }
            if (projectile.ai[0] == DaCapoTime.FinalBegin)         //终曲(出现字幕)1
            {
                CurtainPlayer.SetTitle(5);
                //CurtainPlayer.Finale(owner);
                BaseChair.EnterFinal();
            }
            if (projectile.ai[0] == DaCapoTime.FinalDamage)           //音乐开始扭曲2
            {
                CurtainPlayer.Finale(owner);
            }
            if (projectile.ai[0] == DaCapoTime.FinalDamage + 3)           //最终伤害
            {
                int protmp = Projectile.NewProjectile(Main.screenPosition, Vector2.Zero, ModContent.ProjectileType <MusicFinalDamage>(), projectile.damage * 60, 0, owner.whoAmI);
                Main.projectile[protmp].width  = Main.screenWidth;
                Main.projectile[protmp].height = Main.screenHeight;
            }
            if (projectile.ai[0] == DaCapoTime.EndClap)          //闭幕
            {
                CurtainPlayer.FinaleCurtain(owner);
            }
            if (projectile.ai[0] == DaCapoTime.End - 10)           //(提前十帧结束)
            {
                projectile.Kill();
                owner.itemTime      = 10;
                owner.itemAnimation = 10;
                return;
            }
        }
Example #22
0
 public override bool ConsumeItem(Player player)
 {
     player.AddBuff(ModContent.BuffType <ActionCooldown>(), 30 * 60);
     return(true);
 }
Example #23
0
        public override void PostUpdateEquips()
        {
            _combatTime--;
            if (_combatTime < 0)
            {
                _combatTime = 0;
            }
            if (_combatTime > 300)
            {
                _combatTime = 300;
            }

            float rotSpeed = player.velocity.Length() * 0.15f * (Math.Max(60, _combatTime) / 6f);

            if (!HasRuneCircle && _circle != null)
            {
                player.GetModPlayer <ExtraDrawOnPlayer>().DrawDict.Add(delegate(SpriteBatch sB) { DrawBloom(sB); }, ExtraDrawOnPlayer.DrawType.Additive);
                player.GetModPlayer <ExtraDrawOnPlayer>().DrawDict.Add(delegate(SpriteBatch sB) { DrawRuneCircle(sB); }, ExtraDrawOnPlayer.DrawType.AlphaBlend);
                _circle.Update(rotSpeed, player.direction, 0.2f, true);

                if (_circle.Dead)
                {
                    _circle = null;
                }
            }

            if (HasRuneCircle)
            {
                player.GetModPlayer <ExtraDrawOnPlayer>().DrawDict.Add(delegate(SpriteBatch sB) { DrawBloom(sB); }, ExtraDrawOnPlayer.DrawType.Additive);
                player.GetModPlayer <ExtraDrawOnPlayer>().DrawDict.Add(delegate(SpriteBatch sB) { DrawRuneCircle(sB); }, ExtraDrawOnPlayer.DrawType.AlphaBlend);

                float opacity = Math.Min(((_combatTime + 50) / 250f) + 0.05f, 0.7f);
                if (_circle == null)
                {
                    _circle = new RuneCircle(MAXRADIUS, MAXRADIUS * 0.8f, 12, 8);
                }
                else
                {
                    _circle.Update(rotSpeed, player.direction, opacity);
                }

                for (int i = 0; i < Main.maxNPCs; ++i)
                {
                    NPC npc = Main.npc[i];
                    if (npc != null && npc.active && npc.CanBeChasedBy(this) && npc.Distance(player.MountedCenter) < MAXRADIUS)
                    {
                        _combatTime++;

                        npc.AddBuff(ModContent.BuffType <RunicSiphon>(), 2);

                        if (Main.rand.NextBool(10))
                        {
                            Vector2 position = Main.rand.NextVector2CircularEdge(2.5f, 2.5f) + (npc.DirectionTo(player.MountedCenter) * npc.Distance(player.MountedCenter) / 60f);
                            ParticleHandler.SpawnParticle(new GlowParticle(npc.Center, position, new Color(252, 3, 102), Main.rand.NextFloat(0.08f, 0.1f), 60));
                        }
                    }
                }
            }

            _flashTime = Math.Max(_flashTime - 1, 0);
        }
Example #24
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)
 {
     player.AddBuff(ModContent.BuffType <ActionCooldown>(), 30 * 60);
     return(base.Shoot(player, ref position, ref speedX, ref speedY, ref type, ref damage, ref knockBack));
 }
Example #25
0
 public override bool UseItem(Player player)
 {
     player.AddBuff(ModContent.BuffType <Rubrum>(), 5 * 60 * 60, true);
     return(true);
 }
        public override void UpdateAccessory(Player player, bool hideVisual)
        {
            if (!Fargowiltas.Instance.CalamityLoaded)
            {
                return;
            }

            if (SoulConfig.Instance.GetValue(SoulConfig.Instance.calamityToggles.ShellfishMinion))
            {
                //set bonus clams
                calamity.Call("SetSetBonus", player, "mollusk", true);
                player.maxMinions += 4;
                if (player.whoAmI == Main.myPlayer)
                {
                    if (player.FindBuffIndex(calamity.BuffType("Shellfish")) == -1)
                    {
                        player.AddBuff(calamity.BuffType("Shellfish"), 3600, true);
                    }
                    if (player.ownedProjectileCounts[calamity.ProjectileType("Shellfish")] < 2)
                    {
                        Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, calamity.ProjectileType("Shellfish"), (int)(1500.0 * (double)player.minionDamage), 0f, Main.myPlayer, 0f, 0f);
                    }
                }
            }

            if (SoulConfig.Instance.GetValue(SoulConfig.Instance.calamityToggles.GiantPearl))
            {
                calamity.GetItem("GiantPearl").UpdateAccessory(player, hideVisual);
            }

            if (SoulConfig.Instance.GetValue(SoulConfig.Instance.calamityToggles.AmidiasPendant))
            {
                calamity.GetItem("AmidiasPendant").UpdateAccessory(player, hideVisual);
            }

            calamity.GetItem("AquaticEmblem").UpdateAccessory(player, hideVisual);
            calamity.GetItem("EnchantedPearl").UpdateAccessory(player, hideVisual);
            mod.GetItem("VictideEnchant").UpdateAccessory(player, hideVisual);

            FargoPlayer fargoPlayer = player.GetModPlayer <FargoPlayer>();

            fargoPlayer.MolluskEnchant = true;
            fargoPlayer.AddPet(SoulConfig.Instance.calamityToggles.GhostBellPet, hideVisual, ModContent.BuffType <BabyGhostBellBuff>(), ModContent.ProjectileType <BabyGhostBell>());
        }
 public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
 {
     target.AddBuff(ModContent.BuffType <WhiteFlames>(), 300);
     target.immune[projectile.owner] = 4;
 }
        public override void UpdateAccessory(Player player, bool hideVisual)
        {
            FargoPlayer fargoPlayer = player.GetModPlayer <FargoPlayer>();

            fargoPlayer.MasochistSoul = true;

            player.AddBuff(mod.BuffType("SouloftheMasochist"), 2);

            //stat modifiers
            fargoPlayer.AllDamageUp(.5f);
            player.endurance             += 0.1f;
            player.maxMinions            += 10;
            player.maxTurrets            += 10;
            player.armorPenetration      += 50;
            player.statLifeMax2          += player.statLifeMax;
            player.lifeRegen             += 7;
            player.lifeRegenTime         += 7;
            player.lifeRegenCount        += 7;
            fargoPlayer.wingTimeModifier += 2f;
            player.moveSpeed             += 0.2f;

            //slimy shield
            player.buffImmune[BuffID.Slimed] = true;

            if (SoulConfig.Instance.GetValue(SoulConfig.Instance.SlimyFalling))
            {
                player.maxFallSpeed *= 1.5f;
            }

            if (SoulConfig.Instance.GetValue(SoulConfig.Instance.SlimyShield))
            {
                fargoPlayer.SlimyShield = true;
            }

            //agitating lens
            fargoPlayer.AgitatingLens = true;

            //queen stinger
            //player.honey = true;
            player.npcTypeNoAggro[210] = true;
            player.npcTypeNoAggro[211] = true;
            player.npcTypeNoAggro[42]  = true;
            player.npcTypeNoAggro[176] = true;
            player.npcTypeNoAggro[231] = true;
            player.npcTypeNoAggro[232] = true;
            player.npcTypeNoAggro[233] = true;
            player.npcTypeNoAggro[234] = true;
            player.npcTypeNoAggro[235] = true;
            fargoPlayer.QueenStinger   = true;

            //necromantic brew
            fargoPlayer.NecromanticBrew = true;

            //supreme deathbringer fairy
            fargoPlayer.SupremeDeathbringerFairy = true;

            //pure heart
            fargoPlayer.PureHeart = true;

            //corrupt heart
            fargoPlayer.CorruptHeart = true;
            if (fargoPlayer.CorruptHeartCD > 0)
            {
                fargoPlayer.CorruptHeartCD -= 2;
            }

            //gutted heart
            fargoPlayer.GuttedHeart    = true;
            fargoPlayer.GuttedHeartCD -= 2; //faster spawns

            //mutant antibodies
            player.buffImmune[BuffID.Wet]    = true;
            player.buffImmune[BuffID.Rabies] = true;
            fargoPlayer.MutantAntibodies     = true;
            if (player.mount.Active && player.mount.Type == MountID.CuteFishron)
            {
                player.dripping = true;
            }

            //lump of flesh
            player.buffImmune[BuffID.Blackout]   = true;
            player.buffImmune[BuffID.Obstructed] = true;
            player.buffImmune[BuffID.Dazed]      = true;
            fargoPlayer.SkullCharm = true;
            if (!player.ZoneDungeon)
            {
                player.npcTypeNoAggro[NPCID.SkeletonSniper]       = true;
                player.npcTypeNoAggro[NPCID.SkeletonCommando]     = true;
                player.npcTypeNoAggro[NPCID.TacticalSkeleton]     = true;
                player.npcTypeNoAggro[NPCID.DiabolistRed]         = true;
                player.npcTypeNoAggro[NPCID.DiabolistWhite]       = true;
                player.npcTypeNoAggro[NPCID.Necromancer]          = true;
                player.npcTypeNoAggro[NPCID.NecromancerArmored]   = true;
                player.npcTypeNoAggro[NPCID.RaggedCaster]         = true;
                player.npcTypeNoAggro[NPCID.RaggedCasterOpenCoat] = true;
            }

            //sinister icon
            if (SoulConfig.Instance.GetValue(SoulConfig.Instance.SinisterIcon))
            {
                fargoPlayer.SinisterIcon = true;
            }
            if (SoulConfig.Instance.GetValue(SoulConfig.Instance.SinisterIconDrops))
            {
                fargoPlayer.SinisterIconDrops = true;
            }

            //sparkling adoration

            /*if (SoulConfig.Instance.GetValue(SoulConfig.Instance.Graze, false))
             *  player.GetModPlayer<FargoPlayer>().Graze = true;
             *
             * if (SoulConfig.Instance.GetValue(SoulConfig.Instance.DevianttHearts))
             *  player.GetModPlayer<FargoPlayer>().DevianttHearts = true;*/

            //dragon fang
            if (SoulConfig.Instance.GetValue(SoulConfig.Instance.DragonFang))
            {
                fargoPlayer.DragonFang = true;
            }

            //frigid gemstone
            player.buffImmune[BuffID.Frostburn] = true;
            if (SoulConfig.Instance.GetValue(SoulConfig.Instance.FrigidGemstone))
            {
                fargoPlayer.FrigidGemstone = true;
                if (fargoPlayer.FrigidGemstoneCD > 0)
                {
                    fargoPlayer.FrigidGemstoneCD -= 5;
                }
            }

            //wretched pouch
            player.buffImmune[BuffID.ShadowFlame]             = true;
            player.buffImmune[mod.BuffType("Shadowflame")]    = true;
            player.GetModPlayer <FargoPlayer>().WretchedPouch = true;

            //sands of time
            player.buffImmune[BuffID.WindPushed] = true;
            fargoPlayer.SandsofTime = true;

            //mystic skull
            player.buffImmune[BuffID.Suffocation] = true;
            player.manaFlower = true;

            //security wallet
            fargoPlayer.SecurityWallet = true;

            //carrot
            player.nightVision = true;
            if (SoulConfig.Instance.GetValue(SoulConfig.Instance.Carrot, false))
            {
                player.scope = true;
            }

            //squeaky toy
            fargoPlayer.SqueakyAcc = true;

            //tribal charm
            player.buffImmune[BuffID.Webbed] = true;
            fargoPlayer.TribalCharm          = true;

            //nymph's perfume
            player.buffImmune[BuffID.Lovestruck] = true;
            player.buffImmune[BuffID.Stinky]     = true;
            fargoPlayer.NymphsPerfumeRespawn     = true;
            if (SoulConfig.Instance.GetValue(SoulConfig.Instance.NymphPerfume))
            {
                fargoPlayer.NymphsPerfume = true;
                if (fargoPlayer.NymphsPerfumeCD > 0)
                {
                    fargoPlayer.NymphsPerfumeCD -= 10;
                }
            }

            //tim's concoction
            if (SoulConfig.Instance.GetValue(SoulConfig.Instance.TimsConcoction))
            {
                player.GetModPlayer <FargoPlayer>().TimsConcoction = true;
            }

            //dubious circuitry
            player.buffImmune[BuffID.CursedInferno] = true;
            player.buffImmune[BuffID.Ichor]         = true;
            fargoPlayer.FusedLens   = true;
            fargoPlayer.GroundStick = true;
            player.noKnockback      = true;

            //magical bulb
            player.buffImmune[BuffID.Venom] = true;

            //ice queen's crown
            player.buffImmune[BuffID.Frozen] = true;

            //lihzahrd treasure
            player.buffImmune[BuffID.Burning] = true;
            fargoPlayer.LihzahrdTreasureBox   = true;

            //saucer control console
            player.buffImmune[BuffID.Electrified] = true;

            //betsy's heart
            player.buffImmune[BuffID.OgreSpit]       = true;
            player.buffImmune[BuffID.WitheredWeapon] = true;
            player.buffImmune[BuffID.WitheredArmor]  = true;
            fargoPlayer.BetsysHeart = true;

            //celestial rune/pumpking's cape
            fargoPlayer.CelestialRune     = true;
            fargoPlayer.PumpkingsCape     = true;
            fargoPlayer.AdditionalAttacks = true;
            if (fargoPlayer.AdditionalAttacksTimer > 0)
            {
                fargoPlayer.AdditionalAttacksTimer -= 2;
            }

            //chalice
            fargoPlayer.MoonChalice = true;

            //galactic globe
            player.buffImmune[BuffID.VortexDebuff] = true;
            //player.buffImmune[BuffID.ChaosState] = true;
            fargoPlayer.GravityGlobeEX = true;
            if (SoulConfig.Instance.GetValue(SoulConfig.Instance.GravityControl))
            {
                player.gravControl = true;
            }

            //heart of maso
            fargoPlayer.MasochistHeart          = true;
            player.buffImmune[BuffID.MoonLeech] = true;

            //cyclonic fin

            /*fargoPlayer.CyclonicFin = true;
            *  if (fargoPlayer.CyclonicFinCD > 0)
            *   fargoPlayer.CyclonicFinCD -= 2;*/
            /*if (player.mount.Active && player.mount.Type == MountID.CuteFishron)
             * {
             *  if (player.ownedProjectileCounts[mod.ProjectileType("CuteFishronRitual")] < 1 && player.whoAmI == Main.myPlayer)
             *      Projectile.NewProjectile(player.MountedCenter, Vector2.Zero, mod.ProjectileType("CuteFishronRitual"), 0, 0f, Main.myPlayer);
             *  player.MountFishronSpecialCounter = 300;
             *  player.meleeDamage += 0.15f;
             *  player.rangedDamage += 0.15f;
             *  player.magicDamage += 0.15f;
             *  player.minionDamage += 0.15f;
             *  player.meleeCrit += 30;
             *  player.rangedCrit += 30;
             *  player.magicCrit += 30;
             *  player.statDefense += 30;
             *  player.lifeRegen += 3;
             *  player.lifeRegenCount += 3;
             *  player.lifeRegenTime += 3;
             *  if (player.controlLeft == player.controlRight)
             *  {
             *      if (player.velocity.X != 0)
             *          player.velocity.X -= player.mount.Acceleration * Math.Sign(player.velocity.X);
             *      if (player.velocity.X != 0)
             *          player.velocity.X -= player.mount.Acceleration * Math.Sign(player.velocity.X);
             *  }
             *  else if (player.controlLeft)
             *  {
             *      player.velocity.X -= player.mount.Acceleration * 4f;
             *      if (player.velocity.X < -16f)
             *          player.velocity.X = -16f;
             *      if (!player.controlUseItem)
             *          player.direction = -1;
             *  }
             *  else if (player.controlRight)
             *  {
             *      player.velocity.X += player.mount.Acceleration * 4f;
             *      if (player.velocity.X > 16f)
             *          player.velocity.X = 16f;
             *      if (!player.controlUseItem)
             *          player.direction = 1;
             *  }
             *  if (player.controlUp == player.controlDown)
             *  {
             *      if (player.velocity.Y != 0)
             *          player.velocity.Y -= player.mount.Acceleration * Math.Sign(player.velocity.Y);
             *      if (player.velocity.Y != 0)
             *          player.velocity.Y -= player.mount.Acceleration * Math.Sign(player.velocity.Y);
             *  }
             *  else if (player.controlUp)
             *  {
             *      player.velocity.Y -= player.mount.Acceleration * 4f;
             *      if (player.velocity.Y < -16f)
             *          player.velocity.Y = -16f;
             *  }
             *  else if (player.controlDown)
             *  {
             *      player.velocity.Y += player.mount.Acceleration * 4f;
             *      if (player.velocity.Y > 16f)
             *          player.velocity.Y = 16f;
             *  }
             * }*/

            //sadism
            player.buffImmune[ModContent.BuffType <Antisocial>()]          = true;
            player.buffImmune[ModContent.BuffType <Atrophied>()]           = true;
            player.buffImmune[ModContent.BuffType <Berserked>()]           = true;
            player.buffImmune[ModContent.BuffType <Bloodthirsty>()]        = true;
            player.buffImmune[ModContent.BuffType <ClippedWings>()]        = true;
            player.buffImmune[ModContent.BuffType <Crippled>()]            = true;
            player.buffImmune[ModContent.BuffType <CurseoftheMoon>()]      = true;
            player.buffImmune[ModContent.BuffType <Defenseless>()]         = true;
            player.buffImmune[ModContent.BuffType <FlamesoftheUniverse>()] = true;
            player.buffImmune[ModContent.BuffType <Flipped>()]             = true;
            player.buffImmune[ModContent.BuffType <FlippedHallow>()]       = true;
            player.buffImmune[ModContent.BuffType <Fused>()]              = true;
            player.buffImmune[ModContent.BuffType <GodEater>()]           = true;
            player.buffImmune[ModContent.BuffType <Guilty>()]             = true;
            player.buffImmune[ModContent.BuffType <Hexed>()]              = true;
            player.buffImmune[ModContent.BuffType <Infested>()]           = true;
            player.buffImmune[ModContent.BuffType <IvyVenom>()]           = true;
            player.buffImmune[ModContent.BuffType <Jammed>()]             = true;
            player.buffImmune[ModContent.BuffType <Lethargic>()]          = true;
            player.buffImmune[ModContent.BuffType <LihzahrdCurse>()]      = true;
            player.buffImmune[ModContent.BuffType <LightningRod>()]       = true;
            player.buffImmune[ModContent.BuffType <LivingWasteland>()]    = true;
            player.buffImmune[ModContent.BuffType <Lovestruck>()]         = true;
            player.buffImmune[ModContent.BuffType <LowGround>()]          = true;
            player.buffImmune[ModContent.BuffType <MarkedforDeath>()]     = true;
            player.buffImmune[ModContent.BuffType <Midas>()]              = true;
            player.buffImmune[ModContent.BuffType <MutantNibble>()]       = true;
            player.buffImmune[ModContent.BuffType <NanoInjection>()]      = true;
            player.buffImmune[ModContent.BuffType <NullificationCurse>()] = true;
            player.buffImmune[ModContent.BuffType <Oiled>()]              = true;
            player.buffImmune[ModContent.BuffType <OceanicMaul>()]        = true;
            player.buffImmune[ModContent.BuffType <Purified>()]           = true;
            player.buffImmune[ModContent.BuffType <ReverseManaFlow>()]    = true;
            player.buffImmune[ModContent.BuffType <Rotting>()]            = true;
            player.buffImmune[ModContent.BuffType <Shadowflame>()]        = true;
            player.buffImmune[ModContent.BuffType <SqueakyToy>()]         = true;
            player.buffImmune[ModContent.BuffType <Swarming>()]           = true;
            player.buffImmune[ModContent.BuffType <Stunned>()]            = true;
            player.buffImmune[ModContent.BuffType <Unstable>()]           = true;
        }
Example #29
0
 public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
 {
     target.AddBuff(ModContent.BuffType <CurseoftheMoon>(), 600);
     target.immune[projectile.owner] = 1;
 }
Example #30
0
 public override bool CanUseItem(Player player)
 {
     return(!player.HasBuff(ModContent.BuffType <Buffs.Light.Light> ()));
 }