Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Source/SmashBros/Global.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ namespace SmashBros
static const byte TEAM_GREEN = 3;
static const byte TEAM_YELLOW = 4;

static const int totalCharacters = 6;
static const int totalCharacters = 7;
static const int totalItems = 6;
static const int totalStages = 5;

Expand All @@ -93,6 +93,7 @@ namespace SmashBros
static const int CHAR_FOX = 4;
static const int CHAR_PIKACHU = 5;
static const int CHAR_LINK = 6;
static const int CHAR_RANDOM = totalCharacters;

//STAGE CONSTANTS
static const int STAGE_FRACTALSTAGE = 0;
Expand Down
7 changes: 7 additions & 0 deletions Source/SmashBros/Loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ namespace SmashBros

case Global::CHAR_LINK:
return "Link";

case Global::CHAR_RANDOM:
return "Random";
}
}

Expand All @@ -104,6 +107,9 @@ namespace SmashBros
{
Player*p = null;
Console::WriteLine((String)"creating character " + charNum);
if (charNum == Global::CHAR_RANDOM) {
charNum = rand() % (Global::totalCharacters - 1) + 1;
};
switch(charNum)
{
case Global::CHAR_MARIO:
Expand Down Expand Up @@ -134,6 +140,7 @@ namespace SmashBros
case Global::CHAR_LINK:
p = new Link(x1,y1,playerNo,team);
p->charNo = Global::CHAR_LINK;
break;
}
return p;
}
Expand Down