Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Abstracts/CustomPotionModel.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using HarmonyLib;
using BaseLib.Patches.Content;
using MegaCrit.Sts2.Core.Helpers;
using MegaCrit.Sts2.Core.Models;

namespace BaseLib.Abstracts;
Expand Down
2 changes: 0 additions & 2 deletions Abstracts/CustomReward.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
using MegaCrit.Sts2.Core.Entities.Players;
using MegaCrit.Sts2.Core.Helpers;
using MegaCrit.Sts2.Core.Localization;
using MegaCrit.Sts2.Core.Localization.DynamicVars;
using MegaCrit.Sts2.Core.Models;
using MegaCrit.Sts2.Core.Multiplayer.Game;
using MegaCrit.Sts2.Core.Rewards;
using MegaCrit.Sts2.Core.Saves.Runs;
Expand Down
2 changes: 0 additions & 2 deletions Abstracts/PlaceholderCharacterModel.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using MegaCrit.Sts2.Core.Helpers;
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;

namespace BaseLib.Abstracts;
Expand Down
3 changes: 1 addition & 2 deletions BaseLibScenes/NHorizontalScrollContainer.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using BaseLib.Utils;
using Godot;
using Godot;
using MegaCrit.Sts2.Core.ControllerInput;
using MegaCrit.Sts2.Core.Helpers;

Expand Down
29 changes: 25 additions & 4 deletions Cards/Variables/ExhaustiveVar.cs
Original file line number Diff line number Diff line change
@@ -1,28 +1,49 @@
using System.Diagnostics;
using BaseLib.Extensions;
using BaseLib.Extensions;
using MegaCrit.Sts2.Core.Combat;
using MegaCrit.Sts2.Core.Entities.Cards;
using MegaCrit.Sts2.Core.Entities.Creatures;
using MegaCrit.Sts2.Core.HoverTips;
using MegaCrit.Sts2.Core.Localization.DynamicVars;
using MegaCrit.Sts2.Core.Models;

namespace BaseLib.Cards.Variables;

