diff --git a/include/extern.h b/include/extern.h index b5758eef7..e12f290a2 100644 --- a/include/extern.h +++ b/include/extern.h @@ -2249,6 +2249,7 @@ extern void mongrantswish(struct monst **); extern void djinni_from_bottle(struct obj *); extern struct monst *split_mon(struct monst *, struct monst *); extern const char *bottlename(void); +extern void speed_up(long); /* ### pray.c ### */ diff --git a/src/potion.c b/src/potion.c index 668068dc4..91aa6c825 100644 --- a/src/potion.c +++ b/src/potion.c @@ -1036,14 +1036,13 @@ peffect_speed(struct obj *otmp) return; } - if (!Very_fast) { /* wwf@doe.carleton.ca */ - You("are suddenly moving %sfaster.", Fast ? "" : "much "); - } else { - Your("%s get new energy.", makeplural(body_part(LEG))); - gp.potion_unkn++; + speed_up(rn1(10, 100 + 60 * bcsign(otmp))); + + /* non-cursed potion grants intrinsic speed */ + if (is_speed && !otmp->cursed && !(HFast & INTRINSIC)) { + Your("quickness feels very natural."); + HFast |= FROMOUTSIDE; } - exercise(A_DEX, TRUE); - incr_itimeout(&HFast, rn1(10, 100 + 60 * bcsign(otmp))); } static void @@ -2787,4 +2786,17 @@ split_mon( return mtmp2; } +/* Character becomes very fast temporarily. */ +void +speed_up(long duration) +{ + if (!Very_fast) + You("are suddenly moving %sfaster.", Fast ? "" : "much "); + else + Your("%s get new energy.", makeplural(body_part(LEG))); + + exercise(A_DEX, TRUE); + incr_itimeout(&HFast, duration); +} + /*potion.c*/ diff --git a/src/zap.c b/src/zap.c index b9327a89e..16b6b4bf6 100644 --- a/src/zap.c +++ b/src/zap.c @@ -2698,15 +2698,9 @@ zapyourself(struct obj *obj, boolean ordinary) } case WAN_SPEED_MONSTER: - if (!(HFast & INTRINSIC)) { - learn_it = TRUE; - if (!Fast) - You("speed up."); - else - Your("quickness feels more natural."); - exercise(A_DEX, TRUE); - } - HFast |= FROMOUTSIDE; + /* no longer gives intrinsic, but gives very fast speed instead */ + speed_up(rn1(25, 50)); + learn_it = TRUE; break; case WAN_SLEEP: