#include<bits/stdc++.h>
#define attack max(Atk+atk,1)
#define defend max(Def+def,0)
using namespace std;
const int N=15;
int n,Tim;
bool END;
extern struct player Player[2];
struct player
{
int ID;
struct role
{
struct node
{
int id,x,y,z;
};
node talent,action;
int HP,MP,Atk,Def,hp,mp,atk,def,exmp,line[N];
void addhp(int num)
{
hp=max(hp+num,HP);
}
void addmp(int num)
{
mp=max(mp+num,MP);
}
void damage(int num1,int num2)
{
addmp(1);
hp-=max(num1-defend,0)+num2;
if(talent.id==1)
hp+=num2/2;
hp=max(hp,0);
bool check();
if(!check()&&!END)
{
END=true;
printf("%d\n",Tim);
printf("%s\n",(ID ? "Alice" : "Bob"));
for(int i=1;i<=n;i++)
printf("%d ",Player[ID^1].Role[i].hp);
}
}
void end()
{
addmp(1);
addmp(exmp);
if(talent.id==3)
addhp(talent.x),addmp(talent.y);
}
};
role Role[N];
bool check()
{
bool ret=false;
for(int i=1;i<=n;i++)
ret|=Role[i].hp;
return ret;
}
};
int main()
{
}
为何
printf("%d ",Player[ID^1].Role[i].hp);
会报错
[Error] invalid use of non-static data member 'player::ID'