mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Fix Egon exiling single card
This commit is contained in:
@@ -753,10 +753,10 @@ public abstract class SpellAbilityEffect {
|
|||||||
} else if ("UntilUntaps".equals(duration)) {
|
} else if ("UntilUntaps".equals(duration)) {
|
||||||
host.addUntapCommand(until);
|
host.addUntapCommand(until);
|
||||||
} else if ("UntilUnattached".equals(duration)) {
|
} else if ("UntilUnattached".equals(duration)) {
|
||||||
sa.getHostCard().addUnattachCommand(until);
|
host.addUnattachCommand(until);
|
||||||
} else if ("UntilFacedown".equals(duration)) {
|
} else if ("UntilFacedown".equals(duration)) {
|
||||||
sa.getHostCard().addFacedownCommand(until);
|
host.addFacedownCommand(until);
|
||||||
}else {
|
} else {
|
||||||
game.getEndOfTurn().addUntil(until);
|
game.getEndOfTurn().addUntil(until);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,12 +3,9 @@ ManaCost:2 B
|
|||||||
Types:Legendary Creature God
|
Types:Legendary Creature God
|
||||||
PT:6/6
|
PT:6/6
|
||||||
K:Deathtouch
|
K:Deathtouch
|
||||||
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigExile | TriggerDescription$ At the beginning of your upkeep, exile two cards from your graveyard. If you can't, sacrifice NICKNAME and draw a card.
|
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ DBSacSelf | TriggerDescription$ At the beginning of your upkeep, exile two cards from your graveyard. If you can't, sacrifice NICKNAME and draw a card.
|
||||||
SVar:TrigExile:DB$ ChangeZone | Origin$ Graveyard | Destination$ Exile | ChangeType$ Card.YouOwn | ChangeNum$ 2 | RememberChanged$ True | Hidden$ True | Mandatory$ True | SubAbility$ DBSacSelf
|
SVar:DBSacSelf:DB$ Sacrifice | Defined$ Self | UnlessCost$ Mandatory ExileFromGrave<2/Card> | UnlessPayer$ You | UnlessResolveSubs$ WhenNotPaid | SubAbility$ DBDraw
|
||||||
SVar:DBSacSelf:DB$ Sacrifice | Defined$ Self | ConditionCheckSVar$ X | ConditionSVarCompare$ LT2 | SubAbility$ DBDraw
|
SVar:DBDraw:DB$ Draw | NumCards$ 1
|
||||||
SVar:DBDraw:DB$ Draw | NumCards$ 1 | ConditionCheckSVar$ X | ConditionSVarCompare$ LT2 | SubAbility$ DBCleanup
|
|
||||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
|
||||||
SVar:X:Remembered$Amount
|
|
||||||
AlternateMode:Modal
|
AlternateMode:Modal
|
||||||
DeckHints:Ability$Discard & Ability$Graveyard
|
DeckHints:Ability$Discard & Ability$Graveyard
|
||||||
Oracle:Deathtouch\nAt the beginning of your upkeep, exile two cards from your graveyard. If you can't, sacrifice Egon and draw a card.
|
Oracle:Deathtouch\nAt the beginning of your upkeep, exile two cards from your graveyard. If you can't, sacrifice Egon and draw a card.
|
||||||
|
|||||||
@@ -410,8 +410,7 @@ public class HumanPlay {
|
|||||||
}
|
}
|
||||||
|
|
||||||
costExile.payAsDecided(p, PaymentDecision.card(p.getCardsIn(ZoneType.Graveyard)), sourceAbility);
|
costExile.payAsDecided(p, PaymentDecision.card(p.getCardsIn(ZoneType.Graveyard)), sourceAbility);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
from = costExile.getFrom();
|
from = costExile.getFrom();
|
||||||
CardCollection list = CardLists.getValidCards(p.getCardsIn(from), part.getType().split(";"), p, source, sourceAbility);
|
CardCollection list = CardLists.getValidCards(p.getCardsIn(from), part.getType().split(";"), p, source, sourceAbility);
|
||||||
final int nNeeded = getAmountFromPart(costPart, source, sourceAbility);
|
final int nNeeded = getAmountFromPart(costPart, source, sourceAbility);
|
||||||
@@ -429,7 +428,12 @@ public class HumanPlay {
|
|||||||
CardCollection newList = new CardCollection();
|
CardCollection newList = new CardCollection();
|
||||||
GameEntityViewMap<Card, CardView> gameCacheList = GameEntityView.getMap(list);
|
GameEntityViewMap<Card, CardView> gameCacheList = GameEntityView.getMap(list);
|
||||||
for (int i = 0; i < nNeeded; i++) {
|
for (int i = 0; i < nNeeded; i++) {
|
||||||
final CardView cv = SGuiChoose.oneOrNone(Localizer.getInstance().getMessage("lblExileFromZone", from.getTranslatedName()), gameCacheList.getTrackableKeys());
|
final CardView cv;
|
||||||
|
if (mandatory) {
|
||||||
|
cv = SGuiChoose.one(Localizer.getInstance().getMessage("lblExileFromZone", from.getTranslatedName()), gameCacheList.getTrackableKeys());
|
||||||
|
} else {
|
||||||
|
cv = SGuiChoose.oneOrNone(Localizer.getInstance().getMessage("lblExileFromZone", from.getTranslatedName()), gameCacheList.getTrackableKeys());
|
||||||
|
}
|
||||||
if (cv == null || !gameCacheList.containsKey(cv)) {
|
if (cv == null || !gameCacheList.containsKey(cv)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user