public BecomesFaceDownCreatureEffect(final BecomesFaceDownCreatureEffect effect) { super(effect); this.zoneChangeCounter = effect.zoneChangeCounter; if (effect.turnFaceUpAbility != null) { this.turnFaceUpAbility = effect.turnFaceUpAbility.copy(); } this.objectReference = effect.objectReference; this.foundPermanent = effect.foundPermanent; this.faceDownType = effect.faceDownType; }
public LoseAbilityAttachedEffect(final LoseAbilityAttachedEffect effect) { super(effect); this.ability = effect.ability.copy(); this.attachmentType = effect.attachmentType; }
private BloodlordOfVaasgothEffect(final BloodlordOfVaasgothEffect effect) { super(effect); this.ability = effect.ability.copy(); this.zoneChangeCounter = effect.zoneChangeCounter; this.permanentId = effect.permanentId; }
public GainAbilityControllerEffect(final GainAbilityControllerEffect effect) { super(effect); this.ability = effect.ability.copy(); }
public VraskaTheUnseenGainAbilityEffect(final VraskaTheUnseenGainAbilityEffect effect) { super(effect); this.ability = effect.ability.copy(); }
public LoseAbilityTargetEffect(final LoseAbilityTargetEffect effect) { super(effect); this.ability = effect.ability.copy(); }
public LoseAbilitySourceEffect(final LoseAbilitySourceEffect effect) { super(effect); this.ability = effect.ability.copy(); }
public LoseAbilityOrAnotherAbilityTargetEffect(final LoseAbilityOrAnotherAbilityTargetEffect effect) { super(effect); this.ability2 = effect.ability2.copy(); }
public AbilitiesImpl(final AbilitiesImpl<T> abilities) { for (T ability : abilities) { this.add((T) ability.copy()); } }
public GainAbilityAttachedEffect(final GainAbilityAttachedEffect effect) { super(effect); this.ability = effect.ability.copy(); ability.newId(); // This is needed if the effect is copied e.g. by a clone so the ability can be added multiple times to permanents this.attachmentType = effect.attachmentType; this.independentEffect = effect.independentEffect; }
public GainAbilityTargetEffect(final GainAbilityTargetEffect effect) { super(effect); this.ability = effect.ability.copy(); ability.newId(); // This is needed if the effect is copied e.g. by a clone so the ability can be added multiple times to permanents this.onCard = effect.onCard; this.durationPhaseStep = effect.durationPhaseStep; this.durationPlayerId = effect.durationPlayerId; this.sameStep = effect.sameStep; }
public StackAbility(final StackAbility stackAbility) { this.ability = stackAbility.ability.copy(); this.controllerId = stackAbility.controllerId; this.copy = stackAbility.copy; this.copyFrom = (stackAbility.copyFrom != null ? stackAbility.copyFrom.copy() : null); this.name = stackAbility.name; this.expansionSetCode = stackAbility.expansionSetCode; this.targetAdjuster = stackAbility.targetAdjuster; this.targetChanged = stackAbility.targetChanged; this.costAdjuster = stackAbility.costAdjuster; }
public GainAbilitySourceEffect(final GainAbilitySourceEffect effect) { super(effect); this.ability = effect.ability.copy(); ability.newId(); // This is needed if the effect is copied e.g. by a clone so the ability can be added multiple times to permanents this.onCard = effect.onCard; }
public GainAbilityPairedEffect(final GainAbilityPairedEffect effect) { super(effect); this.ability = effect.ability.copy(); ability.newId(); // This is needed if the effect is copied e.g. by a clone so the ability can be added multiple times to permanents }
public ContinuousEffectsList(final ContinuousEffectsList<T> effects) { this.ensureCapacity(effects.size()); for (ContinuousEffect cost : effects) { this.add((T) cost.copy()); } for (Map.Entry<UUID, Set<Ability>> entry : effects.effectAbilityMap.entrySet()) { Set<Ability> newSet = new HashSet<>(); for (Ability ability : entry.getValue()) { newSet.add(ability.copy()); } effectAbilityMap.put(entry.getKey(), newSet); } }
public GainAbilityAllEffect(Ability ability, Duration duration, FilterPermanent filter, boolean excludeSource, Layer layer, SubLayer subLayer) { super(duration, layer, subLayer, Outcome.AddAbility); this.ability = ability.copy(); this.ability.newId(); this.filter = filter; this.excludeSource = excludeSource; this.addDependencyType(DependencyType.AddingAbility); }
public GainAbilityAllEffect(final GainAbilityAllEffect effect) { super(effect); this.ability = effect.ability.copy(); ability.newId(); // This is needed if the effect is copied e.g. by a clone so the ability can be added multiple times to permanents this.filter = effect.filter.copy(); this.excludeSource = effect.excludeSource; }
public Commander(Card card) { this.sourceObject = card; abilities.add(new CastCommanderAbility(card)); for (Ability ability : card.getAbilities()) { if (!(ability instanceof SpellAbility)) { Ability newAbility = ability.copy(); abilities.add(newAbility); } } }
@Override public void addEffect(ContinuousEffect continuousEffect, Ability source) { Ability newAbility = source.copy(); newAbility.setSourceObjectZoneChangeCounter(getState().getZoneChangeCounter(source.getSourceId())); ContinuousEffect newEffect = continuousEffect.copy(); newEffect.newId(); newEffect.init(newAbility, this); state.addEffect(newEffect, newAbility); }
private void addCostTargetOptions(List<Ability> options, Ability option, int targetNum, Game game) { for (UUID targetId : option.getCosts().getTargets().get(targetNum).possibleTargets(option.getSourceId(), playerId, game)) { Ability newOption = option.copy(); newOption.getCosts().getTargets().get(targetNum).addTarget(targetId, option, game, true); if (targetNum < option.getCosts().getTargets().size() - 1) { addCostTargetOptions(options, newOption, targetNum + 1, game); } else { options.add(newOption); } } }