Merge origin/master

This commit is contained in:
fireshoes 2015-09-02 12:23:55 -05:00
commit bac2a3da99
5 changed files with 13 additions and 16 deletions

View file

@ -30,12 +30,10 @@ package mage.sets.bornofthegods;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.AttacksEachTurnStaticAbility;
import mage.abilities.effects.common.combat.AttacksIfAbleSourceEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
/**

View file

@ -41,14 +41,16 @@ import mage.constants.Rarity;
import mage.constants.Zone;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.mageobject.NamePredicate;
import mage.watchers.common.AttackedThisTurnWatcher;
/**
*
* @author jeffwadsworth
*/
public class MaraudingMaulhorn extends CardImpl {
private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature named Advocate of the Beast");
private final static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature named Advocate of the Beast");
static {
filter.add(new NamePredicate("Advocate of the Beast"));
}
@ -67,8 +69,8 @@ public class MaraudingMaulhorn extends CardImpl {
new PermanentsOnTheBattlefieldCondition(filter, PermanentsOnTheBattlefieldCondition.CountType.FEWER_THAN, 1));
effect.setText("{this} attacks each combat if able unless you control a creature named Advocate of the Beast");
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect), new AttackedThisTurnWatcher());
}
public MaraudingMaulhorn(final MaraudingMaulhorn card) {

View file

@ -29,14 +29,12 @@ package mage.sets.theros;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.AttacksEachTurnStaticAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.combat.AttacksIfAbleSourceEffect;
import mage.abilities.effects.common.RegenerateSourceEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
@ -56,7 +54,8 @@ public class DeathbellowRaider extends CardImpl {
this.toughness = new MageInt(3);
// Deathbellow Raider attacks each turn if able.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AttacksIfAbleSourceEffect(Duration.WhileOnBattlefield)));
this.addAbility(new AttacksEachTurnStaticAbility());
// {2}{B}: Regenerate Deathbellow Raider.
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl("{2}{B}")));
}

View file

@ -55,7 +55,6 @@ public class ShowAndTell extends CardImpl {
super(ownerId, 96, "Show and Tell", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{U}");
this.expansionSetCode = "USG";
// Each player may put an artifact, creature, enchantment, or land card from his or her hand onto the battlefield.
this.getSpellAbility().addEffect(new ShowAndTellEffect());
}
@ -105,8 +104,8 @@ class ShowAndTellEffect extends OneShotEffect {
}
List<Card> cardsToPutIntoPlay = new ArrayList<>();
TargetCardInHand target = new TargetCardInHand(filter);
for(UUID playerId: game.getState().getPlayersInRange(controller.getId(), game)) {
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
Player player = game.getPlayer(playerId);
if (player != null) {
if (player.chooseUse(outcome, "Put an artifact, creature, enchantment, or land card from hand onto the battlefield?", source, game)) {
@ -117,10 +116,10 @@ class ShowAndTellEffect extends OneShotEffect {
cardsToPutIntoPlay.add(card);
}
}
}
}
}
}
for (Card card: cardsToPutIntoPlay) {
for (Card card : cardsToPutIntoPlay) {
Player player = game.getPlayer(card.getOwnerId());
if (player != null) {
player.putOntoBattlefieldWithInfo(card, game, Zone.HAND, source.getSourceId());

View file

@ -14,7 +14,6 @@ import mage.constants.Zone;
*
* @author LevelX2
*/
public class AttacksEachCombatStaticAbility extends StaticAbility {
public AttacksEachCombatStaticAbility() {