mirror of
https://github.com/correl/mage.git
synced 2024-11-28 19:19:55 +00:00
[STX] fixed Star Pupil not adding counters (fixes #7744)
This commit is contained in:
parent
aea59275d9
commit
29f7555ac3
3 changed files with 36 additions and 2 deletions
|
@ -75,7 +75,7 @@ class SpitefulSquadEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent sourcePermanent = source.getSourcePermanentOrLKI(game);
|
||||
Permanent sourcePermanent = (Permanent) getValue("permanentLeftBattlefield");
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (sourcePermanent == null || permanent == null) {
|
||||
return false;
|
||||
|
|
|
@ -71,7 +71,7 @@ class StarPupilEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent sourcePermanent = source.getSourcePermanentOrLKI(game);
|
||||
Permanent sourcePermanent = (Permanent) getValue("permanentLeftBattlefield");
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (sourcePermanent == null || permanent == null) {
|
||||
return false;
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
package org.mage.test.cards.single.stx;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class StarPupilTest extends CardTestPlayerBase {
|
||||
|
||||
private static final String pupil = "Star Pupil";
|
||||
private static final String murder = "Murder";
|
||||
private static final String lion = "Silvercoat Lion";
|
||||
|
||||
@Test
|
||||
public void testPupil() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Scrubland", 4);
|
||||
addCard(Zone.BATTLEFIELD, playerA, lion);
|
||||
addCard(Zone.HAND, playerA, pupil);
|
||||
addCard(Zone.HAND, playerA, murder);
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, pupil);
|
||||
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, murder, pupil);
|
||||
|
||||
setStopAt(1, PhaseStep.END_TURN);
|
||||
execute();
|
||||
assertAllCommandsUsed();
|
||||
|
||||
assertCounterCount(lion, CounterType.P1P1, 1);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue