… | |
… | |
3524 | //TODO: unapplying should unapply the skill, though |
3524 | //TODO: unapplying should unapply the skill, though |
3525 | SET_FLAG (op, FLAG_APPLIED); |
3525 | SET_FLAG (op, FLAG_APPLIED); |
3526 | break; |
3526 | break; |
3527 | |
3527 | |
3528 | case SKILL: |
3528 | case SKILL: |
3529 | if (skill_flags [op->subtype] & SF_NEED_ITEM && !(aflags & AP_NO_SLOT)) |
3529 | if (!(aflags & AP_NO_SLOT)) |
3530 | { |
3530 | { |
|
|
3531 | // skill is used on it's own, as opposed to being a chosen_skill |
|
|
3532 | |
|
|
3533 | if (skill_flags [op->subtype] & (SF_NEED_ITEM | SF_MANA)) |
|
|
3534 | { |
3531 | who->failmsg (format ( |
3535 | who->failmsg (format ( |
3532 | "You feel as if you wanted to do something funny, but you can't remember what. " |
3536 | "You feel as if you wanted to do something funny, but you can't remember what. " |
3533 | "H<The %s skill needs an item to function, it cannot be used on its own.>", |
3537 | "H<The %s skill needs something else to function, for example a tool, weapon, rod, or spell. " |
|
|
3538 | "It cannot be used on its own.>", |
3534 | &op->skill |
3539 | &op->skill |
3535 | )); |
3540 | )); |
3536 | if (tmp) who->insert (tmp); |
3541 | if (tmp) who->insert (tmp); |
3537 | return 1; |
3542 | return 1; |
3538 | } |
3543 | } |
3539 | |
3544 | |
3540 | if (player *pl = who->contr) |
3545 | if (skill_flags [op->subtype] & SF_AUTARK |
|
|
3546 | || !(skill_flags [op->subtype] & (SF_COMBAT | SF_RANGED))) |
3541 | { |
3547 | { |
3542 | if (op->invisible) |
3548 | if (skill_flags [op->subtype] & SF_USE) |
3543 | who->statusmsg (format ("Readied skill: %s.", op->skill ? &op->skill : &op->name)); |
3549 | who->failmsg (format ( |
|
|
3550 | "You feel as if you wanted to do something funny, but you can't remember what. " |
|
|
3551 | "H<The %s skill cannot be readied, instead, try C<use_skill %s>.>", |
|
|
3552 | &op->skill, &op->skill |
|
|
3553 | )); |
3544 | else |
3554 | else |
|
|
3555 | who->failmsg (format ( |
|
|
3556 | "You feel as if you wanted to do something funny, but you can't remember what. " |
|
|
3557 | "H<The %s skill cannot be readied or used, it is always active.>", |
|
|
3558 | &op->skill, &op->skill |
|
|
3559 | )); |
|
|
3560 | |
|
|
3561 | if (tmp) who->insert (tmp); |
|
|
3562 | return 1; |
|
|
3563 | } |
|
|
3564 | |
|
|
3565 | if (who->contr) |
3545 | who->statusmsg (format ( |
3566 | who->statusmsg (format ( |
3546 | "You ready %s." |
3567 | op->invisible ? "You can now use the %s skill." : "You ready %s.", |
3547 | "You can now use the %s skill.", |
|
|
3548 | query_name (op), |
3568 | query_name (op), |
3549 | &op->skill |
3569 | &op->skill |
3550 | )); |
3570 | )); |
3551 | } |
3571 | } |
3552 | |
3572 | |