LCI – Player.descended support and cards

This commit is contained in:
Northmoc
2023-10-27 21:37:17 -04:00
parent 6353df6f8c
commit 20e5645cd6
10 changed files with 75 additions and 0 deletions

View File

@@ -98,6 +98,7 @@ public class GameCopier {
newPlayer.setCounters(Maps.newHashMap(origPlayer.getCounters()));
newPlayer.setBlessing(origPlayer.hasBlessing());
newPlayer.setRevolt(origPlayer.hasRevolt());
newPlayer.setDescended(origPlayer.getDescended());
newPlayer.setLibrarySearched(origPlayer.getLibrarySearched());
newPlayer.setSpellsCastLastTurn(origPlayer.getSpellsCastLastTurn());
for (int j = 0; j < origPlayer.getSpellsCastThisTurn(); j++) {

View File

@@ -2254,6 +2254,10 @@ public class AbilityUtils {
return doXMath(player.getSurveilThisTurn(), expr, c, ctb);
}
if (sq[0].equals("YouDescendedThisTurn")) {
return doXMath(player.getDescended(), expr, c, ctb);
}
if (sq[0].equals("YouCastThisGame")) {
return doXMath(player.getSpellsCastThisGame(), expr, c, ctb);
}

View File

@@ -182,6 +182,7 @@ public class Player extends GameEntity implements Comparable<Player> {
private final Map<String, Integer> notedNum = Maps.newHashMap();
private boolean revolt = false;
private int descended = 0;
private List<Card> sacrificedThisTurn = new ArrayList<>();
@@ -2132,6 +2133,16 @@ public class Player extends GameEntity implements Comparable<Player> {
revolt = val;
}
public final int getDescended() {
return descended;
}
public final void descend() {
descended++;
}
public final void setDescended(final int n) {
descended = n;
}
public final boolean hasDelirium() {
return CardFactoryUtil.getCardTypesFromList(getCardsIn(ZoneType.Graveyard)) >= 4;
}
@@ -2526,6 +2537,7 @@ public class Player extends GameEntity implements Comparable<Player> {
resetSacrificedThisTurn();
resetVenturedThisTurn();
setRevolt(false);
setDescended(0);
setSpellsCastLastTurn(getSpellsCastThisTurn());
resetSpellsCastThisTurn();
setLifeLostLastTurn(getLifeLostThisTurn());

View File

@@ -79,6 +79,10 @@ public class PlayerProperty {
if (!player.equals(source.getOwner())) {
return false;
}
} else if (property.equals("descended")) {
if (!(player.getDescended() > 0)) {
return false;
}
} else if (property.equals("isMonarch")) {
if (!player.isMonarch()) {
return false;

View File

@@ -121,6 +121,10 @@ public class Zone implements java.io.Serializable, Iterable<Card> {
c.setTapped(false);
}
if (zoneType == (ZoneType.Graveyard) && c.isPermanent() && !c.isToken()) {
c.getOwner().descend();
}
c.setZone(this);
if ((zoneType == ZoneType.Battlefield || !c.isToken()) || (zoneType == ZoneType.Stack && c.getCopiedPermanent() != null)) {

View File

@@ -0,0 +1,9 @@
Name:Broodrage Mycoid
ManaCost:3 B
Types:Creature Fungus
PT:4/3
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You.descended | TriggerZones$ Battlefield | Execute$ TrigToken | TriggerDescription$ At the beginning of your end step, if you descended this turn, create a 1/1 black Fungus creature token with "This creature can't block." (You descended if a permanent card was put into your graveyard from anywhere.)
SVar:TrigToken:DB$ Token | TokenScript$ b_1_1_fungus_noblock
DeckHas:Ability$Token & Type$Fungus
DeckHints:Ability$Sacrifice
Oracle:At the beginning of your end step, if you descended this turn, create a 1/1 black Fungus creature token with "This creature can't block." (You descended if a permanent card was put into your graveyard from anywhere.)

View File

@@ -0,0 +1,9 @@
Name:Enterprising Scallywag
ManaCost:1 R
Types:Creature Goblin Pirate
PT:2/2
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You.descended | TriggerZones$ Battlefield | Execute$ TrigTreasure | TriggerDescription$ At the beginning of your end step, if you descended this turn, create a Treasure token. (You descended if a permanent card was put into your graveyard from anywhere.)
SVar:TrigTreasure:DB$ Token | TokenScript$ c_a_treasure_sac
DeckHas:Ability$Token|Sacrifice & Type$Treasure|Artifact
DeckHints:Ability$Sacrifice
Oracle:At the beginning of your end step, if you descended this turn, create a Treasure token. (You descended if a permanent card was put into your graveyard from anywhere.)

View File

@@ -0,0 +1,12 @@
Name:Stalactite Stalker
ManaCost:B
Types:Creature Goblin Rogue
PT:1/1
K:Menace
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You.descended | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ At the beginning of your end step, if you descended this turn, put a +1/+1 counter on CARDNAME.
SVar:TrigPutCounter:DB$ PutCounter | CounterType$ P1P1
A:AB$ Pump | Cost$ 2 B Sac<1/CARDNAME> | ValidTgts$ Creature | IsCurse$ True | NumAtt$ -X | NumDef$ -X | StackDescription$ REP Target creature_{c:Targeted} | SpellDescription$ Target creature gets -X/-X until end of turn, where X is CARDNAME's power.
SVar:X:Sacrificed$CardPower
DeckHas:Ability$Counters|Sacrifice
DeckHints:Ability$Sacrifice
Oracle:Menace\nAt the beginning of your end step, if you descended this turn, put a +1/+1 counter on Stalactite Stalker.\n{2}{B}, Sacrifice Stalactite Stalker: Target creature gets -X/-X until end of turn, where X is Stalactite Stalker's power.

View File

@@ -0,0 +1,13 @@
Name:The Mycotyrant
ManaCost:1 B G
Types:Legendary Creature Elder Fungus
PT:*/*
K:Trample
S:Mode$ Continuous | EffectZone$ All | CharacteristicDefining$ True | SetPower$ Y | SetToughness$ Y | Description$ CARDNAME's power and toughness are each equal to the number of creatures you control that are Fungi and/or Saprolings.
SVar:Y:Count$Valid Creature.Fungus+YouCtrl,Creature.Saproling+YouCtrl
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigToken | TriggerDescription$ At the beginning of your end step, create X 1/1 black Fungus creature tokens with "This creature can't block," where X is the number of times you descended this turn. (You descend each time a permanent card is put into your graveyard from anywhere.)
SVar:TrigToken:DB$ Token | TokenAmount$ X | TokenScript$ b_1_1_fungus_noblock
SVar:X:Count$YouDescendedThisTurn
DeckHas:Ability$Token & Type$Fungus
DeckHints:Type$Fungus|Saproling & Ability$Sacrifice
Oracle:Trample\nThe Mycotyrant's power and toughness are each equal to the number of creatures you control that are Fungi and/or Saprolings.\nAt the beginning of your end step, create X 1/1 black Fungus creature tokens with "This creature can't block," where X is the number of times you descended this turn. (You descend each time a permanent card is put into your graveyard from anywhere.)

View File

@@ -0,0 +1,7 @@
Name:Fungus Token
ManaCost:no cost
Types:Creature Fungus
Colors:black
PT:1/1
S:Mode$ CantBlockBy | ValidBlocker$ Creature.Self | Description$ This creature can't block.
Oracle:This creature can't block.