Searched refs:rand_0n (Results 1 – 9 of 9) sorted by relevance
/dports/games/nlarn/nlarn-NLarn-0.7.6/src/ |
H A D | map.c | 1193 for (guint i = 0; i < rand_0n(3); i++) in map_fill_with_stationary_objects() 1541 gint width = 3 + rand_0n(4); in map_make_vertical_river() 1577 gint width = 3 + rand_0n(4); in map_make_river() 1612 gint x2 = x1 + 4 + rand_0n(16); in map_make_lake() 1613 gint y2 = y1 + 4 + rand_0n(5); in map_make_lake() 1629 x2 += rand_0n(3); in map_make_lake() 1630 x1 -= rand_0n(3); in map_make_lake() 1634 x2 -= rand_0n(3); in map_make_lake() 1635 x1 += rand_0n(3); in map_make_lake() 1764 int spec_count = rand_0n(3); in map_load_from_file() [all …]
|
H A D | random.c | 125 guint32 rand_0n(guint32 n) in rand_0n() function 177 int npos = i + rand_0n(length - i); in shuffle()
|
H A D | sobjects.c | 167 const int event = min(8, rand_0n(donation/50)); in player_altar_pray() 399 dir = rand_0n(GD_MAX); in player_door_close() 1000 25 + p->level + rand_0n(25 + p->level), in sobject_destroy_at() 1016 flood_affect_area(pos, 3 + rand_0n(2), LT_WATER, 0); in sobject_destroy_at() 1024 if (rand_0n(game_difficulty(nlarn)+1) <= 1) in sobject_destroy_at() 1026 item *it = item_new(IT_BOOK, rand_0n(item_max_id(IT_BOOK))); in sobject_destroy_at()
|
H A D | monsters.c | 789 return monster_new(MT_DEMONLORD_I + rand_0n(7), pos, NULL); in monster_new() 905 weapon = item_new(IT_WEAPON, wpns[rand_0n(weapon_count)]); in monster_new() 923 const int chosen_type = possible_types[rand_0n(8)]; in monster_new() 1993 dam->amount += rand_0n(att.rand); in monster_breath_attack() 2091 + (int)rand_0n(game_difficulty(nlarn) + 2) in monster_player_attack() 2100 + rand_0n(game_difficulty(nlarn) + 2); in monster_player_attack() 2324 m->type = MT_BRONZE_DRAGON + rand_0n(9); in monster_damage_take() 2964 it = inv_get(p->inventory, rand_0n(inv_length(p->inventory))); in monster_item_disenchant() 3077 it = inv_get(p->inventory, rand_0n(inv_length(p->inventory))); in monster_player_rob() 3178 return g_ptr_array_index(fortunes, rand_0n(fortunes->len)); in monster_get_fortune()
|
H A D | scrolls.c | 351 const int type = magic_item_type[rand_0n(4)]; in scroll_create_artefact() 895 rand_0n(p->known_spells->len)); in scroll_spell_extension()
|
H A D | items.c | 156 nitem->id = rand_0n(item_max_id(IT_ARMOUR)); in item_new() 185 nitem->id = rand_0n(item_max_id(IT_POTION)); in item_new() 212 nitem->id = rand_0n(WT_MAX); in item_new()
|
H A D | player.c | 223 preset = 'a' + rand_0n(4); in player_assign_bonus_stats() 1698 armour = g_ptr_array_index(equipped_armour, rand_0n(equipped_armour->len)); in player_get_random_armour() 1858 player_hp_max_gain(p, rand_1n(3) + rand_0n(max(base, 1))); in player_level_gain() 1865 player_mp_max_gain(p, rand_1n(3) + rand_0n(max(base, 1))); in player_level_gain() 1892 player_hp_max_lose(p, rand_1n(3) + rand_0n(max(base, 1))); in player_level_lose() 1899 player_mp_max_lose(p, rand_1n(3) + rand_0n(max(base, 1))); in player_level_lose() 2125 damage_amount = max(0, damage_amount - rand_0n(player_get_con(p))); in player_damage_take()
|
H A D | spells.c | 1444 player_mp_lose(p, rand_0n(p->mp)); in book_read()
|
/dports/games/nlarn/nlarn-NLarn-0.7.6/inc/ |
H A D | random.h | 34 guint32 rand_0n(guint32 n); 40 return rand_0n(n - m) + m; in rand_m_n()
|