mirror of
https://github.com/magefree/mage.git
synced 2026-01-23 03:39:54 -08:00
* Reworked some parts of transform handling.
This commit is contained in:
parent
210bbeeda7
commit
8564ebbbc5
1 changed files with 7 additions and 7 deletions
|
|
@ -14,11 +14,12 @@ import org.apache.log4j.Logger;
|
||||||
* @author North
|
* @author North
|
||||||
*/
|
*/
|
||||||
public class MockCard extends CardImpl {
|
public class MockCard extends CardImpl {
|
||||||
|
|
||||||
// Needs to be here, as it is normally calculated from the
|
// Needs to be here, as it is normally calculated from the
|
||||||
// PlaneswalkerEntersWithLoyaltyAbility of the card... but the MockCard
|
// PlaneswalkerEntersWithLoyaltyAbility of the card... but the MockCard
|
||||||
// only has MockAbilities.
|
// only has MockAbilities.
|
||||||
private int startingLoyalty;
|
private int startingLoyalty;
|
||||||
|
|
||||||
public MockCard(CardInfo card) {
|
public MockCard(CardInfo card) {
|
||||||
super(null, card.getName());
|
super(null, card.getName());
|
||||||
this.cardNumber = card.getCardNumber();
|
this.cardNumber = card.getCardNumber();
|
||||||
|
|
@ -30,25 +31,24 @@ public class MockCard extends CardImpl {
|
||||||
this.subtype = card.getSubTypes();
|
this.subtype = card.getSubTypes();
|
||||||
this.supertype = card.getSupertypes();
|
this.supertype = card.getSupertypes();
|
||||||
|
|
||||||
|
|
||||||
this.usesVariousArt = card.usesVariousArt();
|
this.usesVariousArt = card.usesVariousArt();
|
||||||
|
|
||||||
this.manaCost = new ManaCostsImpl(join(card.getManaCosts()));
|
this.manaCost = new ManaCostsImpl(join(card.getManaCosts()));
|
||||||
|
|
||||||
this.color = card.getColor();
|
this.color = card.getColor();
|
||||||
|
|
||||||
this.frameColor = card.getFrameColor();
|
this.frameColor = card.getFrameColor();
|
||||||
this.frameStyle = card.getFrameStyle();
|
this.frameStyle = card.getFrameStyle();
|
||||||
|
|
||||||
this.splitCard = card.isSplitCard();
|
this.splitCard = card.isSplitCard();
|
||||||
this.flipCard = card.isFlipCard();
|
this.flipCard = card.isFlipCard();
|
||||||
|
|
||||||
this.canTransform = card.isDoubleFaced();
|
this.transformable = card.isDoubleFaced();
|
||||||
this.nightCard = card.isNightCard();
|
this.nightCard = card.isNightCard();
|
||||||
if (card.getSecondSideName() != null && !card.getSecondSideName().isEmpty()) {
|
if (card.getSecondSideName() != null && !card.getSecondSideName().isEmpty()) {
|
||||||
this.secondSideCard = new MockCard(CardRepository.instance.findCard(card.getSecondSideName()));
|
this.secondSideCard = new MockCard(CardRepository.instance.findCard(card.getSecondSideName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.cardType.contains(CardType.PLANESWALKER)) {
|
if (this.cardType.contains(CardType.PLANESWALKER)) {
|
||||||
String startingLoyaltyString = card.getStartingLoyalty();
|
String startingLoyaltyString = card.getStartingLoyalty();
|
||||||
if (startingLoyaltyString.isEmpty()) {
|
if (startingLoyaltyString.isEmpty()) {
|
||||||
|
|
@ -63,7 +63,7 @@ public class MockCard extends CardImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.flipCardName = card.getFlipCardName();
|
this.flipCardName = card.getFlipCardName();
|
||||||
for(String ruleText: card.getRules()) {
|
for (String ruleText : card.getRules()) {
|
||||||
this.addAbility(textAbilityFromString(ruleText));
|
this.addAbility(textAbilityFromString(ruleText));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -71,7 +71,7 @@ public class MockCard extends CardImpl {
|
||||||
public MockCard(final MockCard card) {
|
public MockCard(final MockCard card) {
|
||||||
super(card);
|
super(card);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getStartingLoyalty() {
|
public int getStartingLoyalty() {
|
||||||
return startingLoyalty;
|
return startingLoyalty;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue