forked from External/mage
[DSK] Implement Kaito, Bane of Nightmares (#13187)
This commit is contained in:
parent
48117b9620
commit
fd4b82696b
6 changed files with 184 additions and 0 deletions
|
|
@ -0,0 +1,31 @@
|
|||
package mage.game.command.emblems;
|
||||
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.command.Emblem;
|
||||
|
||||
/**
|
||||
* @author jackd149
|
||||
*/
|
||||
public final class KaitoBaneOfNightmaresEmblem extends Emblem {
|
||||
|
||||
public KaitoBaneOfNightmaresEmblem() {
|
||||
super("Emblem Kaito");
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.NINJA, "Ninjas you control");
|
||||
this.getAbilities().add(new SimpleStaticAbility(Zone.COMMAND, new BoostControlledEffect(1, 1, Duration.EndOfGame, filter, false)));
|
||||
}
|
||||
|
||||
private KaitoBaneOfNightmaresEmblem(final KaitoBaneOfNightmaresEmblem card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KaitoBaneOfNightmaresEmblem copy() {
|
||||
return new KaitoBaneOfNightmaresEmblem(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -59,6 +59,19 @@ public class PlayerLostLifeWatcher extends Watcher {
|
|||
return amount;
|
||||
}
|
||||
|
||||
public int getNumberOfOpponentsWhoLostLife(UUID playerId, Game game) {
|
||||
int numPlayersLostLife = 0;
|
||||
for (UUID opponentId : this.amountOfLifeLostThisTurn.keySet()) {
|
||||
Player opponent = game.getPlayer(opponentId);
|
||||
if (opponent != null && opponent.hasOpponent(playerId, game)) {
|
||||
if (this.amountOfLifeLostThisTurn.getOrDefault(opponentId, 0) > 0) {
|
||||
numPlayersLostLife++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return numPlayersLostLife;
|
||||
}
|
||||
|
||||
public int getLifeLostLastTurn(UUID playerId) {
|
||||
return amountOfLifeLostLastTurn.getOrDefault(playerId, 0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue