//////////////// public override void Update(Player player, ref int buffIndex) { if (!player.dead) { NecrotisBehavior.ApplyBehaviors(player, 1f, out this.LastMaxHpLost, out this.LastMovePercent); } }
//////////////// 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); } }
//////////////// 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); }
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) + "%"; }
//////////////// public override void ModifyLightingBrightness(ref float scale) { var myplayer = Main.LocalPlayer.GetModPlayer <NecrotisPlayer>(); NecrotisBehavior.UpdateViewVisibilityScale(ref scale, myplayer.NecrotisPercent); }