The module includes code for calculating _dice_roller_required_addition after a takehighest or takelowest roll, however, since the command_parameters never get set, this never occurs. If you want to do something like 3d6.takehighest(1)+1, the following code may be inserted into the module at line 144 (just before "// Ok, let's do this.")

  $plus_pos = strpos($this_command, '+');
  $minus_pos = strpos($this_command, '-');
  if ($plus_pos || $minus_pos) {
    $plus = strpos($this_command, '+');
    $minus = strpos($this_command, '-');
    if ($plus || $minus) {
      $this_command = str_replace('+', '|+', $this_command);
      $this_command = str_replace('-', '|-', $this_command);
      $split2 = explode('|', $this_command);
      $this_command = array_shift($split2);
      $total = 0;
      foreach ($split2 as $this_split) {
        if (is_numeric($this_split)) {
          $total = $total + $this_split;
        }
      }
      if ($total != 0) {
        $command_set['dice_roller_addition'] = array($total);
      }
    }
  }

Comments

As If created an issue. See original summary.

As If’s picture

Issue summary: View changes