Cleanup: source deals damage to {this}; mill cards (#10603)

* New common class for "Whenever a source deals damage to {this}, " which resolves #9340 
* Merge `PutLibraryIntoGraveTargetEffect` with functionally identical `MillCardsTargetEffect`
* Text fix on `RevealDragonFromHandCost` noticed in #10593
* Text fix following up on #10594
This commit is contained in:
xenohedron 2023-07-09 22:05:28 -04:00 committed by GitHub
parent 73104f6705
commit 6c9079012c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
101 changed files with 297 additions and 590 deletions

View file

@ -59,11 +59,17 @@ public class MillCardsTargetEffect extends OneShotEffect {
sb.append("that player");
}
sb.append(" mills ");
if (numberCards.toString().equals("1")) {
sb.append("a card");
String message = numberCards.getMessage();
if (message.isEmpty()) {
if (numberCards.toString().equals("1")) {
sb.append("a card");
} else {
sb.append(CardUtil.numberToText(numberCards.toString()));
sb.append(" cards");
}
} else {
sb.append(CardUtil.numberToText(numberCards.toString()));
sb.append(" cards");
sb.append("X cards, where X is the number of ");
sb.append(message);
}
return sb.toString();
}