private void TimeEvents_AfterDayStarted(object sender, EventArgs e) { if (Context.IsWorldReady) { if (Context.IsWorldReady) { hashofm.RemoveRange(0, hashofm.Count); blackhash.RemoveRange(0, blackhash.Count); if (mpdebug) { Monitor.Log($"-MOODY--PLANET->Removed Monsters from List ||| {blackhash.Count}, |/| {hashofm.Count} |||<--DEBUG--"); } } int rnum = wnd.Next(0, totalWeight); foreach (Mood m in Moods) { if (rnum < m.weight) { mood = m; break; } rnum = rnum - m.weight; } if (mood.name == "Mysterious") { mood.randomizedModifiers(1.0); } else if (mood.name == "Cryptic") { mood.randomizedModifiers(4.0); } else if (mood.name == "Unexplainable") { mood.randomizedModifiers(6.0); } if (mood.spawnRate != -1.0) { api.Spawn_Rate(mood.spawnRate); } DisplayMood(); } }
private void TimeEvents_AfterDayStarted(object sender, EventArgs e) { if (Context.IsWorldReady) { x = wnd.Next(1, 12); z = wnd.Next(1, 100); a = wnd.Next(1, 100); b = wnd.Next(1, 100); // 1 - Happy | 2 - Sad | 3 - Angry | 4 - Enlightened | 5 - Moody | 6 - Depressed | 7 - Elated | 8 - Dying | 9 - Furious // Each mood has variants which are stronger or weaker if (x == 1 && z == 1 && b == 1 && a == 1) { mood = "Holy shit just sleep again."; double rnd = wnd.Next(40, 1000); rnd = rnd / 1000.0; api.Spawn_Rate(rnd); } if (x == 1 && z > 13 && z < 88) { mood = "Happy"; Game1.player.Stamina = (int)(Game1.player.Stamina * 1.1); Game1.player.health = (int)(Game1.player.health * 1.1); } else if (x == 1 && z > 87) { mood = "Content"; Game1.player.Stamina = (int)(Game1.player.Stamina * 1.1); Game1.player.health = (int)(Game1.player.health * 1.2); } else if (x == 1 && z < 14) { mood = "Untroubled"; Game1.player.Stamina = (int)(Game1.player.Stamina * 1.25); Game1.player.health = (int)(Game1.player.health * 1.5); } else if (x == 2 && z > 13 && z < 88) { mood = "Sad"; Game1.player.Stamina = (int)(Game1.player.Stamina * .9); } else if (x == 2 && z < 14) { mood = "Gloomy"; Game1.player.Stamina = (int)(Game1.player.Stamina * .75); Game1.player.health = (int)(Game1.player.health * .9); } else if (x == 2 && z > 87) { mood = "Depressed"; Game1.player.Stamina = (int)(Game1.player.Stamina * .5); Game1.player.health = (int)(Game1.player.health * .8); } else if (x == 3 && z > 13 && z < 88) { mood = "Annoyed"; } else if (x == 3 && z > 87) { mood = "Angry"; } else if (x == 3 && z < 14) { mood = "Furious"; } else if (x == 4 && z > 13 && z < 88) { mood = "Mellow"; } else if (x == 4 && z > 87) { mood = "Serene"; } else if (x == 4 && z < 14) { mood = "Enlightened"; Game1.player.health = (int)(Game1.player.health * 1.15); Game1.player.Stamina = (int)(Game1.player.Stamina * 1.25); } else if (x == 5 && z > 13 && z < 88) { mood = "Indifferent"; } else if (x == 5 && z > 87) { mood = "Uncaring"; } else if (x == 5 && z < 14) { mood = "Uninterested"; } else if (x == 6 && z > 13 && z < 88) { mood = "Tired"; } else if (x == 6 && z > 87) { mood = "Restless"; } else if (x == 6 && z < 14) { mood = "Anxious"; } else if (x == 7 && z > 13 && z < 88) { mood = "Loved"; } else if (x == 7 && z > 87) { mood = "Cherished"; } else if (x == 7 && z < 14) { mood = "Adored"; } else if (x == 8 && z > 13 && z < 88) { mood = "Mysterious"; double rnd = wnd.Next(0, 10); rnd = rnd / 1000.0; api.Spawn_Rate(rnd); } else if (x == 8 && z > 87) { mood = "Cryptic"; double rnd = wnd.Next(0, 23); rnd = rnd / 1000.0; api.Spawn_Rate(rnd); } else if (x == 8 && z < 14) { mood = "Unexplainable"; double rnd = wnd.Next(0, 33); rnd = rnd / 1000.0; api.Spawn_Rate(rnd); } else if (x == 9 && z > 13 && z < 88) { mood = "Arrogant"; } else if (x == 9 && z > 87) { mood = "Narcissistic"; } else if (x == 9 && z < 14) { mood = "Egotistical"; } else if (x == 10 && z > 13 && z < 88) { mood = "Crazy"; } else if (x == 10 && z < 14) { mood = "Irrational"; } else if (x == 10) { mood = "Insane"; double rnd = wnd.Next(10, 45); rnd = rnd / 1000.0; api.Spawn_Rate(rnd); } else if (x > 10) { mood = "Normal"; } CMS = MoodMultis; DisplayMood(); } }