mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 10:40:06 -08:00
fixed issue 39
This commit is contained in:
parent
cb3e454002
commit
632775c617
5 changed files with 8 additions and 18 deletions
|
|
@ -57,6 +57,7 @@ import mage.game.permanent.Permanent;
|
||||||
import mage.target.Target;
|
import mage.target.Target;
|
||||||
import mage.target.TargetAmount;
|
import mage.target.TargetAmount;
|
||||||
import mage.target.TargetCard;
|
import mage.target.TargetCard;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
import mage.target.common.TargetAttackingCreature;
|
import mage.target.common.TargetAttackingCreature;
|
||||||
import mage.target.common.TargetCreatureOrPlayer;
|
import mage.target.common.TargetCreatureOrPlayer;
|
||||||
import mage.target.common.TargetCreaturePermanent;
|
import mage.target.common.TargetCreaturePermanent;
|
||||||
|
|
@ -185,7 +186,13 @@ public class HumanPlayer extends PlayerImpl<HumanPlayer> {
|
||||||
game.fireSelectTargetEvent(playerId, target.getMessage(), target.possibleTargets(null, playerId, game), target.isRequired());
|
game.fireSelectTargetEvent(playerId, target.getMessage(), target.possibleTargets(null, playerId, game), target.isRequired());
|
||||||
waitForResponse();
|
waitForResponse();
|
||||||
if (response.getUUID() != null) {
|
if (response.getUUID() != null) {
|
||||||
if (target.canTarget(response.getUUID(), game)) {
|
if (target instanceof TargetPermanent) {
|
||||||
|
if (((TargetPermanent)target).canTarget(playerId, response.getUUID(), null, game)) {
|
||||||
|
target.add(response.getUUID(), game);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (target.canTarget(response.getUUID(), game)) {
|
||||||
target.add(response.getUUID(), game);
|
target.add(response.getUUID(), game);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -27,9 +27,6 @@ public interface MageObject extends MageItem, Serializable {
|
||||||
public MageInt getToughness();
|
public MageInt getToughness();
|
||||||
public MageInt getLoyalty();
|
public MageInt getLoyalty();
|
||||||
|
|
||||||
// public Zone getZone();
|
|
||||||
// public void setZone(Zone zone);
|
|
||||||
|
|
||||||
public void adjustCosts(Ability ability, Game game);
|
public void adjustCosts(Ability ability, Game game);
|
||||||
|
|
||||||
public MageObject copy();
|
public MageObject copy();
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,6 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.Constants.CardType;
|
import mage.Constants.CardType;
|
||||||
import mage.Constants.Zone;
|
|
||||||
|
|
||||||
import mage.abilities.Abilities;
|
import mage.abilities.Abilities;
|
||||||
import mage.abilities.AbilitiesImpl;
|
import mage.abilities.AbilitiesImpl;
|
||||||
|
|
@ -57,7 +56,6 @@ public abstract class MageObjectImpl<T extends MageObjectImpl<T>> implements Mag
|
||||||
protected MageInt power;
|
protected MageInt power;
|
||||||
protected MageInt toughness;
|
protected MageInt toughness;
|
||||||
protected MageInt loyalty;
|
protected MageInt loyalty;
|
||||||
// protected Zone zone;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public abstract T copy();
|
public abstract T copy();
|
||||||
|
|
@ -81,7 +79,6 @@ public abstract class MageObjectImpl<T extends MageObjectImpl<T>> implements Mag
|
||||||
name = object.name;
|
name = object.name;
|
||||||
manaCost = object.manaCost.copy();
|
manaCost = object.manaCost.copy();
|
||||||
text = object.text;
|
text = object.text;
|
||||||
// zone = object.zone;
|
|
||||||
color = object.color.copy();
|
color = object.color.copy();
|
||||||
power = object.power.copy();
|
power = object.power.copy();
|
||||||
toughness = object.toughness.copy();
|
toughness = object.toughness.copy();
|
||||||
|
|
@ -158,16 +155,6 @@ public abstract class MageObjectImpl<T extends MageObjectImpl<T>> implements Mag
|
||||||
return manaCost;
|
return manaCost;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Override
|
|
||||||
// public Zone getZone() {
|
|
||||||
// return zone;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public void setZone(Zone zone) {
|
|
||||||
// this.zone = zone;
|
|
||||||
// }
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void adjustCosts(Ability ability, Game game) {}
|
public void adjustCosts(Ability ability, Game game) {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,6 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.Constants.CardType;
|
import mage.Constants.CardType;
|
||||||
import mage.Constants.Zone;
|
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
import mage.ObjectColor;
|
import mage.ObjectColor;
|
||||||
import mage.abilities.Abilities;
|
import mage.abilities.Abilities;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue