protected function addAttackerModifiers(Entity $damager)
 {
     if ($damager->hasEffect(Effect::STRENGTH)) {
         $this->setDamage($this->getDamage(self::MODIFIER_BASE) * 0.3 * ($damager->getEffect(Effect::STRENGTH)->getAmplifier() + 1), self::MODIFIER_STRENGTH);
     }
     if ($damager->hasEffect(Effect::WEAKNESS)) {
         $this->setDamage(-($this->getDamage(self::MODIFIER_BASE) * 0.2 * ($damager->getEffect(Effect::WEAKNESS)->getAmplifier() + 1)), self::MODIFIER_WEAKNESS);
     }
 }
 /**
  * @param Entity    $entity
  * @param int       $cause
  * @param int|int[] $damage
  *
  * @throws \Exception
  */
 public function __construct(Entity $entity, $cause, $damage)
 {
     $this->entity = $entity;
     $this->cause = $cause;
     if (is_array($damage)) {
         $this->modifiers = $damage;
     } else {
         $this->modifiers = [self::MODIFIER_BASE => $damage];
     }
     $this->originals = $this->modifiers;
     if (!isset($this->modifiers[self::MODIFIER_BASE])) {
         throw new \InvalidArgumentException("BASE Damage modifier missing");
     }
     if ($entity->hasEffect(Effect::DAMAGE_RESISTANCE)) {
         $this->setDamage(-($this->getDamage(self::MODIFIER_BASE) * 0.2 * ($entity->getEffect(Effect::DAMAGE_RESISTANCE)->getAmplifier() + 1)), self::MODIFIER_RESISTANCE);
     }
 }