oldEffect = $oldEffect; } /** * Returns whether the effect addition will replace an existing effect already applied to the entity. */ public function willModify() : bool{ return $this->hasOldEffect(); } public function hasOldEffect() : bool{ return $this->oldEffect instanceof EffectInstance; } public function getOldEffect() : ?EffectInstance{ return $this->oldEffect; } }