Skip to content

Commit

Permalink
Started recreating fix with hexal
Browse files Browse the repository at this point in the history
  • Loading branch information
miyucomics committed Mar 12, 2024
1 parent e113585 commit 3dc8b52
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,15 @@ private void withdrawMediaWisp(int mediaCost, boolean allowOvercast, CallbackInf
@Inject(method = "executeIota", at = @At("HEAD"), cancellable = true, remap = false)
private void expandGrimoire (Iota iota, ServerWorld world, CallbackInfoReturnable<ControllerInfo> cir) {
CastingContext ctx = hexical$harness.getCtx();
List<Iota> toExecute = new ArrayList<>(Collections.singleton(iota));
if (ctx.getSpellCircle() != null)
return;
if (!hexical$harness.getEscapeNext() && iota.getType() == HexIotaTypes.PATTERN && !((PatternIota) iota).getPattern().sigsEqual(HexPattern.fromAngles("qqqaw", HexDir.EAST))) {
HexPattern pattern = ((PatternIota) iota).getPattern();
List<Iota> lookupResult = CastingUtils.Companion.grimoireLookup(ctx.getCaster(), pattern, DiscoveryHandlers.collectItemSlots(ctx));
if (lookupResult != null) {
toExecute = lookupResult;
ctx.getCaster().playSound(HexSounds.CAST_HERMES, SoundCategory.MASTER, 0.25f, 1.25f);
cir.setReturnValue(hexical$harness.executeIotas(lookupResult, world));
}
}
cir.setReturnValue(hexical$harness.executeIotas(toExecute, world));
}
}

0 comments on commit 3dc8b52

Please sign in to comment.