void PayDebts(InteractableAction interactableAction)
        {
            interactableAction.CardEffects.Add(new CardEffect(
                                                   card: ThisCard,
                                                   effect: ChooseInvestigatorToPay,
                                                   type: EffectType.Instead,
                                                   name: "Pagar 1 recurso a " + ThisCard.Info.Name));
            IEnumerator ChooseInvestigatorToPay()
            {
                List <CardEffect> cardEffects = new List <CardEffect>();

                foreach (CardComponent investigator in GameControl.AllInvestigatorsInGame.Where(i => i.Resources > 0 && i.CurrentLocation == Investigator.CurrentLocation).Select(i => i.InvestigatorCardComponent))
                {
                    cardEffects.Add(new CardEffect(
                                        card: investigator,
                                        effect: () => PayResource(investigator),
                                        type: EffectType.Choose,
                                        name: "Pagar " + ThisCard.Info.Name + " con " + investigator.Info.Name,
                                        investigatorImageCardInfoOwner: investigator.Owner,
                                        investigatorRealOwner: ThisCard.VisualOwner));
                }
                yield return(new ChooseCardAction(cardEffects, isOptionalChoice: true).RunNow());
            }

            IEnumerator PayResource(CardComponent investigator)
            {
                amountUsed++;
                yield return(new AddTokenAction(ThisCard.ResourcesToken, 1, investigator.ResourcesToken).RunNow());
            }
        }
Example #2
0
 /*****************************************************************************************/
 protected override bool CheckPlayCardInGame(InteractableAction interactableAction)
 {
     if (ThisCard.IsExausted)
     {
         return(false);
     }
     return(base.CheckPlayCardInGame(interactableAction));
 }
Example #3
0
 bool CheckPlayCardInGame(InteractableAction interactableAction)
 {
     if (!interactableAction.CanPlayFastAction)
     {
         return(false);
     }
     if (!ThisCard.IsInPlay)
     {
         return(false);
     }
     return(true);
 }
 protected virtual bool PlayingCard(InteractableAction interactableAction)
 {
     if (GameControl.ActiveInvestigator != ThisCard.VisualOwner)
     {
         return(false);
     }
     if (!interactableAction.CanPlayFastAction)
     {
         return(false);
     }
     if (!CheckPlayedFromHand())
     {
         return(false);
     }
     return(true);
 }
Example #5
0
 bool GiveClues(InteractableAction interactableAction)
 {
     if (GameControl.TurnInvestigator == null)
     {
         return(false);
     }
     if (!interactableAction.CanPlayFastAction)
     {
         return(false);
     }
     if (!GameControl.AllInvestigatorsInGame.Exists(c => c.InvestigatorCardComponent.CluesToken.Amount > 0))
     {
         return(false);
     }
     return(true);
 }
 bool CheckPlayCardInGame(InteractableAction interactableAction)
 {
     if (!interactableAction.CanPlayFastAction)
     {
         return(false);
     }
     if (!ThisCard.IsInPlay)
     {
         return(false);
     }
     if (!GameControl.TurnInvestigator)
     {
         return(false);
     }
     return(true);
 }
Example #7
0
 protected virtual bool CheckPlayCardInGame(InteractableAction interactableAction)
 {
     if (!interactableAction.CanPlayFastAction)
     {
         return(false);
     }
     if (!ThisCard.IsInPlay)
     {
         return(false);
     }
     if (ThisCard.VisualOwner.AllEnemiesInMyLocation.Count < 1)
     {
         return(false);
     }
     return(true);
 }
Example #8
0
 protected virtual bool CheckPlayCardFromHandAsFast(InteractableAction interactableAction)
 {
     if (!interactableAction.CanPlayFastAction)
     {
         return(false);
     }
     if (GameControl.TurnInvestigator != ThisCard.VisualOwner)
     {
         return(false);
     }
     if (ThisCard.CurrentZone != interactableAction.ActiveInvestigator.Hand)
     {
         return(false);
     }
     return(true);
 }
 bool CheckPlayCardInGame(InteractableAction interactableAction)
 {
     if (!interactableAction.CanPlayFastAction)
     {
         return(false);
     }
     if (!ThisCard.IsInPlay)
     {
         return(false);
     }
     if (ThisCard.VisualOwner.AllEnemiesInMyLocation.FindAll(c => ((CardEnemy)c.CardLogic).CanBeEvaded && !c.KeyWords.Contains("Elite")).Count < 1)
     {
         return(false);
     }
     return(true);
 }
Example #10
0
 bool CheckPlayCardInGame(InteractableAction interactableAction)
 {
     if (!interactableAction.CanPlayFastAction)
     {
         return(false);
     }
     if (!ThisCard.IsInPlay)
     {
         return(false);
     }
     if (ThisCard.VisualOwner.CurrentLocation.CardLogic.ThisCard.CluesToken.Amount > 0)
     {
         return(false);
     }
     return(true);
 }
 bool CanPlayFastEffect(InteractableAction interactableAction)
 {
     if (!interactableAction.CanPlayFastAction)
     {
         return(false);
     }
     if (!ThisCard.IsInPlay)
     {
         return(false);
     }
     if (!GameControl.AllInvestigatorsInGame.Exists(i => i.Resources > 0 && i.CurrentLocation == Investigator.CurrentLocation))
     {
         return(false);
     }
     if (amountUsed >= 2)
     {
         return(false);
     }
     return(true);
 }
 bool CheckPayExtraTurn(InteractableAction interactableAction)
 {
     if (GameControl.TurnInvestigator != ThisCard.Owner)
     {
         return(false);
     }
     if (!interactableAction.CanPlayFastAction)
     {
         return(false);
     }
     if (ThisCard.Owner.Resources < 2)
     {
         return(false);
     }
     if (effectUsed)
     {
         return(false);
     }
     return(true);
 }