Bug Reports (snapshot builds)
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Bug Reports (snapshot builds)
by 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
- Agetian
- Programmer
- Posts: 3471
- Joined: 14 Mar 2011, 05:58
- Has thanked: 676 times
- Been thanked: 561 times
Re: Bug Reports (snapshot builds)
by Sloth » 27 Nov 2015, 21:43
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).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.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Bug Reports (snapshot builds)
by Agetian » 28 Nov 2015, 04:51
@ Sloth: Ah, that makes sense! Ok, then my fix should be correct. Glad to help!
- Agetian
- Agetian
- Agetian
- Programmer
- Posts: 3471
- Joined: 14 Mar 2011, 05:58
- Has thanked: 676 times
- Been thanked: 561 times
Re: Bug Reports (snapshot builds)
by 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.
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.
Re: Bug Reports (snapshot builds)
by Agetian » 29 Nov 2015, 06:31
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...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.
- Agetian
- Agetian
- Programmer
- Posts: 3471
- Joined: 14 Mar 2011, 05:58
- Has thanked: 676 times
- Been thanked: 561 times
Re: Bug Reports (snapshot builds)
by Marek14 » 29 Nov 2015, 08:01
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).Agetian wrote: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...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.
- Agetian
Re: Bug Reports (snapshot builds)
by 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
- Agetian
- Programmer
- Posts: 3471
- Joined: 14 Mar 2011, 05:58
- Has thanked: 676 times
- Been thanked: 561 times
Re: Bug Reports (snapshot builds)
by excessum » 29 Nov 2015, 13:18
Yeah those were exactly my concerns when I was debugging the crash...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
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.
Re: Bug Reports (snapshot builds)
by Agetian » 29 Nov 2015, 14:41
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.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.
- Agetian
- Agetian
- Programmer
- Posts: 3471
- Joined: 14 Mar 2011, 05:58
- Has thanked: 676 times
- Been thanked: 561 times
Re: Bug Reports (snapshot builds)
by 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 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:
- Agetian
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
- Agetian
- Agetian
- Programmer
- Posts: 3471
- Joined: 14 Mar 2011, 05:58
- Has thanked: 676 times
- Been thanked: 561 times
Re: Bug Reports (snapshot builds)
by 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
Re: Bug Reports (snapshot builds)
by Agetian » 03 Dec 2015, 13:44
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...).Hanmac wrote:hm something funky with Rage Extractor because the generic {P} icon is missing and it shows me a broken image
- Agetian
- Agetian
- Programmer
- Posts: 3471
- Joined: 14 Mar 2011, 05:58
- Has thanked: 676 times
- Been thanked: 561 times
Re: Bug Reports (snapshot builds)
by 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)
by Agetian » 04 Dec 2015, 05:03
Fixed (r30431).drdev wrote:Centaur Vinecrasher is broken. It doesn't receive any +1/+1 counters no matter how many lands are in your graveyard.
- Agetian
- Agetian
- Programmer
- Posts: 3471
- Joined: 14 Mar 2011, 05:58
- Has thanked: 676 times
- Been thanked: 561 times
Re: Bug Reports (snapshot builds)
by 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.
Effects that animate artifacts into artifact creatures should actually list "artifact" in the list of types they add, for these corner cases.
Who is online
Users browsing this forum: No registered users and 63 guests