public static Dictionary<EnumGearSlot, Equipable> GetStarterGear() { List<EffectInformation> blankStats = new List<EffectInformation>(); blankStats.Add(new EffectInformation(StatsType.MaxHp, 0)); blankStats.Add(new EffectInformation(StatsType.MaxResources, 0)); blankStats.Add(new EffectInformation(StatsType.Agility, 0)); blankStats.Add(new EffectInformation(StatsType.Strength, 0)); blankStats.Add(new EffectInformation(StatsType.Intelegence, 0)); blankStats.Add(new EffectInformation(StatsType.Defense, 0)); Dictionary<EnumGearSlot,Equipable> gearSlots = new Dictionary<EnumGearSlot,Equipable>(); Equipable head = new Equipable(key++, blankStats, "Burlap Sack"); head.Slot = EnumGearSlot.Head; Equipable legs = new Equipable(key++, blankStats, "Saggy Pants"); legs.Slot = EnumGearSlot.Legs; Equipable feet = new Equipable(key++, blankStats, "Socks"); feet.Slot = EnumGearSlot.Feet; Equipable arm = new Equipable(key++, blankStats, "Livestrong Wristband"); arm.Slot = EnumGearSlot.Forearm; Equipable chest = new Equipable(key++, blankStats, "T-Shirt"); chest.Slot = EnumGearSlot.Chest; Equipable shoulder = new Equipable(key++, blankStats, "A Pet Bird"); shoulder.Slot = EnumGearSlot.Shoulders; gearSlots.Add(head.Slot, head); gearSlots.Add(shoulder.Slot, shoulder); gearSlots.Add(chest.Slot, chest); gearSlots.Add(arm.Slot, arm); gearSlots.Add(legs.Slot, legs); gearSlots.Add(feet.Slot, feet); return gearSlots; }
private static Equipable GenerateEquipable() { List<EffectInformation> stats = new List<EffectInformation>(); Equipable gear; EnumGearSlot slot = (EnumGearSlot)rnd.Next((int)EnumGearSlot.Max); int statPool = ((Maze.GetInstance().MazeLevel + 1) * _statPoolPerLevel) + rnd.Next(- _plusOrMinusToPool, _plusOrMinusToPool + 1); StatContainer statContainer = new StatContainer(); while (statPool > 0) { int whatStat = ChooseGearStat(); statContainer.Increment(whatStat); statPool -= 1; } //rarity here int rarity = rnd.Next(1000); double statScale = GetRarity(rarity); statContainer.Scale(statScale); stats.Add(new EffectInformation(StatsType.MaxHp, statContainer.Hp)); stats.Add(new EffectInformation(StatsType.MaxResources, statContainer.Mp)); stats.Add(new EffectInformation(StatsType.Agility, statContainer.Agi)); stats.Add(new EffectInformation(StatsType.Strength, statContainer.Str)); stats.Add(new EffectInformation(StatsType.Intelegence, statContainer.Int)); stats.Add(new EffectInformation(StatsType.Defense, statContainer.Def)); gear = new Equipable(key++, stats, GetRarityInText(rarity) + GetEquippableDescription(statContainer, slot) ); gear.Slot = slot; return gear; }