private static void HandleSpecial(UberState state) { if (state.Name == "arenaBByteStateSerialized" && state.Value.Byte == 4) { // lumaPoolsStateGroup.arenaByteStateSerialized new UberId(5377, 1373).State().Write(state.Value); } else if (state.Name == "craftCutsceneState" && state.Value.Byte != 0) { state.Write(new UberValue((byte)3)); } else if (state.Name == "findToadQuestUberState" && state.Value.Int == 2) { Randomizer.InputUnlockCallback = () => { // this is really questionable!! var voiceState = new UberId(46462, 59806).State(); if (!(voiceState.Value.Bool)) { voiceState.Write(new UberValue(true)); Stats stats = Randomizer.Memory.PlayerStats; stats.MaxHealth += 10; stats.MaxEnergy++; Randomizer.Memory.PlayerStats = stats; Randomizer.Memory.FillEnergy(); Randomizer.Memory.FillHealth(); } } } ; }
private static void HandleSpecial(UberState state) { if (state.Name == "arenaBByteStateSerialized" && state.Value.Byte == 4) { // lumaPoolsStateGroup.arenaByteStateSerialized new UberId(5377, 1373).State().Write(state.Value); } else if (state.Name == "craftCutsceneState" && 0 < state.Value.Byte && state.Value.Byte < 3) { state.Write(new UberValue((byte)3)); // Give diamond in the rough pickup. new UberId(23987, 14832).State().Write(new UberValue(true)); } // the below is a fix for a vanilla bug where you can just miss getting voice if you else if (state.Name == "findToadQuestUberState" && state.Value.Int == 2 || // (a) skip the kwolok cutscene too fast state.Name == "cleanseWellspringQuestUberState" && state.Value.Int == 4 // (b) come to kwolok after wellspring and get the cutscenes stacked awkwardly ) { Randomizer.InputUnlockCallback = () => { // this is really questionable!! var voiceState = new UberId(46462, 59806).State(); if (!voiceState.Value.Bool) { voiceState.Write(new UberValue(true)); InterOp.set_max_health(InterOp.get_max_health() + 10); InterOp.set_max_energy(InterOp.get_max_energy() + 1); InterOp.fill_health(); InterOp.fill_energy(); InterOp.save(); } // should happen in both branches if (SeedController.Flags.Contains(Flag.ALLWISPS)) { HintsController.ProgressWithHints(); } } } ; }
public static bool Write(this UberState state) => state.Write(state.Value);