"Return under its owner's control with a +1/+1 counter": the counter is put by the spell's controller, not the permanent's controller (CR 122.6a)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start in ChangeZoneEffect.changeKnownOriginResolve, where the Destination$ Battlefield branch with WithCountersType calls table.put(activator, ...) around line 643, and check the other addCounter calls that pass the activator. The counter's putter should be the player the card enters under, per CR 122.6a. Run the failing test returnedWithCounterIsPutByItsController in forge-gui-desktop (forge.ai). Done when it passes and Stocking the Pantry gets its supply counter, while the existing counter tests still pass.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
When a card is returned to the battlefield under its owner's control "with a +1/+1 counter on it" by an opponent's spell (Otherworldly Journey, Parting Gust, ...), Forge records the opponent (the activating player) as the player who put the counter. The owner's "whenever you put one or more +1/+1 counters on a creature you control" abilities (Stocking the Pantry, and other CounterAddedOnce ... ValidSource$ You triggers) therefore do not trigger.
To Reproduce
- Player B controls Runeclaw Bear and Stocking the Pantry.
- Player A casts Otherworldly Journey targeting Runeclaw Bear.
- At the next end step the Bear returns under B's control with a +1/+1 counter.
- Stocking the Pantry does not trigger; it has no supply counter.
Expected behavior
CR 122.6: putting counters on an object includes "an object that's given counters as it enters the battlefield." CR 122.6a: "If an object enters the battlefield with counters on it, the effect causing the object to be given counters may specify which player puts those counters on it. If the effect doesn't specify a player, the object's controller puts those counters on it." The Bear's controller is B, so B put the counter and Stocking the Pantry triggers (B gets a supply counter).
Additional context
Master 2a3d3fd774, ChangeZoneEffect.changeKnownOriginResolve: for Destination$ Battlefield with WithCountersType, line 643 does table.put(activator, gameCard, cType, cAmount), so the source of the counters is the activating player rather than the controller the card enters under. The other WithCountersType paths (addCounter(cType, cAmount, activator, ...) at lines 781, 826, 835) use the activator the same way. When B casts the Journey on their own Bear, Stocking the Pantry does trigger (control test below passes), which isolates the putter as the cause.
Failing test (forge-gui-desktop, forge.ai; fails with expected:<1> but was:<0> on master):
@Test
public void returnedWithCounterIsPutByItsController() {
Game game = initAndCreateGame();
Player p = game.getPlayers().get(1);
Player opp = game.getPlayers().get(0);
fillLibrary(p, 10);
fillLibrary(opp, 10);
addCards("Plains", 2, p);
Card bear = addCard("Runeclaw Bear", opp);
Card pantry = addCard("Stocking the Pantry", opp);
Card journey = addCardToZone("Otherworldly Journey", p, ZoneType.Hand);
game.getAction().checkStateEffects(true);
SpellAbility sa = journey.getFirstSpellAbility();
sa.setActivatingPlayer(p);
sa.getTargets().add(bear);
AssertJUnit.assertTrue(ComputerUtil.playStack(sa, p, game));
playUntilNextTurn(game);
// the Bear is back under opp's control with one +1/+1 counter (checked), but:
AssertJUnit.assertEquals("Stocking the Pantry should get a supply counter", 1,
pantry.getCounters(CounterType.getType("SUPPLY")));
}
Found with the help of an AI coding agent (Claude Code); reviewed before posting.
- 主要言語
- Java
- スター
- 2.7k
- フォーク
- 1.1k
- 平均マージ
- 20時間 38分
- マージ済み PR(30日)
- 323
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Card-Forge/forge のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
Card-Forge/forge#13128 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Card-Forge/forge#13092 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
Card-Forge/forge#12877 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Card-Forge/forge#12710 ·
メンテナーはふだん 1 日以内に返信
-
Shandalar "The Drunken Plea" quest completes prematurely再び着手できるかも @Simisays が 35 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Card-Forge/forge#12306 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
Card-Forge/forge の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
yegor256/takes#1868 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
area: context help wanted type: decision
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
JoaccoG/spoticraft#6 ·
-
CI: LFC/ANTLR caches still use the old lfc/ paths, so the ANTLR jar is downloaded on every run対応中かも @NicoBiernat が今日担当しました。 オープンbug CI
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
lf-lang/reactor-uc#443 ·
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ChiselsAndBits/Chisels-and-Bits#1397 ·