public void HandleDefendingEntity(Entity entity) { _defendingEntity = entity; if(_attackingEntity == null || _defendingEntity == null) return; if(entity.IsControlledBy(_game.Opponent.Id)) _game.OpponentSecrets.ZeroFromAttack(_attackingEntity, _defendingEntity); OnAttackEvent(); }
public void HandleOpponentDamage(Entity entity) { if(!Config.Instance.AutoGrayoutSecrets) return; if(!entity.IsHero || !entity.IsControlledBy(_game.Opponent.Id)) return; _game.OpponentSecrets.SetZero(Paladin.EyeForAnEye); if(Core.MainWindow != null) Core.Overlay.ShowSecrets(); }
public void HandleTurnsInPlayChange(Entity entity, int turn) { if(_game.OpponentEntity == null) return; if(entity.IsHero) { var player = _game.OpponentEntity.IsCurrentPlayer ? ActivePlayer.Opponent : ActivePlayer.Player; if(_lastTurnStart[(int)player] >= turn) return; _lastTurnStart[(int)player] = turn; TurnStart(player, turn); return; } if(turn <= _lastCompetitiveSpiritCheck || !Config.Instance.AutoGrayoutSecrets || !entity.IsMinion || !entity.IsControlledBy(_game.Opponent.Id) || !_game.OpponentEntity.IsCurrentPlayer) return; _lastCompetitiveSpiritCheck = turn; _game.OpponentSecrets.SetZero(Paladin.CompetitiveSpirit); if(Core.MainWindow != null) Core.Overlay.ShowSecrets(); }