Familiar: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Zarqon
oops, forgot a few
imported>Aventuristo
Add to Data Types category; add proxy record boilerplate
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
This page has ASH functions and constants related to familiars.
{{DISPLAYTITLE:familiar}}


== Basic Familiar Functions ==
{{TOCright}}
'''familiar [[my_familiar()]]''' - returns the familiar you currently have equipped.


'''boolean [[have_familiar()|have_familiar( familiar pet )]]''' - returns ''true'' if you have the specified familiar in your Terrarium (or "equipped").  Otherwise, returns ''false''.
This data type represents any familiar available in KoL.


'''boolean [[use_familiar()|use_familiar( familiar pet )]]''' - equips the specified familiar.
The full range, besides $familiar[ none ], is too much to list and keep up
with here: please see the Wiki {{kolwiki|Familiars}} page for more information.


'''int [[familiar_weight()|familiar_weight( familiar pet )]]''' - returns the raw, unbuffed weight of the specified familiar.
==Related Functions==


'''item [[familiar_equipment()|familiar_equipment( familiar pet )]]''' - returns the item that is most common to <tt>pet</tt>.
{{Flink|boolean|bjornify_familiar|familiar}}
{{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}}


==Proxy Record Fields==


== Datatype Conversions ==
Here are the proxy record fields for familiars.  Proxy records are discussed in more
'''string [[to_string()|to_string( familiar pet )]]''' - returns the string name of <tt>pet</tt>.
detail [[Proxy Records|here]].


'''familiar [[to_familiar()|to_familiar( string str )]]''' - returns <code>$familiar[str]</code> from the string given.
{| cellpadding="3" cellspacing="0" border="1px" class="sortable"
|- | 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
|
|}


'''int [[to_int()|to_int( familiar pet )]]''' - returns the KoL number of familiar <tt>pet</tt> for raw URL building.
[[Category:Scripting]] [[Category:Data Types]]
 
'''familiar [[to_familiar()|to_familiar( int nFamiliar )]]''' - returns <code>$familiar[pet]</code> from the KoL number of the familiar.
 
 
== $familiar[constant] ==
* Mosquito
* Leprechaun
* Levitating Potato
* Angry Goat
* Sabre-Toothed Lime
* Fuzzy Dice
* Spooky Pirate Skeleton
* Barrrnacle
* Howling Balloon Monkey
* Stab Bat
* Grue
* Blood-Faced Volleyball
* none
* Ghuol Whelp
* Baby Gravy Fairy
* Cocoabo
* Star Starfish
* Hovering Sombrero
* Ghost Pickle on a Stick
* Killer Bee
* Whirling Maple Leaf
* Coffee Pixie
* Cheshire Bat
* Jill-O-Lantern
* Hand Turkey
* Crimbo Elf
* Hanukkimbo Dreidl
* Baby Yeti
* Feather Boa Constrictor
* Emo Squid
* Personal Raincloud
* Clockwork Grapefruit
* MagiMechTech MicroMechaMech
* Flaming Gravy Fairy
* Frozen Gravy Fairy
* Stinky Gravy Fairy
* Spooky Gravy Fairy
* Inflatable Dodecapede
* Pygmy Bugbear Shaman
* Doppelshifter
* Attention-Deficit Demon
* Cymbal-Playing Monkey
* Temporal Riftlet
* Sweet Nutcracker
* Pet Rock
* Snowy Owl
* Teddy Bear
* Ninja Pirate Zombie Robot
* Sleazy Gravy Fairy
* Wild Hare
* Wind-up Chattering Teeth
* Spirit Hobo
* Astral Badger
* Comma Chameleon
* Misshapen Animal Skeleton
* Scary Death Orb
* Jitterbug
* Nervous Tick
* Reassembled Blackbird
* Origami Towel Crane
* Ninja Snowflake
* Evil Teddy Bear
* Toothsome Rock
* none
* Ancient Yuletide Troll
* Dandy Lion
* O.A.F.
* Penguin Goodfella
* Jumpsuited Hound Dog
* Green Pixie
* Ragamuffin Imp
* Exotic Parrot
* Wizard Action Figure
* Gluttonous Green Ghost
* Casagnova Gnome
* Hunchbacked Minion
* Crimbo P. R. E. S. S. I. E.
* Bulky Buddy Box
* Teddy Borg
* RoboGoose
* El Vibrato Megadrone
* Mad Hatrack
* Hobo Monkey
* Llama Lama
* Cotton Candy Carnie
* Disembodied Hand
* Black Cat
* Uniclops
* Psychedelic Bear
* Baby Mutant Rattlesnake
* Mutant Fire Ant
* Mutant Cactus Bud
* Mutant Gila Monster
* Cuddlefish
* Sugar Fruit Fairy
* Imitation Crab
* Pair of Ragged Claws
* Magic Dragonfish

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