Adv cost

From Kolmafia
Revision as of 06:45, 4 November 2014 by imported>Bale (add code and see also)
Jump to navigation Jump to search

Function Syntax

int adv_cost(skill use_me )

  • use_me is the skill to check the cost of

Returns the adventure cost for the next cast of the given skill use_me.

Code Samples

Asks user if they want to abort rather than expend adventures by casting a skill.

void adv_check(skill sk) {
   if(adv_cost(sk) > 0 && user_confirm("This skill will cost " + adv_cost(sk) + " adventures if you cast it. \n Do you want to continue?"))
      abort("Aborted by user because skill costs adventures to cast!");
}

See Also

soulsauce_cost() | mp_cost()