mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 05:22:02 -08:00
[MIC] Implemented Tomb Tyrant
This commit is contained in:
parent
2cf005f971
commit
3d0571d5e9
3 changed files with 125 additions and 2 deletions
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.abilities.costs.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -7,6 +6,7 @@ import mage.abilities.costs.Cost;
|
|||
import mage.abilities.costs.CostImpl;
|
||||
import mage.constants.AbilityType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
|
@ -23,6 +23,10 @@ public class SacrificeTargetCost extends CostImpl {
|
|||
|
||||
private final List<Permanent> permanents = new ArrayList<>();
|
||||
|
||||
public SacrificeTargetCost(FilterControlledPermanent filter) {
|
||||
this(new TargetControlledPermanent(filter));
|
||||
}
|
||||
|
||||
public SacrificeTargetCost(TargetControlledPermanent target) {
|
||||
this.addTarget(target);
|
||||
target.setNotTarget(true); // sacrifice is never targeted
|
||||
|
|
@ -88,7 +92,7 @@ public class SacrificeTargetCost extends CostImpl {
|
|||
}
|
||||
}
|
||||
// solves issue #8097, if a sacrifice cost is optional and you don't have valid targets, then the cost can be paid
|
||||
if(validTargets == 0 && targets.get(0).getMinNumberOfTargets() == 0){
|
||||
if (validTargets == 0 && targets.get(0).getMinNumberOfTargets() == 0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue