Removing "oldSchoolDeathtouch", as it seems Cockatrice and Thicket Basislisk are now softcoded. Zeth, Dr.Solomat, please review :)
This commit is contained in:
@@ -3452,70 +3452,6 @@ public:
|
||||
return a;
|
||||
}
|
||||
};
|
||||
|
||||
//Creatures that kill their blockers
|
||||
//Ex : Cockatrice
|
||||
class AOldSchoolDeathtouch: public MTGAbility
|
||||
{
|
||||
public:
|
||||
MTGCardInstance * opponents[20];
|
||||
int nbOpponents;
|
||||
AOldSchoolDeathtouch(int _id, MTGCardInstance * _source) :
|
||||
MTGAbility(_id, _source)
|
||||
{
|
||||
nbOpponents = 0;
|
||||
}
|
||||
|
||||
void Update(float dt)
|
||||
{
|
||||
if (newPhase != currentPhase)
|
||||
{
|
||||
if (newPhase == Constants::MTG_PHASE_COMBATDAMAGE)
|
||||
{
|
||||
nbOpponents = 0;
|
||||
MTGCardInstance * opponent = source->getNextOpponent();
|
||||
while (opponent && !opponent->hasSubtype("wall"))
|
||||
{
|
||||
opponents[nbOpponents] = opponent;
|
||||
nbOpponents++;
|
||||
opponent = source->getNextOpponent(opponent);
|
||||
}
|
||||
}
|
||||
else if (newPhase == Constants::MTG_PHASE_COMBATEND)
|
||||
{
|
||||
for (int i = 0; i < nbOpponents; i++)
|
||||
{
|
||||
if (game->isInPlay(opponents[i]))
|
||||
opponents[i]->destroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int testDestroy()
|
||||
{
|
||||
if (!game->isInPlay(source) && currentPhase != Constants::MTG_PHASE_UNTAP)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return MTGAbility::testDestroy();
|
||||
}
|
||||
}
|
||||
|
||||
virtual ostream& toString(ostream& out) const
|
||||
{
|
||||
out << "AOldSchoolDeathtouch ::: opponents : " << opponents << " ; nbOpponents : " << nbOpponents << " (";
|
||||
return MTGAbility::toString(out) << ")";
|
||||
}
|
||||
AOldSchoolDeathtouch * clone() const
|
||||
{
|
||||
AOldSchoolDeathtouch * a = NEW AOldSchoolDeathtouch(*this);
|
||||
a->isClone = 1;
|
||||
return a;
|
||||
}
|
||||
};
|
||||
//bloodthirst ability------------------------------------------
|
||||
class ABloodThirst: public MTGAbility
|
||||
{
|
||||
|
||||
@@ -953,8 +953,6 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (s1.find("endofturn") != string::npos) //stupid edge case, let's get rid of this
|
||||
phase = Constants::MTG_PHASE_ENDOFTURN;
|
||||
s1 = s1.substr(0, seperator - 1);
|
||||
}
|
||||
ManaCost * cost = ManaCost::parseManaCost(s1);
|
||||
@@ -1000,9 +998,6 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
||||
}
|
||||
}
|
||||
|
||||
if (s1.find("endofturn") != string::npos) //stupid edge case, let's get rid of this
|
||||
phase = Constants::MTG_PHASE_ENDOFTURN;
|
||||
|
||||
bool opponentturn = (s1.find("my") == string::npos);
|
||||
bool myturn = (s1.find("opponent") == string::npos);
|
||||
|
||||
@@ -1364,8 +1359,6 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (s1.find("endofturn") != string::npos) //stupid edge case, let's get rid of this
|
||||
phase = Constants::MTG_PHASE_ENDOFTURN;
|
||||
|
||||
bool opponentturn = (s1.find("my") == string::npos);
|
||||
bool myturn = (s1.find("opponent") == string::npos);
|
||||
@@ -1413,8 +1406,6 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
||||
}
|
||||
|
||||
}
|
||||
if (s1.find("endofturn") != string::npos) //stupid edge case, let's get rid of this
|
||||
phase = Constants::MTG_PHASE_ENDOFTURN;
|
||||
s1 = s1.substr(0, seperator - 1);
|
||||
}
|
||||
ManaCost * cost = ManaCost::parseManaCost(s1);
|
||||
@@ -2967,21 +2958,11 @@ void AbilityFactory::addAbilities(int _id, Spell * spell)
|
||||
game->addObserver(NEW AFastbond(_id, card));
|
||||
break;
|
||||
}
|
||||
case 1238: //Cockatrice
|
||||
{
|
||||
game->addObserver(NEW AOldSchoolDeathtouch(_id, card));
|
||||
break;
|
||||
}
|
||||
case 1225: //Stasis
|
||||
{
|
||||
game->addObserver(NEW AStasis(_id, card));
|
||||
break;
|
||||
}
|
||||
case 1267: //Thicket Basilic
|
||||
{
|
||||
game->addObserver(NEW AOldSchoolDeathtouch(_id, card));
|
||||
break;
|
||||
}
|
||||
case 1227: //Toughtlace
|
||||
{
|
||||
if (card->target)
|
||||
@@ -3660,11 +3641,7 @@ int TargetAbility::resolve()
|
||||
{
|
||||
ManaCost * diff = abilityCost->Diff(cost);
|
||||
source->X = diff->hasX();
|
||||
source->XX = 0;
|
||||
if(source->X > 0)
|
||||
{
|
||||
source->XX = source->X/2;
|
||||
}
|
||||
source->XX = source->X/2;
|
||||
delete (diff);
|
||||
ability->target = t;
|
||||
//do nothing if the target controller responded by phasing out the target.
|
||||
|
||||
@@ -20,6 +20,7 @@ int PhaseRing::phaseStrToInt(string s)
|
||||
if (s.compare("combatends") == 0) return Constants::MTG_PHASE_COMBATEND;
|
||||
if (s.compare("secondmain") == 0) return Constants::MTG_PHASE_SECONDMAIN;
|
||||
if (s.compare("endofturn") == 0) return Constants::MTG_PHASE_ENDOFTURN;
|
||||
if (s.compare("end") == 0) return Constants::MTG_PHASE_ENDOFTURN;
|
||||
if (s.compare("cleanup") == 0) return Constants::MTG_PHASE_CLEANUP;
|
||||
DebugTrace("PHASERING: Unknown Phase name: " << s);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user