Пример #1
0
        public override void SetDefaults()
        {
            item.width  = 18;
            item.height = 18;
            item.value  = Item.buyPrice(0, 30, 0, 0);
            item.rare   = ItemRarityID.Cyan;

            item.useStyle     = ItemUseStyleID.SwingThrow;
            item.useTime      = 20;
            item.useAnimation = 20;

            item.noMelee = true;

            item.mountType = ModContent.MountType <Drakomire>();

            item.UseSound = SoundID.Item25;
        }
Пример #2
0
        public override void SetDefaults()
        {
            item.width  = 22;
            item.height = 20;
            item.value  = 10000;
            item.rare   = ItemRarityID.Pink;

            item.useStyle     = ItemUseStyleID.HoldingUp;
            item.useTime      = 20;
            item.useAnimation = 20;

            item.noMelee = true;

            item.mountType = ModContent.MountType <DiabolicPlatform>();

            item.UseSound = SoundID.Item25;
        }
Пример #3
0
 public override bool NewRightClick(int i, int j)
 {
     if (Main.LocalPlayer.mount.Type != ModContent.MountType <Mech>())
     {
         int tlX  = i - (Main.tile[i, j].frameX / 18);
         int tlY  = j - (Main.tile[i, j].frameY / 18);
         var data = ModContent.GetInstance <ArenaManager>().GetPIDCharge(tlX, tlY);
         if (data.Item1 == Main.LocalPlayer.GetModPlayer <MechPlayerInfo>().PlayerID)
         {
             Main.LocalPlayer.mount.SetMount(ModContent.GetInstance <Mech>().Type, Main.LocalPlayer);
             ModContent.GetInstance <ArenaManager>().RemoveMechInfo(tlX, tlY);
             //Main.NewText(Main.tile[i, j].frameX + "," + Main.tile[i, j].frameY);
             ((MechData)Main.LocalPlayer.mount._mountSpecificData).charge = data.Item2;
             KillMech(Main.tile, i, j);
             return(true);
         }
     }
     return(base.NewRightClick(i, j));
 }
Пример #4
0
 public override void Update(Player player, ref int buffIndex)
 {
     player.mount.SetMount(ModContent.MountType <ProfanedCycle>(), player);
     player.buffTime[buffIndex] = 10;
     CalValEX.MountNerf(player, 0.9f, 0.75f);
 }
 public override void Update(Player player, ref int buffIndex)
 {
     player.mount.SetMount(ModContent.MountType <Mounts.MorphBallMount>(), player);
     player.buffTime[buffIndex] = 10;
 }
Пример #6
0
 public override void Update(Player player, ref int buffIndex)
 {
     player.mount.SetMount(ModContent.MountType <TideMount>(), player, false);
     player.buffTime[buffIndex] = 10;
 }
