"I AM NOT IN WAGIC YET????"

Discute about general card coding keyword, ask questions and get answer about the mechanism, about the guideline, the direction we want to go...etc...
Dr.Solomat
Posts: 975
Joined: Mon Dec 15, 2008 5:12 pm
Location: Germany

"I AM NOT IN WAGIC YET????"

Post by Dr.Solomat »

"GAAAAHHHHHHHHRRRRRR!!!!"
Image


;)
Sets Coded/Released: Legends, Visions, Weatherlight, Tempest, Stronghold, Portal I & III, Urza's Saga BLOCK, Mercadian Masques, Invasion BLOCK, Mirrodin, Ravnica, Guildpact, Conflux, Alara Reborn
pake1
Posts: 129
Joined: Tue Mar 30, 2010 12:47 am

Re: "I AM NOT IN WAGIC YET????"

Post by pake1 »

Haha does this hint at the fact that Planeswalkers are officially coming to Wagic?? hmmmmmmm :lol:
Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

Re: "I AM NOT IN WAGIC YET????"

Post by Zethfox »

and unfortunately without some serious team effort none of the planeswalkers will ever be...or have you not noticed that every planeswalker has atleast one ability that wagic does not even remotely support.
kaioshin
Posts: 267
Joined: Wed Feb 25, 2009 1:49 pm

Re: "I AM NOT IN WAGIC YET????"

Post by kaioshin »

I'm sad, too, that planeswalkers aren't supported. Almost all (if not all) competitive Decks use at least one of them these days. It's a shame, because they can be done with some effort, as Zeth says.
I really hope that one of the "professional" coders (no offense, Zeth ;), you are great, but still not that experienced) could possibly help here. It would be the one thing that makes Wagic the most complete AI-MtG simulation out there.
We have it all: we have tokens, we have most abilities, all we need is a way the AI and players handle the damage and some hard coded abilities, that can not be done with soft code. At least the classic 5 walkers should be doable.

Please?
Pretty please??
Dr.Solomat
Posts: 975
Joined: Mon Dec 15, 2008 5:12 pm
Location: Germany

Re: "I AM NOT IN WAGIC YET????"

Post by Dr.Solomat »

"I can be done!"
Image

"Me, too!"
Image

"Me,too!"
Image

"Me,too!"
Image

Image

Image
Sets Coded/Released: Legends, Visions, Weatherlight, Tempest, Stronghold, Portal I & III, Urza's Saga BLOCK, Mercadian Masques, Invasion BLOCK, Mirrodin, Ravnica, Guildpact, Conflux, Alara Reborn
Dr.Solomat
Posts: 975
Joined: Mon Dec 15, 2008 5:12 pm
Location: Germany

Re: "I AM NOT IN WAGIC YET????"

Post by Dr.Solomat »

Okay, i see that there will be more issues to be solved than "just" adding the type "Planeswalker"....

but imagine we could have them....
Sets Coded/Released: Legends, Visions, Weatherlight, Tempest, Stronghold, Portal I & III, Urza's Saga BLOCK, Mercadian Masques, Invasion BLOCK, Mirrodin, Ravnica, Guildpact, Conflux, Alara Reborn
kaioshin
Posts: 267
Joined: Wed Feb 25, 2009 1:49 pm

Re: "I AM NOT IN WAGIC YET????"

Post by kaioshin »

Doctor, I'm with you ;). In my eyes, the Planeswalkers should be the main thing to be worked on right now. But there needs to be someone who:
a) wants to add them
b) has the skill to add them
because lazy walkarounds are not the real deal.

cheers!
pake1
Posts: 129
Joined: Tue Mar 30, 2010 12:47 am

Re: "I AM NOT IN WAGIC YET????"

Post by pake1 »

viewtopic.php?f=21&t=1906


I coded a planeswalker package. I used kaios base code along with some token workarounds. Still can use majority of the abilities.

However

1. The AI doesn't know how to use it
2. The AI can't choose whether or not to attack you or the PW
3. It's a single-sided package where only the player can use a planeswalker.
4. YOU the player get to choose who they attack (you or the PW)

Other than that its pretty ok, I havent updated it in ages and with all of these new additions to wagic I think I can try to make it cleaner.
kaioshin
Posts: 267
Joined: Wed Feb 25, 2009 1:49 pm

Re: "I AM NOT IN WAGIC YET????"

Post by kaioshin »

Yeah, pake, but it would be better of course, if they would be done right, and not with any workaround. ;)
Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

Re: "I AM NOT IN WAGIC YET????"

Post by Zethfox »

you forget each planeswalker follows it own specail "legend rule" you can only ever have 1 jace doesnt matter which version of him it is.......and since legend rules only check if the name matchs something on the field, that one probelm...2nd, the oppeonent needs to be able to choose with each creature as attackers are announced if it will be attacking A planeswalker on the feild this is on a PER creature basis....and which one of them it will attack, new combat based rules, damage modification, new lengend rule for planeswalkers, Ai support for picking who it attacks, player support for picking who you attack...not to mention, 3 out of 16 for the amount of work it would take, wagic is not ready for planeswalkers yet.

and to say well we can use token workaround,if after coding even half the support it would take for planeswalkers should be a crime punishable by death.
its all or nothing.

you need to read some of those cards doc...they say "up to two.." meaning multitarget...and "for the rest of the game" so if she leaves play, the effect is still supposed to be there...
also no way to -x as a counter cost....wagic needs to have full support of the planes walkers abilities before we even think of starting the main planeswalker code...thats just my 2 cents...

we are not ready, and i dont mean this as an offense to anyone but i dont think any of the real experenced coders are willing to take on this massive project....because it really will be that massive...i know, cause ive been all over the source code...the work it takes just to have affinity was massive...you have no idea what that code really looks like......

Code: Select all

 //Affinity rule------------------------------------------------------
