mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
Implemented Infinite Hourglass, updated upkeep-only text generation
This commit is contained in:
parent
c6f8489ef3
commit
d15ed359ce
5 changed files with 109 additions and 5 deletions
|
|
@ -29,6 +29,7 @@ package mage.abilities;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.mana.ManaOptions;
|
||||
import mage.constants.TargetController;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
|
|
@ -39,6 +40,8 @@ public interface ActivatedAbility extends Ability {
|
|||
|
||||
boolean canActivate(UUID playerId, Game game);
|
||||
|
||||
public void setMayActivate(TargetController mayActivate);
|
||||
|
||||
/**
|
||||
* Returns the minimal possible cost for what the ability can be activated
|
||||
* or cast
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
|
||||
package mage.abilities.condition.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -42,11 +41,11 @@ public class IsStepCondition implements Condition {
|
|||
protected PhaseStep phaseStep;
|
||||
protected boolean onlyDuringYourSteps;
|
||||
|
||||
public IsStepCondition(PhaseStep phaseStep) {
|
||||
public IsStepCondition(PhaseStep phaseStep) {
|
||||
this(phaseStep, true);
|
||||
}
|
||||
|
||||
public IsStepCondition(PhaseStep phaseStep, boolean onlyDuringYourSteps) {
|
||||
|
||||
public IsStepCondition(PhaseStep phaseStep, boolean onlyDuringYourSteps) {
|
||||
this.phaseStep = phaseStep;
|
||||
this.onlyDuringYourSteps = onlyDuringYourSteps;
|
||||
}
|
||||
|
|
@ -58,7 +57,15 @@ public class IsStepCondition implements Condition {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new StringBuilder("during ").append(onlyDuringYourSteps ? "your ":"the ").append(phaseStep.getStepText()).toString();
|
||||
StringBuilder sb = new StringBuilder("during ");
|
||||
if (onlyDuringYourSteps) {
|
||||
sb.append("your ");
|
||||
} else if (phaseStep == PhaseStep.UPKEEP) {
|
||||
sb.append("any upkeep step");
|
||||
} else {
|
||||
sb.append("the ").append(phaseStep.getStepText());
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue