Hi,
I would create some base class for card action like:
extends Resource
class_name CardAction
func handle_action():
pass
Then add to your card resource:
export(Resource) var action
You need extend CardAction
for any new action you want and then assing as "Action" to your card resource. That should let you use it later like:
var someCard = preload(someCardPath)
someCard.action.handle_action()
I guess that should work.
Script is also a resource, so you can also assign script directly as action.
PS I'm not sure if script doesn't have to be somehow instanced before use, like maybe:
var someCardAction = someCard.action.new()
That need to be checked.