It is currently 15 Jul 2025, 06:51
   
Text Size

[Fixed]AI target Permanent=Planeswalker bad param & crash

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

[Fixed]AI target Permanent=Planeswalker bad param & crash

Postby Althuna » 10 Apr 2024, 04:54

I have savegame. It is an autosave from gauntlet mode (not with challenges).
Attachments
New WinRAR archive.rar
(3.43 KiB) Downloaded 266 times
Last edited by Aswan jaguar on 05 Jun 2024, 14:05, edited 3 times in total.
Reason: fixed
Althuna
 
Posts: 479
Joined: 26 Jul 2011, 00:23
Has thanked: 100 times
Been thanked: 17 times

Re: [confirm]AI target Permanent=Planeswalker bad param & cr

Postby Aswan jaguar » 10 Apr 2024, 15:15

The issue happens as AI wants to target opponent's Planeswalker with Utter End - EDIT: and at the same time attack with creatures.
It will happen with any card that can target a permanent and AI selects to target a Planeswalker.(at least the ones that destroy or exile their targets that I have tested).
Happens only to AI. When AI targets a planeswalker and target type has been set to TYPE_PLANESWALKER so card rules text is "target a planeswalker" it works fine.
The error produced: | Open
bad parameters
get_card_instance(0, -2)
0: 0x026CFB58
1: 0x026D679E
2: 0x0271E27C
3: 0x026AAE72
4: 0x027448D5
5: 0x0271BE5C
6: 0x0271BEDA
7: 0x0271D357
8: 0x00435A13
9: 0x004770E3
10: 0x026E8D21
11: 0x026BF222
12: 0x026EF2D4
13: 0x0047902C
14: 0x004946E9
15: 0x7C80B729
Last edited by Aswan jaguar on 05 Jun 2024, 14:04, edited 2 times in total.
Reason: add edit
---
Trying to squash some bugs and playtesting.
User avatar
Aswan jaguar
Super Tester Elite
 
Posts: 8129
Joined: 13 May 2010, 12:17
Has thanked: 748 times
Been thanked: 477 times

Re: [confirm]AI target Permanent=Planeswalker bad param & cr

Postby drool66 » 02 Jun 2024, 18:40

This particular bug goes through damage_effects.c::effect_damage() - I don't know how the damage_creature is sending -2 in targets[4].card, but the check early on should be "tc > -1", not "tc != -1", as should the various checks to targets[4].card (as should most or all of the various param checks all over the place in Manalink...)
User avatar
drool66
Programmer
 
Posts: 1185
Joined: 25 Nov 2010, 22:38
Has thanked: 187 times
Been thanked: 280 times

Re: [confirm]AI target Permanent=Planeswalker bad param & cr

Postby Aswan jaguar » 05 Jun 2024, 14:02

Fixed and tested in commit 36167cd, changed only the first check to targets[4].card.
It was some interaction between Utter End ( or cards like that as I say above ) and a creature ( certainly with a token creature, didn't test with just creature ) that AI was thinking to attack with it, and there was a planeswalker on human's battlefield. If either no creatures to attack or no Utter End and such no bug.
---
Trying to squash some bugs and playtesting.
User avatar
Aswan jaguar
Super Tester Elite
 
Posts: 8129
Joined: 13 May 2010, 12:17
Has thanked: 748 times
Been thanked: 477 times

Re: [Fixed]AI target Permanent=Planeswalker bad param & cras

Postby drool66 » 11 Jun 2024, 05:35

Fixed in 08b94da
EDIT: this fix is for bug [fixed]Bad parameters - validate counterslell crashes game and not for the above - edited
Last edited by Aswan jaguar on 29 Jun 2024, 09:58, edited 1 time in total.
Reason: edit
User avatar
drool66
Programmer
 
Posts: 1185
Joined: 25 Nov 2010, 22:38
Has thanked: 187 times
Been thanked: 280 times


Return to Pending Reports

Who is online

Users browsing this forum: No registered users and 3 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 guests (based on users active over the past 10 minutes)
Most users ever online was 5050 on 26 Jun 2025, 06:02

Users browsing this forum: No registered users and 3 guests

Login Form