mirror of
https://github.com/correl/mage.git
synced 2025-04-13 01:01:11 -09:00
Issue#453: possibly correct fix for Commander abilities displayed twice
This commit is contained in:
parent
69ce53e6e8
commit
bf7fe02a32
2 changed files with 5 additions and 6 deletions
|
@ -27,11 +27,12 @@
|
||||||
*/
|
*/
|
||||||
package mage.view;
|
package mage.view;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.constants.MageObjectType;
|
import mage.constants.MageObjectType;
|
||||||
import mage.game.command.Commander;
|
import mage.game.command.Commander;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Plopman
|
* @author Plopman
|
||||||
|
@ -40,7 +41,6 @@ public class CommanderView extends CardView implements CommandObjectView, Serial
|
||||||
|
|
||||||
public CommanderView(Commander commander, Card sourceCard) {
|
public CommanderView(Commander commander, Card sourceCard) {
|
||||||
super(sourceCard);
|
super(sourceCard);
|
||||||
rules.addAll(commander.getAbilities().getRules(sourceCard.getName()));
|
|
||||||
this.mageObjectType = MageObjectType.COMMANDER;
|
this.mageObjectType = MageObjectType.COMMANDER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,8 +27,6 @@
|
||||||
*/
|
*/
|
||||||
package mage.game.command;
|
package mage.game.command;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.ObjectColor;
|
import mage.ObjectColor;
|
||||||
import mage.abilities.Abilities;
|
import mage.abilities.Abilities;
|
||||||
|
@ -43,6 +41,9 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Plopman
|
* @author Plopman
|
||||||
|
@ -62,8 +63,6 @@ public class Commander implements CommandObject{
|
||||||
if (!(ability instanceof SpellAbility)) {
|
if (!(ability instanceof SpellAbility)) {
|
||||||
if (ability.getZone().match(Zone.COMMAND)){
|
if (ability.getZone().match(Zone.COMMAND)){
|
||||||
Ability newAbility = ability.copy();
|
Ability newAbility = ability.copy();
|
||||||
// Why are the abilities in command zone printed twice to the toolTipText
|
|
||||||
newAbility.setRuleVisible(false);
|
|
||||||
abilites.add(newAbility);
|
abilites.add(newAbility);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue