mirror of
https://github.com/magefree/mage.git
synced 2026-01-09 20:32:06 -08:00
[MOM] Implement Ancient Imperiosaur
This commit is contained in:
parent
2c0486673f
commit
7a3841c45c
3 changed files with 101 additions and 0 deletions
|
|
@ -0,0 +1,41 @@
|
|||
package mage.abilities.dynamicvalue.common;
|
||||
|
||||
import mage.MageObjectReference;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.game.Game;
|
||||
import mage.watchers.common.ConvokeWatcher;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public enum ConvokedSourceCount implements DynamicValue {
|
||||
PERMANENT(-1),
|
||||
SPELL(0);
|
||||
private final int offset;
|
||||
|
||||
ConvokedSourceCount(int offset) {
|
||||
this.offset = offset;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
return ConvokeWatcher.getConvokingCreatures(new MageObjectReference(sourceAbility, offset), game).size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConvokedSourceCount copy() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "creature that convoked it";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "1";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue