It is currently 05 Jul 2025, 00:12
   
Text Size

[fixed]Vraska, Golgari Queen can sac itself

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

[fixed]Vraska, Golgari Queen can sac itself

Postby Althuna » 30 May 2024, 15:02

Not sure if reported already, but AI seems to not use Vraska, Golgari Queen. (I think always?)

I attached save.
Attachments
New WinRAR ZIP archive.zip
(4.22 KiB) Downloaded 129 times
Last edited by Aswan jaguar on 03 Jun 2024, 12:29, 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: Vraska, Golgari Queen

Postby Aswan jaguar » 02 Jun 2024, 11:05

AI does use Vraska, Golgari Queen when it sees a direct advantage from the draw (that can use the card drawn that turn) or when it will draw a valuable for AI card as AI knows which card will draw and in the case of Vraska, Golgari Queen if I am not wrong the card it will draw has to have more value than the one AI will sacrifice. So the +1 life +2 loyalty counters to sac a Badlands to get a Badlands in your savegame is not valued for AI so much.

An issue that I can't find out why happens is that you can sacrifice Vraska, Golgari Queen itself to it's ability despite there is code to prevent this.
Code: Select all
test.not_me = 1;
---
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]Vraska, Golgari Queen can sac itself

Postby drool66 » 02 Jun 2024, 17:51

The sacrifice happens during EVENT_RESOLVE_ACTIVATION, therefore:
Code: Select all
            if( new_sacrifice(player, card, player, SAC_DONE, &test) ){
should be:
Code: Select all
            DECL_INST();
            int pp = inst->parent_controller, pc = inst->parent_card;
            if( new_sacrifice(pp, pc, pp, SAC_DONE, &test) ){
Furthermore,
Code: Select all
   choice = DIALOG(player, card, event,
               DLG_RANDOM, DLG_PLANESWALKER,
               "Sac to draw and gain life", 1, 5, 2,
               "Destroy target nonland", can_target(&td), count_counters(player, card, COUNTER_LOYALTY) > 3 ? 15 : 1, -3,
               "Emblem", 1, 20, -9);
Code: Select all
   choice = DIALOG(player, card, event,
               DLG_RANDOM, DLG_PLANESWALKER,
               "Sac to draw and gain life", new_can_sacrifice(player, card, player, &test), 5, 2,
               "Destroy target nonland", can_target(&td), count_counters(player, card, COUNTER_LOYALTY) > 3 ? 15 : 1, -3,
               "Emblem", 1, 20, -9);
(and the test should be built up top, along with the target definition)

Again, I still can't test anything, so Aswan jaguar if you want to test and commit, otherwise I can either come back and commit later.
User avatar
drool66
Programmer
 
Posts: 1185
Joined: 25 Nov 2010, 22:38
Has thanked: 187 times
Been thanked: 280 times

Re: [confirmed]Vraska, Golgari Queen can sac itself

Postby Aswan jaguar » 03 Jun 2024, 12:28

Fixed in commit 960bc9e as suggested above.
---
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


Return to Pending Reports

Who is online

Users browsing this forum: No registered users and 2 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 10 minutes)
Most users ever online was 5050 on 26 Jun 2025, 06:02

Users browsing this forum: No registered users and 2 guests

Login Form