diff --git a/RandomizerCommon/EventConfig.cs b/RandomizerCommon/EventConfig.cs
index 4d9efd4..678c4ae 100644
--- a/RandomizerCommon/EventConfig.cs
+++ b/RandomizerCommon/EventConfig.cs
@@ -555,11 +555,8 @@ public class InstructionParameter
/// This requires that the instruction is an initialization.
public int? InitArg { get; set; }
- public static explicit operator InstructionParameter(int index) =>
- new() { Index = index };
-
public static explicit operator InstructionParameter(string name) =>
- new() { Name = name };
+ int.TryParse(name, out var index) ? new() { Index = index } : new() { Name = name };
///
/// The offset into instr's arguments that this parameter indicates.
diff --git a/dist/Base/itemevents.yaml b/dist/Base/itemevents.yaml
index bf07881..9e7c1d6 100644
--- a/dist/Base/itemevents.yaml
+++ b/dist/Base/itemevents.yaml
@@ -186,7 +186,7 @@ ExistingEvents:
If: phantomhunters
Edits:
# Allow invaders to invade after the boss has been defeated
- - Match: EndIfEventFlag(EventEndType.End, ON, TargetEventFlagType.EventFlag, X_0)
+ - Match: EndIfEventFlag(EventEndType.End, ON, TargetEventFlagType.EventFlag, X0_4)
Remove: true
# Detect the Phantom Hunters covenant instead of ember status
- Match: IfCharacterHasSpEffect(AND_01, 10000, 490, true, ComparisonType.Equal, 1)
@@ -200,7 +200,7 @@ ExistingEvents:
If: phantomhunters
Edits:
# Allow invaders to invade after the boss has been defeated
- - Match: EndIfEventFlag(EventEndType.End, ON, TargetEventFlagType.EventFlag, eventFlagId)
+ - Match: EndIfEventFlag(EventEndType.End, ON, TargetEventFlagType.EventFlag, X0_4)
Remove: true
common:
@@ -429,6 +429,14 @@ ExistingEvents:
Repeat: -1
Remove: true
+ - ID: 0
+ If: phantomhunters
+ Edits:
+ # Instead of Londor Pale Shade only invading after you've angered Yuria, it now invades as long
+ # as you've met Yuria.
+ - Match: {Init: {Callee: 20005750}, Arguments: [null, null, null, null, null, null, null, null, 70000004]}
+ Set: [{Param: 8, Value: 74000600}]
+
# Hawkwood logic
- ID: 13305760
Edits:
@@ -472,14 +480,6 @@ ExistingEvents:
- Match: {Init: {Callee: 13500782}}
Remove: true
- - ID: 0
- If: phantomhunters
- Edits:
- # Instead of Londor Pale Shade only invading after you've angered Yuria, it now invades as long
- # as you've met Yuria.
- - Match: {Init: {Callee: 20005750}, Arguments: [null, null, null, null, null, null, null, null, 70000004]}
- Set: [{Param: 8, Value: 74000600}]
-
# Leonhard logic
- ID: 13505720
If: safequest
@@ -557,17 +557,17 @@ ExistingEvents:
# The following two events both control when Londor Pale Shade can invade, and they're both
# modified to make it invade as soon as you've met Yuria even if she isn't hostile.
- ID: 13705280
- if: phantomhunters
+ If: phantomhunters
Edits:
- Match: GotoIfEventFlag(Label.LABEL1, OFF, TargetEventFlagType.EventFlag, 70000004)
- Set: {Param: 3, Value: 74000600}
+ Set: [{Param: 3, Value: 74000600}]
- ID: 13705281
- if: phantomhunters
+ If: phantomhunters
Edits:
- Match: IfEventFlag(OR_01, CHANGE, TargetEventFlagType.EventFlag, 70000004)
- Set: {Param: 3, Value: 74000600}
+ Set: [{Param: 3, Value: 74000600}]
- Match: GotoIfEventFlag(Label.LABEL1, OFF, TargetEventFlagType.EventFlag, 70000004)
- Set: {Param: 3, Value: 74000600}
+ Set: [{Param: 3, Value: 74000600}]
# Prevent Greirat becoming lost from triggering here. Skip straight ahead to the point where his
# corpse either does or doesn't spawn. (His quest should never get to the point where he creates
@@ -896,6 +896,7 @@ ExistingEvents:
m45_00_00_00: # Painted World of Ariandel
- ID: 14505181
If: phantomhunters
+ Edits:
# Detect the Phantom Hunters covenant instead of ember status
- Match: IfCharacterHasSpEffect(AND_01, 10000, 490, true, ComparisonType.Equal, 1)
Replace: ["IfPlayersCovenant(AND_01, 10)"]