OSDN Git Service

[Implement] 処理テストやソースコード改善のためさらに以下の修正を追加.
authorDeskull <61610939+sikabane-works@users.noreply.github.com>
Mon, 9 Aug 2021 10:30:58 +0000 (19:30 +0900)
committerDeskull <61610939+sikabane-works@users.noreply.github.com>
Mon, 9 Aug 2021 10:36:35 +0000 (19:36 +0900)
 * ウィザードモードの@コマンドで"ty curse"でactivate_ty_curse()をひとまず起こせる.
 * 血の呪いの分岐に念のためdefaultを追加.
 * 目印のコメント削除

src/spell-kind/blood-curse.cpp
src/spell-kind/spells-random.cpp
src/wizard/wizard-spells.cpp
src/wizard/wizard-spells.h

index 9002c02..82a9f74 100644 (file)
@@ -117,11 +117,12 @@ void blood_curse_to_enemy(player_type *caster_ptr, MONSTER_IDX m_idx)
             /* Fall through */
         case 26:
         case 27:
-        case 28: {
+        case 28:
+        default: {
             if (one_in_(13)) {
                 for (int i = 0; i < A_MAX; i++) {
                     do {
-                        (void)do_dec_stat(caster_ptr, i); //FIXED
+                        (void)do_dec_stat(caster_ptr, i);
                     } while(one_in_(2));
                 }
             } else {
index b4d79b2..d21c4f3 100644 (file)
@@ -220,7 +220,7 @@ bool activate_ty_curse(player_type *target_ptr, bool stop_ty, int *count)
         default:
             for (int i = 0; i < A_MAX; i++) {
                 do {
-                    (void)do_dec_stat(target_ptr, i); //FIXED
+                    (void)do_dec_stat(target_ptr, i);
                 } while(one_in_(2));
             }
         }
index ebb546a..6142591 100644 (file)
@@ -21,6 +21,7 @@
 #include "mutation/mutation-processor.h"
 #include "spell-kind/spells-launcher.h"
 #include "spell-kind/spells-teleport.h"
+#include "spell-kind/spells-random.h"
 #include "spell-realm/spells-chaos.h"
 #include "spell/spells-status.h"
 #include "spell/summon-types.h"
@@ -36,6 +37,7 @@ debug_spell_command debug_spell_commands_list[SPELL_MAX] = {
     { 2, "vanish dungeon", { .spell2 = { vanish_dungeon } } },
     { 3, "true healing", { .spell3 = { true_healing } } },
     { 2, "drop weapons", { .spell2 = { drop_weapons } } },
+    { 4, "ty curse", { .spell4 = { activate_ty_curse } } },
 };
 
 /*!
@@ -67,6 +69,10 @@ bool wiz_debug_spell(player_type *creature_ptr)
             (*(debug_spell_commands_list[i].command_function.spell3.spell_function))(creature_ptr, tmp_int);
             return true;
             break;
+        case 4:
+            (*(debug_spell_commands_list[i].command_function.spell4.spell_function))(creature_ptr, true, &tmp_int);
+            return true;
+            break;
         default:
             break;
         }
index ef9f32b..a7be2ee 100644 (file)
@@ -3,7 +3,7 @@
 #include "system/angband.h"
 #include "spell/spell-types.h"
 
-#define SPELL_MAX 3
+#define SPELL_MAX 4
 
 typedef struct floor_type floor_type;
 typedef struct player_type player_type;
@@ -20,6 +20,10 @@ typedef union spell_functions {
         bool (*spell_function)(player_type *, HIT_POINT);
     } spell3;
 
+    struct debug_spell_type4 { // 実質 ty curse
+        bool (*spell_function)(player_type *, bool, int*);
+    } spell4;
+
 } spell_functions;
 
 typedef struct debug_spell_command {