From b8ffb3f7c875d4301e2ae1e681d87b8cc2001836 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Sun, 7 Oct 2012 02:46:51 +0200 Subject: [PATCH] Added official rule text for keywords. Added some player information. --- .../effects/common/DetainTargetEffect.java | 21 +++++++++++++++++-- .../abilities/keyword/ScavengeAbility.java | 12 +++++++++++ .../abilities/keyword/UnleashAbility.java | 9 ++++++++ 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/Mage/src/mage/abilities/effects/common/DetainTargetEffect.java b/Mage/src/mage/abilities/effects/common/DetainTargetEffect.java index 67ee880bd4..3269eafcd0 100644 --- a/Mage/src/mage/abilities/effects/common/DetainTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/DetainTargetEffect.java @@ -28,6 +28,7 @@ package mage.abilities.effects.common; +import java.util.UUID; import mage.Constants; import mage.abilities.Ability; import mage.abilities.Mode; @@ -45,6 +46,16 @@ import mage.target.common.TargetCreaturePermanent; * * @author LevelX2 */ + + +// +// 701.26. Detain +// +// 701.26a Certain spells and abilities can detain a permanent. Until the next +// turn of the controller of that spell or ability, that permanent can’t attack +// or block and its activated abilities can’t be activated. +// + public class DetainTargetEffect extends OneShotEffect { public DetainTargetEffect() { @@ -67,6 +78,12 @@ public class DetainTargetEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { + for (UUID target: this.getTargetPointer().getTargets(game, source)) { + Permanent permanent = game.getPermanent(target); + if (permanent != null) { + game.informPlayers("Detained creature: " + permanent.getName()); + } + } game.getContinuousEffects().addEffect(new DetainReplacementEffect(), source); game.getContinuousEffects().addEffect(new DetainRestrictionEffect(), source); return true; @@ -90,7 +107,7 @@ public class DetainTargetEffect extends OneShotEffect { } else { sb.append("detain up to ").append(target.getMaxNumberOfTargets()).append(" target ").append(target.getTargetName()); } - sb.append(". (Until your next turn, "); + sb.append(". (Until your next turn, "); if (target instanceof TargetCreaturePermanent) { @@ -101,7 +118,7 @@ public class DetainTargetEffect extends OneShotEffect { } sb.append(" can't attack or block and "); sb.append(target.getMaxNumberOfTargets() == 1 ? "its": "their"); - sb.append(" activated abilities can't be activated)"); + sb.append(" activated abilities can't be activated)"); return sb.toString(); } } diff --git a/Mage/src/mage/abilities/keyword/ScavengeAbility.java b/Mage/src/mage/abilities/keyword/ScavengeAbility.java index 8faf77f907..22e9c26140 100644 --- a/Mage/src/mage/abilities/keyword/ScavengeAbility.java +++ b/Mage/src/mage/abilities/keyword/ScavengeAbility.java @@ -47,6 +47,18 @@ import mage.target.common.TargetCreaturePermanent; * * @author magenoxx_at_gmail.com */ + + +// +// 702.95. Scavenge +// +// 702.95a Scavenge is an activated ability that functions only while the card +// with scavenge is in a graveyard. "Scavenge [cost]" means "[Cost], Exile this +// card from your graveyard: Put a number of +1/+1 counters equal to this card’s +// power on target creature. Activate this ability only any time you could cast +// a sorcery." +// + public class ScavengeAbility extends ActivatedAbilityImpl { public ScavengeAbility(ManaCosts costs) { diff --git a/Mage/src/mage/abilities/keyword/UnleashAbility.java b/Mage/src/mage/abilities/keyword/UnleashAbility.java index 755caac72f..44c4e31473 100644 --- a/Mage/src/mage/abilities/keyword/UnleashAbility.java +++ b/Mage/src/mage/abilities/keyword/UnleashAbility.java @@ -46,6 +46,15 @@ import mage.players.Player; * @author LevelX2 */ + +// +// 702.96. Unleash +// +// 702.96a Unleash is a keyword that represents two static abilities. +// "Unleash" means "You may have this permanent enter the battlefield with an additional +1/+1 counter on it" +// and "This permanent can’t block as long as it has a +1/+1 counter on it." + + public class UnleashAbility extends SimpleStaticAbility { public UnleashAbility() {