int pip_results_show() /*收获季*/ { //% char *showname[5]={" ","武斗大会","艺术大展","皇家舞会","烹饪大赛"}; char *showname[5]={" ","\xce\xe4\xb6\xb7\xb4\xf3\xbb\xe1","\xd2\xd5\xca\xf5\xb4\xf3\xd5\xb9","\xbb\xca\xbc\xd2\xce\xe8\xbb\xe1","\xc5\xeb\xe2\xbf\xb4\xf3\xc8\xfc"}; char buf[256]; int pipkey,i=0; int winorlost=0; int a,b[3][2],c[3]; screen_clear(); move(10,14); //% prints("[1;33m叮咚叮咚~ 辛苦的邮差帮我们送信来了喔...[0m"); prints("[1;33m\xb6\xa3\xdf\xcb\xb6\xa3\xdf\xcb\xa1\xab \xd0\xc1\xbf\xe0\xb5\xc4\xd3\xca\xb2\xee\xb0\xef\xce\xd2\xc3\xc7\xcb\xcd\xd0\xc5\xc0\xb4\xc1\xcb\xe0\xb8...[0m"); //% pressanykey("嗯 把信打开看看吧..."); pressanykey("\xe0\xc5 \xb0\xd1\xd0\xc5\xb4\xf2\xbf\xaa\xbf\xb4\xbf\xb4\xb0\xc9..."); screen_clear(); show_resultshow_pic(0); //% sprintf(buf,"[A]%s [B]%s [C]%s [D]%s [Q]放弃:",showname[1],showname[2],showname[3],showname[4]); sprintf(buf,"[A]%s [B]%s [C]%s [D]%s [Q]\xb7\xc5\xc6\xfa:",showname[1],showname[2],showname[3],showname[4]); move(b_lines,0); prints(buf); do { pipkey=egetch(); } while(pipkey!='q' && pipkey!='Q' && pipkey!='A' && pipkey!='a' && pipkey!='B' && pipkey!='b' && pipkey!='C' && pipkey!='c'&& pipkey!='D' && pipkey!='d'); a=rand()%4+1; b[0][0]=a-1; b[1][0]=a+1; b[2][0]=a; switch(pipkey) { case 'A': case 'a': //% pressanykey("今年共有四人参赛~现在比赛开始"); pressanykey("\xbd\xf1\xc4\xea\xb9\xb2\xd3\xd0\xcb\xc4\xc8\xcb\xb2\xce\xc8\xfc\xa1\xab\xcf\xd6\xd4\xda\xb1\xc8\xc8\xfc\xbf\xaa\xca\xbc"); for(i=0;i<3;i++) { a=0; b[i][1]=0; //% sprintf(buf,"你的第%d个对手是%s",i+1,resultmanlist[b[i][0]].name); sprintf(buf,"\xc4\xe3\xb5\xc4\xb5\xda%d\xb8\xf6\xb6\xd4\xca\xd6\xca\xc7%s",i+1,resultmanlist[b[i][0]].name); pressanykey(buf); a=pip_vs_man(b[i][0],resultmanlist,2); if(a==1) b[i][1]=1;/*对方输了*/ winorlost+=a; d.death=0; } switch(winorlost) { case 3: pip_results_show_ending(3,1,b[1][0],b[0][0],b[2][0]); d.hexp+=rand()%10+50; break; case 2: if(b[0][1]!=1) { c[0]=b[0][0]; c[1]=b[1][0]; c[2]=b[2][0]; } else if(b[1][1]!=1) { c[0]=b[1][0]; c[1]=b[2][0]; c[2]=b[0][0]; } else if(b[2][1]!=1) { c[0]=b[2][0]; c[1]=b[0][0]; c[2]=b[1][0]; } pip_results_show_ending(2,1,c[0],c[1],c[2]); d.hexp+=rand()%10+30; break; case 1: if(b[0][1]==1) { c[0]=b[2][0]; c[1]=b[1][0]; c[2]=b[0][0]; } else if(b[1][1]==1) { c[0]=b[0][0]; c[1]=b[2][0]; c[2]=b[1][0]; } else if(b[2][1]==1) { c[0]=b[1][0]; c[1]=b[0][0]; c[2]=b[2][0]; } pip_results_show_ending(1,1,c[0],c[1],c[2]); d.hexp+=rand()%10+10; break; case 0: pip_results_show_ending(0,1,b[0][0],b[1][0],b[2][0]); d.hexp-=rand()%10+10; break; } break; case 'B': case 'b': //% pressanykey("今年共有四人参赛~现在比赛开始"); pressanykey("\xbd\xf1\xc4\xea\xb9\xb2\xd3\xd0\xcb\xc4\xc8\xcb\xb2\xce\xc8\xfc\xa1\xab\xcf\xd6\xd4\xda\xb1\xc8\xc8\xfc\xbf\xaa\xca\xbc"); show_resultshow_pic(21); //% pressanykey("比赛情形"); pressanykey("\xb1\xc8\xc8\xfc\xc7\xe9\xd0\xce"); if((d.art*2+d.character)/400>=5) { winorlost=3; } else if((d.art*2+d.character)/400>=4) { winorlost=2; } else if((d.art*2+d.character)/400>=3) { winorlost=1; } else { winorlost=0; } pip_results_show_ending(winorlost,2,rand()%2,rand()%2+2,rand()%2+4); d.art+=rand()%10+20*winorlost; d.character+=rand()%10+20*winorlost; break; case 'C': case 'c': //% pressanykey("今年共有四人参赛~现在比赛开始"); pressanykey("\xbd\xf1\xc4\xea\xb9\xb2\xd3\xd0\xcb\xc4\xc8\xcb\xb2\xce\xc8\xfc\xa1\xab\xcf\xd6\xd4\xda\xb1\xc8\xc8\xfc\xbf\xaa\xca\xbc"); if((d.art*2+d.charm)/400>=5) { winorlost=3; } else if((d.art*2+d.charm)/400>=4) { winorlost=2; } else if((d.art*2+d.charm)/400>=3) { winorlost=1; } else { winorlost=0; } d.art+=rand()%10+20*winorlost; d.charm+=rand()%10+20*winorlost; pip_results_show_ending(winorlost,3,rand()%2,rand()%2+4,rand()%2+2); break; case 'D': case 'd': //% pressanykey("今年共有四人参赛~现在比赛开始"); pressanykey("\xbd\xf1\xc4\xea\xb9\xb2\xd3\xd0\xcb\xc4\xc8\xcb\xb2\xce\xc8\xfc\xa1\xab\xcf\xd6\xd4\xda\xb1\xc8\xc8\xfc\xbf\xaa\xca\xbc"); if((d.affect+d.cookskill*2)/200>=4) { winorlost=3; } else if((d.affect+d.cookskill*2)/200>=3) { winorlost=2; } else if((d.affect+d.cookskill*2)/200>=2) { winorlost=1; } else { winorlost=0; } d.cookskill+=rand()%10+20*winorlost; d.family+=rand()%10+20*winorlost; pip_results_show_ending(winorlost,4,rand()%2+2,rand()%2,rand()%2+4); break; case 'Q': case 'q': //% pressanykey("今年不参加啦.....:("); pressanykey("\xbd\xf1\xc4\xea\xb2\xbb\xb2\xce\xbc\xd3\xc0\xb2.....:("); d.happy-=rand()%10+10; d.satisfy-=rand()%10+10; d.relation-=rand()%10; break; } if(pipkey!='Q' && pipkey!='q') { d.tired=0; d.hp=d.maxhp; d.happy+=rand()%20; d.satisfy+=rand()%20; d.relation+=rand()%10; } return 0; }
int pip_results_show() { /*收获季 */ const static char *showname[5] = { " ", "武斗大会", "艺术大展", "皇家舞会", "烹饪大赛" }; char buf[256]; int pipkey, i = 0; int winorlost = 0; int a, b[3][2], c[3]; clear(); move(10, 14); prints("\033[1;33m叮咚叮咚~ 辛苦的邮差帮我们送信来了喔...\033[0m"); temppress("嗯 把信打开看看吧..."); clear(); show_resultshow_pic(0); sprintf(buf, "[A]%s [B]%s [C]%s [D]%s [Q]放弃:", showname[1], showname[2], showname[3], showname[4]); move(b_lines, 0); prints(buf); do { pipkey = igetkey(); } while (pipkey != 'q' && pipkey != 'Q' && pipkey != 'A' && pipkey != 'a' && pipkey != 'B' && pipkey != 'b' && pipkey != 'C' && pipkey != 'c' && pipkey != 'D' && pipkey != 'd'); a = rand() % 4 + 1; b[0][0] = a - 1; b[1][0] = a + 1; b[2][0] = a; switch (pipkey) { case 'A': case 'a': temppress("今年共有四人参赛~现在比赛开始"); for (i = 0; i < 3; i++) { a = 0; b[i][1] = 0; sprintf(buf, "你的第%d个对手是%s", i + 1, resultmanlist[b[i][0]].name); temppress(buf); a = pip_vs_man(b[i][0], resultmanlist, 2); if (a == 1) b[i][1] = 1; /*对方输了 */ winorlost += a; d.death = 0; } switch (winorlost) { case 3: pip_results_show_ending(3, 1, b[1][0], b[0][0], b[2][0]); d.hexp += rand() % 10 + 50; break; case 2: if (b[0][1] != 1) { c[0] = b[0][0]; c[1] = b[1][0]; c[2] = b[2][0]; } else if (b[1][1] != 1) { c[0] = b[1][0]; c[1] = b[2][0]; c[2] = b[0][0]; } else if (b[2][1] != 1) { c[0] = b[2][0]; c[1] = b[0][0]; c[2] = b[1][0]; } else break; pip_results_show_ending(2, 1, c[0], c[1], c[2]); d.hexp += rand() % 10 + 30; break; case 1: if (b[0][1] == 1) { c[0] = b[2][0]; c[1] = b[1][0]; c[2] = b[0][0]; } else if (b[1][1] == 1) { c[0] = b[0][0]; c[1] = b[2][0]; c[2] = b[1][0]; } else if (b[2][1] == 1) { c[0] = b[1][0]; c[1] = b[0][0]; c[2] = b[2][0]; } else break; pip_results_show_ending(1, 1, c[0], c[1], c[2]); d.hexp += rand() % 10 + 10; break; case 0: pip_results_show_ending(0, 1, b[0][0], b[1][0], b[2][0]); d.hexp -= rand() % 10 + 10; break; } break; case 'B': case 'b': temppress("今年共有四人参赛~现在比赛开始"); show_resultshow_pic(21); temppress("比赛情形"); if ((d.art * 2 + d.character) / 400 >= 5) { winorlost = 3; } else if ((d.art * 2 + d.character) / 400 >= 4) { winorlost = 2; } else if ((d.art * 2 + d.character) / 400 >= 3) { winorlost = 1; } else { winorlost = 0; } pip_results_show_ending(winorlost, 2, rand() % 2, rand() % 2 + 2, rand() % 2 + 4); d.art += rand() % 10 + 20 * winorlost; d.character += rand() % 10 + 20 * winorlost; break; case 'C': case 'c': temppress("今年共有四人参赛~现在比赛开始"); if ((d.art * 2 + d.charm) / 400 >= 5) { winorlost = 3; } else if ((d.art * 2 + d.charm) / 400 >= 4) { winorlost = 2; } else if ((d.art * 2 + d.charm) / 400 >= 3) { winorlost = 1; } else { winorlost = 0; } d.art += rand() % 10 + 20 * winorlost; d.charm += rand() % 10 + 20 * winorlost; pip_results_show_ending(winorlost, 3, rand() % 2, rand() % 2 + 4, rand() % 2 + 2); break; case 'D': case 'd': temppress("今年共有四人参赛~现在比赛开始"); if ((d.affect + d.cookskill * 2) / 200 >= 4) { winorlost = 3; } else if ((d.affect + d.cookskill * 2) / 200 >= 3) { winorlost = 2; } else if ((d.affect + d.cookskill * 2) / 200 >= 2) { winorlost = 1; } else { winorlost = 0; } d.cookskill += rand() % 10 + 20 * winorlost; d.family += rand() % 10 + 20 * winorlost; pip_results_show_ending(winorlost, 4, rand() % 2 + 2, rand() % 2, rand() % 2 + 4); break; case 'Q': case 'q': temppress("今年不参加啦.....:("); d.happy -= rand() % 10 + 10; d.satisfy -= rand() % 10 + 10; d.relation -= rand() % 10; break; } if (pipkey != 'Q' && pipkey != 'q') { d.tired = 0; d.hp = d.maxhp; d.happy += rand() % 20; d.satisfy += rand() % 20; d.relation += rand() % 10; } return 0; }