public function __construct($slug, $nome, $base, $dificuldade, $nivel, $observacao = null)
 {
     //$pericia = Pericia::pegar($slug);
     //parent::__construct($slug, $pericia->getNome(), $pericia->getCategoria(), $pericia->getBase(), $pericia->getDificuldade());
     parent::__construct($slug, $nome, $base, $dificuldade);
     $this->nivel = $nivel;
     $this->observacao = $observacao;
 }
Exemplo n.º 2
0
?>
<small>Kg</small></h3>
            </div>
            <div class="six columns text-center">
                <small>Preço</small>
                <h3><small>$</small> <?php 
echo number_format($item->getPreco(), 2, ',', '.');
?>
</h3>
            </div>
        </div>
        <div class="row">
            <div class="twelve columns text-center">
                <small>Perícia</small>
                <?php 
$pericia = Pericia::pegar($arma->getPericiaSlug());
?>
                <h5><?php 
echo $pericia->getNome();
?>
</h5>
            </div>
        </div>
        <div class="row">
            <div class="twelve columns text-center">
                <small>Equipa</small>
                <h3><?php 
echo $longe->getMaoDescricao();
?>
</h3>
            </div>
Exemplo n.º 3
0
?>
</h3>
    </div>
</div>
<div class="row">
    <div class="three columns text-center">
        <small>Mãos</small>
        <h5><?php 
echo $longe->getMaoDescricao();
?>
</h5>
    </div>
    <div class="three columns text-center">
        <small>Perícia</small>
        <?php 
$pericia = Pericia::pegar($longe->getPericiaSlug());
?>
        <h5><?php 
echo $pericia->getNome();
?>
</h5>
    </div>
    <div class="two columns text-center">
        <small>Munição</small>
        <h5><?php 
echo $item->getMunicao();
?>
</h5>
    </div>
    <div class="two columns text-center">
        <small>Peso</small>
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title"><?php 
echo _("New Skill");
?>
</h4>
      </div>
      <div class="modal-body">
        <input type="hidden" id="pericia_id" />
        <div class="row">
            <div class="twelve columns">
                <label><?php 
echo _("Based in");
?>
</label>
                <?php 
Pericia::dropDownList('pericia_slug');
?>
            </div>
        </div>
        <div class="row">
            <div class="twelve columns">
                <label><?php 
echo _("Name");
?>
</label>
                <input type="text" id="pericia_nome" />
            </div>
        </div>
        <div class="row">
            <div class="twelve columns">
                <label><?php 
Exemplo n.º 5
0
Pericia::registrar(new Pericia('jitte-sai', _('Jitte/Sai'), FISICA, MEDIA, array('dx' => -5, 'force-sword' => -4, 'main-gauche' => -4, 'shortsword' => -3)));
Pericia::registrar(new Pericia('knife', _('Knife'), FISICA, FACIL, array('dx' => -4, 'force-sword' => -3, 'main-gauche' => -3, 'shortsword' => -3)));
Pericia::registrar(new Pericia('shortsword', _('Shortsword'), FISICA, MEDIA, array('dx' => -5, 'broadsword' => -2, 'force-sword' => -4, 'jitte-sai' => -3, 'knife' => -4, 'saber' => -4, 'smallsword' => -4, 'tonfa' => -3)));
Pericia::registrar(new Pericia('two-handed-sword', _('Two-Handed Sword'), FISICA, MEDIA, array('dx' => -5, 'broadsword' => -4, 'force-sword' => -4)));
Pericia::registrar(new Pericia('shield', _('Shield'), FISICA, FACIL, array('dx' => -4)));
Pericia::registrar(new Pericia('spear-thrower', _('Spear Thrower'), FISICA, MEDIA, array('dx' => -5, 'thrown-spear' => -4)));
Pericia::registrar(new Pericia('stealth', _('Stealth'), FISICA, MEDIA, array('dx' => -5, 'iq' => -5)));
Pericia::registrar(new Pericia('swimming', _('Swimming'), RESISTENCIA, FACIL, array('ht' => -4)));
Pericia::registrar(new Pericia('thrown-axe-mace', _('Thrown Weapon(Axe/Mace)'), FISICA, FACIL, array('dx' => -4)));
Pericia::registrar(new Pericia('thrown-dart', _('Thrown Weapon(Dart)'), FISICA, FACIL, array('dx' => -4)));
Pericia::registrar(new Pericia('thrown-harpoon', _('Thrown Weapon(Harpoon)'), FISICA, FACIL, array('dx' => -4)));
Pericia::registrar(new Pericia('thrown-knife', _('Thrown Weapon(Knife)'), FISICA, FACIL, array('dx' => -4)));
Pericia::registrar(new Pericia('thrown-shuriken', _('Thrown Weapon(Shuriken)'), FISICA, FACIL, array('dx' => -4)));
Pericia::registrar(new Pericia('thrown-spear', _('Thrown Weapon(Spear)'), FISICA, FACIL, array('dx' => -4)));
Pericia::registrar(new Pericia('thrown-stick', _('Thrown Weapon(Stick)'), FISICA, FACIL, array('dx' => -4)));
Pericia::registrar(new Pericia('traps', _('Traps'), MENTAL, MEDIA, array('iq' => -5, 'lockpicking' => -3)));
/*
Pericia::registrar(new Pericia('adestramento-animais', 'Adestramento de Animais', PERICIA_ANIMAIS, MENTAL, DIFICIL, array('iq' => -6)));
Pericia::registrar(new Pericia('falcoaria', 'Falcoaria', PERICIA_ANIMAIS, MENTAL, MEDIA, array('iq' => -5)));
Pericia::registrar(new Pericia('carregamento', 'Carregamento', PERICIA_ANIMAIS, MENTAL, DIFICIL, array('iq' => -6), array('adestramento-animais' => 0)));
Pericia::registrar(new Pericia('cavalgar', 'Cavalgar', PERICIA_ANIMAIS, FISICA, MEDIA, array('dx' => -5, 'adestramento-animais' => -3)));
Pericia::registrar(new Pericia('carreiro', 'Carreiro', PERICIA_ANIMAIS, MENTAL, MEDIA, array('adestramento-animais' => -4, 'cavalgar' => -2), array('adestramento-animais' => 0)));
Pericia::registrar(new Pericia('veterinaria', 'Veterinária', PERICIA_ANIMAIS, MENTAL, DIFICIL, array('adestramento-animais' => -5)));

Pericia::registrar(new Pericia('artista', 'Artista', PERICIA_ARTISTICA, MENTAL, DIFICIL, array('iq' => -6)));
Pericia::registrar(new Pericia('trovador', 'Trovador', PERICIA_ARTISTICA, MENTAL, MEDIA, array('iq' => -5, 'atuacao' => -2)));
Pericia::registrar(new Pericia('caligrafia', 'Caligrafia', PERICIA_ARTISTICA, FISICA, MEDIA, array('dx' => -5, 'artista' => -2), array('alfabetizado' => 0)));
Pericia::registrar(new Pericia('danca', 'Dança', PERICIA_ARTISTICA, FISICA, MEDIA, array('dx' => -5)));
Pericia::registrar(new Pericia('instrumento-musicial', 'Instrumento Musical', PERICIA_ARTISTICA, MENTAL, DIFICIL));
Pericia::registrar(new Pericia('fotografia', 'Fotografia', PERICIA_ARTISTICA, MENTAL, MEDIA, array('iq' => -5)));
Pericia::registrar(new Pericia('poesia', 'Poesia', PERICIA_ARTISTICA, MENTAL, MEDIA, array('iq' => -5)));
Exemplo n.º 6
0
function ficha_exibir_pericia($slug)
{
    $pericias = array();
    $categoria = Pericia::listarCategoria();
    foreach (Pericia::listar() as $pericia) {
        if (!is_array($pericias[$pericia->getCategoria()])) {
            $pericias[$pericia->getCategoria()] = array();
        }
        $pericias[$pericia->getCategoria()][$pericia->getSlug()] = $pericia;
    }
    echo "<select name=\"pericia[]\">\n";
    echo "<option value=\"\">--Selecione--</option>";
    foreach ($pericias as $id_categoria => $subpericias) {
        echo "<optgroup label=\"" . $categoria[$id_categoria] . "\">\n";
        foreach ($subpericias as $pericia) {
            $texto = $pericia->getNome();
            $texto .= $pericia->getBase() == FISICA ? " F/" : " M/";
            switch ($pericia->getDificuldade()) {
                case FACIL:
                    $texto .= 'F';
                    break;
                case MEDIA:
                    $texto .= 'M';
                    break;
                case DIFICIL:
                    $texto .= 'D';
                    break;
                case MUITO_DIFICIL:
                    $texto .= 'MD';
                    break;
            }
            echo "<option value=\"" . $pericia->getSlug() . "\"";
            if ($slug == $pericia->getSlug()) {
                echo ' selected="selected"';
            }
            echo ">{$texto}</option>\n";
        }
        echo "</optgroup>\n";
    }
    echo "</select>\n";
}
Exemplo n.º 7
0
 private function getNHPreDefinido($pericia_slug, $em_choque = true)
 {
     $nh = 0;
     $pericia = Pericia::pegar($pericia_slug);
     foreach ($pericia->listPreDefinido() as $habilidade => $bonus) {
         switch ($habilidade) {
             case 'st':
                 if ($this->getST() + $bonus > $nh) {
                     $nh = $this->getST() + $bonus;
                 }
                 break;
             case 'dx':
                 if ($this->getDX($em_choque) + $bonus > $nh) {
                     $nh = $this->getDX() + $bonus;
                 }
                 break;
             case 'iq':
                 if ($this->getIQ($em_choque) + $bonus > $nh) {
                     $nh = $this->getIQ() + $bonus;
                 }
                 break;
             case 'ht':
                 if ($this->getHT() + $bonus > $nh) {
                     $nh = $this->getHT() + $bonus;
                 }
                 break;
             default:
                 $nhtmp = $this->getNH($habilidade, true);
                 if ($nhtmp > $nh) {
                     $nh = $nhtmp;
                 }
                 break;
         }
     }
     return $nh;
 }
Exemplo n.º 8
0
?>
" />
            </div>
            <div class="six columns">
                <label>Tiros</label>
                <input type="number" id="longe_tiro" name="longe_tiro" value="<?php 
echo $longe->getTiro();
?>
" />
            </div>
        </div>
        <div class="row">
            <div class="twelve columns">
                <label>Perícia</label>
                <?php 
echo Pericia::dropDownList('longe_pericia_slug', $longe->getPericiaSlug());
?>
            </div>
        </div>
        <div class="row">
            <div class="twelve columns">
                <label>Munição</label>
                <?php 
$municao = $longe->getMunicao();
?>
                <?php 
Item::dropDownList(is_null($municao) ? '' : $municao, 'longe_municao_slug', '--Selecione--');
?>
            </div>
        </div>
    </div>