mirror of
https://github.com/correl/mage.git
synced 2024-11-25 11:09:53 +00:00
* Ludevic, Necro-Alchemist - fixed that it triggers on controller turn too, added condition hint;
This commit is contained in:
parent
2413f956ee
commit
690f5f688d
1 changed files with 10 additions and 5 deletions
|
@ -1,11 +1,11 @@
|
||||||
package mage.cards.l;
|
package mage.cards.l;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.hint.ConditionHint;
|
||||||
import mage.abilities.keyword.PartnerAbility;
|
import mage.abilities.keyword.PartnerAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
@ -14,8 +14,9 @@ import mage.game.Game;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
import mage.watchers.common.PlayerLostLifeWatcher;
|
import mage.watchers.common.PlayerLostLifeWatcher;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author spjspj
|
* @author spjspj
|
||||||
*/
|
*/
|
||||||
public final class LudevicNecroAlchemist extends CardImpl {
|
public final class LudevicNecroAlchemist extends CardImpl {
|
||||||
|
@ -34,8 +35,9 @@ public final class LudevicNecroAlchemist extends CardImpl {
|
||||||
Zone.BATTLEFIELD,
|
Zone.BATTLEFIELD,
|
||||||
new LudevicNecroAlchemistEffect(),
|
new LudevicNecroAlchemistEffect(),
|
||||||
TargetController.EACH_PLAYER,
|
TargetController.EACH_PLAYER,
|
||||||
new LudevicNecroAlchemistCondition(),
|
LudevicNecroAlchemistCondition.instance,
|
||||||
false));
|
false)
|
||||||
|
.addHint(new ConditionHint(LudevicNecroAlchemistCondition.instance, "Player other than you lost life this turn")));
|
||||||
|
|
||||||
// Partner
|
// Partner
|
||||||
this.addAbility(PartnerAbility.getInstance());
|
this.addAbility(PartnerAbility.getInstance());
|
||||||
|
@ -51,13 +53,16 @@ public final class LudevicNecroAlchemist extends CardImpl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class LudevicNecroAlchemistCondition implements Condition {
|
enum LudevicNecroAlchemistCondition implements Condition {
|
||||||
|
|
||||||
|
instance;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
PlayerLostLifeWatcher watcher = game.getState().getWatcher(PlayerLostLifeWatcher.class);
|
PlayerLostLifeWatcher watcher = game.getState().getWatcher(PlayerLostLifeWatcher.class);
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (controller != null
|
if (controller != null
|
||||||
|
&& !controller.getId().equals(game.getActivePlayerId())
|
||||||
&& watcher != null
|
&& watcher != null
|
||||||
&& watcher.getLifeLost(controller.getId()) == 0) {
|
&& watcher.getLifeLost(controller.getId()) == 0) {
|
||||||
for (UUID playerId : controller.getInRange()) {
|
for (UUID playerId : controller.getInRange()) {
|
||||||
|
|
Loading…
Reference in a new issue