Add files via upload

This commit is contained in:
sanwu4617 2023-11-22 00:39:22 +08:00 committed by GitHub
parent 89b23cd79d
commit ee6e02b0ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 4742 additions and 0 deletions

519
Event.cpp Normal file
View File

@ -0,0 +1,519 @@
#include "Event.h"
int floor_id=1;
int level;
int hp;
int atk;
int def;
int gold;
int Exp;
int yellowkey;
int bluekey;
int redkey;
int greenkey;
int MAX_X=11;
int MAX_Y=11;
int delta_atk=0;
int delta_def=0;
int delta_hp=0;
int delta_gold=0;
int delta_exp=0;
int delta_floor=0;
int delta_yellowkey=0;
int delta_bluekey=0;
int delta_redkey=0;
int delta_greenkey=0;
bool end_event=false;
Floor* floors;
Floor* curr_floor;
Event** events;
int upgrade_exp=16;
int max_get_floor=1;
int stat_all_atk=0;
int stat_all_def=0;
int stat_all_hp=0;
int stat_all_gold=0;
int stat_all_exp=0;
int stat_all_monster=0;
int stat_all_event[MAX_EVENT]={0};
int Guard[MAX_EVENT]={0};
bool cross=false;
char road_log[1048576]={0};
int rlf=0;
bool all_str=false;
char Warrior_dir='D';
int Event::get_hurt()
{
return -1;
}
Event::Event()
{
type=0;
penetrable=false;
}
void Event::setName(QString name)
{
this->name=name;
}
QString Event::getpic()
{
return pic;
}
QString Event::getName()
{
return name;
}
bool Event::getPenetrable()
{
return penetrable;
}
void Event::set_id(int id)
{
event_id=id;
}
int Event::get_id()
{
return event_id;
}
int Event::get_gold()
{
return 0;
}
int Event::get_exp()
{
return 0;
}
int Event::get_crip()
{
return -1;
}
QStringList Event::Information()
{
QStringList temp;
return temp;
}
Wall::Wall()
{
name="";
pic="Wall";
type='W';
penetrable=false;
}
void Wall::Work()
{
}
Null::Null()
{
name="地面";
pic="Null";
type='N';
penetrable=true;
}
void Null::Work()
{
}
Warrior::Warrior()
{
name="勇士";
pic="Warrior";
type='W';
penetrable=true;
}
void Warrior::Work()
{
}
UpStairs::UpStairs()
{
name="UpStairs";
pic="UpStairs";
type='S';
penetrable=true;
}
void UpStairs::Work()
{
delta_floor=1;
curr_floor+=1;
if(floor_id==max_get_floor) //楼层还没更新,因此取等条件下将最大楼层+1
max_get_floor++;
}
QStringList UpStairs::Information()
{
QStringList temp;
temp.append(QString("上楼"));
return temp;
}
DownStairs::DownStairs()
{
name="DownStairs";
pic="DownStairs";
type='S';
penetrable=true;
}
void DownStairs::Work()
{
delta_floor=-1;
curr_floor-=1;
}
QStringList DownStairs::Information()
{
QStringList temp;
temp.append(QString("下楼"));
return temp;
}
Monster::Monster(QString name,QString pic,int atk,int def,int hp,int gold,int exp,int attribute)
{
this->name=name;
this->pic=pic;
m_atk=atk;
m_def=def;
m_hp=hp;
m_gold=gold;
m_exp=exp;
m_attribute=attribute;
type='M';
penetrable=true;
}
Monster::Monster(Monster* other)
{
name=other->name;
pic=other->pic;
m_atk=other->m_atk;
m_def=other->m_def;
m_hp=other->m_hp;
m_gold=other->m_gold;
m_exp=other->m_exp;
m_attribute=other->m_attribute;
type='M';
penetrable=true;
}
void Monster::Work() //战斗
{
delta_hp=-get_hurt();
delta_gold=m_gold;
delta_exp=m_exp;
end_event=true;
return;
}
int Monster::get_hurt()
{
double str_times=1.0+level/20.0-0.05;
if(cross)
str_times+=0.05;
int atk0=atk*str_times+1e-10;
int def0=def*str_times+1e-10;
if(m_attribute&64) //魔攻
def0=0;
if(atk0<=m_def)
return 2147483647;
if(m_atk<=def0)
return 0;
if(m_attribute&256) //坚固
atk0=m_def+1;
int times=(m_hp-1)/(atk0-m_def);
if(m_attribute&128) //连击
{
times*=(m_attribute&63);
}
return times*(m_atk-def0);
}
int Monster::get_gold()
{
return m_gold;
}
int Monster::get_exp()
{
return m_exp;
}
int Monster::get_crip()
{
//计算攻击次数
double str_times=1.0+level/20.0-0.05;
if(cross)
str_times+=0.05;
int atk0=atk*str_times+1e-10;
int def0=def*str_times+1e-10;
if(m_attribute&64) //魔攻
def0=0;
if(atk0<=m_def) //显示破防所需攻击
return int((m_def+1)/str_times-(1e-10))+1-atk;
if(m_attribute&256) //能破防时坚固怪物无临界点
return 0;
if(m_atk<=def0) //防杀的怪物无临界点
return 0;
int times=(m_hp-1)/(atk0-m_def);
if(times==0) //攻杀的怪物无临界点
return 0;
int need_all_atk=(m_hp-1)/times+1+m_def;
int min_need=int(need_all_atk/str_times-atk-(1e-10))+1;
if(min_need==0) //可减伤的情况下返回值最小为1表示加1攻击即可减伤
min_need=1;
return min_need;
}
QStringList Monster::Information()
{
QStringList temp;
temp.append(QString("生命:")+QString::number(m_hp));
temp.append(QString("攻击:")+QString::number(m_atk));
temp.append(QString("防御:")+QString::number(m_def));
temp.append(QString("金币:")+QString::number(m_gold));
temp.append(QString("经验:")+QString::number(m_exp));
int hurt=get_hurt();
if(hurt>2147483646)
temp.append(QString("伤害:无法破防"));
else
temp.append(QString("伤害:")+QString::number(get_hurt()));
QString attribute="";
if(m_attribute&64)
attribute+="魔攻 ";
if(m_attribute&128)
attribute+=QString::number(m_attribute&63)+"连击 ";
if(m_attribute&256)
attribute+="坚固 ";
if(m_attribute==0)
attribute="";
temp.append(QString("属性:")+attribute);
return temp;
}
Monster_Guard::Monster_Guard(Monster* monster,int guard):Monster(monster)
{
this->guard=guard;
}
void Monster_Guard::Work()
{
Monster::Work();
Guard[guard]++;
}
QStringList Monster_Guard::Information()
{
QStringList temp=Monster::Information();
if(guard<=10)
temp.append(QString("%0号守护者").arg(QString::number(guard+1)));
else
temp.append(QString("击杀2剑王得圣水"));
return temp;
}
Treasure::Treasure(QString name,QString pic,int work_id,int delta)
{
this->name=name;
this->pic=pic;
type='T';
penetrable=false;
this->work_id=work_id;
this->delta=delta;
}
void Treasure::Work()
{
switch(work_id)
{
case 1:
delta_hp=delta;
break;
case 2:
delta_atk=delta;
break;
case 3:
delta_def=delta;
break;
case 4:
delta_yellowkey=delta;
break;
case 5:
delta_bluekey=delta;
break;
case 6:
delta_redkey=delta;
break;
case 7:
delta_greenkey=delta;
break;
case 8:
delta_gold=delta;
break;
case 9:
delta_exp=delta;
break;
case 10:
cross=true;
break;
}
end_event=true;
}
QStringList Treasure::Information()
{
QStringList temp;
switch(work_id)
{
case 1:
temp.append(QString("增加%0生命").arg(delta));
break;
case 2:
temp.append(QString("增加%0攻击").arg(delta));
break;
case 3:
temp.append(QString("增加%0防御").arg(delta));
break;
case 8:
temp.append(QString("增加%0金币").arg(delta));
break;
case 9:
temp.append(QString("增加%0经验").arg(delta));
break;
case 10:
temp.append(QString("攻防增加量+5%"));
break;
default:
break;
}
return temp;
}
Holy_Water::Holy_Water(int guard_id,int show_num)
{
this->name="地面";
this->pic="Null";
type='T';
penetrable=true;
this->guard_id=guard_id;
this->show_num=show_num;
}
void Holy_Water::Work()
{
if(Guard[guard_id]==show_num+1)
{
hp*=2;
end_event=true;
}
if(Guard[guard_id]==show_num)
{
this->name="圣水";
this->pic="Holy_Water";
Guard[guard_id]++;
}
}
QStringList Holy_Water::Information()
{
QStringList temp;
if(Guard[guard_id]==show_num+1)
{
temp.append(QString("使用后生命翻倍"));
temp.append(QString(""));
temp.append(QString("提示:若暂时不想吃"));
temp.append(QString("圣水可传送至其他楼"));
temp.append(QString("层绕开"));
}
return temp;
}
Door::Door(QString name,QString pic,int door_id)
{
this->name=name;
this->pic=pic;
type='D';
penetrable=false;
this->door_id=door_id;
}
void Door::Work()
{
switch(door_id)
{
case 1:
if(yellowkey>=1)
{
end_event=true;
yellowkey-=1;
}
break;
case 2:
if(bluekey>=1)
{
end_event=true;
bluekey-=1;
}
break;
case 3:
if(redkey>=1)
{
end_event=true;
redkey-=1;
}
break;
case 4:
if(greenkey>=1)
{
end_event=true;
greenkey-=1;
}
break;
}
}
QStringList Door::Information()
{
QStringList temp;
switch(door_id)
{
case 1:
temp.append(QString("需用1把黄钥匙打开"));
break;
case 2:
temp.append(QString("需用1把蓝钥匙打开"));
break;
case 3:
temp.append(QString("需用1把红钥匙打开"));
break;
case 4:
temp.append(QString("需用1把绿钥匙打开"));
break;
}
return temp;
}
Guard_Door::Guard_Door(int guard_id,int open_num)
{
this->name="机关门";
this->pic="Guard_Door";
type='D';
penetrable=false;
this->guard_id=guard_id;
this->open_num=open_num;
}
void Guard_Door::Work()
{
if(Guard[guard_id]>=open_num)
end_event=true;
}
QStringList Guard_Door::Information()
{
QStringList temp;
temp.append(QString("%0号机关门").arg(QString::number(guard_id+1)));
temp.append(QString("需击杀%0个%1号守护者").arg(QString::number(open_num),QString::number(guard_id+1)));
return temp;
}
Floor::Floor()
{
e=new Event** [MAX_X];
for(int i=0;i<MAX_X;i++)
e[i]=new Event* [MAX_Y];
for(int i=0;i<MAX_X;i++)
{
for(int j=0;j<MAX_Y;j++)
{
e[i][j]=nullptr;
}
}
}
Event*& Floor::operator() (int x,int y)
{
return e[x][y];
}
void Floor::setData(int **data)
{
for(int i=0;i<MAX_X;i++)
{
for(int j=0;j<MAX_Y;j++)
{
e[i][j]=events[data[i][j]];
}
}
}

