Files
MxValheim/MxValheim/EventSystem/EventList.cs
2026-02-12 23:38:28 -05:00

49 lines
1.7 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MxValheim.EventSystem
{
internal class EventList
{
public static void SetupCustomRaid(RandEventSystem system)
{
// 1. Create the Event Data
RandomEvent myCustomRaid = new RandomEvent
{
m_name = "MxEvent_God1",
m_enabled = true,
m_duration = 600f, // 10 minutes
m_nearBaseOnly = true, // Must be near player structures
m_pauseIfNoPlayerInArea = true,
m_forceMusic = "Music_Boss_Moder", // Use specific music
m_startMessage = "The gods themselves challenge you...",
m_endMessage = "The gods are satisfied.",
m_forceEnvironment = "SnowStorm" // Force weather
};
// 2. Define what spawns during this event
SpawnSystem.SpawnData frostWraith = new SpawnSystem.SpawnData
{
m_name = "Frost Wraith",
m_prefab = ZNetScene.instance.GetPrefab("Wraith"), // Get the Wraith prefab
m_maxSpawned = 5, // Max alive at once
m_spawnInterval = 10f, // Try to spawn every 10s
m_spawnDistance = 30f, // Distance from player
m_spawnRadiusMax = 10f,
m_spawnRadiusMin = 5f,
m_groupSizeMin = 1,
m_groupSizeMax = 2,
m_enabled = true
};
myCustomRaid.m_spawn = new List<SpawnSystem.SpawnData> { frostWraith };
// 3. Add to the game's master list
system.m_events.Add(myCustomRaid);
}
}
}