It is currently 16 Apr 2024, 13:31
   
Text Size

[fixed]Proliferate broken adds counters only to players

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

[fixed]Proliferate broken adds counters only to players

Postby Aswan jaguar » 25 Nov 2021, 14:58

Describe the Bug:
Proliferate is broken again in dev. It will prompt and add counters only to player.
No mater if you choose auto or hand.
And of course it still doesn't work with it's current rules see last post:
viewtopic.php?f=86&t=29514&p=242811&hilit=proliferate#p243513

Which update are you using? (date, name)Which type? (duel, gauntlet, sealed deck)
dev 66689d9 commit

What exactly should be the correct behavior/interaction?
Give another counter to ones already there for chosen player and permanents for manual mode. For auto make your best to choose beneficial counters for you and negative for opponent.

Are any other cards possibly affected by this bug?
-
Last edited by drool66 on 26 Nov 2021, 17:29, edited 2 times in total.
Reason: fixed
---
Trying to squash some bugs and playtesting.
User avatar
Aswan jaguar
Super Tester Elite
 
Posts: 8078
Joined: 13 May 2010, 12:17
Has thanked: 730 times
Been thanked: 458 times

Re: Proliferate broken adds counters only to players

Postby Korath » 25 Nov 2021, 18:00

In manual mode, at least, targeting is correct - it fails if no counters are on the selected permanent and passes if there are - but nothing happens afterwards, so apparently it's choose_existing_counter_type() that's broke. It should be bypassed for proliferate() now anyway because of the rules change, but it'll still need to be fixed for other things that call it like Hex Parasite and Leech Bonder.
User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times

Re: Proliferate broken adds counters only to players

Postby Korath » 25 Nov 2021, 18:44

It was broken in drool66's Nov 14 commit e87950a9c2, which changed choose_existing_counter_type to look at counters on src_player,src_card instead of t_player,t_card.
Code: Select all
~/src/manalink/master$ git diff e87950a9c2^! src/functions/counters.c
diff --git a/src/functions/counters.c b/src/functions/counters.c
index 9efc35145..f2a051bb2 100644
--- a/src/functions/counters.c
+++ b/src/functions/counters.c
@@ -2148,7 +2148,7 @@ counter_t choose_existing_counter_type(int who_chooses, int src_player, int src_

   int num_types = 0;

-  card_instance_t* instance = get_card_instance(t_player, t_card);
+  card_instance_t* instance = get_card_instance(src_player, src_card);
   uint8_t* t18 = (void*)(&instance->targets[18].player);

   struct
What made this change necessary?
User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times

Re: [confirm]Proliferate broken adds counters only to player

Postby drool66 » 26 Nov 2021, 17:29

I see. It was for Nesting Grounds - I misunderstood the function and it seemed like a glaring error. Fixed, unpushed.
User avatar
drool66
Programmer
 
Posts: 1163
Joined: 25 Nov 2010, 22:38
Has thanked: 186 times
Been thanked: 267 times

Re: [fixed]Proliferate broken adds counters only to players

Postby Korath » 26 Nov 2021, 20:37

Looking at it again years after I wrote it, I don't think it needs to be passed src_player and src_card at all. They aren't used for anything except to pass to DIALOG(), and between also passing it DLG_FULLCARD(), DLG_WHO_CHOOSES(), DLG_HEADER(), and DLG_NO_STORAGE, I think dialog_impl() won't actually use them for anything.

(Heck, I'm just happy this wasn't caused by the hack I used to put off assigning AI values to the last few sets' counter types.)
User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times

Re: [fixed]Proliferate broken adds counters only to players

Postby drool66 » 28 Nov 2021, 02:50

Fixed in f7a02a4
User avatar
drool66
Programmer
 
Posts: 1163
Joined: 25 Nov 2010, 22:38
Has thanked: 186 times
Been thanked: 267 times


Return to Archived Reports

Who is online

Users browsing this forum: No registered users and 37 guests


Who is online

In total there are 37 users online :: 0 registered, 0 hidden and 37 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 37 guests

Login Form