- Changecontroller now sends a changezone event
- Manacost bug fix (memory leak)
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-06-21 10:46:33 +00:00
parent dfdc61e9db
commit 61e449d02b
6 changed files with 9 additions and 9 deletions
-1
View File
@@ -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]);
+3 -4
View File
@@ -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
+1 -1
View File
@@ -144,7 +144,7 @@ void ManaCost::init(){
}
nbhybrids = 0;
extraCosts = NULL;
extraCostsIsCopy = 1;
extraCostsIsCopy = 0;
}