Fix: Pyre-Sledge Arsonist, Public Enemy, Reckoner Shakedown, Kami's Flare (#9875)

This commit is contained in:
sprangg 2023-01-07 19:01:33 +02:00 committed by GitHub
parent 469fd64f05
commit a2a57e0f14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 2 deletions

View file

@ -48,6 +48,7 @@ class KamisFlareEffect extends OneShotEffect {
static { static {
filter.add(ModifiedPredicate.instance); filter.add(ModifiedPredicate.instance);
filter.add(CardType.CREATURE.getPredicate());
} }
private static final Hint hint = new ConditionHint( private static final Hint hint = new ConditionHint(

View file

@ -75,6 +75,14 @@ class PublicEnemyEffect extends RequirementEffect {
@Override @Override
public boolean applies(Permanent permanent, Ability source, Game game) { public boolean applies(Permanent permanent, Ability source, Game game) {
Permanent enchantment = game.getPermanent(source.getSourceId());
Permanent enchantedCreature = game.getPermanent(enchantment.getAttachedTo());
if (enchantment == null || enchantedCreature == null) {
return false;
}
if (permanent.isControlledBy(enchantedCreature.getControllerId())) {
return false;
}
return true; return true;
} }

View file

@ -48,7 +48,7 @@ public final class PyreSledgeArsonist extends CardImpl {
); );
ability.addCost(new TapSourceCost()); ability.addCost(new TapSourceCost());
ability.addTarget(new TargetAnyTarget()); ability.addTarget(new TargetAnyTarget());
this.addAbility(ability.addHint(hint)); this.addAbility(ability.addHint(hint), new PyreSledgeArsonistWatcher());
} }
private PyreSledgeArsonist(final PyreSledgeArsonist card) { private PyreSledgeArsonist(final PyreSledgeArsonist card) {

View file

@ -93,7 +93,7 @@ class ReckonerShakedownEffect extends OneShotEffect {
} }
TargetPermanent targetPermanent = new TargetPermanent(filter); TargetPermanent targetPermanent = new TargetPermanent(filter);
targetPermanent.setNotTarget(true); targetPermanent.setNotTarget(true);
player.choose(Outcome.BoostCreature, targetPermanent, source, game); controller.choose(Outcome.BoostCreature, targetPermanent, source, game);
Permanent permanent = game.getPermanent(targetPermanent.getFirstTarget()); Permanent permanent = game.getPermanent(targetPermanent.getFirstTarget());
if (permanent != null) { if (permanent != null) {
permanent.addCounters(CounterType.P1P1.createInstance(2), source, game); permanent.addCounters(CounterType.P1P1.createInstance(2), source, game);