Jump to content

"variable is not declared" error on a variable with a set value


Playr10

Recommended Posts

Am I doing something wrong or is this some sort of bug?

coordinate =
    {
        name = "Coordinate",
        desc = "Gain 3 {SYNERGY} and 2 {DEFEND}.",
        cost = 1,
        rarity = CARD_RARITY.COMMON,
        target_type = TARGET_TYPE.FRIENDLY_OR_SELF,
        flags = CARD_FLAGS.SKILL,
        max_xp = 4,
        synergy_amount = 3,
        defend_amount = 2,
        OnPostResolve = function( self, minigame, attack )
            self.owner:AddCondition("SYNERGY", synergy_amount, self)
            attack.target:AddCondition("DEFEND", defend_amount, self)
        end,
    },

2140597679_download(1).thumb.png.63d47d752aaeea09340601be74bde3e5.png

I kind of feel like an idiot now for glancing over that at least 6 times as I looked back at Carve's code

Since I've already made this thread though, how would I make this card apply Invigorated to my entire team? I don't think there's an example of this on cards that don't use features in the game right now.

To have a card or condition do something to everyone on your team, you can do something like

for i, fighter in self.owner:GetTeam():Fighters() do
	-- the effect you want goes here, for example
  	fighter:HealHealth(self.heal_amount, self)
end

 

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...