Difference between revisions of "Familiar"

From Kolmafia
Jump to navigation Jump to search
imported>MagiNinjA
(additions. still need to tune up.)
imported>Aventuristo
(Add to Data Types category; add proxy record boilerplate)
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
'''CURRENTLY A TEST PAGE...MY BAD IF NO ONE LIKES IT. :)'''
+
{{DISPLAYTITLE:familiar}}
  
This will contain ASH functions and constants for familiars.
+
{{TOCright}}
  
<code>familiar my_familiar()</code> <br />
+
This data type represents any familiar available in KoL.
Returns the familiar you currently have equipped as <code>$familiar[familiar]</code>.
 
  
<code>int familiar_weight( familiar pet )</code> <br />
+
The full range, besides $familiar[ none ], is too much to list and keep up
Returns the raw, unbuffed weight of the familiar <code>pet</code>.
+
with here: please see the Wiki {{kolwiki|Familiars}} page for more information.
  
<code>int familiar_weight( familiar pet )</code> <br />
+
==Related Functions==
Returns the difference between the unbuffed and buffed weights of your currently equipped familiar.
 
  
<code>boolean have_familiar( familiar pet )</code> <br />
+
{{Flink|boolean|bjornify_familiar|familiar}}
Returns true or false depending on if you have the familiar <code>pet</code> in your terrarium or equipped on you.
+
{{Flink|boolean|enthrone_familiar|familiar}}
 +
{{Flink|boolean|equip_all_familiars}}
 +
{{Flink|item|familiar_equipment|familiar}}
 +
{{Flink|item|familiar_equipped_equipment|familiar}}
 +
{{Flink|int|familiar_weight|familiar}}
 +
{{Flink|boolean [familiar]|favorite_familiars|}}
 +
{{Flink|boolean|have_familiar|familiar}}
 +
{{Flink|boolean|is_familiar_equipment_locked}}
 +
{{Flink|boolean|is_trendy|item/familiar/skill/string}}
 +
{{Flink|boolean|is_unrestricted|item/familiar/skill/string}}
 +
{{Flink|void|lock_familiar_equipment|boolean}}
 +
{{Flink|familiar|my_bjorned_familiar}}
 +
{{Flink|familiar|my_effective_familiar}}
 +
{{Flink|familiar|my_enthroned_familiar}}
 +
{{Flink|familiar|my_familiar}}
 +
{{Flink|float|numeric_modifier|familiar|string|int|item}}
 +
{{Flink|familiar|to_familiar|int}}
 +
{{Flink|familiar|to_familiar|strict_string}}
 +
{{Flink|boolean|use_familiar|familiar}}
  
<code>boolean equip_familiar( familiar pet )</code> <br />
+
==Proxy Record Fields==
Returns true or false depending on if the <code>equip_familiar</code> succeeded in equipping the familiar <code>pet</code> as your current familiar.
 
  
<code>item familiar_equipment( familiar pet )</code> <br />
+
Here are the proxy record fields for familiars. Proxy records are discussed in more
Returns the item that is most common to <code>pet</code>. e.g. This function will return <code>$item[Meat detector]</code> if pet is <code>$familiar[Leprechaun]</code>.
+
detail [[Proxy Records|here]].
  
boolean train_familiar( int nGoal, string sGoal ) <br />
+
{| cellpadding="3" cellspacing="0" border="1px" class="sortable"
Trains your currently-equipped familiar. sGoal can be either “base”, “buffed”, or “turns”, and nGoal is either the target weight or desired number of battles.
+
|- | style="background-color: #F2F2F2"
 +
|-
 +
! Field
 +
! Data type
 +
! Default value
 +
! ASH Accessor Function / Notes
 +
|-
 +
| hatchling
 +
| item
 +
| none
 +
|
 +
|-
 +
| image
 +
| string
 +
| "debug.gif"
 +
|
 +
|-
 +
| name
 +
| string
 +
| ""
 +
|
 +
|-
 +
| charges
 +
| int
 +
| 0
 +
|
 +
|-
 +
| drop_name
 +
| string
 +
| ""
 +
|
 +
|-
 +
| drop_item
 +
| item
 +
| none
 +
|
 +
|-
 +
| drops_today
 +
| int
 +
| 0
 +
|
 +
|-
 +
| drops_limit
 +
| int
 +
| 0
 +
|
 +
|-
 +
| combat
 +
| boolean
 +
| false
 +
|
 +
|-
 +
| physical_damage
 +
| boolean
 +
| false
 +
|
 +
|-
 +
| elemental_damage
 +
| boolean
 +
| false
 +
|
 +
|-
 +
| block
 +
| boolean
 +
| false
 +
|
 +
|-
 +
| delevel
 +
| boolean
 +
| false
 +
|
 +
|-
 +
| hp_during_combat
 +
| boolean
 +
| false
 +
|
 +
|-
 +
| mp_during_combat
 +
| boolean
 +
| false
 +
|
 +
|-
 +
| other_action_during_combat
 +
| boolean
 +
| false
 +
|
 +
|-
 +
| hp_after_combat
 +
| boolean
 +
| false
 +
|
 +
|-
 +
| mp_after_combat
 +
| boolean
 +
| false
 +
|
 +
|-
 +
| other_action_after_combat
 +
| boolean
 +
| false
 +
|
 +
|-
 +
| passive
 +
| boolean
 +
| false
 +
|
 +
|-
 +
| variable
 +
| boolean
 +
| false
 +
|
 +
|}
  
