Wumpus the 19th Posted October 8, 2020 Share Posted October 8, 2020 So this code problem has befuddled the Discord. After asking Our patron saint of fan content, RageLeague, they said to ask the devs because this was a problem with the game. so.to figure this out, I will leave this here. Code for the Card Spoiler hallucinations = { name = "Hallucinations", desc = "Gain 3 {DISTRACTED}.", cost = 0, flags =CARD_FLAGS.STATUS | CARD_FLAGS.HATCH | CARD_FLAGS.PARASITE, rarity = CARD_RARITY.COMMON, OnPostResolve = function( self, minigame ) self.negotiator:AddModifier( "DISTRACTION", 3, self ) end, }, Error Screen Spoiler The card works fine used in debug. a little iffy, as it only makes 1 distracted instead of 3, but the card crashes the compendium whenever it scrolls to it. Link to comment Share on other sites More sharing options...
Developer rooks Posted October 8, 2020 Developer Share Posted October 8, 2020 This should be fixed in the next experimental (the argument was only set up to be used by NPCs). In your snippet above, I'm guessing it is meant to be adding the "DISTRACTED" modifier, not "DISTRACTION"? When testing that card, one thing I noticed is that as written, Distracted will trigger due to playing the card itself, which might not be what you want. If so, you could defer the application of the modifier like so: Spoiler event_handlers = { [ EVENT.POST_RESOLVE ] = function( self, minigame, card ) if card == self then self.negotiator:AddModifier( "DISTRACTED", 3, self ) end end, } Link to comment Share on other sites More sharing options...
Wumpus the 19th Posted October 8, 2020 Author Share Posted October 8, 2020 Thank you. I had tried to make a small change by making a features and defining distracted as distraction to fix the problem. Link to comment Share on other sites More sharing options...
Newbiespud Posted October 8, 2020 Share Posted October 8, 2020 Generally, I've discovered that if you want to use NPC arguments and conditions on PCs and vice versa, it's best to write your own version. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.