mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
[CLB] Implemented Archivist of Oghma
This commit is contained in:
parent
defa1af186
commit
a601df86a0
2 changed files with 80 additions and 0 deletions
79
Mage.Sets/src/mage/cards/a/ArchivistOfOghma.java
Normal file
79
Mage.Sets/src/mage/cards/a/ArchivistOfOghma.java
Normal file
|
@ -0,0 +1,79 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.keyword.FlashAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ArchivistOfOghma extends CardImpl {
|
||||
|
||||
public ArchivistOfOghma(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
|
||||
|
||||
this.subtype.add(SubType.HALFLING);
|
||||
this.subtype.add(SubType.CLERIC);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Flash
|
||||
this.addAbility(FlashAbility.getInstance());
|
||||
|
||||
// Whenever an opponent searches their library, you gain 1 life and draw a card.
|
||||
this.addAbility(new ArchivistOfOghmaTriggeredAbility());
|
||||
}
|
||||
|
||||
private ArchivistOfOghma(final ArchivistOfOghma card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArchivistOfOghma copy() {
|
||||
return new ArchivistOfOghma(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ArchivistOfOghmaTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public ArchivistOfOghmaTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new GainLifeEffect(1), false);
|
||||
this.addEffect(new DrawCardSourceControllerEffect(1));
|
||||
}
|
||||
|
||||
public ArchivistOfOghmaTriggeredAbility(final ArchivistOfOghmaTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArchivistOfOghmaTriggeredAbility copy() {
|
||||
return new ArchivistOfOghmaTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.LIBRARY_SEARCHED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
return event.getTargetId().equals(event.getPlayerId())
|
||||
&& game.getOpponents(getControllerId()).contains(event.getTargetId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever an opponent searches their library, you gain 1 life and draw a card.";
|
||||
}
|
||||
}
|
|
@ -29,6 +29,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Ancient Brass Dragon", 111, Rarity.MYTHIC, mage.cards.a.AncientBrassDragon.class));
|
||||
cards.add(new SetCardInfo("Arcane Encyclopedia", 297, Rarity.UNCOMMON, mage.cards.a.ArcaneEncyclopedia.class));
|
||||
cards.add(new SetCardInfo("Arcane Signet", 298, Rarity.UNCOMMON, mage.cards.a.ArcaneSignet.class));
|
||||
cards.add(new SetCardInfo("Archivist of Oghma", 4, Rarity.RARE, mage.cards.a.ArchivistOfOghma.class));
|
||||
cards.add(new SetCardInfo("Ascend from Avernus", 5, Rarity.RARE, mage.cards.a.AscendFromAvernus.class));
|
||||
cards.add(new SetCardInfo("Astarion, the Decadent", 265, Rarity.RARE, mage.cards.a.AstarionTheDecadent.class));
|
||||
cards.add(new SetCardInfo("Astral Confrontation", 6, Rarity.COMMON, mage.cards.a.AstralConfrontation.class));
|
||||
|
|
Loading…
Reference in a new issue