mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
updated targeting for cards that damage
This commit is contained in:
parent
7212b02e53
commit
5fe607e852
548 changed files with 1127 additions and 1133 deletions
|
|
@ -253,9 +253,9 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
}
|
||||
return target.isChosen();
|
||||
}
|
||||
if (target.getOriginalTarget() instanceof TargetCreatureOrPlayer) {
|
||||
if (target.getOriginalTarget() instanceof TargetAnyTarget) {
|
||||
List<Permanent> targets;
|
||||
TargetCreatureOrPlayer t = ((TargetCreatureOrPlayer) target);
|
||||
TargetAnyTarget t = ((TargetAnyTarget) target);
|
||||
if (outcome.isGood()) {
|
||||
targets = threats(abilityControllerId, sourceId, ((FilterCreatureOrPlayer) t.getFilter()).getCreatureFilter(), game, target.getTargets());
|
||||
} else {
|
||||
|
|
@ -496,9 +496,9 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
}
|
||||
return target.isChosen();
|
||||
}
|
||||
if (target.getOriginalTarget() instanceof TargetCreatureOrPlayer) {
|
||||
if (target.getOriginalTarget() instanceof TargetAnyTarget) {
|
||||
List<Permanent> targets;
|
||||
TargetCreatureOrPlayer t = ((TargetCreatureOrPlayer) target);
|
||||
TargetAnyTarget t = ((TargetAnyTarget) target);
|
||||
if (outcome.isGood()) {
|
||||
targets = threats(abilityControllerId, source.getSourceId(), ((FilterCreatureOrPlayer) t.getFilter()).getCreatureFilter(), game, target.getTargets());
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import mage.cards.Card;
|
|||
import mage.constants.ColoredManaSymbol;
|
||||
import mage.constants.Outcome;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetCreatureOrPlayer;
|
||||
import mage.target.common.TargetAnyTarget;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
|
@ -91,7 +91,7 @@ public final class RateCard {
|
|||
DamageTargetEffect damageEffect = (DamageTargetEffect) effect;
|
||||
if (damageEffect.getAmount() > 1) {
|
||||
for (Target target : ability.getTargets()) {
|
||||
if (target instanceof TargetCreaturePermanent || target instanceof TargetCreatureOrPlayer) {
|
||||
if (target instanceof TargetCreaturePermanent || target instanceof TargetAnyTarget) {
|
||||
log.debug("Found damage dealer: " + card.getName());
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue