Ejemplo n.º 1
0
 /*****************************************************************************************/
 protected override void BeginGameAction(GameAction gameAction)
 {
     base.BeginGameAction(gameAction);
     if (gameAction is InvestigatorTurn investigatorTurn && CheckActiveEffect(investigatorTurn))
     {
         investigatorTurn.CardEffects.Add(mainCardEffect = new CardEffect(
                                              card: ThisCard,
                                              effect: Heal,
                                              animationEffect: HealAnimation,
                                              type: EffectType.Activate,
                                              name: "Activar " + ThisCard.Info.Name,
                                              actionCost: 1,
                                              investigatorImageCardInfoOwner: ThisCard.VisualOwner));
     }
 }
Ejemplo n.º 2
0
 protected virtual void BuildingCardEffect(InvestigatorTurn investigatorTurn)
 {
     weaponCardEffect = new CardEffect(
         card: ThisCard,
         effect: FightWithThisWeapon,
         payEffect: PayCostEffect,
         animationEffect: FightEffectAnimation2,
         cancelEffect: CancelCardEffect,
         type: EffectType.Activate | EffectType.Fight,
         name: "Atacar con " + ThisCard.Info.Name,
         actionCost: ActionsCost,
         investigatorImageCardInfoOwner: ThisCard.VisualOwner
         );
     investigatorTurn.CardEffects.Add(weaponCardEffect);
 }
Ejemplo n.º 3
0
 /*****************************************************************************************/
 protected override void BuildingCardEffect(InvestigatorTurn investigatorTurn)
 {
     base.BuildingCardEffect(investigatorTurn);
     throwAttack = new CardEffect(
         card: ThisCard,
         effect: ThrowThisWeapon,
         animationEffect: ThrowFightAnimation,
         payEffect: PayThrowEffect,
         cancelEffect: CancelThrowEffect,
         type: EffectType.Activate | EffectType.Fight,
         name: "Lanzar " + ThisCard.Info.Name,
         actionCost: 1,
         investigatorImageCardInfoOwner: ThisCard.VisualOwner);
     investigatorTurn.CardEffects.Add(throwAttack);
 }
Ejemplo n.º 4
0
 protected override void BeginGameAction(GameAction gameAction)
 {
     base.BeginGameAction(gameAction);
     if (gameAction is SkillTestActionComplete skillTestComplete && ActivateEffect(skillTestComplete))
     {
         skillTestComplete.ChooseCardOptionalAction.ChosenCardEffects.Add(cardEffect = new CardEffect(
                                                                              card: ThisCard,
                                                                              effect: ExhaustAndTakeItem,
                                                                              animationEffect: ExhaustAndTakeItemAnimation,
                                                                              checkFilterToCancel: CheckFilterToCancel,
                                                                              type: EffectType.Reaction,
                                                                              needExhaust: true,
                                                                              name: "Robar carta",
                                                                              investigatorImageCardInfoOwner: ThisCard.VisualOwner));
     }
 }
Ejemplo n.º 5
0
 /*****************************************************************************************/
 protected override void BeginGameAction(GameAction gameAction)
 {
     base.BeginGameAction(gameAction);
     if (gameAction is InteractableAction interactableAction && CheckPlayCardInGame(interactableAction))
     {
         interactableAction.CardEffects.Add(cardEffect = new CardEffect(
                                                card: ThisCard,
                                                effect: AutoEvadeEffect,
                                                animationEffect: AutoEvadeEffectAnimation,
                                                payEffect: PayCostEffect,
                                                type: EffectType.Instead,
                                                name: "Activar " + ThisCard.Info.Name,
                                                investigatorImageCardInfoOwner: ThisCard.VisualOwner)
                                            );
     }
 }
Ejemplo n.º 6
0
 /*****************************************************************************************/
 protected override void BeginGameAction(GameAction gameAction)
 {
     base.BeginGameAction(gameAction);
     if (gameAction is InvestigatorTurn investigatorTurn && CheckplayOldBookEffect(investigatorTurn))
     {
         investigatorTurn.CardEffects.Add(oldBookEffect = new CardEffect(
                                              card: ThisCard,
                                              effect: OldBookEffect,
                                              animationEffect: OldBookEffectAnimation,
                                              type: EffectType.Activate,
                                              name: "Usar " + ThisCard.Info.Name,
                                              actionCost: 1,
                                              needExhaust: true,
                                              investigatorImageCardInfoOwner: ThisCard.VisualOwner));
     }
 }
Ejemplo n.º 7
0
        public override IEnumerator ChaosTokenWinEffect()
        {
            CardEffect cardEffect = new CardEffect(
                card: ThisCard,
                effect: TakingResources,
                animationEffect: TakingResourcesAnimation,
                type: EffectType.Choose,
                name: "Obtener recursos",
                investigatorImageCardInfoOwner: ThisCard.Owner);

            GameControl.CurrentSkillTestAction.SkillTest.WinEffect.Add(cardEffect);
            yield return(null);

            IEnumerator TakingResourcesAnimation() => new AnimationCardAction(ThisCard, audioClip: ThisCard.Effect5).RunNow();

            IEnumerator TakingResources() => new AddTokenAction(ThisCard.ResourcesToken, 2).RunNow();
        }
Ejemplo n.º 8
0
 /*****************************************************************************************/
 protected override void BeginGameAction(GameAction gameAction)
 {
     base.BeginGameAction(gameAction);
     if (gameAction is InvestigatorTurn investigatorTurn && CheckInvestigate(investigatorTurn))
     {
         investigatorTurn.CardEffects.Add(investigateWithFlash = new CardEffect(
                                              card: ThisCard,
                                              effect: InvestigateWithFlash,
                                              animationEffect: InvestigateWithFlashAnimation,
                                              payEffect: PayCostEffect,
                                              cancelEffect: CancelEffect,
                                              type: EffectType.Activate | EffectType.Investigate,
                                              name: "Investigar con " + ThisCard.Info.Name,
                                              actionCost: 1,
                                              investigatorImageCardInfoOwner: ThisCard.VisualOwner)
                                          );
     }
 }
Ejemplo n.º 9
0
 /*****************************************************************************************/
 protected override void BeginGameAction(GameAction gameAction)
 {
     base.BeginGameAction(gameAction);
     if (gameAction is InteractableAction interactableAction && CheckPlayCardInGame(interactableAction))
     {
         interactableAction.CardEffects.Add(activateEffect = new CardEffect(
                                                card: ThisCard,
                                                effect: ChooseEnemy,
                                                animationEffect: ChooseEnemyAnimation,
                                                payEffect: PayCostEffect,
                                                cancelEffect: CancelCardEffect,
                                                needExhaust: NeedExhaust,
                                                type: EffectType.Instead,
                                                name: "Activar " + ThisCard.Info.Name,
                                                investigatorImageCardInfoOwner: ThisCard.VisualOwner)
                                            );
     }
 }
Ejemplo n.º 10
0
 /*****************************************************************************************/
 protected override void BeginGameAction(GameAction gameAction)
 {
     base.BeginGameAction(gameAction);
     if (gameAction is EnemyAttackAction enemyAttack && ActivateEffect(enemyAttack))
     {
         enemyAttack.ChooseCardOptionalAction.ChosenCardEffects.Add(cardEffect = new CardEffect(
                                                                        card: ThisCard,
                                                                        effect: () => ExhaustAndDoDamage(enemyAttack),
                                                                        animationEffect: ExhaustAndDoDamageAnimation,
                                                                        payEffect: PayCostEffect,
                                                                        cancelEffect: CancelEffect,
                                                                        checkFilterToCancel: () => CheckFilterToCancel(enemyAttack),
                                                                        needExhaust: true,
                                                                        type: EffectType.Reaction,
                                                                        name: "Activar " + ThisCard.Info.Name,
                                                                        investigatorImageCardInfoOwner: ThisCard.VisualOwner));
     }
 }
Ejemplo n.º 11
0
 /*****************************************************************************************/
 protected override void EndGameAction(GameAction gameAction)
 {
     base.EndGameAction(gameAction);
     if (gameAction is RevealChaosTokenAction revealChaosT && ChangeToken())
     {
         revealChaosT.ChooseCardOptionalAction.ChosenCardEffects.Add(newTokenCardEffect = new CardEffect(
                                                                         card: ThisCard,
                                                                         effect: () => ChangingToken(revealChaosT),
                                                                         animationEffect: ChangingTokenAnimation,
                                                                         payEffect: PayCostEffect,
                                                                         type: EffectType.Reaction,
                                                                         name: "Revelar una nuevo token",
                                                                         investigatorImageCardInfoOwner: ThisCard.Owner));
     }
     if (gameAction is SkillTestAction)
     {
         effectUsed = false;
     }
 }
Ejemplo n.º 12
0
 /*****************************************************************************************/
 protected override void BeginGameAction(GameAction gameAction)
 {
     base.BeginGameAction(gameAction);
     if (gameAction is InvestigatorTurn investigatorTurn && CheckActiveEffect(investigatorTurn))
     {
         investigatorTurn.CardEffects.Add(cardEffect = new CardEffect(
                                              card: ThisCard,
                                              effect: SearchDeck,
                                              animationEffect: SearchDeckAnimation,
                                              payEffect: PayCostEffect,
                                              cancelEffect: CancelEffect,
                                              type: EffectType.Activate,
                                              name: "Activar " + ThisCard.Info.Name,
                                              actionCost: 1,
                                              needExhaust: true,
                                              investigatorImageCardInfoOwner: ThisCard.VisualOwner)
                                          );
     }
 }
Ejemplo n.º 13
0
 /*****************************************************************************************/
 protected override void BeginGameAction(GameAction gameAction)
 {
     base.BeginGameAction(gameAction);
     if (gameAction is InvestigatorTurn investigatorTurn && CheckPlayCardInGame(investigatorTurn))
     {
         investigatorTurn.CardEffects.Add(evadeAll = new CardEffect(
                                              card: ThisCard,
                                              effect: EvadeAll,
                                              animationEffect: EvadeAllAnimation,
                                              type: EffectType.Activate,
                                              name: "Activar " + ThisCard.Info.Name,
                                              actionCost: 1,
                                              needExhaust: true,
                                              investigatorImageCardInfoOwner: ThisCard.VisualOwner)
                                          );
     }
     if (gameAction is OportunityAttack oportunityAttack && CheckOportunityAttack(oportunityAttack))
     {
         oportunityAttack.IsActionCanceled = true;
     }
 }
Ejemplo n.º 14
0
        public override IEnumerator ChaosTokenWinEffect()
        {
            CardEffect cardEffect = new CardEffect(
                card: ThisCard,
                effect: DrawCards,
                type: EffectType.Choose,
                name: "Robar cartas",
                investigatorImageCardInfoOwner: ThisCard.Owner);

            if (AllCardsTome.Count > 0)
            {
                GameControl.CurrentSkillTestAction.SkillTest.WinEffect.Add(cardEffect);
            }

            IEnumerator DrawCards()
            {
                for (int i = 0; i < AllCardsTome.Count; i++)
                {
                    yield return(new DrawAction(ThisCard.Owner).RunNow());
                }
            }

            yield return(null);
        }
 /*****************************************************************************************/
 public AdviseDiscardAssetAction(CardEffect cardEffect, InvestigatorComponent investigator)
 {
     this.cardEffect   = cardEffect;
     this.investigator = investigator;
 }
Ejemplo n.º 16
0
 public ChooseCardAction(CardEffect cardEffects, bool isOptionalChoice, bool isFastAction = false)
 {
     ChosenCardEffects.Add(cardEffects);
     this.isFastAction     = isFastAction;
     this.isOptionalChoice = isOptionalChoice;
 }
Ejemplo n.º 17
0
 public ChooseCardAction(List <CardEffect> cardEffects, ref CardEffect cancelableCardEffect)
 {
     ChosenCardEffects         = cardEffects;
     this.cancelableCardEffect = cancelableCardEffect;
     isOptionalChoice          = cancelableCardEffect.IsCancelable;
 }
Ejemplo n.º 18
0
 /*****************************************************************************************/
 public ChooseCardAction(CardEffect cardEffects, ref CardEffect cancelableCardEffect)
 {
     ChosenCardEffects.Add(cardEffects);
     this.cancelableCardEffect = cancelableCardEffect;
     isOptionalChoice          = cancelableCardEffect.IsCancelable;
 }
Ejemplo n.º 19
0
 /*****************************************************************************************/
 public ExecuteCardAction(CardEffect cardEffect)
 {
     CardEffect   = cardEffect;
     Investigator = cardEffect.PlayOwner;
 }
Ejemplo n.º 20
0
 /*****************************************************************************************/
 public FightWithWeaponAction(ref CardEffect weaponCardEffect, Func <CardComponent, IEnumerator> fight)
 {
     this.weaponCardEffect = weaponCardEffect;
     this.fight            = fight;
 }
 /*****************************************************************************************/
 public CheckCancelSkillTest(CardEffect cardEffect) => this.cardEffect = cardEffect;
 /*****************************************************************************************/
 public OportunityAttack(CardEffect cardEffect, InvestigatorComponent investigator)
 {
     CardEffect        = cardEffect;
     this.investigator = investigator;
 }