예제 #1
0
 public function go_back_to_normal_mode()
 {
     $this->profile->enable_normal_mode();
     $this->prepare_next_level();
     UI::puts(__("Another level has been added since you started epic, going back to normal mode."));
     UI::puts(sprintf(__("See the updated README in the phpwarrior/%s directory."), $this->profile->directory_name()));
 }
예제 #2
0
 public function tally_points()
 {
     $score = 0;
     UI::puts(sprintf(__("Level Score: %s"), $this->warrior->score));
     $score += $this->warrior->score;
     UI::puts(sprintf(__("Time Bonus: %s"), $this->time_bonus));
     $score += $this->time_bonus;
     if (count($this->floor->other_units()) == 0) {
         UI::puts(sprintf(__("Clear Bonus: %s"), $this->clear_bonus()));
         $score += $this->clear_bonus();
     }
     if ($this->profile->is_epic()) {
         if ($this->grade_for($score)) {
             UI::puts(sprintf(__("Level Grade: %s"), $this->grade_for($score)));
         }
         UI::puts(sprintf(__("Total Score: %s"), $this->score_calculation($this->profile->current_epic_score, $score)));
         if ($this->ace_score) {
             $this->profile->current_epic_grades[$this->number] = $score / $this->ace_score;
         }
         $this->profile->current_epic_score += $score;
     } else {
         UI::puts(sprintf(__("Total Score: %s"), $this->score_calculation($this->profile->score, $score)));
         $this->profile->score += $score;
         $this->profile->abilities = array_keys($this->warrior->abilities);
     }
 }