This commit is contained in:
Jeff 2021-09-03 16:34:40 -05:00
commit ea58f2d65f
20 changed files with 726 additions and 38 deletions

View file

@ -1,37 +1,66 @@
package mage.abilities.effects.keyword;
import mage.abilities.Ability;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.Mode;
import mage.abilities.effects.OneShotEffect;
import mage.constants.Outcome;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.token.ClueArtifactToken;
import mage.util.CardUtil;
/**
*
* @author LevelX2
*/
public class InvestigateEffect extends CreateTokenEffect {
public class InvestigateEffect extends OneShotEffect {
private final int amount;
public InvestigateEffect() {
super(new ClueArtifactToken());
this.staticText = "investigate. <i>(Create a colorless Clue artifact token with \"{2}, Sacrifice this artifact: Draw a card.\")</i>";
this(1);
}
public InvestigateEffect(int amount) {
super(Outcome.Benefit);
this.amount = amount;
}
public InvestigateEffect(final InvestigateEffect effect) {
super(effect);
this.amount = effect.amount;
}
@Override
public boolean apply(Game game, Ability source) {
if (super.apply(game, source)) {
new ClueArtifactToken().putOntoBattlefield(amount, game, source, source.getControllerId());
for (int i = 0; i < amount; i++) {
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.INVESTIGATED, source.getSourceId(), source, source.getControllerId()));
return true;
}
return false;
return true;
}
@Override
public InvestigateEffect copy() {
return new InvestigateEffect(this);
}
@Override
public String getText(Mode mode) {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
String message;
switch (amount) {
case 1:
message = ". <i>(C";
break;
case 2:
message = "twice. <i>(To investigate, c";
break;
default:
message = CardUtil.numberToText(amount) + " times. <i>(To investigate, c";
}
return "investigate " + message + "reate a colorless Clue artifact token " +
"with \"{2}, Sacrifice this artifact: Draw a card.\")</i>";
}
}

View file

@ -0,0 +1,43 @@
package mage.abilities.keyword;
import mage.abilities.MageSingleton;
import mage.abilities.StaticAbility;
import mage.constants.Zone;
import java.io.ObjectStreamException;
/**
* @author TheElk801
* TODO: Implement this
*/
public class DayboundAbility extends StaticAbility implements MageSingleton {
private static final DayboundAbility instance;
static {
instance = new DayboundAbility();
// instance.addIcon(DayboundAbilityIcon.instance); (needs to be added)
}
private Object readResolve() throws ObjectStreamException {
return instance;
}
public static DayboundAbility getInstance() {
return instance;
}
private DayboundAbility() {
super(Zone.ALL, null);
}
@Override
public String getRule() {
return "daybound <i>(If a player casts no spells during their own turn, it becomes night next turn.)</i>";
}
@Override
public DayboundAbility copy() {
return instance;
}
}

View file

@ -0,0 +1,43 @@
package mage.abilities.keyword;
import mage.abilities.MageSingleton;
import mage.abilities.StaticAbility;
import mage.constants.Zone;
import java.io.ObjectStreamException;
/**
* @author TheElk801
* TODO: Implement this
*/
public class NightboundAbility extends StaticAbility implements MageSingleton {
private static final NightboundAbility instance;
static {
instance = new NightboundAbility();
// instance.addIcon(NightboundAbilityIcon.instance); (needs to be added)
}
private Object readResolve() throws ObjectStreamException {
return instance;
}
public static NightboundAbility getInstance() {
return instance;
}
private NightboundAbility() {
super(Zone.ALL, null);
}
@Override
public String getRule() {
return "nightbound <i>(If a player casts at least two spells during their own turn, it becomes day next turn.)</i>";
}
@Override
public NightboundAbility copy() {
return instance;
}
}