mirror of
https://github.com/JogmansonReal/Radicade.git
synced 2026-10-27 07:59:03 -07:00
Radicade Public Code
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
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
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user