Skip to content

Commit

Permalink
Adv Training: if skill=4, don't send; if 3, send to Adv III & charge 2MB
Browse files Browse the repository at this point in the history
  • Loading branch information
peyre committed Apr 20, 2012
1 parent bd0ffdc commit 6eb411a
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 12 deletions.
13 changes: 13 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
2012-04-19 Leon Baradat <[email protected]>

* V278

* ast2.c: If 'naut has a skill of 4, don't send to Adv Training for that skill
If 'naut has a skill of 3 and is sent to Adv Training, send directly to Adv
Training III and charge 2MB insted of 3MB

* ast3.c: Properly erase Roman numerals after "ADV TRAINING"

* museum.c, hardef.c: Better centering of "CONTINUE" in Space History, Prestige Summary,
& Hardware Efficiency

2012-04-17 Leon Baradat <[email protected]>

* V277
Expand Down
27 changes: 22 additions & 5 deletions ast2.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <externs.h>

int lenprogname; // Variable to hold and manipulate length of program name
int skilLev; // Variable for 'naut's skill level (so 4s don't go to Adv Training, and 3s go to Adv III)

void DrawLimbo(char plr)
{
Expand Down Expand Up @@ -351,12 +352,28 @@ void Limbo(char plr)
if (key>0) delay(140);
WaitForMouseUp();key=0;
OutBox(244,95+21*i,313,109+21*i);
skilLev=0; // Figure out relevant skill level bfr sending to Adv Training -Leon
if (i==0) skilLev=Data->P[plr].Pool[M[now2]].Cap;
if (i==1) skilLev=Data->P[plr].Pool[M[now2]].LM;
if (i==2) skilLev=Data->P[plr].Pool[M[now2]].EVA;
if (i==3) skilLev=Data->P[plr].Pool[M[now2]].Docking;
if (i==4) skilLev=Data->P[plr].Pool[M[now2]].Endurance;
grSetColor(2);
if (Data->P[plr].Pool[M[now2]].TrainingLevel>6) Help("i120");
else if (skilLev > 3) OutBox(244,95+21*i,313,109+21*i); // If they have a 4 in that skill, don't send to Adv Training for it
else if (Data->P[plr].Cash<3) Help("i121");
else {
Data->P[plr].Pool[M[now2]].Status=AST_ST_TRAIN_ADV_1;
Data->P[plr].Cash-=3;
Data->P[plr].Pool[M[now2]].Focus=i+1;
if (skilLev>2) // If they have a 3 in that skill, send them directly to Adv III and charge just 2MB
{
Data->P[plr].Pool[M[now2]].Status=AST_ST_TRAIN_ADV_3;
Data->P[plr].Cash-=2;
}
else
{
Data->P[plr].Pool[M[now2]].Status=AST_ST_TRAIN_ADV_1;
Data->P[plr].Cash-=3;
}
Data->P[plr].Pool[M[now2]].Focus=i+1;
Data->P[plr].Pool[M[now2]].Assign=0;
Data->P[plr].Pool[M[now2]].Una=0;
Data->P[plr].Pool[M[now2]].Moved=0;
Expand Down Expand Up @@ -423,7 +440,7 @@ void LimboText(char plr,int astro)
if (Data->P[plr].Pool[astro].Mood<40 && Data->P[plr].Pool[astro].Mood>=20) col=8;
if (Data->P[plr].Pool[astro].Mood<20) col=0;
if (Data->P[plr].Pool[astro].Mood==0) col=3;
grSetColor(col); // Print 'naut name in green/yellow/red/black depending on mood -Leon
grSetColor(col); // Print name in green/yellow/red/black depending on mood -Leon
if (Data->P[plr].Pool[astro].RDelay>0) grSetColor(0); // Print name in black if 'naut has announced retirement (override mood) -Leon
PrintAt(46,37,Data->P[plr].Pool[astro].Name);
grSetColor(11);
Expand All @@ -440,7 +457,7 @@ void LimboText(char plr,int astro)
RectFill(131,86,145,92,3);
RectFill(123,95,145,101,3);
RectFill(130,54,155,61,3);
grSetColor(col); // Print 'naut mood in green/yellow/red/black depending on mood -Leon
grSetColor(col); // Print mood in green/yellow/red/black depending on mood -Leon
DispNum(132,60,Data->P[plr].Pool[astro].Mood);
grSetColor(11);
DispNum(125,68,Data->P[plr].Pool[astro].Cap);
Expand Down
6 changes: 3 additions & 3 deletions ast3.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ TrainText(char plr, int astro, int cnt)
RectFill(200, 116, 220, 120, 3);
RectFill(202, 93, 220, 97, 3);
RectFill(216, 102, 294, 106, 3);
RectFill(212, 111, 317, 124, 3);
RectFill(212, 107, 317, 124, 3);
RectFill(215, 138, 235, 142, 3);
RectFill(213, 145, 243, 150, 3);
RectFill(221, 153, 241, 158, 3);
Expand All @@ -127,7 +127,7 @@ TrainText(char plr, int astro, int cnt)
if (Data->P[plr].Pool[astro].Mood<40 && Data->P[plr].Pool[astro].Mood>=20) col=8;
if (Data->P[plr].Pool[astro].Mood<20) col=0;
if (Data->P[plr].Pool[astro].Mood==0) col=3;
grSetColor(col); // Print 'naut name in green/yellow/red/black depending on mood -Leon
grSetColor(col); // Print name in green/yellow/red/black depending on mood -Leon
PrintAt(200, 120, " "); DispNum(200, 120, Data->P[plr].Pool[astro].Mood);
grMoveTo(212, 111);
grSetColor(11);
Expand Down Expand Up @@ -205,7 +205,7 @@ TrainText(char plr, int astro, int cnt)
2 = Advanced LM
3 = Advanced EVA
4 = Advanced Docking
5 = Advanced Duration
5 = Advanced Endurance
*/

void Train(char plr,int level)
Expand Down
2 changes: 1 addition & 1 deletion hardef.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ DrawHardef(char plr)
DispBig(40, 5, "EFFICIENCY", 1, -1);
FlagSm(plr, 4, 4);
grSetColor(1);
PrintAt(258, 13, "CONTINUE");
PrintAt(257, 13, "CONTINUE");
RectFill(149, 2, 157, 10, 9);
RectFill(149, 2, 156, 9, 8);
grSetColor(9);
Expand Down
4 changes: 2 additions & 2 deletions museum.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ void ShowPrest(char plr)
PrintAt(175,120,"2ND:");
PrintAt(212,120,"SUBS:");
PrintAt(254,120,"FAIL:");
grSetColor(1);PrintAt(255,13,"CONTINUE");
grSetColor(1);PrintAt(257,13,"CONTINUE");
PrintAt(17,39,"FIRST:");
PrintAt(19,81,"DATE:");
grSetColor(11);PrintAt(71,37,"# SPACE FIRSTS:");
Expand Down Expand Up @@ -433,7 +433,7 @@ void ShowSpHist(char plr)
InBox(3,3,31,19); // USA inbox
FlagSm(plr,4,4);
grSetColor(1);
PrintAt(259,13,"CONTINUE");
PrintAt(257,13,"CONTINUE");

ORBox(0,24,319,199,3);
IRBox(4,28,315,170,0);
Expand Down
2 changes: 1 addition & 1 deletion version.c
Original file line number Diff line number Diff line change
@@ -1 +1 @@
277
278

0 comments on commit 6eb411a

Please sign in to comment.