diff --git a/data/world1/level115.dat b/data/world1/level115.dat index 8a57755..e1e76cd 100644 --- a/data/world1/level115.dat +++ b/data/world1/level115.dat @@ -5,6 +5,7 @@ help endhelp monsters 0 20 22 +23 20 9 12 34 14 12 4 14 60 22 13 @@ -40,7 +41,6 @@ monsters 17 4 2 17 5 25 17 34 25 -23 20 9 endmonsters exitdir 1 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44, @@ -54,10 +54,10 @@ exitdir 1 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44, 44,0,0,0,0,0,0,0,25,25,25,0,0,0,0,0,17,0,0,0,0,0,0,0,17,0,0,0,0,25,25,25,0,0,0,0,0,0,0,44, 44,0,0,0,0,0,0,0,0,0,0,0,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,0,0,0,0,0,0,0,0,0,0,0,44, +44,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,0,0,44, 44,0,0,0,0,0,0,0,0,0,0,0,24,16,16,16,16,16,16,16,16,16,16,16,16,16,16,24,0,0,0,0,0,0,0,0,0,0,0,44, 44,0,0,0,0,0,0,0,0,0,0,0,24,15,15,15,15,15,15,15,15,15,15,15,15,15,15,24,0,0,0,0,0,0,0,0,0,0,0,44, 44,0,0,0,0,0,0,0,0,0,0,0,24,15,15,15,15,15,15,15,15,15,15,15,15,15,15,24,0,0,0,0,0,0,0,0,0,0,0,44, -44,0,0,0,0,0,0,0,0,0,0,0,24,15,15,15,15,15,15,15,15,15,15,15,15,15,15,24,0,0,0,0,0,0,0,0,0,0,0,44, 44,0,0,0,25,25,25,25,25,25,25,0,24,15,15,15,15,15,15,15,15,15,15,15,15,15,15,24,0,25,25,25,25,25,25,25,0,0,0,44, 44,0,0,0,0,0,0,0,0,0,0,0,24,15,15,15,15,15,15,15,15,15,15,15,15,15,15,24,0,0,0,0,0,0,0,0,0,0,0,44, 44,0,0,0,0,0,0,0,0,0,0,0,24,15,15,15,15,15,15,15,15,15,15,15,15,15,15,24,0,0,0,0,0,0,0,0,0,0,0,44, diff --git a/data/world1/level14.dat b/data/world1/level14.dat index 56c57fd..1536d51 100644 --- a/data/world1/level14.dat +++ b/data/world1/level14.dat @@ -55,9 +55,9 @@ exitdir 1 24,0,0,0,0,0,0,0,0,0,0,17,0,0,0,0,0,24,24,26,26,26,24,24,0,0,0,0,0,17,0,0,0,0,0,0,0,0,0,24, 24,25,23,23,23,23,23,23,23,23,25,25,25,23,23,23,23,24,24,26,26,26,24,24,23,23,23,23,25,25,25,23,23,23,23,23,23,23,25,24, 24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,24,24,26,26,26,24,24,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24, -24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,24,24,26,26,26,26,26,24,24,11,0,0,0,0,0,0,0,0,0,0,0,0,0,24, +24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,24,26,26,26,26,26,24,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24, 24,0,0,0,0,0,0,0,0,0,0,0,0,0,11,24,24,26,26,26,26,26,26,26,24,24,11,0,0,0,0,0,0,0,0,0,0,0,0,24, -24,0,0,0,0,0,0,0,0,0,0,0,0,11,24,24,26,26,26,26,26,26,26,26,26,24,24,11,0,0,0,0,0,0,0,0,0,0,0,24, +24,0,0,0,0,0,0,0,0,0,0,0,0,11,24,26,26,26,26,26,26,26,26,26,26,26,24,11,0,0,0,0,0,0,0,0,0,0,0,24, 24,0,0,0,0,0,0,0,0,0,0,0,0,24,24,26,26,26,26,26,26,26,26,26,26,26,24,24,0,0,0,0,0,0,0,0,0,0,0,24, 24,0,0,0,0,0,0,0,0,0,0,17,0,24,24,26,26,26,26,26,26,26,26,26,26,26,24,24,0,17,0,0,0,0,0,0,0,0,0,24, 24,0,0,0,0,0,0,0,0,0,23,23,23,24,24,26,26,26,26,26,26,26,26,26,26,26,24,24,23,23,23,0,0,0,0,0,0,0,0,24, @@ -70,3 +70,5 @@ exitdir 1 24,0,0,0,0,29,0,0,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,0,0,29,0,0,0,24, 24,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,24, layer2 +15,20,22 +25,20,22 diff --git a/defs.h b/defs.h index fbe2cc4..4ab3b1b 100644 --- a/defs.h +++ b/defs.h @@ -840,6 +840,7 @@ extern char *deathtext[]; extern char *bifftext[]; extern spriteinfo_t spriteinfo[]; +extern int gotcard; extern int curcard; extern int deck[]; extern int forcegoodcard; diff --git a/globals.h b/globals.h index bdce852..403b912 100644 --- a/globals.h +++ b/globals.h @@ -15,6 +15,7 @@ spriteinfo_t spriteinfo[MAXPTYPES]; char *datadir; +int gotcard; // got a card yet this level? int curcard; int deck[DECKSIZE]; int forcegoodcard; diff --git a/rc.c b/rc.c index 70fa524..678ee9f 100644 --- a/rc.c +++ b/rc.c @@ -42,6 +42,7 @@ int numhiscores; int wanthiscores; int gothiscore = -1; + int havejoysticks; int joybuttons; SDL_Joystick *joy; @@ -584,12 +585,14 @@ int main (int argc, char **argv) { // warning for cloud - if ((gtime >= nexthurryup + 10) && (gtime < nexthurryup+15)) { // 15 secs after hurryup - if (levelcomplete == LV_INPROGRESS) { - if (timer % 4 == 0) { - // add puffs - puffin(-1, 320 + (rand() % (TILEW*4)) - (TILEW*2), - 240 + (rand() % (TILEH*2)) - TILEH, "cloudwarn", rand() % 5); + if (!isbosslevel(curlevelnum)) { + if ((gtime >= nexthurryup + 10) && (gtime < nexthurryup+15)) { // 15 secs after hurryup + if (levelcomplete == LV_INPROGRESS) { + if (timer % 4 == 0) { + // add puffs + puffin(-1, 320 + (rand() % (TILEW*4)) - (TILEW*2), + 240 + (rand() % (TILEH*2)) - TILEH, "cloudwarn", rand() % 5); + } } } } @@ -1104,6 +1107,9 @@ void nextlevel(void) { player->speed = 2; } + // haven't got a card yet + gotcard = B_FALSE; + // reset timer timer = 0; } @@ -1947,32 +1953,36 @@ if (s->id == P_PUFF) printf("PUFF WITH DOOMCOUNT!\n"); sprite_t *newsp; // if player already has this, and no cards already on screen, - // we get a card instead - if ((isfruit(s->timer3) == FT_PERM) && haspowerup(player, s->timer3)) { - sprite_t *search; - int found; - found = B_FALSE; + // we get a card instead (and also haven't got a card yet htis + // level) + if (!gotcard) { + if ((isfruit(s->timer3) == FT_PERM) && haspowerup(player, s->timer3)) { + sprite_t *search; + int found; + found = B_FALSE; - // is there already a card here or about to appear? - for (search = sprite; search ; search = search->next) { - if (iscard(search->id)) { - found = B_TRUE; - break; + // is there already a card here or about to appear? + for (search = sprite; search ; search = search->next) { + if (iscard(search->id)) { + found = B_TRUE; + break; + } + // if it's a puff that will become a card... + if ((search->id == P_PUFF) && (iscard(search->timer3))) { + found = B_TRUE; + break; + } } - // if it's a puff that will become a card... - if ((search->id == P_PUFF) && (iscard(search->timer3))) { - found = B_TRUE; - break; - } - } - if (!found) { - s->timer3 = P_FIRSTCARD; + if (!found) { + s->timer3 = P_FIRSTCARD; + } } } if (s->timer3 == P_FIRSTCARD) { s->timer3 = getrandomcard(); + gotcard = B_TRUE; } newsp = addsprite(s->timer3, s->x,s->y,s->name ); @@ -5014,10 +5024,12 @@ void dogravity(sprite_t *s) { // if player isn't fast, give a speed. if (player->speed != PLAYERFAST) { s2->willbecome = P_SPEED; - } else if (gotsomething >= 4) { // card for killing 5 at once + } else if (!gotcard & (gotsomething >= 4)) { // card for killing 5 at once s2->willbecome = getrandomcard(); - } else if (rand() % 5 == 0) { // random chance of a card + gotcard = B_TRUE; + } else if (!gotcard && (rand() % 5 == 0)) { // random chance of a card s2->willbecome = getrandomcard(); + gotcard = B_TRUE; } else { // otherwise use normal powerup counter s2->willbecome = poweruptypes[curpoweruptype]; @@ -8366,6 +8378,11 @@ void checkhiscores(void){ int curlet; + // no hiscores if we are cheating! + if (cheat) { + return; + } + // contact server and read list if (gethiscores()) { printf("Cannot contact hiscore server!\n"); diff --git a/shared.c b/shared.c index 3919309..02b65aa 100644 --- a/shared.c +++ b/shared.c @@ -2707,6 +2707,7 @@ int randompowerup(void) { case 25: return P_MASKPOWERUP; case 26: + gotcard = B_TRUE; return getrandomcard(); case 27: return P_CLOVER;