forked from External/mage
* added dungeon and dungeon room class * [AFR] Implemented Tomb of Annihilation * [AFR] Implemented Shortcut Seeker * [AFR] Implemented Gloom Stalker * [AFR] Implemented Nadaar, Selfless Paladin * added room triggers * added more venturing code, currently untested * fixed error * moved venture into dungeon from player class to game class * removed unnecessary sourceobject from dungeon * fixed npe error * added dungeon completion * fixed concurrent modification exception * added logging * added proper copy methods * added views * updated room text generation * added some missing code * finished implementing CompletedDungeonCondition * [AFR] Implemented Ellywick Tumblestrum * [AFR] Implemented Lost Mine of Phandelver * added choice dialog for dungeons * [AFR] Implemented Dungeon of the Mad Mage * small text fix * added initial dungeon test * [AFR] Implemented Cloister Gargoyle * [AFR] Implemented Dungeon Crawler * small text change for dungeon rooms * added more tests * some simplification to dungeon props * updated testing helper functions * added currently failing test for venturing on separate steps and turns * added tests for dungeon completion * fixed missing trigger visual and dungeons not persisting through turns * some text updates * added rollback test * added a test for multiple dungeons at once * added one more condition test
86 lines
3.3 KiB
Java
86 lines
3.3 KiB
Java
package mage.game.command.dungeons;
|
|
|
|
import mage.abilities.effects.common.CreateTokenEffect;
|
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
|
import mage.abilities.effects.common.GainLifeEffect;
|
|
import mage.abilities.effects.common.LoseLifeOpponentsEffect;
|
|
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
|
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
|
import mage.abilities.effects.keyword.ScryEffect;
|
|
import mage.constants.Duration;
|
|
import mage.counters.CounterType;
|
|
import mage.game.command.Dungeon;
|
|
import mage.game.command.DungeonRoom;
|
|
import mage.game.permanent.token.GoblinToken;
|
|
import mage.game.permanent.token.TreasureToken;
|
|
import mage.target.common.TargetCreaturePermanent;
|
|
|
|
/**
|
|
* @author TheElk801
|
|
*/
|
|
public class LostMineOfPhandelver extends Dungeon {
|
|
|
|
public LostMineOfPhandelver() {
|
|
super("Lost Mine of Phandelver", "AFR");
|
|
// (1) Cave Entrance — Scry 1. (→ 2a or 2b)
|
|
DungeonRoom caveEntrance = new DungeonRoom(
|
|
"Cave Entrance", new ScryEffect(1, false)
|
|
);
|
|
|
|
// (2a) Goblin Lair — Create a 1/1 red Goblin creature token. (→ 3a or 3b)
|
|
DungeonRoom goblinLair = new DungeonRoom("Goblin Lair", new CreateTokenEffect(new GoblinToken()));
|
|
|
|
// (2b) Mine Tunnels — Create a Treasure token. (→ 3b or 3c)
|
|
DungeonRoom mineTunnels = new DungeonRoom("Mine Tunnels", new CreateTokenEffect(new TreasureToken()));
|
|
|
|
// (3a) Storeroom — Put a +1/+1 counter on target creature. (→ 4)
|
|
DungeonRoom storeroom = new DungeonRoom(
|
|
"Storeroom", new AddCountersTargetEffect(CounterType.P1P1.createInstance())
|
|
);
|
|
storeroom.addTarget(new TargetCreaturePermanent());
|
|
|
|
// (3b) Dark Pool — Each opponent loses 1 life and you gain 1 life. (→ 4)
|
|
DungeonRoom darkPool = new DungeonRoom(
|
|
"Dark Pool", new LoseLifeOpponentsEffect(1),
|
|
new GainLifeEffect(1).concatBy("and")
|
|
);
|
|
|
|
// (3c) Fungi Cavern — Target creature gets -4/-0 until your next turn. (→ 4)
|
|
DungeonRoom fungiCavern = new DungeonRoom(
|
|
"Fungi Cavern", new BoostTargetEffect(-4, 0, Duration.UntilYourNextTurn)
|
|
);
|
|
fungiCavern.addTarget(new TargetCreaturePermanent());
|
|
|
|
// (4) Temple of Dumathoin — Draw a card.
|
|
DungeonRoom templeOfDumathoin = new DungeonRoom(
|
|
"Temple of Dumathoin", new DrawCardSourceControllerEffect(1)
|
|
);
|
|
|
|
caveEntrance.addNextRoom(goblinLair);
|
|
caveEntrance.addNextRoom(mineTunnels);
|
|
goblinLair.addNextRoom(storeroom);
|
|
goblinLair.addNextRoom(darkPool);
|
|
mineTunnels.addNextRoom(darkPool);
|
|
mineTunnels.addNextRoom(fungiCavern);
|
|
storeroom.addNextRoom(templeOfDumathoin);
|
|
darkPool.addNextRoom(templeOfDumathoin);
|
|
fungiCavern.addNextRoom(templeOfDumathoin);
|
|
|
|
this.addRoom(caveEntrance);
|
|
this.addRoom(goblinLair);
|
|
this.addRoom(mineTunnels);
|
|
this.addRoom(storeroom);
|
|
this.addRoom(darkPool);
|
|
this.addRoom(fungiCavern);
|
|
this.addRoom(templeOfDumathoin);
|
|
}
|
|
|
|
private LostMineOfPhandelver(final LostMineOfPhandelver dungeon) {
|
|
super(dungeon);
|
|
}
|
|
|
|
@Override
|
|
public LostMineOfPhandelver copy() {
|
|
return new LostMineOfPhandelver(this);
|
|
}
|
|
}
|