use of mage.abilities.costs.common.TapSourceCost in project mage by magefree.
the class RakdosRiteknifeEffect method makeAbility.
private static Ability makeAbility(Permanent permanent, Game game) {
Ability ability = new SimpleActivatedAbility(new AddCountersTargetEffect(CounterType.BLOOD.createInstance()).setText("put a blood counter on " + permanent.getName()).setTargetPointer(new FixedTarget(permanent, game)), new TapSourceCost());
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
return ability;
}
use of mage.abilities.costs.common.TapSourceCost in project mage by magefree.
the class KothOfTheHammerThirdEffect method apply.
@Override
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
switch(layer) {
case AbilityAddingRemovingEffects_6:
if (sublayer == SubLayer.NA) {
for (Permanent permanent : game.getBattlefield().getActivePermanents(mountains, source.getControllerId(), source.getSourceId(), game)) {
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost());
ability.addTarget(new TargetAnyTarget());
permanent.addAbility(ability, source.getSourceId(), game);
}
}
break;
}
return true;
}
use of mage.abilities.costs.common.TapSourceCost in project mage by magefree.
the class ArcheryTrainingValue method apply.
@Override
public boolean apply(Game game, Ability source) {
Permanent aura = game.getPermanent(source.getSourceId());
if (aura == null) {
return false;
}
Permanent permanent = game.getPermanent(aura.getAttachedTo());
if (permanent == null) {
return false;
}
String rule = "this creature deals X damage to target attacking or blocking creature, " + "where X is the number of arrow counters on " + aura.getName();
Ability ability = new SimpleActivatedAbility(new DamageTargetEffect(new ArcheryTrainingValue(aura)).setText(rule), new TapSourceCost());
ability.addTarget(new TargetAttackingOrBlockingCreature());
permanent.addAbility(ability, source.getSourceId(), game);
return true;
}
Aggregations