Changeset 420
- Timestamp:
- 08/01/07 10:07:00 (1 year ago)
- Files:
-
- trunk/src/effects.c (modified) (3 diffs)
- trunk/src/effects.h (modified) (1 diff)
- trunk/src/externs.h (modified) (1 diff)
- trunk/src/obj-info.c (modified) (3 diffs)
- trunk/src/spells2.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/effects.c
r419 r420 248 248 case EF_CURE_LIGHT: 249 249 { 250 if (h p_player(damroll(2, 8))) *ident = TRUE;250 if (heal_player(5, 10)) *ident = TRUE; 251 251 if (clear_timed(TMD_BLIND)) *ident = TRUE; 252 252 if (dec_timed(TMD_CUT, 10)) *ident = TRUE; … … 256 256 case EF_CURE_SERIOUS: 257 257 { 258 if (h p_player(damroll(4, 8))) *ident = TRUE;258 if (heal_player(15, 21)) *ident = TRUE; 259 259 if (set_timed(TMD_CUT, (p_ptr->timed[TMD_CUT] / 2) - 50)) *ident = TRUE; 260 260 if (clear_timed(TMD_BLIND)) *ident = TRUE; … … 266 266 case EF_CURE_CRITICAL: 267 267 { 268 if (h p_player(damroll(6, 8))) *ident = TRUE;268 if (heal_player(30, 30)) *ident = TRUE; 269 269 if (clear_timed(TMD_BLIND)) *ident = TRUE; 270 270 if (clear_timed(TMD_CONFUSED)) *ident = TRUE; trunk/src/effects.h
r415 r420 60 60 EFFECT(CURE_BODY, FALSE, "heals cut damage, and cures stunning, poison and blindness") 61 61 62 EFFECT(CURE_LIGHT, FALSE, " restores 2d8 hit points,heals some cut damage and cures blindness")63 EFFECT(CURE_SERIOUS, FALSE, " restores 4d8 hit points, heals some cut damage and cures blindness and confusion")64 EFFECT(CURE_CRITICAL, FALSE, " restores 6d8 hit points, heals cut damage, and cures poison, blindness, and confusion")62 EFFECT(CURE_LIGHT, FALSE, "heals you a little (5% or 12HP), and heals some cut damage and cures blindness") 63 EFFECT(CURE_SERIOUS, FALSE, "heals you a little (15% or 21HP), heals some cut damage and cures blindness and confusion") 64 EFFECT(CURE_CRITICAL, FALSE, "heals you a little (30% or 30HP), heals cut damage, and cures poison, blindness, and confusion") 65 65 EFFECT(CURE_FULL, FALSE, "restores 300 hit points, heals cut damage, and cures stunning, poison, blindness, and confusion") 66 66 EFFECT(CURE_FULL2, FALSE, "restores 1200 hit points, heals cut damage, and cures stunning, poison, blindness, and confusion") trunk/src/externs.h
r410 r420 516 516 /* spells2.c */ 517 517 extern bool hp_player(int num); 518 extern bool heal_player(int perc, int min); 518 519 extern void warding_glyph(void); 519 520 extern bool do_dec_stat(int stat); trunk/src/obj-info.c
r404 r420 519 519 520 520 int effect, base, dice, sides; 521 char temp[] = "x";522 521 523 522 if (o_ptr->name1) … … 566 565 do 567 566 { 568 temp[0] = *desc;569 570 567 if (isdigit((unsigned char) *desc) || isdigit((unsigned char) *(desc + 1))) 571 text_out_c(TERM_L_GREEN, temp);568 text_out_c(TERM_L_GREEN, "%c", *desc); 572 569 else 573 text_out( temp);570 text_out("%c", *desc); 574 571 } while (*desc++); 575 572 … … 637 634 bool unique = (r_info[o_ptr->origin_xtra].flags1 & RF1_UNIQUE) ? TRUE : FALSE; 638 635 639 text_out("dropped by %s%s", is_a_vowel(name[0]) ? "an " : "a ", name); 636 text_out("dropped by "); 637 638 if (unique) 639 text_out("%s", name); 640 else 641 text_out("%s%s", is_a_vowel(name[0]) ? "an " : "a ", name); 640 642 641 643 break; trunk/src/spells2.c
r399 r420 39 39 p_ptr->window |= (PW_PLAYER_0 | PW_PLAYER_1); 40 40 41 /* Heal 0-4*/41 /* Print a nice message */ 42 42 if (num < 5) 43 {44 43 msg_print("You feel a little better."); 45 }46 47 /* Heal 5-14 */48 44 else if (num < 15) 49 {50 45 msg_print("You feel better."); 51 }52 53 /* Heal 15-34 */54 46 else if (num < 35) 55 {56 47 msg_print("You feel much better."); 57 }58 59 /* Heal 35+ */60 48 else 61 {62 49 msg_print("You feel very good."); 63 }64 50 65 51 /* Notice */ … … 70 56 return (FALSE); 71 57 } 58 59 60 /* 61 * Heal the player by a given percentage of his wounds, or a minimum 62 * amount, whichever is larger. 63 * 64 * Copied wholesale from EyAngband. 65 */ 66 bool heal_player(int perc, int min) 67 { 68 int i; 69 70 /* Paranoia */ 71 if ((perc <= 0) && (min <= 0)) return (FALSE); 72 73 74 /* No healing needed */ 75 if (p_ptr->chp >= p_ptr->mhp) return (FALSE); 76 77 /* Figure healing level */ 78 i = ((p_ptr->mhp - p_ptr->chp) * perc) / 100; 79 80 /* Enforce minimums */ 81 if (i < min) i = min; 82 83 /* Actual healing */ 84 return hp_player(i); 85 } 86 87 72 88 73 89
