OSDN Git Service

破邪。まだ作ってる途中。
[hengbandforosx/hengbandosx.git] / src / spells1.c
index e566087..b672710 100644 (file)
@@ -666,8 +666,6 @@ static bool project_f(int who, int r, int y, int x, int dam, int typ)
                        msg_format("A tree %s", message);
 #endif
                        c_ptr->feat = (one_in_(3) ? FEAT_DEEP_GRASS : FEAT_GRASS);
-                       c_ptr->info &= ~(CAVE_MASK);
-                       c_ptr->info |= CAVE_FLOOR;
 
                        /* Observe */
                        if (c_ptr->info & (CAVE_MARK)) obvious = TRUE;
@@ -755,8 +753,6 @@ msg_print("
                                else
                                {
                                        c_ptr->feat = floor_type[randint0(100)];
-                                       c_ptr->info &= ~(CAVE_MASK);
-                                       c_ptr->info |= CAVE_FLOOR;
                                }
                        }
 
@@ -826,8 +822,6 @@ msg_print("
                                else
                                {
                                        c_ptr->feat = floor_type[randint0(100)];
-                                       c_ptr->info &= ~(CAVE_MASK);
-                                       c_ptr->info |= CAVE_FLOOR;
                                }
                        }
 
@@ -893,8 +887,6 @@ msg_print("
 
                                /* Destroy the wall */
                                c_ptr->feat = floor_type[randint0(100)];
-                               c_ptr->info &= ~(CAVE_MASK);
-                               c_ptr->info |= CAVE_FLOOR;
                        }
 
                        /* Quartz / Magma with treasure */
@@ -919,8 +911,6 @@ msg_print("
 
                                /* Destroy the wall */
                                c_ptr->feat = floor_type[randint0(100)];
-                               c_ptr->info &= ~(CAVE_MASK);
-                               c_ptr->info |= CAVE_FLOOR;
 
                                /* Place some gold */
                                place_gold(y, x);
@@ -946,8 +936,6 @@ msg_print("
 
                                /* Destroy the wall */
                                c_ptr->feat = floor_type[randint0(100)];
-                               c_ptr->info &= ~(CAVE_MASK);
-                               c_ptr->info |= CAVE_FLOOR;
                        }
 
                        /* Rubble */
@@ -970,8 +958,6 @@ msg_print("
 
                                /* Destroy the rubble */
                                c_ptr->feat = floor_type[randint0(100)];
-                               c_ptr->info &= ~(CAVE_MASK);
-                               c_ptr->info |= CAVE_FLOOR;
 
                                /* Hack -- place an object */
                                if (randint0(100) < 10)
@@ -1013,8 +999,6 @@ msg_print("
 
                                /* Destroy the feature */
                                c_ptr->feat = floor_type[randint0(100)];
-                               c_ptr->info &= ~(CAVE_MASK);
-                               c_ptr->info |= CAVE_FLOOR;
                        }
 
                        /* Notice */
@@ -1591,7 +1575,7 @@ note_kill = "
                                                        }
                                                        continue;
                                                }
-                                               else if (summon_named_creature(y, x, o_ptr->pval, FALSE, FALSE, friendly, pet))
+                                               else if (summon_named_creature(who, y, x, o_ptr->pval, FALSE, FALSE, friendly, pet))
                                                {
 #ifdef JP
 note_kill = "À¸¤­Ê֤ä¿¡£";
@@ -1967,7 +1951,7 @@ note = "
                                dam /= 9;
                                if (seen) r_ptr->r_flags3 |= (RF3_IM_FIRE);
                        }
-                       if (r_ptr->flags3 & (RF3_HURT_FIRE))
+                       else if (r_ptr->flags3 & (RF3_HURT_FIRE))
                        {
 #ifdef JP
 note = "¤Ï¤Ò¤É¤¤Ä˼ê¤ò¤¦¤±¤¿¡£";
@@ -2007,7 +1991,7 @@ note = "
                                dam /= 9;
                                if (seen) r_ptr->r_flags3 |= (RF3_IM_COLD);
                        }
-                       if (r_ptr->flags3 & (RF3_HURT_COLD))
+                       else if (r_ptr->flags3 & (RF3_HURT_COLD))
                        {
 #ifdef JP
 note = "¤Ï¤Ò¤É¤¤Ä˼ê¤ò¤¦¤±¤¿¡£";
@@ -3275,6 +3259,17 @@ note = "
                                dam /= 9;
                                if (seen) r_ptr->r_flags3 |= (RF3_IM_COLD);
                        }
+                       else if (r_ptr->flags3 & (RF3_HURT_COLD))
+                       {
+#ifdef JP
+note = "¤Ï¤Ò¤É¤¤Ä˼ê¤ò¤¦¤±¤¿¡£";
+#else
+                               note = " is hit hard.";
+#endif
+
+                               dam *= 2;
+                               if (seen) r_ptr->r_flags3 |= (RF3_HURT_COLD);
+                       }
                        break;
                }
 
@@ -5680,6 +5675,56 @@ note_dies = "
                        break;
                }
 
