public override void UpdateAccessory(Player player, bool hideVisual)
        {
            VampirePlayer vPlayer = player.GetModPlayer <VampirePlayer>();

            vPlayer.noSunBurning = true;
            player.GetModPlayer <MyPlayer>().blackUmbrellaEquipped = true;
        }
Beispiel #2
0
        public override void Update(Player player, ref int buffIndex)
        {
            VampirePlayer vPlayer = player.GetModPlayer <VampirePlayer>();

            if (!vPlayer.weakenedSunBurning)
            {
                if (player.lifeRegen > 0)
                {
                    player.lifeRegen = 0;
                }
                player.lifeRegenTime = 0;
                player.lifeRegen    -= 60;  //losing 30 health
                player.moveSpeed    *= 0.5f;
            }
            else
            {
                if (player.lifeRegen > 0)
                {
                    player.lifeRegen = 0;
                }
                player.lifeRegenTime = 160;
                player.lifeRegen    -= 10;
            }

            if (Main.rand.Next(0, 2) == 0)
            {
                Dust.NewDust(player.position, player.width, player.height, 169, player.velocity.X * -0.5f, player.velocity.Y * -0.5f);
            }
        }
Beispiel #3
0
        public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
        {
            Player        player  = Main.player[projectile.owner];
            VampirePlayer vPlayer = player.GetModPlayer <VampirePlayer>();

            player.velocity.X *= 0.5f;

            vPlayer.StealHealthFrom(target, damage);
        }
        public override void UpdateArmorSet(Player player)
        {
            VampirePlayer vPlayer = player.GetModPlayer <VampirePlayer>();

            player.setBonus     = "Your physical abilities have been boosted.";
            player.moveSpeed   += 0.3f;
            player.maxRunSpeed += 0.3f;
            player.meleeSpeed  += 0.3f;
            vPlayer.vampiricDamageMultiplier += 0.03f;
            player.jumpBoost       = true;
            player.jumpSpeedBoost += 0.2f;
        }
Beispiel #5
0
        public override void Update(Player player, ref int buffIndex)
        {
            VampirePlayer vPlayer = player.GetModPlayer <VampirePlayer>();

            if (!buried && WorldGen.SolidTile((int)player.position.X / 16, ((int)player.position.Y / 16) + 4))
            {
                player.position.Y += 10f;
                buried             = true;
            }

            player.lifeRegenCount  -= 10;
            player.dash             = 0;
            player.controlUseItem   = false;
            player.bodyVelocity     = Vector2.Zero;
            player.controlLeft      = false;
            player.controlJump      = false;
            player.controlRight     = false;
            player.controlDown      = false;
            player.controlQuickHeal = false;
            player.controlQuickMana = false;
            player.controlRight     = false;
            player.controlUseTile   = false;
            player.controlUp        = false;
            player.maxRunSpeed      = 0f;
            player.moveSpeed        = 0f;

            vPlayer.dyingVampire       = true;
            vPlayer.vampire            = true;
            player.buffTime[buffIndex] = 2;

            if (player.whoAmI == Main.myPlayer)
            {
                if (Main.mouseLeft)
                {
                    SRSETimer++;
                    Dust.NewDust(player.Center + new Vector2(0f, -6f), 2, 2, 226);
                }
                if (SRSETimer >= 90)
                {
                    Vector2 shootVel = Main.MouseWorld - player.Center;
                    if (shootVel == Vector2.Zero)
                    {
                        shootVel = new Vector2(0f, 1f);
                    }
                    shootVel.Normalize();
                    shootVel *= 12f;
                    int proj = Projectile.NewProjectile(player.Center.X, player.Center.Y - 20f, shootVel.X, shootVel.Y, mod.ProjectileType("SpaceRipperStingyEyes"), 82, 4f, Main.myPlayer, 1f);
                    Main.projectile[proj].netUpdate = true;
                    SRSETimer = 0;
                }
            }
        }
Beispiel #6
0
        public override string GetChat()       //Allows you to give this town NPC a chat message when a player talks to it.
        {
            Player        player  = Main.LocalPlayer;
            VampirePlayer vPlayer = player.GetModPlayer <VampirePlayer>();

            if (!vPlayer.vampire)
            {
                switch (Main.rand.Next(0, 5))
                {
                case 0:
                    return("Excuse me, " + player.name + ", would you happen to have some wine, preferably in a bottle? I had some, but it spilled.");

                case 1:
                    return("I hope you are looking out for vampires, " + player.name + ". I have devoted my entire life to hunting them down.");

                case 2:
                    return("Welcome back, friend. Are you here to train in the ways of Hamon?");

                case 3:
                    return("Master Tonpetty told me I would meet my end if I completed my training... will it be here, in this strange land?");

                case 4:
                    return("When you have free time, could you come back? I made a salad, with copious amounts of pepper, of course, and nobody else wants it.");

                default:            //When would this one even appear?
                    return("When you have free time, could you come back? I made a salad, with copious amounts of pepper, of course, and nobody else wants it.");
                }
            }
            else
            {
                switch (Main.rand.Next(0, 2))
                {
                case 0:
                    return("Something has changed about you... you have used the power of the Stone Mask for yourself, have you not? Get out of my sight.");

                case 1:
                    return("You are a vampire now, are you not? How many people have you killed?! What did you say? 'How many breads have I eaten?' You monster.");

                default:
                    return("Something has changed about you... you have used the power of the Stone Mask for yourself, have you not? Get out of my sight.");
                }
            }
        }
Beispiel #7
0
        public override void PreUpdate()
        {
            VampirePlayer vPlayer = player.GetModPlayer <VampirePlayer>();

            if (NPC.downedBoss1)      //It's written this way so that by the time it gets to the bottom it would have the actual Hamon Level
            {
                hamonLevel = 1;
            }
            if (NPC.downedBoss2)      //the crimson/corruption bosses
            {
                hamonLevel = 2;
            }
            if (NPC.downedBoss3)       //skeletron
            {
                hamonLevel = 3;
            }
            if (Main.hardMode)      //wall of flesh
            {
                hamonLevel = 4;
            }
            if (NPC.downedMechBoss1)
            {
                hamonLevel = 5;
            }
            if (NPC.downedMechBoss2)
            {
                hamonLevel = 6;
            }
            if (NPC.downedMechBoss3)
            {
                hamonLevel = 7;
            }
            if (NPC.downedPlantBoss)       //plantera
            {
                hamonLevel = 8;
            }
            if (NPC.downedGolemBoss)
            {
                hamonLevel = 9;
            }
            if (NPC.downedMoonlord)     //you are an expert with hamon by moon lord
            {
                hamonLevel = 10;
            }

            switch (hamonLevel)     //done this way cause different things will be done with it
            {
            case 1:
                maxHamon = 72;
                break;

            case 2:
                maxHamon = 84;
                break;

            case 3:
                maxHamon = 96;
                break;

            case 4:
                maxHamon            = 108;
                hamonIncreaseBonus += 1;
                break;

            case 5:
                maxHamon            = 120;
                hamonIncreaseBonus += 1;
                break;

            case 6:
                maxHamon            = 132;
                hamonIncreaseBonus += 1;
                break;

            case 7:
                maxHamon            = 144;
                hamonIncreaseBonus += 2;
                break;

            case 8:
                maxHamon            = 156;
                hamonIncreaseBonus += 2;
                break;

            case 9:
                maxHamon            = 168;
                hamonIncreaseBonus += 2;
                break;

            case 10:
                maxHamon            = 180;
                hamonIncreaseBonus += 3;
                break;
            }

            ManageAbilities();
            if (ajaStoneEquipped)           //Hamon charging stuff
            {
                maxHamon       *= 2;
                maxHamonCounter = 120;
            }
            if (vPlayer.vampire)
            {
                amountOfHamon        = 0;
                hamonIncreaseCounter = 0;
            }
            if (passiveRegen)
            {
                if (learnedHamonSkills.ContainsKey(PassiveHamonRegenBoost) && learnedHamonSkills[PassiveHamonRegenBoost])
                {
                    hamonIncreaseBonus += hamonSkillLevels[PassiveHamonRegenBoost];
                }

                if (!vPlayer.vampire && player.breath == player.breathMax && amountOfHamon <= 60)       //in general, to increase Hamon while it can still be increased, no speeding up or decreasing
                {
                    if (player.velocity.X == 0f)
                    {
                        hamonIncreaseCounter++;
                    }
                    else
                    {
                        hamonIncreaseCounter += 2;
                    }

                    hamonIncreaseCounter += hamonIncreaseBonus;
                }
                if (hamonIncreaseCounter >= maxHamonCounter) //the one that increases Hamon
                {
                    if (ajaStoneEquipped)                    //or any other decrease-preventing accessories
                    {
                        hamonIncreaseCounter = 0;
                        amountOfHamon       += 1;
                    }
                    if (amountOfHamon < 60)
                    {
                        hamonIncreaseCounter = 0;
                        amountOfHamon       += 1;
                    }
                }
                if (hamonIncreaseCounter >= maxHamonCounter && amountOfHamon > 60 && !ajaStoneEquipped)      //the one that decreases Hamon
                {
                    hamonIncreaseCounter = 0;
                    amountOfHamon       -= 1;
                }
                if (!ajaStoneEquipped)          //list maxHamonCounter decreasing things in here
                {
                    maxHamonCounter = 240;
                }
                if (amountOfHamon > 60 && amountOfHamon < 120 && !ajaStoneEquipped)      //every 6 seconds, while Hamon is at the UI's second row, it decreases. Only if you don't have the Aja Stone
                {
                    maxHamonCounter = 360;
                }
                if (amountOfHamon >= 120 && !ajaStoneEquipped)      //same as top but every 3 seconds
                {
                    maxHamonCounter = 180;
                }
            }

            if (amountOfHamon >= maxHamon)       //hamon limit stuff
            {
                amountOfHamon = maxHamon;
            }
            if (amountOfHamon <= 0)
            {
                amountOfHamon = 0;
            }

            /*if (learnedHamonSkills.Count == 0)
             * {
             *  Main.NewText("Broke; " + learnedHamonSkills.Count);
             * }*/

            if (amountOfHamon > 120)
            {
                player.AddBuff(mod.BuffType("HamonChargedII"), 2);
            }
            else if (amountOfHamon > 60)
            {
                player.AddBuff(mod.BuffType("HamonChargedI"), 2);
            }
        }
        public override void Update(Player player, ref int buffIndex)
        {
            VampirePlayer vPlayer = player.GetModPlayer <VampirePlayer>();

            vPlayer.noSunBurning = true;
        }
        public override void HoldItem(Player player)
        {
            VampirePlayer vPlayer = player.GetModPlayer <VampirePlayer>();

            vPlayer.noSunBurning = true;
        }