185
Event.h Normal file
View File

@ -0,0 +1,185 @@
#ifndef EVENT_H
#define EVENT_H
#include <QString>
#include <QObject>
#include <QThread>
#include <windows.h>
#include <QStringList>
class Event:public QObject{
Q_OBJECT
public:
void setName(QString name);
QString getName();
QString getpic();
Event();
virtual void Work()=0;
virtual QStringList Information();
virtual int get_hurt();
virtual int get_gold();
virtual int get_exp();
virtual int get_crip(); //获取临界点
bool getPenetrable();
void set_id(int id);
int get_id();
protected:
QString name;
QString pic;
char type;
bool penetrable; //可穿透性
int event_id;
};
class Wall:public Event{
public:
Wall();
virtual void Work();
};
class Null:public Event{
public:
Null();
virtual void Work();
};
class Warrior:public Event{
public:
Warrior();
virtual void Work();
};
class UpStairs:public Event{
public:
UpStairs();
virtual void Work();
virtual QStringList Information();
};
class DownStairs:public Event{
public:
DownStairs();
virtual void Work();
virtual QStringList Information();
};
class Monster:public Event{
public:
Monster(QString name,QString pic,int atk,int def,int hp,int gold,int exp,int attribute=0);
Monster(Monster* other);
virtual void Work();
virtual int get_hurt();
virtual int get_gold();
virtual int get_exp();
virtual int get_crip();
virtual QStringList Information();
private:
int m_atk;
int m_def;
int m_hp;
int m_gold;
int m_exp;
int m_attribute;
};
class Monster_Guard:public Monster{
public:
Monster_Guard(Monster* monster,int guard);
virtual void Work();
virtual QStringList Information();
private:
int guard;
};
class Treasure:public Event{
public:
Treasure(QString name,QString pic,int work_id,int delta); //work_id1加血2加攻击3加防御4~7加钥匙
virtual void Work();
virtual QStringList Information();
private:
int work_id;
int delta;
};
class Holy_Water:public Event{
public:
Holy_Water(int guard_id,int show_num);
virtual void Work();
virtual QStringList Information();
private:
int guard_id;
int show_num;
};
class Door:public Event{
public:
Door(QString name,QString pic,int door_id);
virtual void Work();
virtual QStringList Information();
private:
int door_id;
};
class Guard_Door:public Event{
public:
Guard_Door(int guard_id,int open_num);
virtual void Work();
virtual QStringList Information();
private:
int guard_id;
int open_num;
};
class Floor{
public:
Floor();
Event*& operator() (int x,int y);
void setData(int** data); //记录事件编号
private:
Event*** e;
};
#define MAX_EVENT 1000
#define MAX_FLOOR 25
void setEventData();
void setFloorData();
extern int MAX_X;
extern int MAX_Y;
extern Event** events;
extern int delta_atk;
extern int delta_def;
extern int delta_hp;
extern int delta_gold;
extern int delta_exp;
extern int delta_yellowkey;
extern int delta_bluekey;
extern int delta_redkey;
extern int delta_greenkey;
extern int floor_id;
extern int level;
extern int hp;
extern int atk;
extern int def;
extern int gold;
extern int Exp;
extern int yellowkey;
extern int bluekey;
extern int redkey;
extern int greenkey;
extern bool end_event;
extern int delta_floor;
extern int upgrade_exp;
extern Floor* floors;
extern Floor* curr_floor;
extern int max_get_floor;
extern const int floor0[MAX_FLOOR][11][11];
extern int Guard[MAX_EVENT];
extern int stat_all_atk;
extern int stat_all_def;
extern int stat_all_hp;
extern int stat_all_gold;
extern int stat_all_exp;
extern int stat_all_monster;
extern int stat_all_event[MAX_EVENT];
extern bool cross;
extern char road_log[1048576];
extern int rlf; //road_log的下标
extern bool all_str; //显示全部攻防
extern char Warrior_dir;
#endif // EVENT_H

477
EventData.cpp Normal file
View File

@ -0,0 +1,477 @@
#include "Event.h"
const int floor0[MAX_FLOOR][11][11]={
{ //第1层
{3,0,11,201,202,201,0,0,0,0,0},
{1,1,1,1,1,1,1,1,1,1,0},
{51,0,301,21,0,1,51,11,51,1,0},
{11,301,101,1,0,1,51,11,51,1,0},
{1,21,1,1,0,1,1,1,203,1,0},
{11,302,0,1,0,21,351,201,251,1,0},
{102,0,12,1,0,1,1,1,1,1,0},
{1,21,1,1,0,0,0,0,0,0,0},
{0,302,0,1,1,23,1,1,1,21,1},
{51,52,11,1,13,0,0,1,11,401,12},
{51,52,11,1,0,0,0,1,11,11,11}},
{ //第2层
{4,1,105,1,106,1,13,11,54,102,101},
{0,1,103,1,104,1,12,11,54,102,101},
{0,1,101,1,102,1,12,11,54,102,101},
{0,1,0,1,0,1,1,1,1,1,23},
{0,1,22,1,22,1,0,0,0,0,0},
{0,24,0,0,0,0,0,1,1,552,1},
{0,1,22,1,1,452,1,1,0,0,0},
{0,1,0,1,0,0,0,1,552,1,552},
{0,1,11,1,53,53,53,1,0,1,0},
{0,1,12,1,101,101,101,1,0,1,0},
{3,1,13,1,102,102,102,1,113,1,123}},
{ //第3层
{111,202,11,1,101,53,102,1,1,1,1},
{202,11,0,1,0,252,0,1,0,251,0},
{11,301,0,1,1,21,1,1,0,1,0},
{1,21,1,1,0,301,0,1,11,1,202},
{0,0,0,1,1,1,0,1,11,1,251},
{201,1,0,251,202,251,0,1,11,1,202},
{201,1,1,1,1,1,0,0,0,1,0},
{0,0,0,0,0,1,1,21,1,1,0},
{1,1,1,1,0,1,202,0,202,1,0},
{1,0,0,0,0,1,102,251,11,1,0},
{4,0,1,1,1,1,101,52,11,1,3}},
{ //第4层
{0,203,0,1,0,14,0,1,0,203,0},
{0,1,0,1,0,0,0,1,0,1,0},
{0,1,301,1,1,23,1,1,301,1,0},
{251,1,51,1,303,0,303,1,51,1,251},
{251,1,52,1,103,303,104,1,52,1,251},
{202,1,0,1,1,22,1,1,0,1,202},
{0,1,0,1,401,0,401,1,0,1,0},
{0,1,0,1,101,401,102,1,0,1,0},
{0,1,0,1,1,21,1,1,0,1,0},
{0,1,0,1,0,0,0,1,0,1,0},
{3,1,0,203,0,0,0,203,0,1,4}},
{ //第5层
{13,1,52,1,53,351,0,0,351,11,12},
{0,1,101,1,351,0,0,0,0,351,11},
{252,1,0,1,302,0,1,1,21,1,1},
{0,21,302,1,121,302,1,0,401,302,12},
{252,1,0,1,1,1,1,0,0,0,302},
{103,1,0,0,0,251,301,0,0,0,0},
{104,1,1,203,1,1,1,1,0,0,0},
{0,54,1,203,1,0,0,0,401,451,0},
{1,1,1,251,1,21,1,22,1,21,1},
{0,0,1,0,1,251,1,102,21,0,1},
{4,0,251,0,0,0,1,11,1,3,1}},
{ //第6层
{152,303,1,106,1,11,204,151,1,52,52},
{303,11,1,105,1,0,11,204,1,501,52},
{11,253,22,0,22,253,0,11,1,0,501},
{0,0,1,451,1,0,0,0,1,372,0},
{1,1,1,23,1,1,1,1,1,21,1},
{0,0,352,0,0,0,0,0,352,0,0},
{0,1,1,1,1,1,1,1,1,1,1},
{0,1,252,21,252,0,0,0,0,0,1},
{0,1,21,1,21,1,1,1,1,22,1},
{0,1,252,1,0,0,1,1,0,0,1},
{0,0,0,1,3,0,21,21,0,4,1}},
{ //第7层
{3,0,0,0,0,0,0,0,1,1,1},
{1,1,0,253,1,22,1,303,0,1,1},
{1,0,253,104,1,901,1,103,303,0,1},
{0,0,1,1,1,951,1,1,1,0,0},
{0,0,22,901,951,115,951,901,22,0,0},
{0,1,1,1,1,951,1,1,1,1,0},
{0,1,51,103,1,901,1,104,51,1,0},
{0,1,11,51,1,22,1,51,11,1,0},
{0,1,1,12,12,52,12,12,1,1,0},
{0,0,1,1,1,23,1,1,1,0,0},
{1,0,0,0,4,0,0,0,0,0,1}},
{ //第8层
{4,1,0,0,0,0,1,0,0,303,0},
{0,1,0,1,1,21,1,21,1,1,0},
{0,1,0,1,0,0,22,0,0,1,103},
{0,1,0,1,371,1,1,1,252,1,203},
{252,1,0,1,52,1,3,0,0,1,203},
{253,1,104,1,52,1,1,1,1,1,0},
{252,1,203,1,0,0,0,1,0,253,0},
{13,1,203,1,1,1,451,1,21,1,1},
{0,1,0,303,0,1,303,1,0,0,0},
{0,1,1,1,21,1,0,1,1,1,0},
{0,0,371,0,0,1,0,204,354,204,0}},
{ //第9层
{55,11,0,1,1,1,0,0,0,1,0},
{11,0,402,21,0,0,0,1,0,21,303},
{1,21,1,1,0,1,1,1,0,1,11},
{0,0,0,1,0,1,103,0,0,1,11},
{0,0,0,23,0,1,4,1,0,1,52},
{1,22,1,1,0,1,1,1,0,1,1},
{104,372,103,1,371,1,3,1,0,1,52},
{1,21,1,1,0,0,104,21,0,1,11},
{303,52,303,1,1,22,1,1,0,1,11},
{12,303,52,1,501,371,501,1,0,21,303},
{112,12,303,21,53,501,53,1,0,1,0}},
{ //第10层
{0,1,1,103,402,1,402,104,1,1,0},
{0,0,1,1,21,1,21,1,1,0,372},
{0,0,0,0,0,1,0,0,0,372,53},
{0,1,0,1,1,1,1,1,0,1,1},
{252,1,0,0,11,11,11,0,0,1,11},
{253,1,0,1,1,1,1,21,1,1,11},
{252,1,0,0,0,0,4,0,21,253,0},
{0,1,1,1,1,1,1,21,1,1,0},
{0,1,54,104,103,1,0,253,0,1,11},
{0,1,54,104,103,23,371,1,371,1,11},
{3,1,54,104,103,1,12,1,12,1,52}},
{ //第11层
{52,1,11,1,12,1,13,1,54,122,54},
{52,1,11,1,12,1,13,1,452,452,452},
{52,1,11,1,12,1,13,1,0,452,0},
{21,1,21,1,21,1,21,1,1,22,1},
{0,0,0,0,0,1,0,0,0,0,0},
{21,1,1,22,1,1,1,22,1,1,21},
{102,1,0,452,0,551,0,452,0,1,101},
{102,1,402,1,1,1,1,1,402,1,101},
{104,1,402,1,54,13,54,1,402,1,103},
{1,1,23,1,1,204,1,1,23,1,1},
{4,0,0,0,0,0,0,0,0,0,3}},
{ //第12层
{152,104,1,0,552,553,552,0,1,54,151},
{103,551,1,0,1,21,1,0,1,551,54},
{551,0,1,0,1,553,1,0,1,0,551},
{0,0,1,0,1,11,1,0,1,0,0},
{0,0,1,0,1,11,1,0,1,0,0},
{1,22,1,0,1,11,1,0,1,22,1},
{0,0,0,0,1,12,1,0,0,0,0},
{1,1,1,0,1,1,1,0,1,1,1},
{105,551,21,0,452,0,452,0,21,551,106},
{1,1,1,1,1,22,1,1,1,1,1},
{3,0,0,0,0,0,0,0,0,0,4}},
{ //第13层
{0,551,0,0,0,0,0,1,0,601,0},
{0,1,1,1,1,1,21,1,0,1,0},
{0,1,0,0,452,0,0,1,0,1,0},
{54,1,23,1,1,1,0,1,103,1,0},
{552,1,0,0,602,1,452,1,103,1,0},
{553,1,0,602,55,1,452,1,103,1,104},
{552,1,602,55,151,1,452,1,103,1,104},
{0,1,1,1,1,1,0,1,0,1,104},
{53,552,0,1,0,0,0,601,0,1,104},
{1,1,0,1,0,1,1,1,1,1,0},
{4,0,0,22,0,3,1,152,602,21,0}},
{ //第14层
{0,0,0,1,105,0,21,0,1,12,55},
{0,124,0,1,0,552,1,602,1,0,0},
{0,0,0,1,21,1,1,0,21,0,0},
{1,952,1,1,0,254,1,1,1,1,601},
{902,0,902,1,602,0,21,353,103,1,0},
{0,0,0,1,1,1,1,0,402,1,0},
{55,0,0,254,0,0,21,601,104,1,0},
{1,22,1,1,1,1,1,1,1,1,254},
{0,254,0,601,21,0,0,0,0,0,0},
{12,0,0,0,1,0,1,1,21,1,0},
{11,11,11,11,1,4,1,54,372,1,3}},
{ //第15层
{107,601,0,1,11,105,11,1,0,601,108},
{1,1,601,1,0,1,0,1,601,1,1},
{0,254,0,1,353,0,353,1,0,353,0},
{21,1,1,1,1,21,1,1,1,1,0},
{0,353,0,21,0,602,0,1,54,0,254},
{1,1,1,1,55,0,353,21,0,106,0},
{11,11,0,1,0,55,0,1,11,0,601},
{11,12,0,1,1,1,1,1,22,1,21},
{0,0,602,1,151,0,152,1,552,0,601},
{1,1,21,1,1,453,1,1,1,0,1},
{3,0,0,552,0,0,0,552,0,0,4}},
{ //第16层
{11,11,11,1,55,11,106,1,11,14,11},
{11,0,0,1,553,1,601,1,0,11,0},
{1,21,1,1,0,1,0,1,0,356,0},
{0,553,0,1,21,1,22,1,1,22,1},
{0,0,0,254,0,502,0,254,0,0,54},
{602,0,53,1,1,21,1,1,0,601,0},
{21,1,1,1,0,0,0,1,21,1,21},
{0,601,0,254,0,0,0,601,0,1,0},
{1,1,21,1,1,21,1,1,553,1,353},
{0,0,372,1,105,55,106,1,105,1,0},
{4,0,0,1,0,3,0,1,106,1,12}},
{ //第17层
{103,0,104,1,0,3,0,1,105,0,106},
{0,114,0,1,0,0,0,1,0,55,0},
{103,0,104,1,254,1,551,1,11,0,11},
{1,954,1,1,0,1,0,1,1,956,1},
{904,0,904,1,21,1,22,1,906,0,906},
{0,0,0,1,0,1,0,1,0,0,0},
{1,953,1,1,601,1,372,1,1,955,1},
{903,0,903,1,0,0,0,1,905,0,905},
{0,0,0,1,1,353,1,1,0,0,0},
{1,21,1,1,0,0,0,1,1,21,1},
{54,0,0,254,0,4,0,254,0,0,54}},
{ //第18层
{0,0,107,108,1,4,1,0,0,254,151},
{304,0,105,106,1,0,1,403,0,0,254},
{0,553,1,1,1,0,1,21,1,553,553},
{0,0,21,12,1,601,1,12,1,0,0},
{21,1,1,1,1,0,1,1,1,1,21},
{0,553,0,601,0,56,0,601,0,553,0},
{21,1,1,1,1,0,1,1,1,1,21},
{0,0,1,12,1,601,1,12,21,0,0},
{553,553,1,21,1,0,1,1,1,502,0},
{254,0,0,602,1,0,1,106,105,0,304},
{152,254,0,0,1,3,1,108,107,0,0}},
{ //第19层
{3,0,0,1,107,56,108,1,107,56,108},
{0,0,353,1,11,11,11,1,0,0,0},
{1,1,21,1,0,0,0,1,1,957,1},
{0,0,0,1,1,554,1,1,908,0,907},
{0,0,353,21,0,0,0,21,356,0,0},
{21,1,1,1,1,601,1,1,0,0,0},
{0,0,0,1,0,0,0,1,1,0,1},
{1,1,304,1,105,0,106,1,908,0,907},
{56,11,11,1,1,254,1,1,1,957,1},
{304,1,1,1,0,0,0,1,0,0,0},
{11,11,57,1,0,4,0,1,107,56,108}},
{ //第20层
{4,0,21,0,0,0,21,21,354,0,0},
{0,0,1,1,1,554,1,1,0,1,0},
{0,0,21,0,1,0,12,1,0,1,0},
{22,1,1,304,1,107,108,1,125,1,356},
{0,356,0,0,1,1,1,1,1,1,21},
{0,1,21,1,1,56,554,21,0,403,0},
{0,1,554,0,0,0,0,1,403,108,403},
{21,1,1,1,1,1,1,1,0,403,0},
{304,0,1,55,0,554,0,1,1,1,21},
{0,0,1,55,1,1,0,21,304,0,304},
{3,0,1,55,0,22,0,1,55,107,55}},
{ //第21层
{3,0,0,0,0,0,0,304,0,56,56},
{1,1,21,1,1,1,22,1,1,1,23},
{55,1,0,0,1,11,0,354,1,1,304},
{56,1,1,602,1,11,0,1,107,1,105},
{354,21,55,0,1,1,356,1,108,1,105},
{0,1,304,1,1,0,0,0,356,1,106},
{354,21,0,56,1,554,1,1,1,1,106},
{56,1,356,0,1,0,55,55,0,1,14},
{55,1,21,1,1,1,1,1,0,1,355},
{1,1,0,22,55,55,0,1,304,1,355},
{4,24,0,1,1,1,0,403,0,0,0}},
{ //第22层
{4,0,1,107,0,0,0,108,1,11,11},
{0,0,1,0,0,1,0,0,1,0,57},
{21,1,1,0,1,153,1,0,1,21,1},
{602,0,1,0,0,701,0,0,1,0,0},
{0,0,1,0,0,1,0,0,1,354,354},
{21,1,1,0,355,0,355,0,1,0,0},
{356,0,1,1,1,22,1,1,1,1,21},
{0,0,602,0,0,0,0,0,0,0,304},
{21,1,1,1,1,403,1,1,0,0,0},
{0,1,0,21,0,0,0,1,1,1,356},
{356,56,554,1,0,3,0,21,0,554,0}},
{ //第23层
{107,1,56,55,1,3,1,55,56,1,108},
{107,1,0,0,1,0,1,0,0,1,108},
{107,1,403,1,1,502,1,1,403,1,108},
{355,1,21,1,911,961,911,1,21,1,355},
{0,0,0,1,1,0,1,1,0,0,0},
{1,0,0,502,22,0,22,502,0,0,1},
{0,0,1,0,1,0,1,0,1,0,0},
{355,1,1,354,1,0,1,651,1,1,355},
{0,1,11,11,1,502,1,11,11,1,0},
{56,1,651,1,1,0,1,1,354,1,56},
{151,1,11,12,1,4,1,12,11,1,152}},
{ //第24层
{3,0,58,1,1,4,1,0,22,0,0},
{1,701,1,1,1,0,1,0,1,304,1},
{57,651,0,0,1,0,1,651,1,55,0},
{1,1,1,21,1,355,1,55,1,1,403},
{502,355,0,0,1,355,1,56,1,0,56},
{0,1,1,1,1,56,1,55,1,21,1},
{0,403,21,0,1,56,1,651,1,354,0},
{1,0,1,0,1,11,1,0,1,1,355},
{1,56,1,554,1,11,21,0,1,108,0},
{1,355,1,0,1,0,1,1,1,701,1},
{1,107,1,0,21,0,1,151,151,152,152}},
{ //第25层
{4,0,0,0,0,0,0,0,0,0,0},
{1,1,1,1,1,24,1,1,1,1,1},
{1,1,1,1,0,0,0,1,1,1,1},
{1,1,1,0,107,58,108,0,1,1,1},
{1,1,0,0,0,0,0,0,0,1,1},
{1,0,0,0,0,751,0,0,0,0,1},
{1,1,0,0,0,0,0,0,0,1,1},
{1,1,1,0,0,0,0,0,1,1,1},
{1,1,1,1,0,0,0,1,1,1,1},
{1,1,1,1,1,0,1,1,1,1,1},
{1,1,1,1,1,1,1,1,1,1,1}}
};
void setEventData()
{
events=new Event*[MAX_EVENT]; //事件最大值设为1000
for(int i=0;i<MAX_EVENT;i++)
events[i]=nullptr;
//0为空1为墙2为主角3为上楼4为下楼
events[0]=new Null;
events[1]=new Wall;
events[2]=new Warrior;
events[3]=new UpStairs;
events[4]=new DownStairs;
//11~20钥匙
events[11]=new Treasure("黄钥匙","Key_1",4,1);
events[12]=new Treasure("蓝钥匙","Key_2",5,1);
events[13]=new Treasure("红钥匙","Key_3",6,1);
events[14]=new Treasure("绿钥匙","Key_4",7,1);
//21~30
events[21]=new Door("黄门","Door_1",1);
events[22]=new Door("蓝门","Door_2",2);
events[23]=new Door("红门","Door_3",3);
events[24]=new Door("绿门","Door_4",4);
//51~100血瓶
events[51]=new Treasure("红血瓶","Potion_1",1,200);
events[52]=new Treasure("蓝血瓶","Potion_2",1,500);
events[53]=new Treasure("黄血瓶","Potion_3",1,1000);
events[54]=new Treasure("绿血瓶","Potion_4",1,2000);
events[55]=new Treasure("大红血瓶","Potion_5",1,5000);
events[56]=new Treasure("大蓝血瓶","Potion_6",1,10000);
events[57]=new Treasure("大黄血瓶","Potion_7",1,20000);
events[58]=new Treasure("大绿血瓶","Potion_8",1,40000);
//101~150宝石武器防具
events[101]=new Treasure("红宝石","Jewel_Red",2,2);
events[102]=new Treasure("蓝宝石","Jewel_Blue",3,2);
events[103]=new Treasure("大红宝石","Jewel_Red_2",2,5);
events[104]=new Treasure("大蓝宝石","Jewel_Blue_2",3,5);
events[105]=new Treasure("超级红宝石","Jewel_Red_3",2,8);
events[106]=new Treasure("超级蓝宝石","Jewel_Blue_3",3,8);
events[107]=new Treasure("巨型红宝石","Jewel_Red_4",2,12);
events[108]=new Treasure("巨型蓝宝石","Jewel_Blue_4",3,12);
events[111]=new Treasure("铁剑","Weapon_1",2,10);
events[112]=new Treasure("银剑","Weapon_2",2,20);
events[113]=new Treasure("骑士剑","Weapon_3",2,40);
events[114]=new Treasure("圣剑","Weapon_4",2,80);
events[115]=new Treasure("神圣剑","Weapon_5",2,160);
events[121]=new Treasure("铁盾","Shield_1",3,10);
events[122]=new Treasure("银盾","Shield_2",3,20);
events[123]=new Treasure("骑士盾","Shield_3",3,40);
events[124]=new Treasure("圣盾","Shield_4",3,80);
events[125]=new Treasure("神圣盾","Shield_5",3,160);
//151~200特殊物品
events[151]=new Treasure("金币","Gold",8,200);
events[152]=new Treasure("经验药水","Exp",9,200);
events[153]=new Treasure("十字架","Cross",10,1);
//201开始为怪物
events[751]=new Monster("魔王","Monster_King",6049,2731,245532,0,0,0);
events[201]=new Monster("绿色史莱姆","Monster_Silme_Green",18,1,40,1,1,0);
events[202]=new Monster("红色史莱姆","Monster_Silme_Red",20,4,50,2,2,0);
events[251]=new Monster("小蝙蝠","Monster_Bat_1",35,3,60,3,3,0);
events[301]=new Monster("骷髅","Monster_Skeleton_1",55,0,100,5,5,0);
events[203]=new Monster("黑色史莱姆","Monster_Silme_Black",40,10,120,6,6,0);
events[302]=new Monster("骷髅兵","Monster_Skeleton_2",75,14,125,7,7,0);
events[252]=new Monster("大蝙蝠","Monster_Bat_2",66,18,132,8,8,130);
events[351]=new Monster("初级魔法师","Monster_Socrerer_1",30,35,180,10,10,64);
events[401]=new Monster("丧尸","Monster_Zombie_1",75,35,400,11,11,0);
events[303]=new Monster("骷髅队长","Monster_Skeleton_3",130,40,200,13,13,0);
events[501]=new Monster("石怪","Monster_Stone_1",90,90,100,15,15,0);
events[371]=new Monster("初级巫师","Monster_Witch_1",65,70,400,17,17,64);
events[253]=new Monster("红蝙蝠","Monster_Bat_3",160,65,350,19,19,131);
events[451]=new Monster("初级卫兵","Monster_Guarder_1",160,120,400,22,22,0);
events[352]=new Monster("中级魔法师","Monster_Socrerer_2",100,140,500,26,26,64);
events[204]=new Monster("史莱姆王","Monster_Silme_King",250,175,495,30,30,0);
events[402]=new Monster("丧尸士兵","Monster_Zombie_2",283,166,1134,35,35,130);
events[452]=new Monster("中级卫兵","Monster_Guarder_2",310,250,1250,40,40,0);
events[551]=new Monster("双手剑士","Monster_Swordman",480,240,800,46,46,130);
events[372]=new Monster("高级巫师","Monster_Witch_2",250,300,1075,53,53,64);
events[552]=new Monster("骑士","Monster_Knight_1",660,400,1350,60,60,0);
events[254]=new Monster("蝙蝠王","Monster_Bat_4",750,390,1300,68,68,132);
events[353]=new Monster("高级魔法师","Monster_Socrerer_3",400,550,1600,78,78,64);
events[601]=new Monster("战士","Monster_Soldier_1",1024,640,2200,88,88,0);
events[553]=new Monster("骑士队长","Monster_Knight_2",1350,720,2400,98,98,0);
events[453]=new Monster("高级卫兵","Monster_Guarder_3",1150,980,2500,110,110,0);
events[502]=new Monster("铁怪","Monster_Stone_2",1125,1350,533,122,122,256);
events[602]=new Monster("鬼战士","Monster_Soldier_2",1600,1250,4000,136,136,0);
events[304]=new Monster("骷髅王","Monster_Skeleton_4",3300,1000,3000,150,150,0);
events[356]=new Monster("暗黑法师","Monster_Socrerer_6",1750,1250,3500,167,167,64);
events[554]=new Monster("暗黑骑士","Monster_Knight_3",2800,1800,5000,184,184,0);
events[403]=new Monster("毒丧尸","Monster_Zombie_3",3200,2000,6400,202,202,0);
events[354]=new Monster("白衣武士","Monster_Socrerer_4",3200,2400,7200,222,222,0);
events[651]=new Monster("水银人","Monster_Hydraman",3100,2725,12000,243,243,0);
events[355]=new Monster("绿衣武士","Monster_Socrerer_5",3900,3000,12000,267,267,0);
events[555]=new Monster("剑王","Monster_Swordking",3600,2700,7200,289,289,134);
events[701]=new Monster("吸血鬼","Monster_Vampire",5000,3000,20000,300,300,0);
events[901]=new Monster_Guard((Monster*)events[354],0);
events[902]=new Monster_Guard((Monster*)events[353],1);
events[903]=new Monster_Guard((Monster*)events[453],2);
events[904]=new Monster_Guard((Monster*)events[453],3);
events[905]=new Monster_Guard((Monster*)events[353],4);
events[906]=new Monster_Guard((Monster*)events[552],5);
events[907]=new Monster_Guard((Monster*)events[304],6);
events[908]=new Monster_Guard((Monster*)events[403],6);
events[911]=new Monster_Guard((Monster*)events[555],11);
events[951]=new Guard_Door(0,4);
events[952]=new Guard_Door(1,2);
events[953]=new Guard_Door(2,2);
events[954]=new Guard_Door(3,2);
events[955]=new Guard_Door(4,2);
events[956]=new Guard_Door(5,2);
events[957]=new Guard_Door(6,4);
events[961]=new Holy_Water(11,2);
//设置事件id
for(int i=0;i<MAX_EVENT;i++)
{
if(events[i]!=nullptr)
events[i]->set_id(i);
}
//设置楼层数据
floors=new Floor[MAX_FLOOR];
setFloorData();
//获取统计信息
for(int i=0;i<MAX_FLOOR;i++)
{
for(int j=0;j<MAX_X;j++)
{
for(int k=0;k<MAX_Y;k++)
{
stat_all_event[floor0[i][j][k]]++;
}
}
}
stat_all_hp=200*stat_all_event[51]+
500*stat_all_event[52]+
1000*stat_all_event[53]+
2000*stat_all_event[54]+
5000*stat_all_event[55]+
10000*stat_all_event[56]+
20000*stat_all_event[57]+
40000*stat_all_event[58];
stat_all_atk=2*stat_all_event[101]+5*stat_all_event[103]+8*stat_all_event[105]+12*stat_all_event[107]+10*stat_all_event[111]+
20*stat_all_event[112]+40*stat_all_event[113]+80*stat_all_event[114]+160*stat_all_event[115];
stat_all_def=2*stat_all_event[102]+5*stat_all_event[104]+8*stat_all_event[106]+12*stat_all_event[108]+10*stat_all_event[121]+
20*stat_all_event[122]+40*stat_all_event[123]+80*stat_all_event[124]+160*stat_all_event[125];
for(int j=200;j<950;j++)
{
if(stat_all_event[j]!=0)
{
stat_all_gold+=stat_all_event[j]*events[j]->get_gold();
stat_all_exp+=stat_all_event[j]*events[j]->get_exp();
stat_all_monster+=stat_all_event[j];
}
}
stat_all_gold+=stat_all_event[151]*200;
stat_all_exp+=stat_all_event[152]*200;
}
void setFloorData()
{
//楼层数据
int **data_reader=new int*[MAX_X];
for(int i=0;i<MAX_X;i++)
data_reader[i]=new int[MAX_Y];
for(int z=0;z<MAX_FLOOR;z++)
{
for(int i=0;i<MAX_X;i++)
{
for(int j=0;j<MAX_Y;j++)
data_reader[i][j]=floor0[z][j][i]; //将矩阵转置,方便查看
}
floors[z].setData(data_reader);
}
curr_floor=&floors[0];
}

BIN
favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

97
image.qrc Normal file
View File

@ -0,0 +1,97 @@
<RCC>
<qresource prefix="/">
<file>images/Monster_Silme_Green.png</file>
<file>images/Monster_Silme_Red.png</file>
<file>images/Null.png</file>
<file>images/Wall.png</file>
<file>images/Warrior.png</file>
<file>images/DownStairs.png</file>
<file>images/UpStairs.png</file>
<file>images/Monster_Bat_1.png</file>
<file>images/Monster_Bat_2.png</file>
<file>images/Monster_Bat_3.png</file>
<file>images/Monster_Silme_Black.png</file>
<file>images/Monster_Silme_King.png</file>
<file>images/Monster_Skeleton_1.png</file>
<file>images/Monster_Skeleton_2.png</file>
<file>images/Monster_Skeleton_3.png</file>
<file>images/Monster_Socrerer_1.png</file>
<file>images/Monster_Socrerer_2.png</file>
<file>images/Monster_Socrerer_3.png</file>
<file>images/Door_1.png</file>
<file>images/Door_2.png</file>
<file>images/Door_3.png</file>
<file>images/Door_4.png</file>
<file>images/Jewel_Blue.png</file>
<file>images/Jewel_Red.png</file>
<file>images/Key_1.png</file>
<file>images/Key_2.png</file>
<file>images/Key_3.png</file>
<file>images/Key_4.png</file>
<file>images/Potion_1.png</file>
<file>images/Potion_2.png</file>
<file>images/Potion_3.png</file>
<file>images/Potion_4.png</file>
<file>images/Monster_Zombie_1.png</file>
<file>images/Monster_Zombie_2.png</file>
<file>images/Shield_1.png</file>
<file>images/Shield_2.png</file>
<file>images/Shield_3.png</file>
<file>images/Shield_4.png</file>
<file>images/Shield_5.png</file>
<file>images/Weapon_1.png</file>
<file>images/Weapon_2.png</file>
<file>images/Weapon_3.png</file>
<file>images/Weapon_4.png</file>
<file>images/Weapon_5.png</file>
<file>images/Monster_Guarder_1.png</file>
<file>images/Monster_Guarder_2.png</file>
<file>images/Monster_Guarder_3.png</file>
<file>images/Monster_Stone_1.png</file>
<file>images/Monster_Witch_1.png</file>
<file>images/Monster_Witch_2.png</file>
<file>images/Exp.png</file>
<file>images/Gold.png</file>
<file>images/Monster_Socrerer_4.png</file>
<file>images/Monster_Socrerer_5.png</file>
<file>images/Monster_Knight_1.png</file>
<file>images/Monster_Knight_2.png</file>
<file>images/Monster_Swordman.png</file>
<file>images/Monster_Knight_3.png</file>
<file>images/Monster_Socrerer_6.png</file>
<file>images/Monster_Soldier_1.png</file>
<file>images/Monster_Soldier_2.png</file>
<file>images/Jewel_Blue_2.png</file>
<file>images/Jewel_Blue_3.png</file>
<file>images/Jewel_Red_2.png</file>
<file>images/Jewel_Red_3.png</file>
<file>images/Monster_Bat_4.png</file>
<file>images/Monster_Stone_2.png</file>
<file>images/Monster_Skeleton_4.png</file>
<file>images/Monster_Zombie_3.png</file>
<file>images/Guard_Door.png</file>
<file>images/Monster_Hydraman.png</file>
<file>images/Monster_King.png</file>
<file>images/Monster_Swordking.png</file>
<file>images/Monster_Vampire.png</file>
<file>images/Cross.png</file>
<file>images/Jewel_Blue_4.png</file>
<file>images/Jewel_Red_4.png</file>
<file>images/Potion_5.png</file>
<file>images/Potion_6.png</file>
<file>images/Potion_7.png</file>
<file>images/Potion_8.png</file>
<file>images/Holy_Water.png</file>
<file>images/Background.jpeg</file>
<file>images/Shop.png</file>
<file>images/Load.png</file>
<file>images/Save.png</file>
<file>images/Exit.png</file>
<file>images/Display.png</file>
<file>images/Restart.png</file>
<file>images/Blackgold.jpg</file>
<file>images/Warrior_left.png</file>
<file>images/Warrior_right.png</file>
<file>images/Warrior_Up.png</file>
</qresource>
</RCC>

13
main.cpp Normal file
View File

@ -0,0 +1,13 @@
#include "mainwindow.h"
#include <QApplication>
#include "Event.h"
int main(int argc, char *argv[])
{
setEventData();
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}

1137
mainwindow.cpp Normal file

File diff suppressed because it is too large Load Diff

90
mainwindow.h Normal file
View File

@ -0,0 +1,90 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QKeyEvent>
#include <QLabel>
#include <QPushButton>
#include "Event.h"
#include "shop.h"
#include <fstream>
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class PButton : public QPushButton
{
Q_OBJECT
public:
void setxy(int x,int y);
PButton();
private:
int x,y;
public slots:
void slot_show();
signals:
void show_information(int x,int y);
};
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
void keyPressEvent(QKeyEvent *e);
void setWarriorData();
void refresh();
void Save(QString filename);
void Load(QString filename);
void Show(QString filename);
void Show_NoRefresh(QString filename);
void Restart();
void Send(int floor);
void GameOver();
void Win();
private slots:
void on_Shop_clicked();
void on_FastSave_clicked();
void on_FastLoad_clicked();
void on_ReStart_clicked();
void on_Send_clicked();
void on_FastShow_clicked();
void on_FastShow_NoRefresh_clicked();
void on_Exit_clicked();
public slots:
void end_shop();
void show_information(int x,int y);
private:
Ui::MainWindow *ui;
int x,y; //勇士的x,y坐标
int min_x,min_y;
bool showing;
bool end_show;
bool gameover;
bool win;
PButton** pics;
QLabel** hurts;
QLabel** crips;
QPushButton* warrior_img;
QLabel* save_flag;
QLabel* information;
Shop* shop;
QLabel* label_showing;
QLabel* label_gameover;
QLabel* label_win;
QLabel* label_score;
};
#endif // MAINWINDOW_H

1044
mainwindow.ui Normal file

File diff suppressed because it is too large Load Diff

179
shop.cpp Normal file
View File

@ -0,0 +1,179 @@
#include "shop.h"
#include "ui_shop.h"
Shop::Shop(QWidget *parent) :
QDialog(parent),
ui(new Ui::Shop)
{
need_gold=0;
get_atk=0;
get_def=0;
get_hp=0;
get_yellowkey=0;
get_bluekey=0;
get_redkey=0;
get_greenkey=0;
ui->setupUi(this);
ui->notenough->hide();
}
Shop::~Shop()
{
delete ui;
}
void Shop::set_NeedGold()
{
need_gold=0;
need_gold+=get_atk*10;
need_gold+=get_def*10;
need_gold+=(get_hp+upgrade_exp-1)/upgrade_exp;
need_gold+=get_yellowkey*3;
need_gold+=get_bluekey*10;
need_gold+=get_redkey*40;
need_gold+=get_greenkey*200;
ui->Need_Gold->setText(QString::number(need_gold));
}
void Shop::on_add_atk_valueChanged(int arg1)
{
get_atk=arg1;
set_NeedGold();
}
void Shop::on_add_def_valueChanged(int arg1)
{
get_def=arg1;
set_NeedGold();
}
void Shop::on_add_hp_valueChanged(int arg1)
{
get_hp=arg1;
set_NeedGold();
}
void Shop::on_add_yellowkey_valueChanged(int arg1)
{
get_yellowkey=arg1;
set_NeedGold();
}
void Shop::on_add_bluekey_valueChanged(int arg1)
{
get_bluekey=arg1;
set_NeedGold();
}
void Shop::on_add_redkey_valueChanged(int arg1)
{
get_redkey=arg1;
set_NeedGold();
}
void Shop::on_add_greenkey_valueChanged(int arg1)
{
get_greenkey=arg1;
set_NeedGold();
}
void Shop::on_pushButton_clicked()
{
if(gold>=need_gold)
{
if(need_gold>0)
road_log[rlf++]='S';
char log_temp=0;
if(get_atk>0)
{
log_temp=1;
memcpy(road_log+rlf,&log_temp,1);
memcpy(road_log+rlf+1,&get_atk,sizeof(int));
rlf+=5;
}
if(get_def>0)
{
log_temp=2;
memcpy(road_log+rlf,&log_temp,1);
memcpy(road_log+rlf+1,&get_def,sizeof(int));
rlf+=5;
}
if(get_hp>0)
{
log_temp=3;
memcpy(road_log+rlf,&log_temp,1);
memcpy(road_log+rlf+1,&get_hp,sizeof(int));
rlf+=5;
}
if(get_yellowkey>0)
{
log_temp=4;
memcpy(road_log+rlf,&log_temp,1);
memcpy(road_log+rlf+1,&get_yellowkey,sizeof(int));
rlf+=5;
}
if(get_bluekey>0)
{
log_temp=5;
memcpy(road_log+rlf,&log_temp,1);
memcpy(road_log+rlf+1,&get_bluekey,sizeof(int));
rlf+=5;
}
if(get_redkey>0)
{
log_temp=6;
memcpy(road_log+rlf,&log_temp,1);
memcpy(road_log+rlf+1,&get_redkey,sizeof(int));
rlf+=5;
}
if(get_greenkey>0)
{
log_temp=7;
memcpy(road_log+rlf,&log_temp,1);
memcpy(road_log+rlf+1,&get_greenkey,sizeof(int));
rlf+=5;
}
road_log[rlf++]='E';
delta_atk=get_atk;
delta_def=get_def;
delta_hp=get_hp;
delta_yellowkey=get_yellowkey;
delta_bluekey=get_bluekey;
delta_redkey=get_redkey;
delta_greenkey=get_greenkey;
delta_gold=-need_gold;
get_atk=0;
get_def=0;
get_hp=0;
get_yellowkey=0;
get_bluekey=0;
get_redkey=0;
get_greenkey=0;
need_gold=0;
ui->add_hp->setValue(0);
ui->add_atk->setValue(0);
ui->add_def->setValue(0);
ui->add_redkey->setValue(0);
ui->add_bluekey->setValue(0);
ui->add_greenkey->setValue(0);
ui->add_yellowkey->setValue(0);
ui->notenough->hide();
emit end_shop();
close();
}
else
{
ui->notenough->show();
}
}
void Shop::Reset()
{
ui->label_11->setText("1金币"+QString::number(upgrade_exp)+"生命");
ui->notenough->hide();
}
void Shop::on_cancel_clicked()
{
close();
}