//this rule is for Affinity cards.

  MTGAffinityRule::MTGAffinityRule(int _id):MTGAbility(_id,NULL){};
  int MTGAffinityRule::receiveEvent(WEvent * event){
    if (event->type == WEvent::CHANGE_ZONE){
      WEventZoneChange * e = (WEventZoneChange *) event;
      MTGCardInstance * card = e->card->previous;

//when cards with affinity enter you hand from anywhere a redux is applied to them for the artifacts in play.
	  if(card && card->has(Constants::AFFINITYARTIFACTS)){
        int ok = 0;
        for (int i = 0; i < 2 ; i++){
          Player * p = game->players[i];
		  if (e->to == p->game->hand) ok = 3;//affinity card enters hand	 
//---------
		  if(ok == 3){//enters play from anywhere
			  if (e->from == p->game->graveyard || e->from == p->game->hand || e->from == p->game->library || e->from == p->game->exile || e->from == p->game->stack || e->from == p->opponent()->game->battlefield || e->from == p->game->temp){
        //--redux effect
		MTGGameZone * z = card->controller()->game->battlefield;
		int nbcards = z->nb_cards;
        for (int j = 0; j < nbcards; ++j){
          MTGCardInstance * c = z->cards[j];
		  if (c->hasSubtype("artifact")){
			  e->card->getManaCost()->remove(0,1);//one less colorless to cast
		  }
		}//--end of redux bracket
		  }
		  }
//-------------
		}
	  }//this bracket end first redux artifacts
	  //----------------------------------------
	  //the following handles redux of land affinities.
	    if(card && card->has(Constants::AFFINITYSWAMP)){
        int ok = 0;
        for (int i = 0; i < 2 ; i++){
          Player * p = game->players[i];
		  if (e->to == p->game->hand) ok = 4;//affinity card enters hand 
//---------
		  if(ok == 4){//enters play from anywhere
			  if (e->from == p->game->graveyard || e->from == p->game->hand || e->from == p->game->library || e->from == p->game->exile || e->from == p->game->stack || e->from == p->opponent()->game->battlefield || e->from == p->game->temp){
        //--redux effect
		MTGGameZone * z = card->controller()->game->battlefield;
		int nbcards = z->nb_cards;
        for (int j = 0; j < nbcards; ++j){
          MTGCardInstance * c = z->cards[j];
		  if (c->hasSubtype("swamp")){
			  e->card->getManaCost()->remove(0,1);//one less colorless to cast
		  }
		}//--end of redux bracket
		  }
		  }
//-------------
		}
	  }//this bracket end first redux swamp
	  //----------------------------------------
		  if(card && card->has(Constants::AFFINITYMOUNTAIN)){
        int ok = 0;
        for (int i = 0; i < 2 ; i++){
          Player * p = game->players[i];
		  if (e->to == p->game->hand) ok = 5;//affinity card enters hand	 
//---------
		  if(ok == 5){//enters play from anywhere
			  if (e->from == p->game->graveyard || e->from == p->game->hand || e->from == p->game->library || e->from == p->game->exile || e->from == p->game->stack || e->from == p->opponent()->game->battlefield || e->from == p->game->temp){
        //--redux effect
		MTGGameZone * z = card->controller()->game->battlefield;
		int nbcards = z->nb_cards;
        for (int j = 0; j < nbcards; ++j){
          MTGCardInstance * c = z->cards[j];
		  if (c->hasSubtype("mountain")){
			  e->card->getManaCost()->remove(0,1);//one less colorless to cast
		  }
		}//--end of redux bracket
		  }
		  }
//-------------
		}
	  }//this bracket end first redux mountains
	  //----------------------------------------
		if(card && card->has(Constants::AFFINITYPLAINS)){
        int ok = 0;
        for (int i = 0; i < 2 ; i++){
          Player * p = game->players[i];
		  if (e->to == p->game->hand) ok = 6;//affinity card enters hand	 
//---------
		  if(ok == 6){//enters play from anywhere
			  if (e->from == p->game->graveyard || e->from == p->game->hand || e->from == p->game->library || e->from == p->game->exile || e->from == p->game->stack || e->from == p->opponent()->game->battlefield || e->from == p->game->temp){
        //--redux effect
		MTGGameZone * z = card->controller()->game->battlefield;
		int nbcards = z->nb_cards;
        for (int j = 0; j < nbcards; ++j){
          MTGCardInstance * c = z->cards[j];
		  if (c->hasSubtype("plains")){
			  e->card->getManaCost()->remove(0,1);//one less colorless to cast
		  }
		}//--end of redux bracket
		  }
		  }
//-------------
		}
	  }//this bracket end first redux plains
	  //----------------------------------------
		  if(card && card->has(Constants::AFFINITYISLAND)){
        int ok = 0;
        for (int i = 0; i < 2 ; i++){
          Player * p = game->players[i];
		  if (e->to == p->game->hand) ok = 7;//affinity card enters hand
//---------
		  if(ok == 7){//enters play from anywhere
			  if (e->from == p->game->graveyard || e->from == p->game->hand || e->from == p->game->library || e->from == p->game->exile || e->from == p->game->stack || e->from == p->opponent()->game->battlefield || e->from == p->game->temp){
        //--redux effect
		MTGGameZone * z = card->controller()->game->battlefield;
		int nbcards = z->nb_cards;
        for (int j = 0; j < nbcards; ++j){
          MTGCardInstance * c = z->cards[j];
		  if (c->hasSubtype("island")){
			  e->card->getManaCost()->remove(0,1);//one less colorless to cast
		  }
		}//--end of redux bracket
		  }
		  }
//-------------
		}
	  }//this bracket end first redux island
	  //----------------------------------------
	    if(card && card->has(Constants::AFFINITYFOREST)){
        int ok = 0;
        for (int i = 0; i < 2 ; i++){
          Player * p = game->players[i];
		  if (e->to == p->game->hand) ok = 8;//affinity card enters hand 
//---------
		  if(ok == 8){//enters play from anywhere
			  if (e->from == p->game->graveyard || e->from == p->game->hand || e->from == p->game->library || e->from == p->game->exile || e->from == p->game->stack || e->from == p->opponent()->game->battlefield || e->from == p->game->temp){
        //--redux effect
		MTGGameZone * z = card->controller()->game->battlefield;
		int nbcards = z->nb_cards;
        for (int j = 0; j < nbcards; ++j){
          MTGCardInstance * c = z->cards[j];
		  if (c->hasSubtype("forest")){
			  e->card->getManaCost()->remove(0,1);//one less colorless to cast
		  }
		}//--end of redux bracket
		  }
		  }
//-------------
		}
	  }//this bracket end first redux forest
	  //----------------------------------------
	    if(card && card->has(Constants::AFFINITYGREENCREATURES)){
        int ok = 0;
        for (int i = 0; i < 2 ; i++){
          Player * p = game->players[i];
		  if (e->to == p->game->hand) ok = 21;//affinity card enters hand 
//---------
		  if(ok == 21){//enters play from anywhere
			  if (e->from == p->game->graveyard || e->from == p->game->hand || e->from == p->game->library || e->from == p->game->exile || e->from == p->game->stack || e->from == p->opponent()->game->battlefield || e->from == p->game->temp){
        //--redux effect
		MTGGameZone * z = card->controller()->game->battlefield;
		int nbcards = z->nb_cards;
        for (int j = 0; j < nbcards; ++j){
          MTGCardInstance * c = z->cards[j];
		  if (c->hasSubtype("creature") && c->hasColor(1)){
			  e->card->getManaCost()->remove(1,1);//one less colorless to cast
		  }
		}//--end of redux bracket
		  }
		  }
//-------------
		}
	  }//this bracket end first redux greencreatures
	  //----------------------------------------
			


		//section 2, maintaining proper manacost
//---------this section takes care of increasing and reducing cost when artifacts enter or leave play
	  if (card && card->hasSubtype("artifact")){
        int ok = 0;
        for (int i = 0; i < 2 ; i++){
          Player * p = game->players[i];
		  if (e->to == p->game->battlefield) ok = 1;//artifact enters play in your battlefield		  
		  if (e->to == p->game->graveyard || e->to == p->game->hand || e->to == p->game->library || e->to == p->game->exile || e->to == p->game->stack || e->to == p->opponent()->game->battlefield) ok = 2;//artifact leaves play
//---------above are the triggers "to" markers...
		  if(ok == 1){//enters play from anywhere
		  if (e->from == p->game->graveyard || e->from == p->game->hand || e->from == p->game->library || e->from == p->game->exile || e->from == p->game->stack || e->from == p->opponent()->game->battlefield || e->from == p->game->temp){
        //--redux effect
		MTGGameZone * z = card->controller()->game->hand;
		int nbcards = z->nb_cards;
        for (int j = 0; j < nbcards; ++j){
          MTGCardInstance * c = z->cards[j];
		  if (c->has(Constants::AFFINITYARTIFACTS)){
			  c->getManaCost()->remove(0,1);//one less colorless to cast
		  }
		}//--end of redux bracket
		  }
		  }
//---------
		  if(ok == 2){//leave play from your battlefield
          if (e->from == p->game->battlefield){
	        //--
		MTGGameZone * z = card->controller()->game->hand;
		int nbcards = z->nb_cards;
               //check my battlefield and opponents
        for (int j = 0; j < nbcards; ++j){
          MTGCardInstance * c = z->cards[j];
		  if (c->has(Constants::AFFINITYARTIFACTS)){
			  c->getManaCost()->add(0,1);
		  }
		}  
		//--
		  }
		  }
//---------
		}
	  }//this bracket ends check for artifacts
	  //----------------------------------------
//the following maintains cost other then artifacts
//----swamps
	  if (card && card->hasSubtype("swamp")){
        int ok = 0;
        for (int i = 0; i < 2 ; i++){
          Player * p = game->players[i];
		  if (e->to == p->game->battlefield) ok = 9;//swamp enters play in your battlefield		  
		  if (e->to == p->game->graveyard || e->to == p->game->hand || e->to == p->game->library || e->to == p->game->exile || e->to == p->game->stack || e->to == p->opponent()->game->battlefield) ok = 10;//artifact leaves play
//---------above are the triggers "to" markers...
		  if(ok == 9){//enters play from anywhere
		  if (e->from == p->game->graveyard || e->from == p->game->hand || e->from == p->game->library || e->from == p->game->exile || e->from == p->game->stack || e->from == p->opponent()->game->battlefield || e->from == p->game->temp){
        //--redux effect
		MTGGameZone * z = card->controller()->game->hand;
		int nbcards = z->nb_cards;
        for (int j = 0; j < nbcards; ++j){
          MTGCardInstance * c = z->cards[j];
		  if (c->has(Constants::AFFINITYSWAMP)){
			  c->getManaCost()->remove(0,1);//one less colorless to cast
		  }
		}//--end of redux bracket
		  }
		  }
//---------
		  if(ok == 10){//leave play from your battlefield
          if (e->from == p->game->battlefield){
	        //--
		MTGGameZone * z = card->controller()->game->hand;
		int nbcards = z->nb_cards;
               //check my battlefield and opponents
        for (int j = 0; j < nbcards; ++j){
          MTGCardInstance * c = z->cards[j];
		  if (c->has(Constants::AFFINITYSWAMP)){
			  c->getManaCost()->add(0,1);
		  }
		}  
		//--
		  }
		  }
//---------
		}
	  }//this bracket ends check for swamps
	  //----------------------------------------
//----mountain
	  if (card && card->hasSubtype("mountain")){
        int ok = 0;
        for (int i = 0; i < 2 ; i++){
          Player * p = game->players[i];
		  if (e->to == p->game->battlefield) ok = 11;//moutain enters play in your battlefield
		  if (e->to == p->game->graveyard || e->to == p->game->hand || e->to == p->game->library || e->to == p->game->exile || e->to == p->game->stack || e->to == p->opponent()->game->battlefield) ok = 12;//artifact leaves play
//---------above are the triggers "to" markers...
		  if(ok == 11){//enters play from anywhere
		  if (e->from == p->game->graveyard || e->from == p->game->hand || e->from == p->game->library || e->from == p->game->exile || e->from == p->game->stack || e->from == p->opponent()->game->battlefield || e->from == p->game->temp){
        //--redux effect
		MTGGameZone * z = card->controller()->game->hand;
		int nbcards = z->nb_cards;
        for (int j = 0; j < nbcards; ++j){
          MTGCardInstance * c = z->cards[j];
		  if (c->has(Constants::AFFINITYMOUNTAIN)){
			  c->getManaCost()->remove(0,1);//one less colorless to cast
		  }
		}//--end of redux bracket
		  }
		  }
//---------
		  if(ok == 12){//leave play from your battlefield
          if (e->from == p->game->battlefield){
	        //--
		MTGGameZone * z = card->controller()->game->hand;
		int nbcards = z->nb_cards;
               //check my battlefield and opponents
        for (int j = 0; j < nbcards; ++j){
          MTGCardInstance * c = z->cards[j];
		  if (c->has(Constants::AFFINITYMOUNTAIN)){
			  c->getManaCost()->add(0,1);
		  }
		}  
		//--
		  }
		  }
//---------
		}
	  }//this bracket ends check for mountains
	  //----------------------------------------
//----plains
	  if (card && card->hasSubtype("plains")){
        int ok = 0;
        for (int i = 0; i < 2 ; i++){
          Player * p = game->players[i];
		  if (e->to == p->game->battlefield) ok = 13;//plains enters play in your battlefield
		  if (e->to == p->game->graveyard || e->to == p->game->hand || e->to == p->game->library || e->to == p->game->exile || e->to == p->game->stack || e->to == p->opponent()->game->battlefield) ok = 14;//artifact leaves play
//---------above are the triggers "to" markers...
		  if(ok == 13){//enters play from anywhere
		  if (e->from == p->game->graveyard || e->from == p->game->hand || e->from == p->game->library || e->from == p->game->exile || e->from == p->game->stack || e->from == p->opponent()->game->battlefield || e->from == p->game->temp){
        //--redux effect
		MTGGameZone * z = card->controller()->game->hand;
		int nbcards = z->nb_cards;
        for (int j = 0; j < nbcards; ++j){
          MTGCardInstance * c = z->cards[j];
		  if (c->has(Constants::AFFINITYPLAINS)){
			  c->getManaCost()->remove(0,1);//one less colorless to cast
		  }
		}//--end of redux bracket
		  }
		  }
//---------
		  if(ok == 14){//leave play from your battlefield
          if (e->from == p->game->battlefield){
	        //--
		MTGGameZone * z = card->controller()->game->hand;
		int nbcards = z->nb_cards;
               //check my battlefield and opponents
        for (int j = 0; j < nbcards; ++j){
          MTGCardInstance * c = z->cards[j];
		  if (c->has(Constants::AFFINITYPLAINS)){
			  c->getManaCost()->add(0,1);
		  }
		}  
		//--
		  }
		  }
//---------
		}
	  }//this bracket ends check for plains
	  //----------------------------------------
//----island
	  if (card && card->hasSubtype("island")){
        int ok = 0;
        for (int i = 0; i < 2 ; i++){
          Player * p = game->players[i];
		  if (e->to == p->game->battlefield) ok = 15;//island enters play in your battlefield
		  
		  if (e->to == p->game->graveyard || e->to == p->game->hand || e->to == p->game->library || e->to == p->game->exile || e->to == p->game->stack || e->to == p->opponent()->game->battlefield) ok = 16;//artifact leaves play
//---------above are the triggers "to" markers...
		  if(ok == 15){//enters play from anywhere
		  if (e->from == p->game->graveyard || e->from == p->game->hand || e->from == p->game->library || e->from == p->game->exile || e->from == p->game->stack || e->from == p->opponent()->game->battlefield || e->from == p->game->temp){
        //--redux effect
		MTGGameZone * z = card->controller()->game->hand;
		int nbcards = z->nb_cards;
        for (int j = 0; j < nbcards; ++j){
          MTGCardInstance * c = z->cards[j];
		  if (c->has(Constants::AFFINITYISLAND)){
			  c->getManaCost()->remove(0,1);//one less colorless to cast
		  }
		}//--end of redux bracket
		  }
		  }
//---------
		  if(ok == 16){//leave play from your battlefield
          if (e->from == p->game->battlefield){
	        //--
		MTGGameZone * z = card->controller()->game->hand;
		int nbcards = z->nb_cards;
               //check my battlefield and opponents
        for (int j = 0; j < nbcards; ++j){
          MTGCardInstance * c = z->cards[j];
		  if (c->has(Constants::AFFINITYISLAND)){
			  c->getManaCost()->add(0,1);
		  }
		}  
		//--
		  }
		  }
//---------
		}
	  }//this bracket ends check for islands
	  //----------------------------------------
//----forest
	  if (card && card->hasSubtype("forest")){
        int ok = 0;
        for (int i = 0; i < 2 ; i++){
          Player * p = game->players[i];
		  if (e->to == p->game->battlefield) ok = 17;//island enters play in your battlefield
		  
		  if (e->to == p->game->graveyard || e->to == p->game->hand || e->to == p->game->library || e->to == p->game->exile || e->to == p->game->stack || e->to == p->opponent()->game->battlefield) ok = 18;//artifact leaves play
//---------above are the triggers "to" markers...
		  if(ok == 17){//enters play from anywhere
			  if (e->from == p->game->graveyard || e->from == p->game->hand || e->from == p->game->library || e->from == p->game->exile || e->from == p->game->stack || e->from == p->opponent()->game->battlefield || e->from == p->game->temp){
        //--redux effect
		MTGGameZone * z = card->controller()->game->hand;
		int nbcards = z->nb_cards;
        for (int j = 0; j < nbcards; ++j){
          MTGCardInstance * c = z->cards[j];
		  if (c->has(Constants::AFFINITYFOREST)){
			  c->getManaCost()->remove(0,1);//one less colorless to cast
		  }
		}//--end of redux bracket
		  }
		  }
//---------
		  if(ok == 18){//leave play from your battlefield
          if (e->from == p->game->battlefield){
	        //--
		MTGGameZone * z = card->controller()->game->hand;
		int nbcards = z->nb_cards;
               //check my battlefield and opponents
        for (int j = 0; j < nbcards; ++j){
          MTGCardInstance * c = z->cards[j];
		  if (c->has(Constants::AFFINITYFOREST)){
			  c->getManaCost()->add(0,1);
		  }
		}  
		//--
		  }
		  }
//---------
		}
	  }//this bracket ends check for forest
	  //----------------------------------------
	  //----greencreatureaffinity
	  if (card && card->hasSubtype("creature") && card->hasColor(1)){
        int ok = 0;
        for (int i = 0; i < 2 ; i++){
          Player * p = game->players[i];
		  if (e->to == p->game->battlefield) ok = 19;//island enters play in your battlefield
		  
		  if (e->to == p->game->graveyard || e->to == p->game->hand || e->to == p->game->library || e->to == p->game->exile || e->to == p->game->stack || e->to == p->opponent()->game->battlefield) ok = 20;//artifact leaves play
//---------above are the triggers "to" markers...
		  if(ok == 19){//enters play from anywhere
			  if (e->from == p->game->graveyard || e->from == p->game->hand || e->from == p->game->library || e->from == p->game->exile || e->from == p->game->stack || e->from == p->opponent()->game->battlefield || e->from == p->game->temp){
        //--redux effect
		MTGGameZone * z = card->controller()->game->hand;
		int nbcards = z->nb_cards;
        for (int j = 0; j < nbcards; ++j){
          MTGCardInstance * c = z->cards[j];
		  if (c->has(Constants::AFFINITYGREENCREATURES)){
			  c->getManaCost()->remove(1,1);//one less colorless to cast
		  }
		}//--end of redux bracket
		  }
		  }
//---------
		  if(ok == 20){//leave play from your battlefield
          if (e->from == p->game->battlefield){
	        //--
		MTGGameZone * z = card->controller()->game->hand;
		int nbcards = z->nb_cards;
               //check my battlefield and opponents
        for (int j = 0; j < nbcards; ++j){
          MTGCardInstance * c = z->cards[j];
		  if (c->has(Constants::AFFINITYGREENCREATURES)){
			  c->getManaCost()->add(1,1);
		  }
		}  
		//--
		  }
		  }
//---------
		}
	  }//this bracket ends check for greencreatures
	  //----------------------------------------
	}
    return 0;
  }
  ostream& MTGAffinityRule::toString(ostream& out) const
  {
    out << "MTGAffinityRule ::: (";
    return MTGAbility::toString(out) << ")";
  }
  int MTGAffinityRule::testDestroy(){return 0;}
  MTGAffinityRule * MTGAffinityRule::clone() const{
    MTGAffinityRule * a =  NEW MTGAffinityRule(*this);
    a->isClone = 1;
    return a;
  }
this is only the rule....not counting all the other code i had to put in the source to allow support for affinity the way it is now.

if i were to wish for additions to wagic, i would sadly turn down planeswalker, i would rather have that effort pumped towards "reveal the next X card and choose X and put the other X in where ever" which would add a MASSIVE number of supported cards, the 2nd wish for wagic, "tap X amount of whatever" MULTITARGETING....multitargeting for everything, extra cost multitargetting support for "sacrifice 2 creatures, tap 2 creature you control, tap 7 islands, tap 5 zombies"....multiabilities with multitargetting would be a dream come true...my next wish would be "when event you may pay" and "opponent sacrifices a whatever, or choose a card to discard"

any one of the above mentioned "wishes" would add such a massive number of cards support that it would surpass what having all 16 of the planeswalkers would have added to wagic.

dont get me wrong, i would love to have them as much as the next....but im looking at numbers here...adding 16 cards is great....but the "wishes" would add so many i would say "planeswalker, whats that?"

and the amount of code and effort in just getting planeswalkers rules in place would be far more then what the wish list is.

heck if even the @damaged triggers were fixed it would add more then 16 cards....
we're just, not ready for them :|
further more we need to code in support for the "wishlist" to get rid of token workaround....i dont know about you guys but i have close to 700 tokens in my primitives :/ and every single one of them shows up in the card shops, thorphy room and deck builder EVEN worse...i played Momir the other day and the Ai popped out a token :/ thats freaking BAD


lets not forget, even the Ai isnt ready for planeswalkers,
it can barely decide what to target with negetive effects as it currently is....choosing to swords of plowshare a 1/1 token instead of a 20/20 beast
also choosing to slap not 1, not 2 but all 4 of its "pacify" on a creature that ALREADY "cantattack"...the Ai cant even handle storms abilities because of targetting limitations much less decide if it will attack a player or planeswalker..and even then it will contenue to attack with creatures that have a power of o...and also when the Ai disenchants my useless artifact instead of something like the rack which is killing it....or taps a "produce X mana" ability at the end of its turn, instead of DURING its turn when it could have actually used it, or when it cast 3 black rituals and summons a single creature instead of using all its current mana....
it cant even choose targets for "extracost" like sacrifices and "tap target creature" ect.....

wagic is just...not ready guys.
Locked