Пример #7
0
 public override void Update(Player player, ref int buffIndex)
 {
     player.mount.SetMount(ModContent.MountType <Mounts.ExampleMount>(), player);
     player.buffTime[buffIndex] = 10;             // reset buff time
 }
        public override void ModifyDrawLayers(List <PlayerLayer> layers)
        {
            //plasmaLeftInClip
            SGAPlayer sgaplayer = player.GetModPlayer <SGAPlayer>();

            #region MiscVisuals

            if (sgaplayer.SpaceDiverset && CustomWings < 1)
            {
                /*int wingsLayer = layers.FindIndex(PlayerLayer => PlayerLayer.Name.Equals("Wings"));
                 * int backacclayer = layers.FindIndex(PlayerLayer => PlayerLayer.Name.Equals("BackAcc"));
                 * if (SpaceDiverWings < 0.6f)
                 * layers.RemoveAt(wingsLayer);
                 * SpaceDiverTank.visible = true;
                 * layers.Insert(backacclayer, SpaceDiverTank);*/
            }

            //Main.NewText(sgaplayer.CustomWings);
            if (sgaplayer.CustomWings > 0)
            {
                int wingsLayer = layers.FindIndex(PlayerLayer => PlayerLayer.Name.Equals("Wings"));
                if (wingsLayer >= 0)
                {
                    if (sgaplayer.CustomWings == 1)
                    {
                        JoyriderWings.visible = true;
                        layers.Insert(wingsLayer, JoyriderWings);
                    }
                    if (sgaplayer.CustomWings == 2)
                    {
                        Items.Accessories.TrueDragonWings.DergWings.visible = true;
                        layers.Insert(wingsLayer, Items.Accessories.TrueDragonWings.DergWings);
                    }
                }
            }

            //playerDrawData.Add(new DrawData(frontChair, drawPosition + new Vector2(-4, drawPlayer.height - 32).RotatedBy(rotation), null, drawColor * 1f, rotation, frontChairSize, drawScale, drawPlayer.direction > 0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally, 0));

            if (sgaplayer.terraDivingGear)
            {
                int armLayer2 = layers.FindIndex(PlayerLayer => PlayerLayer.Name.Equals("MountBack"));
                if (armLayer2 >= 0)
                {
                    BreathingReed.visible = true;
                    layers.Insert(armLayer2, BreathingReed);
                }
            }

            if (player.HeldItem.type == mod.ItemType("WaveBeam"))
            {
                int armLayer2 = layers.FindIndex(PlayerLayer => PlayerLayer.Name.Equals("HandOnAcc"));
                if (armLayer2 >= 0)
                {
                    WaveBeamArm.visible = true;
                    layers.Insert(armLayer2, WaveBeamArm);
                }
            }

            if (IDGset || illuminantSet.Item1 > 4)
            {
                int armLayer2 = layers.FindIndex(PlayerLayer => PlayerLayer.Name.Equals("MiscEffectsFront"));
                if (armLayer2 >= 0)
                {
                    if (IDGset)
                    {
                        DigiEffect.visible = true;
                        layers.Insert(armLayer2, DigiEffect);
                    }
                    if (illuminantSet.Item1 > 4)
                    {
                        illuminantEffect.visible = true;
                        layers.Insert(armLayer2, illuminantEffect);
                    }

                    armLayer2 = layers.FindIndex(PlayerLayer => PlayerLayer.Name.Equals("MiscEffectsBack"));
                    if (armLayer2 >= 0)
                    {
                        if (IDGset)
                        {
                            DigiEffectBack.visible = true;
                            layers.Insert(armLayer2, DigiEffectBack);
                        }
                        if (illuminantSet.Item1 > 4)
                        {
                            illuminantEffectBack.visible = true;
                            layers.Insert(armLayer2, illuminantEffectBack);
                        }
                    }
                }
            }

            if (player.mount != null && player.mount.Active)
            {
                int armsLayer = layers.FindIndex(PlayerLayer => PlayerLayer.Name.Equals("MountFront"));
                //hjgkhj
                if (armsLayer >= 0 && player.mount.Type == ModContent.MountType <Items.Mounts.GeneralsArmchairMount>())
                {
                    layers.Insert(layers.Count - 1, Items.Mounts.GeneralsArmchairMount.GeneralChair);
                }
            }
            #endregion

            #region armor glowmasks

            string[]      stringsz = { "Head", "Body", "Arms", "Legs", "Body" };
            PlayerLayer[] thelayer = { PlayerLayer.Head, PlayerLayer.Body, PlayerLayer.Arms, PlayerLayer.Legs, PlayerLayer.Body };

            for (int intc = 0; intc < 4; intc += 1)
            {
                int oneToLookAt = intc;
                if (intc == 1 && !player.Male)                //Use Female glowmask instead of the male one
                {
                    oneToLookAt = 4;
                }

                if (sgaplayer.armorglowmasks[oneToLookAt] != null)
                {
                    Action <PlayerDrawInfo> glowtarget;
                    switch (oneToLookAt)                //donno why but passing the value here from the for loop causes a crash, boo
                    {
                    case 1:                             //Body
                        glowtarget = s => DrawGlowmasks(s, 1);
                        break;

                    case 2:                             //Arms
                        glowtarget = s => DrawGlowmasks(s, 2);
                        break;

                    case 3:                             //Legs
                        glowtarget = s => DrawGlowmasks(s, 3);
                        break;

                    case 4:                             //FemaleBody
                        glowtarget = s => DrawGlowmasks(s, 4);
                        break;

                    default:                             //Head
                        glowtarget = s => DrawGlowmasks(s, 0);
                        break;
                    }
                    PlayerLayer glowlayer = new PlayerLayer("SGAmod", "Armor Glowmask", thelayer[oneToLookAt], glowtarget);
                    int         layer     = layers.FindIndex(PlayerLayer => PlayerLayer.Name.Equals(stringsz[oneToLookAt])) + 1;
                    glowlayer.visible = true;
                    layers.Insert(layer, glowlayer);
                }
            }
            #endregion
        }
Пример #9
0
 public override void Update(Player player, ref int buffIndex)
 {
     player.mount.SetMount(ModContent.MountType <Items.Mounts.FloatyCarpet>(), player);
     player.buffTime[buffIndex] = 10;
 }
Пример #10
0
 public override void Update(Player player, ref int buffIndex)
 {
     player.mount.SetMount(ModContent.MountType <Items.Mounts.HiveMount>(), player);
     player.buffTime[buffIndex] = 10;
     Main.LocalPlayer.AddBuff(ModLoader.GetMod("CalamityMod").BuffType("CorruptionEffigyBuff"), 10);
 }
