示例#1
0
 public function getDisplay(User $sending, User $receiver)
 {
     $sendingUsername = $sending->getUsername();
     if ($sending->isConfused()) {
         $this->message .= "{$sendingUsername} O=('-'Q)=  ";
     } else {
         $this->message .= $receiver->getUsername() . " O=('-'Q)= ";
     }
     return $this->message;
 }
示例#2
0
 public function getDisplay(User $sending, User $receiver)
 {
     $sendingUsername = $sending->getUsername();
     if ($sending->isConfused()) {
         $this->message .= " ༼つಠ益ಠ༽つ ─=≡ΣO)) " . $sendingUsername;
     } else {
         $this->message .= " ༼つಠ益ಠ༽つ ─=≡ΣO)) " . $receiver->getUsername();
     }
     return $this->message;
 }
示例#3
0
 public function getDisplay(User $sending, User $receiver)
 {
     $sendingUsername = StringTools::flip($sending->getUsername());
     $receiverUsername = StringTools::flip($receiver->getUsername());
     if ($sending->isConfused()) {
         $msg = "(╯ಥ益ಥ)╯︵  " . $sendingUsername;
     } else {
         $msg = "(╯ಥ益ಥ)╯︵ " . $receiverUsername;
     }
     return $msg;
 }
示例#4
0
 public function doDamage(User &$user, IAttack $attack)
 {
     $username = $user->getUsername();
     $maxHP = $user->getMaxHP();
     $damage = $user->doDamage(rand(0, 40));
     $newHP = $user->getHP();
     $msg = "\n {$username} took {$damage} Damage. HP:{$newHP}/{$maxHP} \n";
     if ($newHP == 0) {
         $msg = "\n {$username} is KO'd \n";
     }
     return $msg;
 }
示例#5
0
 public function aggrigateData()
 {
     $this->bot->onJoin(function (Event $event) {
         $request = $event->getRequest();
         $user = new User();
         $user->updateFromRequest($request);
         $this->_users[$user->getUsername()] = $user;
     });
 }