It is currently 19 Apr 2024, 11:30
   
Text Size

Upcoming Release: Forge version 1.5.58

Post MTG Forge Related Programming Questions Here

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

Re: Upcoming Release: Forge version 1.5.58

Postby Agetian » 10 Dec 2016, 18:07

Now, here's a funny thing: Soulflayer + Chromanticore is broken with ... r32578. I mean, I tested r32577 and it works correctly there, while with r32578 it does not work. However, it makes very little sense to me as of yet since the only thing r32578 changes is the timing for a Bestow check :/

EDIT: Come to think of it, maybe it's not working because Chromanticore has Bestow on it and it's not on the battlefield, so the game mistakenly ignores the add-on abilities on Soulflayer thinking that Chromanticore's abilities are somehow "not active"?

EDIT 2: Ok, here's what I did for now. I reverted r32578 in r32656 to make Chromanticore + Soulflayer and other similar combinations operating on creatures with Bestow work again, then introduced a separate revision (r32657+r32658) which attempts to prevent visual flickering by not updating the view while temporarily animating/un-animating a Bestow creature. Not sure how well this'll work and whether it may introduce some issues of its own (theoretically it shouldn't, but then again, who would have thought that making a Bestow check happen only on the Battlefield would break Soulflayer?), plus it adds a bit of additional complexity into an already complicated Card class... :( If anyone knows of a better solution, feel free to revert r32657-32658 and propose a better way to do this. :/

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

Re: Upcoming Release: Forge version 1.5.58

Postby Hanmac » 10 Dec 2016, 19:20

r32578 does fix the problem with Animate & Unanimate which causes the enchanted creature to lose the effects ...
(the check there is needed so see if the Aura part can be casted with Flash)

i need so check why it can cause problems with Soulflayer ...
if the problem is the Bestow then r32577 shouldn't work too.
===
found and fixed the problem.

Edit: i did see you found something too

my fix was that i need to add checkStaticAbilities to reset back to unbestowed state, otherwise the card might shows to have Flash which is not the case.
Edit: i think that was the part which did fix Soulflayer too.

your part with disabling the Flickering is good, because with only my part it has some minor flickering (while still correct working)
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Upcoming Release: Forge version 1.5.58

Postby Agetian » 10 Dec 2016, 19:27

Thanks a lot for following this through, Hanmac! :) Glad to see this should now be properly fixed.

Speaking of flickering, by the way... I'll see if temporarily disabling the view update may also solve this for a different scenario where flickering is still happening (land + Wind Zendikon), just need to find the place where the relevant temporary tests are happening (if it's similar to Bestow)...

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

Re: Upcoming Release: Forge version 1.5.58

Postby Hanmac » 10 Dec 2016, 19:35

yeah, i will see where i can find it.

Apropos Land + Aura (with Animate Effect)
i need to find a way to tell the AI it should not tap the Land to Animate it.
Specially seen often with Genju of the Cedars.
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Upcoming Release: Forge version 1.5.58

Postby friarsol » 10 Dec 2016, 21:12

Cumulative upkeep for ai is restored. There's definite improvements in the area, but it will at least hit the stack now
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Upcoming Release: Forge version 1.5.58

Postby Hanmac » 10 Dec 2016, 21:38

friarsol wrote:Cumulative upkeep for ai is restored. There's definite improvements in the area, but it will at least hit the stack now
Good, that looks Good so far.
I didnt manage to do it yet, because of time issues.

Tomorrow i will try to make the Cumulative Upkeep as scripted/factoried trigger like it should.

My plan so far:
Upkeep Trigger -> PutCounter Age -> Sacrifice UnlessCost x AgeCount
That might it possible to add more AI Logic.

The only card which is ugly is Varchild's War-Riders, for that we might need new CostType for CreateToken

PS: while reworking the CounterMoveAi, I noticed that the AI currently has no logic to order the SpellAbility which are put on the Stack. We might try to find a way to do something about it.
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Upcoming Release: Forge version 1.5.58

Postby friarsol » 10 Dec 2016, 23:42

Just be careful with multiplying costs. Some are fine to just combine, but others shouldn't. Jotun Grunt is a great example of this.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Upcoming Release: Forge version 1.5.58

Postby Agetian » 11 Dec 2016, 05:50

Thanks for the Cumulative Upkeep fix, Sol! It's really great to see this fixed! :)

Ok, looks like there are more Delayed Trigger shenanigans that may need attention. In particular, a report was made recently about Archangel Avacyn NPEing on its transformation delayed trigger. I confirmed it using this test case file:

Code: Select all
humanlife=20
ailife=20
activeplayer=ai
activephase=MAIN1
humancardsinhand=Lightning Bolt
humancardsinlibrary=AEther Tradewinds;AEther Tradewinds
humancardsingraveyard=
humancardsinplay=Archangel Avacyn|SummonSick:True;Raging Goblin
humancardsinexile=
humancardsincommand=
aicardsinhand=AEther Tradewinds
aicardsinlibrary=AEther Tradewinds;AEther Tradewinds
aicardsingraveyard=
aicardsinplay=
aicardsinexile=
aicardsincommand=
Just Lightning Bolt your own Raging Goblin, then hit Space when Archangel Avacyn's trigger hits the stack.

The same issue happens with other cards, for example, Loyal Cathar // Unhallowed Cathar.

I tried tracing this and came to the following conclusions thus far:
1. overridingSA at DelayedTriggerEffect.java:77 is "null" because the relevant additional ability is apparently never set (the additional ability list is empty at that point).
2. Trying to set the relevant additional ability by adding a line to AbilityFactory.java:209 similar to this one:
Code: Select all
spellAbility.setAdditionalAbility("Execute", getSubAbility(hostCard, mapParams.get("Execute"), spellAbility));
...prevents the NPE but makes the trigger fail to work correctly (the Avacyn, the Purifier trigger hits the stack, then Archangel Avacyn disappears from the game completely and is nowhere to be found - neither on the battlefield, nor in the graveyard, nor pretty much anywhere else).

I've been playing with Avacyns recently, so this is something that was broken really recently, I think. I'll see if I can pinpoint the exact revision.

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

Re: Upcoming Release: Forge version 1.5.58

Postby Hanmac » 11 Dec 2016, 06:25

Probably(100%) my fault, I did it to make other things work right. "Execute" for DelayedTrigger should already be stored as AdditionalAbility (including it's subAbilities)

I will check it out when I wake up.
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Upcoming Release: Forge version 1.5.58

Postby Agetian » 11 Dec 2016, 06:29

Okie doke, sounds good, Hanmac! Thanks!

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

Re: Upcoming Release: Forge version 1.5.58

Postby Hanmac » 11 Dec 2016, 08:25

fixed Archangel Avacyn, the problem was deeper in AbilityFactory, while i did make a the additionalAbilities be differ for AbilitySub and non-AbilitySub, i didn't check for AbilitySub without a Parent (might happens on Trigger)
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Upcoming Release: Forge version 1.5.58

Postby Agetian » 11 Dec 2016, 08:34

Thanks a lot, Hanmac! :)
Well, as far as I can tell, we went through the most critical stuff known so far (post-1.5.57), should we start planning a release? If so, who will be able to release the new beta? I'll be able to update the mobile version of Forge (might as well go ahead and push an intermediate update soon because the current mobile Forge is quite broken anyway).

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

Re: Upcoming Release: Forge version 1.5.58

Postby Hanmac » 11 Dec 2016, 09:31

there are still some many (Partner) cards missing from C16.
they are scripted in the Thread but not commited as cards yet.

===
the following might be done after new release:

i also have some cards i want to script from CS2, but i think they can wait.
(like the exile creature which does exile a card until an player/opponent other than card controller becomes monarch, currently it doesn't work that way, because if you lose the game, your effect will be gone too, but in that case the effect does need to stay on the field.)

For C16 there is a Curse Aura which does trigger when the enchanted player loses the game. (there was a bug that the Aura did stay on the battlefield but shouldn't, now there is the problem with the Trigger not working anymore. we might need some kind of "previousEnchanted" or something)
This card is not scripted yet, so isn't a bug.

what my current do to list:
  • try to script Cumulative Upkeep, only Varchild's War-Riders will be ugly. (need new Cost)
  • finish the rework with CounterMoveAI (used for Graft), for most of them its better now, only the ones with TWO targets (using Pump) are still ugly.
  • do some work with GenericChoiceAI with a Pump Effect (see Multiform Wonder)
    for that i might do a generic way, to have some cards working even without extra AILogic
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Upcoming Release: Forge version 1.5.58

Postby Agetian » 11 Dec 2016, 09:33

Hanmac wrote:there are still some many (Partner) cards missing from C16.
they are scripted in the Thread but not commited as cards yet.

===
the following might be done after new release:

i also have some cards i want to script from CS2, but i think they can wait.
(like the exile creature which does exile a card until an player/opponent other than card controller becomes monarch, currently it doesn't work that way, because if you lose the game, your effect will be gone too, but in that case the effect does need to stay on the field.)

For C16 there is a Curse Aura which does trigger when the enchanted player loses the game. (there was a bug that the Aura did stay on the battlefield but shouldn't, now there is the problem with the Trigger not working anymore. we might need some kind of "previousEnchanted" or something)
This card is not scripted yet, so isn't a bug.

what my current do to list:
  • try to script Cumulative Upkeep, only Varchild's War-Riders will be ugly. (need new Cost)
  • finish the rework with CounterMoveAI (used for Graft), for most of them its better now, only the ones with TWO targets (using Pump) are still ugly.
  • do some work with GenericChoiceAI with a Pump Effect (see Multiform Wonder)
    for that i might do a generic way, to have some cards working even without extra AILogic
Sounds like a plan! I'll go ahead and see which cards in the C16 thread are not committed yet, and I'll commit those. Should we start moving them from "upcoming" to the relevant "letter" folders?

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

Re: Upcoming Release: Forge version 1.5.58

Postby Hanmac » 11 Dec 2016, 09:40

i think the existing can be moved, for the new ones i don't know yet. maybe put them in the upcoming folder for now.

depending how cast you guys want to release, i might do already some stuff for Cumulative Upkeep today, and you can look over it if it breaks anything.
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: Baidu [Spider] and 54 guests


Who is online

In total there are 55 users online :: 1 registered, 0 hidden and 54 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: Baidu [Spider] and 54 guests

Login Form