Merge fix, additional comments

This commit is contained in:
Oleg Agafonov 2021-07-09 07:36:40 +04:00
parent 572104b8fc
commit 30bb7cd42e
4 changed files with 16 additions and 4 deletions

View file

@ -574,7 +574,7 @@ public enum SubType {
} }
public boolean canGain(MageObject mageObject) { public boolean canGain(MageObject mageObject) {
return canGain(null); return canGain(null, mageObject);
} }
public boolean canGain(Game game, MageObject mageObject) { public boolean canGain(Game game, MageObject mageObject) {

View file

@ -1,4 +1,3 @@
package mage.game.command.emblems; package mage.game.command.emblems;
import mage.abilities.Ability; import mage.abilities.Ability;
@ -15,7 +14,6 @@ import mage.game.command.Emblem;
import mage.game.permanent.token.ZombieToken; import mage.game.permanent.token.ZombieToken;
/** /**
*
* @author spjspj * @author spjspj
*/ */
public final class LilianaTheLastHopeEmblem extends Emblem { public final class LilianaTheLastHopeEmblem extends Emblem {
@ -44,7 +42,7 @@ class LilianaZombiesCount implements DynamicValue {
} }
@Override @Override
public DynamicValue copy() { public LilianaZombiesCount copy() {
return new LilianaZombiesCount(); return new LilianaZombiesCount();
} }

View file

@ -11,6 +11,14 @@ public class CreateTokenEvent extends GameEvent {
private final Map<Token, Integer> tokens = new HashMap<>(); private final Map<Token, Integer> tokens = new HashMap<>();
/**
* Multiple tokens per event (Double Season and other effects can change amount and tokens list with it)
*
* @param source
* @param controllerId
* @param amount
* @param token
*/
public CreateTokenEvent(Ability source, UUID controllerId, int amount, Token token) { public CreateTokenEvent(Ability source, UUID controllerId, int amount, Token token) {
super(GameEvent.EventType.CREATE_TOKEN, null, source, controllerId, amount, false); super(GameEvent.EventType.CREATE_TOKEN, null, source, controllerId, amount, false);
tokens.put(token, amount); tokens.put(token, amount);

View file

@ -5,6 +5,12 @@ import mage.game.permanent.PermanentToken;
public class CreatedTokenEvent extends GameEvent { public class CreatedTokenEvent extends GameEvent {
/**
* Single token per event (if token created and was put to battlefield)
*
* @param source
* @param tokenPerm
*/
public CreatedTokenEvent(Ability source, PermanentToken tokenPerm) { public CreatedTokenEvent(Ability source, PermanentToken tokenPerm) {
super(GameEvent.EventType.CREATED_TOKEN, tokenPerm.getId(), source, tokenPerm.getControllerId()); super(GameEvent.EventType.CREATED_TOKEN, tokenPerm.getId(), source, tokenPerm.getControllerId());
} }