- "Harrowdale" now works only until the regroup phase, but both if you moved to and moved out of "Harrowdale".

This commit is contained in:
marcins78@gmail.com
2012-07-06 10:18:36 +00:00
parent 52c37586d2
commit 332e404f6d
4 changed files with 39 additions and 7 deletions

View File

@@ -35,8 +35,8 @@ public class Card11_243 extends AbstractNewSite {
@Override
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, final PhysicalCard self) {
if (game.getModifiersQuerying().getUntilEndOfTurnLimitCounter(self).getUsedLimit() < 1) {
game.getActionsEnvironment().addUntilEndOfTurnActionProxy(
if (game.getModifiersQuerying().getUntilStartOfPhaseLimitCounter(self, Phase.REGROUP).getUsedLimit() < 1) {
game.getActionsEnvironment().addUntilStartOfPhaseActionProxy(
new AbstractActionProxy() {
private Set<Integer> _minionsMarked = new HashSet<Integer>();
@@ -67,7 +67,7 @@ public class Card11_243 extends AbstractNewSite {
}
return null;
}
});
}, Phase.REGROUP);
game.getModifiersQuerying().getUntilEndOfTurnLimitCounter(self).incrementToLimit(1, 1);
}

View File

@@ -18,7 +18,8 @@ public class ModifiersLogic implements ModifiersEnvironment, ModifiersQuerying {
private Set<Modifier> _skipSet = new HashSet<Modifier>();
private Map<Phase, Map<String, LimitCounter>> _phaseLimitCounters = new HashMap<Phase, Map<String, LimitCounter>>();
private Map<Phase, Map<String, LimitCounter>> _endOfPhaseLimitCounters = new HashMap<Phase, Map<String, LimitCounter>>();
private Map<Phase, Map<String, LimitCounter>> _startOfPhaseLimitCounters = new HashMap<Phase, Map<String, LimitCounter>>();
private Map<Integer, LimitCounter> _turnLimitCounters = new HashMap<Integer, LimitCounter>();
private int _drawnThisPhaseCount = 0;
@@ -29,12 +30,32 @@ public class ModifiersLogic implements ModifiersEnvironment, ModifiersQuerying {
return getUntilEndOfPhaseLimitCounter(card, "", phase);
}
@Override
public LimitCounter getUntilStartOfPhaseLimitCounter(PhysicalCard card, Phase phase) {
return getUntilEndOfPhaseLimitCounter(card, "", phase);
}
@Override
public LimitCounter getUntilEndOfPhaseLimitCounter(PhysicalCard card, String prefix, Phase phase) {
Map<String, LimitCounter> limitCounterMap = _phaseLimitCounters.get(phase);
Map<String, LimitCounter> limitCounterMap = _endOfPhaseLimitCounters.get(phase);
if (limitCounterMap == null) {
limitCounterMap = new HashMap<String, LimitCounter>();
_phaseLimitCounters.put(phase, limitCounterMap);
_endOfPhaseLimitCounters.put(phase, limitCounterMap);
}
LimitCounter limitCounter = limitCounterMap.get(prefix + card.getCardId());
if (limitCounter == null) {
limitCounter = new DefaultLimitCounter();
limitCounterMap.put(prefix + card.getCardId(), limitCounter);
}
return limitCounter;
}
@Override
public LimitCounter getUntilStartOfPhaseLimitCounter(PhysicalCard card, String prefix, Phase phase) {
Map<String, LimitCounter> limitCounterMap = _startOfPhaseLimitCounters.get(phase);
if (limitCounterMap == null) {
limitCounterMap = new HashMap<String, LimitCounter>();
_startOfPhaseLimitCounters.put(phase, limitCounterMap);
}
LimitCounter limitCounter = limitCounterMap.get(prefix + card.getCardId());
if (limitCounter == null) {
@@ -133,7 +154,7 @@ public class ModifiersLogic implements ModifiersEnvironment, ModifiersQuerying {
removeModifiers(list);
list.clear();
}
Map<String, LimitCounter> counterMap = _phaseLimitCounters.get(phase);
Map<String, LimitCounter> counterMap = _endOfPhaseLimitCounters.get(phase);
if (counterMap != null)
counterMap.clear();
@@ -147,6 +168,10 @@ public class ModifiersLogic implements ModifiersEnvironment, ModifiersQuerying {
removeModifiers(list);
list.clear();
}
Map<String, LimitCounter> counterMap = _startOfPhaseLimitCounters.get(phase);
if (counterMap != null)
counterMap.clear();
}
public void removeEndOfTurn() {

View File

@@ -17,6 +17,10 @@ public interface ModifiersQuerying {
public LimitCounter getUntilEndOfPhaseLimitCounter(PhysicalCard card, String prefix, Phase phase);
public LimitCounter getUntilStartOfPhaseLimitCounter(PhysicalCard card, Phase phase);
public LimitCounter getUntilStartOfPhaseLimitCounter(PhysicalCard card, String prefix, Phase phase);
public LimitCounter getUntilEndOfTurnLimitCounter(PhysicalCard card);
public Collection<Modifier> getModifiersAffecting(GameState gameState, PhysicalCard card);

View File

@@ -1,4 +1,7 @@
<pre style="font-size:80%">
<b>6 Jul. 2012</b>
- "Harrowdale" now works only until the regroup phase, but both if you moved to and moved out of "Harrowdale".
<b>3 Jul. 2012</b>
- "Gorgoroth Officer" no longer allows to not discard cards from hand to play the minion.