It is currently 12 May 2025, 07:00
   
Text Size

[fixed]meddling mage & nevermore AI can select land

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

[fixed]meddling mage & nevermore AI can select land

Postby Althuna » 26 Mar 2020, 15:52

Describe the Bug:
meddling mage hangs game fixed

Which card behaved improperly?
meddling mage

Which update are you using? (date, name)Which type? (duel, gauntlet, sealed deck)
latest, running gauntlet in challenge

What exactly should be the correct behavior/interaction?
it should let you choose a card

Are any other cards possibly affected by this bug?
nevermore
Attachments
bugs.rar
(1.42 KiB) Downloaded 139 times
Last edited by Aswan jaguar on 27 Oct 2020, 16:13, edited 3 times in total.
Reason: fixed
Althuna
 
Posts: 478
Joined: 26 Jul 2011, 00:23
Has thanked: 100 times
Been thanked: 17 times

Re: meddling mage hangs game

Postby Aswan jaguar » 26 Mar 2020, 15:55

Please capitalize first letters (write name as in gatherer so the auto rules text feature works, thanks.
Meddling Mage, Nevermore.
---
Trying to squash some bugs and playtesting.
User avatar
Aswan jaguar
Super Tester Elite
 
Posts: 8129
Joined: 13 May 2010, 12:17
Has thanked: 748 times
Been thanked: 477 times

Re: [confirmed]meddling mage and nevermore hangs game

Postby Aswan jaguar » 28 Mar 2020, 19:03

Finally after a lot of effort (just at my last attempt before I quit found a solution) fixed in commit 8b3268a. Affected around 15 cards that "name a card" some of them both when human or AI cast them and others just for AI that made game freeze.
However AI can steal with some of these cards and select a land although the card says otherwise.
---
Trying to squash some bugs and playtesting.
User avatar
Aswan jaguar
Super Tester Elite
 
Posts: 8129
Joined: 13 May 2010, 12:17
Has thanked: 748 times
Been thanked: 477 times

Re: [confirmed]meddling mage & nevermore AI can select land

Postby drool66 » 31 Mar 2020, 22:33

Impressive fix

Using the old card_from_list seems to properly enforce the land selection, ie changing line 1239 to:

csvid = card_from_list(player, 3, TYPE_LAND, 1, 0, 0, 0, 0, 0, 0, -1, 0);

But the prompt then is just "Choose a card" (could maybe be changed in card_from_list 's declaration by changing "Choose a card" to test->message without causing a lot of trouble... maybe, who knows)

So... maybe an underlying issue with new_card_from_list?
User avatar
drool66
Programmer
 
Posts: 1185
Joined: 25 Nov 2010, 22:38
Has thanked: 187 times
Been thanked: 280 times

Re: [confirmed]meddling mage & nevermore AI can select land

Postby FastEddie » 27 Oct 2020, 15:41

Commit 040f80a1d fixes it.

The issue was in ai_name_a_random_csvid, namely here:
Code: Select all
if( ! type || (test && new_make_test(t_player, deck_ptr[t_player][count], -1, test) )){
   csvid = cards_data[deck_ptr[t_player][count]].id;
   rounds = 2;
   break;
}
If the function is called with type == 0 so that a supplied test is used the first condition ! type is always true and the test is never executed.
I also changed the selection mechanism a bit so that the AI has a good chance to pick something meaningful (choose at random 10 times which gives decent enough odds even if only a small portion of player's deck is eligible). Also added a few comments to explain how the function works as I found a variety of uses.

Other affected cards are: Council of the Absolute, Conjurer's Ban, Desperate Research, Null Chamber, Phyrexian Revoker, Slaughter Games, Memoricide, Booby Trap, Voidstone Gargoyle, Pithing Needle.
---
Argivian Archaeologist in the Library of Leng studying the Spells of the Ancients
User avatar
FastEddie
 
Posts: 246
Joined: 24 Dec 2019, 10:59
Has thanked: 15 times
Been thanked: 19 times


Return to Archived Reports

Who is online

Users browsing this forum: No registered users and 10 guests


Who is online

In total there are 10 users online :: 0 registered, 0 hidden and 10 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 10 guests

Login Form