1 /***************************************************************************
2                           combattest.h  -  description
3                              -------------------
4     begin                : Sat Nov 12 2005
5     copyright            : (C) 2005 by Gabor Torok
6     email                : cctorok@yahoo.com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  *                                                                         *
11  *   This program is free software; you can redistribute it and/or modify  *
12  *   it under the terms of the GNU General Public License as published by  *
13  *   the Free Software Foundation; either version 2 of the License, or     *
14  *   (at your option) any later version.                                   *
15  *                                                                         *
16  ***************************************************************************/
17 
18 #ifndef COMBAT_TEST_H
19 #define COMBAT_TEST_H
20 
21 #include "../common/constants.h"
22 
23 /**
24   *@author Gabor Torok
25   */
26 
27 class Session;
28 class Creature;
29 class Item;
30 
31 class CombatTest {
32 
33 public:
34   CombatTest();
35   ~CombatTest();
36   static bool executeTests( Session *session, char const* path );
37 
38 protected:
39   static bool fight( char const* path,
40                      char const* filename,
41                      Session *session,
42                      Creature *attacker,
43                      Item *weapon,
44                      Creature *defender,
45                      int count=100 );
46   static void printBackpack( FILE *fp, Creature *creature );
47   static Creature *createCharacter( Session *session,
48                                     char const* characterShortName,
49                                     char *name,
50                                     int level );
51   static Item *equipItem( Session *session,
52                           Creature *c,
53                           char const* itemName,
54                           int itemLevel );
55   static void computeHighLow( float value, float *sum, float *low, float *high );
56   static void setMinSkills( Creature *c );
57 };
58 
59 #endif
60 
61