[fixed/closed]Jeweled Bird copies itself
Moderators: BAgate, drool66, stassy, Aswan jaguar, gmzombie, CCGHQ Admins
[fixed/closed]Jeweled Bird copies itself
by 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 ?
-
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
Reason: closed
Working on: housekeeping and archived reports
Re: Jeweled Bird copies itself
by 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.
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)
-

Korath - DEVELOPER
- Posts: 3522
- Joined: 02 Jun 2013, 05:57
- Has thanked: 491 times
- Been thanked: 1037 times
-

Korath - DEVELOPER
- Posts: 3522
- Joined: 02 Jun 2013, 05:57
- Has thanked: 491 times
- Been thanked: 1037 times
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 5 guests
