Page 1 of 1

[fixed/closed]Blinkmoth Nexus

PostPosted: 20 Aug 2013, 14:41
by Aswan jaguar
Describe the Bug:
1- Blinkmoth Nexus is boosting a Blinkmoth without paying 1.
2- The animated Blinkmoth Nexus still has the flying ability until the next combat phase(while only a land)

Which card did behave improperly ?
Blinkmoth Nexus

Which update are you using?(date,name)Which type(Duel,Gauntlet,Sealed Deck)
ML3-ODYSSEY.V2

What exactly should be the correct behavior/interaction ?
1- pay 1 and tap to boost a Blinkmoth Nexus
2- The animated Blinkmoth Nexus has the flying ability until the end of turn
Are any other cards possibly affected by this bug ?

Re: Blinkmoth Nexus

PostPosted: 21 Aug 2013, 00:29
by Korath
I tinkered with an almost identical bug for a while a month or two ago - with Lord of Atlantis on the battlefield, an animated Mutavault gets its islandwalk icon late, and keeps it after turning back into a land. It's a surprisingly difficult problem, and this only sort of works:
semifunctional fix | Open
Code: Select all
diff --git a/src/cards/onslaught.c b/src/cards/onslaught.c
index 2fc6526..422e821 100644
--- a/src/cards/onslaught.c
+++ b/src/cards/onslaught.c
@@ -397,8 +397,23 @@ void double_faced_card(int player, int card, event_t event){
     card_instance_t *instance = get_card_instance(player, card);

    if( instance->targets[12].card != -1 && instance->parent_card < 0 ){
-      instance->internal_card_id = instance->targets[12].card;
+      if (instance->internal_card_id != instance->targets[12].card)
+        {
+          instance->internal_card_id = instance->targets[12].card;
+          instance->regen_status |= KEYWORD_RECALC_CHANGE_TYPE|KEYWORD_RECALC_ABILITIES;
+        }
+      if (event == EVENT_CHANGE_TYPE && affect_me(player, card))
+        {
+          event_result = instance->targets[12].card;
+          instance->regen_status |= KEYWORD_RECALC_ABILITIES;
+        }
    }
+   if (event == EVENT_NEW_TURN)
+     {
+       instance->regen_status |= KEYWORD_RECALC_CHANGE_TYPE|KEYWORD_RECALC_ABILITIES;
+       get_abilities(player, card, EVENT_CHANGE_TYPE, -1);
+       get_abilities(player, card, EVENT_ABILITIES, -1);
+     }

    if( event == EVENT_RESOLVE_SPELL ){
        instance->targets[13].player = get_id(player, card);
The new keyword_t constants:
Code: Select all
KEYWORD_RECALC_CHANGE_TYPE=1<< 24,//0x1000000
KEYWORD_RECALC_TOUGHNESS= 1 << 25,//0x2000000
KEYWORD_RECALC_POWER    = 1 << 26,//0x4000000
KEYWORD_RECALC_ABILITIES= 1 << 27,//0x8000000
KEYWORD_RECALC_SET_COLOR= 1 << 28,//0x10000000
Using EVENT_NEW_TURN to handle this is especially distasteful.

Re: Blinkmoth Nexus

PostPosted: 21 Aug 2013, 12:19
by Gargaroz
All fixed, the new "double_faced_card" looks like this :
Code: Select all
void double_faced_card(int player, int card, event_t event){

    card_instance_t *instance = get_card_instance(player, card);

   if( instance->targets[12].card > -1 && event == EVENT_CHANGE_TYPE && affect_me(player, card) ){
        event_result = instance->targets[12].card;
      instance->regen_status |= KEYWORD_RECALC_CHANGE_TYPE|KEYWORD_RECALC_ABILITIES;
    }
   if (event == EVENT_NEW_TURN){
       instance->regen_status |= KEYWORD_RECALC_CHANGE_TYPE|KEYWORD_RECALC_ABILITIES;
       get_abilities(player, card, EVENT_CHANGE_TYPE, -1);
       get_abilities(player, card, EVENT_ABILITIES, -1);
    }

   if( event == EVENT_RESOLVE_SPELL ){
      instance->targets[13].player = get_id(player, card);
      instance->targets[13].card = get_id(player, card);
   }
}

Re: [first still bugged]Blinkmoth Nexus

PostPosted: 28 Sep 2013, 07:03
by Aswan jaguar
First is still bugged you can't select Blinkmoth Nexus to boost a Blinkmoth Nexus and use it to get the mana for the activation,too.

It is 1, {T} the activation cost,if you select to pay the mana with it for the activation cost then it is tapped and you shouldn't be allowed to activate it.

Re: [first still bugged]Blinkmoth Nexus

PostPosted: 28 Sep 2013, 12:52
by Gargaroz
Fixed.