Added Sentinel, Wakestone Gargoyle, Silhana Starfletcher and Orchard Warden.

This commit is contained in:
LevelX2 2014-12-17 15:28:33 +01:00
parent cef17e53e9
commit 4d658909ee
12 changed files with 502 additions and 13 deletions

View file

@ -72,15 +72,23 @@ public class CanAttackAsThoughtItDidntHaveDefenderAllEffect extends AsThoughEffe
}
@Override
public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) {
Permanent permanent = game.getPermanent(sourceId);
if (permanent != null && filter.match(permanent, game)) {
return true;
}
return false;
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
Permanent permanent = game.getPermanent(objectId);
return permanent != null && filter.match(permanent, game);
}
private String getText() {
return filter.getMessage() + " can attack as though they didn't have defender";
StringBuilder sb = new StringBuilder(filter.getMessage());
sb.append(" can attack ");
if (!duration.toString().isEmpty()) {
if(Duration.EndOfTurn.equals(duration)) {
sb.append("this turn");
} else {
sb.append(duration.toString());
}
sb.append(" ");
}
sb.append("as though they didn't have defender");
return sb.toString();
}
}

View file

@ -68,6 +68,10 @@ public class SetToughnessSourceEffect extends ContinuousEffectImpl {
int value = amount.calculate(game, source, this);
mageObject.getToughness().setValue(value);
return true;
} else {
if (Duration.Custom.equals(duration)) {
discard();
}
}
return false;
}