mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 19:41:59 -08:00
* Eye of the Storm - Fixed possible endless loop if player quits game.
This commit is contained in:
parent
949897632d
commit
014c93e05e
1 changed files with 5 additions and 5 deletions
|
|
@ -147,8 +147,8 @@ class EyeOfTheStormEffect1 extends OneShotEffect {
|
|||
if (spell != null && eyeOfTheStorm != null) {
|
||||
Player spellController = game.getPlayer(spell.getControllerId());
|
||||
Card card = spell.getCard();
|
||||
if (spellController == null
|
||||
|| card == null
|
||||
if (spellController == null
|
||||
|| card == null
|
||||
|| !instantOrSorceryfilter.match(card, game)) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -159,14 +159,14 @@ class EyeOfTheStormEffect1 extends OneShotEffect {
|
|||
|
||||
eyeOfTheStorm.imprint(card.getId(), game);// technically, using the imprint functionality here is not correct.
|
||||
|
||||
if (eyeOfTheStorm.getImprinted() != null
|
||||
if (eyeOfTheStorm.getImprinted() != null
|
||||
&& !eyeOfTheStorm.getImprinted().isEmpty()) {
|
||||
CardsImpl copiedCards = new CardsImpl();
|
||||
for (UUID uuid : eyeOfTheStorm.getImprinted()) {
|
||||
card = game.getCard(uuid);
|
||||
|
||||
// Check if owner of card is still in game
|
||||
if (card != null
|
||||
if (card != null
|
||||
&& game.getPlayer(card.getOwnerId()) != null) {
|
||||
if (card.isSplitCard()) {
|
||||
copiedCards.add(((SplitCard) card).getLeftHalfCard());
|
||||
|
|
@ -178,7 +178,7 @@ class EyeOfTheStormEffect1 extends OneShotEffect {
|
|||
}
|
||||
|
||||
boolean continueCasting = true;
|
||||
while (continueCasting) {
|
||||
while (spellController.isInGame() && continueCasting) {
|
||||
continueCasting = copiedCards.size() > 1 && spellController.chooseUse(outcome, "Cast one of the copied cards without paying its mana cost?", source, game);
|
||||
|
||||
Card cardToCopy;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue