private function onHunted(SR_Party $party) { if (false === ($target = $party->getHuntTarget())) { $this->onLostHuntTarget($party); return; } $ep = $target->getParty(); switch ($ep->getAction()) { case SR_Party::ACTION_OUTSIDE: case SR_Party::ACTION_SLEEP: case SR_Party::ACTION_INSIDE: $loc = $ep->getLocation(); $party->giveKnowledge('places', $loc); $party->ntice('5032', array($target->getName(), $loc, $ep->getMemberCount())); // $party->notice(sprintf('You found %s at %s with a party of %s members.', $target->getName(), $loc, $ep->getMemberCount())); $party->pushAction(SR_Party::ACTION_OUTSIDE, $loc); break; case SR_Party::ACTION_EXPLORE: case SR_Party::ACTION_GOTO: case SR_Party::ACTION_HUNT: $loc = $party->getCity(); $party->ntice('5033', array($target->getName(), $loc)); // $party->notice(sprintf('You found %s in the streets of %s.', $target->getName(), $loc)); $party->pushAction(SR_Party::ACTION_OUTSIDE, $loc); $party->talk($ep, true); break; case SR_Party::ACTION_TALK: case SR_Party::ACTION_FIGHT: $party->setETA(rand(10, 30)); $party->setContactEta(rand(5, 20)); break; case SR_Party::ACTION_DELETE: case SR_Party::ACTION_TRAVEL: $this->onLostHuntTarget($party); break; } }