void talk_function::follow( npc &p )
{
    g->add_npc_follower( p.getID() );
    p.set_attitude( NPCATT_FOLLOW );
    p.set_fac( faction_id( "your_followers" ) );
    g->u.cash += p.cash;
    p.cash = 0;
}
示例#2
0
faction_template::faction_template( JsonObject &jsobj )
    : name( jsobj.get_string( "name" ) )
    , likes_u( jsobj.get_int( "likes_u" ) )
    , respects_u( jsobj.get_int( "respects_u" ) )
    , known_by_u( jsobj.get_bool( "known_by_u" ) )
    , id( faction_id( jsobj.get_string( "id" ) ) )
    , desc( jsobj.get_string( "description" ) )
    , strength( jsobj.get_int( "strength" ) )
    , sneak( jsobj.get_int( "sneak" ) )
    , crime( jsobj.get_int( "crime" ) )
    , cult( jsobj.get_int( "cult" ) )
    , good( jsobj.get_int( "good" ) )
    , size( jsobj.get_int( "size" ) )
    , power( jsobj.get_int( "power" ) )
    , combat_ability( jsobj.get_int( "combat_ability" ) )
    , food_supply( jsobj.get_int( "food_supply" ) )
    , wealth( jsobj.get_int( "wealth" ) )
{
}