It is currently 19 Apr 2024, 08:17
   
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 » 27 Nov 2015, 19:29

In r30407 I fixed an issue where the assignBlockers AI method tries to cast PlayerControllerHuman to PlayerControllerAi from time to time. However, I was unable to figure out why this method is even called when the "ai" variable is apparently set to the human player (?) - not sure if maybe there's something up with that. At any rate, currently masked by testing that "ai" really contains a reference to the AI player. Please take a look if possible.

- Agetian
Agetian
Programmer
 
Posts: 3471
Joined: 14 Mar 2011, 05:58
Has thanked: 676 times
Been thanked: 561 times

Re: Bug Reports (snapshot builds)

Postby Sloth » 27 Nov 2015, 21:43

Agetian wrote:In r30407 I fixed an issue where the assignBlockers AI method tries to cast PlayerControllerHuman to PlayerControllerAi from time to time. However, I was unable to figure out why this method is even called when the "ai" variable is apparently set to the human player (?) - not sure if maybe there's something up with that. At any rate, currently masked by testing that "ai" really contains a reference to the AI player. Please take a look if possible.
Thanks Agetian. I think i remember someone added a function to the AI attack controller where the AI simulates the human blocking when attacking (which is also quite suspicious to cause slowdowns).
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 28 Nov 2015, 04:51

@ Sloth: Ah, that makes sense! Ok, then my fix should be correct. :) Glad to help!

- Agetian
Agetian
Programmer
 
Posts: 3471
Joined: 14 Mar 2011, 05:58
Has thanked: 676 times
Been thanked: 561 times

Re: Bug Reports (snapshot builds)

Postby excessum » 29 Nov 2015, 03:42

The fight ability of Dromoka's Command when used by the AI is broken. The second target is not copied and it resolves as "blah fights unknown".

This appears to be an issue with CardFactory.copySpellAbility() failing to copy the target and/or sub-sub-ability of the CharmEffect (charm -> pump -> fight). When I implemented the AI for Dromoka's Command, I kludged this by forcing the fight effect as the first choice (CharmAi.java:119) which was broken by the update to CharmEffect from r30334.
excessum
 
Posts: 177
Joined: 21 Oct 2013, 02:30
Has thanked: 0 time
Been thanked: 19 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 29 Nov 2015, 06:31

excessum wrote:The fight ability of Dromoka's Command when used by the AI is broken. The second target is not copied and it resolves as "blah fights unknown".

This appears to be an issue with CardFactory.copySpellAbility() failing to copy the target and/or sub-sub-ability of the CharmEffect (charm -> pump -> fight). When I implemented the AI for Dromoka's Command, I kludged this by forcing the fight effect as the first choice (CharmAi.java:119) which was broken by the update to CharmEffect from r30334.
I think I fixed this in r30412. You're right, the targeting information at the deeper levels (sub-subabilities) was not retained, I fixed this by extending the "copy targets" code in CharmEffect. I think that copySpellAbility should not copy targets as such because it's meant to only clone the SA itself and provide a "raw" version of it, as far as I understand, so I think it's best fixed locally in CharmEffect...

- Agetian
Agetian
Programmer
 
Posts: 3471
Joined: 14 Mar 2011, 05:58
Has thanked: 676 times
Been thanked: 561 times

Re: Bug Reports (snapshot builds)

Postby Marek14 » 29 Nov 2015, 08:01

Agetian wrote:
excessum wrote:The fight ability of Dromoka's Command when used by the AI is broken. The second target is not copied and it resolves as "blah fights unknown".

This appears to be an issue with CardFactory.copySpellAbility() failing to copy the target and/or sub-sub-ability of the CharmEffect (charm -> pump -> fight). When I implemented the AI for Dromoka's Command, I kludged this by forcing the fight effect as the first choice (CharmAi.java:119) which was broken by the update to CharmEffect from r30334.
I think I fixed this in r30412. You're right, the targeting information at the deeper levels (sub-subabilities) was not retained, I fixed this by extending the "copy targets" code in CharmEffect. I think that copySpellAbility should not copy targets as such because it's meant to only clone the SA itself and provide a "raw" version of it, as far as I understand, so I think it's best fixed locally in CharmEffect...

- Agetian
The thing is that all spell/ability copying effects actually DO copy the targets and THEN they offer optional retarget. For example, if the original target is invalid (like when you copy opponent's "target opponent spell" targeting you), you are allowed to keep the invalid target unchanged (and you have to, if there's no other legal target).
Marek14
Tester
 
Posts: 2759
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 296 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 29 Nov 2015, 08:53

@ Marek: Hmm, I'm not sure if the change is better done in copySpellAbility then, but it kind of depends on how that method (copySpellAbility) is actually used internally :/ I'll probably leave this to someone more familiar with the relevant code (Card Factory, in particular).

- Agetian
Agetian
Programmer
 
Posts: 3471
Joined: 14 Mar 2011, 05:58
Has thanked: 676 times
Been thanked: 561 times

Re: Bug Reports (snapshot builds)

Postby excessum » 29 Nov 2015, 13:18

Agetian wrote:@ Marek: Hmm, I'm not sure if the change is better done in copySpellAbility then, but it kind of depends on how that method (copySpellAbility) is actually used internally :/ I'll probably leave this to someone more familiar with the relevant code (Card Factory, in particular).

- Agetian
Yeah those were exactly my concerns when I was debugging the crash...

Not sure if this is related but the put counters ability of Abzan Charm is giving an NPE because the TargetRestrictions has no dividedMap for some reason.
excessum
 
Posts: 177
Joined: 21 Oct 2013, 02:30
Has thanked: 0 time
Been thanked: 19 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 29 Nov 2015, 14:41

excessum wrote:Not sure if this is related but the put counters ability of Abzan Charm is giving an NPE because the TargetRestrictions has no dividedMap for some reason.
Yeah, indeed, it was related. I fixed it by extending the previous fix related to preserving targeting information. Like with the previous fix, the relevant code portion is open for update if necessary by anyone competent in the card factory code.

- Agetian
Agetian
Programmer
 
Posts: 3471
Joined: 14 Mar 2011, 05:58
Has thanked: 676 times
Been thanked: 561 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 01 Dec 2015, 06:25

Something might be odd with the Conduit of Ruin's ability "the first creature spell you cast every turn costs {2} less to cast". I can't yet understand the pattern, but it seems to sometimes be rather liberal with understanding what exactly to reduce the cost for. For instance, on one of my turns I cast practically every spell that cast 2 or less for free. No other cost-reducing card was present on the battlefield. Sometimes this does not seem to happen, which makes it difficult to reproduce. This might be related to using "Auto" to tap mana, by the way, as in all cases when this happened I used the "Auto" button.

Another clue is that the following message seems to appear in the console from time to time when Conduit of Ruin's ability is processed, not sure if it may be related:
Code: Select all
Tried to subtract a {1} shard that is not present in this ManaCostBeingPaid
EDIT: I can no longer reproduce this yet. If I reproduce it again (preferably in a reliable manner), I'll edit this post or make a new one.

- Agetian
Agetian
Programmer
 
Posts: 3471
Joined: 14 Mar 2011, 05:58
Has thanked: 676 times
Been thanked: 561 times

Re: Bug Reports (snapshot builds)

Postby Hanmac » 03 Dec 2015, 08:11

hm something funky with Rage Extractor because the generic {P} icon is missing and it shows me a broken image
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 03 Dec 2015, 13:44

Hanmac wrote:hm something funky with Rage Extractor because the generic {P} icon is missing and it shows me a broken image
It looks like Forge does not have a picture for the generic {P} icon - it's not present in the default skin sprite icons picture and there's no hook for it in FSkin (see line 1237+) and definition for it in FSkinProp (line 57+). It's best if this is resolved by someone UI-savvy (most likely Dan at the moment, I'm not sure if we have anyone else actively working on the UI...).

- Agetian
Agetian
Programmer
 
Posts: 3471
Joined: 14 Mar 2011, 05:58
Has thanked: 676 times
Been thanked: 561 times

Re: Bug Reports (snapshot builds)

Postby drdev » 04 Dec 2015, 04:13

Centaur Vinecrasher is broken. It doesn't receive any +1/+1 counters no matter how many lands are in your graveyard.
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 04 Dec 2015, 05:03

drdev wrote:Centaur Vinecrasher is broken. It doesn't receive any +1/+1 counters no matter how many lands are in your graveyard.
Fixed (r30431).

- Agetian
Agetian
Programmer
 
Posts: 3471
Joined: 14 Mar 2011, 05:58
Has thanked: 676 times
Been thanked: 561 times

Re: Bug Reports (snapshot builds)

Postby Marek14 » 04 Dec 2015, 21:17

Animated Inkmoth Nexus animated by Tezzeret, Agent of Bolas, becomes a Creature Land at end of turn. It should be an artifact creature land.

Effects that animate artifacts into artifact creatures should actually list "artifact" in the list of types they add, for these corner cases.
Marek14
Tester
 
Posts: 2759
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 296 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 63 guests


Who is online

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

Login Form