예제 #1
0
 internal override void EndTurn()
 {
     buy    = 1;
     action = 1;
     Money  = 0;
     DoTurn();
     CardTrash();
     GetForm().Invoke(new TrashVisbleDelegate(TrashVisible));
     for (int i = 0; i < ShowHand.Count; i++)
     {
         GetForm().Invoke(new TrashDelegate(ShowHand[i].Trash), 740, 10 + 120 * num);
     }
     for (int i = 0; i < ShowField.Count; i++)
     {
         GetForm().Invoke(new TrashDelegate(ShowField[i].Trash), 740, 10 + 120 * num);
     }
     BuyList.Clear();
     ShowField.Clear();
     ShowHand.Clear();
     DrawCard(5);
     GetForm().Invoke(new SetCountDelegate(SetCount), Deck.Count);
     //
     //
     //
     //
     //  AI作れ
     //
     //
     //
     //
     //
 }
예제 #2
0
 internal override void EndTurn()
 {
     GetForm().Invoke(new AllSupplyClickDelegate(form1.AllSupplyClickOff));
     GetForm().Invoke(new AllSupplyClickDelegate(ShowDeck.CardClickOff));
     CardTrash();
     GetForm().Invoke(new TrashVisbleDelegate(TrashVisible));
     for (int i = 0; i < ShowHand.Count; i++)
     {
         GetForm().Invoke(new TrashDelegate(ShowHand[i].Trash), 20, 540);
     }
     for (int i = 0; i < ShowField.Count; i++)
     {
         GetForm().Invoke(new TrashDelegate(ShowField[i].Trash), 20, 540);
     }
     ShowField.Clear();
     ShowHand.Clear();
     DrawCard(5);
     GetForm().Invoke(new SetTurnDelegate(SetTurn));
     ChangeTurn();
     if (form1.EndGameFlag())
     {
         GetForm().Invoke(new EndGameDelegate(form1.EndGame));
     }
     else
     {
         EnemyTurn();
     }
     if (!form1.EndGameFlag())
     {
         GetForm().Invoke(new AllSupplyClickDelegate(ShowDeck.CardClickOn));
         GetForm().Invoke(new AllSupplyClickDelegate(form1.AllSupplyClickOn));
         ChangeTurn();
     }
 }
예제 #3
0
    void Start()
    {
        currentPos = wepon.transform.localPosition;
        currentUp  = wepon.transform.right;

        ShowHandControl = GameObject.Find("ShowHand").GetComponent <ShowHand>();

        barControl            = bar.GetComponent <Image> ();
        barControl.fillAmount = 0;
    }
예제 #4
0
 internal override void TrashCard(PlayCard p)
 {
     p.Trash(20, 540);
     ShowHand.Remove(p);
     Hand.Remove(p.Name);
     AddTrash(p.Name);
     TrashVisible();
     if (ShowHand.Count != 0)
     {
         ShowHand[0].Sort();
     }
 }
예제 #5
0
 internal override void TrashCard()
 {
     for (int i = 0; i < ShowHand.Count(); i++)
     {
         ShowHand[i].Trash(20, 540);
         AddTrash(ShowHand[i].Name);
         Hand.Remove(ShowHand[i].Name);
         ShowHand.Remove(ShowHand[i]);
         TrashVisible();
     }
     if (ShowHand.Count != 0)
     {
         ShowHand[0].Sort();
     }
 }
예제 #6
0
 internal override void TrashCard(int p)
 {
     if (!Hand.Contains("堀"))
     {
         for (int i = 0; i < p; i++)
         {
             //
             //
             //
             //
             //カードを捨てるAI作る
             //
             //
             //
             //
             ShowHand[0].Trash(740, 10 + 120 * num);
             AddTrash(ShowHand[0].Name);
             Hand.Remove(ShowHand[0].Name);
             ShowHand.Remove(ShowHand[0]);
             TrashVisible();
         }
         ShowHand[0].Sort();
         ShowTrash.BringToFront();
     }
     else
     {
         for (int i = 0; i < ShowHand.Count; i++)
         {
             if (ShowHand[i].Name == "堀")
             {
                 ShowHand[i].Image = global::dominion.Properties.Resources.堀;
                 ShowHand[i].Reaction();
                 break;
             }
         }
     }
 }
예제 #7
0
        override internal void ShowCard(string s, int x, int y)
        {
            PlayCard a = new PlayCard();

            switch (s)
            {
            case "銅貨":
                a = new Cooper(ShowField, ShowHand, this);
                break;

            case "銀貨":
                a = new Silver(ShowField, ShowHand, this);
                break;

            case "金貨":
                a = new Gold(ShowField, ShowHand, this);
                break;

            case "屋敷":
                a = new Mansion(ShowField, ShowHand, this);
                break;

            case "公領":
                a = new Landtag(ShowField, ShowHand, this);
                break;

            case "属州":
                a = new Province(ShowField, ShowHand, this);
                break;

            case "地下貯蔵庫":
                a = new UndergroundRepository(ShowField, ShowHand, this);
                break;

            case "市場":
                a = new Market(this);
                break;

            case "民兵":
                a = new Militia(ShowField, ShowHand, this);
                break;

            case "鉱山":
                a = new Mine(ShowField, ShowHand, this);
                break;

            case "堀":
                a = new Moat(this);
                break;

            case "鍛冶屋":
                a = new Smithy(this);
                break;

            case "村":
                a = new Village(this);
                break;

            case "木こり":
                a = new Woodcutter(this);
                break;

            case "改築":
                a = new Remodel(this);
                break;

            case "工房":
                a = new Workshop(this);
                break;
            }
            a.Location = new System.Drawing.Point(x, y);
            a.Size     = new System.Drawing.Size(70, 110);
            a.Name     = s;
            a.SizeMode = PictureBoxSizeMode.StretchImage;
            a.Image    = global::dominion.Properties.Resources.back;
            form1.Controls.Add(a);
            a.BringToFront();
            ShowHand.Add(a);
            a.ChangePointPara(880 + 20 * ShowHand.Count, 10 + 120 * num);
            for (int i = 0; i < ShowHand.Count; i++)
            {
                ShowHand[i].Refresh();
            }
            ShowDeck.Refresh();
        }