本文整理汇总了C++中monster::stumble方法的典型用法代码示例。如果您正苦于以下问题:C++ monster::stumble方法的具体用法?C++ monster::stumble怎么用?C++ monster::stumble使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类monster
的用法示例。
在下文中一共展示了monster::stumble方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: boomer_glow
void mdeath::boomer_glow( monster &z )
{
std::string explode = string_format( _( "a %s explode!" ), z.name() );
sounds::sound( z.pos(), 24, sounds::sound_t::combat, explode, false, "explosion", "small" );
for( auto &&dest : g->m.points_in_radius( z.pos(), 1 ) ) { // *NOPAD*
g->m.bash( dest, 10 );
if( monster *const z = g->critter_at<monster>( dest ) ) {
z->stumble();
z->moves -= 250;
}
if( Creature *const critter = g->critter_at( dest ) ) {
critter->add_env_effect( effect_boomered, bp_eyes, 5, 25_turns );
for( int i = 0; i < rng( 2, 4 ); i++ ) {
body_part bp = random_body_part();
critter->add_env_effect( effect_glowing, bp, 4, 4_minutes );
if( critter != nullptr && critter->has_effect( effect_glowing ) ) {
break;
}
}
}
}
g->m.propagate_field( z.pos(), fd_bile, 30, 2 );
}
示例2: boomer
void mdeath::boomer( monster &z )
{
std::string explode = string_format( _( "a %s explode!" ), z.name() );
sounds::sound( z.pos(), 24, sounds::sound_t::combat, explode, false, "explosion", "small" );
for( auto &&dest : g->m.points_in_radius( z.pos(), 1 ) ) { // *NOPAD*
g->m.bash( dest, 10 );
if( monster *const z = g->critter_at<monster>( dest ) ) {
z->stumble();
z->moves -= 250;
}
}
if( rl_dist( z.pos(), g->u.pos() ) == 1 ) {
g->u.add_env_effect( effect_boomered, bp_eyes, 2, 24_turns );
}
g->m.propagate_field( z.pos(), fd_bile, 15, 1 );
}