Page 1 of 1

[confirmed]Perpetual Timepiece ability costs wrong

PostPosted: 18 Oct 2017, 07:52
by drool66
Describe the Bug:
Perpetual Timepiece charges {2} {T} for its first abilityfixed

Which card did behave improperly?
Perpetual Timepiece

Which update are you using? (date, name)Which type? (duel, gauntlet, sealed deck)
Manalink dev 778ccb5 version - duel

What exactly should be the correct behavior/interaction?
the cost for the first ability is {T}

Are any other cards possibly affected by this bug?
-

Re: [confirmed]Perpetual Timepiece ability costs wrong

PostPosted: 20 Oct 2017, 13:23
by Aswan jaguar
1- Also first ability can be chosen even if Perpetual Timepiece is tapped but it just shuffles the library (in fact acts like 2nd ability see 2nd bug below).fixed
2- Perpetual Timepiece 2nd ability doesn't shuffle any or all cards from your graveyard to library just shuffles library, it does get exiled.

Re: [confirmed]Perpetual Timepiece ability costs wrong

PostPosted: 06 Jun 2020, 17:15
by Aswan jaguar
Fixed activation issues of both abilities in commit 5fae5ca.
I don't understand how to fix the bug of 2nd ability that doesn't have an effect when it resolves.

Re: [confirmed]Perpetual Timepiece ability costs wrong

PostPosted: 06 Jun 2020, 20:25
by drool66
select_multiple_cards_from_graveyard (used in the activation) uses get_grave rather than graveyard_source, so the disconnect is between the activation & resolution referencing different data. Of all functions, this one is probably the one that would most benefit from using graveyard_source. Adding a graveyard_source of version of select_multiple_cards_from_graveyard (and therefore also turn_card_in_grave_face_up/down) is on my list of things to do, since I will need to do it for the Escape mechanic.

Re: [confirmed]Perpetual Timepiece ability costs wrong

PostPosted: 07 Jun 2020, 10:21
by Aswan jaguar
drool66 wrote:select_multiple_cards_from_graveyard (used in the activation) uses get_grave rather than graveyard_source, so the disconnect is between the activation & resolution referencing different data. Of all functions, this one is probably the one that would most benefit from using graveyard_source. Adding a graveyard_source of version of select_multiple_cards_from_graveyard (and therefore also turn_card_in_grave_face_up/down) is on my list of things to do, since I will need to do it for the Escape mechanic.
I saw your message on the code about this, can you enlighten the differences and why we need both versions and not only select_multiple_cards_from_graveyard with graveyard_source?

Re: [confirmed]Perpetual Timepiece ability costs wrong

PostPosted: 08 Jul 2020, 21:12
by drool66
Just seeing this reply now.

I'm sure you've seen the difference between get_grave & graveyard_source at the top of deck.c; the point is when cards are removed from the GY, get_grave changes but graveyard_source does not. select_multiple_cards_from_graveyard solves this by replacing each card selected with a 904 - face-down card, but only while the player is selecting. The problem arises when something removes cards from the GY between activation & resolution - int that case get_grave (and therefore select_multiple_cards_from_graveyard) will reference the wrong data and either return the wrong cards or glitch. My point is basically that with the functions we have you can't select multiple cards without using the mostly inferior get_grave, and the more cards you're selecting the greater chance for error.

The problem with Perpetual Timepiece is just that its activation uses select_multiple_cards_from_graveyard (ie. get_grave, via new_select_a_card) but its resolution uses validate_target_from_grave_source, that's all (at least I think so).