mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 06:22:01 -08:00
[CLB] Implemented Dungeon Delver
This commit is contained in:
parent
456570ef04
commit
818cde87de
2 changed files with 79 additions and 0 deletions
78
Mage.Sets/src/mage/cards/d/DungeonDelver.java
Normal file
78
Mage.Sets/src/mage/cards/d/DungeonDelver.java
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.NumberOfTriggersEvent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class DungeonDelver extends CardImpl {
|
||||
|
||||
public DungeonDelver(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.BACKGROUND);
|
||||
|
||||
// Commander creatures you own have "Room abilities of dungeons you own trigger an additional time."
|
||||
this.addAbility(new SimpleStaticAbility(new GainAbilityAllEffect(
|
||||
new SimpleStaticAbility(new DungeonDelverEffect()),
|
||||
Duration.WhileOnBattlefield, StaticFilters.FILTER_CREATURES_OWNED_COMMANDER
|
||||
)));
|
||||
}
|
||||
|
||||
private DungeonDelver(final DungeonDelver card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DungeonDelver copy() {
|
||||
return new DungeonDelver(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DungeonDelverEffect extends ReplacementEffectImpl {
|
||||
|
||||
DungeonDelverEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
staticText = "room abilities of dungeons you own trigger an additional time";
|
||||
}
|
||||
|
||||
private DungeonDelverEffect(final DungeonDelverEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DungeonDelverEffect copy() {
|
||||
return new DungeonDelverEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.NUMBER_OF_TRIGGERS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
GameEvent gameEvent = ((NumberOfTriggersEvent) event).getSourceEvent();
|
||||
return gameEvent.getType() == GameEvent.EventType.ROOM_ENTERED
|
||||
&& source.isControlledBy(gameEvent.getPlayerId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
event.setAmount(event.getAmount() + 1);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -35,6 +35,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Command Tower", 351, Rarity.COMMON, mage.cards.c.CommandTower.class));
|
||||
cards.add(new SetCardInfo("Cultist of the Absolute", 123, Rarity.RARE, mage.cards.c.CultistOfTheAbsolute.class));
|
||||
cards.add(new SetCardInfo("Dread Linnorm", 225, Rarity.COMMON, mage.cards.d.DreadLinnorm.class));
|
||||
cards.add(new SetCardInfo("Dungeon Delver", 67, Rarity.UNCOMMON, mage.cards.d.DungeonDelver.class));
|
||||
cards.add(new SetCardInfo("Dungeoneer's Pack", 312, Rarity.UNCOMMON, mage.cards.d.DungeoneersPack.class));
|
||||
cards.add(new SetCardInfo("Elder Brain", 125, Rarity.RARE, mage.cards.e.ElderBrain.class));
|
||||
cards.add(new SetCardInfo("Elminster's Simulacrum", 561, Rarity.MYTHIC, mage.cards.e.ElminstersSimulacrum.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue