Crossfire Server, Trunk
CRECombatSimulator.h
Go to the documentation of this file.
1 /*
2  * Crossfire -- cooperative multi-player graphical RPG and adventure game
3  *
4  * Copyright (c) 2022 the Crossfire Development Team
5  *
6  * Crossfire is free software and comes with ABSOLUTELY NO WARRANTY. You are
7  * welcome to redistribute it under certain conditions. For details, please
8  * see COPYING and LICENSE.
9  *
10  * The authors can be reached via e-mail at <crossfire@metalforge.org>.
11  */
12 
13 #ifndef CRECOMBATSIMULATOR_H
14 #define CRECOMBATSIMULATOR_H
15 
16 #include <QWidget>
17 #include <QDialog>
18 #include <QtWidgets>
19 
20 
21 #include "global.h"
22 
23 class QComboBox;
24 class QSpinBox;
25 class ArchetypeComboBox;
26 
27 class CRECombatSimulator : public QDialog
28 {
29  Q_OBJECT
30 
31  public:
33  virtual ~CRECombatSimulator();
34 
35  protected slots:
36  void fight();
37 
38  private:
39  void fight(const archetype* first, const archetype* second);
40 
43  QSpinBox* myCombats;
44  QSpinBox* myMaxRounds;
45  QLabel* myResultLabel;
46  QLabel* myResult;
47 
54 };
55 
56 #endif /* CRECOMBATSIMULATOR_H */
CRECombatSimulator::fight
void fight()
Definition: CRECombatSimulator.cpp:137
global.h
CRECombatSimulator::myResultLabel
QLabel * myResultLabel
Definition: CRECombatSimulator.h:45
CRECombatSimulator::myFirstVictories
int myFirstVictories
Definition: CRECombatSimulator.h:48
CRECombatSimulator::mySecondVictories
int mySecondVictories
Definition: CRECombatSimulator.h:51
CRECombatSimulator::mySecond
ArchetypeComboBox * mySecond
Definition: CRECombatSimulator.h:42
CRECombatSimulator::CRECombatSimulator
CRECombatSimulator()
Definition: CRECombatSimulator.cpp:22
ArchetypeComboBox
Definition: ArchetypeComboBox.h:23
CRECombatSimulator::myFirst
ArchetypeComboBox * myFirst
Definition: CRECombatSimulator.h:41
archetype
Definition: object.h:474
CRECombatSimulator::mySecondMinHp
int mySecondMinHp
Definition: CRECombatSimulator.h:52
CRECombatSimulator::myFirstMaxHp
int myFirstMaxHp
Definition: CRECombatSimulator.h:50
CRECombatSimulator::myMaxRounds
QSpinBox * myMaxRounds
Definition: CRECombatSimulator.h:44
CRECombatSimulator::~CRECombatSimulator
virtual ~CRECombatSimulator()
Definition: CRECombatSimulator.cpp:63
CRECombatSimulator::myCombats
QSpinBox * myCombats
Definition: CRECombatSimulator.h:43
CRECombatSimulator
Definition: CRECombatSimulator.h:27
first
Crossfire Protocol most of the time after the actual code was already omit certain important and possibly make life miserable any new developer or curious player should be able to find most of the relevant information here If inconsistencies are found or this documentation proves to be consider the latest server side protocol code in the public source code repository as the authoritative reference Introduction If you were ever curious enough to telnet or netcat to a Crossfire chances are you were sorely disappointed While the protocol may seem to use plain text at first
Definition: protocol.txt:20
CRECombatSimulator::myFirstMinHp
int myFirstMinHp
Definition: CRECombatSimulator.h:49
CRECombatSimulator::mySecondMaxHp
int mySecondMaxHp
Definition: CRECombatSimulator.h:53
CRECombatSimulator::myResult
QLabel * myResult
Definition: CRECombatSimulator.h:46