public override string Use(BasicChar user)
        {
            TempStatMod tempMod = new TempStatMod(10, ModTypes.Flat, typeof(VirilityTempBooster).Name, 168);

            user.PregnancySystem.Virility.AddTempMod(tempMod);
            return(base.Use(user));
        }
        public override string Use(BasicChar user)
        {
            TempStatMod tempMod = new TempStatMod(10, ModTypes.Flat, TypeName, 168);

            user.PregnancySystem.Fertility.AddTempMod(tempMod);
            return(base.Use(user));
        }
Exemplo n.º 3
0
 public void AddTempMod(TempStatMod mod)
 {
     if (TempMods.Exists(tm => tm.Source.Equals(mod.Source)))
     {
         TempStatMod toChange          = TempMods.Find(tm => tm.Source.Equals(mod.Source));
         float       diminishingReturn = (float)toChange.Duration / mod.Duration;
         int         toIncrease        = Mathf.Max(0, Mathf.FloorToInt(mod.Duration / Mathf.Max(1, 2 * diminishingReturn)));
         toChange.IncreaseDuration(toIncrease);
     }
     else
     {
         // Clone otherwise diminishingReturn doesn't work as duration increase on both.
         TempMods.Add(new TempStatMod(mod.Value, mod.ModType, mod.Source, mod.Duration));
     }
     IsDirty = true;
     AddedTempEvent?.Invoke();
 }
Exemplo n.º 4
0
 public void RemoveTempMod(TempStatMod mod)
 {
     TempMods.Remove(mod);
     IsDirty = true;
 }
Exemplo n.º 5
0
 private void Awake()
 {
     statMods     = this.GetComponent <PermStatMod>();
     tempStatMods = this.GetComponent <TempStatMod>();
 }
Exemplo n.º 6
0
 public AssingTempStatMod(TempStatMod tempStatMod, StatTypes statTypes)
 {
     this.tempStatMod = tempStatMod;
     this.statTypes   = statTypes;
 }