From 57d559cd5b86f796d0333fcf25073d3af52341e0 Mon Sep 17 00:00:00 2001 From: Emik Date: Fri, 5 Jun 2026 00:37:27 +0200 Subject: [PATCH] Fix Amber Acorn triggering multiple times, mark Artemis X --- manifest.json | 2 +- src/joker.lua | 20 +++++++++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/manifest.json b/manifest.json index dce1102..9c3e81a 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "id": "Roland", "name": "Roland", "prefix": "Roland", - "version": "2.8.7", + "version": "2.8.8", "badge_colour": "8BE9FD", "display_name": "Roland", "main_file": "src/main.lua", diff --git a/src/joker.lua b/src/joker.lua index 40c8369..b1e2f85 100644 --- a/src/joker.lua +++ b/src/joker.lua @@ -655,15 +655,22 @@ joker { return {card = card, xmult = card.ability.extra.xmult} end - if card.debuff or context.blueprint or not context.press_play then + if card.debuff or + context.blueprint or + not context.press_play or + card.ability.extra.context == context then return end - local keys = f(card.area.cards):where(f().nq(card)):keys():table() - local k = pseudorandom_element(keys, pseudoseed "Roland_amber") or card.rank + card.ability.extra.context = context + local cards = card.area.cards + local keys = f(cards):where(f().nq(card)):keys():table() + local key = pseudorandom_element(keys, pseudoseed "Roland_amber") or card.rank + local next = card.rank < key and 1 or -1 - card.area.cards[k], card.area.cards[card.rank] = - card.area.cards[card.rank], card.area.cards[k] + for i = card.rank, key - next, next do + cards[i], cards[i + next] = cards[i + next], cards[i] + end end, } @@ -859,6 +866,9 @@ joker { sequence = {"c_earth", "c_mars", "c_earth"}, }}, attributes = {"economy", "scaling", "planet", "space", "bakery_double_sided"}, + eternal_compat = true, + blueprint_compat = false, + perishable_compat = false, calc_dollar_bonus = function(_, card) return card.ability.extra.dollars end,