mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 11:02:00 -08:00
Fixes for Vessel of the all-consuming (#10306)
* Added some tests for Vessel of the All-Consuming * Fixed Vessel of the All-consuming Fixes magefree/mage#10283 Added more commentsto the test. The bug was for a few reasons. The map was keeping track of how many times a player was dealt damage, not how much damage was being dealt. As well, creating a MageObjectReference from an ability doesn't seem like it works properly, so retrieving from the map never worked. --------- Co-authored-by: Oleg Agafonov <jaydi85@gmail.com>
This commit is contained in:
parent
f5ab5a8caf
commit
c45a546526
2 changed files with 73 additions and 8 deletions
|
|
@ -0,0 +1,61 @@
|
|||
package org.mage.test.cards.single.neo;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
|
||||
/**
|
||||
* {@link mage.cards.v.VesselOfTheAllConsuming Vessel of the All-Consuming}
|
||||
* Enchantment Creature — Ogre Shaman
|
||||
* Trample
|
||||
* Whenever Vessel of the All-Consuming deals damage, put a +1/+1 counter on it.
|
||||
* Whenever Vessel of the All-Consuming deals damage to a player, if it has dealt 10 or more damage to that player this turn, they lose the game.
|
||||
* 3/3
|
||||
*
|
||||
* @author alexander-novo
|
||||
*/
|
||||
public class VesselOfTheAllConsumingTest extends CardTestPlayerBase {
|
||||
|
||||
private static final String vessel = "Vessel of the All-Consuming";
|
||||
private static final String hidetsugu = "Hidetsugu Consumes All";
|
||||
|
||||
/**
|
||||
* Reported bug: https://github.com/magefree/mage/issues/10283
|
||||
*
|
||||
* Vessel doesn't seem to be tracking damage properly. It should work with 5 power and double strike.
|
||||
*/
|
||||
@Test
|
||||
public void doubleStrike() {
|
||||
String conviction = "True Conviction";
|
||||
|
||||
// Cards necessary for test
|
||||
addCard(Zone.BATTLEFIELD, playerA, hidetsugu);
|
||||
addCard(Zone.BATTLEFIELD, playerA, conviction);
|
||||
|
||||
// Flip hidetsugu
|
||||
addCounters(1, PhaseStep.PRECOMBAT_MAIN, playerA, hidetsugu, CounterType.LORE, 3);
|
||||
waitStackResolved(1, PhaseStep.PRECOMBAT_MAIN, 1);
|
||||
checkPermanentCount("post flip", 1, PhaseStep.PRECOMBAT_MAIN, playerA, vessel, 1);
|
||||
|
||||
// Make vessel a 5/5
|
||||
addCounters(1, PhaseStep.PRECOMBAT_MAIN, playerA, vessel, CounterType.P1P1, 2);
|
||||
checkPT("precombat", 1, PhaseStep.PRECOMBAT_MAIN, playerA, vessel, 5, 5);
|
||||
|
||||
// Wait until turn 3 because no haste
|
||||
attack(3, playerA, vessel, playerB);
|
||||
|
||||
// -5 -6 because it gets a +1/+1 on the first strike damage
|
||||
checkLife("post damage", 3, PhaseStep.COMBAT_DAMAGE, playerB, 20 - 5 - 6);
|
||||
checkStackObject("post damage", 3, PhaseStep.COMBAT_DAMAGE, playerA,
|
||||
"Whenever {this} deals damage to a player", 1);
|
||||
|
||||
setStopAt(3, PhaseStep.COMBAT_DAMAGE);
|
||||
execute();
|
||||
|
||||
// Player B should have lost the game because they took 11 damage from vessel this turn
|
||||
assertLostTheGame(playerB);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue