mirror of
https://github.com/correl/mage.git
synced 2024-12-24 03:00:14 +00:00
Fixed commander cast test.
This commit is contained in:
parent
8783a633a1
commit
4f4ade61d5
3 changed files with 3 additions and 3 deletions
|
@ -39,7 +39,6 @@ import org.mage.test.serverside.base.CardTestCommanderDuelBase;
|
|||
*/
|
||||
public class CastCommanderTest extends CardTestCommanderDuelBase {
|
||||
@Test
|
||||
@Ignore
|
||||
public void testFirstAbility() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 5);
|
||||
|
||||
|
|
|
@ -83,9 +83,10 @@ public abstract class GameCommanderImpl extends GameImpl {
|
|||
if (player != null){
|
||||
if (player.getSideboard().size() > 0){
|
||||
Card commander = getCard((UUID)player.getSideboard().toArray()[0]);
|
||||
if (commander != null) {
|
||||
if (commander != null) {
|
||||
player.setCommanderId(commander.getId());
|
||||
commander.moveToZone(Zone.COMMAND, null, this, true);
|
||||
commander.getAbilities().setControllerId(player.getId());
|
||||
ability.addEffect(new CommanderReplacementEffect(commander.getId(), alsoHand, alsoLibrary));
|
||||
ability.addEffect(new CommanderCostModification(commander.getId()));
|
||||
ability.addEffect(new CommanderManaReplacementEffect(player.getId(), CardUtil.getColorIdentity(commander)));
|
||||
|
|
|
@ -2454,7 +2454,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
for (CommandObject commandObject : game.getState().getCommand()) {
|
||||
for (ActivatedAbility ability : commandObject.getAbilities().getActivatedAbilities(Zone.COMMAND)) {
|
||||
if (ability.getControllerId().equals(getId())
|
||||
&& ability.getAbilityType().equals(AbilityType.ACTIVATED)
|
||||
&& ability instanceof ActivatedAbility
|
||||
&& canPlay(ability, availableMana, game.getObject(ability.getSourceId()), game)) {
|
||||
playableActivated.put(ability.toString(), ability);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue