mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 03:22:00 -08:00
* Prismatic Strands - Added game log message with the color chosen.
This commit is contained in:
parent
d26cc4ac1b
commit
8beaeab485
1 changed files with 20 additions and 13 deletions
|
|
@ -58,6 +58,7 @@ import mage.target.common.TargetControlledCreaturePermanent;
|
|||
public class PrismaticStrands extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped white creature you control");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new TappedPredicate()));
|
||||
filter.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
|
|
@ -71,7 +72,7 @@ public class PrismaticStrands extends CardImpl {
|
|||
this.getSpellAbility().addEffect(new PrismaticStrandsEffect());
|
||||
|
||||
// Flashback-Tap an untapped white creature you control.
|
||||
this.addAbility(new FlashbackAbility(new TapTargetCost(new TargetControlledCreaturePermanent(1,1,filter,false)), TimingRule.INSTANT));
|
||||
this.addAbility(new FlashbackAbility(new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, false)), TimingRule.INSTANT));
|
||||
}
|
||||
|
||||
public PrismaticStrands(final PrismaticStrands card) {
|
||||
|
|
@ -103,11 +104,17 @@ class PrismaticStrandsEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||
if (controller != null && sourceObject != null) {
|
||||
ChoiceColor choice = new ChoiceColor();
|
||||
controller.choose(Outcome.PreventDamage, choice, game);
|
||||
game.addEffect(new PrismaticStrandsPreventionEffect(choice.getColor()), source);
|
||||
return true;
|
||||
if (choice.isChosen()) {
|
||||
if (!game.isSimulation()) {
|
||||
game.informPlayers(sourceObject.getLogName() + ": " + controller.getLogName() + " has chosen sources of the color " + choice.getChoice());
|
||||
}
|
||||
game.addEffect(new PrismaticStrandsPreventionEffect(choice.getColor()), source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue