/* * Copyright (C) 2002-2007 The Warp Rogue Team * Part of the Warp Rogue Project * * This software is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License. * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * * See the license.txt file for more details. */ /* * Module Name: Random * Description: - */ #define D100_AUTOMATIC_SUCCESS 5 #define D100_AUTOMATIC_FAILURE 96 #define d100() dice(1, 100) /* randomiser value type */ typedef int RVALUE; #define RVALUE_NIL -1 /* * name randomiser name set type */ typedef enum { NAME_SET_NIL = -1, NAME_SET_HUMAN_MALE, NAME_SET_HUMAN_FEMALE, NAME_SET_OUT_OF_BOUNDS } NAME_SET; void random_init(void); void random_clean_up(void); int random_int(int, int); void randomiser_add(const char *, RVALUE, RVALUE); void randomiser_clear(void); const char * randomiser(void); const char * random_name(NAME_SET); int dice(int, int); int dice_roll_average(const DICE_ROLL *); int d100_test(int, int); bool d100_test_passed(int);