mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 14:32:06 -08:00
Added Sentinel, Wakestone Gargoyle, Silhana Starfletcher and Orchard Warden.
This commit is contained in:
parent
cef17e53e9
commit
4d658909ee
12 changed files with 502 additions and 13 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue