예제 #1
0
  public Valleymaker(UUID ownerId, CardSetInfo setInfo) {
    super(ownerId, setInfo, new CardType[] {CardType.CREATURE}, "{5}{R/G}");
    this.subtype.add("Giant");
    this.subtype.add("Shaman");
    this.power = new MageInt(5);
    this.toughness = new MageInt(5);

    // {tap}, Sacrifice a Mountain: Valleymaker deals 3 damage to target creature.
    Ability ability =
        new SimpleActivatedAbility(
            Zone.BATTLEFIELD, new DamageTargetEffect(3), new TapSourceCost());
    ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
    ability.addTarget(new TargetCreaturePermanent());
    this.addAbility(ability);

    // {tap}, Sacrifice a Forest: Choose a player. That player adds {G}{G}{G} to his or her mana
    // pool.
    Ability ability2 =
        new SimpleManaAbility(
            Zone.BATTLEFIELD,
            new AddManaToManaPoolTargetControllerEffect(Mana.GreenMana(3), "chosen player"),
            new TapSourceCost());
    ability2.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter2)));
    ability2.addTarget(new TargetPlayer(1, 1, true));
    this.addAbility(ability2);
  }
예제 #2
0
 @Override
 public boolean checkTrigger(GameEvent event, Game game) {
   if (((DamagedEvent) event).isCombatDamage()) {
     if (event.getSourceId().equals(getSourceId())) {
       this.getEffects().clear();
       Effect effect =
           new AddManaToManaPoolTargetControllerEffect(
               Mana.GreenMana(event.getAmount()), "that player", true);
       effect.setTargetPointer(new FixedTarget(getControllerId()));
       effect.setText(
           "add that much {G} to your mana pool. Until end of turn, this mana doesn't empty from your mana pool as steps and phases end");
       this.addEffect(effect);
       return true;
     }
   }
   return false;
 }