📄 koulesgameplan.c
字号:
BALLM = 3;
LBALLM = 3;
BBALLM = 8;
APPLEM = 40;
ROCKETM = 2;
break;
case 1:
ROCKET_SPEED = 1.0f;
BALL_SPEED = 1.2f;
BBALL_SPEED = 1.2f;
SLOWDOWN = 0.9f;
GUMM = 20;
BALLM = 3;
LBALLM = 3;
BBALLM = 8;
APPLEM = 40;
ROCKETM = 4;
break;
case 2:
ROCKET_SPEED = 1.2f;
BALL_SPEED = 1.2f;
BBALL_SPEED = 1.2f;
SLOWDOWN = 0.8f;
GUMM = 20;
APPLEM = 34;
BALLM = 3;
LBALLM = 3;
BBALLM = 8;
ROCKETM = 4;
break;
case 3:
ROCKET_SPEED = 2.0f;
BALL_SPEED = 1.2f;
BBALL_SPEED = 1.2f;
SLOWDOWN = 0.8f;
GUMM = 20;
BALLM = 3;
LBALLM = 3;
APPLEM = 24;
BBALLM = 8;
ROCKETM = 5;
break;
case 4:
ROCKET_SPEED = 2.0f;
BALL_SPEED = 1.2f;
BBALL_SPEED = 1.2f;
SLOWDOWN = 0.8f;
GUMM = 15;
BALLM = 3;
LBALLM = 3;
APPLEM = 24;
BBALLM = 8;
ROCKETM = 7;
}
Koules_clearpoints();
Koules_init_objects1();
}
int
Koules_allow_finder()
{
if (kouleslevel > FINDERLEVEL || koulesgameplan == DEATHMATCH)
return 1;
return 0;
}
int
Koules_create_letter()
{
int tirage, chance, letter;
int i;
if (koulesgameplan == COOPERATIVE)
{
i = KoulesGetRand() % 4;
if (i < 3)
return (i);
if (kouleslevel > THIEFLEVEL && KoulesGetRand() % 400 < kouleslevel - THIEFLEVEL + 40)
return (3);
if (kouleslevel > TTOOLLEVEL && KoulesGetRand() % 600 < kouleslevel - TTOOLLEVEL + 40)
return (5);
if (kouleslevel > FINDERLEVEL && gtime < 0 && KoulesGetRand() % 700 < kouleslevel - FINDERLEVEL + 40)
return (4);
return (0);
}
chance = KoulesGetRand() % 100;
if (chance < 80)
{ /* create letter : = 1 rand / 2 */
tirage = KoulesGetRand() % 100;
if (tirage < 30)
letter = 1;
else if (tirage < 60)
letter = 2;
else if (tirage < 70)
letter = 5;
else if (tirage < 80)
letter = 3;
else
letter = 4;
return (letter);
}
else
return (0);
}
void
Koules_update_game()
{
int i;
if (koulesgamemode == KOULESMODEGAME)
{
if (ktime)
{
ktime--;
if (ktime == 0)
switch (kmode)
{
case 1:
Koules_init_objects();
break;
case 2:
kouleslastlevel = 0;
kouleslevel = 1, koulesgamemode = KOULESMODEMENU;
break;
case 3:
if (a_balls || a_bballs || a_inspectors || a_lunatics)
break;
for (i = 0; i < koulesnrockets; i++)
if (koulesobject[i].type == ROCKET && koulesobject[i].live)
koulesobject[i].score += koulesobject[i].live * 20;
kouleslevel++, Koules_init_objects();
break;
case 4:
for (i = 0; i < koulesnrockets; i++)
if (koulesobject[i].type == ROCKET)
koulesobject[i].score -= 100;
nos = 1;
Koules_init_objects();
nos = 0;
break;
}
}
else
switch (koulesgameplan)
{
case DEATHMATCH:
if (koulesnrockets == 1)
{
if (!(KoulesGetRand() % 60))
Koules_creator(HOLE);
if (a_rockets == 0)
{
ktime = 50;
kmode = 1;
koulesobject[0].score -= 100;
}
if (a_lunatics == 0)
{
ktime = 50;
kmode = 1;
koulesobject[0].score += 100;
}
break;
}
if (a_balls == 0)
secondpart = 1;
if (a_lunatics < koulesnrockets && !(KoulesGetRand() % 150))
Koules_creator(LUNATIC);
if (secondpart)
{
if (!(KoulesGetRand() % 100))
Koules_creator(BBALL);
if (!(KoulesGetRand() % 60))
Koules_creator(HOLE);
if (!(KoulesGetRand() % 400))
Koules_creator(BBALL);
if (!(KoulesGetRand() % 400))
Koules_creator(INSPECTOR);
if (!(KoulesGetRand() % 600))
Koules_creator(EHOLE);
}
if (a_rockets <= 1)
{
ktime = 50;
kmode = 1;
}
break;
case COOPERATIVE:
if (kouleslevel == 99)
{
if (!a_apples)
ktime = 50, kmode = 2;
if (a_balls < 15)
if (!(KoulesGetRand() % 40))
Koules_creator(BALL);
/*if (a_lunatics < 3)
if (!(KoulesGetRand() % 90))
Koules_creator (LUNATIC); */
if (a_bballs < 3)
if (!(KoulesGetRand() % 3000))
Koules_creator(BBALL);
}
else
{
gtime--;
if (a_balls == 0 && a_bballs == 0 && a_inspectors == 0 && a_lunatics == 0)
{
ktime = 50, kmode = 3;
}
if (a_balls < 4 * kouleslevel && gtime < 0)
if (!(KoulesGetRand() % ((koulesnrockets == 1 ? 200 : 150) + (110 - kouleslevel))))
Koules_creator(BALL);
if (a_lunatics < (kouleslevel - LUNATICLEVEL) && a_lunatics < 3 && gtime < 0)
if (!(KoulesGetRand() % ((koulesnrockets == 1 ? 800 : 450) + (110 - kouleslevel))))
Koules_creator(LUNATIC);
if (a_holes < 4 * (kouleslevel - HOLELEVEL) && gtime < 0)
if (!(KoulesGetRand() % (412 + 512 / (kouleslevel + 1))))//if (!(KoulesGetRand() % (412 + 512 / kouleslevel)))
Koules_creator(HOLE);
if (a_bballs < 4 * (kouleslevel - BBALLLEVEL) && gtime < 0)
if (!(KoulesGetRand() % ((koulesnrockets == 1 ? 700 : 500) + 1 * (110 - kouleslevel) / 3 + 2024 / (kouleslevel + 1))))
Koules_creator(BBALL);
if (a_inspectors < kouleslevel / (INSPECTORLEVEL) && gtime < 0)
if (!(KoulesGetRand() % (1500 + 10 * (110 - kouleslevel))))
Koules_creator(INSPECTOR);
if (a_eholes < kouleslevel / EHOLELEVEL + 1 && gtime < 0 && kouleslevel >= EHOLELEVEL)
if (!(KoulesGetRand() % (500 + 1000 / (kouleslevel + 1))))// if (!(KoulesGetRand() % (500 + 1000 / kouleslevel)))
Koules_creator(EHOLE);
}
if (a_rockets == 0)
{
ktime = 50;
kmode = 4;
}
}
}
else
{
if (a_balls < 5 && !(KoulesGetRand() % (50)))
Koules_creator(BALL);
if (a_lunatics < 5 && !(KoulesGetRand() % (50)))
Koules_creator(LUNATIC);
if (a_bballs < 4 && !(KoulesGetRand() % (200)))
Koules_creator(BBALL);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -