mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 21:12:04 -08:00
moved info from CardImpl to CardState and PermanentImpl + created InfoEffect for displaying rule info on Card
This commit is contained in:
parent
eb86378bc1
commit
fe2cd395a6
55 changed files with 333 additions and 94 deletions
|
|
@ -190,15 +190,15 @@ public class CardView extends SimpleCardView {
|
|||
this.isSplitCard = true;
|
||||
leftSplitName = splitCard.getLeftHalfCard().getName();
|
||||
leftSplitCosts = splitCard.getLeftHalfCard().getManaCost();
|
||||
leftSplitRules = splitCard.getLeftHalfCard().getRules();
|
||||
leftSplitRules = splitCard.getLeftHalfCard().getRules(game);
|
||||
rightSplitName = splitCard.getRightHalfCard().getName();
|
||||
rightSplitCosts = splitCard.getRightHalfCard().getManaCost();
|
||||
rightSplitRules = splitCard.getRightHalfCard().getRules();
|
||||
rightSplitRules = splitCard.getRightHalfCard().getRules(game);
|
||||
}
|
||||
|
||||
this.name = card.getImageName();
|
||||
this.displayName = card.getName();
|
||||
this.rules = card.getRules();
|
||||
this.rules = card.getRules(game);
|
||||
this.manaCost = card.getManaCost().getSymbols();
|
||||
this.convertedManaCost = card.getManaCost().convertedManaCost();
|
||||
|
||||
|
|
@ -254,7 +254,7 @@ public class CardView extends SimpleCardView {
|
|||
}
|
||||
//
|
||||
// set code und card number for token copies to get the image
|
||||
this.rules = ((PermanentToken) card).getRules();
|
||||
this.rules = ((PermanentToken) card).getRules(game);
|
||||
this.type = ((PermanentToken)card).getToken().getTokenType();
|
||||
} else {
|
||||
this.rarity = card.getRarity();
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ public class PermanentView extends CardView {
|
|||
public PermanentView(Permanent permanent, Card card, UUID createdForPlayerId, Game game) {
|
||||
super(permanent, game, null, permanent.getControllerId().equals(createdForPlayerId));
|
||||
this.controlled = permanent.getControllerId().equals(createdForPlayerId);
|
||||
this.rules = permanent.getRules();
|
||||
this.rules = permanent.getRules(game);
|
||||
this.tapped = permanent.isTapped();
|
||||
this.flipped = permanent.isFlipped();
|
||||
this.phasedIn = permanent.isPhasedIn();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue