Ejemplo n.º 1
0
        public override void walk(int x, int y)  //计算棋子移动范围
        {
            int i;

            for (i = 1; i <= 6 && Plate.inside(x + i, y) && Plate.plate[x + i][y] == null; ++i)
            {
                Plate.plateCol[x + i][y] = Color.gray;
            }
            Plate.canStrike(player, x + i, y, 0, 0, x, y);
            for (i = 1; i <= 6 && Plate.inside(x - i, y) && Plate.plate[x - i][y] == null; ++i)
            {
                Plate.plateCol[x - i][y] = Color.gray;
            }
            Plate.canStrike(player, x - i, y, 0, 0, x, y);
            for (i = 1; i <= 6 && Plate.inside(x, y + i) && Plate.plate[x][y + i] == null; ++i)
            {
                Plate.plateCol[x][y + i] = Color.gray;
            }
            Plate.canStrike(player, x, y + i, 0, 0, x, y);
            for (i = 1; i <= 6 && Plate.inside(x, y - i) && Plate.plate[x][y - i] == null; ++i)
            {
                Plate.plateCol[x][y - i] = Color.gray;
            }
            Plate.canStrike(player, x, y - i, 0, 0, x, y);
        }
Ejemplo n.º 2
0
        public override void calSkill(int selx, int sely)
        {
            int x = selx, y = sely;

            for (int i = 1; i <= 15; ++i)
            {
                x += (PlayerControl.curx - selx);
                y += (PlayerControl.cury - sely);
                if (!Plate.inside(x, y))
                {
                    return;
                }
                Plate.plateCol[x][y] = Color.gray;
            }
        }
Ejemplo n.º 3
0
 public override void calSkill(int selx, int sely)
 {
     for (int i = 1; i <= arrowLength; ++i)
     {
         if (Plate.inside(selx + i, sely))
         {
             Plate.plateCol[selx + i][sely] = Color.gray;
         }
         if (Plate.inside(selx + i, sely + i))
         {
             Plate.plateCol[selx + i][sely + i] = Color.gray;
         }
         if (Plate.inside(selx, sely + i))
         {
             Plate.plateCol[selx][sely + i] = Color.gray;
         }
         if (Plate.inside(selx - i, sely + i))
         {
             Plate.plateCol[selx - i][sely + i] = Color.gray;
         }
         if (Plate.inside(selx - i, sely))
         {
             Plate.plateCol[selx - i][sely] = Color.gray;
         }
         if (Plate.inside(selx - i, sely - i))
         {
             Plate.plateCol[selx - i][sely - i] = Color.gray;
         }
         if (Plate.inside(selx, sely - i))
         {
             Plate.plateCol[selx][sely - i] = Color.gray;
         }
         if (Plate.inside(selx + i, sely - i))
         {
             Plate.plateCol[selx + i][sely - i] = Color.gray;
         }
     }
 }