mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
* Fixed a bug introduced with TargetSource() fix.
This commit is contained in:
parent
54570bac59
commit
7f6d5bcac6
2 changed files with 6 additions and 10 deletions
|
@ -64,8 +64,6 @@ public class HarmsWayRedirectDamageTest extends CardTestPlayerBase {
|
|||
* Tests redirecting from triggered ability
|
||||
*/
|
||||
@Test
|
||||
// This test doesn't work in test framework but the test case works fine in real game
|
||||
// -- this is because of no possibility to ask AI to play spell when triggered is in the stack
|
||||
public void testRedirectTriggeredAbilityDamage() {
|
||||
addCard(Zone.HAND, playerA, "Lightning Bolt");
|
||||
// The next 2 damage that a source of your choice would deal to you and/or permanents
|
||||
|
|
|
@ -228,8 +228,8 @@ public abstract class TargetImpl implements Target {
|
|||
//20100423 - 113.3
|
||||
if (maxNumberOfTargets == 0 || targets.size() < maxNumberOfTargets) {
|
||||
if (!targets.containsKey(id)) {
|
||||
if (source != null) {
|
||||
if (!skipEvent && !game.replaceEvent(GameEvent.getEvent(EventType.TARGET, id, source.getSourceId(), source.getControllerId()))) {
|
||||
if (source != null && !skipEvent) {
|
||||
if (!game.replaceEvent(GameEvent.getEvent(EventType.TARGET, id, source.getSourceId(), source.getControllerId()))) {
|
||||
targets.put(id, 0);
|
||||
rememberZoneChangeCounter(id, game);
|
||||
chosen = targets.size() >= minNumberOfTargets;
|
||||
|
@ -237,8 +237,7 @@ public abstract class TargetImpl implements Target {
|
|||
game.fireEvent(GameEvent.getEvent(EventType.TARGETED, id, source.getSourceId(), source.getControllerId()));
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
targets.put(id, 0);
|
||||
}
|
||||
}
|
||||
|
@ -267,8 +266,8 @@ public abstract class TargetImpl implements Target {
|
|||
if (targets.containsKey(id)) {
|
||||
amount += targets.get(id);
|
||||
}
|
||||
if (source != null) {
|
||||
if (!skipEvent && !game.replaceEvent(GameEvent.getEvent(EventType.TARGET, id, source.getId(), source.getControllerId()))) {
|
||||
if (source != null && !skipEvent) {
|
||||
if (!game.replaceEvent(GameEvent.getEvent(EventType.TARGET, id, source.getId(), source.getControllerId()))) {
|
||||
targets.put(id, amount);
|
||||
rememberZoneChangeCounter(id, game);
|
||||
chosen = targets.size() >= minNumberOfTargets;
|
||||
|
@ -276,8 +275,7 @@ public abstract class TargetImpl implements Target {
|
|||
game.fireEvent(GameEvent.getEvent(EventType.TARGETED, id, source.getId(), source.getControllerId()));
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
targets.put(id, amount);
|
||||
rememberZoneChangeCounter(id, game);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue