コード例 #1
0
        public static ILootDef[] DefaultEggLoot(EggRarity maxRarity)
        {
            switch (maxRarity)
            {
            case EggRarity.Common:
                return(new ILootDef[1] {
                    new EggLoot(EggRarity.Common, 0.1)
                });

            case EggRarity.Uncommon:
                return(new ILootDef[2] {
                    new EggLoot(EggRarity.Common, 0.1), new EggLoot(EggRarity.Uncommon, 0.05)
                });

            case EggRarity.Rare:
                return(new ILootDef[3] {
                    new EggLoot(EggRarity.Common, 0.1), new EggLoot(EggRarity.Uncommon, 0.05), new EggLoot(EggRarity.Rare, 0.01)
                });

            case EggRarity.Legendary:
                return(new ILootDef[4] {
                    new EggLoot(EggRarity.Common, 0.1), new EggLoot(EggRarity.Uncommon, 0.05), new EggLoot(EggRarity.Rare, 0.01), new EggLoot(EggRarity.Legendary, 0.001)
                });

            default:
                throw new InvalidOperationException("Not a valid Egg Rarity");
            }
        }
コード例 #2
0
ファイル: LootDefs.cs プロジェクト: RealDestic/LoE-Realm-NC
        public static ILootDef[] DefaultEggLoot(EggRarity maxRarity)
        {
            switch (maxRarity)
            {
            case EggRarity.Egg_0To13Stars:
                return(new ILootDef[1] {
                    new EggLoot(EggRarity.Egg_0To13Stars, 0.1)
                });

            case EggRarity.Egg_14To27Stars:
                return(new ILootDef[2] {
                    new EggLoot(EggRarity.Egg_0To13Stars, 0.1), new EggLoot(EggRarity.Egg_14To27Stars, 0.05)
                });

            case EggRarity.Egg_28To41Stars:
                return(new ILootDef[3] {
                    new EggLoot(EggRarity.Egg_0To13Stars, 0.1), new EggLoot(EggRarity.Egg_14To27Stars, 0.05), new EggLoot(EggRarity.Egg_28To41Stars, 0.01)
                });

            case EggRarity.Egg_42To48Stars:
                return(new ILootDef[4] {
                    new EggLoot(EggRarity.Egg_0To13Stars, 0.1), new EggLoot(EggRarity.Egg_14To27Stars, 0.05), new EggLoot(EggRarity.Egg_28To41Stars, 0.01), new EggLoot(EggRarity.Egg_42To48Stars, 0.001)
                });

            default:
                throw new InvalidOperationException("Not a valid Egg Rarity");
            }
        }
コード例 #3
0
 public EggLoot(EggRarity rarity, double probability, int v) : this(rarity, probability)
 {
     this.v = v;
 }
コード例 #4
0
 public EggLoot(EggRarity rarity, double probability)
 {
     this.probability = probability;
     this.rarity      = rarity;
 }
コード例 #5
0
 public EggLoot(EggRarity rarity, double probability)
 {
     this.probability = probability;
     this.rarity = rarity;
 }
コード例 #6
0
 public static ILootDef[] DefaultEggLoot(EggRarity maxRarity)
 {
     switch(maxRarity)
     {
         case EggRarity.Common:
             return new ILootDef[1] {new EggLoot(EggRarity.Common, 0.1) };
         case EggRarity.Uncommon:
             return new ILootDef[2] { new EggLoot(EggRarity.Common, 0.1), new EggLoot(EggRarity.Uncommon, 0.05) };
         case EggRarity.Rare:
             return new ILootDef[3] { new EggLoot(EggRarity.Common, 0.1), new EggLoot(EggRarity.Uncommon, 0.05), new EggLoot(EggRarity.Rare, 0.01) };
         case EggRarity.Legendary:
             return new ILootDef[4] { new EggLoot(EggRarity.Common, 0.1), new EggLoot(EggRarity.Uncommon, 0.05), new EggLoot(EggRarity.Rare, 0.01), new EggLoot(EggRarity.Legendary, 0.001) };
         default:
             throw new InvalidOperationException("Not a valid Egg Rarity");
     }
 }