OSDN Git Service

[feature] ソースファイルをC++に対応
[hengbandforosx/hengbandosx.git] / src / effect / effect-monster.c
index 345fa12..93c206f 100644 (file)
@@ -402,7 +402,8 @@ static void process_monster_teleport(player_type *caster_ptr, effect_monster_typ
     if (!em_ptr->who)
         chg_virtue(caster_ptr, V_VALOUR, -1);
 
-    teleport_away(caster_ptr, em_ptr->g_ptr->m_idx, em_ptr->do_dist, (!em_ptr->who ? TELEPORT_DEC_VALOUR : 0L) | TELEPORT_PASSIVE);
+    teleport_flags tflag = static_cast<teleport_flags>((!em_ptr->who ? TELEPORT_DEC_VALOUR : TELEPORT_SPONTANEOUS) | TELEPORT_PASSIVE);
+    teleport_away(caster_ptr, em_ptr->g_ptr->m_idx, em_ptr->do_dist, tflag);
 
     em_ptr->y = em_ptr->m_ptr->fy;
     em_ptr->x = em_ptr->m_ptr->fx;
@@ -597,4 +598,4 @@ bool affect_monster(
 
     postprocess_spell(caster_ptr, em_ptr);
     return em_ptr->obvious;
-}
\ No newline at end of file
+}