mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
[DFT] Implement Streaking Oilgorger
This commit is contained in:
parent
514a8004e5
commit
59c1a32697
6 changed files with 182 additions and 0 deletions
|
|
@ -0,0 +1,34 @@
|
|||
package mage.abilities.dynamicvalue.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public enum ControllerSpeedCount implements DynamicValue {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
// TODO: Implement this
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ControllerSpeedCount copy() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "X";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "your speed";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package mage.abilities.effects.common.continuous;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.common.ControllerSpeedCount;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Layer;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class MaxSpeedGainAbilityEffect extends ContinuousEffectImpl {
|
||||
|
||||
private final Ability ability;
|
||||
|
||||
public MaxSpeedGainAbilityEffect(Effect effect) {
|
||||
this(new SimpleStaticAbility(effect));
|
||||
}
|
||||
|
||||
public MaxSpeedGainAbilityEffect(Ability ability) {
|
||||
super(Duration.WhileOnBattlefield, Layer.AbilityAddingRemovingEffects_6, SubLayer.NA, Outcome.AddAbility);
|
||||
this.ability = ability;
|
||||
}
|
||||
|
||||
private MaxSpeedGainAbilityEffect(final MaxSpeedGainAbilityEffect effect) {
|
||||
super(effect);
|
||||
this.ability = effect.ability;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MaxSpeedGainAbilityEffect copy() {
|
||||
return new MaxSpeedGainAbilityEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
|
||||
if (permanent == null || ControllerSpeedCount.instance.calculate(game, source, null) < 4) {
|
||||
return false;
|
||||
}
|
||||
permanent.addAbility(ability, source.getSourceId(), game);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return "Max speed — " + ability.getRule();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package mage.abilities.keyword;
|
||||
|
||||
import mage.abilities.StaticAbility;
|
||||
import mage.constants.Zone;
|
||||
|
||||
/**
|
||||
* TODO: Implement this
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class StartYourEnginesAbility extends StaticAbility {
|
||||
|
||||
public StartYourEnginesAbility() {
|
||||
super(Zone.BATTLEFIELD, null);
|
||||
}
|
||||
|
||||
private StartYourEnginesAbility(final StartYourEnginesAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StartYourEnginesAbility copy() {
|
||||
return new StartYourEnginesAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Start your engines!";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue