mirror of
https://github.com/JogmansonReal/Radicade.git
synced 2026-10-26 07:29:00 -07:00
47 lines
1.3 KiB
C#
47 lines
1.3 KiB
C#
using RadicadeServer.RecNet.Enums.Challenges;
|
|
using RadicadeServer.RecNet.Progression.Objectives;
|
|
|
|
namespace Rubidium2018.Utils.Objectives
|
|
{
|
|
public class RbPresetDailys : RbObjective
|
|
{
|
|
private static ObjectiveTypes[] DisallowedTypes = {
|
|
ObjectiveTypes.AllDailyObjectives,
|
|
ObjectiveTypes.FirstSessionOfDay,
|
|
ObjectiveTypes.NUX_AllPunchcardObjectives,
|
|
ObjectiveTypes.NUX_PunchcardObjective,
|
|
ObjectiveTypes.DailyObjective3,
|
|
ObjectiveTypes.DailyObjective2,
|
|
ObjectiveTypes.DailyObjective1,
|
|
ObjectiveTypes.OOBE_GoToActivity,
|
|
ObjectiveTypes.OOBE_GoToLockerRoom,
|
|
ObjectiveTypes.OOBE_FinishActivity,
|
|
ObjectiveTypes.CreateACustomRoom,
|
|
ObjectiveTypes.Default
|
|
};
|
|
|
|
private static ObjectiveTypes[] AllowedTypes()
|
|
{
|
|
var allowed = Enum.GetValues(typeof(ObjectiveTypes)).Cast<ObjectiveTypes>().Where(o => !DisallowedTypes.Contains(o)).ToArray();
|
|
return allowed;
|
|
}
|
|
|
|
public static ObjectiveTypes GetRandomObjectiveTypes()
|
|
{
|
|
var allowed = AllowedTypes();
|
|
return allowed[Random.Shared.Next(allowed.Length)];
|
|
}
|
|
|
|
public static Objective CreateRandomObjective()
|
|
{
|
|
var ObjectiveTypes = GetRandomObjectiveTypes();
|
|
return new Objective
|
|
{
|
|
type = ObjectiveTypes,
|
|
score = ((int)ObjectiveTypes >= 100) ? 3 : 1,
|
|
xp = 200
|
|
};
|
|
}
|
|
}
|
|
}
|