This commit is contained in:
Evan Kranzler 2018-05-25 19:37:56 -04:00
commit 07886811f0
14 changed files with 158 additions and 133 deletions

View file

@ -182,7 +182,7 @@ class CorrosiveOozeCombatWatcher extends Watcher {
if (event.getType() == GameEvent.EventType.BLOCKER_DECLARED) {
Permanent attacker = game.getPermanent(event.getTargetId());
Permanent blocker = game.getPermanent(event.getSourceId());
if (attacker != null && attacker.getName().equals("Corrosive Ooze")) {
if (attacker != null && attacker.getName().equals("Corrosive Ooze")) { // To check for name is not working if Ooze is copied but name changed
if (blocker != null && hasAttachedEquipment(game, blocker)) {
MageObjectReference oozeMor = new MageObjectReference(attacker, game);
HashSet<MageObjectReference> relatedCreatures = oozeBlocksOrBlocked.getOrDefault(oozeMor, new HashSet<>());

View file

@ -92,7 +92,7 @@ class JinxedIdolEffect extends ContinuousEffectImpl {
@Override
public boolean apply(Game game, Ability source) {
Permanent permanent = (Permanent) source.getSourceObjectIfItStillExists(game);
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
if (permanent != null) {
return permanent.changeControllerId(source.getFirstTarget(), game);
} else {

View file

@ -25,7 +25,6 @@
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.cards.m;
import java.util.UUID;
@ -42,14 +41,16 @@ import mage.target.common.TargetCreaturePermanent;
*/
public class MutagenicGrowth extends CardImpl {
public MutagenicGrowth (UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G/P}");
public MutagenicGrowth(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G/P}");
// ({GP} can be paid with either {G} or 2 life.)
// Target creature gets +2/+2 until end of turn.
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addEffect(new BoostTargetEffect(2, 2, Duration.EndOfTurn));
}
public MutagenicGrowth (final MutagenicGrowth card) {
public MutagenicGrowth(final MutagenicGrowth card) {
super(card);
}

View file

@ -52,10 +52,9 @@ import mage.target.common.TargetCreaturePermanent;
public class Paralyze extends CardImpl {
public Paralyze(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{B}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{B}");
this.subtype.add(SubType.AURA);
// Enchant creature
TargetPermanent auraTarget = new TargetCreaturePermanent();
this.getSpellAbility().addTarget(auraTarget);
@ -96,14 +95,18 @@ class ParalyzeEffect extends DoIfCostPaid {
@Override
protected Player getPayingPlayer(Game game, Ability source) {
Permanent attachment = game.getPermanent(source.getSourceId());
Permanent attachedTo = game.getPermanent(attachment.getAttachedTo());
return game.getPlayer(attachedTo.getControllerId());
Permanent attachment = game.getPermanentOrLKIBattlefield(source.getSourceId());
if (attachment != null && attachment.getAttachedTo() != null) {
Permanent attachedTo = game.getPermanent(attachment.getAttachedTo());
if (attachedTo != null) {
return game.getPlayer(attachedTo.getControllerId());
}
}
return null;
}
@Override
public String getText(Mode mode) {
return new StringBuilder("that player may ").append(getCostText())
.append(". If he or she does, ").append(executingEffects.getText(mode)).toString();
return "that player may " + getCostText() + ". If he or she does, " + executingEffects.getText(mode);
}
}
}