mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
- little fix Deadbridge Chant. Now works well with Humility, etc.
This commit is contained in:
parent
b800585cc5
commit
6e49f4a21c
1 changed files with 7 additions and 10 deletions
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.d;
|
package mage.cards.d;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -21,13 +20,10 @@ import mage.players.Player;
|
||||||
*
|
*
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
public final class DeadbridgeChant extends CardImpl {
|
public final class DeadbridgeChant extends CardImpl {
|
||||||
|
|
||||||
public DeadbridgeChant(UUID ownerId, CardSetInfo setInfo) {
|
public DeadbridgeChant(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{B}{G}");
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{B}{G}");
|
||||||
|
|
||||||
|
|
||||||
// When Deadbridge Chant enters the battlefield, put the top ten cards of your library into your graveyard.
|
// When Deadbridge Chant enters the battlefield, put the top ten cards of your library into your graveyard.
|
||||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new PutTopCardOfLibraryIntoGraveControllerEffect(10)));
|
this.addAbility(new EntersBattlefieldTriggeredAbility(new PutTopCardOfLibraryIntoGraveControllerEffect(10)));
|
||||||
|
@ -64,9 +60,10 @@ class DeadbridgeChantEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player player = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (player != null && !player.getGraveyard().isEmpty()) {
|
if (controller != null
|
||||||
Card card = player.getGraveyard().getRandom(game);
|
&& !controller.getGraveyard().isEmpty()) {
|
||||||
|
Card card = controller.getGraveyard().getRandom(game);
|
||||||
if (card != null) {
|
if (card != null) {
|
||||||
Zone targetZone = Zone.HAND;
|
Zone targetZone = Zone.HAND;
|
||||||
String text = " put into hand of ";
|
String text = " put into hand of ";
|
||||||
|
@ -74,8 +71,8 @@ class DeadbridgeChantEffect extends OneShotEffect {
|
||||||
targetZone = Zone.BATTLEFIELD;
|
targetZone = Zone.BATTLEFIELD;
|
||||||
text = " put onto battlefield for ";
|
text = " put onto battlefield for ";
|
||||||
}
|
}
|
||||||
card.moveToZone(targetZone, source.getSourceId(), game, false);
|
controller.moveCards(card, targetZone, source, game);
|
||||||
game.informPlayers("Deadbridge Chant: " + card.getName() + text + player.getLogName());
|
game.informPlayers("Deadbridge Chant: " + card.getName() + text + controller.getLogName());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue