- added other zones to Painter's Servant #8168

This commit is contained in:
jeff@delmarus.com 2021-09-03 18:43:00 -05:00
parent 261f32d9b9
commit 5b4e167ff4

View file

@ -88,6 +88,20 @@ class PaintersServantEffect extends ContinuousEffectImpl {
} }
// Exile // Exile
for (Card card : game.getExile().getAllCards(game)) { for (Card card : game.getExile().getAllCards(game)) {
// handle MDFC
if (card instanceof ModalDoubleFacesCard) {
ModalDoubleFacesCardHalf leftHalfCard = ((ModalDoubleFacesCard) card).getLeftHalfCard();
ModalDoubleFacesCardHalf rightHalfCard = ((ModalDoubleFacesCard) card).getRightHalfCard();
game.getState().getCreateMageObjectAttribute(leftHalfCard, game).getColor().addColor(color);
game.getState().getCreateMageObjectAttribute(rightHalfCard, game).getColor().addColor(color);
}
// handle Split-Cards
if (card instanceof SplitCard) {
SplitCardHalf leftHalfCard = ((SplitCard) card).getLeftHalfCard();
SplitCardHalf rightHalfCard = ((SplitCard) card).getRightHalfCard();
game.getState().getCreateMageObjectAttribute(leftHalfCard, game).getColor().addColor(color);
game.getState().getCreateMageObjectAttribute(rightHalfCard, game).getColor().addColor(color);
}
game.getState().getCreateMageObjectAttribute(card, game).getColor().addColor(color); game.getState().getCreateMageObjectAttribute(card, game).getColor().addColor(color);
} }
// Command // Command
@ -95,6 +109,20 @@ class PaintersServantEffect extends ContinuousEffectImpl {
if (commandObject instanceof Commander) { if (commandObject instanceof Commander) {
Card card = game.getCard(((Commander) commandObject).getId()); Card card = game.getCard(((Commander) commandObject).getId());
if (card != null) { if (card != null) {
// handle MDFC
if (card instanceof ModalDoubleFacesCard) {
ModalDoubleFacesCardHalf leftHalfCard = ((ModalDoubleFacesCard) card).getLeftHalfCard();
ModalDoubleFacesCardHalf rightHalfCard = ((ModalDoubleFacesCard) card).getRightHalfCard();
game.getState().getCreateMageObjectAttribute(leftHalfCard, game).getColor().addColor(color);
game.getState().getCreateMageObjectAttribute(rightHalfCard, game).getColor().addColor(color);
}
// handle Split-Cards
if (card instanceof SplitCard) {
SplitCardHalf leftHalfCard = ((SplitCard) card).getLeftHalfCard();
SplitCardHalf rightHalfCard = ((SplitCard) card).getRightHalfCard();
game.getState().getCreateMageObjectAttribute(leftHalfCard, game).getColor().addColor(color);
game.getState().getCreateMageObjectAttribute(rightHalfCard, game).getColor().addColor(color);
}
game.getState().getCreateMageObjectAttribute(card, game).getColor().addColor(color); game.getState().getCreateMageObjectAttribute(card, game).getColor().addColor(color);
} }
} }
@ -126,10 +154,38 @@ class PaintersServantEffect extends ContinuousEffectImpl {
} }
// Library // Library
for (Card card : player.getLibrary().getCards(game)) { for (Card card : player.getLibrary().getCards(game)) {
// handle MDFC
if (card instanceof ModalDoubleFacesCard) {
ModalDoubleFacesCardHalf leftHalfCard = ((ModalDoubleFacesCard) card).getLeftHalfCard();
ModalDoubleFacesCardHalf rightHalfCard = ((ModalDoubleFacesCard) card).getRightHalfCard();
game.getState().getCreateMageObjectAttribute(leftHalfCard, game).getColor().addColor(color);
game.getState().getCreateMageObjectAttribute(rightHalfCard, game).getColor().addColor(color);
}
// handle Split-Cards
if (card instanceof SplitCard) {
SplitCardHalf leftHalfCard = ((SplitCard) card).getLeftHalfCard();
SplitCardHalf rightHalfCard = ((SplitCard) card).getRightHalfCard();
game.getState().getCreateMageObjectAttribute(leftHalfCard, game).getColor().addColor(color);
game.getState().getCreateMageObjectAttribute(rightHalfCard, game).getColor().addColor(color);
}
game.getState().getCreateMageObjectAttribute(card, game).getColor().addColor(color); game.getState().getCreateMageObjectAttribute(card, game).getColor().addColor(color);
} }
// Graveyard // Graveyard
for (Card card : player.getGraveyard().getCards(game)) { for (Card card : player.getGraveyard().getCards(game)) {
// handle MDFC
if (card instanceof ModalDoubleFacesCard) {
ModalDoubleFacesCardHalf leftHalfCard = ((ModalDoubleFacesCard) card).getLeftHalfCard();
ModalDoubleFacesCardHalf rightHalfCard = ((ModalDoubleFacesCard) card).getRightHalfCard();
game.getState().getCreateMageObjectAttribute(leftHalfCard, game).getColor().addColor(color);
game.getState().getCreateMageObjectAttribute(rightHalfCard, game).getColor().addColor(color);
}
// handle Split-Cards
if (card instanceof SplitCard) {
SplitCardHalf leftHalfCard = ((SplitCard) card).getLeftHalfCard();
SplitCardHalf rightHalfCard = ((SplitCard) card).getRightHalfCard();
game.getState().getCreateMageObjectAttribute(leftHalfCard, game).getColor().addColor(color);
game.getState().getCreateMageObjectAttribute(rightHalfCard, game).getColor().addColor(color);
}
game.getState().getCreateMageObjectAttribute(card, game).getColor().addColor(color); game.getState().getCreateMageObjectAttribute(card, game).getColor().addColor(color);
} }
} }