示例#1
0
    /// <summary>
    /// Armour 1
    /// </summary>

    public void buyArmor1()
    {
        WorldControl.stashFull = true;
        i = 0;

        while (i < 5)
        {
            if (GameControl.invSlotArray [i, 0] == 0)
            {
                WorldControl.stashFull = false;
                break;
            }

            i++;
        }



        if (WorldControl.stashFull == false && GameControl.charGold >= 200)
        {
            WorldControl.dropItem = 20001;
            addItem.addItemScript();
            GameControl.charGold = GameControl.charGold - 200;
            board.text           = "You just bought this item! you have this in slot 0,0: " + GameControl.invSlotArray[0, 0] + " and this quantity in 0, 1: " + GameControl.invSlotArray[0, 1];
        }
        else if (WorldControl.stashFull == true)
        {
            board.text = "Your inventory is full!";
        }
        else if (GameControl.charGold < 200)
        {
            board.text = "Your dont have enough gold!";
        }
    }
示例#2
0
 public void randomEvents()
 {
     Random.InitState(System.DateTime.Now.Millisecond);
     randNum            = Random.Range(0, 100);
     WorldControl.NPCID = 0;
     if (randNum > 90)
     {
         //event 1 caravan
         Event1.sortingOrder   = 500;
         WorldControl.location = "Forest - Gypsy Caravan";
         Board.text            = "As you wander through the plains, you stumble with a gypsy caravan that is traveling across the island. You know that the gypsies are one of the last groups that have the guts to travel that far from their homes since the Plague appeared, especially with the Lost roaming the across the wilds, and the roads that are built around them.\n\nThey stationed close to a small rivulet, their caravans designed to become stands in the blink of an eye. It’s fascinating how they are somehow divided by transformations. Almost all of the ones who had bird features were on the same wagon, and so with the ones who had feline features. There were a couple of feline dancers practicing their steps close to the water. Many of them are using the time for resting or eating, as they are probably weary from their journey. \n\nAs you walk among the stands, you hear someone whistling to catch your attention. When you turn, you see a gypsy female with feline features, calling you with her index finger. As you approach, you see that she is sitting in a table inside one of the stands. She places a deck of cards in the table. \"Wanna try me? A simple game of cards. The winner gets to play with the loser,\" she says, subtly licking her lips. \"The first one it’s on me. Do you have what it takes to win?\" You smile at the challenge, and sat on the chair in front of her as you take a hand of cards, as so does she.\n\nYou truly have a hard time playing against her. It’s truly a game of wits, as you have to be alert all the time, being careful to cut off any attempt of cheating from her behalf. You see her trying to trick you at every chance she can get, but you know the drill, something that surprises her even though she tries to conceal her excitement. Finally, on the last game to decide the winner, you have the upper hand. You know that you can win, but thinking about it for a second, do you really want to win? She’s smoking hot and deep inside, you couldn’t help but wonder what kind of things she has in store for you. And so, you wonder: Lay off your move to claim your victory and your prize, or concede and leave your destiny in her skillful hands?\n";
     }
     else if (randNum > 80)
     {
         Event2.sortingOrder = 500;
         Board.text          = "You keep traveling with your bodyguard through the plains, until you realize that you got separated from it and you don’t remember when. You try to walk back the same way you using, readying your weapon just in case something takes the opportunity to attack you. There is a good reason why you brought a guard in the first place.\n\nThe road back is full of bushes and other kind of dangers, but you hear a familiar voice calling your name in the distance. You hurry through the steppes towards that voice calling you.";
     }
     else if (randNum > 70)
     {
         Event3.sortingOrder = 500;
         Board.text          = "You travel across the plains, full of dangerous unexplored beauty. You can see the road that leads to the next city is ahead, but you are still far from your next destination. During your journey, you find out an old structure made of stone, in the middle of nowhere. You hear some ruckus happening inside the place, so you investigate the matter.\n\nAs you sneak through the destroyed building, you can hear the distinctive sound of combat happening in the middle of it. You hurry, only to find fighting a couple of savages from those tribes you’ve seen lately. Both are fighting with everything they have: biting, scratching or slamming against each other. There is traces of blood around them, as you approach the combat carefully. You can see that they were a man and a woman with lion characteristics, the ones fighting. It seems that the man is winning, although is hard to see as they move too much on the floor. \n\nWhen they see you, they split from each other and keep an eye on you, panting and trying to repair their wardrobe malfunctions, as they have many after that quarrel. You ask why they are fighting. She speaks first, gulping some saliva before starting. \"We always come here when I want to shut him up. So I challenged him to a duel again, but he won’t stop cheating! He starts rubbing my c**t and breasts, distracting me! That’s not fair\"\n\nThe man crosses his arms. \"You have to do everything to win a duel! That’s why I win every time\" And after a bit of arguing, they look at you at the same time. She walks close to you. \"You saw us fight, right? Then you can tell him that I won, despite his treacherous ways!\" .He walks close to you from the other side. \"Tell her that in the outside world, there is no such thing as fairness. Only the strong survives\"\n\nBoth of them wait for your answer, looking at you in a way that leaves the whole result of the dispute in your words.\n";
     }
     else if (randNum > 60)
     {
         endTurnFun();
         Board.text = "As you travel through the plains, you can see a small group of people in the distance. Judging from their clothing, they look like they belong to one of the tribes of Lost that have organized through the zone. Their mind twisted but not broken completely. Most of them are lions and tigers of different species, some of them are pulling a cart filled with a couple of Lost.\n\nYou’d rather wait for them to leave before continuing your exploration of the plains, but nothing else of importance happened after that, so you returned to your city. Maybe you’ll pay them a visit later.";
     }
     else if (randNum > 50)
     {
         endTurnFun();
         Board.text = "You can see that there is a Gypsy Caravan moving fast through the clear plains in a mile in front of you. At first, you wonder what is the hurry with them, but after looking what is behind them, you understand its urgency. There is a string of stallions right behind them, chasing them very closely.\n\nYou feel amazed of the diligence of the Gypsies, but you return to the city before those stallions decide that running behind a cart that fast is futile, and search for an easier pick.";
     }
     else if (randNum > 40)
     {
         endTurnFun();
         Board.text            = "After an hour of wandering through the plains, you found out a place where someone recently has been sleeping. You find a campfire that has been lit recently, the place where someone slept, but no other signs. You wonder if the wanderer met a corrupting fate or perhaps it has already moved from this zone. \n\nYou search for his whereabouts on the surroundings, but you only can find a small vial in the campfire, so you decide to take it with you before leaving the place and return to your city.";
         WorldControl.dropItem = 1015;
         addItemScript.addItemScript();
     }
     else if (randNum > 30)
     {
         endTurnFun();
         Board.text            = "After strolling a couple of hours, you found yourself in the parts that are deeper in the plains, closer to the different tribes that populate the place. \n\nYou can see that in the distance, a group of stallions are gathering and moving in the distance in a large group, moving to an unknown location. You wonder what kind of things they are doing in the wild, that could occupy such numbers. You go to the place where they were gathering and found out a small vial among the things they left behind. You take it and move back to the city, before they think of turning back.\n";
         WorldControl.dropItem = 1020;
         addItemScript.addItemScript();
     }
     else if (randNum > 20)
     {
         //duplictaed, change
         Board.text = "You can see that there is a Gypsy Caravan moving fast through the clear plains in a mile in front of you. At first, you wonder what is the hurry with them, but after looking what is behind them, you understand its urgency. There is a string of stallions right behind them, chasing them very closely.\n\nYou feel amazed of the diligence of the Gypsies, but you return to the city before those stallions decide that running behind a cart that fast is futile, and search for an easier pick.";
         endTurnFun();
     }
     else
     {
         //duplicated, change
         Board.text = "As you travel through the plains, you can see a small group of people in the distance. Judging from their clothing, they look like they belong to one of the tribes of Lost that have organized through the zone. Their mind twisted but not broken completely. Most of them are lions and tigers of different species, some of them are pulling a cart filled with a couple of Lost.\n\nYou’d rather wait for them to leave before continuing your exploration of the plains, but nothing else of importance happened after that, so you returned to your city. Maybe you’ll pay them a visit later.";
         endTurnFun();
     }
 }
 public void delSlot03()
 {
     GameControl.invSlotArray [3, 0] = 0;
     GameControl.invSlotArray [3, 1] = 0;
     addItem.addItemScript();
     Debug.Log("El nuevo valor del slot 03 es " + GameControl.invSlotArray [3, 0]);
 }
    //////////////////////////////////////////////////////

    public void invItemUse(int selector)
    {
        if (GameControl.invSlotArray [selector, 0] > 10000)
        {
            WorldControl.dropItem = GameControl.invSlotArray [selector, 0];
            useItem();
            GameControl.invSlotArray [selector, 0] = 0;

            if (WorldControl.wasEquiped == true)
            {
                WorldControl.dropItem = WorldControl.switchItem;
                addItem.addItemScript();
                WorldControl.wasEquiped = false;
            }
        }
        else
        {
            WorldControl.dropItem = GameControl.invSlotArray [selector, 0];
            useItem();

            GameControl.invSlotArray [selector, 1] = GameControl.invSlotArray [selector, 1] - 1;
            if (GameControl.invSlotArray [selector, 1] <= 0)
            {
                GameControl.invSlotArray [selector, 0] = 0;
            }
        }
    }
    public void yesSelection()
    {
        if (conSelector == 0)
        {
            quitApp.Quit();
        }

        // Save file
        if (conSelector == 1)
        {
            panConfirmation.SetBool("isDisplayed", false);
            saveInformation.saveGame(PanLeftSave.saveSelection);
        }

        if (conSelector == 2)
        {
            panConfirmation.SetBool("isDisplayed", false);
            loadInformation.loadGame(PanLeftSave.loadSelection);
        }

        if (conSelector == 3)
        {
            // throwing items

            GameControl.invSlotArray [LeftPanelInventoryItemUse.itemSelect, 0] = 0;
            GameControl.invSlotArray [LeftPanelInventoryItemUse.itemSelect, 1] = 0;
            panConfirmation.SetBool("isDisplayed", false);
        }

        if (conSelector == 4)
        {
            // unequip items

            addItem.addItemScript();
            GameControl.charEquipment[LeftPanelEquipmentLoad.itemSelection] = 0;
            charSettler.setWeapon();
            charSettler.setArmour();
            charSettler.setHeadEquip();
            charSettler.setFaceEquip();
            charSettler.setNeckEquip();
            charSettler.setShouldersEquip();
            charSettler.setArmsEquip();
            charSettler.setLegsEquip();
            charSettler.setMakeUpEquip();
            setEquip.setEquipModifiers();


            panConfirmation.SetBool("isDisplayed", false);
        }
    }
    // on case button add

    public void takeEquipSlot(int selector)
    {
        checkCharInv();
        if (WorldControl.invFull == false)
        {
            if (WorldControl.stashEquip [selector, 0] != 0)
            {
                WorldControl.dropItem = WorldControl.stashEquip [selector, 0];

                addItem.addItemScript();
                WorldControl.stashEquip [selector, 1] = 0;
                WorldControl.stashEquip [selector, 0] = 0;
                WorldControl.dropItem = 0;
            }
        }
    }
