Пример #1
0
 public override void UpdateArmorSet(Player player)
 {
     player.setBonus    = "Free movement in liquid\nEsper projectiles no longer slower in liquid";
     player.ignoreWater = true;
     player.accFlipper  = true;
     ECPlayer.ModPlayer(player).cambrianSetBonus = true;
 }
Пример #2
0
 public override bool CanUseItem(Player player)
 {
     if (ECPlayer.ModPlayer(player).PsychosisFull() || player.statLife <= (int)restoreAmount)
     {
         return(false);
     }
     return(base.CanUseItem(player));
 }
Пример #3
0
 public override bool UseItem(Player player)
 {
     if (Main.myPlayer == player.whoAmI)
     {
         CombatText.NewText(new Rectangle((int)player.position.X, (int)player.position.Y, player.width, player.height), new Color(255, 105, 180, 255), 1);
     }
     ECPlayer.ModPlayer(player).maxPsychosis++;
     return(true);
 }
Пример #4
0
 public override void UpdateAccessory(Player player, bool hideVisual)
 {
     ECPlayer.ModPlayer(player).fireVial         = true;
     ECPlayer.ModPlayer(player).frostburnVial    = true;
     ECPlayer.ModPlayer(player).poisonVial       = true;
     ECPlayer.ModPlayer(player).midasVial        = true;
     ECPlayer.ModPlayer(player).cursedFlamesVial = true;
     ECPlayer.ModPlayer(player).ichorVial        = true;
     ECPlayer.ModPlayer(player).shadowflameVial  = true;
     ECPlayer.ModPlayer(player).venomVial        = true;
     ECPlayer.ModPlayer(player).terraVial        = true;
 }
Пример #5
0
        //Used from JoostMod Soil weapons
        public override void ModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat)
        {
            int dirt = 0;

            for (int i = 0; i < 58; i++)
            {
                if (player.inventory[i].type == ItemID.DirtBlock && player.inventory[i].stack > 0)
                {
                    dirt += player.inventory[i].stack;
                }
            }
            flat  = (dirt / 666f);
            mult *= ECPlayer.ModPlayer(player).tkDamage;
            //base.ModifyWeaponDamage(player, ref add, ref mult, ref flat);
        }
Пример #6
0
 public override bool WingUpdate(Player player, bool inUse)
 {
     if (inUse)
     {
         if (player.wingTime < 4 && !player.HasBuff(mod.BuffType("PsychedOut")))
         {
             ECPlayer.ModPlayer(player).PsychosisDrain(3f);
             player.wingTime++;
         }
     }
     player.wingFrameCounter++;
     if (player.wingFrameCounter > 3)
     {
         player.wingFrameCounter = 0;
         player.wingFrame++;
         if (player.wingFrame > 3)
         {
             player.wingFrame = 0;
         }
     }
     //if ((drawPlayer.velocity.Y != 0f || drawPlayer.grappling[0] != -1) && !drawPlayer.mount.Active)
     return(true);
 }
 public override void UpdateAccessory(Player player, bool hideVisual)
 {
     ECPlayer.ModPlayer(player).shadowflameVial = true;
 }
Пример #8
0
 public override void UpdateAccessory(Player player, bool hideVisual)
 {
     ECPlayer.ModPlayer(player).accTkDodge5 = true;
 }
Пример #9
0
 public override void UpdateEquip(Player player)
 {
     ECPlayer.ModPlayer(player).tkDamage      += 0.16f;
     ECPlayer.ModPlayer(player).tkCrit        += 20;
     ECPlayer.ModPlayer(player).maxPsychosis2 += 10;
 }
Пример #10
0
 public override void UpdateEquip(Player player)
 {
     ECPlayer.ModPlayer(player).tkDamage += 0.18f;
     ECPlayer.ModPlayer(player).tkCrit   += 12;
 }
Пример #11
0
 public override void UpdateArmorSet(Player player)
 {
     player.setBonus = "10 increased psychosis";
     ECPlayer.ModPlayer(player).maxPsychosis2 += 10;
 }
Пример #12
0
 public override void UpdateArmorSet(Player player)
 {
     player.setBonus = "25% less life drained while using Esper weapons in Over Psychosis state\nImmunity to 'Mighty Wind'";
     ECPlayer.ModPlayer(player).desertWandererSetBonus = true;
     player.buffImmune[BuffID.WindPushed] = true;
 }
Пример #13
0
 public override void UpdateEquip(Player player)
 {
     player.thrownCrit += 12;
     ECPlayer.ModPlayer(player).tkCrit += 12;
 }
Пример #14
0
 public override void Update(Player player, ref int buffIndex)
 {
     ECPlayer.ModPlayer(player).tkDamage      -= 0.2f;
     ECPlayer.ModPlayer(player).psychosisBlock = true;
 }
Пример #15
0
 public override void UpdateAccessory(Player player, bool hideVisual)
 {
     ECPlayer.ModPlayer(player).frostburnVial = true;
 }
Пример #16
0
 public override void UpdateEquip(Player player)
 {
     player.thrownDamage += 0.18f;
     ECPlayer.ModPlayer(player).tkDamage += 0.18f;
 }
Пример #17
0
 public override void UpdateEquip(Player player)
 {
     player.thrownVelocity            += 0.3f;
     ECPlayer.ModPlayer(player).tkVel += 0.3f;
 }
Пример #18
0
 public override void Update(Player player, ref int buffIndex)
 {
     player.blind = true;
     ECPlayer.ModPlayer(player).tkCrit        += 20;
     ECPlayer.ModPlayer(player).psychosisBlock = true;
 }
Пример #19
0
 public override void UpdateArmorSet(Player player)
 {
     player.setBonus = "Enables Psi Dashing.\nDouble tap a cardinal direction to dash that way.\nGain 20 immunity frames during the dash.\nCosts 5 psychosis to use\nTake 20 damage if used during Psyched Out state";
     ECPlayer.ModPlayer(player).taurusSetBonus = true;
 }
Пример #20
0
 public override void UpdateAccessory(Player player, bool hideVisual)
 {
     ECPlayer.ModPlayer(player).tkZoom    = true;
     ECPlayer.ModPlayer(player).tkDamage += 0.15f;
 }
Пример #21
0
 public override bool CanUseItem(Player player)
 {
     return(ECPlayer.ModPlayer(player).maxPsychosis < 15);
 }
Пример #22
0
 public override void UpdateInventory(Player player)
 {
     ECPlayer.ModPlayer(player).focusedPotion = true;
 }
Пример #23
0
 public override void UpdateEquip(Player player)
 {
     ECPlayer.ModPlayer(player).tkDamage += 0.15f;
 }
Пример #24
0
 public override void UpdateAccessory(Player player, bool hideVisual)
 {
     ECPlayer.ModPlayer(player).accPsychosisRec5 = true;
 }
Пример #25
0
 public override void Update(Player player, ref int buffIndex)
 {
     ECPlayer.ModPlayer(player).focusedPotion = true;
 }
 public override void UpdateAccessory(Player player, bool hideVisual)
 {
     ECPlayer.ModPlayer(player).cursedFlamesVial = true;
 }
