forked from RedHatter/Graveyard
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add Cultivation view - Update "Mulchmuncher" condition for "Blood Treant"
- Loading branch information
Showing
4 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using Hearthstone_Deck_Tracker.API; | ||
using static HearthDb.CardIds.Collectible; | ||
|
||
namespace HDT.Plugins.Graveyard | ||
{ | ||
public class CultivationView | ||
{ | ||
private static ViewConfig _Config; | ||
internal static ViewConfig Config | ||
{ | ||
get => _Config ?? (_Config = new ViewConfig(Druid.Cultivation) | ||
{ | ||
ShowFirst = () => true, | ||
CreateView = () => new NormalView(), | ||
UpdateOn = GameEvents.OnPlayerPlay, | ||
Condition = card => card.Name.Contains("Treant"), | ||
}); | ||
} | ||
|
||
internal class ViewConfig : Plugins.Graveyard.ViewConfig | ||
{ | ||
public ViewConfig(params string[] showOn) : base(showOn) { } | ||
public override void RegisterView(ViewBase view, bool isDefault = false) | ||
{ | ||
base.RegisterView(view, isDefault); | ||
Plugin.Events.OnPlayerCreateInPlay.Register(view.Update); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters