示例#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;
 }
 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;
 }
 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;
 }
 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;
 }