tdBattlePetScript icon indicating copy to clipboard operation
tdBattlePetScript copied to clipboard

Condition Mechanical Free Death

Open pquerner opened this issue 7 years ago • 4 comments

Can you find out if your mechanical pet has a free death in a condition? Example

ability(282) [self.hp <= 375 & !self.freedeath.available] # (only self destruct if free death not available)

pquerner avatar Oct 17 '17 17:10 pquerner

I guess you could just use this [ ! enemy.aura(1420).exists ]

to find out if cheat death already procced.

pquerner avatar Oct 19 '17 16:10 pquerner

Ill add this, possibly as [self.revived]

axc450 avatar Apr 12 '20 19:04 axc450

Hello, I don't see a point in replacing one condition with another. Years ago I asked the devs to somehow make it visible in the interface if Failsafe was triggered and luckily they added the cogwheel icon and Mechanical aura we can check with scripts, so I think [ self.aura(Mechanical:244).exists ] is the way to go and we can even check for non-active player pets. Of course, there could be specific conditions for tons of situations like undead passive triggered, survival triggered etc. to spare some characters in the scripts but why overload the code for such a small benefit?

patf0rd avatar Apr 16 '20 02:04 patf0rd

self.revived would apply to all revivable mechanics. I dont think its a code bloat - in fact its a direction I want to take the language in. Pretty much everything that is common should have a custom function for to keep scripts clean.

axc450 avatar Apr 16 '20 16:04 axc450