예제 #1
0
        static public void generateGem()
        {
            // Get the upper limit for the gem

            int upperLimit = Helper.GetIntFromUser(
                "Enter the upper limit in GP(or -1 for no limit): ");

            // Generate the result using the upper limit
            TreasureResult result = generators["gems"].GenerateTreasure(upperLimit);

            // Print out the result
            Console.WriteLine("A {0} worth {1} {2}", result.Description, result.Worth, currencyDenomination);
        }
예제 #2
0
    public static ResultAndDesc TreasureEncounter(bool mimic)
    {
        ResultAndDesc rd = new ResultAndDesc();

        TreasureResult[] result = new TreasureResult[3];
        result[0]  = TreasureOpen(mimic);
        result[1]  = TreasureSkip();
        result[2]  = TreasureBroken(mimic);
        rd.desc[0] = "1번";
        rd.desc[1] = "2번";
        rd.desc[2] = "3번";
        rd.SetResult(result);
        return(rd);
    }
예제 #3
0
 static TreasureResult TreasureOpen(bool mimic)
 {
     if (!mimic)
     {
         TreasureResult result = new TreasureResult();
         result._treasure                 = new TreasureObjInfo();
         result._treasure._items          = new ItemObjInfo[1];
         result._treasure._items[0]       = new ItemObjInfo();
         result._treasure._items[0]._name = "보물";
         result._treasure.gold            = 10;
         return(result);
     }
     else
     {
         return(null);
     }
 }