My effective familiar
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(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.");
}