It is currently 24 Apr 2024, 01:24
   
Text Size

[confirmed]Cinderhaze Wretch AI no use untap abil,even die

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

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

[confirmed]Cinderhaze Wretch AI no use untap abil,even die

Postby Aswan jaguar » 03 Oct 2016, 14:31

Describe the Bug:
AI attacks with Saddleback Lagac and Cinderhaze Wretch both with 2 +1/+1 counters on them.If I block Cinderhaze Wretch with my Sakura-Tribe Elder or any creature with power above 0 (tested also with Memnite and with Balduvian Bears)game crashes.It doesn't crash if I block with Goldenglow Moth that has 0 power.
crash log report | Open
Event Type: Error
Event Source: Application Error
Event Category: None
Event ID: 1000
Date: 3/10/2016
Time: 4:58:15 μμ
User: N/A
Computer: ASWAN_JAGUAR
Description:
Faulting application magic.exe, version 7.0.0.0, faulting module unknown, version 0.0.0.0, fault address 0x00000000.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 41 70 70 6c 69 63 61 74 Applicat
0008: 69 6f 6e 20 46 61 69 6c ion Fail
0010: 75 72 65 20 20 6d 61 67 ure mag
0018: 69 63 2e 65 78 65 20 37 ic.exe 7
0020: 2e 30 2e 30 2e 30 20 69 .0.0.0 i
0028: 6e 20 75 6e 6b 6e 6f 77 n unknow
0030: 6e 20 30 2e 30 2e 30 2e n 0.0.0.
0038: 30 20 61 74 20 6f 66 66 0 at off
0040: 73 65 74 20 30 30 30 30 set 0000
0048: 30 30 30 30 0d 0a 0000..
and in words:
Data:
0000: 6c707041 74616369 206e6f69 6c696146
0010: 20657275 67616d20 652e6369 37206578
0020: 302e302e 6920302e 6e75206e 776f6e6b
0030: 2e30206e 2e302e30 74612030 66666f20
0040: 20746573 30303030 30303030 0a0d

Which card did behave improperly ?
Cinderhaze Wretch?

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 ?
No crash if I block AI's Cinderhaze Wretch.

Are any other cards possibly affected by this bug ?
-
Attachments
crash block 2 cr.rar
(2.39 KiB) Downloaded 153 times
Last edited by Aswan jaguar on 14 Oct 2019, 14:29, edited 3 times in total.
Reason: confirmed bug by Bagate-me strikethrough fixed-rename to current bug
---
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]Cinderhaze Wretch AI crash thing?

Postby Aswan jaguar » 14 Oct 2019, 14:24

Fixed in commit c1cafc75.
DLG_RANDOM crashed even if I set 1st priority > 1000000 so AI
selects only that and even if I set 2nd priority a negative value -1 so
it can't select the 2nd one. (this is supposed to work however right?)
DLG_RANDOM crashed anyway I tried unless it was together with DLG_NO_STORAGE.

AI isn't able (I don't know if it was able as designed earlier but crashed) to activate the untap ability if tapped: to block a creature that will set AI's life to 0 or less if not blocked or do it to block and kill opponent's creature or to fizzle an Assassinate that targets the tapped Cinderhaze Wretch and so save it if 3/2 or bigger of course.

Current code with only DLG_RANDOM substituted by DLG_NO_STORAGE:
Code: Select all
int card_cinderhaze_wretch(int player, int card, event_t event){
/*
Cinderhaze Wretch |4|B
Creature — Elemental Shaman 3/2
{T}: Target player discards a card. Activate this ability only during your turn.
Put a -1/-1 counter on Cinderhaze Wretch: Untap Cinderhaze Wretch.
*/
   if( ! IS_GAA_EVENT(event) ){
      return 0;
   }

   target_definition_t td;
   default_target_definition(player, card, &td, 0);
   td.zone = TARGET_ZONE_PLAYERS;;

   card_instance_t *instance = get_card_instance(player, card);

   enum{
      CHOICE_DISCARD = 1,
      CHOICE_UNTAP
   };

   if( event == EVENT_CAN_ACTIVATE ){
      if( generic_activated_ability(player, card, event, GAA_CAN_TARGET | GAA_IN_YOUR_TURN | GAA_UNTAPPED, MANACOST0, 0, &td, NULL) )
      {
         return 1;
      }
      return generic_activated_ability(player, card, event, 0, MANACOST0, 0, NULL, NULL);
   }

   if(event == EVENT_ACTIVATE ){
      int abils[3] = {
                  0,
                  generic_activated_ability(player, card, EVENT_CAN_ACTIVATE, GAA_CAN_TARGET | GAA_IN_YOUR_TURN | GAA_UNTAPPED,
                                       MANACOST0, 0, &td, NULL),
                  generic_activated_ability(player, card, EVENT_CAN_ACTIVATE, 0, MANACOST0, 0, NULL, NULL)
      };
      int priority_untap = is_tapped(player, card) && get_toughness(player, card) > 1 ? 10 : 1;
      int choice = DIALOG(player, card, event, DLG_NO_STORAGE,
                     "Target player discard", abils[1], 5,
                     "Untap Cinderhaze Wretch", abils[2], priority_untap);
      if( ! choice ){
         spell_fizzled = 1;
         return 0;
      }
      if( choice == CHOICE_DISCARD ){
         return generic_activated_ability(player, card, event, GAA_CAN_TARGET | GAA_IN_YOUR_TURN | GAA_UNTAPPED, MANACOST0, 0,
                                 &td, "TARGET_PLAYER");
      }
      if( choice == CHOICE_UNTAP ){
         generic_activated_ability(player, card, event, 0, MANACOST0, 0, NULL, NULL);
         if( spell_fizzled != 1 ){
            add_counter(player, card, COUNTER_M1_M1);
         }
      }
   }

   if( event == EVENT_RESOLVE_ACTIVATION ){
      if( instance->info_slot == CHOICE_DISCARD && valid_target(&td) ){
         discard(instance->targets[0].player, 0, player);
      }
      if( instance->info_slot == CHOICE_UNTAP ){
         untap_card(instance->parent_controller, instance->parent_card);
      }
   }

   return 0;
}
---
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


Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 26 guests


Who is online

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

Login Form