示例#1
0
        ////////////////

        public override void Update(Player player, ref int buffIndex)
        {
            if (!player.dead)
            {
                NecrotisBehavior.ApplyBehaviors(player, 1f, out this.LastMaxHpLost, out this.LastMovePercent);
            }
        }
示例#2
0
        ////////////////

        public override void DrawEffects(PlayerDrawInfo drawInfo, ref float r, ref float g, ref float b, ref float a, ref bool fullBright)
        {
            float necPerc = this.NecrotisPercent;

            if (necPerc > 0f)
            {
                NecrotisBehavior.ApplyVisualFX(this.player, ref r, ref g, ref b);
            }
        }
示例#3
0
        ////////////////

        public override void UpdateLifeRegen()
        {
            float necPerc = this.NecrotisPercent;

            if (necPerc > 0f)
            {
                NecrotisBehavior.ApplyPlayerLifeRegenBehaviors(this.player, necPerc);
            }
        }
        ////////////////

        public override void Update(Player player, ref int buffIndex)
        {
            if (player.dead)
            {
                return;
            }

            var   myplayer        = player.GetModPlayer <NecrotisPlayer>();
            float necrotisPercent = myplayer.NecrotisPercent;

            NecrotisBehavior.ApplyBehaviors(player, necrotisPercent, out this.LastMaxHpLost, out this.LastMovePercent);
        }
示例#5
0
        public override void ModifyBuffTip(ref string tip, ref int rare)
        {
            Player plr      = Main.LocalPlayer;
            var    myplayer = plr.GetModPlayer <NecrotisPlayer>();

            float necrotisPercent      = myplayer.NecrotisPercent;
            int   lastMovePercentOf100 = (int)(this.LastMovePercent * 100f);
            float visibility           = NecrotisBehavior.CalculateViewVisibilityScale(1f);

            tip = NecrotisOmnisDeBuff.BaseDescription;
            if (plr.statLifeMax > 100)
            {
                int realMaxHp = plr.statLifeMax2 + this.LastMaxHpLost;
                tip += "\n" + "Max health reduced to " + plr.statLifeMax2 + " (of " + realMaxHp + ")";
            }
            tip += "\n" + "Health regeneration reduced to 0%";
            tip += "\n" + "Movement speed reduced to " + lastMovePercentOf100 + "%";
            tip += "\n" + "Visibility reduced to " + (int)(visibility * 100f) + "%";
        }
示例#6
0
        ////////////////

        public override void ModifyLightingBrightness(ref float scale)
        {
            var myplayer = Main.LocalPlayer.GetModPlayer <NecrotisPlayer>();

            NecrotisBehavior.UpdateViewVisibilityScale(ref scale, myplayer.NecrotisPercent);
        }