It is currently 08 Jul 2021, 04:44
   
Text Size

[fixed/closed]Jeweled Bird copies itself

Moderators: BAgate, drool66, stassy, Aswan jaguar, gmzombie, CCGHQ Admins

[fixed/closed]Jeweled Bird copies itself

Postby BAgate » 26 Sep 2015, 08:31

Describe the Bug:
Jeweled Bird is not placed in ante, so it can be used over and over, putting copies of itself into ante and then into gy.

Which card did behave improperly ?
Jeweled Bird

Which update are you using?(date,name)Which type(Duel,Gauntlet,Sealed Deck)
Manalink 2015/3/25: Fate Reforged,duel

What exactly should be the correct behavior/interaction ?
Should go to ante when used.

Are any other cards possibly affected by this bug ?
-
Attachments
jeweled bird.rar
(2.58 KiB) Downloaded 100 times
Last edited by BAgate on 26 Dec 2015, 04:32, edited 3 times in total.
Reason: closed
Working on: housekeeping and archived reports
User avatar
BAgate
Tester
 
Posts: 2445
Joined: 06 Mar 2012, 11:09
Has thanked: 117 times
Been thanked: 158 times

Re: Jeweled Bird copies itself

Postby Korath » 26 Sep 2015, 14:45

It's trying to put the activation card into ante.

This is my bug - I can tell from the indentation style in card_jeweled_bird() - but Manalink doesn't compile for me, so I can't test the fix, and so I'm not comfortable committing it.
Completely untested | Open
Code: Select all
diff --git a/src/cards/arabian_nights.c b/src/cards/arabian_nights.c
index 71a2b3b..733a0e4 100644
--- a/src/cards/arabian_nights.c
+++ b/src/cards/arabian_nights.c
@@ -1224,21 +1224,26 @@ int card_jeweled_bird(int player, int card, event_t event)
    * Remove ~ from your deck before playing if you're not playing for ante.
    * |T: Put ~ into the ante. If you do, put all other cards you own from the ante into your graveyard, then draw a card. */

-  if (event == EVENT_RESOLVE_ACTIVATION && in_play(player, card))
+  if (event == EVENT_RESOLVE_ACTIVATION)
     {
-      card_instance_t* instance = get_card_instance(player, card);
+      card_instance_t* activation = get_card_instance(player, card);
+      int p = activation->parent_card_controller, c = activation->parent_card;
+      card_instance_t* instance = in_play(p, c);
+      if (!instance)
+        return 0;
+
       int oid = instance->original_internal_card_id;
-      if (is_token(player, card))
+      if (is_token(p, c))
         oid = -1;

       if (ante_cards[player][1] != -1   // anteing at least two cards
           || (ante_cards[player][0] != -1   // anteing at least one card, and...
-              && (is_token(player, card)    // It'll successfully go to ante, then disappear.
+              && (is_token(p, c)   // It'll successfully go to ante, then disappear.
                   // From the exe version.  I don't know whether expansion_rarity is meaningful anymore, but enh.
                   || cards_ptr[oid]->expansion_rarity <= cards_ptr[cards_data[ante_cards[player][0]].id]->expansion_rarity)))
         ai_modifier += player == AI ? 48 : -48;

-      obliterate_card(player, card);
+      obliterate_card(p, c);

       int i, prev_ante[16];
       for (i = 0; i < 16; ++i)
User avatar
Korath
DEVELOPER
 
Posts: 3522
Joined: 02 Jun 2013, 05:57
Has thanked: 491 times
Been thanked: 1037 times

Re: [confirmed]Jeweled Bird copies itself

Postby Korath » 24 Nov 2015, 06:32

Fixed 0930dbe.
User avatar
Korath
DEVELOPER
 
Posts: 3522
Joined: 02 Jun 2013, 05:57
Has thanked: 491 times
Been thanked: 1037 times


Return to Archived Reports

Who is online

Users browsing this forum: No registered users and 5 guests

cron

Who is online

In total there are 5 users online :: 0 registered, 0 hidden and 5 guests (based on users active over the past 10 minutes)
Most users ever online was 1922 on 07 Jun 2021, 06:01

Users browsing this forum: No registered users and 5 guests

Login Form