public Modifier(EquipmentType type, Rarity rarity, DamageSetConfig damageSetConfig) { this.DamageSetConfig = damageSetConfig; this.Rarity = rarity; this.EquipmentType = type; this.Reference = this.DamageSetConfig.Reference + this.EquipmentType; }
public Modifier(string[] values, DamageSetConfig damageSet) { this.Reference = values[0] + values[1]; this.DamageSetConfig = damageSet; this.EquipmentType = (EquipmentType)Enum.Parse(typeof(EquipmentType), values[1]); this.Rarity = (Rarity)Enum.Parse(typeof(Rarity), values[2]); }
public Equipment(BaseEquipment baseEquipment, Rarity rarity, DamageSetConfig rolledMod, int damage, bool hasQuality) { this.Base = baseEquipment; this.rarity = rarity; this.RolledMod = rolledMod; this.Damage = damage; this.HasQuality = hasQuality; }
public void ChaosRerollsYellow() { Equipment yellow = new Equipment(EquipmentType.Shield); yellow.UseCurrency(CurrencyType.Alchemy, this.modPool); DamageSetConfig previousMod = yellow.RolledMod; Assert.True(yellow.UseCurrency(CurrencyType.Chaos, this.modPool)); Assert.AreNotEqual(previousMod, yellow.RolledMod); }
public void AlterationRerollsBlue() { Equipment blue = new Equipment(EquipmentType.Shield); blue.UseCurrency(CurrencyType.Transmute, this.modPool); DamageSetConfig previousMod = blue.RolledMod; Assert.True(blue.UseCurrency(CurrencyType.Alteration, this.modPool)); Assert.AreNotEqual(previousMod, blue.RolledMod); }
private static Equipment FromSave(SavedEquipment saved) { BaseEquipment baseEquipment = Data.BaseEquipments.Get(saved.BaseReference); DamageSetConfig rolledMod = null; if (!string.IsNullOrEmpty(saved.RolledModReference)) { rolledMod = Data.DamageSets.Get(saved.RolledModReference); } return(new Equipment(baseEquipment, saved.Rarity, rolledMod, saved.Damage, saved.HasQuality)); }
public Modifier GetMod(EquipmentType equipmentType, Rarity rarity, DamageSetConfig previous = null) { List <Modifier> list = this.mods[new ValueTuple <EquipmentType, Rarity>(equipmentType, rarity)]; return(list.First(a => a.DamageSetConfig != previous)); }
public void AddMod(EquipmentType equipmentType, Rarity rarity, DamageSetConfig damageSetConfig) { AddMod(new Modifier(equipmentType, rarity, damageSetConfig)); }
public void SetRolledMod(DamageSetConfig rolledMod, Rarity rarity) { this.RolledMod = rolledMod; this.rarity = rarity; }