public static bool IsHero(Entity e) { return e.HasTag(GAME_TAG.CARDTYPE) && e.GetTag(GAME_TAG.CARDTYPE) == (int)TAG_CARDTYPE.HERO && e.HasTag(GAME_TAG.ZONE) && e.GetTag(GAME_TAG.ZONE) == (int)TAG_ZONE.PLAY; }
public static bool IsHero(Entity e) => e.HasTag(CARDTYPE) && e.GetTag(CARDTYPE) == (int)CardType.HERO && e.HasTag(ZONE) && e.GetTag(ZONE) == (int)Zone.PLAY;
public async void HandleSecretsOnPlay(Entity entity) { if(!Config.Instance.AutoGrayoutSecrets) return; if(entity.IsSpell) { _game.OpponentSecrets.SetZero(Mage.Counterspell); if(_game.OpponentMinionCount < 7) { //CARD_TARGET is set after ZONE, wait for 50ms gametime before checking await _game.GameTime.WaitForDuration(50); if(entity.HasTag(CARD_TARGET) && _game.Entities[entity.GetTag(CARD_TARGET)].IsMinion) _game.OpponentSecrets.SetZero(Mage.Spellbender); } if(Core.MainWindow != null) Core.Overlay.ShowSecrets(); } else if(entity.IsMinion && _game.PlayerMinionCount > 3) { _game.OpponentSecrets.SetZero(Paladin.SacredTrial); if(Core.MainWindow != null) Core.Overlay.ShowSecrets(); } }
public static bool IsHero(Entity e) => e.HasTag(CARDTYPE) && e.GetTag(CARDTYPE) == (int)TAG_CARDTYPE.HERO && e.HasTag(ZONE) && e.GetTag(ZONE) == (int)TAG_ZONE.PLAY;