forked from External/mage
* Clean original values transmitted with CardView.originalObject * Move RateCard to mage.Common, support cardView as argument. * Clean PermanentView constructor for TestCardRenderDialog
46 lines
1.2 KiB
Java
46 lines
1.2 KiB
Java
package mage.view;
|
|
|
|
import mage.ObjectColor;
|
|
import mage.abilities.Ability;
|
|
import mage.util.SubTypes;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
/**
|
|
* @author BetaSteward_at_googlemail.com
|
|
*/
|
|
public class AbilityView extends CardView {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private final String sourceName;
|
|
private final CardView sourceCard;
|
|
|
|
public AbilityView(Ability ability, String sourceName, CardView sourceCard) {
|
|
this.id = ability.getId();
|
|
this.name = "Ability";
|
|
this.sourceName = sourceName;
|
|
this.sourceCard = sourceCard;
|
|
this.rules = new ArrayList<>();
|
|
rules.add(ability.getRule());
|
|
this.power = "";
|
|
this.toughness = "";
|
|
this.loyalty = "";
|
|
this.defense = "";
|
|
this.cardTypes = new ArrayList<>();
|
|
this.subTypes = new SubTypes();
|
|
this.superTypes = new ArrayList<>();
|
|
this.color = new ObjectColor();
|
|
this.manaCostLeftStr = ability.getManaCostSymbols();
|
|
this.manaCostRightStr = new ArrayList<>();
|
|
}
|
|
|
|
public CardView getSourceCard() {
|
|
return this.sourceCard;
|
|
}
|
|
|
|
public void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
}
|