object = $unit; $this->raiseType = $raiseType; $this->ratio = $ratio; $this->theftRatio = $theftRatio; } protected function actionWar(WarUnit $self, WarUnit $oppose, array &$selfEnv, array &$opposeEnv):bool{ assert($self instanceof WarUnitGeneral, 'General만 발동 가능'); if($self->getPhase() !== 0 && $oppose->getPhase() !== 0){ return true; } if(!($oppose instanceof WarUnitGeneral)){ return true; } if($self->hasActivatedSkill('약탈')){ return true; } if($self->hasActivatedSkill('약탈불가')){ return true; } if(!Util::randBool($this->ratio)){ return true; } $self->activateSkill('약탈'); $selfEnv['theftRatio'] = $this->theftRatio; return true; } }