Implement some cards with dungeon mechanism that needs engine change.

This commit is contained in:
Alumi
2021-07-02 05:03:28 +00:00
committed by Michael Kamensky
parent e2785d4180
commit a12848864b
4 changed files with 31 additions and 0 deletions

View File

@@ -90,6 +90,10 @@ public class VentureEffect extends SpellAbilityEffect {
}
private void ventureIntoDungeon(SpellAbility sa, Player player) {
if (player.getVenturedThisTurn() >= 1 && player.hasKeyword("You can't venture into the dungeon more than once each turn.")) {
return;
}
final Game game = player.getGame();
Card dungeon = getDungeonCard(sa, player);
String room = dungeon.getCurrentRoom();
@@ -111,6 +115,8 @@ public class VentureEffect extends SpellAbilityEffect {
final Map<AbilityKey, Object> runParams = AbilityKey.mapFromCard(dungeon);
runParams.put(AbilityKey.RoomName, nextRoom);
game.getTriggerHandler().runTrigger(TriggerType.RoomEntered, runParams, false);
player.incrementVenturedThisTurn();
}
@Override

View File

@@ -193,6 +193,7 @@ public class Player extends GameEntity implements Comparable<Player> {
private boolean activateLoyaltyAbilityThisTurn = false;
private boolean tappedLandForManaThisTurn = false;
private int attackersDeclaredThisTurn = 0;
private int venturedThisTurn = 0;
private List<Card> completedDungeons = new ArrayList<>();
private final Map<ZoneType, PlayerZone> zones = Maps.newEnumMap(ZoneType.class);
@@ -1947,6 +1948,16 @@ public class Player extends GameEntity implements Comparable<Player> {
attackersDeclaredThisTurn = 0;
}
public final int getVenturedThisTurn() {
return venturedThisTurn;
}
public final void incrementVenturedThisTurn() {
venturedThisTurn++;
}
public final void resetVenturedThisTurn() {
venturedThisTurn = 0;
}
public final List<Card> getCompletedDungeons() {
return completedDungeons;
}
@@ -2490,6 +2501,7 @@ public class Player extends GameEntity implements Comparable<Player> {
resetSacrificedThisTurn();
clearAssignedDamage();
resetAttackersDeclaredThisTurn();
resetVenturedThisTurn();
setRevolt(false);
resetProwl();
setSpellsCastLastTurn(getSpellsCastThisTurn());

View File

@@ -0,0 +1,6 @@
Name:Hama Pashar, Ruin Seeker
ManaCost:1 W U
Types:Legendary Creature Human Wizard
PT:2/3
S:Mode$ Panharmonicon | ValidMode$ RoomEntered | ValidCard$ Dungeon.YouCtrl | Description$ Room abilities of dungeons you own trigger an additional time.
Oracle:Room abilities of dungeons you own trigger an additional time.

View File

@@ -0,0 +1,7 @@
Name:Keen-Eared Sentry
ManaCost:1 W
Types:Creature Human Soldier
PT:2/1
S:Mode$ Continuous | Affected$ You | AddKeyword$ Hexproof | Description$ You have hexproof. (You can't be the target of spells or abilities your opponents control.)
S:Mode$ Continuous | Affected$ Opponent | AddKeyword$ You can't venture into the dungeon more than once each turn. | Description$ Each opponent can't venture into the dungeon more than once each turn.
Oracle:You have hexproof. (You can't be the target of spells or abilities your opponents control.)\nEach opponent can't venture into the dungeon more than once each turn.