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"); } }
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"); } }
public EggLoot(EggRarity rarity, double probability, int v) : this(rarity, probability) { this.v = v; }
public EggLoot(EggRarity rarity, double probability) { this.probability = probability; this.rarity = rarity; }
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"); } }