My effective familiar

From Kolmafia
Revision as of 03:52, 19 July 2011 by imported>Bale (r9644)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Function Syntax

familiar my_effective_familiar()

This function will return the identity of your current familiar. If you have a Doppelshifter or a tiny costume wardrobe equipped, then the return value will be the identity that your familiar assumed at the beginning of the current combat.

Code Sample

Certain familiars are an extreme danger to their master. If your familiar turns into one of these, the following code will abort automation so that the player can cope.

if(my_familiar() != my_effective_familiar())
   switch(my_effective_familiar()) {
   case $familiar[RoboGoose]:
      if(my_hp() <= (familiar_weight()+ 4)/2)
		abort("Your familiar became a "+my_effective_familiar()+". You may want to finish this fight yourself.");
   case $familiar[Fuzzy Dice]:
   case $familiar[Stab Bat]:
   case $familiar[Scary Death Orb]:
      if(my_hp() <= familiar_weight() + 2) break;
   case $familiar[Fuzzy Dice]:
      if(my_hp() <= familiar_weight()) break;
   case $familiar[Floating Eye]:
   case $familiar[Egg Benedict]:
   case $familiar[O.A.F.]:
   case $familiar[Black Cat]:
      abort("Your familiar became a "+my_effective_familiar()+". You may want to finish this fight yourself.");	
   }

See Also

my_familiar()