mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 04:42:07 -08:00
- Fix for Spellskite in situations where it was also a target. Fixed the test for Spellskite.
This commit is contained in:
parent
3bebdd65bc
commit
209e2d13c1
3 changed files with 79 additions and 6 deletions
|
|
@ -46,7 +46,7 @@ public class Hex extends CardImpl {
|
|||
|
||||
// Destroy six target creatures.
|
||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(6, 6));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(6));
|
||||
}
|
||||
|
||||
public Hex(final Hex card) {
|
||||
|
|
|
|||
|
|
@ -129,12 +129,14 @@ class SpellskiteEffect extends OneShotEffect {
|
|||
for (Target target : targets) {
|
||||
for (UUID targetId : target.getTargets()) {
|
||||
String name = getTargetName(targetId, game);
|
||||
if (!targetId.equals(source.getSourceId()) && target.getTargets().contains(source.getSourceId())) {
|
||||
if (targetId.equals(source.getSourceId())
|
||||
|| target.getTargets().contains(source.getSourceId())) {
|
||||
// you can't change this target to source because the source is already another targetId of that target.
|
||||
twoTimesTarget = true;
|
||||
continue;
|
||||
}
|
||||
if (target.canTarget(stackObject.getControllerId(), source.getSourceId(), sourceAbility, game)) {
|
||||
if (target.canTarget(stackObject.getControllerId(), source.getSourceId(), sourceAbility, game)
|
||||
&& !twoTimesTarget) {
|
||||
validTargets = true;
|
||||
if (name != null
|
||||
&& controller.chooseUse(Outcome.Neutral, "Change target from " + name + " to " + sourceObject.getLogName() + '?', source, game)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue