mirror of
https://github.com/correl/mage.git
synced 2025-04-06 01:04:10 -09:00
* Fixed problem with CopyEffect and fixed MisdirectionTest.
This commit is contained in:
parent
883021832e
commit
dba3c881e1
2 changed files with 4 additions and 4 deletions
Mage.Tests/src/test/java/org/mage/test/cards/single
Mage/src/mage/abilities/effects/common
|
@ -60,14 +60,14 @@ public class MisdirectionTest extends CardTestPlayerBase {
|
|||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Rakshasa's Secret", playerB);
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerB, "Misdirection", "Rakshasa's Secret", "Rakshasa's Secret");
|
||||
addTarget(playerA, playerA); // only possible target is player A
|
||||
addTarget(playerB, playerA); // only legal target is player B as opponent - so player A should not be allowed
|
||||
|
||||
setStopAt(1, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerA, "Rakshasa's Secret", 1);
|
||||
assertGraveyardCount(playerB, "Misdirection", 1);
|
||||
assertHandCount(playerB, "Silvercoat Lion", 2);
|
||||
assertHandCount(playerB, "Silvercoat Lion", 0);
|
||||
|
||||
}
|
||||
}
|
|
@ -80,13 +80,13 @@ public class CopyEffect extends ContinuousEffectImpl {
|
|||
public void init(Ability source, Game game) {
|
||||
super.init(source, game);
|
||||
if (affectedObjectsSet) {
|
||||
affectedObjectList.add(new MageObjectReference(source.getSourceId(), game));
|
||||
affectedObjectList.add(new MageObjectReference(sourceId, game));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(this.sourceId);
|
||||
Permanent permanent;
|
||||
if (affectedObjectsSet) {
|
||||
permanent = affectedObjectList.get(0).getPermanent(game);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue