forked from External/mage
images: fixed wrong miss image message in card hints for dungeons and other command objects (part of #12274);
This commit is contained in:
parent
ff02322e0b
commit
e1ab0be505
3 changed files with 3 additions and 9 deletions
|
|
@ -32,7 +32,7 @@ public class StackAbilityView extends CardView {
|
|||
|
||||
public StackAbilityView(Game game, StackAbility ability, String sourceName, MageObject sourceObject, CardView sourceView) {
|
||||
this.id = ability.getId();
|
||||
this.mageObjectType = MageObjectType.ABILITY_STACK;
|
||||
this.mageObjectType = sourceView.getMageObjectType().isUseTokensRepository() ? MageObjectType.ABILITY_STACK_FROM_TOKEN : MageObjectType.ABILITY_STACK_FROM_CARD;
|
||||
this.abilityType = ability.getStackAbility().getAbilityType();
|
||||
this.sourceCard = sourceView;
|
||||
this.sourceCard.setMageObjectType(mageObjectType);
|
||||
|
|
|
|||
|
|
@ -1126,17 +1126,10 @@ public class TestPlayer implements Player {
|
|||
|
||||
private Permanent findPermanentWithAssert(PlayerAction action, Game game, Player player, String cardName) {
|
||||
for (Permanent perm : game.getBattlefield().getAllActivePermanents(player.getId())) {
|
||||
// need by controller
|
||||
if (!perm.getControllerId().equals(player.getId())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// need by alias or by name
|
||||
if (!hasObjectTargetNameOrAlias(perm, cardName)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// all fine
|
||||
return perm;
|
||||
}
|
||||
printStart(game, "Permanents of " + player.getName());
|
||||
|
|
|
|||
|
|
@ -43,7 +43,8 @@ package mage.constants;
|
|||
* @author LevelX2
|
||||
*/
|
||||
public enum MageObjectType {
|
||||
ABILITY_STACK("Ability on the Stack", false, false, false),
|
||||
ABILITY_STACK_FROM_CARD("Ability on the Stack", false, false, false),
|
||||
ABILITY_STACK_FROM_TOKEN("Ability on the Stack", false, false, true),
|
||||
CARD("Card", false, true, false),
|
||||
COPY_CARD("Copy of a Card", false, true, false),
|
||||
TOKEN("Token", true, true, true),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue