In order to avoid setting all move properties on construct each time a distinct move class is instantiated (new $Move_Class()), have all distinct move classes extend Move instead of extend Battle.
Currently, distinct move classes extend Battle due to some distinct moves using Battle specific properties/methods (whoops), but should be refactored in a way to not need to be extended off of the main Battle class itself.
Details
Current Structure
class MOVE_CLASS_NAME extends Battle
{
// properties, all set to null
public function __construct(Move $Move_Data)
{
// setting properties based on $Move_Data values
}
// move specific methods
}
Proposed Structure
class MOVE_CLASS_NAME extends Move
{
public function __construct(int $Move_ID, int $Slot)
{
parent::__construct();
}
// move specific methods
}
Description
In order to avoid setting all move properties on construct each time a distinct move class is instantiated
(new $Move_Class())
, have all distinct move classesextend Move
instead ofextend Battle
.Currently, distinct move classes
extend Battle
due to some distinct moves using Battle specific properties/methods (whoops), but should be refactored in a way to not need to be extended off of the main Battle class itself.Details
Current Structure
Proposed Structure