Skip to content

Commit

Permalink
Fix logic
Browse files Browse the repository at this point in the history
  • Loading branch information
tool4EvEr authored and tehdiplomat committed Jan 23, 2024
1 parent 5fe761f commit c22bcba
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
12 changes: 12 additions & 0 deletions forge-game/src/main/java/forge/game/ability/AbilityUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -3893,6 +3893,10 @@ public static CardCollection getPaidCards(CardTraitBase sa, String defined) {
list = root.getPaidList("UntappedCards", true);
} else if (defined.startsWith("Untapped")) {
list = root.getPaidList("Untapped", true);
} else if (defined.startsWith("CollectedCards")) {
list = root.getPaidList("CollectedCards", true);
} else if (defined.startsWith("Collected")) {
list = root.getPaidList("Collected", true);
}
}
return list;
Expand Down Expand Up @@ -3966,6 +3970,14 @@ private static CardTraitBase adjustTriggerContext(String[] def, final CardTraitB
def[0] = def[0].substring(22);
return trig;
}
if (def[0].startsWith("CastSA>") && ctb instanceof SpellAbility) {
SpellAbility sa = ((SpellAbility) ctb).getHostCard().getCastSA();
if (sa == null) {
return ctb;
}
def[0] = def[0].substring(7);
return sa;
}
return ctb;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public CostCollectEvidence(final String amount) {
}

public static final String HashLKIListKey = "Collected";
public static final String HashCardListKey = "CollectedEvidence";
public static final String HashCardListKey = "CollectedCards";

@Override
public String getHashForLKIList() {
Expand Down
2 changes: 0 additions & 2 deletions forge-game/src/main/java/forge/game/cost/ICostVisitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ public interface ICostVisitor<T> {
T visit(CostTapType cost);
T visit(CostPayShards cost);



class Base<T> implements ICostVisitor<T> {

@Override
Expand Down
2 changes: 1 addition & 1 deletion forge-gui/res/cardsfolder/upcoming/crimestopper_sprite.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ S:Mode$ OptionalCost | EffectZone$ All | ValidCard$ Card.Self | ValidSA$ Spell |
K:Flying
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigTap | TriggerDescription$ When CARDNAME enters the battlefield, tap target creature. If evidence was collected, put a stun counter on it. (If a permanent with a stun counter would become untapped, remove one from it instead.)
SVar:TrigTap:DB$ Tap | ValidTgts$ Creature | TgtPrompt$ Choose target creature an opponent controls. | SubAbility$ DBStun
SVar:DBStun:DB$ PutCounter | Defined$ Targeted | CounterType$ Stun | CounterNum$ 1 | Condition$ OptionalCost
SVar:DBStun:DB$ PutCounter | Defined$ Targeted | CounterType$ Stun | CounterNum$ 1 | ConditionDefined$ CastSA>Collected | ConditionPresent$ Card
Oracle:As an additional cost to cast this spell, you may collect evidence 6. (Exile cards with total mana value 6 or greater from your graveyard.)\nFlying\nWhen Crimestopper Sprite enters the battlefield, tap target creature. If evidence was collected, put a stun counter on it. (If a permanent with a stun counter would become untapped, remove one from it instead.)

0 comments on commit c22bcba

Please sign in to comment.