forked from External/mage
Minor fixes (#12632)
* Fix Nefarious Imp, Bewitching Leechcraft * Include zone of cast in game log
This commit is contained in:
parent
65b513576b
commit
ab803079b9
4 changed files with 12 additions and 10 deletions
|
|
@ -89,9 +89,9 @@ class BewitchingLeechcraftReplacementEffect extends ReplacementEffectImpl {
|
|||
int amountBefore = permanentUntapping.getCounters(game).getCount(CounterType.P1P1);
|
||||
permanentUntapping.removeCounters(CounterType.P1P1.getName(), 1, source, game);
|
||||
int amountAfter = permanentUntapping.getCounters(game).getCount(CounterType.P1P1);
|
||||
// If we could not remove a counter, we are replacing the UNTAP event.
|
||||
// If we could remove a counter, we are not replacing the UNTAP, just adding to it.
|
||||
return amountBefore < amountAfter;
|
||||
// If we could not remove a counter, we are replacing the UNTAP event - return true.
|
||||
// If we could remove a counter, we are not replacing the UNTAP, just adding to it - return false.
|
||||
return amountBefore <= amountAfter;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ class NefariousImpTriggeredAbility extends TriggeredAbilityImpl {
|
|||
zEvent.getCards()
|
||||
.stream()
|
||||
.map(MageItem::getId)
|
||||
.map(game::getPermanent)
|
||||
.map(game::getPermanentOrLKIBattlefield)
|
||||
.filter(Objects::nonNull)
|
||||
).map(Controllable::getControllerId).anyMatch(this::isControlledBy);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -190,14 +190,16 @@ public class Spell extends StackObjectImpl implements Card {
|
|||
return true;
|
||||
}
|
||||
|
||||
public String getActivatedMessage(Game game) {
|
||||
public String getActivatedMessage(Game game, Zone fromZone) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(" casts ");
|
||||
if (isCopy()) {
|
||||
sb.append(" copies ");
|
||||
} else {
|
||||
sb.append(" casts ");
|
||||
sb.append("a copied ");
|
||||
}
|
||||
return sb.append(ability.getGameLogMessage(game)).toString();
|
||||
sb.append(ability.getGameLogMessage(game));
|
||||
sb.append(" from ");
|
||||
sb.append(fromZone.toString().toLowerCase(Locale.ENGLISH));
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public String getSpellCastText(Game game) {
|
||||
|
|
|
|||
|
|
@ -1297,7 +1297,7 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
castedEvent.setZone(fromZone);
|
||||
game.fireEvent(castedEvent);
|
||||
if (!game.isSimulation()) {
|
||||
game.informPlayers(getLogName() + spell.getActivatedMessage(game));
|
||||
game.informPlayers(getLogName() + spell.getActivatedMessage(game, fromZone));
|
||||
}
|
||||
game.removeBookmark(bookmark);
|
||||
resetStoredBookmark(game);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue