mirror of
https://github.com/magefree/mage.git
synced 2026-01-09 12:22:10 -08:00
Merge pull request #1361 from nigelzor/vanguard
add Momir Basic game type
This commit is contained in:
commit
ae3640557a
28 changed files with 846 additions and 278 deletions
|
|
@ -71,16 +71,17 @@ public class LimitedTimesPerTurnActivatedAbility extends ActivatedAbilityImpl {
|
|||
|
||||
@Override
|
||||
public boolean canActivate(UUID playerId, Game game) {
|
||||
if (super.canActivate(playerId, game)) {
|
||||
ActivationInfo activationInfo = getActivationInfo(game);
|
||||
return activationInfo == null || activationInfo.turnNum != game.getTurnNum() || activationInfo.activationCounter < maxActivationsPerTurn;
|
||||
}
|
||||
return false;
|
||||
return super.canActivate(playerId, game) && hasMoreActivationsThisTurn(game);
|
||||
}
|
||||
|
||||
private boolean hasMoreActivationsThisTurn(Game game) {
|
||||
ActivationInfo activationInfo = getActivationInfo(game);
|
||||
return activationInfo == null || activationInfo.turnNum != game.getTurnNum() || activationInfo.activationCounter < maxActivationsPerTurn;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean activate(Game game, boolean noMana) {
|
||||
if (canActivate(this.controllerId, game)) {
|
||||
if (hasMoreActivationsThisTurn(game)) {
|
||||
if (super.activate(game, noMana)) {
|
||||
ActivationInfo activationInfo = getActivationInfo(game);
|
||||
if (activationInfo == null) {
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ public class CardCriteria {
|
|||
private boolean red;
|
||||
private boolean white;
|
||||
private boolean colorless;
|
||||
private Integer convertedManaCost;
|
||||
private String sortBy;
|
||||
private Long start;
|
||||
private Long count;
|
||||
|
|
@ -173,6 +174,11 @@ public class CardCriteria {
|
|||
return this;
|
||||
}
|
||||
|
||||
public CardCriteria convertedManaCost(Integer convertedManaCost) {
|
||||
this.convertedManaCost = convertedManaCost;
|
||||
return this;
|
||||
}
|
||||
|
||||
public CardCriteria maxCardNumber(int maxCardNumber) {
|
||||
this.maxCardNumber = maxCardNumber;
|
||||
return this;
|
||||
|
|
@ -248,6 +254,11 @@ public class CardCriteria {
|
|||
clausesCount++;
|
||||
}
|
||||
|
||||
if (convertedManaCost != null) {
|
||||
where.eq("convertedManaCost", convertedManaCost);
|
||||
clausesCount++;
|
||||
}
|
||||
|
||||
if (!black || !blue || !green || !red || !white || !colorless) {
|
||||
int colorClauses = 0;
|
||||
if (black) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue