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

[fix/closed]Nissa's Judgment target timing & errors

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

[fix/closed]Nissa's Judgment target timing & errors

Postby Aswan jaguar » 19 Oct 2016, 15:09

Describe the Bug:
Nissa's Judgment when cast prompts for an opponent's creature to deal damage to but when opponent's creatures are found illegal targets only your creatures are found legal.If you target your own crature then you are prompt to select 2 to support them,they get the counters and no damage is done.
However AI can make it work sometimes.See savegame "working".
Which card did behave improperly ?
Nissa's Judgment

Which update are you using?(date,name)Which type(Duel,Gauntlet,Sealed Deck)
Manalink 2016/08/27: Eldritch Moon v2, duel

What exactly should be the correct behavior/interaction ?
Nissa's Judgment target opponent's creature to deal damage to finds opponent's creatures legal targets.

Are any other cards possibly affected by this bug ?
-
Attachments
nissa's judjement working.rar
(2.37 KiB) Downloaded 175 times
nissa's judjement choose own.rar
(2.4 KiB) Downloaded 161 times
Last edited by Aswan jaguar on 21 Sep 2021, 13:13, edited 4 times in total.
Reason: fixed/closed
---
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: [co]Nissa's Judgment finds illegal opponent's crit to da

Postby Aswan jaguar » 24 Jan 2019, 11:05

I fixed both bugs by changing the "td.allowed_controller" to 1-player (which is the opponent right?) but I get the following errors:
error | Open
bad parameters
get_card_instance(-1, -1)
0: 0x024E0C88
1: 0x0249816E
2: 0x024E7340
3: 0x02095123
4: 0x020A3807
5: 0x024F06B5
6: 0x024CEBED
7: 0x024CF316
8: 0x004368C6
9: 0x024A5FC7
10: 0x0043BFAA
11: 0x004399BD
12: 0x0047902C
13: 0x004946E9
14: 0x7C80B729

code | Open
Code: Select all
int card_nissas_judgement(int player, int card, event_t event){
   /* Nissa's Judgment   |4|G   0x200e68e
    * Sorcery
    * Support 2.
    * Choose up to one target creature an opponent controls. Each creature you control with a +1/+1 counter on it deals damage equal
    * to its power to that creature. */

   if( ! IS_GS_EVENT(player, card, event) ){
      return 0;
   }

   target_definition_t td;
   default_target_definition(player, card, &td, TYPE_CREATURE);
   td.allowed_controller = td.preferred_controller = 1-player;
   td.allow_cancel = 2; //"Done" button

   card_instance_t *instance = get_card_instance( player, card);

   if( event == EVENT_RESOLVE_SPELL ){
      int t_card = -1;
      if( instance->number_of_targets == 1 && valid_target(&td) ){
         t_card = instance->targets[0].card;
      }

      support(player, card, 2);

      if( t_card > -1 ){
         int c;
         for(c=active_cards_count[player]-1; c>-1; c--){
            if( in_play(player, c) && is_what(player, c, TYPE_CREATURE) && count_1_1_counters(player, c) ){
               damage_creature(1-player, t_card, get_power(player, c), player, c);
            }
         }
      }

      kill_card(player, card, KILL_DESTROY);
   }
   return generic_spell(player, card, event, GS_OPTIONAL_TARGET | GS_LITERAL_PROMPT, &td, "Select target creature an opponent controls.", 1, NULL);
}
Any ideas what else needs to be changed?

Fixed allowed controller in commit 7fa4a4a1.
Last edited by Aswan jaguar on 27 Aug 2019, 17:12, edited 1 time in total.
Reason: added the commit finally
---
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: [co]Nissa's Judgment finds illegal opponent's crit to da

Postby Korath » 24 Jan 2019, 16:46

Besides making it choose its targets at announcement instead of midway through resolution?

support() blithely assumes its card's ->number_of_targets == 0. Clear that first and at least it won't crash.
User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times

Re: [co]Nissa's Judgment target timing & errors

Postby drool66 » 18 Sep 2021, 16:26

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 34 guests


Who is online

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

Login Form