Legend:
- Unmodified
- Added
- Removed
-
trunk/src/cmd-obj.c
r1448 r1449 401 401 static void obj_cast(object_type *o_ptr, int item) 402 402 { 403 int spell; 404 const magic_type *s_ptr; 405 int dir; 403 int spell, dir; 406 404 407 405 cptr verb = ((cp_ptr->spell_book == TV_MAGIC_BOOK) ? "cast" : "recite"); 408 cptr noun = ((cp_ptr->spell_book == TV_MAGIC_BOOK) ? "spell" : "prayer");406 cptr noun = ((cp_ptr->spell_book == TV_MAGIC_BOOK) ? "spell" : "prayer"); 409 407 410 408 /* Track the object kind */ … … 418 416 if (spell == -2) msg_format("You don't know any %ss in that book.", noun); 419 417 return; 420 }421 422 /* Get the spell */423 s_ptr = &mp_ptr->info[spell];424 425 /* Verify "dangerous" spells */426 if (s_ptr->smana > p_ptr->csp)427 {428 /* Warning */429 msg_format("You do not have enough mana to %s this %s.", verb, noun);430 431 /* Flush input */432 flush();433 434 /* Verify */435 if (!get_check("Attempt it anyway? ")) return;436 418 } 437 419 -
trunk/src/cmd5.c
r1437 r1449 569 569 int i; 570 570 571 cptr p = ((cp_ptr->spell_book == TV_MAGIC_BOOK) ? "spell" : "prayer"); 571 cptr verb = ((cp_ptr->spell_book == TV_MAGIC_BOOK) ? "cast" : "recite"); 572 cptr noun = ((cp_ptr->spell_book == TV_MAGIC_BOOK) ? "spell" : "prayer"); 572 573 573 574 /* Check the player can cast spells at all */ … … 586 587 if (spell_okay(spell, TRUE, FALSE)) 587 588 { 589 /* Get the spell */ 590 const magic_type *s_ptr = &mp_ptr->info[spell]; 591 592 /* Verify "dangerous" spells */ 593 if (s_ptr->smana > p_ptr->csp) 594 { 595 /* Warning */ 596 msg_format("You do not have enough mana to %s this %s.", verb, noun); 597 598 /* Flush input */ 599 flush(); 600 601 /* Verify */ 602 if (!get_check("Attempt it anyway? ")) return; 603 } 604 588 605 /* Cast a spell */ 589 606 if (spell_cast(spell, dir)) … … 593 610 { 594 611 /* Spell is present, but player incapable. */ 595 msg_format("You cannot cast that %p.", p);612 msg_format("You cannot %s that %s.", verb, noun); 596 613 } 597 614
