• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision2e085b31c55769e03bd51519d255af3620121cd7 (tree)
Time2018-12-13 21:28:50
AuthorDeskull <deskull@user...>
CommiterDeskull

Log Message

[Feature] #38796 マーフォーク用の水流耐性実装。 / Implement resist water for Merfolk.

Change Summary

Incremental Difference

--- a/src/spells1.c
+++ b/src/spells1.c
@@ -5412,19 +5412,21 @@ static bool project_p(MONSTER_IDX who, cptr who_name, int r, POSITION y, POSITIO
54125412 if (fuzzy) msg_print(_("何か湿ったもので攻撃された!", "You are hit by something wet!"));
54135413 if (!CHECK_MULTISHADOW())
54145414 {
5415- if (!p_ptr->resist_sound)
5415+ if (!p_ptr->resist_sound && !p_ptr->resist_water)
54165416 {
54175417 set_stun(p_ptr->stun + randint1(40));
54185418 }
5419- if (!p_ptr->resist_conf)
5419+ if (!p_ptr->resist_conf && !p_ptr->resist_water)
54205420 {
54215421 set_confused(p_ptr->confused + randint1(5) + 5);
54225422 }
54235423
5424- if (one_in_(5))
5424+ if (one_in_(5) && !p_ptr->resist_water)
54255425 {
54265426 inven_damage(set_cold_destroy, 3);
54275427 }
5428+
5429+ if (p_ptr->resist_water) get_damage /= 4;
54285430 }
54295431
54305432 get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
@@ -5947,9 +5949,7 @@ static bool project_p(MONSTER_IDX who, cptr who_name, int r, POSITION y, POSITIO
59475949
59485950 learn_spell(monspell);
59495951 p_ptr->redraw |= (PR_MANA);
5950-
5951- p_ptr->window |= (PW_PLAYER);
5952- p_ptr->window |= (PW_SPELL);
5952+ p_ptr->window |= (PW_PLAYER | PW_SPELL);
59535953
59545954 if (who > 0)
59555955 {
--- a/src/types.h
+++ b/src/types.h
@@ -1248,6 +1248,7 @@ struct player_type
12481248 bool resist_neth; /* Resist nether */
12491249 bool resist_fear; /* Resist fear */
12501250 bool resist_time; /* Resist time */
1251+ bool resist_water; /* Resist water */
12511252
12521253 bool reflect; /* Reflect 'bolt' attacks */
12531254 bool sh_fire; /* Fiery 'immolation' effect */
--- a/src/xtra1.c
+++ b/src/xtra1.c
@@ -3290,6 +3290,7 @@ void calc_bonuses(void)
32903290 p_ptr->resist_blind = FALSE;
32913291 p_ptr->resist_neth = FALSE;
32923292 p_ptr->resist_time = FALSE;
3293+ p_ptr->resist_water = FALSE;
32933294 p_ptr->resist_fear = FALSE;
32943295 p_ptr->reflect = FALSE;
32953296 p_ptr->sh_fire = FALSE;
@@ -3770,6 +3771,8 @@ void calc_bonuses(void)
37703771 p_ptr->resist_pois = TRUE;
37713772 p_ptr->hold_exp = TRUE;
37723773 break;
3774+ case RACE_MERFOLK:
3775+ p_ptr->resist_water = TRUE;
37733776 default:
37743777 /* Do nothing */
37753778 ;
Show on old repository browser