public static void mineLevelChanged(object sender, WarpedEventArgs e) { if (e.NewLocation is MineShaft mine) { if (shouldUpdateAugment(e)) { if (TwitchIntergration.isConnected()) { if (!TwitchIntergration.hasMinePollStarted) { TwitchIntergration.StartMinePoll(getRandomBuff(3)); } } else { AugmentOption aug = getRandomBuff(1)[0]; CurrentAugment = aug.id; Game1.addHUDMessage(new HUDMessage(aug.DisplayName + ": " + aug.desc, null)); } } if (CurrentAugment != null) { UpdateLocation(e); } } }
public static void UpdateDay() { if (BNC_Core.BNCSave.nextBuffDate <= -1) { int[] Min_Max = Config.getBuffMinMax(); BNC_Core.BNCSave.nextBuffDate = setNextBuffDay(Min_Max[0], Min_Max[1]); } if (BNC_Core.BNCSave.nextBuffDate-- == 0) { BuffOption[] buffs = getRandomBuff(3); if (Config.ShowDebug()) { foreach (BuffOption buff in buffs) { BNC_Core.Logger.Log($"buff selecting from {buff.displayName}"); } } if (TwitchIntergration.isConnected()) { TwitchIntergration.StartBuffPoll(buffs); } else { BuffOption selected = buffs[rand.Next(buffs.Count() - 1)]; if (Config.ShowDebug()) { BNC_Core.Logger.Log($"Selected {selected.displayName}"); } buffPlayer(selected); int[] Min_Max = Config.getBuffMinMax(); BNC_Core.BNCSave.nextBuffDate = setNextBuffDay(Min_Max[0], Min_Max[1]); } } }