== Datatype Conversions ==
+
[[Category:Scripting]] [[Category:Data Types]]
string familiar_to_string( familiar pet ) <br />
 
familiar string_to_familiar( string str ) <br />
 
int familiar_to_int ( familiar pet ) # used for building raw URLs <br />
 
familiar int_to_familiar ( int nFamiliar ) # converts an ASH object into a KoL number? not what we're looking for, apparently. <br />
 
 
 
== $familiar[constant] ==
 
    * Angry Goat
 
    * Astral Badger
 
    * Attention-Deficit Demon
 
    * Baby Gravy Fairy
 
    * Baby Yeti
 
    * Barrrnacle
 
    * Blood-Faced Volleyball
 
    * Cheshire Bat
 
    * Clockwork Grapefruit
 
    * Cocoabo
 
    * Coffee Pixie
 
    * Comma Chameleon
 
    * Crimbo Elf
 
    * Cymbal-Playing Monkey
 
    * Doppelshifter
 
    * Emo Squid
 
    * Feather Boa Constrictor
 
    * Flaming Gravy Fairy
 
    * Frozen Gravy Fairy
 
    * Fuzzy Dice
 
    * Ghost Pickle on a Stick
 
    * Ghuol Whelp
 
    * Grue
 
    * Hand Turkey
 
    * Hanukkimbo Dreidl
 
    * Hovering Sombrero
 
    * Howling Balloon Monkey
 
    * Inflatable Dodecapede
 
    * Jill-O-Lantern
 
    * Killer Bee
 
    * Leprechaun
 
    * Levitating Potato
 
    * MagiMechTech MicroMechaMech
 
    * Mosquito
 
    * Ninja Pirate Zombie Robot
 
    * Personal Raincloud
 
    * Pet Rock
 
    * Pygmy Bugbear Shaman
 
    * Sabre-Toothed Lime
 
    * Sleazy Gravy Fairy
 
    * Snowy Owl
 
    * Spirit Hobo
 
    * Spooky Gravy Fairy
 
    * Spooky Pirate Skeleton
 
    * Stab Bat
 
    * Star Starfish
 
    * Stinky Gravy Fairy
 
    * Sweet Nutcracker
 
    * Teddy Bear
 
    * Temporal Riftlet
 
    * Whirling Maple Leaf
 
    * Wild Hare
 
    * Wind-up Chattering Teeth
 

Latest revision as of 00:42, 30 September 2017


This data type represents any familiar available in KoL.

The full range, besides $familiar[ none ], is too much to list and keep up with here: please see the Wiki Familiars page for more information.

Related Functions

boolean bjornify_familiar( familiar )

boolean enthrone_familiar( familiar )

boolean equip_all_familiars()

item familiar_equipment( familiar )

item familiar_equipped_equipment( familiar )

int familiar_weight( familiar )

boolean [familiar] favorite_familiars()

boolean have_familiar( familiar )

boolean is_familiar_equipment_locked()

boolean is_trendy( item/familiar/skill/string )

boolean is_unrestricted( item/familiar/skill/string )

void lock_familiar_equipment( boolean )

familiar my_bjorned_familiar()

familiar my_effective_familiar()

familiar my_enthroned_familiar()

familiar my_familiar()

float numeric_modifier( familiar, string, int, item )

familiar to_familiar( int )

familiar to_familiar( strict_string )

boolean use_familiar( familiar )


Proxy Record Fields

Here are the proxy record fields for familiars. Proxy records are discussed in more detail here.

Field Data type Default value ASH Accessor Function / Notes
hatchling item none
image string "debug.gif"
name string ""
charges int 0
drop_name string ""
drop_item item none
drops_today int 0
drops_limit int 0
combat boolean false
physical_damage boolean false
elemental_damage boolean false
block boolean false
delevel boolean false
hp_during_combat boolean false
mp_during_combat boolean false
other_action_during_combat boolean false
hp_after_combat boolean false
mp_after_combat boolean false
other_action_after_combat boolean false
passive boolean false
variable boolean false