Пример #11
0
 public override void Update(Player player, ref int buffIndex)
 {
     player.mount.SetMount(ModContent.MountType <WulfrumTractor>(), player, false);
     player.buffTime[buffIndex] = 10;
     CalValEX.MountNerf(player, 0.75f, 0.75f);
 }
Пример #12
0
 public override void Update(Player player, ref int buffIndex)
 {
     player.mount.SetMount(ModContent.MountType <EmeraldSlime>(), player);
     player.buffTime[buffIndex]   = 10;
     player.armorEffectDrawShadow = true;
     if (player.wet)
     {
         player.wetSlime = 30;
         if (player.velocity.Y > 2f)
         {
             player.velocity.Y = player.velocity.Y * 0.9f;
         }
         player.velocity.Y = player.velocity.Y - 1f;
         if (player.velocity.Y < -5f)
         {
             player.velocity.Y = -5f;
         }
         if (player.controlJump)
         {
             player.velocity.Y = -20f;
         }
     }
     Microsoft.Xna.Framework.Rectangle checkDamagePlayer = player.getRect();
     checkDamagePlayer.Offset(0, player.height - 1);
     checkDamagePlayer.Height = 2;
     checkDamagePlayer.Inflate(12, 6);
     for (int i = 0; i < 200; i++)
     {
         NPC npc = Main.npc[i];
         if (npc.active && !npc.dontTakeDamage && !npc.friendly && npc.immune[player.whoAmI] == 0)
         {
             Microsoft.Xna.Framework.Rectangle checkDamageNPC = npc.getRect();
             if (checkDamagePlayer.Intersects(checkDamageNPC) && (npc.noTileCollide || Collision.CanHit(player.position, player.width, player.height, npc.position, npc.width, npc.height)))
             {
                 var   damage    = 60f * player.meleeDamage;
                 float knockBack = 5f;
                 int   direction = player.direction;
                 if (player.velocity.X < 0f)
                 {
                     direction = -1;
                 }
                 if (player.velocity.X > 0f)
                 {
                     direction = 1;
                 }
                 if (player.whoAmI == Main.myPlayer)
                 {
                     npc.StrikeNPC((int)damage, knockBack, direction, false, false, false);
                     if (Main.netMode != NetmodeID.SinglePlayer)
                     {
                         NetMessage.SendData(MessageID.StrikeNPC, -1, -1, NetworkText.FromLiteral(""), npc.whoAmI, 1, knockBack, direction, (int)damage);
                     }
                 }
                 npc.immune[player.whoAmI] = 10;
                 player.velocity.Y         = -20f;
                 player.immune             = true;
                 break;
             }
         }
     }
 }
Пример #13
0
 public override void Update(Player player, ref int buffIndex)
 {
     player.mount.SetMount(ModContent.MountType <SpaceControls>(), player);
     player.buffTime[buffIndex] = 10;
     //player.AddBuff(23, 10);
 }
Пример #14
0
 public override void Update(Player player, ref int buffIndex)
 {
     player.mount.SetMount(ModContent.MountType <Mounts.BroomMount>(), player);
     player.mount.ResetFlightTime(320);
     player.buffTime[buffIndex] = 1;
 }
Пример #15
0
 public override void Update(Player player, ref int buffIndex)
 {
     player.mount.SetMount(ModContent.MountType <YoungDragon>(), player);
     player.buffTime[buffIndex] = 11;
 }
Пример #16
0
 public override void Update(Player player, ref int buffIndex)
 {
     player.mount.SetMount(ModContent.MountType <CandyCopter>(), player);
     player.buffTime[buffIndex] = 10;
 }
Пример #17
0
 public override void Update(Player player, ref int buffIndex)
 {
     player.mount.SetMount(ModContent.MountType <YharonMount>(), player);
     player.buffTime[buffIndex] = 10;
     CalValEX.MountNerf(player, 0.4f, 0.4f);
 }
Пример #18
0
 public override void Update(Player player, ref int buffIndex)
 {
     player.mount.SetMount(ModContent.MountType <Items.VtuberItems.MeatBicycle>(), player);
     player.buffTime[buffIndex] = 10;
 }
Пример #19
0
 public override void Update(Player player, ref int buffIndex)
 {
     player.mount.SetMount(ModContent.MountType <SquirrelTransformation>(), player, false);
     player.buffTime[buffIndex] = 10;
     player.GetModPlayer <BunnyPlayer>().transformation = true;
 }
Пример #20
0
 public override void Update(Player player, ref int buffIndex)
 {
     player.mount.SetMount(ModContent.MountType <SquareMinecartMount>(), player);
     player.buffTime[buffIndex] = 10;
 }
Пример #21
0
 public override void Update(Player player, ref int buffIndex)
 {
     player.mount.SetMount(ModContent.MountType <DiabolicPlatform>(), player);
     player.buffTime[buffIndex] = 10;
 }