1. Added a challenge to lock fort magma track.

2.  Changed grand prix challenges so that a win is necessary to complete them.
3.  Increased the time in which to complete the city challenge to 5:20.
4.  Added some linebreaks to some of the text for the challenges as it was being truncated.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1824 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
scifly 2008-05-07 21:16:47 +00:00
parent e462550218
commit 89b26ff5a5
12 changed files with 103 additions and 13 deletions

View File

@ -104,6 +104,7 @@ supertuxkart_SOURCES = main.cpp \
challenges/city_time.cpp challenges/city_time.hpp \
challenges/island_follow.cpp challenges/island_follow.hpp \
challenges/worlds_end_gp.cpp challenges/worlds_end_gp.hpp \
challenges/tollway_head2head.cpp challenges/tollway_head2head.hpp \
lisp/lisp.cpp lisp/lisp.hpp \
lisp/lexer.cpp lisp/lexer.hpp \
lisp/parser.cpp lisp/parser.hpp \

View File

@ -22,9 +22,9 @@
#include "world.hpp"
#include "race_manager.hpp"
CityTime::CityTime() : Challenge("citytime", _("Finish the City track in 5:00"))
CityTime::CityTime() : Challenge("citytime", _("Finish the City track in 5:20"))
{
setChallengeDescription(_("Finish 3 laps on the City track\nwith 3 AI karts\nin under 5:00 minutes."));
setChallengeDescription(_("Finish 3 laps on the City track\nwith 3 AI karts\nin under 5:20 minutes."));
setFeatureDescription(_("New track: SnowTux Peak\nnow available"));
setFeature("snowtuxpeak");
addDependency("junglefollow");
@ -45,7 +45,7 @@ bool CityTime::raceFinished()
std::string track_name = world->getTrack()->getIdent();
if(track_name!="city" ) return false; // wrong track
Kart* kart=world->getPlayerKart(0);
if(kart->getFinishTime()>300) return false; // too slow
if(kart->getFinishTime()>320) return false; // too slow
if(kart->getLap()!=3 ) return false; // wrong number of laps
if(race_manager->getNumKarts()<4) return false; //not enough AI karts
return true;

View File

@ -25,7 +25,7 @@
EnergyShiftingSands::EnergyShiftingSands() : Challenge("energyshiftingsands", _("Collect the Pharaohs Treasure"))
{
setChallengeDescription(_("Collect at least 9 coins\non 3 laps of Shifting Sands\nin under 2:20 minutes."));
setFeatureDescription(_("New Grand Prix: To the Moon and Back\nnow available"));
setFeatureDescription(_("New Grand Prix:\nTo the Moon and Back\nnow available"));
setFeature("To the Moon and Back");
// The energymathclass challenge must be done, otherwise GP can't be selected
addDependency("energymathclass");

View File

@ -22,7 +22,7 @@
#include "world.hpp"
#include "race_manager.hpp"
IslandFollow::IslandFollow() : Challenge("islandfollow", _("Win Follow the Leader on a Desert Island"))
IslandFollow::IslandFollow() : Challenge("islandfollow", _("Follow the Leader on a\nDesert Island"))
{
setChallengeDescription(_("Win a Follow the Leader race\nwith 3 AI karts\non a Desert Island."));
setFeatureDescription(_("New Grand Prix: At World's End\nnow available"));

View File

@ -22,7 +22,7 @@
#include "world.hpp"
#include "race_manager.hpp"
JungleFollow::JungleFollow() : Challenge("junglefollow", _("Win Follow the Leader in the Jungle"))
JungleFollow::JungleFollow() : Challenge("junglefollow", _("Follow the Leader in the Jungle"))
{
setChallengeDescription(_("Win a Follow the Leader race\nwith 3 AI karts\nin the Amazonian Jungle."));
setFeatureDescription(_("New track: City\nnow available"));

View File

@ -22,9 +22,9 @@
#include "race_manager.hpp"
#include "world.hpp"
MoonAndBackGP::MoonAndBackGP() : Challenge("moonandbackgp",_("Finish To the Moon and Back Grand Prix"))
MoonAndBackGP::MoonAndBackGP() : Challenge("moonandbackgp",_("Win To the Moon and Back\nGrand Prix"))
{
setChallengeDescription(_("Finish the To the Moon and Back\nGrand Prix with 3 'Racer' Level AI karts\nin the top 3."));
setChallengeDescription(_("Win the To the Moon and Back\nGrand Prix with 3 'Racer'\nLevel AI karts."));
setFeatureDescription(_("New Grand Prix: Snag Drive\nnow available"));
setFeature("Snag Drive"); //gp3
// The energyshiftingsands challenge must be done, otherwise gp2 can't be selected

View File

@ -22,9 +22,9 @@
#include "race_manager.hpp"
#include "world.hpp"
PenguinPlaygroundGP::PenguinPlaygroundGP() : Challenge("penguinplaygroundgp", _("Finish Penguin Playground Grand Prix"))
PenguinPlaygroundGP::PenguinPlaygroundGP() : Challenge("penguinplaygroundgp", _("Win Penguin Playground Grand\nPrix"))
{
setChallengeDescription(_("Finish the Penguin Playground Grand\nPrix with 3 'Racer' Level AI karts\nin the top 3."));
setChallengeDescription(_("Win Penguin Playground Grand\nPrix with 3 'Racer' Level AI karts."));
setFeatureDescription(_("New game mode\n'Follow Leader'\nnow available"));
setFeature("followleader");
// The energymathclass challenge must be done, otherwise GP can't be selected

View File

@ -0,0 +1,51 @@
// $Id$
//
// SuperTuxKart - a fun racing game with go-kart
// Copyright (C) 2008 Joerg Henrichs
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be ruseful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "translation.hpp"
#include "tollway_head2head.hpp"
#include "world.hpp"
#include "race_manager.hpp"
TollwayHead2Head::TollwayHead2Head() : Challenge("tollwayhead", _("Win a Head to Head on\nTux Tollway"))
{
setChallengeDescription(_("Win a 1 lap Head to Head\non Tux Tollway against 1 'Driver'\nlevel AI kart."));
setFeatureDescription(_("New track: Fort Magma\nnow available"));
setFeature("fortmagma");
} // TollwayTime
//-----------------------------------------------------------------------------
void TollwayHead2Head::setRace() const {
race_manager->setRaceMode(RaceManager::RM_QUICK_RACE);
race_manager->setTrack("tuxtrack");
race_manager->setDifficulty(RaceManager::RD_HARD);
race_manager->setNumLaps(1);
race_manager->setNumKarts(2);
race_manager->setNumPlayers(1);
} // setRace
//-----------------------------------------------------------------------------
bool TollwayHead2Head::raceFinished()
{
std::string track_name = world->getTrack()->getIdent();
if(track_name!="tuxtrack" ) return false; // wrong track
Kart* kart=world->getPlayerKart(0);
if(kart->getLap()!=1 ) return false; // wrong number of laps
if(race_manager->getNumKarts()!=2 ) return false; //wrong number of AI karts
return true;
} // raceFinished

View File

@ -0,0 +1,35 @@
// $Id$
//
// SuperTuxKart - a fun racing game with go-kart
// Copyright (C) 2008 Joerg Henrichs
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef TOLLWAY_HEAD2HEAD_H
#define TOLLWAY_HEAD2HEAD_H
#include "challenge.hpp"
class TollwayHead2Head : public Challenge
{
public:
TollwayHead2Head();
virtual bool raceFinished();
virtual void setRace() const;
}; // TollwayHead2Head
#endif /*TOLLWAY_HEAD2HHEAD*/

View File

@ -24,7 +24,7 @@
TollwayTime::TollwayTime() : Challenge("tollwaytime", _("Finish Tux Tollway track in 3:00"))
{
setChallengeDescription(_("Finish 3 laps on the Tux Tollway track\nwith 3 AI karts\nin under 3:00 minutes."));
setChallengeDescription(_("Finish 3 laps on the Tux Tollway\ntrack with 3 AI karts\nin under 3:00 minutes."));
setFeatureDescription(_("New track: Canyon\nnow available"));
setFeature("canyon");
} // TollwayTime

View File

@ -22,9 +22,9 @@
#include "race_manager.hpp"
#include "world.hpp"
WorldsEndGP::WorldsEndGP() : Challenge("worldsendgp",_("Win the At World's End Grand Prix"))
WorldsEndGP::WorldsEndGP() : Challenge("worldsendgp",_("Win the At World's End\nGrand Prix"))
{
setChallengeDescription(_("Come first in the At World's End\nGrand Prix with 3 'Racer' Level AI karts."));
setChallengeDescription(_("Come first in the At World's End\nGrand Prix with 3 'Racer'\nLevel AI karts."));
setFeatureDescription(_("New Grand Prix: All Tracks GP\nand Bonus Preview: Skidding\nnow available.\nSelect 'skidding' as difficulty."));
setFeature("All tracks");
setFeature("skidding"); // Add Skidding Preview
@ -33,6 +33,7 @@ WorldsEndGP::WorldsEndGP() : Challenge("worldsendgp",_("Win the At World's End G
addDependency("tollwaytime");
addDependency("junglefollow");
addDependency("citytime");
addDependency("tollwayhead");
}
//-----------------------------------------------------------------------------

View File

@ -30,6 +30,7 @@
#include "challenges/city_time.hpp"
#include "challenges/island_follow.hpp"
#include "challenges/worlds_end_gp.hpp"
#include "challenges/tollway_head2head.hpp"
#include "user_config.hpp"
UnlockManager* unlock_manager=0;
@ -55,6 +56,7 @@ UnlockManager::UnlockManager()
c=new CityTime(); m_all_challenges[c->getId()]=c;
c=new IslandFollow(); m_all_challenges[c->getId()]=c;
c=new WorldsEndGP(); m_all_challenges[c->getId()]=c;
c=new TollwayHead2Head(); m_all_challenges[c->getId()]=c;
computeActive();
} // UnlockManager