Skip to content

Commit 6a848df

Browse files
committed
Tweaked Events and Normal Battles selection
Events and normal battles are pooled, so neither repeat until the pool has been exhausted. Added event pool and battle pool to save file.
1 parent 7d8d6f2 commit 6a848df

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

Classes/Events/EventDatabase.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
/// </summary>
77
public class EventDatabase
88
{
9+
public const int EventDatabaseSize = 3;
10+
911
public static readonly EventTemplate[] EventDictionary = new[]
1012
{
1113
new EventTemplate(

Scenes/EventScene/EventScene.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public override void _Ready()
4646
RandomNumberGenerator stageRng = new RandomNumberGenerator();
4747
stageRng.SetSeed(StageProducer.GlobalRng.Seed + (ulong)StageProducer.Config.BattleRoom.Idx);
4848
int eventIndex = stageRng.RandiRange(0, EventPool.Count - 1);
49-
_eventReference = EventDatabase.EventDictionary[EventPool[eventIndex]];
49+
_eventReference = EventDatabase.EventDictionary[eventIndex];
5050

5151
EventPool.RemoveAt(eventIndex);
5252
DisplayEvent();

0 commit comments

Comments
 (0)