public override void OnCardSelected(BoardUnit unit) { if (unit.CurrentHp <= 0) { return; } if (PossibleTargets.Contains(Enumerators.AbilityTargetType.PLAYER_CARD) && unit.GameObject.CompareTag(SRTags.PlayerOwned) || PossibleTargets.Contains(Enumerators.AbilityTargetType.OPPONENT_CARD) && unit.GameObject.CompareTag(SRTags.OpponentOwned) || PossibleTargets.Contains(Enumerators.AbilityTargetType.ALL)) { if (TargetUnitType == Enumerators.CardType.NONE || unit.InitialUnitType == TargetUnitType) { if (TargetUnitStatusType == Enumerators.UnitStatusType.NONE || unit.UnitStatus == TargetUnitStatusType) { if (SelfBoardCreature != unit) { SelectedCard?.SetSelectedUnit(false); SelectedCard = unit; SelectedPlayer?.SetGlowStatus(false); SelectedPlayer = null; SelectedCard.SetSelectedUnit(true); CardSelected?.Invoke(unit); } } } } }
public override void OnPlayerUnselected(Player player) { if (SelectedPlayer == player) { SelectedCard?.SetSelectedUnit(false); SelectedCard = null; SelectedPlayer.SetGlowStatus(false); SelectedPlayer = null; } }
public override void OnCardSelected(BoardUnit unit) { if (TutorialManager.IsTutorial && TutorialManager.CurrentTutorialDataStep.BoardArrowCantUsableOnUnit) { return; } if (IgnoreBoardObjectsList != null && IgnoreBoardObjectsList.Contains(unit)) { return; } if (unit.CurrentHp <= 0) { return; } if (ElementType.Count > 0 && !ElementType.Contains(unit.Card.LibraryCard.CardSetType)) { return; } if (TargetsType.Contains(Enumerators.SkillTargetType.ALL_CARDS) || TargetsType.Contains(Enumerators.SkillTargetType.PLAYER_CARD) && unit.Transform.CompareTag("PlayerOwned") || TargetsType.Contains(Enumerators.SkillTargetType.OPPONENT_CARD) && unit.Transform.CompareTag("OpponentOwned")) { bool opponentHasProvoke = OpponentBoardContainsProvokingCreatures(); if (!opponentHasProvoke || opponentHasProvoke && unit.IsHeavyUnit() || IgnoreHeavy) { SelectedCard?.SetSelectedUnit(false); SelectedCard = unit; SelectedPlayer?.SetGlowStatus(false); SelectedPlayer = null; SelectedCard.SetSelectedUnit(true); } } }