It is currently 09 Jun 2025, 19:13
   
Text Size

Bug Reports (snapshot builds)

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Re: Bug Reports (snapshot builds)

Postby Agetian » 21 Dec 2016, 15:23

disferente wrote:Amoeboid Changeling, when cloned by Progenitor Mimic does note get the benefit of having Changeling ability.
Version 1.5.58.006
Android
This is indeed an issue with cloning and the keyword Changeling in general. The relevant static ability does not get copied over because getStaticAbilityStrings does not return it as a part of an array. :/

It's related to the fact that when adding keyword static abilities, the game does not add the static ability string which cloning later relies upon. I tried to fix this in r32755, hopefully it doesn't break anything (I don't think it should).

- Agetian
Last edited by Agetian on 21 Dec 2016, 15:47, edited 1 time in total.
Agetian
Programmer
 
Posts: 3487
Joined: 14 Mar 2011, 05:58
Has thanked: 683 times
Been thanked: 569 times

Re: Bug Reports (snapshot builds)

Postby Hanmac » 21 Dec 2016, 15:46

@Agetian: keywords are my part of doing, I will check it out later today when I am at home.
(Also noticed that the cloned shows the keyword twice meaning something is wrong there too)
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 21 Dec 2016, 15:48

Hanmac wrote:@Agetian: keywords are my part of doing, I will check it out later today when I am at home.
(Also noticed that the cloned shows the keyword twice meaning something is wrong there too)
Ok, please take a look, I tried fixing it in r32755 but I'm not sure whether this is how it should be or not :/ I'll be glad if you took a look when you have an opportunity. ;)

P.S. My change does not change the doubling of the keyword in the description (it still shows up twice).

- Agetian
Agetian
Programmer
 
Posts: 3487
Joined: 14 Mar 2011, 05:58
Has thanked: 683 times
Been thanked: 569 times

Re: Bug Reports (snapshot builds)

Postby Hanmac » 21 Dec 2016, 15:53

Agetian wrote:
Hanmac wrote:@Agetian: keywords are my part of doing, I will check it out later today when I am at home.
(Also noticed that the cloned shows the keyword twice meaning something is wrong there too)
Ok, please take a look, I tried fixing it in r32755 but I'm not sure whether this is how it should be or not :/ I'll be glad if you took a look when you have an opportunity. ;)

P.S. My change does not change the doubling of the keyword in the description (it still shows up twice).

- Agetian
It probably should hide them with secondary or look why that is ignored. (Or use the ability for description instead of keyword)

Or do a total refactor to remove the need of addStaticAbilityString
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 21 Dec 2016, 18:16

@ Hanmac: Thanks for taking care of hiding the Secondary keyword ability descriptions. :) Looks like a part of the Splice onto X code was accidentally pulled in into Card though, not sure if it was intentional since it looks like it can cause issues until the entire code for Splice is submitted...

- Agetian
Agetian
Programmer
 
Posts: 3487
Joined: 14 Mar 2011, 05:58
Has thanked: 683 times
Been thanked: 569 times

Re: Bug Reports (snapshot builds)

Postby Hanmac » 21 Dec 2016, 18:34

Agetian wrote:@ Hanmac: Thanks for taking care of hiding the Secondary keyword ability descriptions. :) Looks like a part of the Splice onto X code was accidentally pulled in into Card though, not sure if it was intentional since it looks like it can cause issues until the entire code for Splice is submitted...

- Agetian
stupid me, wasn't careful enough ;/

good that the other part was already finish so i can push it too.
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 23 Dec 2016, 06:23

Aetherworks Marvel causes the card that is played via its tap activated ability to be shuffled back into the library instead of going into the graveyard.

FIXED: r32722.

- Agetian
Agetian
Programmer
 
Posts: 3487
Joined: 14 Mar 2011, 05:58
Has thanked: 683 times
Been thanked: 569 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 23 Dec 2016, 19:32

Something very strange is happening with some spells fizzling.
For example, absolutely every spell targeting Kolaghan, the Storm's Fury will fizzle when Kolaghan is the opponent's commander (tried this with Crippling Chill, Force Away and many different things).
Trying to debug this indicates that at MagicStack::hasFizzled, at line 653, the relevant check for the time stamp fails (card's timestamp does not equal the current card state timestamp?... The targeted card stamp shows up as -1 while the one in game.getCardState(card) is a positive number of some kind).

It looks like it has something to do with the way AI uses the Dash mechanic. It if tries to consider Dashing Kolaghan from its Commander zone, but then thinks better of it and just casts it, something wrong happens to the timestamp of Kolaghan (as described above) and he becomes basically untargetable by spells. :/ If I add a restriction to PermanentCreatureAi where the AI only uses Dash for cards in its hand, then things work correctly.

FIXED: r32777-32778.

- Agetian
Last edited by Agetian on 23 Dec 2016, 20:13, edited 2 times in total.
Agetian
Programmer
 
Posts: 3487
Joined: 14 Mar 2011, 05:58
Has thanked: 683 times
Been thanked: 569 times

Re: Bug Reports (snapshot builds)

Postby Hanmac » 23 Dec 2016, 20:04

Arg yeah I have seen such bugs before, but can't debug them now because i am already sleeping xD

Hmm what you could look if some of the objects it does check for fizzle is a LKI (i think that was one of the reasons that LKI does not store the Zone)
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 23 Dec 2016, 20:09

Hanmac wrote:Arg yeah I have seen such bugs before, but can't debug them now because i am already sleeping xD

Hmm what you could look if some of the objects it does check for fizzle is a LKI (i think that was one of the reasons that LKI does not store the Zone)
Hehe yeah, remembering the last time we encountered a similar time stamp issue, LKI was the first thing I thought of too (even made sure I wasn't copying the zone anymore), but it looks like this time it actually has to do with the way the AI simulates Dash (it copies the card to simulate combat), originally it did not create a new ID for the copied object and that must have messed up the time stamp check later on. I made it create a new object with a new ID and that seemingly fixes the issue. :)

- Agetian
Agetian
Programmer
 
Posts: 3487
Joined: 14 Mar 2011, 05:58
Has thanked: 683 times
Been thanked: 569 times

Re: Bug Reports (snapshot builds)

Postby Hanmac » 23 Dec 2016, 20:17

Ah the Dash thing and New id :/
Was probably a Bug from mine because I tried it to reduce the creation of New objects with new ids. (Like using LKI copy instead of copy card if able)

Hm didn't remember it, but is there a reason why LKI doesn't work there?

PS: When doing "order SpellAbility" for AI should that be in PlayerControllerAI or AIController?
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 23 Dec 2016, 20:21

Hanmac wrote:Ah the Dash thing and New id :/
Was probably a Bug from mine because I tried it to reduce the creation of New objects with new ids. (Like using LKI copy instead of copy card if able)

Hm didn't remember it, but is there a reason why LKI doesn't work there?

PS: When doing "order SpellAbility" for AI should that be in PlayerControllerAI or AIController?
Hmm I'm not sure about LKI, to be honest... Maybe since the copied card is changing its zone temporarily LKI wasn't viable? :/

Ahh, PlayerControllerAi vs. AiController always gets me confused as well. Most ordering functions (including ordering simultaneous SAs) are in PlayerControllerAi though, so if I were to pick one of them, I'd probably pick PlayerControllerAi for that reason (unless there are other considerations).

- Agetian
Agetian
Programmer
 
Posts: 3487
Joined: 14 Mar 2011, 05:58
Has thanked: 683 times
Been thanked: 569 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 23 Dec 2016, 20:43

Looks like it works with LKICopy by the way, I set it to that and it looks good.
I found a different issue with Dash though: if the AI Dashes a certain creature, it then refuses to cast it for full mana cost later on (and it just won't cast it at all no matter how much mana it has). The simulation AI, if enabled, will crash with a game copy error, and the standard AI will just not cast the creature no matter what. :/

EDIT: Fixed in r32780. Please take a look though, there was an extra SVar set for Dash which was never cleared from the card and also seemed to have no functional effect whatsoever except making the AI believe that the card leaves play at EOT in general (Dash or no Dash). Removing it altogether makes the AI correctly cast the card (both dash and non-dash) and also prevents a game copy error for simulation AI. Is that SVar really needed for anything? :/ If it is, where and when should it be properly cleared so the AI doesn't think that the card will leave battlefield at EOT even when not Dashed?

- Agetian
Agetian
Programmer
 
Posts: 3487
Joined: 14 Mar 2011, 05:58
Has thanked: 683 times
Been thanked: 569 times

Re: Bug Reports (snapshot builds)

Postby Hanmac » 24 Dec 2016, 06:26

The reason for why Dash had EndOfTurnLeavePlay is because without it i have seen the AI play a creature with Dash, attach Equipment, does not attack and the equipment does drop off.

Hm maybe the SVar need to be reset or something.
(That might be the bug)

(At some place it's also used to check if the creature was put onto the battlefield with Dash)

Hm it might work without it, but it might have some problems too.
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 24 Dec 2016, 06:32

Hmm, then probably it then needs to be cleared off of the card when the card leaves the battlefield, but that's tricky because even if we added a clean-up to the EOT trigger, what if the card is destroyed (via direct damage)? That would not fire the EOT trigger and thus will miss the SVar clean-up...

EDIT: fixed in r32781. I implemented a mechanism that removes the temporary SVar from a Dashed creature when it changes zone and thus leaves the Battlefield. This, however, required me to actually add a mechanism to delete SVars from a Card object.

- Agetian
Agetian
Programmer
 
Posts: 3487
Joined: 14 Mar 2011, 05:58
Has thanked: 683 times
Been thanked: 569 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 61 guests

cron

Who is online

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

Login Form