
Untitled
By: a guest on
Jun 26th, 2012 | syntax:
None | size: 0.76 KB | hits: 14 | expires: Never
function Card(cardName, cardType) {
this.cardName = cardName;
this.cardType = cardType;
this.manaCost = new Mana();
this.tapped = false;
this.summonSickness = false;
this.power = 0;
this.toughness = 0;
this.owner = null;
this.player = null;
this.abilities = [];
}
Card.prototype.tap = function() {
this.tapped = true;
};
Card.prototype.untap = function() {
this.tapped = false;
};
Card.prototype.convertedManaCost = function() {
return this.manaCost.total();
};
function Swamp() {
Card.apply(this, 'Swamp', 'Land');
}
Swamp.prototype.tap = function() {
this.tapped = true;
this.player.manaPool.black++;
};
Swamp.prototype.untap = function() {
this.tapped = false;
this.player.manaPool.black--;
};