yoel123 / java-text-based-space-station-manger-sim

space station management/tycoon/trader game. made for fun and practice.
6 stars 8 forks source link

ship weapons as data #50

Open yoel123 opened 4 years ago

yoel123 commented 4 years ago

I think ship weapons can be data only, as all weapons function the same the only difference is they have different stats.

there might be a few functions for shooting different types of weapons but they practically work the same with the difference being stats.

that way ship can have an ArrayList of weapon names, and when you need a weapons data you call its row from the database by name.

maybe I shod make a weapon modal class (like item) so I can call stats like w.range or w.dmg etc etc.

ship upgrades that modify say range will just add to the range variable as modifier no need to change weapons data.