* Caged Sun - Fixed that the mana adding ability did not work.

This commit is contained in:
LevelX2 2014-08-19 16:34:47 +02:00
parent 7c8d5ea1be
commit 58a01cac2a

View file

@ -169,10 +169,7 @@ class CagedSunTriggeredAbility extends TriggeredManaAbility {
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (event.getType() == GameEvent.EventType.MANA_ADDED && event.getPlayerId().equals(controllerId)) {
Permanent permanent = game.getPermanent(event.getTargetId());
if (permanent == null) {
permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD);
}
Permanent permanent = game.getPermanentOrLKIBattlefield(event.getSourceId());
if (permanent != null && permanent.getCardType().contains(CardType.LAND)) {
ObjectColor color = (ObjectColor) game.getState().getValue(this.sourceId + "_color");
if (color != null && event.getData().contains(color.toString())) {