fix cards attaching/transforming to the wrong card across players

This commit is contained in:
ebbit1q 2026-05-18 23:06:32 +02:00
parent 7a5b2e9f0e
commit 5a8fc40033

View file

@ -1069,7 +1069,14 @@ bool PlayerActions::createRelatedFromRelation(const CardItem *sourceCard, const
createCard(sourceCard, dbName, CardRelationType::DoesNotAttach, persistent);
}
} else {
auto attachType = cardRelation->getAttachType();
CardRelationType attachType;
if (player->getPlayerInfo()->getLocalOrJudge()) {
// do not attempt to attach to another player's cards, this causes the card to attempt to attach to the same
// cardid on the local player's field instead, which is an entirely different card!
attachType = cardRelation->getAttachType();
} else {
attachType = CardRelationType::DoesNotAttach;
}
// move card onto table first if attaching from some other zone
// we only do this for AttachTo because cross-zone TransformInto is already handled server-side