diff --git a/src/item.c b/src/item.c index 067453d9..bf7a1e57 100644 --- a/src/item.c +++ b/src/item.c @@ -76,7 +76,10 @@ void process_items(void) { r *= 2; while(item != NULL) { - if(item->type == Power && global.plr.power >= PLR_MAXPOWER) { + if((item->type == Power && global.plr.power >= PLR_MAXPOWER) || + // just in case we ever have some weird spell that spawns those... + (global.stage->type == STAGE_SPELL && (item->type == Life || item->type == Bomb)) + ) { item->type = Point; } diff --git a/src/menu/gameovermenu.c b/src/menu/gameovermenu.c index ddd55d2e..844d79ab 100644 --- a/src/menu/gameovermenu.c +++ b/src/menu/gameovermenu.c @@ -39,15 +39,23 @@ void create_gameover_menu(MenuData *m) { m->flags = MF_Transient | MF_AlwaysProcessInput; m->transition = NULL; - m->context = "Game Over"; - char s[64]; - int c = MAX_CONTINUES - global.plr.continues; - snprintf(s, sizeof(s), "Continue (%i)", c); - add_menu_entry(m, s, c? continue_game : NULL, NULL); - add_menu_entry(m, "Restart the Game", restart_game, NULL)->transition = TransFadeBlack; - add_menu_entry(m, c? "Give up" : "Return to Title", give_up, NULL)->transition = TransFadeBlack; + if(global.stage->type == STAGE_SPELL) { + m->context = "Spell Failed"; - if(!c) - m->cursor = 1; + add_menu_entry(m, "Retry", restart_game, NULL)->transition = TransFadeBlack; + add_menu_entry(m, "Give up", give_up, NULL)->transition = TransFadeBlack; + } else { + m->context = "Game Over"; + + char s[64]; + int c = MAX_CONTINUES - global.plr.continues; + snprintf(s, sizeof(s), "Continue (%i)", c); + add_menu_entry(m, s, c? continue_game : NULL, NULL); + add_menu_entry(m, "Restart the Game", restart_game, NULL)->transition = TransFadeBlack; + add_menu_entry(m, c? "Give up" : "Return to Title", give_up, NULL)->transition = TransFadeBlack; + + if(!c) + m->cursor = 1; + } } diff --git a/src/stage.c b/src/stage.c index 37ebea66..48862d55 100644 --- a/src/stage.c +++ b/src/stage.c @@ -402,11 +402,18 @@ void draw_hud(void) { draw_text(AL_Center, 0, 0, diff, _fonts.mainmenu); glPopMatrix(); - for(i = 0; i < global.plr.lifes; i++) - draw_texture(16*i,167, "star"); + if(global.stage->type == STAGE_SPELL) { + glColor4f(1, 1, 1, 0.7); + draw_text(AL_Left, -6, 167, "N/A", _fonts.standard); + draw_text(AL_Left, -6, 200, "N/A", _fonts.standard); + glColor4f(1, 1, 1, 1.0); + } else { + for(i = 0; i < global.plr.lifes; i++) + draw_texture(16*i,167, "star"); - for(i = 0; i < global.plr.bombs; i++) - draw_texture(16*i,200, "star"); + for(i = 0; i < global.plr.bombs; i++) + draw_texture(16*i,200, "star"); + } sprintf(buf, "%.2f", global.plr.power / 100.0); draw_text(AL_Center, 10, 236, buf, _fonts.standard); @@ -699,6 +706,11 @@ void stage_loop(StageRule start, StageRule end, StageRule draw, StageRule event, } printf("Random seed: %u\n", seed); + + if(info->type == STAGE_SPELL) { + global.plr.lifes = 1; + global.plr.bombs = 0; + } } else { if(!global.replay_stage) { errx(-1, "Attemped to replay a NULL stage");