private void UpdatePhaseGauge() { if (AscensionLevel == default(ModifiableStat) || AscensionRate == default(ModifiableStat) || AscensionLockoutRate == default(ModifiableStat)) { FormattedDebugMessage(LogLevel.Info, "There is no AscensionLevel, AscensionRate, or AscensionLockoutRate stat tied to Player {0}", gameObject.name); return; } if (AscensionLockout.LockoutRate != AscensionLockoutRate.Value) { AscensionLockout.LockoutRate = AscensionLockoutRate.Value; } if (!AscensionLockout.CanAttempt()) { return; } AscensionLevel.Alter(AscensionRate.ModifiedValue); if (AscensionLevel.Value > AscensionLevel.ValueCap) { AscensionLevel.Value = AscensionLevel.ValueCap; } else if (AscensionLevel.Value < 0) { AscensionLevel.Value = 0; } GameUIController.UpdatePhoenixGauge(AscensionLevel.Value, AscensionLevel.ValueCap); AscensionLockout.NoteLastOccurrence(); CheckForPhaseChange(); }
private ItemMaterials AscensionItemMaterials(AscensionLevel ascensionLevel) { if (ascensionLevel.Ascension == AscensionEnum.Default) { return(_currentServantNiceJson.AscensionMaterials.FirstAsc); } else if (ascensionLevel.Ascension == AscensionEnum.First) { return(_currentServantNiceJson.AscensionMaterials.SecondAsc); } else if (ascensionLevel.Ascension == AscensionEnum.Second) { return(_currentServantNiceJson.AscensionMaterials.ThirdAsc); } else if (ascensionLevel.Ascension == AscensionEnum.Third) { return(_currentServantNiceJson.AscensionMaterials.FourthAsc); } return(null); }