Open KajiTetsushi opened 4 years ago
carrying missile launching weapons
After some reviewing, the associated behaviors are just a collection of two abstract features: volley fire special ability and ammunition management. Then these two features are combined with missile launchers to make up the full volley fire missiles logic.
Those two features should be written as isolated modules for very good reasons:
GUN_MissileLauncher
via an if-else filter. If the user decides to assign this to a kinetic weapon, then the ability can't work. This could be liberated, with the choice of enabling the ability given to the user to decide.GUN_MissileLauncher
and GUN_MineLauncher
, which means that ammunition is weapons-agnostic in the first place.
To create a common module which can be reused by any ship carrying missile launching weapons, including volley fire.
Found out while implementing #19 that the
MissileDestroyer
andP1MissileCorvette
actually have very, very similar behaviors. The only difference lies in the common attack methods and, in particular, the special attack target method. Perhaps it's possible to combine these items into one common module which can be reused.