more controllable trailers

This commit is contained in:
Zeno Rogue 2017-10-30 22:47:18 +01:00
parent f860554c9f
commit 97367c02a6
1 changed files with 12 additions and 6 deletions

View File

@ -76,6 +76,10 @@ void welcomeMessage() {
addMessage(XLAT("Press F1 or right-click things for help.")); addMessage(XLAT("Press F1 or right-click things for help."));
#endif #endif
} }
int trailer_cash0 = 5;
int trailer_cash1 = 15;
bool trailer_safety = true;
// initialize the game // initialize the game
void initgame() { void initgame() {
@ -121,8 +125,10 @@ void initgame() {
if(firstland == laWhirlpool) cwt.c->mov[0]->wall = waSea; if(firstland == laWhirlpool) cwt.c->mov[0]->wall = waSea;
setdist(cwt.c->mov[0], BARLEV-1, cwt.c); setdist(cwt.c->mov[0], BARLEV-1, cwt.c);
heptagon *h = createAlternateMap(cwt.c, 2, hsA); if(!sphere && !euclid) {
if(!h) printf("FAIL\n"); heptagon *h = createAlternateMap(cwt.c, 2, hsA);
if(!h) printf("FAIL\n");
}
} }
if(tactic::on && firstland == laPower) { if(tactic::on && firstland == laPower) {
@ -138,8 +144,8 @@ void initgame() {
} }
if(tactic::on && tactic::trailer) if(tactic::on && tactic::trailer)
items[treasureType(firstland)] = 5; items[treasureType(firstland)] = trailer_cash0;
tactic::lasttactic = firstland; tactic::lasttactic = firstland;
yendor::lastchallenge = yendor::challenge; yendor::lastchallenge = yendor::challenge;
@ -174,7 +180,7 @@ void initgame() {
// extern int sightrange; sightrange = 9; // extern int sightrange; sightrange = 9;
// cwt.c->land = laHell; items[itHell] = 10; // cwt.c->land = laHell; items[itHell] = 10;
for(int i=BARLEV; i>=0; i--) { for(int i=BARLEV; i>=0; i--) {
if(tactic::trailer && cwt.c->land != laClearing) safety = true; if(tactic::trailer && cwt.c->land != laClearing) safety = trailer_safety;
setdist(cwt.c, i, NULL); setdist(cwt.c, i, NULL);
if(tactic::trailer) safety = false; if(tactic::trailer) safety = false;
@ -211,7 +217,7 @@ void initgame() {
} }
if(tactic::on && tactic::trailer) if(tactic::on && tactic::trailer)
items[treasureType(firstland)] = 15; items[treasureType(firstland)] = trailer_cash1;
yendor::init(3); yendor::init(3);
peace::simon::init(); peace::simon::init();