Erwan
- Changecontroller now sends a changezone event - Manacost bug fix (memory leak)
This commit is contained in:
@@ -1669,7 +1669,6 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
|
||||
case 1326: //Wheel of fortune
|
||||
{
|
||||
for (int i = 0; i < 2; i++){
|
||||
// MTGLibrary * library = game->players[i]->game->library;
|
||||
MTGHand * hand = game->players[i]->game->hand;
|
||||
for (int j = hand->nb_cards-1; j>=0; j--){
|
||||
game->players[i]->game->putInGraveyard(hand->cards[j]);
|
||||
|
||||
@@ -241,13 +241,12 @@ int MTGCardInstance::hasSummoningSickness(){
|
||||
return 1;
|
||||
}
|
||||
|
||||
int MTGCardInstance::changeController(Player * newController){
|
||||
MTGCardInstance * MTGCardInstance::changeController(Player * newController){
|
||||
Player * originalOwner = controller();
|
||||
if (originalOwner == newController) return 0;
|
||||
MTGCardInstance * copy = originalOwner->game->inPlay->removeCard(this,0);
|
||||
newController->game->inPlay->addCard(copy);
|
||||
MTGCardInstance * copy = originalOwner->game->putInZone(this, originalOwner->game->inPlay, newController->game->inPlay);
|
||||
//summoningSickness = 1;
|
||||
return 1;
|
||||
return copy;
|
||||
}
|
||||
|
||||
//Reset the card parameters
|
||||
|
||||
@@ -144,7 +144,7 @@ void ManaCost::init(){
|
||||
}
|
||||
nbhybrids = 0;
|
||||
extraCosts = NULL;
|
||||
extraCostsIsCopy = 1;
|
||||
extraCostsIsCopy = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user