codyfun123 Posted October 16, 2020 Share Posted October 16, 2020 Download on the Steam Workshop Many cards now have more than 2 possible upgrade variations. More than 2 choices can be available when you enter the upgrade screen (depending on the total variations a card has). Not satisfied? You can use the Reset button to set the card back in XP in exchange for changing the choices next time. Credit goes to Wumpasaurus and Social Mechanic for design contributions. Open to further suggestions! Open to see screenshots: Spoiler Link to comment Share on other sites More sharing options...
codyfun123 Posted October 22, 2020 Author Share Posted October 22, 2020 Can you guess the difference between the two following snippets of code: self.card:ResetUpgrades() local card = self.card card:ResetUpgrades() The answer is that the first one crashes. Spoiler 13:03.07-Lua: scripts/helpers.lua(47,1) topple_plus2 stack traceback: scripts/helpers.lua:55: in function 'assert_warning' scripts/ui/widgets/battlecard.lua:40: in method 'RefreshCard' scripts/ui/screens/deckscreen.lua:622: in field 'fn' scripts/ui/updater.lua:240: in method 'Update' scripts/ui/updater.lua:71: in method 'Update' scripts/ui/updater.lua:124: in method 'Update' scripts/ui/widget.lua:1980: in field 'OnUpdate' scripts/ui/widgets/cardwidget.lua:1088: in method 'OnUpdate' scripts/ui/frontend.lua:1116: in method 'Update' scripts/game.lua:587: in method 'Update' scripts/main.lua:157: in function <scripts/main.lua:150> 13:03.07-Lua: Error calling function from engine: scripts/ui/widgets/cardwidget.lua:362: attempt to call a nil value (method 'GetName') stack traceback: scripts/ui/widgets/cardwidget.lua:362: in field 'RefreshCard' scripts/ui/widgets/battlecard.lua:44: in method 'RefreshCard' scripts/ui/screens/deckscreen.lua:622: in field 'fn' scripts/ui/updater.lua:240: in method 'Update' scripts/ui/updater.lua:71: in method 'Update' scripts/ui/updater.lua:124: in method 'Update' scripts/ui/widget.lua:1980: in field 'OnUpdate' scripts/ui/widgets/cardwidget.lua:1088: in method 'OnUpdate' scripts/ui/frontend.lua:1116: in method 'Update' scripts/game.lua:587: in method 'Update' scripts/main.lua:157: in function <scripts/main.lua:150> I am thoroughly flummoxed, but since the second one just works, I will let it be. Link to comment Share on other sites More sharing options...
RageLeague Posted October 22, 2020 Share Posted October 22, 2020 What? 4 hours ago, codyfun123 said: Can you guess the difference between the two following snippets of code: self.card:ResetUpgrades() local card = self.card card:ResetUpgrades() The answer is that the first one crashes. Hide contents 13:03.07-Lua: scripts/helpers.lua(47,1) topple_plus2 stack traceback: scripts/helpers.lua:55: in function 'assert_warning' scripts/ui/widgets/battlecard.lua:40: in method 'RefreshCard' scripts/ui/screens/deckscreen.lua:622: in field 'fn' scripts/ui/updater.lua:240: in method 'Update' scripts/ui/updater.lua:71: in method 'Update' scripts/ui/updater.lua:124: in method 'Update' scripts/ui/widget.lua:1980: in field 'OnUpdate' scripts/ui/widgets/cardwidget.lua:1088: in method 'OnUpdate' scripts/ui/frontend.lua:1116: in method 'Update' scripts/game.lua:587: in method 'Update' scripts/main.lua:157: in function <scripts/main.lua:150> 13:03.07-Lua: Error calling function from engine: scripts/ui/widgets/cardwidget.lua:362: attempt to call a nil value (method 'GetName') stack traceback: scripts/ui/widgets/cardwidget.lua:362: in field 'RefreshCard' scripts/ui/widgets/battlecard.lua:44: in method 'RefreshCard' scripts/ui/screens/deckscreen.lua:622: in field 'fn' scripts/ui/updater.lua:240: in method 'Update' scripts/ui/updater.lua:71: in method 'Update' scripts/ui/updater.lua:124: in method 'Update' scripts/ui/widget.lua:1980: in field 'OnUpdate' scripts/ui/widgets/cardwidget.lua:1088: in method 'OnUpdate' scripts/ui/frontend.lua:1116: in method 'Update' scripts/game.lua:587: in method 'Update' scripts/main.lua:157: in function <scripts/main.lua:150> I am thoroughly flummoxed, but since the second one just works, I will let it be. How? 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.