124 cnt:= 0; |
124 cnt:= 0; |
125 Ammoz[a].Probability:= 0 |
125 Ammoz[a].Probability:= 0 |
126 end; |
126 end; |
127 ammos[a]:= cnt; |
127 ammos[a]:= cnt; |
128 |
128 |
129 if ((GameFlags and gfKing) <> 0) and ((GameFlags and gfPlaceHog) = 0) |
129 if (((GameFlags and gfPlaceHog) <> 0) |
130 and (Ammoz[a].SkipTurns = 0) and (a <> amTeleport) and (a <> amSkip) then |
130 or (((GameFlags and gfKing) <> 0) and ((GameFlags and gfPlaceHog) = 0))) |
131 Ammoz[a].SkipTurns:= 1; |
|
132 |
|
133 if ((GameFlags and gfPlaceHog) <> 0) |
|
134 and (a <> amTeleport) and (a <> amSkip) |
131 and (a <> amTeleport) and (a <> amSkip) |
135 and (Ammoz[a].SkipTurns < 10000) then |
132 and (Ammoz[a].SkipTurns < 10000) then |
136 inc(Ammoz[a].SkipTurns,10000); |
133 inc(Ammoz[a].SkipTurns,10000); |
137 if ((GameFlags and gfPlaceHog) <> 0) and (a = amTeleport) then |
134 if (((GameFlags and gfPlaceHog) <> 0) |
|
135 or (((GameFlags and gfKing) <> 0) and ((GameFlags and gfPlaceHog) = 0))) |
|
136 and (a = amTeleport) then |
138 ammos[a]:= AMMO_INFINITE |
137 ammos[a]:= AMMO_INFINITE |
139 end |
138 end |
140 |
139 |
141 else |
140 else |
142 ammos[a]:= AMMO_INFINITE; |
141 ammos[a]:= AMMO_INFINITE; |
143 if ((GameFlags and gfPlaceHog) <> 0) and (a = amTeleport) then |
142 |
|
143 if (((GameFlags and gfPlaceHog) <> 0) |
|
144 or (((GameFlags and gfKing) <> 0) and ((GameFlags and gfPlaceHog) = 0))) |
|
145 and (a = amTeleport) then |
144 begin |
146 begin |
145 InitialCountsLocal[Pred(StoreCnt)][a]:= cnt; |
147 InitialCountsLocal[Pred(StoreCnt)][a]:= cnt; |
146 InitialAmmoCounts[a]:= cnt; |
148 InitialAmmoCounts[a]:= cnt; |
147 end |
149 end |
148 else |
150 else |
494 procedure SetAmmoReinforcement(var s: shortstring); |
496 procedure SetAmmoReinforcement(var s: shortstring); |
495 begin |
497 begin |
496 ammoReinforcement:= s; |
498 ammoReinforcement:= s; |
497 end; |
499 end; |
498 |
500 |
499 // Restore indefinitely disabled weapons and initial weapon counts. Only used for hog placement right now |
501 // Restore indefinitely disabled weapons and initial weapon counts. |
500 procedure ResetWeapons; |
502 procedure ResetWeapons; |
501 var i, t: Longword; |
503 var i, t: Longword; |
502 a: TAmmoType; |
504 a: TAmmoType; |
503 newAmmos: TAmmoArray; |
505 newAmmos: TAmmoArray; |
504 begin |
506 begin |