OSDN Git Service

カオス魔法を失敗した場合, またはシャッフルの運命の輪による劣化ではpvalを減少しないように変更.
author_nothere <_nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Thu, 18 Apr 2002 17:44:58 +0000 (17:44 +0000)
committer_nothere <_nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Thu, 18 Apr 2002 17:44:58 +0000 (17:44 +0000)
src/cmd5.c
src/spells3.c

index dec05c7..08b9b2d 100644 (file)
@@ -1001,7 +1001,7 @@ void wild_magic(int spell)
                break;
        case 29:
        case 30:
-               apply_disenchant(0);
+               apply_disenchant(1);
                break;
        case 31:
                lose_all_info();
index 48df39b..117ceeb 100644 (file)
@@ -866,8 +866,6 @@ msg_format("%s
  *
  * XXX XXX XXX This function is also called from the "melee" code
  *
- * The "mode" is currently unused.
- *
  * Return "TRUE" if the player notices anything
  */
 bool apply_disenchant(int mode)
@@ -877,11 +875,6 @@ bool apply_disenchant(int mode)
        char            o_name[MAX_NLEN];
        int to_h, to_d, to_a, pval;
 
-
-       /* Unused */
-       mode = mode;
-
-
        /* Pick a random slot */
        switch (randint1(8))
        {
@@ -951,7 +944,8 @@ msg_format("%s(%c)
        if ((o_ptr->to_a > 5) && (randint0(100) < 20)) o_ptr->to_a--;
 
        /* Disenchant pval (occasionally) */
-       if ((o_ptr->pval > 1) && one_in_(13)) o_ptr->pval--;
+       /* Unless called from wild_magic() */
+       if ((o_ptr->pval > 1) && one_in_(13) && !(mode & 0x01)) o_ptr->pval--;
 
        if ((to_h != o_ptr->to_h) || (to_d != o_ptr->to_d) ||
            (to_a != o_ptr->to_a) || (pval != o_ptr->pval))