mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 20:11:59 -08:00
Removed duplicate class for cost. Refactored 1 card.
This commit is contained in:
parent
23a75c39ba
commit
86089f0fb9
3 changed files with 3 additions and 40 deletions
|
|
@ -34,8 +34,8 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DrawCardTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.OnlyDuringYourTurnCost;
|
||||
import mage.abilities.costs.common.RemoveCountersSourceCost;
|
||||
import mage.abilities.costs.common.YourTurnCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
|
|
@ -61,7 +61,7 @@ public class HoofprintsOfTheStag extends CardImpl<HoofprintsOfTheStag> {
|
|||
this.addAbility(new DrawCardTriggeredAbility(new AddCountersSourceEffect(CounterType.HOOFPRINT.createInstance(1)), true));
|
||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new CreateTokenEffect(new WhiteElementalToken(), 1), new ManaCostsImpl("{2}{W}"));
|
||||
ability.addCost(new RemoveCountersSourceCost(CounterType.HOOFPRINT.createInstance(4)));
|
||||
ability.addCost(new YourTurnCost());
|
||||
ability.addCost(new OnlyDuringYourTurnCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,9 +54,7 @@ public class OnlyDuringYourTurnCost extends CostImpl<OnlyDuringYourTurnCost> {
|
|||
|
||||
@Override
|
||||
public boolean canPay(UUID sourceId, UUID controllerId, Game game) {
|
||||
if (game.getActivePlayerId().equals(controllerId))
|
||||
return true;
|
||||
return false;
|
||||
return game.getActivePlayerId().equals(controllerId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -1,35 +0,0 @@
|
|||
package mage.abilities.costs.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.CostImpl;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* "Activate this ability only during your turn" cost
|
||||
**/
|
||||
public class YourTurnCost extends CostImpl<YourTurnCost> {
|
||||
public YourTurnCost() {
|
||||
this.text = "Activate this ability only during your turn";
|
||||
}
|
||||
|
||||
public YourTurnCost(final YourTurnCost cost) {
|
||||
super(cost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPay(UUID sourceId, UUID controllerId, Game game) {
|
||||
return game.getActivePlayerId().equals(controllerId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public YourTurnCost copy() {
|
||||
return new YourTurnCost(this);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue