Corrections
This commit is contained in:
@@ -3075,6 +3075,17 @@ power=4
|
||||
toughness=6
|
||||
[/card]
|
||||
[card]
|
||||
name=Angel of Jubilation
|
||||
abilities=flying,cantpaylifeorsaccreatures
|
||||
auto=lord(other creature[-black]|mybattlefield) 1/1
|
||||
text=Flying -- Other nonblack creatures you control get +1/+1. -- Players can't pay life or sacrifice creatures to cast spells or activate abilities.
|
||||
mana={1}{W}{W}{W}
|
||||
type=Creature
|
||||
subtype=Angel
|
||||
power=3
|
||||
toughness=3
|
||||
[/card]
|
||||
[card]
|
||||
name=Angel of Light
|
||||
abilities=flying,vigilance
|
||||
text=Flying, vigilance
|
||||
|
||||
@@ -527,15 +527,6 @@ power=6
|
||||
toughness=6
|
||||
[/card]
|
||||
[card]
|
||||
name=Angel of Jubilation
|
||||
text=Flying -- Other nonblack creatures you control get +1/+1. -- Players can't pay life or sacrifice creatures to cast spells or activate abilities.
|
||||
mana={1}{W}{W}{W}
|
||||
type=Creature
|
||||
subtype=Angel
|
||||
power=3
|
||||
toughness=3
|
||||
[/card]
|
||||
[card]
|
||||
name=Angel of Renewal
|
||||
text=Flying -- When Angel of Renewal enters the battlefield, you gain 1 life for each creature you control.
|
||||
mana={5}{W}
|
||||
|
||||
@@ -634,25 +634,25 @@ private:
|
||||
{
|
||||
intValue = 0;
|
||||
for (int j = card->controller()->game->inPlay->nb_cards - 1; j >= 0; --j)
|
||||
{
|
||||
if (card->controller()->game->inPlay->cards[j]->hasType(Subtypes::TYPE_CREATURE) && card->controller()->game->inPlay->cards[j] != card)
|
||||
intValue += card->controller()->game->inPlay->cards[j]->getManaCost()->getConvertedCost();
|
||||
}
|
||||
}
|
||||
else if (s == "pdauntless")//Dauntless Dourbark
|
||||
{
|
||||
MTGGameZone * checkZone = card->controller()->inPlay();
|
||||
intValue =
|
||||
countCardTypeinZone("forest",card->controller()->inPlay()) +
|
||||
countCardTypeinZone("treefolk",card->controller()->inPlay());
|
||||
countCardTypeinZone("forest",checkZone) +
|
||||
countCardTypeinZone("treefolk",checkZone);
|
||||
}
|
||||
else if (s == "pbasiclandtypes")//Basic Land types
|
||||
{
|
||||
MTGGameZone * checkZone = card->controller()->inPlay();
|
||||
intValue =
|
||||
cardHasTypeinZone("forest",card->controller()->inPlay()) +
|
||||
cardHasTypeinZone("plains",card->controller()->inPlay()) +
|
||||
cardHasTypeinZone("swamp",card->controller()->inPlay()) +
|
||||
cardHasTypeinZone("island",card->controller()->inPlay()) +
|
||||
cardHasTypeinZone("mountain",card->controller()->inPlay());
|
||||
cardHasTypeinZone("forest",checkZone) +
|
||||
cardHasTypeinZone("plains",checkZone) +
|
||||
cardHasTypeinZone("swamp",checkZone) +
|
||||
cardHasTypeinZone("island",checkZone) +
|
||||
cardHasTypeinZone("mountain",checkZone);
|
||||
}
|
||||
else if (s == "myname")//Name of the card you control
|
||||
{
|
||||
@@ -662,9 +662,7 @@ private:
|
||||
{
|
||||
intValue = 0;
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
intValue += countCardNameinZone(card->name,card->getObserver()->players[i]->game->battlefield);
|
||||
}
|
||||
}
|
||||
else if (s == "pgbzombie")//Soulless One
|
||||
{
|
||||
@@ -689,24 +687,24 @@ private:
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
MTGGameZone * checkZone = card->getObserver()->players[i]->game->graveyard;
|
||||
intValue =
|
||||
cardHasTypeinZone("planeswalker",card->getObserver()->players[i]->game->graveyard) +
|
||||
cardHasTypeinZone("tribal",card->getObserver()->players[i]->game->graveyard) +
|
||||
cardHasTypeinZone("sorcery",card->getObserver()->players[i]->game->graveyard) +
|
||||
cardHasTypeinZone("land",card->getObserver()->players[i]->game->graveyard) +
|
||||
cardHasTypeinZone("instant",card->getObserver()->players[i]->game->graveyard) +
|
||||
cardHasTypeinZone("enchantment",card->getObserver()->players[i]->game->graveyard) +
|
||||
cardHasTypeinZone("creature",card->getObserver()->players[i]->game->graveyard) +
|
||||
cardHasTypeinZone("artifact",card->getObserver()->players[i]->game->graveyard);
|
||||
cardHasTypeinZone("planeswalker",checkZone) +
|
||||
cardHasTypeinZone("tribal",checkZone) +
|
||||
cardHasTypeinZone("sorcery",checkZone) +
|
||||
cardHasTypeinZone("land",checkZone) +
|
||||
cardHasTypeinZone("instant",checkZone) +
|
||||
cardHasTypeinZone("enchantment",checkZone) +
|
||||
cardHasTypeinZone("creature",checkZone) +
|
||||
cardHasTypeinZone("artifact",checkZone);
|
||||
}
|
||||
}
|
||||
else if (s == "morethanfourcards")
|
||||
{
|
||||
intValue = 0;
|
||||
if ((card->playerTarget) && (card->playerTarget->game->hand->nb_cards - 4)>0)
|
||||
intValue = (card->playerTarget->game->hand->nb_cards - 4);
|
||||
else if ((card->controller()->opponent()->game->hand->nb_cards - 4)>0)
|
||||
intValue = (card->controller()->opponent()->game->hand->nb_cards - 4);
|
||||
int damage = card->playerTarget ? card->playerTarget->game->hand->nb_cards - 4 : card->controller()->opponent()->game->hand->nb_cards - 4;
|
||||
if ( damage > 0 )
|
||||
intValue = damage;
|
||||
}
|
||||
else if (s == "powertotalinplay")//Count Total Power of Creatures you control... Formidable
|
||||
{
|
||||
|
||||
@@ -76,6 +76,7 @@ class SacrificeCost : public ExtraCost
|
||||
{
|
||||
public:
|
||||
SacrificeCost(TargetChooser *_tc = NULL);
|
||||
virtual int canPay();
|
||||
virtual int doPay();
|
||||
virtual SacrificeCost * clone() const;
|
||||
};
|
||||
|
||||
@@ -244,7 +244,8 @@ class Constants
|
||||
DEVOID = 123,
|
||||
CANTCHANGELIFE = 124,
|
||||
COMBATTOUGHNESS = 125,
|
||||
NB_BASIC_ABILITIES = 126,
|
||||
CANTPAYLIFEORSACCREATURES = 126,
|
||||
NB_BASIC_ABILITIES = 127,
|
||||
|
||||
|
||||
RARITY_S = 'S', //Special Rarity
|
||||
|
||||
@@ -245,7 +245,9 @@ LifeCost::LifeCost(TargetChooser *_tc)
|
||||
int LifeCost::canPay()
|
||||
{
|
||||
MTGCardInstance * _target = (MTGCardInstance *) target;
|
||||
if(_target->controller()->life <= 0 || _target->controller()->inPlay()->hasAbility(Constants::CANTCHANGELIFE))
|
||||
if (_target->controller()->life <= 0 || _target->controller()->inPlay()->hasAbility(Constants::CANTCHANGELIFE) ||
|
||||
_target->controller()->opponent()->game->battlefield->hasAbility(Constants::CANTPAYLIFEORSACCREATURES) ||
|
||||
_target->controller()->game->battlefield->hasAbility(Constants::CANTPAYLIFEORSACCREATURES))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -283,7 +285,9 @@ SpecificLifeCost::SpecificLifeCost(TargetChooser *_tc, int slc)
|
||||
int SpecificLifeCost::canPay()
|
||||
{
|
||||
MTGCardInstance * _target = (MTGCardInstance *) target;
|
||||
if(_target->controller()->life >= slc && !_target->controller()->inPlay()->hasAbility(Constants::CANTCHANGELIFE))
|
||||
if(_target->controller()->life >= slc && !_target->controller()->inPlay()->hasAbility(Constants::CANTCHANGELIFE) &&
|
||||
!_target->controller()->opponent()->game->battlefield->hasAbility(Constants::CANTPAYLIFEORSACCREATURES) &&
|
||||
!_target->controller()->game->battlefield->hasAbility(Constants::CANTPAYLIFEORSACCREATURES))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
@@ -331,7 +335,16 @@ LifeorManaCost::LifeorManaCost(TargetChooser *_tc, string manaType)
|
||||
int LifeorManaCost::canPay()
|
||||
{
|
||||
MTGCardInstance * _target = (MTGCardInstance *) target;
|
||||
if (_target->controller()->getManaPool()->canAfford(getManaCost()) || _target->controller()->life > 1)
|
||||
if ( _target->controller()->life <= 1 || _target->controller()->inPlay()->hasAbility(Constants::CANTCHANGELIFE) ||
|
||||
_target->controller()->opponent()->game->battlefield->hasAbility(Constants::CANTPAYLIFEORSACCREATURES) ||
|
||||
_target->controller()->game->battlefield->hasAbility(Constants::CANTPAYLIFEORSACCREATURES))
|
||||
{
|
||||
return _target->controller()->getManaPool()->canAfford(getManaCost());
|
||||
}
|
||||
else if((_target->controller()->life > 1 || _target->controller()->getManaPool()->canAfford(getManaCost())) &&
|
||||
(!_target->controller()->inPlay()->hasAbility(Constants::CANTCHANGELIFE) &&
|
||||
!_target->controller()->opponent()->game->battlefield->hasAbility(Constants::CANTPAYLIFEORSACCREATURES) &&
|
||||
!_target->controller()->game->battlefield->hasAbility(Constants::CANTPAYLIFEORSACCREATURES)))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
@@ -923,6 +936,12 @@ ExtraCost("Select creature to offer", _tc)
|
||||
|
||||
int Offering::canPay()
|
||||
{
|
||||
if(source->controller()->opponent()->game->battlefield->hasAbility(Constants::CANTPAYLIFEORSACCREATURES) ||
|
||||
source->controller()->game->battlefield->hasAbility(Constants::CANTPAYLIFEORSACCREATURES))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (target && (!source->controller()->getManaPool()->canAfford(source->getManaCost()->Diff(target->getManaCost()))))
|
||||
{
|
||||
tc->removeTarget(target);
|
||||
@@ -980,6 +999,18 @@ SacrificeCost::SacrificeCost(TargetChooser *_tc)
|
||||
{
|
||||
}
|
||||
|
||||
int SacrificeCost::canPay()
|
||||
{
|
||||
if(source->controller()->opponent()->game->battlefield->hasAbility(Constants::CANTPAYLIFEORSACCREATURES) ||
|
||||
source->controller()->game->battlefield->hasAbility(Constants::CANTPAYLIFEORSACCREATURES))
|
||||
{
|
||||
if (target && target->isCreature())
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int SacrificeCost::doPay()
|
||||
{
|
||||
if (target)
|
||||
|
||||
@@ -155,7 +155,8 @@ const char* Constants::MTGBasicAbilities[] = {
|
||||
"libraryeater",
|
||||
"devoid",
|
||||
"cantchangelife",
|
||||
"combattoughness"
|
||||
"combattoughness",
|
||||
"cantpaylifeorsaccreatures"
|
||||
};
|
||||
|
||||
map<string,int> Constants::MTGBasicAbilitiesMap;
|
||||
|
||||
Reference in New Issue
Block a user