Adv cost
Function Syntax
- 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
Checks if the skill will use adventures and asks to confirm before using the skill.
boolean use_skill_confirm(skill sk) {
if(adv_cost(sk) > 0) {
string confirmMessage = "This skill will cost " + adv_cost(sk) + " adventures if you cast it."
+ "\n Do you want to continue?";
return user_confirm(confirmMessage) && use_skill(1, sk);
}
}