예제 #1
0
    //[ATK] Elysian Emblem [SUPP] You may choose 1 ally other than your attacking unit, and move them.
    public override void ActivateAttackSupportSkill()
    {
        //Checks that there is more than one ally in play.
        if (Owner.FieldCards.Count > 1)
        {
            //check if the player wants to activate Crodelia's skill.  Call a dialogue box.
            DialogueWindowDetails details = new DialogueWindowDetails
            {
                windowTitleText = "Elysian Emblem",
                questionText    = "Would you like to activate " + CharName + "'s Elysian Emblem?" +
                                  "\n\n[ATK] Elysian Emblem [SUPP] You may choose one ally that is not the attacking unit, and move it.",
                button1Details = new DialogueButtonDetails
                {
                    buttonText   = "Yes",
                    buttonAction = () => { TargetElysianEmblem(); }
                },
                button2Details = new DialogueButtonDetails
                {
                    buttonText   = "No",
                    buttonAction = () => { GameManager.instance.ActivateDefenderSupport(); }
                }
            };

            DialogueWindow dialogueWindow = DialogueWindow.Instance();
            dialogueWindow.MakeChoice(details);
        }
        else
        {
            GameManager.instance.ActivateDefenderSupport();
        }
    }
예제 #2
0
    //[ATK] Elysian Emblem [SUPP] Choose 1 ally other than your attacking unit. You may move that ally.
    public static void ElysianEmblem()
    {
        //Checks that there is more than one other ally besides the attacking card in play.
        if (GameManager.instance.CurrentAttacker.OtherAllies.Count > 0)
        {
            //check if the player wants to activate this skill.  Call a dialogue box.
            DialogueWindowDetails details = new DialogueWindowDetails
            {
                windowTitleText = "Elysian Emblem",
                questionText    = "Would you like to activate the supported "
                                  + GameManager.instance.CurrentAttacker.Owner.SupportCard.CharName + "'s Elysian Emblem?" +
                                  "\n\n[ATK] Elysian Emblem [SUPP] Choose 1 ally other than your attacking unit. You may move that ally.",
                button1Details = new DialogueButtonDetails
                {
                    buttonText   = "Yes",
                    buttonAction = () => { TargetElysianEmblem(); }
                },
                button2Details = new DialogueButtonDetails
                {
                    buttonText   = "No",
                    buttonAction = () => { GameManager.instance.ActivateDefenderSupport(); }
                }
            };

            DialogueWindow dialogueWindow = DialogueWindow.Instance();
            dialogueWindow.MakeChoice(details);
        }
        else
        {
            GameManager.instance.ActivateDefenderSupport();
        }
    }
예제 #3
0
    //deploys a card on the field
    //should only be called by the ContextMenu buttons and so doesn't do any checks on location, etc.
    public void DeployToFieldFromHand(BasicCard card)
    {
        //Update the used bonds before anything changes on the board.
        GameManager.instance.bondDeployCount += card.DeploymentCost;

        //remove the card from the hand.
        Hand.Remove(card);

        //We need to know where to deploy this card.  Call a dialogue box.
        DialogueWindowDetails details = new DialogueWindowDetails
        {
            windowTitleText = "Deployment",
            questionText    = "Where would you like to deploy " + card.CharName + "?",
            button1Details  = new DialogueButtonDetails
            {
                buttonText   = "Front Line",
                buttonAction = () => { DeployToFrontLine(card); }
            },
            button2Details = new DialogueButtonDetails
            {
                buttonText   = "Back Line",
                buttonAction = () => { DeployToBackLine(card); }
            }
        };

        DialogueWindow dialogueWindow = DialogueWindow.Instance();

        dialogueWindow.MakeChoice(details);
    }
예제 #4
0
    //[Formation Skill] Bord, Cord, and Barst [TRIGGER] [Tap allied "Bord" and "Cord"]
    //When this unit attacks, you may pay the cost, and if you do:
    //Until the end of this combat, this unit gains +50 attack and the number of Orbs that this unit's attack will destroy becomes 2.

    //Ensures the conditions are met to activate the formation skill and then asks the player if they want to activate that ability.
    private void CheckFormationSkill(bool attacking)
    {
        //check that this unit is attacking and that there are other allies.
        if (attacking && OtherAllies.Count >= 1)
        {
            //check if Bord is deployed
            List <BasicCard> otherAllies = OtherAllies;
            int b = otherAllies.FindIndex(ally => ally.CompareNames("Bord"));

            if (b >= 0)
            {
                //check if Cord is deployed
                int c = otherAllies.FindIndex(ally => ally.CompareNames("Cord"));

                if (c >= 0)
                {
                    //confirm Bord and Cord are both untapped.
                    if (!otherAllies[b].Tapped && !otherAllies[c].Tapped)
                    {
                        //conditions met; call a dialogue box to confirm if the player wants to use Formation Skill.
                        DialogueWindowDetails details = new DialogueWindowDetails
                        {
                            windowTitleText = "Formation Skill",
                            questionText    = "Would you like to activate Barst's Formation Skill?" +
                                              "\n\n[Formation Skill] Bord, Cord, and Barst [TRIGGER] [Tap allied \"Bord\" and \"Cord\"] When this unit attacks, you may pay the cost, and if you do: Until the end of this combat, this unit gains +50 attack and the number of Orbs that this unit's attack will destroy becomes 2.",
                            button1Details = new DialogueButtonDetails
                            {
                                buttonText   = "Yes",
                                buttonAction = () => { FormationSkill(otherAllies[b], otherAllies[c]); }
                            },
                            button2Details = new DialogueButtonDetails
                            {
                                buttonText   = "No",
                                buttonAction = () => { Debug.Log("No Formation Skill. :("); }
                            }
                        };

                        DialogueWindow dialogueWindow = DialogueWindow.Instance();
                        dialogueWindow.MakeChoice(details);
                    }
                }
            }
        }
    }
예제 #5
0
    //Green-Red Twin Strike [TRIGGER] [Tap an allied "Cain"] When this unit attacks, you may pay the cost and if you do: Until the end of this combat, this unit gains +40 attack.
    //Ensures the conditions are met to make a twin strike and then asks the player if they want to activate that ability.
    private void CheckTwinStrike(bool attacking)
    {
        //check that this unit is attacking.
        if (attacking)
        {
            //Check that there are other allies.
            if (OtherAllies.Count >= 1)
            {
                //check if Cain is deployed
                List <BasicCard> otherAllies = OtherAllies;
                int n = otherAllies.FindIndex(ally => ally.CompareNames("Cain"));

                if (n >= 0)
                {
                    //confirm Cain is untapped.
                    if (!otherAllies[n].Tapped)
                    {
                        //conditions met; call a dialogue box to confirm if the player wants to use Green-Red Twin Strike.
                        DialogueWindowDetails details = new DialogueWindowDetails
                        {
                            windowTitleText = "Green-Red Twin Strike",
                            questionText    = "Would you like to activate Abel's Green-Red Twin Strike?" +
                                              "\n\nGreen-Red Twin Strike [TRIGGER] [Tap an allied \"Cain\"] When this unit attacks, you may pay the cost and if you do: Until the end of this combat, this unit gains +40 attack.",
                            button1Details = new DialogueButtonDetails
                            {
                                buttonText   = "Yes",
                                buttonAction = () => { GreenRedTwinStrike(otherAllies[n]); }
                            },
                            button2Details = new DialogueButtonDetails
                            {
                                buttonText   = "No",
                                buttonAction = () => { Debug.Log("No Green-Red Twin Strike. :("); }
                            }
                        };

                        DialogueWindow dialogueWindow = DialogueWindow.Instance();
                        dialogueWindow.MakeChoice(details);
                    }
                }
            }
        }
    }
예제 #6
0
    //calls the dialogue box for the player to choose to use Prince of Light.
    public override void ActivateTriggerSkill(BasicCard triggeringCard)
    {
        DialogueWindowDetails details = new DialogueWindowDetails
        {
            windowTitleText = "Marth's Prince of Light",
            questionText    = "Would you like to activate Marth's skill?" +
                              "\n\nPrince of Light [TRIGGER] [ONCE PER TURN] When you deploy an ally with a Deployment Cost 2 or lower, you may choose 1 enemy in the Back Line, and move them.",
            button1Details = new DialogueButtonDetails
            {
                buttonText   = "Yes",
                buttonAction = () => { ChooseHoLTarget(); },
            },
            button2Details = new DialogueButtonDetails
            {
                buttonText   = "No",
                buttonAction = () => { Owner.deployTriggerTracker.RecheckTrigger(); },
            }
        };

        DialogueWindow dialogueWindow = DialogueWindow.Instance();

        dialogueWindow.MakeChoice(details);
    }
예제 #7
0
    //calls the dialogue box for the player to choose to use Warning Shot.
    public override void ActivateTriggerSkill(BasicCard triggeringCard)
    {
        DialogueWindowDetails details = new DialogueWindowDetails
        {
            windowTitleText = "Gordin's Warning Shot",
            questionText    = "Would you like to activate Gordin's skill?" +
                              "\n\nWarning Shot [TRIGGER] When you deploy an ally with a Deployment Cost 2 or less, you may choose 1 <Flier> enemy, and move them.",
            button1Details = new DialogueButtonDetails
            {
                buttonText   = "Yes",
                buttonAction = () => { ChooseWSTarget(); },
            },
            button2Details = new DialogueButtonDetails
            {
                buttonText   = "No",
                buttonAction = () => { Owner.deployTriggerTracker.RecheckTrigger(); },
            }
        };

        DialogueWindow dialogueWindow = DialogueWindow.Instance();

        dialogueWindow.MakeChoice(details);
    }
예제 #8
0
    //Calls the dialogue box for the player to choose to use this skill
    public override void ActivateTriggerSkill(BasicCard triggeringCard)
    {
        //lets the player choose whether to activate the skill or not.
        DialogueWindowDetails details = new DialogueWindowDetails
        {
            windowTitleText = "Caeda's Wyvern Whip",
            questionText    = "Would you like to activate Caeda's skill?" +
                              "\n\nWyvern Whip [TRIGGER] Each time an ally with a Deployment Cost of 2 or lower is deployed, you may choose as many allies as you wish, and move them.",
            button1Details = new DialogueButtonDetails
            {
                buttonText   = "Yes",
                buttonAction = () => { ChooseWWTarget(); },
            },
            button2Details = new DialogueButtonDetails
            {
                buttonText   = "No",
                buttonAction = () => { Owner.deployTriggerTracker.RecheckTrigger(); },
            }
        };

        DialogueWindow dialogueWindow = DialogueWindow.Instance();

        dialogueWindow.MakeChoice(details);
    }