mirror of
https://github.com/magefree/mage.git
synced 2026-01-09 12:22:10 -08:00
[LTR] Implement Galadriel of Lothorien
This commit is contained in:
parent
bdb010cfff
commit
8a742ca1d5
10 changed files with 235 additions and 250 deletions
|
|
@ -0,0 +1,49 @@
|
|||
package mage.abilities.common;
|
||||
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class ScryTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public ScryTriggeredAbility(Effect effect) {
|
||||
this(effect, false);
|
||||
}
|
||||
|
||||
public ScryTriggeredAbility(Effect effect, boolean optional) {
|
||||
this(Zone.BATTLEFIELD, effect, optional);
|
||||
}
|
||||
|
||||
public ScryTriggeredAbility(Zone zone, Effect effect, boolean optional) {
|
||||
super(zone, effect, false);
|
||||
setTriggerPhrase("Whenever you scry, ");
|
||||
}
|
||||
|
||||
private ScryTriggeredAbility(final ScryTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScryTriggeredAbility copy() {
|
||||
return new ScryTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.SCRIED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (isControlledBy(event.getPlayerId())) {
|
||||
this.getEffects().setValue("amount", event.getAmount());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
package mage.abilities.common;
|
||||
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class TheRingTemptsYouChooseAnotherTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public TheRingTemptsYouChooseAnotherTriggeredAbility(Effect effect) {
|
||||
this(effect, false);
|
||||
}
|
||||
|
||||
public TheRingTemptsYouChooseAnotherTriggeredAbility(Effect effect, boolean optional) {
|
||||
super(Zone.BATTLEFIELD, effect, optional);
|
||||
setTriggerPhrase("Whenever the Ring tempts you, if you chose a creature other than {this} as your Ring-bearer, ");
|
||||
}
|
||||
|
||||
private TheRingTemptsYouChooseAnotherTriggeredAbility(final TheRingTemptsYouChooseAnotherTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TheRingTemptsYouChooseAnotherTriggeredAbility copy() {
|
||||
return new TheRingTemptsYouChooseAnotherTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.TEMPTED_BY_RING;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
return this.isControlledBy(event.getPlayerId())
|
||||
&& event.getTargetId() != null
|
||||
&& !event.getTargetId().equals(this.getSourceId());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue