hasActivatedSkill('약탈')) { return true; } if ($selfEnv['약탈발동'] ?? false) { return true; } $selfEnv['약탈발동'] = true; $general = $self->getGeneral(); if (!($oppose instanceof WarUnitGeneral)) { return true; } $opposeGeneral = $oppose->getGeneral(); $theftGold = $opposeGeneral->getVar('gold') * $selfEnv['theftRatio']; $theftRice = $opposeGeneral->getVar('rice') * $selfEnv['theftRatio']; $opposeGeneral->increaseVarWithLimit('gold', -$theftGold, 0); $opposeGeneral->increaseVarWithLimit('rice', -$theftRice, 0); $general->increaseVar('gold', $theftGold); $general->increaseVar('rice', $theftRice); $self->getLogger()->pushGeneralActionLog("상대를 약탈했다!", ActionLogger::PLAIN); $self->getLogger()->pushGeneralBattleDetailLog("상대에게서 금 {$theftGold}, 쌀 {$theftRice} 만큼을 약탈했다!", ActionLogger::PLAIN); $oppose->getLogger()->pushGeneralActionLog("상대에게 약탈당했다!", ActionLogger::PLAIN); $oppose->getLogger()->pushGeneralBattleDetailLog("상대에게 금 {$theftGold}, 쌀 {$theftRice} 만큼을 약탈당했다!", ActionLogger::PLAIN); $this->processConsumableItem(); return true; } }