forked from External/mage
removed unnecessary lastAddedToken method from TokenImpl, reworked Warren Weirding
This commit is contained in:
parent
676c3a8bb4
commit
a581d55160
7 changed files with 31 additions and 69 deletions
|
|
@ -24,11 +24,10 @@ import java.util.UUID;
|
|||
*/
|
||||
public class CreateTokenEffect extends OneShotEffect {
|
||||
|
||||
private Token token;
|
||||
private DynamicValue amount;
|
||||
private boolean tapped;
|
||||
private boolean attacking;
|
||||
private UUID lastAddedTokenId;
|
||||
private final Token token;
|
||||
private final DynamicValue amount;
|
||||
private final boolean tapped;
|
||||
private final boolean attacking;
|
||||
private List<UUID> lastAddedTokenIds = new ArrayList<>();
|
||||
|
||||
public CreateTokenEffect(Token token) {
|
||||
|
|
@ -62,7 +61,6 @@ public class CreateTokenEffect extends OneShotEffect {
|
|||
this.token = effect.token.copy();
|
||||
this.tapped = effect.tapped;
|
||||
this.attacking = effect.attacking;
|
||||
this.lastAddedTokenId = effect.lastAddedTokenId;
|
||||
this.lastAddedTokenIds.addAll(effect.lastAddedTokenIds);
|
||||
}
|
||||
|
||||
|
|
@ -75,16 +73,11 @@ public class CreateTokenEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
int value = amount.calculate(game, source, this);
|
||||
token.putOntoBattlefield(value, game, source, source.getControllerId(), tapped, attacking);
|
||||
this.lastAddedTokenId = token.getLastAddedToken();
|
||||
this.lastAddedTokenIds = token.getLastAddedTokenIds();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public UUID getLastAddedTokenId() {
|
||||
return lastAddedTokenId;
|
||||
}
|
||||
|
||||
public List<UUID> getLastAddedTokenIds() {
|
||||
return lastAddedTokenIds;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue