mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
* Cabal Conditioning - Fixed that only the first target player had to discard cards.
This commit is contained in:
parent
4ed988843b
commit
bfb2924966
1 changed files with 7 additions and 4 deletions
|
@ -27,6 +27,7 @@
|
|||
*/
|
||||
package mage.abilities.effects.common.discard;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
|
@ -85,9 +86,11 @@ public class DiscardTargetEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(targetPointer.getFirst(game, source));
|
||||
if (player != null) {
|
||||
player.discard(amount.calculate(game, source, this), randomDiscard, source, game);
|
||||
for (UUID targetPlayerId : targetPointer.getTargets(game, source)) {
|
||||
Player player = game.getPlayer(targetPlayerId);
|
||||
if (player != null) {
|
||||
player.discard(amount.calculate(game, source, this), randomDiscard, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -99,7 +102,7 @@ public class DiscardTargetEffect extends OneShotEffect {
|
|||
return staticText;
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if(mode.getTargets().isEmpty()){
|
||||
if (mode.getTargets().isEmpty()) {
|
||||
sb.append("that player");
|
||||
} else {
|
||||
sb.append("target ").append(mode.getTargets().get(0).getTargetName());
|
||||
|
|
Loading…
Reference in a new issue