Page 1 of 1

[fixed/closed]Mishra's Factory & Equipment

PostPosted: 27 Oct 2013, 17:22
by HarlequinCasts
Describe the Bug:
Blinkmoth Nexus cannot be equipped once animated.

The equipment jumps to it as if it is attached, but the Blinkmoth Nexus receives no benefits from the equipment. Works fine for Inkmoth Nexus so it is just this card.

See save game to test.

Which card did behave improperly ?
Blinkmoth Nexus

Which update are you using?(date,name)Which type(Duel,Gauntlet,Sealed Deck)
OoAv2

What exactly should be the correct behavior/interaction ?
Equip

Are any other cards possibly affected by this bug ?
NA

Re: Blinkmoth Nexus & Equipment

PostPosted: 02 Nov 2013, 16:11
by Korath
I can't for the life of me see why they're falling off blinkmoths but not normal manlands (like inkmoths). Trying to work around.

Fixed (sans workaround) in 34e277b, and improved the AI. I haven't compared it to the normal manland AI (which is mostly shared); poke me after the next patch if it seems noticeably better or worse in comparison to them.

Re: [fixed by Korath]Blinkmoth Nexus & Equipment

PostPosted: 02 Nov 2013, 19:30
by Aswan jaguar
I didn't managed to post before you did but the problem affects the original Mishra's Factory and his animation if it is of any help.And I did notice something else, although the p/t of an equipment that fell of when equipped didn't boost the creature if the equipment gave an ability the ability icon and the ability itself was applied to Assembly-Worker.

Re: [fixed by Korath]Blinkmoth Nexus & Equipment

PostPosted: 02 Nov 2013, 19:36
by Korath
OK, leave open, please, and I'll rewrite Mishra's Factory tomorrow or maybe later tonight. I'd been vaguely meaning to analyze the exe version anyway.

Re: [confirmed]Blinkmoth Nexus & Equipment

PostPosted: 02 Nov 2013, 19:54
by Aswan jaguar
The same of course happens with the rest Microprose cards the animated lands by Living Lands and Kormus Bell.

Edit- Ashnod's Gear effect (is not an equipment but the closest from original cards)stays as legacy and affects correctly the animated lands.

edit2- I don't know if you noticed (you probably have) when the equipment attaches to Blinkmoth it reverts instantly to the original Land Blinkmoth Nexus
(you can see the name changing to Blinkmoth Nexus and instantly going back to Blinkmoth) so the equipment(legacy card) gets unattached from the non-creature land which instantly goes back to creature land but now is without an attachment.It seems that for some reason the equipment code when tries to equip them makes the Animated land to trigger to land and then back to animated land.
wrong assumption I tested now that I am not sleepy with an aura attached to the animated land and then equip it and the aura didn't fell off as it should if the above was true.

Re: [New info]Blinkmoth Nexus & Equipment

PostPosted: 03 Nov 2013, 13:16
by Korath
Ashnod's Gear works because it doesn't continuously check whether it's attached to a creature.

Auras work because they don't check whether they're attached to a creature during EVENT_CHANGE_TYPE itself, but in get_abilities() after EVENT_CHANGE_TYPE has been fully dispatched.

My initial workaround won't work because it delays itself from EVENT_CHANGE_TYPE in the same way Living Lands uses so that e.g. an Island changed into a Forest by Phantasmal Terrain still gets animated, but a Forest changed into an Island the same way doesn't.

Hrm. Maybe the right way to do this isn't as part of equipment itself, but in recalculate_all_cards_in_play() (recently moved out of the exe as part of the make-icons-appear-promptly fix). Could also check aura validity there, removing the current check in get_abilities(); this will let us make e.g. protection make newly-protected-from auras fall off reliably. (Enchant a Spectral Lynx with Angelic Destiny, then Lifelace the aura to green, and it stays put; it only falls off of White Knight in the analogous case because White Knight itself continuously checks for attached black auras.)

Fix for auras definitely won't make it into the next patch; equipment might, but probably won't either.

Re: [New info]Blinkmoth Nexus & Equipment

PostPosted: 03 Nov 2013, 13:25
by Aswan jaguar
Again you beat me posting a little earlier.

Maybe you could try these 2 leads:

1- I have a suspicion that like other cases that something is working and something is not in lets say similar cards Blinkmoth Nexus and Inkmoth Nexus
the only obvious difference is that the one can also boost (has besides the normal activation for mana and another activation)the other not.I know they use 2 different animations Blinkmoth for Blinkmoth Nexus and Infective Blinkmoth for Inkmoth Nexus which -somehow using a hack appears as Blinkmoth in play and I have tried anything concerning csv values as they had different values but the problem can be solved like that.(Since I don't know even the simplest things like decompile the code -make simple changes -and recompile)
Why don't you try to remove all the second activation code (boost Blinkmoth)and everything associated to that and check then if the equipment will stay on or not,if it does then you have a direction to search for the problem.

2- There is something wrong about Subtype 44 as this is the value for Enchant Creature to the original game and after the 2000 limit changes,too. Sometime ago there was added there by Gargaroz the Artifact Creature Subtupe,too (for deckbuilder convenience in searching I believe).Maybe there is a conflict between equipment code and this as possibly they are thought as Lands - Creatures - Artifacts - Enchant Creature Auras?

edit- I forgot to mention there was no Artifact Creature Subtype to the original game.

Re: [New info]Blinkmoth Nexus & Equipment

PostPosted: 03 Nov 2013, 13:31
by Korath
It worked for Inkmoth Nexus (and other vanilla manlands) but not Blinkmoth Nexus, not because the manland functions had a hack to prevent double_faced_card() from changing types, but because the C version of mana_producer() does; and Blinkmoth Nexus didn't forward to it in one of the cases where the exe version doesn't do anything.

Equipment checking whether the card it's attached to is a creature is done entirely in C, not the exe, and doesn't look for type 44. (And 44 is indeed pretty wonky.)

Re: [New info]Blinkmoth Nexus & Equipment

PostPosted: 25 Nov 2013, 11:22
by BAgate
In PTT it works for blinkmoth and inkmoth but not for Mishra's Factory.

Re: [waitlist]Mishra's Factory & Equipment

PostPosted: 28 Jan 2014, 05:04
by Korath
Equipment fixed in e41dd23. Auras, not yet; and they won't be able to check whether they fulfill their "Enchant [whatever]" clause anytime soon, since that's not stored anywhere in any standardized way.

Re: [waitlist]Mishra's Factory & Equipment

PostPosted: 28 Jan 2014, 05:10
by BAgate
Well, then this is fixed. Do you want us to create a new thread for enchantments and manlands, or just leave this one as waitlisted?

Re: [waitlist]Mishra's Factory & Equipment

PostPosted: 28 Jan 2014, 06:39
by Korath
Meh, leave it.

Re: [waitlist]Mishra's Factory & Equipment

PostPosted: 03 Feb 2014, 19:00
by HarlequinCasts
I've noticed in CIA v2 Jan 2014 patch that equipment does not fall off Man lands once they are finished being a creatures. The land will retain any protections that the equipment gave it for example. Also if I then activate it for mana on the following turn, it will become a creature again (with equipment attached) in addition to generating mana.

(I tested for Inkmoth Nexus and Mishra's Factory and both failed)

Re: [waitlist]Mishra's Factory & Equipment

PostPosted: 03 Feb 2014, 19:27
by Korath
They don't fall off of anything for any reason in CrIAv2. Already fixed.

Re: [waitlist]Mishra's Factory & Equipment

PostPosted: 10 Apr 2014, 11:21
by Korath
Only part left open here is a duplicate of this.