mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
Minor changes to some cards.
This commit is contained in:
parent
a46eb1a366
commit
09a099facd
3 changed files with 42 additions and 38 deletions
|
@ -67,7 +67,11 @@ public class Pentavus extends CardImpl {
|
|||
this.subtype.add("Construct");
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(0);
|
||||
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(5))));
|
||||
|
||||
// Pentavus enters the battlefield with five +1/+1 counters on it.
|
||||
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(5)),
|
||||
"with five +1/+1 counters on it"));
|
||||
|
||||
Ability firstAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new PentaviteToken(), 1), new GenericManaCost(1));
|
||||
firstAbility.addCost(new RemoveCountersSourceCost(CounterType.P1P1.createInstance(1)));
|
||||
this.addAbility(firstAbility);
|
||||
|
|
|
@ -105,7 +105,7 @@ class MoveCounterFromSourceToTargetEffect extends OneShotEffect {
|
|||
if (sourcePermanent != null && sourcePermanent.getCounters().getCount(CounterType.P1P1) > 0) {
|
||||
Permanent targetPermanent = game.getPermanent(targetPointer.getFirst(game, source));
|
||||
if (targetPermanent != null) {
|
||||
sourcePermanent.getCounters().removeCounter(CounterType.P1P1, 1);
|
||||
sourcePermanent.removeCounters(CounterType.P1P1.createInstance(), game);
|
||||
targetPermanent.addCounters(CounterType.P1P1.createInstance(), game);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -248,41 +248,41 @@ class NecromancyLeavesBattlefieldTriggeredEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
|
||||
class NecromancyAttachEffect extends OneShotEffect {
|
||||
|
||||
public NecromancyAttachEffect(Outcome outcome) {
|
||||
super(outcome);
|
||||
}
|
||||
|
||||
public NecromancyAttachEffect(Outcome outcome, String rule) {
|
||||
super(outcome);
|
||||
staticText = rule;
|
||||
}
|
||||
|
||||
public NecromancyAttachEffect(final NecromancyAttachEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NecromancyAttachEffect copy() {
|
||||
return new NecromancyAttachEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Card card = game.getCard(source.getFirstTarget());
|
||||
if (card != null && game.getState().getZone(source.getFirstTarget()).equals(Zone.GRAVEYARD)) {
|
||||
// Card have no attachedTo attribute yet so write ref only to enchantment now
|
||||
Permanent enchantment = game.getPermanent(source.getSourceId());
|
||||
if (enchantment != null) {
|
||||
enchantment.attachTo(card.getId(), game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
//class NecromancyAttachEffect extends OneShotEffect {
|
||||
//
|
||||
// public NecromancyAttachEffect(Outcome outcome) {
|
||||
// super(outcome);
|
||||
// }
|
||||
//
|
||||
// public NecromancyAttachEffect(Outcome outcome, String rule) {
|
||||
// super(outcome);
|
||||
// staticText = rule;
|
||||
// }
|
||||
//
|
||||
// public NecromancyAttachEffect(final NecromancyAttachEffect effect) {
|
||||
// super(effect);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public NecromancyAttachEffect copy() {
|
||||
// return new NecromancyAttachEffect(this);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean apply(Game game, Ability source) {
|
||||
// Card card = game.getCard(source.getFirstTarget());
|
||||
// if (card != null && game.getState().getZone(source.getFirstTarget()).equals(Zone.GRAVEYARD)) {
|
||||
// // Card have no attachedTo attribute yet so write ref only to enchantment now
|
||||
// Permanent enchantment = game.getPermanent(source.getSourceId());
|
||||
// if (enchantment != null) {
|
||||
// enchantment.attachTo(card.getId(), game);
|
||||
// }
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
//}
|
||||
|
||||
class NecromancyChangeAbilityEffect extends ContinuousEffectImpl implements SourceEffect {
|
||||
|
||||
|
@ -319,7 +319,7 @@ class NecromancyChangeAbilityEffect extends ContinuousEffectImpl implements Sour
|
|||
|
||||
@Override
|
||||
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
|
||||
Permanent permanent = affectedObjectList.get(0).getPermanent(game);;
|
||||
Permanent permanent = affectedObjectList.get(0).getPermanent(game);
|
||||
if (permanent != null) {
|
||||
switch (layer) {
|
||||
case TypeChangingEffects_4:
|
||||
|
|
Loading…
Reference in a new issue