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:
Vittorio Alfieri
2021-07-21 10:51:13 +02:00
parent cabc0757be
commit 849194b8da
10 changed files with 941 additions and 844 deletions

View File

@@ -1021,7 +1021,7 @@ int ManaCost::pay(ManaCost * _cost)
cost[i] = diff->getCost(i);
}
for (unsigned int i = 0; i < cost.size(); i++){ // Added to avoid negative values in Manapool (e.g. anytypeofmana)
while(cost[i] < 0){
if(cost[i] < 0){
for (int j = 0; j < Constants::NB_Colors; j++){
if((unsigned int)j != i && cost[j] > 0 && cost[j] <= abs(cost[i])){
cost[i] += cost[j];