This commit is contained in:
magenoxx 2011-05-13 17:55:06 +04:00
commit f55e3a88dd
4 changed files with 7 additions and 2 deletions

View file

@ -218,7 +218,7 @@ public class ProteanHydra extends CardImpl<ProteanHydra> {
@Override @Override
public boolean checkTrigger(GameEvent event, Game game) { public boolean checkTrigger(GameEvent event, Game game) {
if (event.getType() == EventType.END_TURN_STEP_PRE && event.getPlayerId().equals(this.controllerId)) { if (event.getType() == EventType.END_TURN_STEP_PRE) {
return true; return true;
} }
return false; return false;

View file

@ -33,6 +33,7 @@ import mage.Constants.CardType;
import mage.Constants.Rarity; import mage.Constants.Rarity;
import mage.MageInt; import mage.MageInt;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.keyword.InfectAbility;
import mage.abilities.keyword.ProtectionAbility; import mage.abilities.keyword.ProtectionAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.filter.common.FilterArtifactCard; import mage.filter.common.FilterArtifactCard;
@ -52,6 +53,7 @@ public class TelJiladFallen extends CardImpl<TelJiladFallen> {
this.color.setGreen(true); this.color.setGreen(true);
this.power = new MageInt(3); this.power = new MageInt(3);
this.toughness = new MageInt(1); this.toughness = new MageInt(1);
this.addAbility(InfectAbility.getInstance());
this.addAbility(new ProtectionAbility(new FilterArtifactCard("artifacts"))); this.addAbility(new ProtectionAbility(new FilterArtifactCard("artifacts")));
} }

View file

@ -95,6 +95,7 @@ class OranRiefTheVastwoodEffect extends OneShotEffect<OranRiefTheVastwoodEffect>
FilterPermanent filter = new FilterPermanent(); FilterPermanent filter = new FilterPermanent();
filter.getCardType().add(CardType.CREATURE); filter.getCardType().add(CardType.CREATURE);
filter.getColor().setGreen(true); filter.getColor().setGreen(true);
filter.setUseColor(true);
for (Permanent permanent: game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) { for (Permanent permanent: game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) {
if (permanent.getTurnsOnBattlefield() == 0) { if (permanent.getTurnsOnBattlefield() == 0) {
permanent.addCounters(new PlusOneCounter()); permanent.addCounters(new PlusOneCounter());

View file

@ -62,7 +62,9 @@ public class PutLibraryIntoGraveTargetEffect extends OneShotEffect<PutLibraryInt
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getFirstTarget()); Player player = game.getPlayer(source.getFirstTarget());
if (player != null) { if (player != null) {
for (int i = 0; i < amount; i++) { // putting cards to grave shouldn't end the game, so getting minimun available
int cardsCount = Math.min(amount, player.getLibrary().size());
for (int i = 0; i < cardsCount; i++) {
Card card = player.getLibrary().removeFromTop(game); Card card = player.getLibrary().removeFromTop(game);
if (card != null) if (card != null)
player.getGraveyard().add(card); player.getGraveyard().add(card);