mirror of
https://github.com/correl/mage.git
synced 2024-11-14 11:09:31 +00:00
* Fixed that calling the destroy method for an object of the class permanent did move the card in game but shouldn't (#6571).
This commit is contained in:
parent
47af865bc3
commit
f65f4a4344
1 changed files with 6 additions and 2 deletions
|
@ -1112,14 +1112,18 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
|
||||
@Override
|
||||
public boolean destroy(UUID sourceId, Game game, boolean noRegen) {
|
||||
// Only permanets on the battlefield can be destroyed
|
||||
if (!game.getState().getZone(getId()).equals(Zone.BATTLEFIELD)) {
|
||||
return false;
|
||||
}
|
||||
//20091005 - 701.6
|
||||
if (abilities.containsKey(IndestructibleAbility.getInstance().getId())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!game.replaceEvent(GameEvent.getEvent(EventType.DESTROY_PERMANENT, objectId, sourceId, controllerId, noRegen ? 1 : 0))) {
|
||||
// this means destroy was successful, if object movement to graveyard will be replaced (e.g. commander to command zone) its still
|
||||
// is handled as successful destroying (but not as sucessful "dies this way" for destroying).
|
||||
// this means destroy was successful, if object movement to graveyard will be replaced (e.g. commander to command zone) it's still
|
||||
// handled as successful destroying (but not as sucessful "dies this way" for destroying).
|
||||
if (moveToZone(Zone.GRAVEYARD, sourceId, game, false)) {
|
||||
if (!game.isSimulation()) {
|
||||
String logName;
|
||||
|
|
Loading…
Reference in a new issue