This commit is contained in:
BetaSteward 2010-11-16 04:20:51 +00:00
parent 7a54ef231e
commit c6ff81e619
13 changed files with 46 additions and 28 deletions

View file

@ -112,10 +112,10 @@ class IceCageEffect extends ReplacementEffectImpl<IceCageEffect> {
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
Permanent enchantment = game.getPermanent(source.getSourceId());
if (enchantment != null && enchantment.getAttachedTo() != null) {
if (source.getSourceId().equals(enchantment.getAttachedTo())) {
if (event.getType() == EventType.DECLARE_ATTACKER || event.getType() == EventType.DECLARE_BLOCKER || event.getType() == EventType.ACTIVATE_ABILITY) {
if (event.getType() == EventType.DECLARE_ATTACKER || event.getType() == EventType.DECLARE_BLOCKER || event.getType() == EventType.ACTIVATE_ABILITY) {
Permanent enchantment = game.getPermanent(source.getSourceId());
if (enchantment != null && enchantment.getAttachedTo() != null) {
if (event.getSourceId().equals(enchantment.getAttachedTo())) {
return true;
}
}
@ -147,11 +147,13 @@ class IceCageAbility extends TriggeredAbilityImpl<IceCageAbility> {
@Override
public boolean checkTrigger(GameEvent event, Game game) {
Permanent enchantment = game.getPermanent(sourceId);
if (enchantment != null && enchantment.getAttachedTo() != null) {
if (event.getTargetId().equals(enchantment.getAttachedTo()) && event.getType() == EventType.TARGETED) {
trigger(game, event.getPlayerId());
return true;
if (event.getType() == EventType.TARGETED) {
Permanent enchantment = game.getPermanent(sourceId);
if (enchantment != null && enchantment.getAttachedTo() != null) {
if (event.getTargetId().equals(enchantment.getAttachedTo())) {
trigger(game, event.getPlayerId());
return true;
}
}
}
return false;

View file

@ -49,7 +49,7 @@ import mage.game.permanent.Permanent;
public class GarruksPackleader extends CardImpl<GarruksPackleader> {
public GarruksPackleader(UUID ownerId) {
super(ownerId, 177, "Garruks Packleader", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{G}");
super(ownerId, 177, "Garruk's Packleader", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{4}{G}");
this.expansionSetCode = "M11";
this.subtype.add("Beast");
this.color.setGreen(true);

View file

@ -33,8 +33,10 @@ import mage.Constants.CardType;
import mage.Constants.Duration;
import mage.Constants.Outcome;
import mage.Constants.Rarity;
import mage.Constants.Zone;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.ReplacementEffectImpl;
import mage.abilities.keyword.IslandwalkAbility;
import mage.cards.CardImpl;
@ -59,6 +61,7 @@ public class HarborSerpent extends CardImpl<HarborSerpent> {
this.toughness = new MageInt(5);
this.addAbility(IslandwalkAbility.getInstance());
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new HarborSerpentEffect()));
}
public HarborSerpent(final HarborSerpent card) {

View file

@ -69,7 +69,7 @@ public class HoardingDragon extends CardImpl<HoardingDragon> {
this.addAbility(FlyingAbility.getInstance());
this.addAbility(new EntersBattlefieldTriggeredAbility(new HoardingDragonEffect(this.getId()), true));
this.addAbility(new PutIntoGraveFromBattlefieldTriggeredAbility(new ReturnFromExileEffect(this.getId(), Zone.BATTLEFIELD), true));
this.addAbility(new PutIntoGraveFromBattlefieldTriggeredAbility(new ReturnFromExileEffect(this.getId(), Zone.BATTLEFIELD), false));
}
public HoardingDragon(final HoardingDragon card) {

View file

@ -41,7 +41,7 @@ import mage.cards.CardImpl;
public class GoblinPiker extends CardImpl<GoblinPiker> {
public GoblinPiker(UUID ownerId) {
super(ownerId, 209, "GoblinPiker", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}");
super(ownerId, 209, "Goblin Piker", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{1}{R}");
this.expansionSetCode = "10E";
this.subtype.add("Goblin");
this.subtype.add("Warrier");