mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
implement the stat boost ability
This commit is contained in:
parent
e471dffb70
commit
c11a6e5b32
1 changed files with 18 additions and 1 deletions
|
@ -31,7 +31,10 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.EquippedCondition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
|
||||
import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect;
|
||||
|
@ -42,6 +45,9 @@ import mage.constants.*;
|
|||
import mage.filter.FilterAbility;
|
||||
import mage.filter.common.FilterArtifactPermanent;
|
||||
import mage.filter.common.FilterControlledArtifactPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
@ -53,7 +59,14 @@ import mage.util.CardUtil;
|
|||
|
||||
*/
|
||||
public class AuriokSteelshaper extends CardImpl {
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
new SubtypePredicate("Soldier"),
|
||||
new SubtypePredicate("Knight")
|
||||
));
|
||||
}
|
||||
|
||||
public AuriokSteelshaper(UUID ownerId) {
|
||||
super(ownerId, 4, "Auriok Steelshaper", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{W}");
|
||||
|
@ -67,7 +80,11 @@ public class AuriokSteelshaper extends CardImpl {
|
|||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new AuriokSteelshaperCostReductionEffect()));
|
||||
|
||||
// As long as Auriok Steelshaper is equipped, each creature you control that's a Soldier or a Knight gets +1/+1.
|
||||
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(
|
||||
new BoostControlledEffect(1, 1, Duration.WhileOnBattlefield, filter, false),
|
||||
EquippedCondition.getInstance(),
|
||||
"As long as {this} is equipped, each creature you control that's a Soldier or a Knight gets +1/+1"
|
||||
)));
|
||||
}
|
||||
|
||||
public AuriokSteelshaper(final AuriokSteelshaper card) {
|
||||
|
|
Loading…
Reference in a new issue