代码拉取完成,页面将自动刷新
#include "zgs.h"
extern int player_number, MP;
extern Pig player[MAX_PLAYER];
void pick_card(int id,int time)
{
printf("Player[%d] pick up %d cards\n",id,time);
for(int i=1;i<=time;i++){
player[id].card[(player[id].card_number+1)] = get_a_card();
player[id].card_number++;
}
}
void cure(int id)
{
while(can_use(id,'P')&&player[id].health<4+(MP==id)){
//ues peach to player[id]
use_p(id);
}
}
int select_aim(int id,int is_f){
/*aim type*/
switch(player[id].id){
case 'Z':{
for(int i=id%player_number+1;i!=id;i=i%player_number+1)if(!is_dead(i)&&(is_fp(i)))
return i;
break;
}
case 'M':{
for(int i=id%player_number+1;i!=id;i=i%player_number+1)if(!is_dead(i)&&(is_fp(i)||player[i].Loyalty_or_opposition==2))
return i;
break;
}
case 'F':{
for(int i=id%player_number+1;i!=id;i=i%player_number+1)if(!is_dead(i)){
if(i==MP){
if(!is_f) return can_use_k(id,MP)?MP:-1;
else return MP;
}else if(is_zp(i)) return i;
}
break;
}
}
return -1;
}
void attack(int id){
if(game_end())return;
int i;
if(player[id].has_z==1){
while(can_use_k(id,select_aim(id,0)))
{
//use kiil
use_k(id,select_aim(id,0));
}
}else{
if(can_use_k(id,select_aim(id,0)))
{
//use kiil
use_k(id,select_aim(id,0));
}
}
while(can_use(id,'F')&&select_aim(id,1)!=-1){
//use 决斗
use_f(id,select_aim(id,1));
}
while(can_use(id,'N')){
//use 南蛮入侵
use_n(id);
}
while(can_use(id,'W')){
//use 万箭齐发
use_w(id);
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。