Added/fixed primitives, removed deckmaster.info source from Android downloader, fixed HTR18 set, fixed "menace" blocking issue from AI, improved Graft ability from AI, fixed hangs on Offering costs for both human and AI, added a new keyword "ishuman" to distinguish if a card controller is human or AI (e.g. on Graft trigger), fixed a possbile hang on negative manacost payment.
This commit is contained in:
@@ -1030,8 +1030,16 @@ int MTGAlternativeCostRule::reactToClick(MTGCardInstance * card, ManaCost *alter
|
||||
return 0;
|
||||
}
|
||||
//------------------------------------------------------------------------
|
||||
ManaCost * previousManaPool = NEW ManaCost(playerMana);
|
||||
playerMana->pay(alternateCost);
|
||||
ManaCost * previousManaPool = NEW ManaCost(playerMana);
|
||||
bool hasOffering = card->basicAbilities[Constants::OFFERING]; //Fix a hang when try to pay emerge cost.
|
||||
if(alternateCost->extraCosts){
|
||||
for(unsigned int i = 0; i < alternateCost->extraCosts->costs.size(); i++){
|
||||
if(dynamic_cast<Offering*> (alternateCost->extraCosts->costs[i]))
|
||||
hasOffering = true;
|
||||
}
|
||||
}
|
||||
if(!hasOffering)
|
||||
playerMana->pay(alternateCost);
|
||||
alternateCost->doPayExtra();
|
||||
ManaCost *spellCost = previousManaPool->Diff(player->getManaPool());
|
||||
SAFE_DELETE(previousManaPool);
|
||||
|
||||
Reference in New Issue
Block a user