Jump to content

How to make "Panic" cards?


Recommended Posts

So I've been trying to make cards that influence the panic meter, (like the crackler item in the base game) but can't figure out how to make it work. I've tried using the standard hit.target:AddCondition stuff, but can't figure out what keyword I need to use. Does anyone know how to do this? Thank you so much in advance.

Link to comment
Share on other sites

I think all panic cards use hit.target:DeltaMorale

It looks like this with the Crackler:

        OnPostResolve = function( self, battle, attack )
             local dmg = attack:GetTotalDamage()
             for i, hit in attack:Hits() do
                  if hit.target:HasMorale() then
                       local health = hit.target:GetMaxHealth()
                       hit.target:DeltaMorale( (dmg)/health )
                  end
             end
        end

Link to comment
Share on other sites

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.

×
  • Create New...