53
shop.h Normal file
View File

@ -0,0 +1,53 @@
#ifndef SHOP_H
#define SHOP_H
#include <QDialog>
#include "Event.h"
namespace Ui {
class Shop;
}
class Shop : public QDialog
{
Q_OBJECT
public:
explicit Shop(QWidget *parent = nullptr);
void Reset();
~Shop();
private slots:
void on_add_atk_valueChanged(int arg1);
void on_add_def_valueChanged(int arg1);
void on_add_hp_valueChanged(int arg1);
void on_add_yellowkey_valueChanged(int arg1);
void on_add_bluekey_valueChanged(int arg1);
void on_add_redkey_valueChanged(int arg1);
void on_add_greenkey_valueChanged(int arg1);
void on_pushButton_clicked();
void on_cancel_clicked();
signals:
void end_shop();
private:
Ui::Shop *ui;
int need_gold;
int get_atk;
int get_def;
int get_hp;
int get_yellowkey;
int get_bluekey;
int get_redkey;
int get_greenkey;
void set_NeedGold();
};
#endif // SHOP_H

587
shop.ui Normal file
View File

@ -0,0 +1,587 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Shop</class>
<widget class="QDialog" name="Shop">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>300</width>
<height>500</height>
</rect>
</property>
<property name="windowTitle">
<string>商店</string>
</property>
<property name="styleSheet">
<string notr="true">#Shop{
background-image: url(:/images/Background.jpeg);
}</string>
</property>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<width>300</width>
<height>28</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>14</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);
font: 14pt &quot;微软雅黑&quot;;</string>
</property>
<property name="text">
<string>商店</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>20</x>
<y>60</y>
<width>80</width>
<height>30</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>12</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);
font: 12pt &quot;微软雅黑&quot;;</string>
</property>
<property name="text">
<string>增加攻击</string>
</property>
</widget>
<widget class="QLabel" name="label_3">
<property name="geometry">
<rect>
<x>20</x>
<y>110</y>
<width>80</width>
<height>30</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>12</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);
font: 12pt &quot;微软雅黑&quot;;</string>
</property>
<property name="text">
<string>增加防御</string>
</property>
</widget>
<widget class="QLabel" name="label_4">
<property name="geometry">
<rect>
<x>20</x>
<y>160</y>
<width>80</width>
<height>30</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>12</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);
font: 12pt &quot;微软雅黑&quot;;</string>
</property>
<property name="text">
<string>增加生命</string>
</property>
</widget>
<widget class="QLabel" name="label_5">
<property name="geometry">
<rect>
<x>20</x>
<y>210</y>
<width>100</width>
<height>30</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>12</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);
font: 12pt &quot;微软雅黑&quot;;</string>
</property>
<property name="text">
<string>购买黄钥匙</string>
</property>
</widget>
<widget class="QLabel" name="label_6">
<property name="geometry">
<rect>
<x>20</x>
<y>260</y>
<width>100</width>
<height>30</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>12</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);
font: 12pt &quot;微软雅黑&quot;;</string>
</property>
<property name="text">
<string>购买蓝钥匙</string>
</property>
</widget>
<widget class="QLabel" name="label_7">
<property name="geometry">
<rect>
<x>20</x>
<y>310</y>
<width>100</width>
<height>30</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>12</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);
font: 12pt &quot;微软雅黑&quot;;</string>
</property>
<property name="text">
<string>购买红钥匙</string>
</property>
</widget>
<widget class="QLabel" name="label_8">
<property name="geometry">
<rect>
<x>20</x>
<y>360</y>
<width>100</width>
<height>30</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>12</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);
font: 12pt &quot;微软雅黑&quot;;</string>
</property>
<property name="text">
<string>购买绿钥匙</string>
</property>
</widget>
<widget class="QSpinBox" name="add_atk">
<property name="geometry">
<rect>
<x>150</x>
<y>60</y>
<width>100</width>
<height>30</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/images/Blackgold.jpg);
font: 12pt &quot;微软雅黑&quot;;
color: rgb(255, 255, 255);</string>
</property>
<property name="maximum">
<number>9999</number>
</property>
</widget>
<widget class="QSpinBox" name="add_def">
<property name="geometry">
<rect>
<x>150</x>
<y>110</y>
<width>100</width>
<height>30</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/images/Blackgold.jpg);
font: 12pt &quot;微软雅黑&quot;;
color: rgb(255, 255, 255);</string>
</property>
<property name="maximum">
<number>9999</number>
</property>
</widget>
<widget class="QSpinBox" name="add_hp">
<property name="geometry">
<rect>
<x>150</x>
<y>160</y>
<width>100</width>
<height>30</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/images/Blackgold.jpg);
font: 12pt &quot;微软雅黑&quot;;
color: rgb(255, 255, 255);</string>
</property>
<property name="maximum">
<number>9999999</number>
</property>
<property name="singleStep">
<number>20</number>
</property>
</widget>
<widget class="QSpinBox" name="add_yellowkey">
<property name="geometry">
<rect>
<x>150</x>
<y>210</y>
<width>100</width>
<height>30</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/images/Blackgold.jpg);
font: 12pt &quot;微软雅黑&quot;;
color: rgb(255, 255, 255);</string>
</property>
<property name="maximum">
<number>9999</number>
</property>
</widget>
<widget class="QSpinBox" name="add_bluekey">
<property name="geometry">
<rect>
<x>150</x>
<y>260</y>
<width>100</width>
<height>30</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/images/Blackgold.jpg);
font: 12pt &quot;微软雅黑&quot;;
color: rgb(255, 255, 255);</string>
</property>
<property name="maximum">
<number>9999</number>
</property>
</widget>
<widget class="QSpinBox" name="add_redkey">
<property name="geometry">
<rect>
<x>150</x>
<y>310</y>
<width>100</width>
<height>30</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/images/Blackgold.jpg);
font: 12pt &quot;微软雅黑&quot;;
color: rgb(255, 255, 255);</string>
</property>
<property name="maximum">
<number>9999</number>
</property>
</widget>
<widget class="QSpinBox" name="add_greenkey">
<property name="geometry">
<rect>
<x>150</x>
<y>360</y>
<width>100</width>
<height>30</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/images/Blackgold.jpg);
font: 12pt &quot;微软雅黑&quot;;
color: rgb(255, 255, 255);</string>
</property>
<property name="maximum">
<number>9999</number>
</property>
</widget>
<widget class="QLabel" name="label_9">
<property name="geometry">
<rect>
<x>50</x>
<y>90</y>
<width>161</width>
<height>16</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(170, 255, 127);
font: 8pt &quot;微软雅黑&quot;;</string>
</property>
<property name="text">
<string>10金币/攻击</string>
</property>
</widget>
<widget class="QLabel" name="label_10">
<property name="geometry">
<rect>
<x>50</x>
<y>140</y>
<width>161</width>
<height>16</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(170, 255, 127);
font: 8pt &quot;微软雅黑&quot;;</string>
</property>
<property name="text">
<string>10金币/防御</string>
</property>
</widget>
<widget class="QLabel" name="label_11">
<property name="geometry">
<rect>
<x>50</x>
<y>190</y>
<width>161</width>
<height>16</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(170, 255, 127);
font: 8pt &quot;微软雅黑&quot;;</string>
</property>
<property name="text">
<string>1金币20生命</string>
</property>
</widget>
<widget class="QLabel" name="label_12">
<property name="geometry">
<rect>
<x>50</x>
<y>240</y>
<width>161</width>
<height>16</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(170, 255, 127);
font: 8pt &quot;微软雅黑&quot;;</string>
</property>
<property name="text">
<string>3金币/把</string>
</property>
</widget>
<widget class="QLabel" name="label_13">
<property name="geometry">
<rect>
<x>50</x>
<y>290</y>
<width>161</width>
<height>16</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(170, 255, 127);
font: 8pt &quot;微软雅黑&quot;;</string>
</property>
<property name="text">
<string>10金币/把</string>
</property>
</widget>
<widget class="QLabel" name="label_14">
<property name="geometry">
<rect>
<x>50</x>
<y>340</y>
<width>161</width>
<height>16</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(170, 255, 127);
font: 8pt &quot;微软雅黑&quot;;</string>
</property>
<property name="text">
<string>40金币/把</string>
</property>
</widget>
<widget class="QLabel" name="label_15">
<property name="geometry">
<rect>
<x>50</x>
<y>390</y>
<width>161</width>
<height>16</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(170, 255, 127);
font: 8pt &quot;微软雅黑&quot;;</string>
</property>
<property name="text">
<string>200金币/把</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton">
<property name="geometry">
<rect>
<x>30</x>
<y>450</y>
<width>93</width>
<height>40</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/images/Blackgold.jpg);
font: 14pt &quot;微软雅黑&quot;;
color: rgb(255, 255, 255);</string>
</property>
<property name="text">
<string>确定</string>
</property>
</widget>
<widget class="QLabel" name="label_16">
<property name="geometry">
<rect>
<x>20</x>
<y>400</y>
<width>100</width>
<height>30</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>12</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);
font: 12pt &quot;微软雅黑&quot;;</string>
</property>
<property name="text">
<string>所需金币:</string>
</property>
</widget>
<widget class="QLabel" name="Need_Gold">
<property name="geometry">
<rect>
<x>120</x>
<y>400</y>
<width>131</width>
<height>30</height>
</rect>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>12</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 255, 255);
font: 12pt &quot;微软雅黑&quot;;</string>
</property>
<property name="text">
<string>0</string>
</property>
</widget>
<widget class="QLabel" name="notenough">
<property name="geometry">
<rect>
<x>20</x>
<y>430</y>
<width>101</width>
<height>16</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(255, 0, 0);</string>
</property>
<property name="text">
<string>金币不足!</string>
</property>
</widget>
<widget class="QPushButton" name="cancel">
<property name="geometry">
<rect>
<x>170</x>
<y>450</y>
<width>93</width>
<height>40</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">border-image: url(:/images/Blackgold.jpg);
font: 14pt &quot;微软雅黑&quot;;
color: rgb(255, 255, 255);</string>
</property>
<property name="text">
<string>取消</string>
</property>
</widget>
</widget>
<resources/>
<connections/>
</ui>

42
untitled1.pro Normal file
View File

@ -0,0 +1,42 @@
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG += c++11
# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += \
Event.cpp \
EventData.cpp \
main.cpp \
mainwindow.cpp \
shop.cpp
HEADERS += \
Event.h \
mainwindow.h \
shop.h
FORMS += \
mainwindow.ui \
shop.ui
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
RESOURCES += \
image.qrc
RC_ICONS = favicon.ico

319
untitled1.pro.user Normal file
View File

@ -0,0 +1,319 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.11.0, 2022-04-02T10:31:01. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
<value type="QByteArray">{c4368457-fbd4-481d-9a53-26e1e13f1499}</value>
</data>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="int">0</value>
</data>
<data>
<variable>ProjectExplorer.Project.EditorSettings</variable>
<valuemap type="QVariantMap">
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
<value type="QString" key="language">Cpp</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
</valuemap>
</valuemap>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
<value type="QString" key="language">QmlJS</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
</valuemap>
</valuemap>
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
<value type="int" key="EditorConfiguration.IndentSize">4</value>
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
<value type="int" key="EditorConfiguration.TabSize">8</value>
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.PluginSettings</variable>
<valuemap type="QVariantMap">
<valuelist type="QVariantList" key="ClangCodeModel.CustomCommandLineKey">
<value type="QString">-fno-delayed-template-parsing</value>
</valuelist>
<value type="bool" key="ClangCodeModel.UseGlobalConfig">true</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.9.9 MinGW 32bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.9.9 MinGW 32bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.599.win32_mingw53_kit</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">E:/Qt/build-untitled1-Desktop_Qt_5_9_9_MinGW_32bit-Debug</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">E:/Qt/build-untitled1-Desktop_Qt_5_9_9_MinGW_32bit-Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">E:/Qt/build-untitled1-Desktop_Qt_5_9_9_MinGW_32bit-Profile</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">true</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="QString" key="Analyzer.Perf.CallgraphMode">dwarf</value>
<valuelist type="QVariantList" key="Analyzer.Perf.Events">
<value type="QString">cpu-cycles</value>
</valuelist>
<valuelist type="QVariantList" key="Analyzer.Perf.ExtraArguments"/>
<value type="int" key="Analyzer.Perf.Frequency">250</value>
<valuelist type="QVariantList" key="Analyzer.Perf.RecordArguments">
<value type="QString">-e</value>
<value type="QString">cpu-cycles</value>
<value type="QString">--call-graph</value>
<value type="QString">dwarf,4096</value>
<value type="QString">-F</value>
<value type="QString">250</value>
</valuelist>
<value type="QString" key="Analyzer.Perf.SampleMode">-F</value>
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
<value type="int" key="Analyzer.Perf.StackSize">4096</value>
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
<value type="QString" key="Analyzer.Valgrind.KCachegrindExecutable">kcachegrind</value>
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
<value type="int">0</value>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<value type="int">4</value>
<value type="int">5</value>
<value type="int">6</value>
<value type="int">7</value>
<value type="int">8</value>
<value type="int">9</value>
<value type="int">10</value>
<value type="int">11</value>
<value type="int">12</value>
<value type="int">13</value>
<value type="int">14</value>
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:E:/Qt/untitled1/untitled1.pro</value>
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">E:/Qt/untitled1/untitled1.pro</value>
<value type="QString" key="RunConfiguration.Arguments"></value>
<value type="bool" key="RunConfiguration.Arguments.multi">false</value>
<value type="QString" key="RunConfiguration.OverrideDebuggerStartup"></value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="QString" key="RunConfiguration.WorkingDirectory"></value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default"></value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.TargetCount</variable>
<value type="int">1</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">22</value>
</data>
<data>
<variable>Version</variable>
<value type="int">22</value>
</data>
</qtcreator>