- Added Reins of Power

This commit is contained in:
swordshine
2013-05-24 04:31:50 +00:00
parent b1b9b1d3b7
commit 44e967bfcb
5 changed files with 25 additions and 2 deletions

View File

@@ -80,6 +80,8 @@ public class ControlGainEffect extends SpellAbilityEffect {
final boolean bUntap = sa.hasParam("Untap");
final boolean bTapOnLose = sa.hasParam("TapOnLose");
final boolean bNoRegen = sa.hasParam("NoRegen");
final boolean remember = sa.hasParam("RememberControlled");
final boolean forget = sa.hasParam("ForgetControlled");
final List<String> destroyOn = sa.hasParam("DestroyTgt") ? Arrays.asList(sa.getParam("DestroyTgt").split(",")) : null;
final List<String> kws = sa.hasParam("AddKWs") ? Arrays.asList(sa.getParam("AddKWs").split(" & ")) : null;
final List<String> lose = sa.hasParam("LoseControl") ? Arrays.asList(sa.getParam("LoseControl").split(",")) : null;
@@ -142,6 +144,14 @@ public class ControlGainEffect extends SpellAbilityEffect {
}
}
if (remember && !sa.getSourceCard().getRemembered().contains(tgtC)) {
sa.getSourceCard().addRemembered(tgtC);
}
if (forget && sa.getSourceCard().getRemembered().contains(tgtC)) {
sa.getSourceCard().removeRemembered(tgtC);
}
if (lose != null) {
if (lose.contains("LeavesPlay")) {
sa.getSourceCard().addLeavesPlayCommand(this.getLoseControlCommand(tgtC, tStamp, bTapOnLose, source, kws));

View File

@@ -92,7 +92,7 @@ public class RepeatEachEffect extends SpellAbilityEffect {
if (sa.hasParam("RepeatCounters")) {
Card target = sa.getTargetCard();
if (target == null) {
target = AbilityUtils.getDefinedCards(sa.getSourceCard(), sa.getParam("Defined"), sa).get(0);
target = AbilityUtils.getDefinedCards(source, sa.getParam("Defined"), sa).get(0);
}
Set<CounterType> types = new HashSet<CounterType>(target.getCounters().keySet());
for (CounterType type : types) {