Skip to content

Commit 79e1d0a

Browse files
Jetz72Hanmac
authored andcommitted
Count destroyed attractions for "number of attractions you've visited this turn"
1 parent c447dfc commit 79e1d0a

File tree

6 files changed

+15
-4
lines changed

6 files changed

+15
-4
lines changed

forge-game/src/main/java/forge/game/ability/AbilityUtils.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3704,6 +3704,10 @@ public static int playerXProperty(final Player player, final String s, final Car
37043704
return doXMath(amount, m, source, ctb);
37053705
}
37063706

3707+
if (value.equals("AttractionsVisitedThisTurn")) {
3708+
return doXMath(player.getAttractionsVisitedThisTurn(), m, source, ctb);
3709+
}
3710+
37073711
if (value.startsWith("PlaneswalkedToThisTurn")) {
37083712
int found = 0;
37093713
String name = value.split(" ")[1];

forge-game/src/main/java/forge/game/player/Player.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ public class Player extends GameEntity implements Comparable<Player> {
112112
private int expentThisTurn;
113113
private int numLibrarySearchedOwn; //The number of times this player has searched his library
114114
private int venturedThisTurn;
115+
private int attractionsVisitedThisTurn;
115116
private int descended;
116117
private int numRingTemptedYou;
117118
private int devotionMod;
@@ -2589,6 +2590,7 @@ public void onCleanupPhase() {
25892590
setCommitedCrimeThisTurn(0);
25902591
diceRollsThisTurn = Lists.newArrayList();
25912592
setExpentThisTurn(0);
2593+
attractionsVisitedThisTurn = 0;
25922594

25932595
damageReceivedThisTurn.clear();
25942596
planeswalkedToThisTurn.clear();
@@ -4008,12 +4010,17 @@ public void setExpentThisTurn(int v) {
40084010
public void visitAttractions(int light) {
40094011
CardCollection attractions = CardLists.filter(getCardsIn(ZoneType.Battlefield), CardPredicates.isAttractionWithLight(light));
40104012
for (Card c : attractions) {
4013+
if(!c.wasVisitedThisTurn())
4014+
this.attractionsVisitedThisTurn++;
40114015
c.visitAttraction(this);
40124016
}
40134017
}
40144018
public void rollToVisitAttractions() {
40154019
this.visitAttractions(RollDiceEffect.rollDiceForPlayerToVisitAttractions(this));
40164020
}
4021+
public int getAttractionsVisitedThisTurn() {
4022+
return this.attractionsVisitedThisTurn;
4023+
}
40174024

40184025
public int getCrankCounter() {
40194026
return this.crankCounter;

forge-gui/res/cardsfolder/b/black_hole.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ Name:Black Hole
22
ManaCost:3 B
33
Types:Sorcery
44
A:SP$ Destroy | ValidTgts$ Creature | TgtPrompt$ Select target creature and up to X other target creatures, where X is the number of Attractions you're visited this turn | TargetMin$ 1 | TargetMax$ X | SpellDescription$ Destroy target creature and up to X other target creatures, where X is the number of Attractions you've visited this turn.
5-
SVar:X:Count$Valid Attraction.VisitedThisTurn/Plus.1
5+
SVar:X:PlayerCountPropertyYou$AttractionsVisitedThisTurn/Plus.1
66
Oracle:Destroy target creature and up to X other target creatures, where X is the number of Attractions you've visited this turn.

forge-gui/res/cardsfolder/s/soul_swindler.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ PT:5/3
55
S:Mode$ Continuous | Affected$ Card.Self | AddKeyword$ Indestructible | CheckSVar$ X | Description$ As long as you've visited an Attraction this turn, CARDNAME has indestructible. (Damage and effects that say "destroy" don't destroy it.)
66
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigOpenAttraction | TriggerDescription$ When CARDNAME enters the battlefield, open an Attraction.
77
SVar:TrigOpenAttraction:DB$ OpenAttraction
8-
SVar:X:Count$Valid Attraction.VisitedThisTurn
8+
SVar:X:PlayerCountPropertyYou$AttractionsVisitedThisTurn
99
Oracle:As long as you've visited an Attraction this turn, Soul Swindler has indestructible. (Damage and effects that say "destroy" don't destroy it.)\nWhen Soul Swindler enters the battlefield, open an Attraction. (Put the top card of your Attraction deck onto the battlefield.)

forge-gui/res/cardsfolder/s/squirrel_squatters.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefi
66
SVar:TrigOpenAttraction:DB$ OpenAttraction
77
T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigToken | TriggerDescription$ Whenever CARDNAME attacks, create a 1/1 green Squirrel creature token that's tapped and attacking for each Attraction you've visited this turn.
88
SVar:TrigToken:DB$ Token | TokenAmount$ X | TokenScript$ g_1_1_squirrel | TokenOwner$ You | TokenTapped$ True | TokenAttacking$ True
9-
SVar:X:Count$Valid Attraction.VisitedThisTurn
9+
SVar:X:PlayerCountPropertyYou$AttractionsVisitedThisTurn
1010
SVar:HasAttackEffect:TRUE
1111
Oracle:When Squirrel Squatters enters, open an Attraction. (Put the top card of your Attraction deck onto the battlefield.)\nWhenever Squirrel Squatters attacks, create a 1/1 green Squirrel creature token that's tapped and attacking for each Attraction you've visited this turn.

forge-gui/res/cardsfolder/s/storybook_ride.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ SVar:EffSModeContinuous:Mode$ Continuous | Affected$ Card.IsRemembered | MayPlay
88
SVar:DBDelayTrig:DB$ DelayedTrigger | Mode$ Phase | RememberObjects$ Remembered | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionZone$ Exile | Phase$ End Of Turn | Execute$ TrigChangeAll | SubAbility$ DBCleanup | TriggerDescription$ At the beginning of the next end step, if any of those cards remain exiled, put them on the bottom of your library in any order.
99
SVar:TrigChangeAll:DB$ ChangeZone | Defined$ DelayTriggerRememberedLKI | Origin$ Exile | Destination$ Library | LibraryPosition$ 0
1010
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
11-
SVar:X:Count$Valid Attraction.VisitedThisTurn
11+
SVar:X:PlayerCountPropertyYou$AttractionsVisitedThisTurn
1212
Oracle:Visit — Exile the top X cards of your library, where X is the number of Attractions you've visited this turn (including this one). You may play those cards this turn. At the beginning of the next end step, if any of those cards remain exiled, put them on the bottom of your library in any order.
1313

1414
# --- VARIANTS ---

0 commit comments

Comments
 (0)