It is currently 20 Apr 2024, 04:16
   
Text Size

[not quite fix]Curse of Echoes not countering correct spell

Report wrong Card behavior to get it fixed.
PLEASE ADD SAVEGAMES TO YOUR TOPIC !

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

[not quite fix]Curse of Echoes not countering correct spell

Postby gnomefry » 09 Jul 2020, 21:43

Describe the Bug:

Curse of Echoes isn't copying the other player's instants and sorceries.wrong

The enchantment lights up and allows you to activate it as the opponent casts an instant or sorcery, but without any resulting effect.

Savegame attached.

Which card behaved improperly?

Curse of Echoes

Which update are you using? (date, name)Which type? (duel, gauntlet, sealed deck)
version 6-2020 v3 a8bbff706 - gauntlet

What exactly should be the correct behavior/interaction?

Whenever enchanted player casts an instant or sorcery spell each other player may copy that spell and choose new targets for the copy they control.

Are any other cards possibly affected by this bug?

No.
Attachments
curseofechoes.rar
A savegame with Curse of Echoes in play and a Damnation in my hand. The AI has a counterspell in hand which it will use on the Damnation. Curse of Echoes doesn't allow you to copy the counterspell.
(2.23 KiB) Downloaded 105 times
Last edited by Aswan jaguar on 22 Jul 2020, 04:58, edited 6 times in total.
Reason: fixed
User avatar
gnomefry
Tester
 
Posts: 288
Joined: 28 Dec 2018, 00:44
Has thanked: 25 times
Been thanked: 24 times

Re: Curse of Echoes not copying

Postby drool66 » 10 Jul 2020, 05:31

Counterspells don't work well with Hive Mind either, yet they do with Twincast which uses the same copy_spell_from_stack()
User avatar
drool66
Programmer
 
Posts: 1163
Joined: 25 Nov 2010, 22:38
Has thanked: 186 times
Been thanked: 267 times

Re: Curse of Echoes not copying

Postby Aswan jaguar » 11 Jul 2020, 10:00

I am quite certain that in this case at least the issue is that you don't get to choose/change target and so while Curse of Echoes does copy Force of Will or any other counterspell, but still targets the same target the original spell did so it seems to not have an effect while it counters the original spell instead of countering like usual the last spell on stack.
Last edited by Aswan jaguar on 11 Jul 2020, 12:03, edited 2 times in total.
Reason: edit strikethrough wrong assumption
---
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: [confirmed]Curse of Echoes not countering correct spell

Postby drool66 » 12 Jul 2020, 06:56

Ok! Took me a couple of days but I solved it.

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

Re: [not quite fix]Curse of Echoes not countering correct sp

Postby drool66 » 14 Jul 2020, 22:25

Moving this back to bugs because I'm realizing it was working but for all the wrong reasons. Fixing the code to work for the "right" reasons breaks it. For reference, here's my code:
Code: Select all
int card_curse_of_echoes(int player, int card, event_t event){
/* CARD_ID_CURSE_OF_ECHOES   12157
Curse of Echoes   |4|U
Enchantment - Aura Curse
Enchant player
Whenever enchanted player casts an instant or sorcery spell, each other player may copy that spell and may choose new targets for the copy he or she controls.*/

   card_instance_t *instance = get_card_instance( player, card );
   int cursed_player = instance->targets[4].player;
   test_definition_t test;
   default_test_definition(&test, TYPE_SPELL);

   if( new_specific_spell_played(player, card, event, cursed_player, RESOLVE_TRIGGER_AI(player), &test) ){
      instance->targets[0].player = card_on_stack_controller;
      instance->targets[0].card = card_on_stack;

      if( in_play(player, card) && ! is_humiliated(player, card) ){
         target_definition_t td;
         counterspell_target_definition(player, card, &td, TYPE_SPELL);
         td.illegal_abilities = 0;
         if (counterspell_validate(player, card, &td, 0)){
            copy_spell_from_stack(player, instance->targets[0].player, instance->targets[0].card);
         }
         else{
            copy_spell_from_stack(player, trigger_cause_controller, trigger_cause);
         }
      }
   }
   if( !IS_GS_EVENT(player, card, event) && event != EVENT_SHOULD_AI_PLAY)
      return 0;

   return curse(player, card, event);
}
User avatar
drool66
Programmer
 
Posts: 1163
Joined: 25 Nov 2010, 22:38
Has thanked: 186 times
Been thanked: 267 times


Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 77 guests


Who is online

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

Login Form