mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Implemented: Builder's Bane from Mirage
This commit is contained in:
parent
8576dbea00
commit
de61e10a90
1 changed files with 121 additions and 118 deletions
|
@ -52,6 +52,7 @@ public class BuildersBane extends CardImpl {
|
|||
public BuildersBane(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{X}{R}");
|
||||
|
||||
// Destroy X target artifacts. Builder's Bane deals damage to each player equal to the number of artifacts he or she controlled put into a graveyard this way.
|
||||
this.getSpellAbility().addTarget(new TargetArtifactPermanent());
|
||||
this.getSpellAbility().addEffect(new BuildersBaneEffect());
|
||||
}
|
||||
|
@ -79,7 +80,7 @@ class BuildersBaneEffect extends OneShotEffect {
|
|||
|
||||
public BuildersBaneEffect() {
|
||||
super(Outcome.DestroyPermanent);
|
||||
this.staticText = "Destroy X target artifacts. Builder's Bane deals damage to each player equal to the number of artifacts he or she controlled put into a graveyard this way.";
|
||||
this.staticText = "Destroy X target artifacts. {this} deals damage to each player equal to the number of artifacts he or she controlled put into a graveyard this way";
|
||||
}
|
||||
|
||||
public BuildersBaneEffect(final BuildersBaneEffect effect) {
|
||||
|
@ -109,9 +110,11 @@ class BuildersBaneEffect extends OneShotEffect {
|
|||
|
||||
// Builder's Bane deals damage to each player equal to the number of artifacts he or she controlled put into a graveyard this way.
|
||||
for (Map.Entry<UUID, Integer> entry : destroyedArtifactPerPlayer.entrySet()) {
|
||||
Player player = game.getState().getPlayer(entry.getKey());
|
||||
Player player = game.getPlayer(entry.getKey());
|
||||
if(player != null) {
|
||||
player.damage(entry.getValue(), source.getSourceId(), game, false, true);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue