Пример #1
0
 public static bool waitBattleReady()
 {
     if (GameImage.waitGameImage(battleLoadedImage, 10000, 2000) == true)
     {
         GameHelper.Log("Battle Ready");
         return(true);
     }
     return(false);
 }
Пример #2
0
        public static ShikiFood findShikiFood(int foodType = 0, List <int> shikiMaxPositions = null)
        {
            /*
             * foodType: 0 => N ; 1 => Daruma ; 2 => R
             */
            GameHelper.Log(foodType.ToString());
            if (foodType > 2 || foodType < 0)
            {
                foodType = 0;
            }
            int[] shikiTypePos = GamePos.shikiTypeButton[foodType];
            GameHelper.Delay(500);
            GameImage.waitGameImage(allShikiImage, 5000, 1000);
            GameHelper.clickRandomArea(GamePos.allShikiButton[0], GamePos.allShikiButton[1], GamePos.allShikiButton[2], GamePos.allShikiButton[3]);
            GameHelper.Delay(1000);
            GameHelper.clickRandomArea(shikiTypePos[0], shikiTypePos[1], shikiTypePos[2], shikiTypePos[3]);
            GameHelper.Delay(1000);
            if (shikiMaxPositions.Count > 0)
            {
                int swipeCount = 0;
                shikiMaxPositions.ForEach(delegate(int position)
                {
                    int[] shikiMaxPos = GamePos.shikiPositionDrag[position];
                    while (swipeCount < 3)
                    {
                        int shikiStartX = findShiki(swipeCount);
                        if (shikiStartX != -1)
                        {
                            GameHelper.Delay(1000);
                            //GameHelper.dragAndDropGame(shikiStartX + 50, 490, shikiMaxPos[0] + (shikiMaxPos[2] - shikiMaxPos[0]) / 2, shikiMaxPos[1] + (shikiMaxPos[3] - shikiMaxPos[1]) / 2);
                            Point point1   = new Point();
                            point1.X       = shikiStartX + 50;
                            point1.Y       = 490;
                            Point point2   = new Point();
                            point2.X       = point1.X;
                            point2.Y       = shikiMaxPos[1];
                            Point point3   = new Point();
                            point3.X       = shikiMaxPos[0] + (shikiMaxPos[2] - shikiMaxPos[0]) / 2;
                            point3.Y       = point2.Y;
                            Point[] points = { point1, point2, point3 };
                            GameHelper.dragAndDropMultiGame(points);
                            GameHelper.Delay(1500);
                            break;
                        }
                        else
                        {
                            GameHelper.dragAndDropGame(903, 541, 201, 531);
                            swipeCount++;
                        }
                    }
                });
            }

            //go to food storage
            return(null);
        }
Пример #3
0
        public static bool isExploreArea()
        {
            bool result = GameImage.waitGameImage(yingbingImage, 50000, 1000, true);

            if (result == true)
            {
                GameHelper.Log("In Explore Area");
                return(true);
            }
            return(false);
        }
Пример #4
0
 public static void fightExpMonster(Point?monster)
 {
     if (clickToMonster(monster) == false)
     {
         return;
     }
     if (GameBattle.waitBattleReady() == false)
     {
         return;
     }
     checkFoodFullExp();
     GameHelper.Delay(500);
     GameBattle.battleStart();
     GameBattle.waitBattleEnd();
     GameHelper.Delay(500);
     GameBattle.clickEndBattle();
     GameHelper.Delay(500);
     GameImage.waitGameImage(yingbingImage);
     checkTurnFight();
 }
Пример #5
0
 public static void ExploreAction()
 {
     GameHelper.Log("Start new Explore");
     if (GameImage.waitGameImage(exploreImage, 100000, 1000, true) == false)
     {
         Global.isStop = true;
         return;
     }
     clickExplore();
     GameHelper.Delay(516);
     if (isExploreArea() != true)
     {
         Global.isStop = true;
         return;
     }
     GameHelper.Delay(525);
     swipeToNextExplore();
     GameHelper.Delay(525);
     findAndAttackExpMonster();
     GameHelper.Delay(525);
     exitExploreArea();
     GameHelper.Delay(528);
 }