mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 13:32:06 -08:00
[AFR] added dungeon support in image/card view, images download, Card Viewer, verify tests;
This commit is contained in:
parent
654ee7791c
commit
2b2a2d085a
8 changed files with 107 additions and 25 deletions
|
|
@ -21,9 +21,9 @@ import mage.constants.Outcome;
|
|||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.game.Game;
|
||||
import mage.game.command.dungeons.DungeonOfTheMadMage;
|
||||
import mage.game.command.dungeons.LostMineOfPhandelver;
|
||||
import mage.game.command.dungeons.TombOfAnnihilation;
|
||||
import mage.game.command.dungeons.DungeonOfTheMadMageDungeon;
|
||||
import mage.game.command.dungeons.LostMineOfPhandelverDungeon;
|
||||
import mage.game.command.dungeons.TombOfAnnihilationDungeon;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.ZoneChangeEvent;
|
||||
import mage.players.Player;
|
||||
|
|
@ -56,7 +56,7 @@ public class Dungeon implements CommandObject {
|
|||
private MageObject copyFrom; // copied card INFO (used to call original adjusters)
|
||||
private FrameStyle frameStyle;
|
||||
private final Abilities<Ability> abilites = new AbilitiesImpl<>();
|
||||
private final String expansionSetCodeForImage;
|
||||
private String expansionSetCodeForImage;
|
||||
private final List<DungeonRoom> dungeonRooms = new ArrayList<>();
|
||||
private DungeonRoom currentRoom = null;
|
||||
|
||||
|
|
@ -141,11 +141,11 @@ public class Dungeon implements CommandObject {
|
|||
public static Dungeon createDungeon(String name) {
|
||||
switch (name) {
|
||||
case "Tomb of Annihilation":
|
||||
return new TombOfAnnihilation();
|
||||
return new TombOfAnnihilationDungeon();
|
||||
case "Lost Mine of Phandelver":
|
||||
return new LostMineOfPhandelver();
|
||||
return new LostMineOfPhandelverDungeon();
|
||||
case "Dungeon of the Mad Mage":
|
||||
return new DungeonOfTheMadMage();
|
||||
return new DungeonOfTheMadMageDungeon();
|
||||
default:
|
||||
throw new UnsupportedOperationException("A dungeon should have been chosen");
|
||||
}
|
||||
|
|
@ -322,6 +322,10 @@ public class Dungeon implements CommandObject {
|
|||
return expansionSetCodeForImage;
|
||||
}
|
||||
|
||||
public void setExpansionSetCodeForImage(String expansionSetCodeForImage) {
|
||||
this.expansionSetCodeForImage = expansionSetCodeForImage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getZoneChangeCounter(Game game) {
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -26,9 +26,9 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class DungeonOfTheMadMage extends Dungeon {
|
||||
public class DungeonOfTheMadMageDungeon extends Dungeon {
|
||||
|
||||
public DungeonOfTheMadMage() {
|
||||
public DungeonOfTheMadMageDungeon() {
|
||||
super("Dungeon of the Mad Mage", "AFR");
|
||||
// (1) Yawning Portal — You gain 1 life. (→ 2)
|
||||
DungeonRoom yawningPortal = new DungeonRoom("Yawning Portal", new GainLifeEffect(1));
|
||||
|
|
@ -86,12 +86,12 @@ public class DungeonOfTheMadMage extends Dungeon {
|
|||
this.addRoom(madWizardsLair);
|
||||
}
|
||||
|
||||
private DungeonOfTheMadMage(final DungeonOfTheMadMage dungeon) {
|
||||
private DungeonOfTheMadMageDungeon(final DungeonOfTheMadMageDungeon dungeon) {
|
||||
super(dungeon);
|
||||
}
|
||||
|
||||
public DungeonOfTheMadMage copy() {
|
||||
return new DungeonOfTheMadMage(this);
|
||||
public DungeonOfTheMadMageDungeon copy() {
|
||||
return new DungeonOfTheMadMageDungeon(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -18,9 +18,9 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class LostMineOfPhandelver extends Dungeon {
|
||||
public class LostMineOfPhandelverDungeon extends Dungeon {
|
||||
|
||||
public LostMineOfPhandelver() {
|
||||
public LostMineOfPhandelverDungeon() {
|
||||
super("Lost Mine of Phandelver", "AFR");
|
||||
// (1) Cave Entrance — Scry 1. (→ 2a or 2b)
|
||||
DungeonRoom caveEntrance = new DungeonRoom(
|
||||
|
|
@ -75,12 +75,12 @@ public class LostMineOfPhandelver extends Dungeon {
|
|||
this.addRoom(templeOfDumathoin);
|
||||
}
|
||||
|
||||
private LostMineOfPhandelver(final LostMineOfPhandelver dungeon) {
|
||||
private LostMineOfPhandelverDungeon(final LostMineOfPhandelverDungeon dungeon) {
|
||||
super(dungeon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LostMineOfPhandelver copy() {
|
||||
return new LostMineOfPhandelver(this);
|
||||
public LostMineOfPhandelverDungeon copy() {
|
||||
return new LostMineOfPhandelverDungeon(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -28,7 +28,7 @@ import java.util.*;
|
|||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class TombOfAnnihilation extends Dungeon {
|
||||
public final class TombOfAnnihilationDungeon extends Dungeon {
|
||||
|
||||
static final FilterControlledPermanent filter
|
||||
= new FilterControlledPermanent("an artifact, a creature, or a land");
|
||||
|
|
@ -41,7 +41,7 @@ public final class TombOfAnnihilation extends Dungeon {
|
|||
));
|
||||
}
|
||||
|
||||
public TombOfAnnihilation() {
|
||||
public TombOfAnnihilationDungeon() {
|
||||
super("Tomb of Annihilation", "AFR");
|
||||
// (1) Trapped Entry — Each player loses 1 life. (→ 2a or 2b)
|
||||
DungeonRoom trappedEntry = new DungeonRoom("Trapped Entry", new LoseLifeAllPlayersEffect(1));
|
||||
|
|
@ -71,12 +71,12 @@ public final class TombOfAnnihilation extends Dungeon {
|
|||
this.addRoom(cradleOfTheDeathGod);
|
||||
}
|
||||
|
||||
private TombOfAnnihilation(final TombOfAnnihilation dungeon) {
|
||||
private TombOfAnnihilationDungeon(final TombOfAnnihilationDungeon dungeon) {
|
||||
super(dungeon);
|
||||
}
|
||||
|
||||
public TombOfAnnihilation copy() {
|
||||
return new TombOfAnnihilation(this);
|
||||
public TombOfAnnihilationDungeon copy() {
|
||||
return new TombOfAnnihilationDungeon(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -169,7 +169,7 @@ class OublietteTarget extends TargetControlledPermanent {
|
|||
CardType.CREATURE,
|
||||
CardType.LAND
|
||||
);
|
||||
private static final FilterControlledPermanent filter = TombOfAnnihilation.filter.copy();
|
||||
private static final FilterControlledPermanent filter = TombOfAnnihilationDungeon.filter.copy();
|
||||
|
||||
static {
|
||||
filter.setMessage("an artifact, a creature, and a land");
|
||||
|
|
@ -245,7 +245,7 @@ class SandfallCellEffect extends OneShotEffect {
|
|||
if (player == null) {
|
||||
continue;
|
||||
}
|
||||
TargetPermanent target = new TargetPermanent(0, 1, TombOfAnnihilation.filter, true);
|
||||
TargetPermanent target = new TargetPermanent(0, 1, TombOfAnnihilationDungeon.filter, true);
|
||||
player.choose(Outcome.PreventDamage, target, source.getSourceId(), game);
|
||||
map.put(playerId, game.getPermanent(target.getFirstTarget()));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue