mirror of
https://github.com/magefree/mage.git
synced 2026-01-09 12:22:10 -08:00
* Some minor changes.
This commit is contained in:
parent
e3ebbae5be
commit
019f6722a7
8 changed files with 69 additions and 52 deletions
|
|
@ -31,6 +31,10 @@ public class AtTheEndOfCombatDelayedTriggeredAbility extends DelayedTriggeredAbi
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "At end of combat, " + modes.getText();
|
||||
String ruleText = modes.getText();
|
||||
if (ruleText.contains("at end of combat")) {
|
||||
return ruleText;
|
||||
}
|
||||
return "At end of combat, " + ruleText;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@
|
|||
|
||||
package mage.abilities.costs.common;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.CostImpl;
|
||||
|
|
@ -46,10 +48,16 @@ import mage.util.CardUtil;
|
|||
*/
|
||||
public class ExileFromGraveCost extends CostImpl {
|
||||
|
||||
private final List<Card> exiledCards = new ArrayList<>();
|
||||
|
||||
public ExileFromGraveCost(TargetCardInYourGraveyard target) {
|
||||
this.addTarget(target);
|
||||
if (target.getMaxNumberOfTargets() > 1) {
|
||||
this.text = "Exile " + CardUtil.numberToText(target.getMaxNumberOfTargets()) + " " + target.getTargetName();
|
||||
this.text = "Exile " +
|
||||
(target.getNumberOfTargets() < target.getMaxNumberOfTargets() ? "up to ":"") +
|
||||
CardUtil.numberToText(target.getMaxNumberOfTargets()) +
|
||||
" " +
|
||||
target.getTargetName();
|
||||
}
|
||||
else {
|
||||
this.text = "Exile " + target.getTargetName();
|
||||
|
|
@ -72,6 +80,7 @@ public class ExileFromGraveCost extends CostImpl {
|
|||
|
||||
public ExileFromGraveCost(final ExileFromGraveCost cost) {
|
||||
super(cost);
|
||||
this.exiledCards.addAll(cost.getExiledCards());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -84,6 +93,7 @@ public class ExileFromGraveCost extends CostImpl {
|
|||
if (card == null || !game.getState().getZone(targetId).equals(Zone.GRAVEYARD)) {
|
||||
return false;
|
||||
}
|
||||
exiledCards.add(card);
|
||||
paid |= controller.moveCardToExileWithInfo(card, null, null, sourceId, game, Zone.GRAVEYARD);
|
||||
}
|
||||
}
|
||||
|
|
@ -102,4 +112,7 @@ public class ExileFromGraveCost extends CostImpl {
|
|||
return new ExileFromGraveCost(this);
|
||||
}
|
||||
|
||||
public List<Card> getExiledCards() {
|
||||
return exiledCards;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,9 +72,15 @@ public class CreateDelayedTriggeredAbilityEffect extends OneShotEffect {
|
|||
delayedAbility.setControllerId(source.getControllerId());
|
||||
delayedAbility.setSourceObject(source.getSourceObject(game));
|
||||
if (this.copyTargets) {
|
||||
delayedAbility.getTargets().addAll(source.getTargets());
|
||||
for(Effect effect : delayedAbility.getEffects()) {
|
||||
effect.getTargetPointer().init(game, source);
|
||||
if (source.getTargets().isEmpty()) {
|
||||
for(Effect effect : delayedAbility.getEffects()) {
|
||||
effect.setTargetPointer(targetPointer);
|
||||
}
|
||||
} else {
|
||||
delayedAbility.getTargets().addAll(source.getTargets());
|
||||
for(Effect effect : delayedAbility.getEffects()) {
|
||||
effect.getTargetPointer().init(game, source);
|
||||
}
|
||||
}
|
||||
}
|
||||
game.addDelayedTriggeredAbility(delayedAbility);
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ public class ManaUtil {
|
|||
chosenManaAbility = chosenManaAbilityForHybrid != null ? chosenManaAbilityForHybrid : chosenManaAbility;
|
||||
}
|
||||
|
||||
if (countColored.size() == 0) { // seems there is no colorful mana we can pay for
|
||||
if (countColored.isEmpty()) { // seems there is no colorful mana we can pay for
|
||||
// try to pay {1}
|
||||
if (unpaidMana.getColorless() > 0) {
|
||||
// use any (lets choose first)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue