1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-12 09:11:05 -09:00

* Masterful Replication - fixed that it doesn't create copies of artifacts;

This commit is contained in:
Oleg Agafonov 2019-07-06 11:39:40 +04:00
parent 2611f9acca
commit 0ebf1d146e

View file

@ -67,10 +67,10 @@ class MasterfulReplicationEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) {
Permanent copyFromArtifact = game.getPermanent(source.getFirstTarget());
if (copyFromArtifact == null) {
return true;
return false;
}
for (Permanent copyToArtifact : game.getBattlefield().getAllActivePermanents(source.getControllerId())) {
if (copyToArtifact.isArtifact() && copyFromArtifact.getId().equals(copyToArtifact.getId())) {
if (copyToArtifact.isArtifact() && !copyToArtifact.getId().equals(copyFromArtifact.getId())) {
game.copyPermanent(Duration.EndOfTurn, copyFromArtifact, copyToArtifact.getId(), source, new EmptyApplyToPermanent());
}
}