Esempio n. 1
0
        public override void UpdateAccessory(Player player, bool hideVisual)
        {
            MarioPlayer mp = player.GetModPlayer <MarioPlayer>();

            mp.Frog = true;
            player.accDivingHelm = true;
        }
Esempio n. 2
0
        public World(int width, int height)
        {
            Width  = width;
            Height = height;
            Mario  = new MarioPlayer();
            Blocks = new List <BlockArray>(Width);
            for (int i = 0; i < Width; i++)
            {
                Blocks.Add(new BlockArray(Height));
            }
            Enemies   = new List <IEnemy>();
            Bosses    = new List <IBoss>();
            FireHells = new List <FireHell>();

            Items        = new List <IItem>();
            Sceneries    = new List <IScenery>();
            Fireballs    = new List <Fireball>();
            EnemyPortals = new List <EnemyPortal>();

            RemoveFireballList = new List <Fireball>();
            FireShots          = new List <FireShot>();
            Castles            = new List <Castle>();
            FlagStuffs         = new List <FlagStuff>();
            Scores             = Mario.ScoreObjects;
            scoresRemoveList   = new List <ScoreObject>();
        }
Esempio n. 3
0
        public override void Update(Player player, ref int buffIndex)
        {
            MarioPlayer mp = player.GetModPlayer <MarioPlayer>();

            mp.MarioChar = true;
            mp.Luigi     = true;

            player.maxFallSpeed += -1.5f;
            player.accFlipper    = true;
            player.noFallDmg     = true;

            if (!player.wet)
            {
                player.spikedBoots    += 1;
                player.maxRunSpeed    += .5f;
                player.jumpSpeedBoost += 1f;

                if (player.velocity.X > 1.5 || player.velocity.X < -1.5)
                {
                    player.jumpSpeedBoost += 0.5f;
                }

                if (player.velocity.X < 1.5f && player.velocity.X > -1.5f)
                {
                    player.slippy = true;         // Slippery movement

                    if (player.iceSkate)
                    {
                        player.iceSkate = false;
                    }
                }
            }
        }
 public MarioAbilityFireShootState(MarioPlayer mario)
 {
     this.mario = mario;
     shootMode  = true;
     keyDown    = false;
     keyUp      = false;
     World      = World;
 }
Esempio n. 5
0
        public override bool CanUseItem(Player player)
        {
            MarioPlayer mp = player.GetModPlayer <MarioPlayer>();

            if (mp.Hammer && mp.MarioChar)
            {
                return(true);
            }
            return(false);
        }
Esempio n. 6
0
        public override void UpdateArmorSet(Player player)
        {
            if (player.name == "VaniIIiyan")
            {
                player.setBonus = "Oh, you sneaky...";

                MarioPlayer mp = player.GetModPlayer <MarioPlayer>();
                mp.Dev = true;
            }
        }
Esempio n. 7
0
        public override void UpdateAccessory(Player player, bool hideVisual)
        {
            MarioPlayer mp = player.GetModPlayer <MarioPlayer>();

            mp.Tanooki = true;

            if (player.velocity.X >= 3.4f || player.velocity.X <= -3.4f)
            {
                player.wingTimeMax = 150;
            }
        }
Esempio n. 8
0
        public override void HorizontalWingSpeeds(Player player, ref float speed, ref float acceleration)
        {
            MarioPlayer mp = player.GetModPlayer <MarioPlayer>();

            if (mp.MarioChar)
            {
                speed         = 8f;
                acceleration *= 3f;
            }
            if (!mp.MarioChar || player.controlUseItem)
            {
                player.wingsLogic = 0;
            }
        }
Esempio n. 9
0
        public override void HorizontalWingSpeeds(Player player, ref float speed, ref float acceleration)
        {
            MarioPlayer mp = player.GetModPlayer <MarioPlayer>();

            if (mp.Mario || mp.Luigi)
            {
                speed         = 5f;
                acceleration *= 1.5f;
            }
            if (!mp.Mario && !mp.Luigi)
            {
                player.wingsLogic = 0;
            }
        }
Esempio n. 10
0
        public override void UpdateEquip(Player player)
        {
            MarioPlayer mp = player.GetModPlayer <MarioPlayer>();

            mp.PowerUp1 = true;

            player.setBonus = "HP and Defense up\n" +
                              "Powered up!";

            player.AddBuff(mod.BuffType("LuigiBuff"), 1);

            player.statLifeMax2 += 15;
            player.statDefense  += 8;
        }
Esempio n. 11
0
        public override bool WingUpdate(Player player, bool inUse)
        {
            MarioPlayer mp = player.GetModPlayer <MarioPlayer>();

            if (inUse)
            {
                player.flapSound = true;
            }

            if ((player.wingFrame == 3 && mp.MarioChar) && !player.wet && player.wingTime < 10 && (player.velocity.X > 4f || player.velocity.X < -4f))
            {
                Main.PlaySound(SoundLoader.customSoundType, (int)player.Center.X, (int)player.Center.Y, mod.GetSoundSlot(SoundType.Custom, "Sounds/smw_cape_rise"));
            }
            return(false);
        }
Esempio n. 12
0
        public override bool WingUpdate(Player player, bool inUse)
        {
            MarioPlayer mp = player.GetModPlayer <MarioPlayer>();

            if (inUse)
            {
                player.flapSound = true;
            }

            if ((player.wingFrame == 3 && (mp.Mario || mp.Luigi)) && !player.wet)
            {
                Main.PlaySound(SoundLoader.customSoundType, (int)player.Center.X, (int)player.Center.Y, mod.GetSoundSlot(SoundType.Custom, "Sounds/tail_cape_spin"));
            }
            return(false);
        }
Esempio n. 13
0
        public override void UpdateEquip(Player player)
        {
            MarioPlayer mp = player.GetModPlayer <MarioPlayer>();

            mp.PowerUp1 = true;

            player.setBonus = "Melee damage and Melee speed up\n" +
                              "Powered up!";

            player.AddBuff(mod.BuffType("MarioBuff"), 1);

            player.meleeDamage += 0.1f;
            player.meleeSpeed  += 0.1f;
            player.statDefense += 5;
        }
Esempio n. 14
0
        public override bool PreHurt(bool pvp, bool quiet, ref int damage, ref int hitDirection,
                                     ref bool crit, ref bool customDamage, ref bool playSound, ref bool genGore, ref PlayerDeathReason damageSource)
        {
            MarioPlayer mp = player.GetModPlayer <MarioPlayer>();
            WarioPlayer wp = player.GetModPlayer <WarioPlayer>();

            int currentSound    = 0;
            int customSoundType = 0;

            if (mp.Mario)
            {
                playSound = false;

                if (!mp.Invincible)
                {
                    currentSound    = mod.GetSoundSlot(SoundType.Custom, "Sounds/mario_hurt");
                    customSoundType = SoundLoader.customSoundType;
                    Main.PlaySound(customSoundType, (int)player.Center.X, (int)player.Center.Y, currentSound, 1f, 0f);
                }
            }

            else if (mp.Luigi)
            {
                playSound = false;

                if (!mp.Invincible)
                {
                    currentSound    = mod.GetSoundSlot(SoundType.Custom, "Sounds/luigi_hurt");
                    customSoundType = SoundLoader.customSoundType;
                    Main.PlaySound(customSoundType, (int)player.Center.X, (int)player.Center.Y, currentSound, 1f, 0f);
                }
            }

            else if (wp.Wario)
            {
                playSound = false;

                currentSound    = mod.GetSoundSlot(SoundType.Custom, "Sounds/Wario/wario_hurt");
                customSoundType = SoundLoader.customSoundType;
                Main.PlaySound(customSoundType, (int)player.Center.X, (int)player.Center.Y, currentSound, 1f, 0f);
            }


            return(base.PreHurt(pvp, quiet, ref damage, ref hitDirection, ref crit, ref customDamage, ref playSound, ref genGore, ref damageSource));
        }
Esempio n. 15
0
        public override void UpdateAccessory(Player player, bool hideVisual)
        {
            MarioPlayer mp = player.GetModPlayer <MarioPlayer>();

            mp.Cape = true;

            for (int i = 0; i < 100; i++)
            {
                if (player.velocity.X >= 3.5f || player.velocity.X <= -3.5f)
                {
                    player.wingTimeMax = 100;
                }
                if (player.velocity.Y > 5.5f && (player.velocity.X > 4f || player.velocity.X < -4f))
                {
                    player.wingTime = (0.125f * i);
                }
            }
        }
Esempio n. 16
0
        public override bool OnPickup(Item item, Player player)
        {
            MarioPlayer mp = player.GetModPlayer <MarioPlayer>();
            WarioPlayer wp = player.GetModPlayer <WarioPlayer>();

            if (new int[] { ItemID.CopperCoin, ItemID.SilverCoin, ItemID.GoldCoin, ItemID.PlatinumCoin }.Contains(item.type))
            {
                if (mp != null && mp.MarioChar)
                {
                    Main.PlaySound(SoundLoader.customSoundType, (int)player.Center.X, (int)player.Center.Y, mod.GetSoundSlot(SoundType.Custom, "Sounds/smw_coin"));
                }
                if (wp != null && wp.Wario)
                {
                    Main.PlaySound(SoundLoader.customSoundType, (int)player.Center.X, (int)player.Center.Y, mod.GetSoundSlot(SoundType.Custom, "Sounds/Wario/wario_coin"));
                }
            }
            return(base.OnPickup(item, player));
        }
Esempio n. 17
0
        public override void UpdateAccessory(Player player, bool hideVisual)
        {
            MarioPlayer mp = player.GetModPlayer <MarioPlayer>();

            if (mp.Mario == true)
            {
                mp.Carrot              = true;
                player.jumpSpeedBoost += 1f;
                player.autoJump        = true;

                if (!player.releaseJump)
                {
                    player.maxFallSpeed += -9.5f;
                }

                if (player.velocity.X > 1.5 || player.velocity.X < -1.5)
                {
                    player.jumpSpeedBoost -= 0.5f;
                }
            }
        }
Esempio n. 18
0
        public override void Update(Player player, ref int buffIndex)
        {
            MarioPlayer mp = player.GetModPlayer <MarioPlayer>();

            mp.MarioChar = true;
            mp.Mario     = true;

            player.accFlipper = true;
            player.noFallDmg  = true;

            if (!player.wet)
            {
                player.spikedBoots    += 1;
                player.maxRunSpeed    += 1f;
                player.jumpSpeedBoost += .5f;

                if (player.velocity.X > 1.5 || player.velocity.X < -1.5)
                {
                    player.jumpSpeedBoost += 0.5f;
                }
            }
        }
 public MarioAbilityRunState(MarioPlayer mario)
 {
     this.mario = mario;
 }
Esempio n. 20
0
        public override void UpdateAccessory(Player player, bool hideVisual)
        {
            MarioPlayer mp = player.GetModPlayer <MarioPlayer>();

            mp.Builder = true;
        }