Beastmaster
Six levels of party building, boss killing, RPG joy.
Adventure through the land of each faction to defeat their champions and save the world from the upcoming war. Build your army as you travel by collecting beasts and friends wherever you go. No luck needed in this mission, just pure skill.
WARNING! Be prepared to spend a couple hours on this mission. There is no save game feature.
I have fixed the many bugs I found and the game is working now. (7/19/15)
//Get maps
#include 207
#include 209
#include 217
#include 218
#include 219
#include 220
#include 221
#include 222
//Players
Player P1;
Player Ai;
Player Neutral;
//Party
Entity Hero;
Entity Ally1;
Entity Ally2;
Entity Ally3;
Entity Ally4;
Entity Ally5;
Entity Pet;
//Base
Entity Base1;
Entity Base2;
Entity Base3;
Entity Base4;
Entity Base5;
Entity Base6;
//Beasts
//Sylvan
Entity Kodiak;
Entity Mastodon;
//MF
Entity Stagg;
bool noStagg = false;
Entity Cow;
//CI
Entity Turtle;
Entity Unicorn;
bool noUnicorn = false;
//Ele
Entity Greck;
Entity Roc;
//Chaos
Entity Bullfrog;
Entity Manticore;
//DL
Entity Wyrm;
Entity Ord;
//Map objects
Entity Object1;
Entity Object2;
Entity Object3;
Entity Object4;
Entity Object5;
Entity Object6;
Entity Object7;
Entity Object8;
Entity Object9;
//Spawns
Entity Spawn1;
Entity Spawn2;
Entity Spawn3;
Entity Spawn4;
Entity Spawn5;
Entity Spawn6;
Entity Spawn7;
Entity Spawn8;
Entity Spawn9;
Entity Spawn10;
Entity Spawn11;
Entity Spawn12;
Entity Spawn13;
Entity Spawn14;
Entity Spawn15;
//Boss
Entity Boss;
Entity Minion1;
Entity Minion2;
Entity Minion3;
Entity Minion4;
Entity Minion5;
//Exit building
Entity EBase;
Entity Exit;
//Trackers
int currentLvl = 1;
bool playtest = false;
bool object1Destroyed = false;
bool object2Destroyed = false;
bool object3Destroyed = false;
bool object4Destroyed = false;
bool object5Destroyed = false;
bool object6Destroyed = false;
bool object7Destroyed = false;
bool object8Destroyed = false;
bool object9Destroyed = false;
bool dragonDown = false;
bool shieldWarriorTurned = false;
bool arcMageTurned = false;
bool beast1Tamed = false;
bool beast2Tamed = false;
bool lvlDone = false;
int archerBirdKills = 0;
bool archerTarget1 = false;
bool archerTarget2 = false;
bool archerTarget3 = false;
int sylvanTurnCnt = 0;
int mountainfolkTurnCnt = 0;
int ciTurnCnt = 0;
int elementalTurnCnt = 0;
int chaosTurnCnt = 0;
int darklegionTurnCnt = 0;
int callback = 0;
int correctFlux = 0;
Location lastLoc;
void configGame(){
setNumPlayers(2);
setMapSize(17,17);
setNumFluxWells(0);
addAIPlayer("War","Lord of Chaos",0);
dontNeedDecks();
}
void beforeStart(){
Ai = getAIPlayer(0);
P1 = getHumanPlayer(0);
int ds2=Ai.deckSize();
for(int n=0; n<ds2; n++) Ai.removeDeckCard(0);
//Load the first level
sylvanLevel();
}
void afterStart(){
callback = 1;
forEachEntity();
P1.addFlux(-4);
Ai.addFlux(-8);
infoBox("Beastmaster","You are no ordinary beastmaster. The beasts that you tame continue to obey you even when you look away. Of course, some beasts are harder to win over then others. Beasts that are generally tame need only be approached, while those that tend to be more aggressive need to be fought. While your allies will help in any way they can, you do know that they can not tame a beast for you.");
infoBox("The Adventure","You are a powerful beastmaster. For many years now, your world has been at war. You believe that by wiping out the leaders of each army, the fighting will come to an end. You head out from your village with your most powerful beast, your elven friends, and the few tools you can gather, in hopes of accomplishing this daunting task. You know that you will need even more strength to win the coming battles, so you plan to find and train some new beasts in the wilds to fight at your side during this adventure.");
}
void onNewRound(){
P1.addFlux(-2);
Ai.addFlux(-(Ai.getFlux() - 2));
P1.addGlory(-P1.getGlory());
Ai.addGlory(-Ai.getGlory());
//Game over if beastmaster dies
if(!Hero.doesExist()){infoBox("Game Over","You have died. The world falls into chaos until another hero rises"); endGame(getAIPlayer(0));}
switch(currentLvl)
{
case 1:
sylvanEvents();
break;
case 2:
mountainfolkEvents();
break;
case 3:
ciEvents();
break;
case 4:
elementalEvents();
break;
case 5:
chaosEvents();
break;
case 6:
darklegionEvents();
break;
}
}
void lvlArcher(){
//Level up the archer
switch(archerBirdKills)
{
case 2:
Ally1.addTokens("speed",2);
Ally1.addTokens("range",1);
Ally1.addTokens("maxhp",1);
archerBirdKills +=1;
infoBox("Archer level up","Your archer reflects back on his efforts, and become slightly more powerful.");
break;
case 6:
Ally1.addTokens("attack",1);
Ally1.addTokens("speed",1);
Ally1.addTokens("maxhp",2);
Ally1.addTokens("vision",2);
archerBirdKills +=1;
infoBox("Archer level up","Your archer reflects back on his efforts, and his skill increases even further.");
break;
case 11:
Ally1.addTokens("vision",1);
Ally1.addTokens("range",1);
Ally1.addTokens("maxhp",3);
Ally1.addTokens("attack",1);
archerBirdKills +=1;
infoBox("Archer level up","Your archer reflects back on his efforts, and is feeling like a true warrior.");
break;
case 15:
Ally1.addTokens("attack",2);
Ally1.addTokens("range",1);
Ally1.addTokens("maxhp",5);
Ally1.addTokens("speed",1);
Ally1.addTokens("vision",1);
infoBox("Archer level up","Your archer reflects back on his efforts, and is now ready for anything.");
archerBirdKills +=1;
break;
}
}
void afterAction(Action action){
switch(currentLvl)
{
case 1:
sylvanActions(action);
break;
case 2:
mountainfolkActions(action);
break;
case 3:
ciActions(action);
break;
case 4:
elementalActions(action);
break;
case 5:
chaosActions(action);
break;
case 6:
darklegionActions(action);
break;
}
if (action.getEntityActor().getName() == Ally1.getName()) lvlArcher();
}
void clearScreen(){
Base1.remove();
Base2.remove();
Base3.remove();
Base4.remove();
Base5.remove();
Base6.remove();
Object1.remove();
Object2.remove();
Object3.remove();
Object4.remove();
Object5.remove();
Object6.remove();
Object7.remove();
Object8.remove();
Object9.remove();
Spawn1.remove();
Spawn2.remove();
Spawn3.remove();
Spawn4.remove();
Spawn5.remove();
Spawn6.remove();
Spawn7.remove();
Spawn8.remove();
Spawn9.remove();
Spawn10.remove();
Spawn11.remove();
Spawn12.remove();
Spawn13.remove();
Spawn14.remove();
Spawn15.remove();
Minion1.remove();
Minion2.remove();
Minion3.remove();
Minion4.remove();
Minion5.remove();
object1Destroyed = false;
object2Destroyed = false;
object3Destroyed = false;
object4Destroyed = false;
object5Destroyed = false;
object6Destroyed = false;
object7Destroyed = false;
object8Destroyed = false;
object9Destroyed = false;
beast1Tamed = false;
beast2Tamed = false;
lvlDone = false;
archerTarget1 = false;
archerTarget2 = false;
archerTarget3 = false;
callback = 0;
forEachEntity();
}
bool entityCallback(Entity ent){
if (callback == 0){
//remove corpses and ruins
if (ent.isType(5) == true){ent.remove();}
if (ent.getName() == "Soldier"){ent.remove();}
if (ent.getName() == "Flamekin"){ent.remove();}
if (ent.getName() == "Sapling"){ent.remove();}
}
else{ent.setDim(false);}
return true;
}