12-05-2022, 02:36 AM
(12-04-2022, 08:29 PM)waspentalive Wrote:(12-02-2022, 07:36 PM)James D Jarvis Wrote:(12-02-2022, 05:34 PM)CharlieJV Wrote: Just when I thought I was already having a pretty happy Friday: that was awesome. I must forward that to the game's author.
It's fun. I tinkered with it during lunch so it works smoother on my pc and reduced hit chance for phasers based on range, added possible degradation to the phasers based on energy use, reduced effectiveness based on condition of the phasers, and have the phasers reduce energy on firing. It makes the game a little more challenging and adds more strategy to the game. Can't just zip about blasting the baddies with the phasers at 99 all day long.
It's a nice solid program (even without the tinkering).
I had found and squashed the "Phasors don't user energy". I know I misspelled phaser, but I am at least consistent :^).
I just recently added Bases for the Klingons and perhaps several other things in the most recent version.
I am interested in your ideas for Phasors. I will eventually cause them to use more energy per % charge so the player is incentivized to use as little % as they think they can get away with. Note that you end the game if you drop energy below 50 units. Also, the [R]epair command also builds energy slowly (Bussard collectors yada yada)
How do you have the phasors degrade at higher %s - do you damage them if charged to say over 85%?
The code already has them fail based on their repair status each time you fire them,
but perhaps you did it a better way? What did you do there?
here's how I modified the phasor section of the code, the higher the charge the more likely there is wear and tear and they are more effective against closer targets:
Code: (Select All)
phasor:
If devstat(pha) < Int(Rnd(1) * 99) Then
dmg$ = "Phasors offline "
Else
If q(eqx, eqy, aklingon) = 0 Then
dmg$ = "No valid targets in sector"
Else
Do
Input "Phasor bank charge percentage: (0 to 99) :"; chg
Loop While chg > 99 Or chg < 0
If chg > devstat(5) Then chg = Int((chg + devstat(5)) / 2)
If chg * 10 > eng Then
dmg$ = "Not enough energy to charge to that level"
Else
Cls
GoSub gdisplay
eng = eng - chg
kills = 0
If Rnd * 300 < chg Then devstat(5) = devstat(5) - Int(Rnd * Sqr(chg))
For phax = 1 To 8
For phay = 1 To 8
If s(phax, phay) = aklingon Then
kdd = 0
If phax <> esx And pahay <> esy Then
kdx = Abs(esx - phax)
kdy = Abs(esx - phay)
kdd = 2 * Sqr(kdx * kdx + kdy * kdy) 'determine distance to target
End If
If Int(Rnd * 99) < (chg * devstat(5)) / 100 - kdd Then
s(phax, phay) = aEmpty
klingons = klingons - 1
dmg$ = "Klingon at " + Str$(phay) + "," + Str$(phax) + " Destroyed "
kills = kills + 1
GoSub gdisplay
q(eqx, eqy, aklingon) = q(eqx, eqy, aklingon) - 1
Else
dmg$ = "Klingon at " + Str$(phay) + Str$(phax) + " Remains "
End If
Sleep 1
End If
Next phay
Next phax
dz = dz - 1
dmg$ = Str$(kills) + " Klingons destroyed" + Str$(q(eqy, eqx, aklingon)) + " remain. "
End If
End If
End If
Return