Exemplo n.º 1
0
    public override void setupCustom()
    {
        Card_Heal blueprintCustom = (Card_Heal)blueprint;

        healAmount = blueprintCustom.healAmount;
        range      = blueprintCustom.range;
    }
Exemplo n.º 2
0
    //used when loading in the cards on start
    public Card getCardFromXMLNode(XmlNode node)
    {
        Card thisCard = null;

        string scriptName = node ["script"].InnerText;

        if (scriptName == "Card_Loot")
        {
            thisCard = new Card_Loot(node);
        }
        else if (scriptName == "Card_Movement")
        {
            thisCard = new Card_Movement(node);
        }
        else if (scriptName == "Card_Attack")
        {
            thisCard = new Card_Attack(node);
        }
        else if (scriptName == "Card_AttackTypeCount")
        {
            thisCard = new  Card_AttackTypeCount(node);
        }
        else if (scriptName == "Card_BasicAOEAttack")
        {
            thisCard = new Card_BasicAOEAttack(node);
        }
        else if (scriptName == "Card_BasicTargetBonus")
        {
            thisCard = new Card_BasicTargetBonus(node);
        }
        else if (scriptName == "Card_CardsPlayedBonus")
        {
            thisCard = new Card_CardsPlayedBonus(node);
        }
        else if (scriptName == "Card_CoverAttack")
        {
            thisCard = new Card_CoverAttack(node);
        }
        else if (scriptName == "Card_GiveCharm")
        {
            thisCard = new Card_GiveCharm(node);
        }
        else if (scriptName == "Card_Heal")
        {
            thisCard = new Card_Heal(node);
        }
        else if (scriptName == "Card_MoveAndAttack")
        {
            thisCard = new Card_MoveAndAttack(node);
        }
        else if (scriptName == "Card_MoveAttackAOE")
        {
            thisCard = new Card_MoveAttackAOE(node);
        }
        else if (scriptName == "Card_TeamDash")
        {
            thisCard = new Card_TeamDash(node);
        }
        else if (scriptName == "Card_Teleport")
        {
            thisCard = new Card_Teleport(node);
        }
        else if (scriptName == "Card_Trade_Places")
        {
            thisCard = new Card_Trade_Places(node);
        }
        else if (scriptName == "Card_DirectDamage")
        {
            thisCard = new Card_DirectDamage(node);
        }
        else if (scriptName == "Card_Equipment")
        {
            thisCard = new Card_Equipment(node);
        }
        else if (scriptName == "Card_RemoveCharm")
        {
            thisCard = new Card_RemoveCharm(node);
        }
        else if (scriptName == "Card_SpawnUnit")
        {
            thisCard = new Card_SpawnUnit(node);
        }
        else if (scriptName == "Card_DiscardAndDraw")
        {
            thisCard = new Card_DiscardAndDraw(node);
        }
        else if (scriptName == "Card_ChangeCover")
        {
            thisCard = new Card_ChangeCover(node);
        }
        else if (scriptName == "Card_LatchOn")
        {
            thisCard = new Card_LatchOn(node);
        }
        else if (scriptName == "Card_LeechBite")
        {
            thisCard = new Card_LeechBite(node);
        }
        else
        {
            Debug.Log("SCRIPT NAME FOR CARD NOT FOUND: " + scriptName);
        }

        return(thisCard);
    }
Exemplo n.º 3
0
    //used to actually get new cards during the game
    public Card getCardFromBlueprint(Card blueprint)
    {
        Card thisCard = null;

        string scriptName = blueprint.scriptName;

        if (scriptName == "Card_Loot")
        {
            thisCard = new Card_Loot();
        }
        else if (scriptName == "Card_Movement")
        {
            thisCard = new Card_Movement();
        }
        else if (scriptName == "Card_Attack")
        {
            thisCard = new Card_Attack();
        }
        else if (scriptName == "Card_AttackTypeCount")
        {
            thisCard = new  Card_AttackTypeCount();
        }
        else if (scriptName == "Card_BasicAOEAttack")
        {
            thisCard = new Card_BasicAOEAttack();
        }
        else if (scriptName == "Card_BasicTargetBonus")
        {
            thisCard = new Card_BasicTargetBonus();
        }
        else if (scriptName == "Card_CardsPlayedBonus")
        {
            thisCard = new Card_CardsPlayedBonus();
        }
        else if (scriptName == "Card_CoverAttack")
        {
            thisCard = new Card_CoverAttack();
        }
        else if (scriptName == "Card_GiveCharm")
        {
            thisCard = new Card_GiveCharm();
        }
        else if (scriptName == "Card_Heal")
        {
            thisCard = new Card_Heal();
        }
        else if (scriptName == "Card_MoveAndAttack")
        {
            thisCard = new Card_MoveAndAttack();
        }
        else if (scriptName == "Card_MoveAttackAOE")
        {
            thisCard = new Card_MoveAttackAOE();
        }
        else if (scriptName == "Card_TeamDash")
        {
            thisCard = new Card_TeamDash();
        }
        else if (scriptName == "Card_Teleport")
        {
            thisCard = new Card_Teleport();
        }
        else if (scriptName == "Card_Trade_Places")
        {
            thisCard = new Card_Trade_Places();
        }
        else if (scriptName == "Card_DirectDamage")
        {
            thisCard = new Card_DirectDamage();
        }
        else if (scriptName == "Card_Equipment")
        {
            thisCard = new Card_Equipment();
        }
        else if (scriptName == "Card_RemoveCharm")
        {
            thisCard = new Card_RemoveCharm();
        }
        else if (scriptName == "Card_SpawnUnit")
        {
            thisCard = new Card_SpawnUnit();
        }
        else if (scriptName == "Card_DiscardAndDraw")
        {
            thisCard = new Card_DiscardAndDraw();
        }
        else if (scriptName == "Card_ChangeCover")
        {
            thisCard = new Card_ChangeCover();
        }
        else if (scriptName == "Card_LatchOn")
        {
            thisCard = new Card_LatchOn();
        }
        else if (scriptName == "Card_LeechBite")
        {
            thisCard = new Card_LeechBite();
        }
        else
        {
            Debug.Log("SCRIPT NAME FOR BLUEPRINT NOT FOUND: " + scriptName);
        }

        if (thisCard != null)
        {
            thisCard.blueprint = blueprint;
        }
        return(thisCard);
    }