My effective familiar

From Kolmafia
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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(my_familiar())+ 4)/2)
         abort("Your familiar became a "+my_effective_familiar()
         +". You may want to finish this fight yourself.");
   case $familiar[Stab Bat]:
   case $familiar[Scary Death Orb]:
      if(my_hp() <= familiar_weight(my_familiar()) + 2) break;
   case $familiar[Fuzzy Dice]:
      if(my_hp() <= familiar_weight(my_familiar())) 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()