• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revision7fb495c9b1932053e04576a66913e5c2c0627dc5 (tree)
Time2019-02-28 21:46:23
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 人間トランプの処理を become_living_trump() に統合。 / Integrate realm magic of living to become_living_trump().

Change Summary

Incremental Difference

--- a/src/mutation.c
+++ b/src/mutation.c
@@ -2356,3 +2356,19 @@ bool mutation_power_aux(int power)
23562356
23572357 return TRUE;
23582358 }
2359+
2360+become_living_trump(player_type *creature_ptr)
2361+{
2362+ MUTATION_IDX mutation;
2363+
2364+ if (one_in_(7))
2365+ mutation = 12; /* Teleport control */
2366+ else
2367+ mutation = 77; /* Random teleportation (uncontrolled) */
2368+
2369+ /* Gain the mutation */
2370+ if (gain_mutation(creature_ptr, mutation))
2371+ {
2372+ msg_print(_("あなたは生きているカードに変わった。", "You have turned into a Living Trump."));
2373+ }
2374+}
--- a/src/mutation.h
+++ b/src/mutation.h
@@ -6,3 +6,4 @@ extern void dump_mutations(FILE *OutFile);
66 extern void do_cmd_knowledge_mutations(void);
77 extern int calc_mutant_regenerate_mod(void);
88 extern bool mutation_power_aux(int power);
9+extern become_living_trump(player_type *creature_ptr);
--- a/src/realm-craft.c
+++ b/src/realm-craft.c
@@ -479,26 +479,7 @@ concptr do_craft_spell(SPELL_IDX spell, BIT_FLAGS mode)
479479 if (name) return _("人間トランプ", "Living Trump");
480480 if (desc) return _("ランダムにテレポートする突然変異か、自分の意思でテレポートする突然変異が身につく。",
481481 "Gives mutation which makes you teleport randomly or makes you able to teleport at will.");
482-
483- {
484- if (cast)
485- {
486- MUTATION_IDX mutation;
487-
488- if (one_in_(7))
489- /* Teleport control */
490- mutation = 12;
491- else
492- /* Random teleportation (uncontrolled) */
493- mutation = 77;
494-
495- /* Gain the mutation */
496- if (gain_mutation(p_ptr, mutation))
497- {
498- msg_print(_("あなたは生きているカードに変わった。", "You have turned into a Living Trump."));
499- }
500- }
501- }
482+ if (cast) become_living_trump(p_ptr);
502483 break;
503484
504485 case 31:
--- a/src/realm-trump.c
+++ b/src/realm-trump.c
@@ -445,26 +445,7 @@ concptr do_trump_spell(SPELL_IDX spell, BIT_FLAGS mode)
445445 if (name) return _("人間トランプ", "Living Trump");
446446 if (desc) return _("ランダムにテレポートする突然変異か、自分の意思でテレポートする突然変異が身につく。",
447447 "Gives mutation which makes you teleport randomly or makes you able to teleport at will.");
448-
449- {
450- if (cast)
451- {
452- int mutation;
453-
454- if (one_in_(7))
455- /* Teleport control */
456- mutation = 12;
457- else
458- /* Random teleportation (uncontrolled) */
459- mutation = 77;
460-
461- /* Gain the mutation */
462- if (gain_mutation(p_ptr, mutation))
463- {
464- msg_print(_("あなたは生きているカードに変わった。", "You have turned into a Living Trump."));
465- }
466- }
467- }
448+ if (cast) become_living_trump(p_ptr);
468449 break;
469450
470451 case 23:
Show on old repository browser