Invoke card impact in Yanfly Lunatic Damage?

So, at this point, most must know that I use the card game script... So I was trying to do some very elaborated card effects in combination with yanfly lunatic damage script.

In the card game script there's a line with a def to invoke a card impact:
Ruby:
#-----------------------------------------------------------------------------
  # Card effects
  #-----------------------------------------------------------------------------
  def invoke_card_impact(effect_name)
    array = PC27::CG::CARD_EFFECT[effect_name]
    if array[0] == :draw
      card_effect_draw_cards(array[1], array[2], array[3])
    else
      $game_message.background = 1
      $game_message.position   = 1
      $game_message.add(PC27::CG::CARD_EFF_TEXT)
      wait_for_message
      prepare_select_window(:impact, array[0])
      @temp_effect_data = [] unless @temp_effect_data
      @temp_effect_data[0] = :impact
      process_select_cards(effect_name)
    end
  end

I tried to use this def in the lunatic damage to call a specific impact effect, but it returns me an error among the $Game_actor.
This is the damage call I created:

Ruby:
when /DRAW1/i
        self.invoke_card_impact("lightload")

Also tried with another def called: "process_select_cards(effect_name)", and also tried changing the "self" for "a."
but non of them seems to work. Both return an error related to the $Game_actor.
Is even possible to use these def in a lunatic damage formula?

Maybe this method is not possible to be used with a damage formula and I could create a different def to force a card impact in a damage formula?
Also tried with another def called: "process_select_cards(effect_name)", and also tried changing the "self" for "a."
but non of them seems to work. Both return an error related to the $Game_actor.
Please specify what the error is. Screenshot?
'a' is used in damage formulas, not code; unless you defined a variable as 'a'.

You lunatic code may be looking for the method in $game_actors
Please specify what the error is. Screenshot?
'a' is used in damage formulas, not code; unless you defined a variable as 'a'.

You lunatic code may be looking for the method in $game_actors
Lunatic Damage actually let's you code as a damage formula, so you can use a. and b. to refer to which one you want to affect in it when you create a custom damage. For some reason, instead of a., "self." also works.

This is the error:
1660041366959.png


I checked that the invoke_card_impact was related to the class scene_battle. So I took all the code of the invoke card and pasted it again in the game_actor class. For some reason, it looked like it could had work, the thing is that in that case, the error returned it was that it couldn't read the "set_handle" for the "prepare_select_window".

So I checked and the original "def set_handle" is in the main script, and is not related to the game_actor class, but with the window_selectable, which is logical.

Original thread: https://forums.rpgmakerweb.com/threads/invoke-card-impact-in-yanfly-lunatic-damage.150257/