forked from External/mage
Fixed a problem with casting split cards from non hand zone. Added some generic cast from non hand zone effects and started replacing card specific effects by the generic ones (fixes #5356 and fixes #4493).
This commit is contained in:
parent
c097ec053f
commit
c41c6e1fe9
25 changed files with 304 additions and 476 deletions
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.abilities.effects.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -39,7 +38,9 @@ public class AttachEffect extends OneShotEffect {
|
|||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||
if (sourcePermanent != null) {
|
||||
int zcc = game.getState().getZoneChangeCounter(sourcePermanent.getId());
|
||||
if (zcc == source.getSourceObjectZoneChangeCounter() || zcc == source.getSourceObjectZoneChangeCounter() + 1) {
|
||||
if (zcc == source.getSourceObjectZoneChangeCounter()
|
||||
|| zcc == source.getSourceObjectZoneChangeCounter() + 1
|
||||
|| zcc == source.getSourceObjectZoneChangeCounter() + 2) {
|
||||
Permanent permanent = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||
if (permanent != null) {
|
||||
return permanent.addAttachment(source.getSourceId(), game);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue