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

Added hint for restrictions which must attack a player ()

Fixes 
This commit is contained in:
Alexander Novotny 2023-06-07 17:00:27 -07:00 committed by GitHub
parent 44f3ef444e
commit 079424f8f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -332,6 +332,12 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
if (object != null) {
restrictHints.add(HintUtils.prepareText("Must attack defender " + object.getLogName() + addSourceObjectName(game, ability), null, HintUtils.HINT_ICON_REQUIRE));
}
Player player = game.getPlayer(entry.getKey().mustAttackDefender(ability, game));
if (player != null) {
restrictHints.add(HintUtils.prepareText(
"Must attack defender " + player.getLogName() + addSourceObjectName(game, ability),
null, HintUtils.HINT_ICON_REQUIRE));
}
object = game.getObject(entry.getKey().mustBlockAttacker(ability, game));
if (object != null) {
restrictHints.add(HintUtils.prepareText("Must block attacker " + object.getLogName() + addSourceObjectName(game, ability), null, HintUtils.HINT_ICON_REQUIRE));