示例#7
0
    public void buyItem()
    {
        if (WorldControl.dropItem < 10000 && WorldControl.dropItem != 0)
        {
            WorldControl.stashFull = true;
            i = 0;
            x = 0;

            while (i < 10)
            {
                if (GameControl.invSlotArray [i, 0] == WorldControl.dropItem)
                {
                    if (GameControl.invSlotArray [i, 1] < 5)
                    {
                        WorldControl.stashFull = false;
                        break;
                    }
                }

                i++;
                if (WorldControl.stashFull == false)
                {
                    break;
                }
            }

            /*
             * while (i < 10) {
             *      while (x < 5) {
             *
             *              if (GameControl.invSlotArray [x, 0] == WorldControl.dropItem) {
             *                      if (GameControl.invSlotArray [x, 1] < 5) {
             *                              WorldControl.stashFull = false;
             *                              break;
             *                      }
             *              }
             *
             *              x++;
             *
             *      }
             *      x = 0;
             *      i++;
             *      if (WorldControl.stashFull == false) {
             *              break;
             *      }
             * }
             */

            i = 0;

            if (WorldControl.stashFull == true)
            {
                while (i < 10)
                {
                    if (GameControl.invSlotArray [i, 0] == 0)
                    {
                        WorldControl.stashFull = false;
                        break;
                    }

                    i++;
                }
            }

            int cost = ItemData.itemDataList [WorldControl.dropItem].itemCost * 2;
            if (WorldControl.stashFull == false && GameControl.charGold >= cost)
            {
                addItem.addItemScript();
                GameControl.charGold = GameControl.charGold - cost;
                Board.text           = "Purchase successful!";
            }
            else if (WorldControl.stashFull == true)
            {
                Board.text = "Your inventory is full!";
            }
            else if (GameControl.charGold < cost)
            {
                Board.text = "Your dont have enough gold!";
            }
        }
        else if (WorldControl.dropItem != 0)
        {
            WorldControl.stashFull = true;
            i = 0;

            while (i < 10)
            {
                if (GameControl.invSlotArray [i, 0] == 0)
                {
                    WorldControl.stashFull = false;
                    break;
                }

                i++;
            }



            int cost = ItemData.itemDataList [WorldControl.dropItem].itemCost * 2;
            if (WorldControl.stashFull == false && GameControl.charGold >= cost)
            {
                addItem.addItemScript();
                GameControl.charGold = GameControl.charGold - cost;
                Board.text           = "Purchase successful!";
            }
            else if (WorldControl.stashFull == true)
            {
                Board.text = "Your inventory is full!";
            }
            else if (GameControl.charGold < cost)
            {
                Board.text = "Your dont have enough gold!";
            }
        }
        else
        {
            Board.text = "Select an item to buy!";
        }
    }
    /// <summary>
    /// ITEM 1
    /// </summary>

    public void buyCloth1()
    {
        WorldControl.stashFull = true;
        i = 0;

        while (i < 5)
        {
            if (GameControl.invSlotArray [i, 0] == 0)
            {
                WorldControl.stashFull = false;
                break;
            }

            i++;
        }



        if (WorldControl.stashFull == false && GameControl.charGold >= 180)
        {
            WorldControl.dropItem = 20008;
            addItem.addItemScript();
            GameControl.charGold = GameControl.charGold - 180;
            board.text           = "Purchase successful!";
        }
        else if (WorldControl.stashFull == true)
        {
            board.text = "Your inventory is full!";
        }
        else if (GameControl.charGold < 180)
        {
            board.text = "Your dont have enough gold!";
        }
    }
示例#9
0
    /// <summary>
    /// ITEM 1
    /// </summary>
    /// Corruption elixir
    public void buyElixir1()
    {
        WorldControl.stashFull = true;
        i = 0;
        x = 0;


        while (i < 5)
        {
            while (x < 5)
            {
                if (GameControl.invSlotArray[x, 0] == 151)
                {
                    if (GameControl.invSlotArray [x, 1] < 5)
                    {
                        WorldControl.stashFull = false;
                        break;
                    }
                }

                x++;
            }
            x = 0;
            i++;
            if (WorldControl.stashFull == false)
            {
                break;
            }
        }

        i = 0;

        if (WorldControl.stashFull == true)
        {
            while (i < 5)
            {
                if (GameControl.invSlotArray [i, 0] == 0)
                {
                    WorldControl.stashFull = false;
                    break;
                }

                i++;
            }
        }


        if (WorldControl.stashFull == false && GameControl.charGold >= 500)
        {
            WorldControl.dropItem = 151;
            addItem.addItemScript();
            GameControl.charGold = GameControl.charGold - 500;
            Board.text           = "Your purchase is successful!";
        }
        else if (WorldControl.stashFull == true)
        {
            Board.text = "Your inventory is full!";
        }
        else if (GameControl.charGold < 500)
        {
            Board.text = "Your dont have enough gold!";
        }
    }