Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions RandomizerCommon/EventConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -555,11 +555,8 @@ public class InstructionParameter
/// <remarks>This requires that the instruction is an initialization.</remarks>
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 };

/// <returns>
/// The offset into <c>instr</c>'s arguments that this parameter indicates.
Expand Down
31 changes: 16 additions & 15 deletions dist/Base/itemevents.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)"]
Expand Down