More small fixes

This commit is contained in:
tool4EvEr
2021-06-09 09:43:02 +02:00
parent cfb755ce20
commit 96ccf0afc6
2 changed files with 11 additions and 10 deletions

View File

@@ -57,14 +57,16 @@ public class StaticAbilityCantBeCast {
}
public static boolean cantBeActivatedAbility(final SpellAbility spell, final Card card, final Player activator) {
final Game game = activator.getGame();
for (final Card ca : game.getCardsIn(ZoneType.STATIC_ABILITIES_SOURCE_ZONES)) {
for (final StaticAbility stAb : ca.getStaticAbilities()) {
if (!stAb.getParam("Mode").equals(CantBeActivated) || stAb.isSuppressed() || !stAb.checkConditions()) {
continue;
}
if (applyCantBeActivatedAbility(stAb, spell, card, activator)) {
return true;
if (!spell.isTrigger()) {
final Game game = activator.getGame();
for (final Card ca : game.getCardsIn(ZoneType.STATIC_ABILITIES_SOURCE_ZONES)) {
for (final StaticAbility stAb : ca.getStaticAbilities()) {
if (!stAb.getParam("Mode").equals(CantBeActivated) || stAb.isSuppressed() || !stAb.checkConditions()) {
continue;
}
if (applyCantBeActivatedAbility(stAb, spell, card, activator)) {
return true;
}
}
}
}
@@ -153,7 +155,6 @@ public class StaticAbilityCantBeCast {
* @return true, if successful
*/
public static boolean applyCantBeActivatedAbility(final StaticAbility stAb, final SpellAbility spellAbility, final Card card, final Player activator) {
if (!stAb.matchesValidParam("ValidCard", card)) {
return false;
}

View File

@@ -2,7 +2,7 @@ Name:Gravestorm
ManaCost:B B B
Types:Enchantment
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigChangeZone | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of your upkeep, target opponent may exile a card from their graveyard. If that player doesn't, you may draw a card.
SVar:TrigChangeZone:DB$ ChangeZone | ValidTgts$ Opponent | TgtPrompt$ Select target opponent | Origin$ Graveyard | Destination$ Exile | ChangeType$ Card.YouDontCtrl | ChangeNum$ 1 | Hidden$ True | Chooser$ Targeted | RememberChanged$ True | Optional$ Targeted | IsCurse$ True | SubAbility$ DBDraw
SVar:TrigChangeZone:DB$ ChangeZone | ValidTgts$ Opponent | TgtPrompt$ Select target opponent | Origin$ Graveyard | Destination$ Exile | ChangeType$ Card.TargetedPlayerCtrl | ChangeNum$ 1 | Hidden$ True | Chooser$ Targeted | RememberChanged$ True | Optional$ Targeted | IsCurse$ True | SubAbility$ DBDraw
SVar:DBDraw:DB$ Draw | NumCards$ 1 | Defined$ You | OptionalDecider$ You | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ0 | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Remembered$Amount