pip_job.c
来自「linux/unix环境下的建站系统」· C语言 代码 · 共 849 行 · 第 1/2 页
C
849 行
d.wrist -= rand() % +3; if (d.wrist < 0) d.wrist = 0; /* * show_job_pic(4); */ if (class >= 80) { workmoney = 400 + d.art / 10 + d.affect / 20; temppress("客人都很喜欢让你做造型唷..:)"); } else if (class < 80 && class >= 60) { workmoney = 360 + d.art / 10 + d.affect / 20; temppress("做的不错喔..颇有天份...:)"); } else if (class < 60 && class >= 40) { workmoney = 320 + d.art / 10 + d.affect / 20; temppress("马马虎虎啦..再加油一点.."); } else if (class < 40) { workmoney = 250 + d.art / 10 + d.affect / 20; temppress("待加强喔..以后再来吧...."); } d.money += workmoney; d.workI += 1; return 0;}intpip_job_workJ(){/* ├————┼——————————————————————┤*//* │狩猎区 │体力 + 1 , 气质 - 1 , 母性 - 1 , 疲劳 + 3 │*//* │ │战斗技术 + N │*//* ├————┼——————————————————————┤*//* │狩猎区 │若 体 力 - RND (疲劳) >= 80 & │*//* │ │若 智 力 - RND (疲劳) >= 40 则工作成功 │*//* ├————┼——————————————————————┤*/ float class; float class1; long workmoney; /* * 两岁以上才行 */ if ((d.bbtime / 60 / 30) < 2) { temppress("小鸡太小了,两岁以后再来吧..."); return 0; } workmoney = 0; class = (d.hp * 100 / d.maxhp) - d.tired; class1 = d.wisdom - d.tired; count_tired(5, 15, "Y", 100, 1); d.shit += rand() % 4 + 13; d.weight -= (rand() % 2 + 1); d.maxhp += rand() % 2 + 3; d.speed += rand() % 2 + 3; d.hp -= (rand() % 6 + 8); d.character -= rand() % 3 + 4; d.happy -= rand() % 5 + 8; d.satisfy -= rand() % 5 + 6; d.love -= rand() % 3 + 4; if (d.character < 0) d.character = 0; if (d.love < 0) d.love = 0; move(4, 0); show_job_pic(101); if (class >= 80 && class1 >= 80) { d.hskill += rand() % 2 + 7; workmoney = 300 + d.maxhp / 50 + d.hskill / 20; temppress("你是完美的猎人.."); } else if ((class < 75 && class >= 50) && class1 >= 60) { d.hskill += rand() % 2 + 5; workmoney = 270 + d.maxhp / 45 + d.hskill / 20; temppress("收获还不错喔..可以饱餐一顿了..:)"); } else if ((class < 50 && class >= 25) && class1 >= 40) { d.hskill += rand() % 2 + 3; workmoney = 240 + d.maxhp / 40 + d.hskill / 20; temppress("技术差强人意 再加油喔.."); } else if ((class < 25 && class >= 0) && class1 >= 20) { d.hskill += rand() % 2 + 1; workmoney = 210 + d.maxhp / 30 + d.hskill / 20; temppress("狩猎是体力与智力的结合...."); } else if (class < 0) { d.hskill += rand() % 2; workmoney = 190 + d.hskill / 20; temppress("要多多锻炼和增进智慧啦...."); } d.money = d.money + workmoney; d.workJ += 1; return 0;}intpip_job_workK(){/* ├————┼——————————————————————┤*//* │工地 │体力 + 2 , 魅力 - 1 , 疲劳 + 3 │*//* ├————┼——————————————————————┤*/ float class; long workmoney; /* * 两岁以上才行 */ if ((d.bbtime / 60 / 30) < 2) { temppress("小鸡太小了,两岁以后再来吧..."); return 0; } workmoney = 0; class = (d.hp * 100 / d.maxhp) - d.tired; count_tired(5, 15, "Y", 100, 1); d.shit += rand() % 4 + 16; d.weight -= (rand() % 2 + 2); d.maxhp += rand() % 2 + 1; d.speed += rand() % 2 + 2; d.hp -= (rand() % 6 + 10); d.charm -= rand() % 3 + 6; d.happy -= (rand() % 5 + 10); d.satisfy -= rand() % 5 + 6; if (d.charm < 0) d.charm = 0; move(4, 0); show_job_pic(111); if (class >= 75) { workmoney = 250 + d.maxhp / 50; temppress("工程很完美 谢谢你了.."); } else if (class < 75 && class >= 50) { workmoney = 220 + d.maxhp / 45; temppress("工程尚称顺利 辛苦你了.."); } else if (class < 50 && class >= 25) { workmoney = 200 + d.maxhp / 40; temppress("工程差强人意 再加油喔.."); } else if (class < 25 && class >= 0) { workmoney = 180 + d.maxhp / 30; temppress("ㄜ 待加强待加强...."); } else if (class < 0) { workmoney = 160; temppress("下次体力好一点..疲劳度低一点再来...."); } d.money = d.money + workmoney; d.workK += 1; return 0;}intpip_job_workL(){/* ├————┼——————————————————————┤*//* │墓园 │抗魔能力 + N , 感受 + 1 , 魅力 - 1 │*//* │ │疲劳 + 2 │*//* ├————┼——————————————————————┤*/ float class; float class1; long workmoney; /* * 三岁才行 */ if ((d.bbtime / 60 / 30) < 3) { temppress("小鸡现在还太小了,三岁以后再来吧..."); return 0; } workmoney = 0; class = (d.hp * 100 / d.maxhp) - d.tired; class1 = d.belief - d.tired; d.shit += rand() % 5 + 8; d.maxmp += rand() % 2; d.affect += rand() % 2 + 2; d.brave += rand() % 2 + 2; count_tired(5, 12, "Y", 100, 1); d.hp -= (rand() % 3 + 7); d.happy -= (rand() % 4 + 6); d.satisfy -= rand() % 3 + 5; d.charm -= rand() % 3 + 6; if (d.charm < 0) d.charm = 0; show_job_pic(121); if (class >= 75 && class1 >= 75) { d.mresist += rand() % 2 + 7; workmoney = 200 + (d.affect + d.brave) / 40; temppress("守墓成功喔 给你多点钱"); } else if ((class < 75 && class >= 50) && class1 >= 50) { d.mresist += rand() % 2 + 5; workmoney = 150 + (d.affect + d.brave) / 50; temppress("守墓还算成功喔..谢啦.."); } else if ((class < 50 && class >= 25) && class1 >= 25) { d.mresist += rand() % 2 + 3; workmoney = 120 + (d.affect + d.brave) / 60; temppress("守墓还算差强人意喔..加油.."); } else { d.mresist += rand() % 2 + 1; workmoney = 80 + (d.affect + d.brave) / 70; temppress("我也不方便说啥了..请再加油.."); } if (rand() % 10 == 5) { temppress("真是倒楣 竟遇到死神魔.."); pip_fight_bad(12); } d.money += workmoney; d.workL += 1; return 0;}intpip_job_workM(){/* ├————┼——————————————————————┤*//* │家庭教师│道德 + 1 , 母性 + N , 魅力 - 1 , 疲劳 + 7 │*//* ├————┼——————————————————————┤*/ float class; long workmoney; if ((d.bbtime / 60 / 30) < 4) { temppress("小鸡太小了,四岁以后再来吧..."); return 0; } workmoney = 0; class = (d.hp * 100 / d.maxhp) - d.tired; workmoney = 50 + d.wisdom / 20 + d.character / 20; count_tired(5, 10, "Y", 100, 1); d.shit += rand() % 3 + 8; d.character += rand() % 2; d.wisdom += rand() % 2; d.happy -= (rand() % 3 + 6); d.satisfy -= rand() % 3 + 5; d.hp -= (rand() % 3 + 8); d.money = d.money + workmoney; move(4, 0); show_job_pic(131); temppress("家教轻松 当然钱就少一点罗"); d.workM += 1; return 0;}intpip_job_workN(){/* ├————┼——————————————————————┤*//* │酒店 │烹饪技巧 + N , 谈话技巧 + N , 智力 - 2 │*//* │ │疲劳 + 5 │*//* ├————┼——————————————————————┤*//* │酒店 │若 体 力 - RND (疲劳) >= 60 & │*//* │ │若 魅 力 - RND (疲劳) >= 50 则工作成功 │*//* ├————┼——————————————————————┤*/ float class; float class1; long workmoney; if ((d.bbtime / 60 / 30) < 5) { temppress("小鸡太小了,五岁以后再来吧..."); return 0; } workmoney = 0; class = (d.hp * 100 / d.maxhp) - d.tired; class1 = d.charm - d.tired; d.shit += rand() % 5 + 5; count_tired(5, 14, "Y", 100, 1); d.hp -= (rand() % 3 + 5); d.social -= rand() % 5 + 6; d.happy -= (rand() % 4 + 6); d.satisfy -= rand() % 3 + 5; d.wisdom -= rand() % 3 + 4; if (d.wisdom < 0) d.wisdom = 0; /* * show_job_pic(6); */ if (class >= 75 && class1 >= 75) { d.cookskill += rand() % 2 + 7; d.speech += rand() % 2 + 5; workmoney = 500 + (d.charm) / 5; temppress("你很红唷 :)"); } else if ((class < 75 && class >= 50) && class1 >= 50) { d.cookskill += rand() % 2 + 5; d.speech += rand() % 2 + 5; workmoney = 400 + (d.charm) / 5; temppress("蛮受欢迎的耶...."); } else if ((class < 50 && class >= 25) && class1 >= 25) { d.cookskill += rand() % 2 + 4; d.speech += rand() % 2 + 3; workmoney = 300 + (d.charm) / 5; temppress("很平凡啦..但马马虎虎..."); } else { d.cookskill += rand() % 2 + 2; d.speech += rand() % 2 + 2; workmoney = 200 + (d.charm) / 5; temppress("你的媚力不够啦..请加油...."); } d.money += workmoney; d.workN += 1; return 0;}intpip_job_workO(){/* ├————┼——————————————————————┤*//* │酒家 │魅力 + 2 , 罪孽 + 2 , 道德 - 3 , 信仰 - 3 │*//* │ │待人接物 - N , 和父亲的关系 - N , 疲劳 + 12 │*//* ├————┼——————————————————————┤*//* │酒家 │若 魅 力 - RND (疲劳) >= 70 则工作成功 │*//* ├————┼——————————————————————┤*/ float class; long workmoney; if ((d.bbtime / 60 / 30) < 4) { temppress("小鸡太小了,四岁以后再来吧..."); return 0; } workmoney = 0; class = d.charm - d.tired; d.shit += rand() % 5 + 14; d.charm += rand() % 3 + 8; d.offense += rand() % 3 + 8; count_tired(5, 22, "Y", 100, 1); d.hp -= (rand() % 3 + 8); d.social -= rand() % 6 + 12; d.happy -= (rand() % 4 + 8); d.satisfy -= rand() % 3 + 8; d.etchics -= rand() % 6 + 10; d.belief -= rand() % 6 + 10; if (d.etchics < 0) d.etchics = 0; if (d.belief < 0) d.belief = 0; /* * show_job_pic(6); */ if (class >= 75) { d.relation -= rand() % 5 + 12; d.toman -= rand() % 5 + 12; workmoney = 600 + (d.charm) / 5; temppress("你是本店的红牌唷 :)"); } else if (class < 75 && class >= 50) { d.relation -= rand() % 5 + 8; d.toman -= rand() % 5 + 8; workmoney = 500 + (d.charm) / 5; temppress("你蛮受欢迎的耶..:)"); } else if (class < 50 && class >= 25) { d.relation -= rand() % 5 + 5; d.toman -= rand() % 5 + 5; workmoney = 400 + (d.charm) / 5; temppress("你很平凡..但马马虎虎啦..."); } else { d.relation -= rand() % 5 + 1; d.toman -= rand() % 5 + 1; workmoney = 300 + (d.charm) / 5; temppress("唉..你的媚力不够啦...."); } d.money += workmoney; if (d.relation < 0) d.relation = 0; if (d.toman < 0) d.toman = 0; d.workO += 1; return 0;}intpip_job_workP(){/* ├————┼——————————————————————┤*//* │大夜总会│魅力 + 3 , 罪孽 + 1 , 气质 - 2 , 智力 - 1 │*//* │ │待人接物 - N , 疲劳 + 8 │*//* ├————┼——————————————————————┤*//* │大夜总会│若 魅 力 - RND (疲劳) >= 70 & │*//* │ │若 艺术修养 - RND (疲劳) >= 30 则工作成功 │*//* └————┴——————————————————————┘*/ float class; float class1; long workmoney; if ((d.bbtime / 60 / 30) < 6) { temppress("小鸡太小了,六岁以后再来吧..."); return 0; } workmoney = 0; class = d.charm - d.tired; class1 = d.art - d.tired; d.shit += rand() % 5 + 7; d.charm += rand() % 3 + 8; d.offense += rand() % 3 + 8; count_tired(5, 22, "Y", 100, 1); d.hp -= (rand() % 3 + 8); d.social -= rand() % 6 + 12; d.happy -= (rand() % 4 + 8); d.satisfy -= rand() % 3 + 8; d.character -= rand() % 3 + 8; d.wisdom -= rand() % 3 + 5; if (d.character < 0) d.character = 0; if (d.wisdom < 0) d.wisdom = 0; /* * show_job_pic(6); */ if (class >= 75 && class1 > 30) { d.speech += rand() % 5 + 12; d.toman -= rand() % 5 + 12; workmoney = 1000 + (d.charm) / 5; temppress("你是夜总会最闪亮的星星唷 :)"); } else if ((class < 75 && class >= 50) && class1 > 20) { d.speech += rand() % 5 + 8; d.toman -= rand() % 5 + 8; workmoney = 800 + (d.charm) / 5; temppress("嗯嗯..你蛮受欢迎的耶..:)"); } else if ((class < 50 && class >= 25) && class1 > 10) { d.speech += rand() % 5 + 5; d.toman -= rand() % 5 + 5; workmoney = 600 + (d.charm) / 5; temppress("你要加油了啦..但普普啦..."); } else { d.speech += rand() % 5 + 1; d.toman -= rand() % 5 + 1; workmoney = 400 + (d.charm) / 5; temppress("唉..你不行啦...."); } d.money += workmoney; if (d.toman < 0) d.toman = 0; d.workP += 1; return 0;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?