mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 22:42:03 -08:00
* Fixed land image downloading from gatherer and handling of Anthology Duel Decks.
This commit is contained in:
parent
ed9d0a5fc1
commit
809bf663df
256 changed files with 293 additions and 270 deletions
|
|
@ -90,8 +90,13 @@ public class SacrificeTargetCost extends CostImpl {
|
|||
@Override
|
||||
public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) {
|
||||
UUID activator = controllerId;
|
||||
if (ability.getAbilityType().equals(AbilityType.ACTIVATED)) {
|
||||
activator = ((ActivatedAbilityImpl)ability).getActivatorId();
|
||||
if (ability.getAbilityType().equals(AbilityType.ACTIVATED) || ability.getAbilityType().equals(AbilityType.SPECIAL_ACTION)) {
|
||||
if (((ActivatedAbilityImpl)ability).getActivatorId() != null) {
|
||||
activator = ((ActivatedAbilityImpl)ability).getActivatorId();
|
||||
} else {
|
||||
// Aktivator not filled?
|
||||
activator = controllerId;
|
||||
}
|
||||
}
|
||||
if (!game.getPlayer(activator).canPaySacrificeCost()) {
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public enum CardRepository {
|
|||
// raise this if db structure was changed
|
||||
private static final long CARD_DB_VERSION = 37;
|
||||
// raise this if new cards were added to the server
|
||||
private static final long CARD_CONTENT_VERSION = 10;
|
||||
private static final long CARD_CONTENT_VERSION = 12;
|
||||
|
||||
private final Random random = new Random();
|
||||
private Dao<CardInfo, Object> cardDao;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public enum ExpansionRepository {
|
|||
private static final String JDBC_URL = "jdbc:h2:file:./db/cards.h2;AUTO_SERVER=TRUE";
|
||||
private static final String VERSION_ENTITY_NAME = "expansion";
|
||||
private static final long EXPANSION_DB_VERSION = 3;
|
||||
private static final long EXPANSION_CONTENT_VERSION = 2;
|
||||
private static final long EXPANSION_CONTENT_VERSION = 4;
|
||||
|
||||
private Dao<ExpansionInfo, Object> expansionDao;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue