Go to the documentation of this file.
24 QGridLayout*
layout =
new QGridLayout(
this);
27 layout->addWidget(
new QLabel(tr(
"First fighter:"),
this),
line, 0);
31 layout->addWidget(
new QLabel(tr(
"Second fighter:"),
this),
line, 0);
35 layout->addWidget(
new QLabel(tr(
"Number of fights:"),
this),
line, 0);
41 layout->addWidget(
new QLabel(tr(
"Maximum number of rounds:"),
this),
line, 0);
55 QDialogButtonBox*
box =
new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Close, Qt::Horizontal,
this);
57 connect(
box, SIGNAL(rejected()),
this, SLOT(reject()));
60 setWindowTitle(tr(
"Combat simulator"));
82 while (limit-- > 0 && obfirst->
stats.
hp >= 0 && obsecond->
stats.
hp >= 0)
139 QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
172 fight(first, second);
175 myResult->setText(tr(
"Draw: %1 fights\n%2 victories: %3 (max hp: %4, min hp: %5)\n%6 victories: %7 (max hp: %8, min hp: %9)")
183 QApplication::restoreOverrideCursor();
#define object_was_destroyed(op, old_tag)
mapstruct * get_empty_map(int sizex, int sizey)
void monster_do_living(object *op)
object * object_create_arch(archetype *at)
void object_free(object *ob, int flags)
void free_map(mapstruct *m)
object * object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
virtual ~CRECombatSimulator()
void object_remove(object *op)
ArchetypeComboBox * mySecond
ArchetypeComboBox * myFirst
int attack_ob(object *op, object *hitter)