Added official rule text for keywords. Added some player information.

This commit is contained in:
LevelX2 2012-10-07 02:46:51 +02:00
parent 2ff4dcd283
commit b8ffb3f7c8
3 changed files with 40 additions and 2 deletions

View file

@ -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 cant attack
// or block and its activated abilities cant be activated.
//
public class DetainTargetEffect extends OneShotEffect<DetainTargetEffect> {
public DetainTargetEffect() {
@ -67,6 +78,12 @@ public class DetainTargetEffect extends OneShotEffect<DetainTargetEffect> {
@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<DetainTargetEffect> {
} else {
sb.append("detain up to ").append(target.getMaxNumberOfTargets()).append(" target ").append(target.getTargetName());
}
sb.append(". (Until your next turn, ");
sb.append(". <i>(Until your next turn, ");
if (target instanceof TargetCreaturePermanent) {
@ -101,7 +118,7 @@ public class DetainTargetEffect extends OneShotEffect<DetainTargetEffect> {
}
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)</i>");
return sb.toString();
}
}

View file

@ -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 cards
// power on target creature. Activate this ability only any time you could cast
// a sorcery."
//
public class ScavengeAbility extends ActivatedAbilityImpl<ScavengeAbility> {
public ScavengeAbility(ManaCosts costs) {

View file

@ -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 cant block as long as it has a +1/+1 counter on it."
public class UnleashAbility extends SimpleStaticAbility {
public UnleashAbility() {