public bool UseCurrency(CurrencyType currency, ModPool modPool) { if (!CanUseCurrency(currency)) { return(false); } switch (currency) { case CurrencyType.Scrap: case CurrencyType.Whetstone: this.HasQuality = true; break; case CurrencyType.Transmute: case CurrencyType.Alteration: this.SetRolledMod(modPool.GetMod(this.EquipmentType, Rarity.Magic, this.RolledMod).DamageSetConfig, Rarity.Magic); break; case CurrencyType.Chaos: case CurrencyType.Alchemy: this.SetRolledMod(modPool.GetMod(this.EquipmentType, Rarity.Rare, this.RolledMod).DamageSetConfig, Rarity.Rare); break; case CurrencyType.Scour: this.SetRolledMod(null, Rarity.Normal); break; } return(true); }
public void SetUp() { this.modPool = new ModPool(); this.modPool.AddMod(EquipmentType.Shield, Rarity.Magic, new DamageSetConfig(new DamageSet { Block = 2 })); this.modPool.AddMod(EquipmentType.Shield, Rarity.Magic, new DamageSetConfig(new DamageSet { Lightning = 2 })); this.modPool.AddMod(EquipmentType.Shield, Rarity.Rare, new DamageSetConfig(new DamageSet { Block = 3 })); this.modPool.AddMod(EquipmentType.Shield, Rarity.Rare, new DamageSetConfig(new DamageSet { Lightning = 3 })); }