ajani steadfast

ajani steadfast emblem
This commit is contained in:
Anthony Calosa
2016-05-29 14:31:29 +08:00
parent d7fd36ddeb
commit d4715ddc81
7 changed files with 125 additions and 92 deletions
+6 -3
View File
@@ -1386,15 +1386,18 @@ AAFakeAbility * AAFakeAbility::clone() const
}
//EPIC
AAEPIC::AAEPIC(GameObserver* observer, int id, MTGCardInstance * source, MTGCardInstance * _target, string _named,ManaCost * cost):
ActivatedAbility(observer, id, source, cost, 0),named(_named)
AAEPIC::AAEPIC(GameObserver* observer, int id, MTGCardInstance * source, MTGCardInstance * _target, string _named,ManaCost * cost, bool _ffield):
ActivatedAbility(observer, id, source, cost, 0),named(_named),FField(_ffield)
{
this->target = _target;
}
int AAEPIC::resolve()
{
MTGCardInstance * _target = (MTGCardInstance *)target;
_target->controller()->epic = 1;
if(FField)
_target->controller()->forcefield = 1;
else
_target->controller()->epic = 1;
return 1;
}
+6 -1
View File
@@ -71,6 +71,9 @@ int Damage::resolve()
}
//-------------------------------------------------
//Ajani Steadfast ---
if(target->type_as_damageable == Damageable::DAMAGEABLE_MTGCARDINSTANCE && ((MTGCardInstance*)target)->controller()->forcefield)
damage = 1;
if (target->type_as_damageable == Damageable::DAMAGEABLE_MTGCARDINSTANCE)
{
MTGCardInstance * _target = (MTGCardInstance *) target;
@@ -127,7 +130,9 @@ int Damage::resolve()
_target->doDamageTest = 1;
}
if (target->type_as_damageable == Damageable::DAMAGEABLE_PLAYER)
{
{//Ajani Steadfast
if(((Player*)target)->forcefield)
damage = 1;
if(source->has(Constants::LIBRARYEATER) && typeOfDamage == 1)
{
for (int j = damage; j > 0; j--)
+10
View File
@@ -2561,6 +2561,16 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
return a;
}
//Forcefield
found = s.find("forcefield");
if (found != string::npos)
{
MTGAbility * a = NEW AAEPIC(observer, id, card, target,"Forcefield",NULL,true);
a->oneShot = 1;
return a;
}
//Damage
vector<string> splitDamage = parseBetween(s, "damage:", " ", false);
if (splitDamage.size())
+1
View File
@@ -34,6 +34,7 @@ Player::Player(GameObserver *observer, string file, string fileSmall, MTGDeck *
extraTurn = 0;
drawCounter = 0;
epic = 0;
forcefield = 0;
raidcount = 0;
handmodifier = 0;
prowledTypes.clear();