mirror of
https://github.com/correl/mage.git
synced 2025-04-01 19:07:57 -09:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
0d11a39fc4
4 changed files with 198 additions and 4 deletions
Mage.Server/release/config
Mage.Sets/src/mage/sets/shardsofalara
Mage.Tests/src/test/java/org/mage/test/cards/triggers/dies
|
@ -77,6 +77,7 @@
|
|||
<tournamentType name="Booster Draft Elimination" jar="mage-tournament-boosterdraft-${project.version}.jar" className="mage.tournament.BoosterDraftEliminationTournament" typeName="mage.tournament.BoosterDraftEliminationTournamentType"/>
|
||||
<tournamentType name="Booster Draft Elimination (Cube)" jar="mage-tournament-boosterdraft-${project.version}.jar" className="mage.tournament.BoosterDraftEliminationTournament" typeName="mage.tournament.BoosterDraftEliminationCubeTournamentType"/>
|
||||
<tournamentType name="Booster Draft Elimination (Random)" jar="mage-tournament-boosterdraft-${project.version}.jar" className="mage.tournament.RandomBoosterDraftEliminationTournament" typeName="mage.tournament.RandomBoosterDraftEliminationTournamentType"/>
|
||||
<tournamentType name="Booster Draft Elimination (Rich Man)" jar="mage-tournament-boosterdraft-${project.version}.jar" className="mage.tournament.RichManDraftEliminationTournament" typeName="mage.tournament.RichManDraftEliminationTournamentType"/>
|
||||
<tournamentType name="Booster Draft Swiss" jar="mage-tournament-boosterdraft-${project.version}.jar" className="mage.tournament.BoosterDraftSwissTournament" typeName="mage.tournament.BoosterDraftSwissTournamentType"/>
|
||||
<tournamentType name="Booster Draft Swiss (Cube)" jar="mage-tournament-boosterdraft-${project.version}.jar" className="mage.tournament.BoosterDraftSwissTournament" typeName="mage.tournament.BoosterDraftSwissCubeTournamentType"/>
|
||||
<tournamentType name="Booster Draft Swiss (Random)" jar="mage-tournament-boosterdraft-${project.version}.jar" className="mage.tournament.RandomBoosterDraftSwissTournament" typeName="mage.tournament.RandomBoosterDraftSwissTournamentType"/>
|
||||
|
|
|
@ -28,9 +28,6 @@
|
|||
package mage.sets.shardsofalara;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesAndDealtDamageThisTurnTriggeredAbility;
|
||||
|
@ -39,6 +36,9 @@ import mage.abilities.costs.common.TapSourceCost;
|
|||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
|
@ -57,7 +57,7 @@ public class BloodCultist extends CardImpl {
|
|||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// {tap}: Blood Cultist deals 1 damage to target creature.
|
||||
// {T}: Blood Cultist deals 1 damage to target creature.
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost());
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
|
|
|
@ -1,3 +1,30 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package org.mage.test.cards.triggers.dies;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
|
|
|
@ -0,0 +1,166 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package org.mage.test.cards.triggers.dies;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class BloodCultistTest extends CardTestPlayerBase {
|
||||
|
||||
@Test
|
||||
public void testDiedFromDirectDamage() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 1);
|
||||
// {T}: Blood Cultist deals 1 damage to target creature.
|
||||
// Whenever a creature dealt damage by Blood Cultist this turn dies, put a +1/+1 counter on Blood Cultist.
|
||||
addCard(Zone.HAND, playerA, "Blood Cultist", 1);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Devilthorn Fox", 1); // 3/1
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Blood Cultist");
|
||||
activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}:", "Devilthorn Fox");
|
||||
|
||||
setStopAt(3, PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerB, "Devilthorn Fox", 1);
|
||||
assertPowerToughness(playerA, "Blood Cultist", 2, 2);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDiedFromCombatDamage() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 1);
|
||||
// {T}: Blood Cultist deals 1 damage to target creature.
|
||||
// Whenever a creature dealt damage by Blood Cultist this turn dies, put a +1/+1 counter on Blood Cultist.
|
||||
addCard(Zone.HAND, playerA, "Blood Cultist", 1);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Devilthorn Fox", 1); // 3/1
|
||||
// Lifelink
|
||||
// {2}, Sacrifice a creature: Put a +1/+1 counter on each Vampire you control.
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Indulgent Aristocrat", 1); // 1/1
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Blood Cultist");
|
||||
activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}:", "Devilthorn Fox");
|
||||
|
||||
attack(5, playerA, "Blood Cultist");
|
||||
block(5, playerB, "Indulgent Aristocrat", "Blood Cultist");
|
||||
|
||||
setStopAt(5, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerB, "Devilthorn Fox", 1);
|
||||
assertGraveyardCount(playerB, "Indulgent Aristocrat", 1);
|
||||
assertPowerToughness(playerA, "Blood Cultist", 3, 3);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDiedFromCombatAfterDirectDamageDamage() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion", 1);
|
||||
// {T}: Blood Cultist deals 1 damage to target creature.
|
||||
// Whenever a creature dealt damage by Blood Cultist this turn dies, put a +1/+1 counter on Blood Cultist.
|
||||
addCard(Zone.HAND, playerA, "Blood Cultist", 1);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Devilthorn Fox", 1); // 3/1
|
||||
// Shambling Ghoul enters the battlefield tapped.
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Shambling Ghoul", 1); // 2/3
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Blood Cultist");
|
||||
activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}:", "Devilthorn Fox");
|
||||
activateAbility(5, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}:", "Shambling Ghoul");
|
||||
attack(5, playerA, "Silvercoat Lion");
|
||||
block(5, playerB, "Shambling Ghoul", "Silvercoat Lion");
|
||||
|
||||
setStopAt(5, PhaseStep.POSTCOMBAT_MAIN);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerB, "Devilthorn Fox", 1);
|
||||
assertGraveyardCount(playerB, "Shambling Ghoul", 1);
|
||||
assertGraveyardCount(playerA, "Silvercoat Lion", 1);
|
||||
assertPowerToughness(playerA, "Blood Cultist", 3, 3);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDiedByDirectDamageAfterCombatDamage() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 2);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 1);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion", 1);
|
||||
// {T}: Blood Cultist deals 1 damage to target creature.
|
||||
// Whenever a creature dealt damage by Blood Cultist this turn dies, put a +1/+1 counter on Blood Cultist.
|
||||
addCard(Zone.HAND, playerA, "Blood Cultist", 1);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Devilthorn Fox", 1); // 3/1
|
||||
// Shambling Ghoul enters the battlefield tapped.
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Shambling Ghoul", 1); // 2/3
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Blood Cultist");
|
||||
activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}:", "Devilthorn Fox");
|
||||
activateAbility(5, PhaseStep.POSTCOMBAT_MAIN, playerA, "{T}:", "Shambling Ghoul");
|
||||
attack(5, playerA, "Silvercoat Lion");
|
||||
block(5, playerB, "Shambling Ghoul", "Silvercoat Lion");
|
||||
|
||||
setStopAt(5, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerB, "Devilthorn Fox", 1);
|
||||
assertGraveyardCount(playerB, "Shambling Ghoul", 1);
|
||||
assertGraveyardCount(playerA, "Silvercoat Lion", 1);
|
||||
assertPowerToughness(playerA, "Blood Cultist", 3, 3);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDiedByTwoDirectDamage() {
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Mountain", 3);
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Swamp", 1);
|
||||
// {T}: Blood Cultist deals 1 damage to target creature.
|
||||
// Whenever a creature dealt damage by Blood Cultist this turn dies, put a +1/+1 counter on Blood Cultist.
|
||||
addCard(Zone.HAND, playerA, "Blood Cultist", 1);
|
||||
addCard(Zone.HAND, playerA, "Lightning Bolt", 1);
|
||||
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Shambling Ghoul", 1); // 2/3
|
||||
|
||||
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Blood Cultist");
|
||||
activateAbility(3, PhaseStep.PRECOMBAT_MAIN, playerA, "{T}:", "Shambling Ghoul");
|
||||
castSpell(3, PhaseStep.POSTCOMBAT_MAIN, playerA, "Lightning Bolt", "Shambling Ghoul");
|
||||
|
||||
setStopAt(3, PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertGraveyardCount(playerB, "Shambling Ghoul", 1);
|
||||
assertGraveyardCount(playerA, "Lightning Bolt", 1);
|
||||
assertPowerToughness(playerA, "Blood Cultist", 2, 2);
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue