示例#1
0
 public Card(string name, card_type type, event_type[] events, item_type itemType)
 {
     this.itemType    = itemType;
     this.logic_event = type;
     this.events      = events == null ? new event_type[] { } : events;
     this.name        = name;
 }
示例#2
0
 public Card(string name, card_type type, event_type[] events, string desc)
 {
     this.logic_event = type;
     this.events      = events == null ? new event_type[] { } : events;
     this.name        = name;
     this.description = desc;
 }
示例#3
0
        public Card(string name, card_type type, List <event_type> events)
        {
            this.name = name;

            this.logic_event = type;
            if (events == null || events.Count == 0)
            {
                this.events = null;
                return;
            }
            this.events = new event_type[events.Count];
            for (int i = 0; i < events.Count; i++)
            {
                this.events[i] = events[i];
            }
        }
示例#4
0
        public static string get_card_type_string(card_type type)
        {
            //* 团购券:GROUPON; 折扣券:DISCOUNT; 礼品券:GIFT; 代金券:CASH; 通用券:GENERAL_COUPON;
            //会员卡:MEMBER_CARD; 景点门票:SCENIC_TICKET; 电影票:MOVIE_TICKET;
            //飞机票:BOARDING_PASS; 会议门票:MEETING_TICKET; 汽车票:BUS_TICKET;

            switch (type)
            {
                case card_type.SCENIC_TICKET:
                    return "景点门票";

                case card_type.MOVIE_TICKET:
                    return "电影票";

                case card_type.BOARDING_PASS:
                    return "飞机票";

                case card_type.MEETING_TICKET:
                    return "会议门票";

                case card_type.BUS_TICKET:
                    return "汽车票";

                case card_type.GROUPON:
                    return "团购券";

                case card_type.GENERAL_COUPON:
                    return "通用券";

                case card_type.DISCOUNT:
                    return "折扣券";

                case card_type.CASH:
                    return "代金券";

                case card_type.MEMBER_CARD:
                    return "会员卡";

                case card_type.GIFT:
                    return "礼品券";

                default:
                    return "未知类型";
            }
        }
示例#5
0
 public Card(card_type type, event_type[] events)
 {
     this.events      = events == null ? new event_type[] { } : events;
     this.logic_event = type;
 }
示例#6
0
    public void iterate_cards()
    {
        var g1      = GameObject.Find("SpecialEvents").GetComponent <SpecialFields>();
        int size    = this.cardsToIterate.Count;
        int current = 0;


        while (current != size)
        {
            card_type et = cardsToIterate[current].getCard_Type();
            {
                switch (et)
                {
                case card_type.BOARDFIELD:
                    GameObject.Find("Tile").GetComponent <TalismanBoardScript>().HelperTextBox.GetComponent <Text>().text = "Wydarzenie specjalne!\nRzuć kością i przekonaj się co się stało!";
                    if (cardsToIterate[current].getName().Equals("Gospoda"))
                    {
                        g1.SetGospodaOn();
                    }
                    else if (cardsToIterate[current].getName().Equals("Cmentarz"))
                    {
                        g1.SetCmentarzOn();
                    }
                    else if (cardsToIterate[current].getName().Equals("Kaplica"))
                    {
                        g1.SetKaplicaOn();
                    }
                    else if (cardsToIterate[current].getName().Equals("Arena"))
                    {
                        g1.SetArenaOn();
                    }
                    else if (cardsToIterate[current].getName().Equals("Las"))
                    {
                        g1.SetLasOn();
                    }
                    else if (cardsToIterate[current].getName().Equals("Czarodziejka"))
                    {
                        g1.SetCzarodziejkaOn();
                    }
                    else if (cardsToIterate[current].getName().Equals("Strażnik"))
                    {
                        g1.SetStraznikOn();
                    }
                    //
                    else if (cardsToIterate[current].getName().Equals("Wieża wampira"))
                    {
                        g1.SetWiezaWampiraOn();
                    }
                    else if (cardsToIterate[current].getName().Equals("Wieża w Dolinie"))
                    {
                        g1.SetWiezaWDolinieOn();
                    }
                    else if (cardsToIterate[current].getName().Equals("Przepaść"))
                    {
                        g1.SetPrzepascOn();
                    }
                    else if (cardsToIterate[current].getName().Equals("Śmierć"))
                    {
                        g1.SetSmiercOn();
                    }
                    //
                    else if (cardsToIterate[current].getName().Equals("Sklep"))
                    {
                        shopCanvas.gameObject.SetActive(true);
                        var go = GameObject.Find("ContentB").GetComponent <ShopScrollList>();
                        go.startShop();
                    }
                    else if (cardsToIterate[current].getName().Equals("Strażnik"))
                    {
                        g1.SetStraznikOn();
                    }
                    else if (cardsToIterate[current].getName().Equals("Przepaść"))
                    {
                        g1.SetPrzepascOn();
                    }
                    else if (cardsToIterate[current].getName().Equals("Krypta"))
                    {
                        g1.SetKryptaOn();
                    }
                    else if (cardsToIterate[current].getName().Equals("Kopalnia"))
                    {
                        g1.SetKopalniaOn();
                    }
                    else if (cardsToIterate[current].getName().Equals("Tajemne Wrota"))
                    {
                        g1.SetTajemneWrotaOn();
                    }
                    else if (cardsToIterate[current].getName().Equals("Czarny Rycerz"))
                    {
                        g1.SetRycerzOn();
                    }
                    else if (cardsToIterate[current].getName().Equals("Zamek"))
                    {
                        g1.SetZamekOn();
                    }
                    break;

                case card_type.ENEMY:
                    GameObject.Find("Tile").GetComponent <TalismanBoardScript>().HelperTextBox.GetComponent <Text>().text = "Spotkałeś na swojej drodze przeciwnika! Możesz walczyć lub próbować ucieczki.";
                    combat.StartCombat(this, cardsToIterate[current]);
                    break;

                case card_type.SPELL:
                    GameObject.Find("Tile").GetComponent <TalismanBoardScript>().HelperTextBox.GetComponent <Text>().text = "Zdobyłeś zaklęcie. Pew! Pew!";
                    CardDrawer.spawnMessage(cardsToIterate[current]);
                    this.getSpells().Add(cardsToIterate[current]);
                    break;

                case card_type.ITEM:
                    GameObject.Find("Tile").GetComponent <TalismanBoardScript>().HelperTextBox.GetComponent <Text>().text = "Zdobyłeś nowy przedmiot!\nMożesz go wykorzystać w panelu EQ!";
                    if (this.getItems().Count < 8)
                    {
                        CardDrawer.spawnMessage(cardsToIterate[current]);
                        this.getItems().Add(cardsToIterate[current]);
                    }
                    else
                    {
                        var go = GameObject.Find("Tile").GetComponent <TalismanBoardScript>();
                        go.showFullEQMessage();
                    }
                    break;

                    //case event_type.ADD_COIN:
                    //    this.gold++;
                    //    break;
                    //case event_type.LOSE_HEALTH:
                    //    this.current_health--;
                    //    break;
                    //case event_type.GAIN_HEALTH:
                    //    this.current_health++;
                    //    break;
                    //case event_type.ROLL_DICE:
                    //    //this.rollDice();
                    //    break;

                    //case card_type.DRAW_CARD:
                    //    Card c = deck.drawCard();
                    //    if (cardsToIterate[current].getCard_Type() == card_type.ITEM)
                    //    {
                    //        this.items.Add(c);
                    //    }
                    //if (cards[current].getCard_Type() == card_type.MAGIC_ITEM)
                    //{
                    //    this.items.Add(c);
                    //}
                    //break;


                    //case event_type:
                    //    combat.StartCombat(this, cardsToIterate[current]);
                    //    break;
                }
            }
            current++;
        }
    }
示例#7
0
        public void addCard(string name, card_type c_t)
        {
            Card c = new Card(name, c_t, new event_type[] { });

            allCardsList.Add(c);
        }