Пример #27
0
        protected override void DrawSelf(SpriteBatch spriteBatch)         //Adapted from breath meter code
        {
            base.DrawSelf(spriteBatch);
            Player player    = Main.player[Main.myPlayer];
            var    modPlayer = Main.LocalPlayer.GetModPlayer <ECPlayer>();

            if (!(!modPlayer.PsychosisFull() || modPlayer.psychosisDelay2 > 0 || player.HasBuff(BuffType <Buffs.PsychedOut>()) && !player.dead))
            {
                return;
            }
            //Thanks to Verveine for the revamped code
            Vector2 vector = (player.position + new Vector2(player.width * 0.5f, player.gravDir > 0 ? player.height - 10 + player.gfxOffY : 10 + player.gfxOffY)).Floor();

            vector = Vector2.Transform(vector - Main.screenPosition, Main.GameViewMatrix.EffectMatrix * Main.GameViewMatrix.ZoomMatrix) / Main.UIScale;

            this.Left.Set(vector.X, 0f);
            this.Top.Set(vector.Y, 0f);

            CalculatedStyle dimensions = GetDimensions();
            Point           value      = new Point((int)dimensions.X, (int)dimensions.Y);

            float precent = modPlayer.psychosis / modPlayer.TotalPsychosis();
            int   frameY  = 0;

            if (player.HasBuff(BuffType <Buffs.PsychedOut>()))
            {
                //if (player.FindBuffIndex(mod.BuffType("PsychedOut")) <= 15)
                //	frameY = 234;
                if (modPlayer.playerTic < 5)
                {
                    frameY = 198;
                }
                else
                {
                    frameY = 216;
                }
            }
            else
            {
                if (precent >= 1f)
                {
                    frameY = 0;
                }
                else if (precent >= 0.9f)
                {
                    frameY = 18;
                }
                else if (precent >= 0.8f)
                {
                    frameY = 36;
                }
                else if (precent >= 0.7f)
                {
                    frameY = 54;
                }
                else if (precent >= 0.6f)
                {
                    frameY = 72;
                }
                else if (precent >= 0.5f)
                {
                    frameY = 90;
                }
                else if (precent >= 0.4f)
                {
                    frameY = 108;
                }
                else if (precent >= 0.3f)
                {
                    frameY = 126;
                }
                else if (precent >= 0.2f)
                {
                    frameY = 144;
                }
                else if (precent >= 0.1f)
                {
                    frameY = 162;
                }
                else if (precent >= 0f)
                {
                    frameY = 180;
                }
                else
                {
                    frameY = 234;
                }
            }

            Main.spriteBatch.Draw(GetTexture("EsperClass/UI/PsychosisMeter"), new Vector2(value.X - 40, value.Y + 20f), new Rectangle(0, frameY, 74, 18), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f);
            DynamicSpriteFont font          = Main.fontMouseText;
            string            psychosisText = (int)ECPlayer.ModPlayer(player).psychosis + " / " + ECPlayer.ModPlayer(player).TotalPsychosis();
            Vector2           maxTextSize   = font.MeasureString(psychosisText);
            Color             textColor     = new Color(Main.mouseTextColor, Main.mouseTextColor, Main.mouseTextColor, Main.mouseTextColor);

            Main.spriteBatch.DrawString(font, psychosisText, new Vector2(value.X + maxTextSize.X / 2f, value.Y + 40f), textColor, 0f, new Vector2(font.MeasureString(psychosisText).X, 0f), 1f, SpriteEffects.None, 0f);
            if (ECPlayer.ModPlayer(player).lihzahrdSetBonus)
            {
                float precent2 = modPlayer.lihzahrdPower / 30f;
                if (precent2 <= 0f)
                {
                    frameY = 0;
                }
                else if (precent2 <= 0.1f)
                {
                    frameY = 18;
                }
                else if (precent2 <= 0.2f)
                {
                    frameY = 36;
                }
                else if (precent2 <= 0.3f)
                {
                    frameY = 54;
                }
                else if (precent2 <= 0.4f)
                {
                    frameY = 72;
                }
                else if (precent2 <= 0.5f)
                {
                    frameY = 90;
                }
                else if (precent2 <= 0.6f)
                {
                    frameY = 108;
                }
                else if (precent2 <= 0.7f)
                {
                    frameY = 126;
                }
                else if (precent2 <= 0.8f)
                {
                    frameY = 144;
                }
                else if (precent2 <= 0.9f)
                {
                    frameY = 162;
                }
                else if (precent2 <= 1f)
                {
                    frameY = 180;
                }
                Main.spriteBatch.Draw(GetTexture("EsperClass/UI/PsychosisMeterExtra"), new Vector2(value.X - 40, value.Y + 20f), new Rectangle(0, frameY, 74, 18), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f);
            }
            //spriteBatch.Draw(bubbleTexture, value + new Vector2((float)(26 * (j - 1) + num20) - 125f, 32f + ((float)bubbleTexture.Height - (float)bubbleTexture.Height * num23) / 2f + (float)num19), new Rectangle(0, 0, bubbleTexture.Width, bubbleTexture.Height), new Color(num22, num22, num22, num22), 0f, default(Vector2), num23, SpriteEffects.None, 0f);
        }
Пример #28
0
 public override void UpdateAccessory(Player player, bool hideVisual)
 {
     ECPlayer.ModPlayer(player).accMaxPsychosis4 = true;
     ECPlayer.ModPlayer(player).accPsychosisRec4 = true;
     ECPlayer.ModPlayer(player).accTkDodge4      = true;
 }
Пример #29
0
 public override void UpdateEquip(Player player)
 {
     ECPlayer.ModPlayer(player).tkVel += 0.3f;
 }
Пример #30
0
 public override void UpdateEquip(Player player)
 {
     ECPlayer.ModPlayer(player).tkCrit += 15;
 }