変愚蛮怒のメインリポジトリです
Revision | f1a878c3131857601b3d8ee6356516e696a34d5a (tree) |
---|---|
Time | 2019-02-25 13:24:55 |
Author | deskull <deskull@user...> |
Commiter | deskull |
[Refactor] #37353 ハウンド召喚を cast_summon_hound() に分離。 / Separate cast_summon_hound().
@@ -1247,25 +1247,8 @@ bool activate_artifact(object_type *o_ptr) | ||
1247 | 1247 | break; |
1248 | 1248 | |
1249 | 1249 | case ACT_SUMMON_HOUND: |
1250 | - { | |
1251 | - BIT_FLAGS mode = PM_ALLOW_GROUP; | |
1252 | - bool pet = !one_in_(5); | |
1253 | - if (pet) mode |= PM_FORCE_PET; | |
1254 | - else mode |= PM_NO_PET; | |
1255 | - | |
1256 | - if (summon_specific((pet ? -1 : 0), p_ptr->y, p_ptr->x, ((p_ptr->lev * 3) / 2), SUMMON_HOUND, mode, '\0')) | |
1257 | - { | |
1258 | - | |
1259 | - if (pet) | |
1260 | - msg_print(_("ハウンドがあなたの下僕として出現した。", | |
1261 | - "A group of hounds appear as your servant.")); | |
1262 | - else | |
1263 | - msg_print(_("ハウンドはあなたに牙を向けている!", | |
1264 | - "A group of hounds appear as your enemy!")); | |
1265 | - } | |
1266 | - | |
1250 | + if (!cast_summon_hound(p_ptr, (plev * 3) / 2)) return FALSE; | |
1267 | 1251 | break; |
1268 | - } | |
1269 | 1252 | |
1270 | 1253 | case ACT_SUMMON_DAWN: |
1271 | 1254 | { |
@@ -114,6 +114,25 @@ bool cast_summon_undead(player_type *creature_ptr, int power) | ||
114 | 114 | return TRUE; |
115 | 115 | } |
116 | 116 | |
117 | + | |
118 | +bool cast_summon_hound(player_type *creature_ptr, int power) | |
119 | +{ | |
120 | + BIT_FLAGS mode = PM_ALLOW_GROUP; | |
121 | + bool pet = !one_in_(5); | |
122 | + if (pet) mode |= PM_FORCE_PET; | |
123 | + else mode |= PM_NO_PET; | |
124 | + | |
125 | + if (summon_specific((pet ? -1 : 0), creature_ptr->y, creature_ptr->x, power, SUMMON_HOUND, mode, '\0')) | |
126 | + { | |
127 | + if (pet) | |
128 | + msg_print(_("ハウンドがあなたの下僕として出現した。", "A group of hounds appear as your servant.")); | |
129 | + else | |
130 | + msg_print(_("ハウンドはあなたに牙を向けている!", "A group of hounds appear as your enemy!")); | |
131 | + } | |
132 | + return TRUE; | |
133 | +} | |
134 | + | |
135 | + | |
117 | 136 | bool cast_summon_octopus(player_type *creature_ptr) |
118 | 137 | { |
119 | 138 | BIT_FLAGS mode = PM_ALLOW_GROUP; |
@@ -7,6 +7,7 @@ extern bool summon_named_creature(MONSTER_IDX who, POSITION oy, POSITION ox, MON | ||
7 | 7 | extern bool trump_summoning(int num, bool pet, POSITION y, POSITION x, DEPTH lev, int type, BIT_FLAGS mode); |
8 | 8 | extern bool cast_summon_demon(int power); |
9 | 9 | extern bool cast_summon_undead(player_type *creature_ptr, int power); |
10 | +extern bool cast_summon_hound(player_type *creature_ptr, int power); | |
10 | 11 | extern bool cast_summon_octopus(player_type *creature_ptr); |
11 | 12 | extern bool item_tester_offer(object_type *o_ptr); |
12 | 13 | extern bool cast_summon_greater_demon(void); |