mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 13:32:06 -08:00
[STX] Implemented Dragonsguard Elite
This commit is contained in:
parent
072401243f
commit
aa271876d0
6 changed files with 104 additions and 88 deletions
|
|
@ -0,0 +1,39 @@
|
|||
package mage.abilities.effects.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class DoubleP1P1CountersSourceEffect extends OneShotEffect {
|
||||
|
||||
public DoubleP1P1CountersSourceEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "double the number of +1/+1 counters on {this}";
|
||||
}
|
||||
|
||||
private DoubleP1P1CountersSourceEffect(final DoubleP1P1CountersSourceEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DoubleP1P1CountersSourceEffect copy() {
|
||||
return new DoubleP1P1CountersSourceEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
return permanent.addCounters(CounterType.P1P1.createInstance(
|
||||
permanent.getCounters(game).getCount(CounterType.P1P1)
|
||||
), source.getControllerId(), source, game);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue