diff --git a/filters/perkeo_observatory.cl b/filters/perkeo_observatory.cl index b588643..651f102 100644 --- a/filters/perkeo_observatory.cl +++ b/filters/perkeo_observatory.cl @@ -19,7 +19,11 @@ long filter(instance* inst) { } else continue; for (int c = 0; c < _pack.size; c++) { if (cards[c] == The_Soul) { - if (next_joker(inst, S_Soul, antes[i]) == Perkeo) return 1; + // Fix: Properly manage lock state for The_Soul and generated legendary + inst->locked[The_Soul] = false; + item legendary = next_joker(inst, S_Soul, antes[i]); + inst->locked[legendary] = true; + if (legendary == Perkeo) return 1; } } } diff --git a/filters/showman_double_legendary.cl b/filters/showman_double_legendary.cl index e01dcad..75abe24 100644 --- a/filters/showman_double_legendary.cl +++ b/filters/showman_double_legendary.cl @@ -8,7 +8,11 @@ long filter(instance* inst) { return 0; } - if (next_shop_item(inst, ante).value != Showman && next_shop_item(inst, ante).value != Showman) { + // Fix: Store shop items to avoid calling next_shop_item() twice + // Each call advances RNG state, so we need to capture both items + shopitem item1 = next_shop_item(inst, ante); + shopitem item2 = next_shop_item(inst, ante); + if (item1.value != Showman && item2.value != Showman) { return 0; }