mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 11:32:00 -08:00
Fixed Demonic Appetite to target only controlled creatures and the sacrifice is mandatory
This commit is contained in:
parent
cdf7365ff1
commit
0e45b25455
1 changed files with 29 additions and 12 deletions
|
|
@ -43,7 +43,6 @@ import mage.abilities.keyword.EnchantAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.target.TargetPermanent;
|
import mage.target.TargetPermanent;
|
||||||
import mage.target.common.TargetControlledCreaturePermanent;
|
import mage.target.common.TargetControlledCreaturePermanent;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -57,14 +56,19 @@ public class DemonicAppetite extends CardImpl<DemonicAppetite> {
|
||||||
this.subtype.add("Aura");
|
this.subtype.add("Aura");
|
||||||
this.color.setBlack(true);
|
this.color.setBlack(true);
|
||||||
|
|
||||||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
TargetPermanent auraTarget = new TargetControlledCreaturePermanent();
|
||||||
this.getSpellAbility().addTarget(auraTarget);
|
this.getSpellAbility().addTarget(auraTarget);
|
||||||
this.getSpellAbility().addEffect(new AttachEffect(Constants.Outcome.BoostCreature));
|
this.getSpellAbility().addEffect(new AttachEffect(Constants.Outcome.BoostCreature));
|
||||||
|
|
||||||
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
Ability ability = new EnchantAbility(auraTarget.getTargetName());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new BoostEnchantedEffect(3, 3, Constants.Duration.WhileOnBattlefield)));
|
this.addAbility(new SimpleStaticAbility(Constants.Zone.BATTLEFIELD, new BoostEnchantedEffect(3, 3, Constants.Duration.WhileOnBattlefield)));
|
||||||
ability = new BeginningOfUpkeepTriggeredAbility(new SacrificeTargetEffect(), Constants.TargetController.YOU, false);
|
|
||||||
ability.addTarget(new TargetControlledCreaturePermanent());
|
ability = new BeginningOfUpkeepTriggeredAbility(
|
||||||
|
new DemonicAppetiteEffect(),
|
||||||
|
Constants.TargetController.YOU,
|
||||||
|
false);
|
||||||
|
ability.addTarget(new TargetControlledCreaturePermanent(true));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -76,5 +80,18 @@ public class DemonicAppetite extends CardImpl<DemonicAppetite> {
|
||||||
public DemonicAppetite copy() {
|
public DemonicAppetite copy() {
|
||||||
return new DemonicAppetite(this);
|
return new DemonicAppetite(this);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class DemonicAppetiteEffect extends SacrificeTargetEffect {
|
||||||
|
|
||||||
|
DemonicAppetiteEffect() {
|
||||||
|
super();
|
||||||
|
staticText = "sacrifice a creature";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DemonicAppetiteEffect copy() {
|
||||||
|
return new DemonicAppetiteEffect();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue