Commit 20069f95 authored by Hans Mackowiak's avatar Hans Mackowiak Committed by Michael Kamensky

Adventure as ReplacementEffect

parent 7562ae99
......@@ -145,11 +145,6 @@ public class GameAction {
}
}
// if an adventureCard is put from Stack somewhere else, need to reset to Original State
if (c.isAdventureCard() && ((zoneFrom != null && zoneFrom.is(ZoneType.Stack)) || !zoneTo.is(ZoneType.Stack))) {
c.setState(CardStateName.Original, true);
}
// Clean up the temporary Dash SVar when the Dashed card leaves the battlefield
// Clean up the temporary AtEOT SVar
String endofTurn = c.getSVar("EndOfTurnLeavePlay");
......@@ -352,6 +347,11 @@ public class GameAction {
}
}
// if an adventureCard is put from Stack somewhere else, need to reset to Original State
if (copied.isAdventureCard() && ((zoneFrom != null && zoneFrom.is(ZoneType.Stack)) || !zoneTo.is(ZoneType.Stack))) {
copied.setState(CardStateName.Original, false);
}
GameEntityCounterTable table = new GameEntityCounterTable();
// need to suspend cards own replacement effects
......
......@@ -4693,19 +4693,30 @@ public class CardFactoryUtil {
}
sa.setAdventure(true);
StringBuilder sb = new StringBuilder();
sb.append("Event$ Moved | ValidCard$ Card.Self | Origin$ Stack | ExcludeDestination$ Exile ");
sb.append("| ValidStackSa$ Spell.Adventure | Fizzle$ False | Secondary$ True | Description$ Adventure");
String repeffstr = sb.toString();
String abExile = "DB$ ChangeZone | Defined$ Self | Origin$ Stack | Destination$ Exile | StackDescription$ None";
AbilitySub saExile = (AbilitySub)AbilityFactory.getAbility(abExile, card);
SpellAbility saExile = AbilityFactory.getAbility(abExile, card);
String abEffect = "DB$ Effect | RememberObjects$ Self | StaticAbilities$ Play | ExileOnMoved$ Exile | Duration$ Permanent | ConditionDefined$ Self | ConditionPresent$ Card.nonCopiedSpell";
AbilitySub saEffect = (AbilitySub)AbilityFactory.getAbility(abEffect, card);
StringBuilder sb = new StringBuilder();
sb.append("Mode$ Continuous | MayPlay$ True | EffectZone$ Command | Affected$ Card.IsRemembered+nonAdventure");
sb.append(" | AffectedZone$ Exile | Description$ You may cast the card.");
saEffect.setSVar("Play", sb.toString());
StringBuilder sbPlay = new StringBuilder();
sbPlay.append("Mode$ Continuous | MayPlay$ True | EffectZone$ Command | Affected$ Card.IsRemembered+nonAdventure");
sbPlay.append(" | AffectedZone$ Exile | Description$ You may cast the card.");
saEffect.setSVar("Play", sbPlay.toString());
saExile.setSubAbility(saEffect);
sa.appendSubAbility(saExile);
ReplacementEffect re = ReplacementHandler.parseReplacement(repeffstr, card, true);
re.setLayer(ReplacementLayer.Other);
re.setOverridingAbility(saExile);
card.addReplacementEffect(re);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment