It is currently 08 Jul 2021, 00:17
   
Text Size

[fixed/closed]Consuming Vapors

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

[fixed/closed]Consuming Vapors

Postby HarlequinCasts » 28 Jun 2013, 09:14

Describe the Bug:
When taking multiple extra turns, opponent's exiled rebound spells will rebound during your upkeep.

In the attached replay you can see I have Time Vault / Voltaic Key out and am taking multiple turns. The AI's Consuming Vapors rebounds at the start of my first extra turn.

Which card did behave improperly ?
Consuming Vapors (Possibly all rebound spells)

Which update are you using?(date,name)Which type(Duel,Gauntlet,Sealed Deck)
PDMNv2
Gauntlet

What exactly should be the correct behavior/interaction ?
I should only rebound during their upkeep.

Are any other cards possibly affected by this bug ?
Anything with rebound perhaps.
Attachments
consuming vapors.zip
First extra turn, opponent's consuming vapors rebounds
(3.23 KiB) Downloaded 93 times
Last edited by BAgate on 14 Jan 2014, 02:41, edited 3 times in total.
Reason: closed
User avatar
HarlequinCasts
 
Posts: 917
Joined: 07 May 2013, 14:33
Has thanked: 68 times
Been thanked: 30 times

Re: Consuming Vapors (Possibly all rebound spells)

Postby stassy » 28 Jun 2013, 12:14

confirmed, also on player side when a time walk effect trigger, nothing happen with the Consuming Vapors legacy card until the time walk end, it will trigger then at AI upkeep phase
stassy
Moderator
 
Posts: 5274
Joined: 25 Feb 2009, 07:06
Has thanked: 471 times
Been thanked: 337 times

Re: [confirmed]Consuming Vapors

Postby Gargaroz » 28 Jun 2013, 18:52

"Time walk" effects are entirely hardcoded, so I don't know what's actually happening.
Korath, can you help us ?
----
- Current / medium term task: adjusting the code for making Misdirection and such usable
- Long term task: inserting all the good stuff I left out from the "Golden Years" mod
Gargaroz
Programmer
 
Posts: 7095
Joined: 06 Nov 2009, 11:11
Has thanked: 82 times
Been thanked: 593 times

Re: [confirmed]Consuming Vapors

Postby Korath » 28 Jun 2013, 20:24

I've been poking at the overall phase sequence, but I won't have anything practical for a long time still.

Rebound should be fixable without that, though. I'll look into it.
---
OK, I see two bugs here.

The first is that spells with rebound cast by a player on his turn always activate at the start of the second upkeep phase after, no matter whose upkeeps they are; spells cast on the opponent's turn always activate at the start of the next upkeep phase.
fix | Open
Code: Select all
int rebound_legacy(int player, int card, event_t event){
    card_instance_t *instance = get_card_instance(player, card);

    if( upkeep_trigger(player, card, event) && instance->targets[0].player == current_turn ){
        if( check_rfg(player, instance->targets[0].card) ){
            int fake = get_internal_card_id_from_csv_id(instance->targets[0].card);
            if( can_legally_play(player, fake) ){
                char buffer[100];
                card_ptr_t* c = cards_ptr[ instance->targets[0].card ];
                scnprintf(buffer, 100, " Rebound %s\n Pass", c->name );
                int choice = do_dialog(player, player, card, -1, -1, buffer, 0);
                if( choice == 0){
                    remove_card_from_rfg(player, instance->targets[0].card);
                    play_spell_for_free(player, instance->targets[0].card);
                }
            }
        }
        kill_card(player, card, KILL_REMOVE);
    }

    return 0;

}

void rebound(int player, int card){

    if( current_phase > PHASE_UPKEEP ){
        int id = get_id(player, card);
        int legacy = create_legacy_effect(player, card, &rebound_legacy );
        card_instance_t *rebounded = get_card_instance(player, legacy);
        rebounded->targets[0].card = id;
        rebounded->targets[0].player = player;
        kill_card(player, card, KILL_REMOVE);
    }
    else{
         kill_card(player, card, KILL_DESTROY);
    }
}
The second is that, instead of checking to see if they were cast from their player's hand, they check to see if they were cast after upkeep. So, if you cast Emerge Unscathed or another instant-speed rebound spell during upkeep, you won't get the rebound effect. You will get the rebound effect if you cast it from the graveyard with something like Recoup or Dralnu, Lich Lord, from your library with something like Temporal Aperture or Sunforger, from exile with something like Spelljack or Isochron Scepter, or from your opponent's library or hand with something like Knowledge Exploitation or Mindleech Mass.

I don't know how to check for that; played_for_free() isn't right (it doesn't matter whether you paid the mana cost or not), and not_played_from_hand() looks like it only works for put_into_play(), which most of these cases don't use.
User avatar
Korath
DEVELOPER
 
Posts: 3522
Joined: 02 Jun 2013, 05:57
Has thanked: 491 times
Been thanked: 1037 times

Re: [confirmed]Consuming Vapors

Postby Gargaroz » 29 Jun 2013, 12:33

Well, actually since almost all the cards you mentioned uses "play_for_free" or "copy_spell", I could add the "not_played_from_hand()" in these two functions too.
There would be some errors too, but a lot less I suspect : the only case is a card that allows you to play a spell from your hand for free, there aren't too many.
I'll try this kind of fix.
----
- Current / medium term task: adjusting the code for making Misdirection and such usable
- Long term task: inserting all the good stuff I left out from the "Golden Years" mod
Gargaroz
Programmer
 
Posts: 7095
Joined: 06 Nov 2009, 11:11
Has thanked: 82 times
Been thanked: 593 times

Re: [confirmed]Consuming Vapors

Postby Korath » 08 Dec 2013, 02:03

Should be fixed properly in PtT.
User avatar
Korath
DEVELOPER
 
Posts: 3522
Joined: 02 Jun 2013, 05:57
Has thanked: 491 times
Been thanked: 1037 times


Return to Archived Reports

Who is online

Users browsing this forum: Bing [Bot] and 4 guests


Who is online

In total there are 5 users online :: 1 registered, 0 hidden and 4 guests (based on users active over the past 10 minutes)
Most users ever online was 1922 on 07 Jun 2021, 06:01

Users browsing this forum: Bing [Bot] and 4 guests

Login Form