diff --git a/constants.asm b/constants.asm index ef17ac9..d762e06 100644 --- a/constants.asm +++ b/constants.asm @@ -292,7 +292,7 @@ WeaponPriceH ; weapons prices (tables with prices of weapons) .by >price_Force_Shield___ .by >price_Super_Mag______ .by >price_Bouncy_Castle__ - .by >price_Fuel_Tank______ + .by >price_Long_Barrel____ .by >price_Nuclear_Winter_ WeaponPriceL @@ -358,7 +358,7 @@ WeaponPriceL .by WeaponFont chbas @@ -1023,6 +1025,15 @@ MakeTanksVisible rts .endp ;-------------------------------------------------- +.proc SetStandardBarrels + ldx #maxPlayers-1 + lda #StandardBarrel ; standard barrel length +@ sta BarrelLength,x + dex + bpl @- + rts +.endp +;-------------------------------------------------- .proc SetPMWidth lda #$00 sta sizep0 ; P0-P3 widths diff --git a/scorch.xex b/scorch.xex index 39e2ef4..92e0efa 100644 Binary files a/scorch.xex and b/scorch.xex differ diff --git a/textproc.asm b/textproc.asm index 6cac8d7..ee1e2d3 100644 --- a/textproc.asm +++ b/textproc.asm @@ -837,6 +837,12 @@ invSelectDef mva #99 Energy,x bne DecreaseDefensive ; bypass activation NotBattery + cmp #ind_Long_Barrel____ + bne NotBarrel + ; if activate long barrel, we do it differently too + mva #LongBarrel BarrelLength,x + bne DecreaseDefensive ; bypass activation +NotBarrel cmp #ind_White_Flag_____ bne NotWhiteFlag cmp ActiveDefenceWeapon,x @@ -1959,6 +1965,7 @@ MakeAllTanksVisible sta ActiveDefenceWeapon,x dex bpl MakeAllTanksVisible + jsr SetStandardBarrels ; start music and animations lda #song_ending_looped diff --git a/variables.asm b/variables.asm index a206f04..4ca5481 100644 --- a/variables.asm +++ b/variables.asm @@ -109,8 +109,8 @@ MaxForceTableL ;Energy of the tank during the round MaxForceTableH .DS [MaxPlayers] ;---------------------------------------------------- - - +BarrelLength ;length of the tank barrel - dont forget to set it to 6 at round start! + .DS [MaxPlayers] ActiveWeapon ;number of the selected weapon .DS [MaxPlayers] ActiveDefenceWeapon ;number of the activated defence weapon - 0