mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
Merge branch 'master' of https://github.com/magefree/mage
This commit is contained in:
commit
c2148f1bb9
1 changed files with 24 additions and 13 deletions
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
package mage.cards.l;
|
package mage.cards.l;
|
||||||
|
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
|
@ -26,11 +25,8 @@ public final class LoreseekersStone extends CardImpl {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}");
|
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}");
|
||||||
|
|
||||||
// {3}, {T}: Draw three cards. This ability costs {1} more to activate for each card in your hand.
|
// {3}, {T}: Draw three cards. This ability costs {1} more to activate for each card in your hand.
|
||||||
// TODO: Make ability properly copiable
|
this.addAbility(new LoreseekersStoneActivatedAbility());
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(3).setText("Draw three cards. This ability costs {1} more to activate for each card in your hand"), new GenericManaCost(3));
|
this.addAbility(new SimpleStaticAbility(Zone.ALL, new LoreseekersStoneCostIncreasingEffect()));
|
||||||
ability.addCost(new TapSourceCost());
|
|
||||||
this.addAbility(ability);
|
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new LoreseekersStoneCostIncreasingEffect(ability.getOriginalId())));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private LoreseekersStone(final LoreseekersStone card) {
|
private LoreseekersStone(final LoreseekersStone card) {
|
||||||
|
@ -43,18 +39,34 @@ public final class LoreseekersStone extends CardImpl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class LoreseekersStoneActivatedAbility extends SimpleActivatedAbility {
|
||||||
|
|
||||||
|
public LoreseekersStoneActivatedAbility() {
|
||||||
|
super(Zone.BATTLEFIELD,
|
||||||
|
new DrawCardSourceControllerEffect(3)
|
||||||
|
.setText("Draw three cards. This ability costs {1} more to activate for each card in your hand"),
|
||||||
|
new GenericManaCost(3));
|
||||||
|
this.addCost(new TapSourceCost());
|
||||||
|
}
|
||||||
|
|
||||||
|
private LoreseekersStoneActivatedAbility(final LoreseekersStoneActivatedAbility ability) {
|
||||||
|
super(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LoreseekersStoneActivatedAbility copy() {
|
||||||
|
return new LoreseekersStoneActivatedAbility(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class LoreseekersStoneCostIncreasingEffect extends CostModificationEffectImpl {
|
class LoreseekersStoneCostIncreasingEffect extends CostModificationEffectImpl {
|
||||||
|
|
||||||
private final UUID originalId;
|
LoreseekersStoneCostIncreasingEffect() {
|
||||||
|
|
||||||
LoreseekersStoneCostIncreasingEffect(UUID originalId) {
|
|
||||||
super(Duration.EndOfGame, Outcome.Benefit, CostModificationType.INCREASE_COST);
|
super(Duration.EndOfGame, Outcome.Benefit, CostModificationType.INCREASE_COST);
|
||||||
this.originalId = originalId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private LoreseekersStoneCostIncreasingEffect(final LoreseekersStoneCostIncreasingEffect effect) {
|
private LoreseekersStoneCostIncreasingEffect(final LoreseekersStoneCostIncreasingEffect effect) {
|
||||||
super(effect);
|
super(effect);
|
||||||
this.originalId = effect.originalId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -68,12 +80,11 @@ class LoreseekersStoneCostIncreasingEffect extends CostModificationEffectImpl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean applies(Ability abilityToModify, Ability source, Game game) {
|
public boolean applies(Ability abilityToModify, Ability source, Game game) {
|
||||||
return abilityToModify.getOriginalId().equals(originalId);
|
return (abilityToModify instanceof LoreseekersStoneActivatedAbility) && abilityToModify.getSourceId().equals(source.getSourceId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LoreseekersStoneCostIncreasingEffect copy() {
|
public LoreseekersStoneCostIncreasingEffect copy() {
|
||||||
return new LoreseekersStoneCostIncreasingEffect(this);
|
return new LoreseekersStoneCostIncreasingEffect(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue