mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
[BOT] Implement Starscream, Power Hungry // Starscream, Seeker Leader (#10674)
This commit is contained in:
parent
4856c65443
commit
792be8a859
6 changed files with 202 additions and 34 deletions
|
|
@ -0,0 +1,37 @@
|
|||
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 LevelX2
|
||||
*/
|
||||
public class BecomesMonarchSourceControllerTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public BecomesMonarchSourceControllerTriggeredAbility(Effect effect) {
|
||||
super(Zone.BATTLEFIELD, effect, false);
|
||||
setTriggerPhrase("Whenever you become the monarch, ");
|
||||
}
|
||||
|
||||
private BecomesMonarchSourceControllerTriggeredAbility(final BecomesMonarchSourceControllerTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.BECOMES_MONARCH;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
return isControlledBy(event.getPlayerId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public BecomesMonarchSourceControllerTriggeredAbility copy() {
|
||||
return new BecomesMonarchSourceControllerTriggeredAbility(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
|
||||
package mage.abilities.condition.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public enum MonarchIsNotSetCondition implements Condition {
|
||||
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return game.getMonarchId() == null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "if there is no monarch";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue