public override void Execute(int level) { var slots = new WDictionary<Slot>(new Dictionary<Slot, float>() { { Slot.body,4f }, { Slot.helm, 4f }, { Slot.Talisman, 2f }, }); var slot = slots.Random(); base.Execute(level,slot); }
public override void Execute(int level) { var slots = new WDictionary<Slot>(new Dictionary<Slot, float>() { { Slot.magic_weapon,3f }, { Slot.physical_weapon, 5f }, { Slot.Talisman, 1f }, }); var slot = slots.Random(); base.Execute(level,slot); }
public static QuestRewardType RandomQuestReward(QuestDifficulty d) { WDictionary<QuestRewardType> w = null; switch (d) { case QuestDifficulty.easy: w = new WDictionary<QuestRewardType>(new Dictionary<QuestRewardType, float>() { { QuestRewardType.money, 70},{ QuestRewardType.materials, 40},{ QuestRewardType.crystal, 15},{ QuestRewardType.item, 5} }); break; case QuestDifficulty.normal: w = new WDictionary<QuestRewardType>(new Dictionary<QuestRewardType, float>() { { QuestRewardType.money, 70},{ QuestRewardType.materials, 50},{ QuestRewardType.crystal, 25},{ QuestRewardType.item, 10} }); break; case QuestDifficulty.hard: w = new WDictionary<QuestRewardType>(new Dictionary<QuestRewardType, float>() { { QuestRewardType.money, 50},{ QuestRewardType.materials, 30},{ QuestRewardType.crystal, 25},{ QuestRewardType.item, 15} }); break; default: return QuestRewardType.money; } return w.Random(); }
public static GiftType CalcGiftType(QuestDifficulty difficulty) { Dictionary<GiftType, float> d; switch (difficulty) { case QuestDifficulty.easy: d = new Dictionary<GiftType, float>() { {GiftType.catalys, 9}, {GiftType.recepi, 8}, {GiftType.item, 2}, {GiftType.enchant, 8}, {GiftType.bonus, 4}, }; break; case QuestDifficulty.hard: d = new Dictionary<GiftType, float>() { {GiftType.catalys, 7}, {GiftType.recepi, 6}, {GiftType.item, 2}, {GiftType.enchant, 9}, {GiftType.bonus, 5}, }; break; default: d = new Dictionary<GiftType, float>() { {GiftType.catalys, 3}, {GiftType.recepi, 2}, {GiftType.item, 2}, {GiftType.enchant, 4}, {GiftType.bonus, 3}, }; break; } WDictionary<GiftType> gifts = new WDictionary<GiftType>(d); return gifts.Random(); }
public static QuestDifficulty RandomQuestDifficulty() { WDictionary<QuestDifficulty> w = new WDictionary<QuestDifficulty>(new Dictionary<QuestDifficulty, float>() { {QuestDifficulty.easy,3},{QuestDifficulty.normal,4},{QuestDifficulty.hard,3}, }); return w.Random(); }