+               case GF_CRUSADE:
+               {
+                       bool success = FALSE;
+                       if (seen) obvious = TRUE;
+
+                       if ((r_ptr->flags3 & (RF3_GOOD)) && !p_ptr->inside_arena)
+                       {
+                               if (r_ptr->flags3 & (RF3_NO_CONF)) dam -= 50;
+                               if (dam < 1) dam = 1;
+
+                               /* Attempt a saving throw */
+                               if ((r_ptr->flags1 & (RF1_QUESTOR)) ||
+                                   (r_ptr->flags1 & (RF1_UNIQUE)) ||
+                                   (m_ptr->mflag2 & MFLAG_NOPET) ||
+                                   (p_ptr->cursed & TRC_AGGRAVATE) ||
+                                        ((r_ptr->level+10) > randint1(dam)))
+                               {
+                                       /* Resist */
+                                       if (one_in_(4)) m_ptr->mflag2 |= MFLAG_NOPET;
+                               }
+                               else
+                               {
+#ifdef JP
+note = "¤ò»ÙÇÛ¤·¤¿¡£";
+#else
+                                       note = " is tamed!";
+#endif
+
+                                       set_pet(m_ptr);
+                                       m_ptr->fast = MIN(200, m_ptr->fast + 100);
+
+                                       /* Learn about type */
+                                       if (seen) r_ptr->r_flags3 |= (RF3_GOOD);
+                                       success = TRUE;
+                               }
+                       }
+
+                       if (!success)
+                       {
+                               if (!(r_ptr->flags3 & RF3_NO_FEAR))
+                               {
+                                       do_fear = randint1(90)+10;
+                               }
+                       }
+
+                       /* No "real" damage */
+                       dam = 0;
+                       break;
+               }
+
                /* Default */
                default:
                {
@@ -7670,8 +7715,6 @@ void breath_shape(u16b *path_g, int dist, int *pgrids, byte *gx, byte *gy, byte
                                                        else
                                                        {
                                                                cave[y][x].feat = floor_type[randint0(100)];
-                                                               cave[y][x].info &= ~(CAVE_MASK);
-                                                               cave[y][x].info |= CAVE_FLOOR;
                                                        }
                                                }
                                                /* Update some things -- similar to GF_KILL_WALL */
@@ -8115,7 +8158,7 @@ bool project(int who, int rad, int y, int x, int dam, int typ, int flg, int mons
                                            monster_type *m_ptr = &m_list[cave[project_m_y][project_m_x].m_idx];
 
                                            /* Hack -- auto-recall */
-                                           if (m_ptr->ml) monster_race_track((bool)(m_ptr->mflag2 & MFLAG_KAGE), m_ptr->r_idx);
+                                           if (m_ptr->ml) monster_race_track(m_ptr->ap_r_idx);
 
                                            /* Hack - auto-track */
                                            if (m_ptr->ml) health_track(cave[project_m_y][project_m_x].m_idx);
@@ -8138,7 +8181,7 @@ bool project(int who, int rad, int y, int x, int dam, int typ, int flg, int mons
                            monster_type *m_ptr = &m_list[cave[project_m_y][project_m_x].m_idx];
                            
                            /* Hack -- auto-recall */
-                           if (m_ptr->ml) monster_race_track((bool)(m_ptr->mflag2 & MFLAG_KAGE), m_ptr->r_idx);
+                           if (m_ptr->ml) monster_race_track(m_ptr->ap_r_idx);
                            
                            /* Hack - auto-track */
                            if (m_ptr->ml) health_track(cave[project_m_y][project_m_x].m_idx);
@@ -8271,7 +8314,7 @@ bool project(int who, int rad, int y, int x, int dam, int typ, int flg, int mons
                            monster_type *m_ptr = &m_list[cave[project_m_y][project_m_x].m_idx];
                            
                            /* Hack -- auto-recall */
-                           if (m_ptr->ml) monster_race_track((bool)(m_ptr->mflag2 & MFLAG_KAGE), m_ptr->r_idx);
+                           if (m_ptr->ml) monster_race_track(m_ptr->ap_r_idx);
                            
                            /* Hack - auto-track */
                            if (m_ptr->ml) health_track(cave[project_m_y][project_m_x].m_idx);
@@ -8451,8 +8494,6 @@ bool project(int who, int rad, int y, int x, int dam, int typ, int flg, int mons
                                                                else
                                                                {
                                                                        cave[y][x].feat = floor_type[randint0(100)];
-                                                                       cave[y][x].info &= ~(CAVE_MASK);
-                                                                       cave[y][x].info |= CAVE_FLOOR;
                                                                }
                                                        }
 
@@ -8743,7 +8784,7 @@ else msg_print("
                                monster_type *m_ptr = &m_list[cave[y][x].m_idx];
 
                                /* Hack -- auto-recall */
-                               if (m_ptr->ml) monster_race_track((bool)(m_ptr->mflag2 & MFLAG_KAGE), m_ptr->r_idx);
+                               if (m_ptr->ml) monster_race_track(m_ptr->ap_r_idx);
 
                                /* Hack - auto-track */
                                if (m_ptr->ml) health_track(cave[y][x].m_idx);