mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
[SLD] Implemented Will the Wise
This commit is contained in:
parent
5d63d4214c
commit
cf7f64cbf2
2 changed files with 91 additions and 0 deletions
90
Mage.Sets/src/mage/cards/w/WillTheWise.java
Normal file
90
Mage.Sets/src/mage/cards/w/WillTheWise.java
Normal file
|
@ -0,0 +1,90 @@
|
|||
package mage.cards.w;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldOrLeavesSourceTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.FriendsForeverAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.token.ClueArtifactToken;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class WillTheWise extends CardImpl {
|
||||
|
||||
public WillTheWise(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{B}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// When Will the Wise enters or leaves the battlefield, each opponent may investigate. Each opponent who doesn't loses 1 life. You investigate X times, where X is one plus the number of opponents who investigated this way.
|
||||
this.addAbility(new EntersBattlefieldOrLeavesSourceTriggeredAbility(new WillTheWiseEffect(), false));
|
||||
|
||||
// Friends forever
|
||||
this.addAbility(FriendsForeverAbility.getInstance());
|
||||
}
|
||||
|
||||
private WillTheWise(final WillTheWise card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WillTheWise copy() {
|
||||
return new WillTheWise(this);
|
||||
}
|
||||
}
|
||||
|
||||
class WillTheWiseEffect extends OneShotEffect {
|
||||
|
||||
WillTheWiseEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "each opponent may investigate. Each opponent who doesn't loses 1 life. " +
|
||||
"You investigate X times, where X is one plus the number of opponents who investigated this way";
|
||||
}
|
||||
|
||||
private WillTheWiseEffect(final WillTheWiseEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WillTheWiseEffect copy() {
|
||||
return new WillTheWiseEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int count = 1;
|
||||
Token token = new ClueArtifactToken();
|
||||
for (UUID playerId : game.getOpponents(source.getControllerId())) {
|
||||
Player opponent = game.getPlayer(playerId);
|
||||
if (opponent == null) {
|
||||
continue;
|
||||
}
|
||||
if (opponent.chooseUse(outcome, "Investigate?", source, game)) {
|
||||
count++;
|
||||
token.putOntoBattlefield(1, game, source, playerId);
|
||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.INVESTIGATED, source.getSourceId(), source, playerId));
|
||||
} else {
|
||||
opponent.loseLife(1, game, source, false);
|
||||
}
|
||||
}
|
||||
token.putOntoBattlefield(count, game, source, source.getControllerId());
|
||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.INVESTIGATED, source.getSourceId(), source, source.getControllerId()));
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -292,6 +292,7 @@ public class SecretLairDrop extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Lucas, the Sharpshooter", 344, Rarity.RARE, mage.cards.l.LucasTheSharpshooter.class));
|
||||
cards.add(new SetCardInfo("Max, the Daredevil", 345, Rarity.RARE, mage.cards.m.MaxTheDaredevil.class));
|
||||
cards.add(new SetCardInfo("Mike, the Dungeon Master", 346, Rarity.RARE, mage.cards.m.MikeTheDungeonMaster.class));
|
||||
cards.add(new SetCardInfo("Will the Wise", 347, Rarity.RARE, mage.cards.w.WillTheWise.class));
|
||||
cards.add(new SetCardInfo("Generous Gift", 369, Rarity.RARE, mage.cards.g.GenerousGift.class));
|
||||
cards.add(new SetCardInfo("Chain Lightning", 370, Rarity.RARE, mage.cards.c.ChainLightning.class));
|
||||
cards.add(new SetCardInfo("Kodama's Reach", 371, Rarity.RARE, mage.cards.k.KodamasReach.class));
|
||||
|
|
Loading…
Reference in a new issue