aggravate()
{
    register struct linked_list *mi;

    for (mi = mlist; mi != NULL; mi = next(mi))
	runto(THINGPTR(mi), &hero);
}
void
new_monster(THING *tp, int type, const coord *cp)
{
    struct monster *mp;
    int lev_add;

    if ((lev_add = level - AMULETLEVEL) < 0)
        lev_add = 0;
    attach(mlist, tp);
    tp->t_type = type;
    tp->t_disguise = type;
    tp->t_pos = *cp;
    move(cp->y, cp->x);
    tp->t_oldch = CCHAR( inch() );
    tp->t_room = roomin(cp);
    moat(cp->y, cp->x) = tp;
    mp = &monsters[tp->t_type-'A'];
    tp->t_stats.s_lvl = mp->m_stats.s_lvl + lev_add;
    tp->t_stats.s_maxhp = tp->t_stats.s_hpt = roll(tp->t_stats.s_lvl, 8);
    tp->t_stats.s_arm = mp->m_stats.s_arm - lev_add;
    strcpy(tp->t_stats.s_dmg,mp->m_stats.s_dmg);
    tp->t_stats.s_str = mp->m_stats.s_str;
    tp->t_stats.s_exp = mp->m_stats.s_exp + lev_add * 10 + exp_add(tp);
    tp->t_flags = mp->m_flags;
    if (level > 29)
        tp->t_flags |= ISHASTE;
    tp->t_turn = TRUE;
    tp->t_pack = NULL;
    if (ISWEARING(R_AGGR))
        runto(cp);
    if (type == 'X')
        tp->t_disguise = rnd_thing();
}
Exemple #3
0
void QedQcd::runto_safe(double scale, double eps)
{
   if (runto(scale, eps)) {
      throw flexiblesusy::NonPerturbativeRunningQedQcdError(
         std::string("Non-perturbative running to Q = ")
         + flexiblesusy::ToString(scale)
         + " during determination of the SM(5) parameters.");
   }
}
void
wanderer(void)
{
    THING *tp;
    coord cp;
    int cnt = 0;

    tp = new_item();
    do
    {
        /* Avoid endless loop when all rooms are filled with monsters
        * and the player room is not accessible to the monsters.
         */
        if (cnt++ >= 500)
        {
            discard(tp);
            return;
        }
        find_floor(NULL, &cp, FALSE, TRUE);
    } while (roomin(&cp) == proom && moat(cp.y, cp.x) == NULL);
    new_monster(tp, randmonster(TRUE), &cp);
    if (on(player, SEEMONST))
    {
        standout();
        if (!on(player, ISHALU))
            addch(tp->t_type);
        else
            addch(rnd(26) + 'A');
        standend();
    }
    runto(&tp->t_pos);
#ifdef MASTER
    if (wizard)
        msg("started a wandering %s", monsters[tp->t_type-'A'].m_name);
#endif
}
void Mssm<Two_scale>::run_to(double scale, double eps)
{
   if (eps < 0.0)
      eps = precision;
   runto(scale, eps);
}
void Mssm<Two_scale>::calculate_spectrum()
{
   run_to(maximum(displayMsusy(), MZ));
   physical(3);
   runto(displayMz());
}
Exemple #7
0
int SNmssm<Two_scale>::run_to(double scale, double eps)
{
   if (eps < 0.0)
      eps = precision;
   return runto(scale, eps);
}