X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=actions2.c;h=67ef05c67eba5924ba24b35301933e359b273742;hb=62ee15c892eb1cd1e0333ff8d83888765923e1b4;hp=295f1880a1fd07dbb59213ad85170649a0b05bb9;hpb=978168523abcc3e4f06c23df57dc47541cd995ca;p=open-adventure.git diff --git a/actions2.c b/actions2.c index 295f188..67ef05c 100644 --- a/actions2.c +++ b/actions2.c @@ -61,7 +61,7 @@ int discard(bool just_do_it) { if(!TOTING(OBJ)) return(2011); if(OBJ != BIRD || !HERE(SNAKE)) goto L9023; RSPEAK(30); - if(CLOSED) return(19000); + if(game.closed) return(19000); DSTROY(SNAKE); /* SET PROP FOR USE BY TRAVEL OPTIONS */ PROP[SNAKE]=1; @@ -148,7 +148,7 @@ int attack(FILE *input) { if(OBJ > NOBJECTS) return(8000); L9124: if(OBJ == BIRD) { SPK=137; - if(CLOSED) return(2011); + if(game.closed) return(2011); DSTROY(BIRD); PROP[BIRD]=0; SPK=45; @@ -162,7 +162,7 @@ L9126: if(OBJ == 0)SPK=44; if(OBJ == CLAM || OBJ == OYSTER)SPK=150; if(OBJ == SNAKE)SPK=46; if(OBJ == DWARF)SPK=49; - if(OBJ == DWARF && CLOSED) return(19000); + if(OBJ == DWARF && game.closed) return(19000); if(OBJ == DRAGON)SPK=167; if(OBJ == TROLL)SPK=157; if(OBJ == OGRE)SPK=203; @@ -198,11 +198,11 @@ L9128: RSPEAK(SPK); RSPEAK(6); DSTROY(OGRE); K=0; - for (I=1; I<=5; I++) { - if(DLOC[I] == LOC) { + for (I=1; I < PIRATE; I++) { + if(game.dloc[I] == LOC) { K=K+1; - DLOC[I]=61; - DSEEN[I]=false; + game.dloc[I]=61; + game.dseen[I]=false; } } SPK=SPK+1+1/K; @@ -233,11 +233,11 @@ int throw(FILE *cmdin) { L9172: SPK=48; if(randrange(NDWARVES+1) < DFLAG) goto L9175; - DSEEN[I]=false; - DLOC[I]=0; + game.dseen[I]=false; + game.dloc[I]=0; SPK=47; - DKILL=DKILL+1; - if(DKILL == 1)SPK=149; + game.dkill=game.dkill+1; + if(game.dkill == 1)SPK=149; L9175: RSPEAK(SPK); DROP(AXE,LOC); K=NUL; @@ -278,7 +278,7 @@ L9212: if(OBJ != SNAKE && OBJ != DRAGON && OBJ != TROLL) goto L9213; SPK=102; if(OBJ == DRAGON && PROP[DRAGON] != 0)SPK=110; if(OBJ == TROLL)SPK=182; - if(OBJ != SNAKE || CLOSED || !HERE(BIRD)) return(2011); + if(OBJ != SNAKE || game.closed || !HERE(BIRD)) return(2011); SPK=101; DSTROY(BIRD); PROP[BIRD]=0;