forked from External/mage
fixed some ConcurrentModificationException's
This commit is contained in:
parent
4ce652efe5
commit
075ce81e1d
3 changed files with 6 additions and 12 deletions
|
|
@ -100,9 +100,7 @@ class WhirlpoolSDrakeTriggeredEffect extends OneShotEffect {
|
|||
if (controller != null) {
|
||||
int cardsHand = controller.getHand().size();
|
||||
if (cardsHand > 0){
|
||||
Cards cards = controller.getHand();
|
||||
for (UUID cardId: cards) {
|
||||
Card card = game.getCard(cardId);
|
||||
for (Card card: controller.getHand().getCards(game)) {
|
||||
if (card != null) {
|
||||
controller.removeFromHand(card, game);
|
||||
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
|
||||
|
|
|
|||
|
|
@ -102,9 +102,7 @@ class WhirlpoolWarriorTriggeredEffect extends OneShotEffect {
|
|||
if (controller != null) {
|
||||
int cardsHand = controller.getHand().size();
|
||||
if (cardsHand > 0){
|
||||
Cards cards = controller.getHand();
|
||||
for (UUID cardId: cards) {
|
||||
Card card = game.getCard(cardId);
|
||||
for (Card card: controller.getHand().getCards(game)) {
|
||||
if (card != null) {
|
||||
controller.removeFromHand(card, game);
|
||||
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
|
||||
|
|
@ -145,10 +143,9 @@ class WhirlpoolWarriorActivatedEffect extends OneShotEffect {
|
|||
if (player != null) {
|
||||
int cardsHand = player.getHand().size();
|
||||
if (cardsHand > 0){
|
||||
for (UUID cardId: player.getHand()) {
|
||||
Card card = game.getCard(cardId);
|
||||
for (Card card: player.getHand().getCards(game)) {
|
||||
if (card != null) {
|
||||
player.removeFromHand(card, game);
|
||||
player.removeFromHand(card, game);
|
||||
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,10 +90,9 @@ class MoltenPsycheEffect extends OneShotEffect {
|
|||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
int count = player.getHand().size();
|
||||
for (UUID cardId: player.getHand()) {
|
||||
Card card = game.getCard(cardId);
|
||||
for (Card card: player.getHand().getCards(game)) {
|
||||
if (card != null) {
|
||||
player.removeFromHand(card, game);
|
||||
player.removeFromHand(card, game);
|
||||
card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue