mirror of
https://github.com/correl/mage.git
synced 2024-11-14 19:19:32 +00:00
SearchLibraryPutInHandEffect: add parameter for "that card" text
This commit is contained in:
parent
ae7266efba
commit
f5cbb2e224
1 changed files with 25 additions and 4 deletions
|
@ -21,16 +21,23 @@ import java.util.UUID;
|
||||||
public class SearchLibraryPutInHandEffect extends SearchEffect {
|
public class SearchLibraryPutInHandEffect extends SearchEffect {
|
||||||
|
|
||||||
private boolean revealCards;
|
private boolean revealCards;
|
||||||
|
private boolean textThatCard;
|
||||||
|
|
||||||
public SearchLibraryPutInHandEffect(TargetCardInLibrary target, boolean revealCards) {
|
public SearchLibraryPutInHandEffect(TargetCardInLibrary target, boolean revealCards) {
|
||||||
|
this(target, revealCards, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SearchLibraryPutInHandEffect(TargetCardInLibrary target, boolean revealCards, boolean textThatCard) {
|
||||||
super(target, Outcome.DrawCard);
|
super(target, Outcome.DrawCard);
|
||||||
this.revealCards = revealCards;
|
this.revealCards = revealCards;
|
||||||
|
this.textThatCard = textThatCard;
|
||||||
setText();
|
setText();
|
||||||
}
|
}
|
||||||
|
|
||||||
public SearchLibraryPutInHandEffect(final SearchLibraryPutInHandEffect effect) {
|
public SearchLibraryPutInHandEffect(final SearchLibraryPutInHandEffect effect) {
|
||||||
super(effect);
|
super(effect);
|
||||||
this.revealCards = effect.revealCards;
|
this.revealCards = effect.revealCards;
|
||||||
|
this.textThatCard = effect.textThatCard;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -77,13 +84,27 @@ public class SearchLibraryPutInHandEffect extends SearchEffect {
|
||||||
if (target.getNumberOfTargets() == 0 && target.getMaxNumberOfTargets() > 0) {
|
if (target.getNumberOfTargets() == 0 && target.getMaxNumberOfTargets() > 0) {
|
||||||
sb.append("up to ").append(CardUtil.numberToText(target.getMaxNumberOfTargets())).append(' ');
|
sb.append("up to ").append(CardUtil.numberToText(target.getMaxNumberOfTargets())).append(' ');
|
||||||
sb.append(target.getTargetName());
|
sb.append(target.getTargetName());
|
||||||
sb.append(revealCards ? ", reveal them" : "");
|
if (revealCards) {
|
||||||
sb.append(", put them into your hand, then shuffle");
|
sb.append(", reveal ");
|
||||||
|
sb.append(textThatCard ? "those cards" : "them");
|
||||||
|
sb.append(", put them");
|
||||||
|
} else {
|
||||||
|
sb.append(", put ");
|
||||||
|
sb.append(textThatCard ? "those cards" : "them");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
sb.append(CardUtil.addArticle(target.getTargetName()));
|
sb.append(CardUtil.addArticle(target.getTargetName()));
|
||||||
sb.append(revealCards ? ", reveal it, put it" : ", put that card");
|
if (revealCards) {
|
||||||
sb.append(" into your hand, then shuffle");
|
sb.append(", reveal ");
|
||||||
|
sb.append(textThatCard ? "that card" : "it");
|
||||||
|
sb.append(", put it");
|
||||||
|
} else {
|
||||||
|
sb.append(", put ");
|
||||||
|
sb.append(textThatCard ? "that card" : "it");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
sb.append(" into your hand, then shuffle");
|
||||||
staticText = sb.toString();
|
staticText = sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue