Skip to content

Commit 19acad0

Browse files
authored
Yume, Chronicler of Valor (MBC) (#11538)
1 parent 3a633f1 commit 19acad0

3 files changed

Lines changed: 16 additions & 0 deletions

File tree

forge-game/src/main/java/forge/game/ability/AbilityUtils.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,6 +1181,8 @@ public static PlayerCollection getDefinedPlayers(final Card card, final String d
11811181
next = game.getNextPlayerAfter(next, dir);
11821182
}
11831183
players.add(next);
1184+
} else if (defined.equals("ManaSpender")) {
1185+
players.addAll(((SpellAbility) sa).getPayingMana().stream().map(m -> m.getPlayer()).collect(Collectors.toList()));
11841186
} else {
11851187
// will be filtered below
11861188
players.addAll(game.getPlayersInTurnOrder());

forge-game/src/main/java/forge/game/spellability/SpellAbilityProperty.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import forge.game.mana.Mana;
1414
import forge.game.mana.ManaCostBeingPaid;
1515
import forge.game.player.Player;
16+
import forge.game.player.PlayerCollection;
1617
import forge.game.staticability.StaticAbility;
1718
import forge.game.staticability.StaticAbilityCastWithFlash;
1819
import forge.game.zone.ZoneType;
@@ -157,6 +158,10 @@ public static boolean hasProperty(SpellAbility sa, Player sourceController, Card
157158
return sa.isLastChapter();
158159
} else if (property.equals("paidPhyrexianMana")) {
159160
return sa.getSpendPhyrexianMana() > 0;
161+
} else if (property.startsWith("ManaSpentBy")) {
162+
String[] k = property.split(" ", 2);
163+
PlayerCollection spenders = AbilityUtils.getDefinedPlayers(source, k[1], spellAbility);
164+
return sa.getPayingMana().stream().anyMatch(m -> spenders.contains(m.getPlayer()));
160165
} else if (property.startsWith("ManaSpent")) {
161166
String[] k = property.split(" ", 2);
162167
String comparator = k[1].substring(0, 2);
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Name:Yume, Chronicler of Valor
2+
ManaCost:1 W
3+
Types:Legendary Creature Human Druid
4+
PT:1/2
5+
S:Mode$ Continuous | Affected$ Card.YouCtrl | Condition$ PlayerTurn | AffectedZone$ Stack | AddKeyword$ Assist | CheckSVar$ X | SVarCompare$ EQ0 | Description$ The first spell you cast during each of your turns has assist. When you cast that spell, if another player spent mana to cast it, you and that player each draw a card. (As you cast a spell with assist, you may choose another player. They may pay some or all of the generic mana in the spell's cost.)
6+
T:Mode$ SpellCast | ValidCard$ Card | ValidActivatingPlayer$ You | ActivatorThisTurnCast$ EQ1 | ValidSA$ Spell.ManaSpentBy Player.Other | PlayerTurn$ True | Execute$ TrigDraw | TriggerZones$ Battlefield | Secondary$ True | TriggerDescription$ The first spell you cast during each of your turns has assist. When you cast that spell, if another player spent mana to cast it, you and that player each draw a card. (As you cast a spell with assist, you may choose another player. They may pay some or all of the generic mana in the spell's cost.)
7+
SVar:TrigDraw:DB$ Draw | Defined$ You & TriggeredSpellAbility>ManaSpender.Other
8+
SVar:X:Count$ThisTurnCast_Card.YouCtrl
9+
Oracle:The first spell you cast during each of your turns has assist. When you cast that spell, if another player spent mana to cast it, you and that player each draw a card. (As you cast a spell with assist, you may choose another player. They may pay some or all of the generic mana in the spell's cost.)

0 commit comments

Comments
 (0)