/// <summary>
/// Defines a <see cref="DynamicVar"/> that marks a card as Exhaustive.
/// </summary>
/// <remarks>
/// Exhaustive cards automatically exhaust after a fixed number of plays within a combat.<br></br>
/// BaseLib will handle displaying a <see cref="HoverTip"/>, and exhausting the card once it has been played enough.<br></br>
/// To display the text on the card, add <c>"[gold]Exhaustive[/gold] {Exhaustive:diff()}"</c> to your card's description.
/// </remarks>
public class ExhaustiveVar : DynamicVar
{

/// <summary>
/// The Key to find an Exhaustive var in a <see cref="DynamicVarSet"/>.
/// </summary>
public const string Key = "Exhaustive";

/// <summary>
/// Create a new <see cref="ExhaustiveVar"/> instance with the count provided.
/// </summary>
/// <param name="exhaustiveCount">The number of times the card can be played before it is exhausted.</param>
public ExhaustiveVar(decimal exhaustiveCount) : base(Key, exhaustiveCount)
{
this.WithTooltip();
}

/// <inheritdoc />
public override void UpdateCardPreview(CardModel card, CardPreviewMode previewMode, Creature? target, bool runGlobalHooks)
{
PreviewValue = ExhaustiveCount(card, IntValue);
}


/// <summary>
/// Helper method to determine how many plays remain on an Exhaustive card.
/// </summary>
/// <param name="card">The exhaustive card.</param>
/// <param name="baseExhaustive">The base value from the <see cref="ExhaustiveVar"/> instance.</param>
/// <returns>The number of plays remaining until this card is exhausted.</returns>
public static int ExhaustiveCount(CardModel card, int baseExhaustive)
{
if (baseExhaustive <= 0)
Expand Down
4 changes: 0 additions & 4 deletions Cards/Variables/RefundVar.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
using BaseLib.Extensions;
using MegaCrit.Sts2.Core.Combat;
using MegaCrit.Sts2.Core.Entities.Cards;
using MegaCrit.Sts2.Core.Entities.Creatures;
using MegaCrit.Sts2.Core.Localization.DynamicVars;
using MegaCrit.Sts2.Core.Models;

namespace BaseLib.Cards.Variables;

Expand Down
1 change: 0 additions & 1 deletion Extensions/CardExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using BaseLib.Abstracts;
using BaseLib.Patches.Content;
using BaseLib.Patches.Features;
using BaseLib.Utils;
using MegaCrit.Sts2.Core.Entities.Cards;
using MegaCrit.Sts2.Core.Entities.Creatures;
using MegaCrit.Sts2.Core.Models;
Expand Down
1 change: 0 additions & 1 deletion Extensions/MethodInfoExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using HarmonyLib;
using System;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
Expand Down
4 changes: 1 addition & 3 deletions Hooks/IAfterScryed.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using MegaCrit.Sts2.Core.Entities.Players;
using MegaCrit.Sts2.Core.Entities.Players;
using MegaCrit.Sts2.Core.GameActions.Multiplayer;
using MegaCrit.Sts2.Core.Models;

Expand Down
5 changes: 0 additions & 5 deletions Patches/Content/ContentPatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,9 @@
using MegaCrit.Sts2.Core.Helpers;
using MegaCrit.Sts2.Core.Modding;
using MegaCrit.Sts2.Core.Models;
using MegaCrit.Sts2.Core.Models.Acts;
using MegaCrit.Sts2.Core.Models.Relics;
using MegaCrit.Sts2.Core.Random;
using MegaCrit.Sts2.Core.Rooms;
using MegaCrit.Sts2.Core.Runs;
using MegaCrit.Sts2.Core.Saves;
using MegaCrit.Sts2.Core.Timeline.Epochs;
using MegaCrit.Sts2.Core.Unlocks;

namespace BaseLib.Patches.Content;

Expand Down
1 change: 0 additions & 1 deletion Patches/Features/AutoPlayCustomTargetPatch.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using BaseLib.Utils;
using HarmonyLib;
using MegaCrit.Sts2.Core.Commands;
using MegaCrit.Sts2.Core.Entities.Cards;
Expand Down
2 changes: 0 additions & 2 deletions Patches/Features/BetterConsoleAutocompletePatch.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using BaseLib.Utils.Patching;
using Godot;
using HarmonyLib;
using MegaCrit.Sts2.Core.DevConsole;
Expand Down
2 changes: 0 additions & 2 deletions Patches/Features/CustomTargetType.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using BaseLib.Patches.Content;
using BaseLib.Utils;
using Godot;
using HarmonyLib;
using MegaCrit.Sts2.Core.Audio.Debug;
Expand All @@ -12,7 +11,6 @@
using MegaCrit.Sts2.Core.Entities.Players;
using MegaCrit.Sts2.Core.Helpers;
using MegaCrit.Sts2.Core.Models;
using MegaCrit.Sts2.Core.Nodes;
using MegaCrit.Sts2.Core.Nodes.Combat;
using MegaCrit.Sts2.Core.Nodes.CommonUi;
using MegaCrit.Sts2.Core.Nodes.GodotExtensions;
Expand Down
3 changes: 1 addition & 2 deletions Patches/Features/ModInteropPatch.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Collections.ObjectModel;
using System.Reflection;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using BaseLib.Extensions;
Expand Down
3 changes: 1 addition & 2 deletions Patches/Features/PersistPatch.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Collections.Generic;
using System.Reflection;
using System.Reflection;
using BaseLib.Cards.Variables;
using BaseLib.Utils.Patching;
using HarmonyLib;
Expand Down
1 change: 0 additions & 1 deletion Patches/Fixes/AnyPlayerCardTargetingPatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
using MegaCrit.Sts2.Core.Nodes.HoverTips;
using MegaCrit.Sts2.Core.Nodes.Rooms;
using MegaCrit.Sts2.Core.Nodes.Vfx;
using BaseLib.Utils;
using System.Reflection;
using static BaseLib.Patches.Fixes.AnyPlayerCardTargetingHelper;

Expand Down
1 change: 0 additions & 1 deletion Patches/UI/AncientSourceLabel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using HarmonyLib;
using MegaCrit.Sts2.addons.mega_text;
using MegaCrit.Sts2.Core.Helpers;
using MegaCrit.Sts2.Core.Localization;
using MegaCrit.Sts2.Core.Models;
using MegaCrit.Sts2.Core.Nodes;

Expand Down
4 changes: 0 additions & 4 deletions Patches/UI/CustomCharacterSelectEntryPatch.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using BaseLib.Abstracts;
using BaseLib.BaseLibScenes;
using BaseLib.Extensions;
using BaseLib.Utils;
using Godot;
using HarmonyLib;
Expand Down
3 changes: 0 additions & 3 deletions Patches/UI/CustomResourceUiPatches.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using BaseLib.Abstracts;
using BaseLib.BaseLibScenes;
using BaseLib.Utils;
using Godot;
using HarmonyLib;
using MegaCrit.Sts2.Core.Entities.Cards;
using MegaCrit.Sts2.Core.Nodes.Cards;
Expand Down
1 change: 0 additions & 1 deletion Patches/UI/EventSourceLabel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using HarmonyLib;
using MegaCrit.Sts2.addons.mega_text;
using MegaCrit.Sts2.Core.Helpers;
using MegaCrit.Sts2.Core.Localization;
using MegaCrit.Sts2.Core.Models;
using MegaCrit.Sts2.Core.Nodes.Events;

Expand Down
2 changes: 0 additions & 2 deletions Patches/UI/MonsterSourceLabel.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using BaseLib.Config;
using BaseLib.Utils;
using HarmonyLib;
using MegaCrit.Sts2.addons.mega_text;
using MegaCrit.Sts2.Core.Entities.Creatures;
using MegaCrit.Sts2.Core.Nodes.Combat;

namespace BaseLib.Patches.UI;
Expand Down
1 change: 0 additions & 1 deletion Patches/Utils/SavedSpireFieldPatch.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using BaseLib.Patches.Saves;
using BaseLib.Utils;
using Godot;
using HarmonyLib;
Expand Down
1 change: 0 additions & 1 deletion Patches/Utils/SelfApplyDebuffPatch.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Reflection;
using BaseLib.Abstracts;
using BaseLib.Utils;
using HarmonyLib;
using MegaCrit.Sts2.Core.Combat;
using MegaCrit.Sts2.Core.Commands;
Expand Down
4 changes: 1 addition & 3 deletions Utils/CustomBackgroundAssets.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Reflection;
using Godot;
using HarmonyLib;
using Godot;
using MegaCrit.Sts2.Core.Random;
using MegaCrit.Sts2.Core.Rooms;

Expand Down
2 changes: 0 additions & 2 deletions Utils/GeneratedNodePool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
using MegaCrit.Sts2.Core.Helpers;
using MegaCrit.Sts2.Core.Logging;
using MegaCrit.Sts2.Core.Nodes.Pooling;
using System;
using System.Collections.Generic;

namespace BaseLib.Utils;

Expand Down
1 change: 0 additions & 1 deletion Utils/Patching/IMatcher.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using HarmonyLib;
using System.Collections.Generic;

namespace BaseLib.Utils.Patching;

Expand Down
2 changes: 0 additions & 2 deletions Utils/PoolAttribute.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;

namespace BaseLib.Utils;

[AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = false)]
Expand Down