mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 12:52:06 -08:00
[DSK] Implement Scrabbling Skullcrab
This commit is contained in:
parent
3368d66850
commit
ed764b5066
4 changed files with 95 additions and 0 deletions
|
|
@ -0,0 +1,51 @@
|
|||
package mage.abilities.abilityword;
|
||||
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.constants.AbilityWord;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
* TODO: This only triggers off of enchantments entering as the room mechanic hasn't been implemented yet
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
|
||||
public class EerieAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public EerieAbility(Effect effect) {
|
||||
this(effect, false);
|
||||
}
|
||||
|
||||
public EerieAbility(Effect effect, boolean optional) {
|
||||
super(Zone.BATTLEFIELD, effect, optional);
|
||||
setAbilityWord(AbilityWord.EERIE);
|
||||
setTriggerPhrase("Whenever an enchantment you control enters and whenever you fully unlock a Room, ");
|
||||
}
|
||||
|
||||
protected EerieAbility(final EerieAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EerieAbility copy() {
|
||||
return new EerieAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (!isControlledBy(event.getPlayerId())) {
|
||||
return false;
|
||||
}
|
||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||
return permanent != null && permanent.isEnchantment(game);
|
||||
}
|
||||
}
|
||||
|
|
@ -25,6 +25,7 @@ public enum AbilityWord {
|
|||
DESCEND_4("Descend 4"),
|
||||
DESCEND_8("Descend 8"),
|
||||
DOMAIN("Domain"),
|
||||
EERIE("Eerie"),
|
||||
EMINENCE("Eminence"),
|
||||
ENRAGE("Enrage"),
|
||||
FATEFUL_HOUR("Fateful hour"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue