mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
Implement some cards with dungeon mechanism that needs engine change.
This commit is contained in:
@@ -90,6 +90,10 @@ public class VentureEffect extends SpellAbilityEffect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void ventureIntoDungeon(SpellAbility sa, Player player) {
|
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();
|
final Game game = player.getGame();
|
||||||
Card dungeon = getDungeonCard(sa, player);
|
Card dungeon = getDungeonCard(sa, player);
|
||||||
String room = dungeon.getCurrentRoom();
|
String room = dungeon.getCurrentRoom();
|
||||||
@@ -111,6 +115,8 @@ public class VentureEffect extends SpellAbilityEffect {
|
|||||||
final Map<AbilityKey, Object> runParams = AbilityKey.mapFromCard(dungeon);
|
final Map<AbilityKey, Object> runParams = AbilityKey.mapFromCard(dungeon);
|
||||||
runParams.put(AbilityKey.RoomName, nextRoom);
|
runParams.put(AbilityKey.RoomName, nextRoom);
|
||||||
game.getTriggerHandler().runTrigger(TriggerType.RoomEntered, runParams, false);
|
game.getTriggerHandler().runTrigger(TriggerType.RoomEntered, runParams, false);
|
||||||
|
|
||||||
|
player.incrementVenturedThisTurn();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -193,6 +193,7 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
private boolean activateLoyaltyAbilityThisTurn = false;
|
private boolean activateLoyaltyAbilityThisTurn = false;
|
||||||
private boolean tappedLandForManaThisTurn = false;
|
private boolean tappedLandForManaThisTurn = false;
|
||||||
private int attackersDeclaredThisTurn = 0;
|
private int attackersDeclaredThisTurn = 0;
|
||||||
|
private int venturedThisTurn = 0;
|
||||||
private List<Card> completedDungeons = new ArrayList<>();
|
private List<Card> completedDungeons = new ArrayList<>();
|
||||||
|
|
||||||
private final Map<ZoneType, PlayerZone> zones = Maps.newEnumMap(ZoneType.class);
|
private final Map<ZoneType, PlayerZone> zones = Maps.newEnumMap(ZoneType.class);
|
||||||
@@ -1947,6 +1948,16 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
attackersDeclaredThisTurn = 0;
|
attackersDeclaredThisTurn = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final int getVenturedThisTurn() {
|
||||||
|
return venturedThisTurn;
|
||||||
|
}
|
||||||
|
public final void incrementVenturedThisTurn() {
|
||||||
|
venturedThisTurn++;
|
||||||
|
}
|
||||||
|
public final void resetVenturedThisTurn() {
|
||||||
|
venturedThisTurn = 0;
|
||||||
|
}
|
||||||
|
|
||||||
public final List<Card> getCompletedDungeons() {
|
public final List<Card> getCompletedDungeons() {
|
||||||
return completedDungeons;
|
return completedDungeons;
|
||||||
}
|
}
|
||||||
@@ -2490,6 +2501,7 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
resetSacrificedThisTurn();
|
resetSacrificedThisTurn();
|
||||||
clearAssignedDamage();
|
clearAssignedDamage();
|
||||||
resetAttackersDeclaredThisTurn();
|
resetAttackersDeclaredThisTurn();
|
||||||
|
resetVenturedThisTurn();
|
||||||
setRevolt(false);
|
setRevolt(false);
|
||||||
resetProwl();
|
resetProwl();
|
||||||
setSpellsCastLastTurn(getSpellsCastThisTurn());
|
setSpellsCastLastTurn(getSpellsCastThisTurn());
|
||||||
|
|||||||
@@ -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.
|
||||||
7
forge-gui/res/cardsfolder/upcoming/keen_eared_sentry.txt
Normal file
7
forge-gui/res/cardsfolder/upcoming/keen_eared_sentry.txt
Normal 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.
|
||||||
Reference in New Issue
Block a user