KittenAqua / TrainworksModdingTools

Modding framework for the 2020 PC game Monster Train
15 stars 9 forks source link

Stackstone and eternalstone enhancer issue #134

Closed Exas4000 closed 1 year ago

Exas4000 commented 3 years ago

After a quick check with RisingDusk, it seems like Sap is not eligible for StackStone when used as a status produced by an CardEffect. All these cards does not respond to Stackstone and, in the case of begrudgin patron, it won't acknowledge its consume effect.

ps: the faulty status was Sap

RisingDusk suggested opening an issue in case it was a forgotten exception inside trainwork.

Thank you

https://pastebin.com/iFCW9xt2 (begrudging patron) https://pastebin.com/cgL66Z0b

brandonandzeus commented 1 year ago

Old issue wondering if this was answered in the discord. But since I'm contributing to this repo now, I'll answer for the record.

The issue is that EffectStateType is used EffectStateType = VanillaCardEffectTypes.CardEffectAddStatusEffect

Unfortunately, the framework has a bug when this is used; this will output the fully qualified assembly path in EffectStateName this is a string with extra information specifying which Assembly the type is located in.

Enhancers check for a specific CardEffect class in the CardData; it has to be an exact match, but since the fully qualified assembly name was used, it will be different.

To fix that line has to be EffectStateName = "CardEffectAddStatusEffect"

I'm updating the wiki to reflect this until I fix it.

Note that EffectStateType should be used if you have a Custom CardEffect since C# needs to know the assembly where the type lives.

brandonandzeus commented 1 year ago

Marking as duplicate of #71