public virtual void SetEnemy(EnemyInstance enemy, ModifierController modifierController, System.Random random) { // import modifiers enemy.InitialHitpoints.Value = Utils.Utils.GetDeviatedValue(InitialHitpoints, HitpointsDeviation, random); enemy.InitialArmor.Value = Utils.Utils.GetDeviatedValue(InitialArmor, ArmorDeviation, random); enemy.InitialSpeed.Value = Utils.Utils.GetDeviatedValue(InitialSpeed, SpeedDeviation, random); enemy.IntLoot = new List <ModifiedCurrency>(); enemy.IntPunishments = new List <ModifiedCurrency>(); foreach (var intLoot in IntLoots) { var modLoot = new ModifiedCurrency(); modLoot.Currency = intLoot; // import modifiers modLoot.Amount.Value = intLoot.Amount; enemy.IntLoot.Add(modLoot); } foreach (var intPunishment in IntPunishments) { var modPunishment = new ModifiedCurrency(); modPunishment.Currency = intPunishment; // import modifiers modPunishment.Amount.Value = intPunishment.Amount; enemy.IntPunishments.Add(modPunishment); } modifierController.ImportModifiers(enemy); }
private void SetUpModifiedPrice() { ModifiedPrice = new ModifiedCurrency[BaseTowerData.Price.Count]; for (int i = 0; i < BaseTowerData.Price.Count; i++) { var newModified = new ModifiedCurrency { Currency = BaseTowerData.Price[i], Amount = { Value = BaseTowerData.Price[i].Amount }, }; ModifiedPrice[i] = newModified; } }