mirror of
https://github.com/tbamud/tbamud.git
synced 2026-03-25 05:36:33 +01:00
Add skill gains on skill failures
This commit is contained in:
parent
00c475736c
commit
944dc92bc9
7 changed files with 104 additions and 37 deletions
|
|
@ -627,6 +627,7 @@ ACMD(do_cast) {
|
|||
/* You throws the dice and you takes your chances.. 101% is total failure */
|
||||
if (rand_number(0, 101) > GET_SKILL(ch, spellnum)) {
|
||||
WAIT_STATE(ch, PULSE_VIOLENCE);
|
||||
gain_skill(ch, s, FALSE);
|
||||
if (!tch || !skill_message(0, ch, tch, spellnum))
|
||||
send_to_char(ch, "You lost your concentration!\r\n");
|
||||
if (mana > 0)
|
||||
|
|
@ -636,6 +637,7 @@ ACMD(do_cast) {
|
|||
} else { /* cast spell returns 1 on success; subtract mana & set waitstate */
|
||||
if (cast_spell(ch, tch, tobj, spellnum)) {
|
||||
WAIT_STATE(ch, PULSE_VIOLENCE);
|
||||
gain_skill(ch, s, TRUE);
|
||||
if (mana > 0)
|
||||
GET_MANA(ch) = MAX(0, MIN(GET_MAX_MANA(ch), GET_MANA(ch) - mana));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue