示例#1
0
afficheTitreMonstre($Race, $IDTemplate, $Age_select, $Famille, $niv_estim);
print "</p>";
print "<p>";
afficheSelecteursMonstre($Race, $IDTemplate, $IDAge, $Age, $Famille);
print "</p>";
print "<p>";
if ($niv_estim != '?') {
    afficheCalculateurPX($niv_estim);
} else {
    afficheCalculateurPX('1');
}
print "</p>";
print "<p>&nbsp;</p>";
// on peut maintenant afficher les cdms
if ($MH != "-1") {
    $tab_cdm = SelectCdM_mh($MH, $Race, $IDAge);
    if (count($tab_cdm) > 0) {
        print "<p>";
        print "<b>CdM du monstre MH (" . $MH . ")</b><br>";
        affiche_liste_cdms($tab_cdm);
        print "</p>";
    }
}
if ($Race != "-1" && $IDTemplate != "-1" && $IDAge != "-1") {
    $tab_monstre = SelectMonstre($Race, $IDTemplate, $IDAge, $Age);
    if (count($tab_monstre['monstre']) > 0) {
        print "<p>";
        print "<b>Caractéristiques moyennes établies pour ce monstre</b><br>";
        affiche_monstre($tab_monstre['monstre'], $tab_monstre['capspe'], $tab_monstre['caracs']);
        print "</p>";
    }
示例#2
0
 $sql = "SELECT id_groupe FROM ggc_troll WHERE id_troll = '" . $_SESSION['AuthTroll'] . "' AND id_groupe != 0;";
 $query = mysql_query($sql, $db_vue_rm);
 if (mysql_error()) {
     echo "alert('" . mysql_error() . "');";
 }
 if (mysql_num_rows($query) > 0) {
     $ggc = mysql_fetch_assoc($query);
 }
 for ($i = 0; $i < count($monsterIds); $i++) {
     $rang = $i * 2 + $begin;
     $dist = $monstersDists[$i];
     $name = ereg_replace('[\\]', "", $monsterNames[$i]);
     $infos = getInfoFromMonstre($name);
     $caracs_moyennes = SelectCaracMoyMonstre($infos['id_race'], $infos['id_template'], $infos['id_age']);
     $caracs_spe = SelectCapSpe($infos['id_race'], $infos['id_template'], $infos['id_age']);
     $tab_cdm_mh = SelectCdM_mh($monsterIds[$i], $infos['id_race'], $infos['id_age']);
     $infos["monstre"] = addslashes($infos["monstre"]);
     $txtmonster = addslashes($monsterNames[$i]);
     $insulte = 0;
     // Initialisation des variables js
     echo "\n\t\t\t\tvar colortd = '';\t\n\t\t\t\tanchorRow = tableMonsters[{$rang}];\n\t\t\t\tanchorCellID = tableMonsters[{$rang}].childNodes[1]; // ANCHOR\n\t\t\t\tanchorCellNiv = tableMonsters[{$rang}].childNodes[2]; // ANCHOR\n\t\t\t\tanchorCellDesc = tableMonsters[{$rang}].childNodes[3]; // ANCHOR\n\t\t\t\tanchorCellPV = tableMonsters[{$rang}].childNodes[4]; // ANCHOR\n\t\t\t\tmonsterStyle = new String ( anchorCellDesc.getElementsByTagName ( 'a' )[0].getAttribute ( 'class' ) );\n\t\t\t   \t\$(anchorCellID).html(\"<a class='\"+monsterStyle+\"' href='javascript:EMV({$monsterIds[$i]} ,750,550)'>{$monsterIds[$i]}</a>\");\t\n\t\t\t";
     $urlmonster = "URLBestiaire + escape ('" . $infos["monstre"] . "') + '&IDAge=' + escape ('" . $infos["id_age"] . "') + '&MH={$monsterIds[$i]}'";
     $mm = $rm = $dla = "";
     if ($tab_cdm_mh) {
         $last_cdm = count($tab_cdm_mh) - 1;
         $titre = "cdm recoupées du monstre au " . $tab_cdm_mh[$last_cdm]['date_cdm'];
         $colPV = $tab_cdm_mh[$last_cdm]['nbj_cdm'] > 5 ? 1 : 0;
         if ($tab_cdm_mh[$last_cdm]['pdvmax_cdm'] != 999) {
             $carac["pdv"] = "entre " . $tab_cdm_mh[$last_cdm]['pdvmin_cdm'] . " et " . $tab_cdm_mh[$last_cdm]['pdvmax_cdm'] . " --> <b>" . ($tab_cdm_mh[$last_cdm]['pdvmin_cdm'] + $tab_cdm_mh[$last_cdm]['pdvmax_cdm']) / 2 . " </b>PV";
             if ($tab_cdm_mh[$last_cdm]['blessure_cdm'] != 0) {
                 $ble = $tab_cdm_mh[$last_cdm]['blessure_cdm'] . " % : reste entre " . (floor($tab_cdm_mh[$last_cdm]['pdvmin_cdm'] * (95 - $tab_cdm_mh[$last_cdm]['blessure_cdm']) / 100) + 1) . " et " . floor($tab_cdm_mh[$last_cdm]['pdvmax_cdm'] * (105 - $tab_cdm_mh[$last_cdm]['blessure_cdm']) / 100);
示例#3
0
function vue2d_informations_monstres_popup($monstre, $ax, $ay, $az, $max_pa)
{
    $titre = "<b>" . addslashes($monstre['nom']) . "</b>";
    $text = "Desactivation des informations pour surcharge serveur.";
    $info = " onmouseover=\"return overlib('{$text}',CAPTION,'Clique pour fixer la popup !');\"";
    $info .= " onclick=\"return overlib('{$text}', STICKY, CAPTION, '{$titre}', CLOSECLICK, EXCLUSIVE);\" ";
    $info .= " onmouseout=\"return nd();\"";
    return $info;
    include_once 'bestiaire2/Libs/inc_affichage.php';
    $titre = "<b>" . addslashes($monstre['nom']) . "</b>";
    $text = "<center>";
    $text .= "<br>";
    $text .= "<table><tr><td>";
    $text .= "<table align=center class=mh_tdborder><tr><td colspan=4>";
    $text .= "<h2>{$titre}</h2>";
    $text .= "</center></td></tr>";
    preg_match("/(.+) \\[(.+)\\]/", $monstre['nom'], $resultat);
    $nom = preg_replace("/'/", "%27", $resultat[1]);
    $age = preg_replace("/'/", "%27", $resultat[2]);
    $race = $monstre['infos_monstre']['race'];
    $race = addslashes($race);
    $famille = $monstre['infos_monstre']['famille'];
    $famille = addslashes($famille);
    $niveau = $monstre['niveau'];
    $text .= "<tr class=mh_tdpage>";
    $text .= "<td>Age : {$age}</td>";
    $text .= "<td>Niveau : {$niveau}</td>";
    $text .= "</tr>";
    $text .= "<tr class=mh_tdpage>";
    $text .= "<td>Race : " . htmlentities($race) . "<br>";
    $text .= "<td>Famille : " . htmlentities($famille) . "</td>";
    $text .= "</tr>";
    $text .= "</table>";
    $text .= "</td><td>";
    $x_dist = $ax - $monstre['x'];
    $y_dist = $ay - $monstre['y'];
    $z_dist = $az - $monstre['z'];
    if ($x_dist < 0) {
        $x_dist = -$x_dist;
    }
    if ($y_dist < 0) {
        $y_dist = -$y_dist;
    }
    if ($z_dist < 0) {
        $z_dist = -$z_dist;
    }
    $text .= "<table align=center class=mh_tdborder><tr><td nowrap class=mh_tdtitre>";
    $text .= "Distance";
    $text .= "</td><td nowrap class=mh_tdpage>";
    $text .= "en x = {$x_dist} case(s)<br>";
    $text .= "en y = {$y_dist} case(s)<br>";
    $text .= "en z = {$z_dist} case(s)";
    $text .= "</td></tr></table>";
    $text .= "</td></tr></table><br>";
    if ($monstre['infos_monstre']['id_age'] != "") {
        $tab_cdm = SelectCdM_mh($monstre['id'], $monstre['infos_monstre']['race'], $monstre['infos_monstre']['id_age']);
        if (count($tab_cdm) > 0) {
            $text .= "<table class=mh_tdtitre>";
            $text .= "<tr><td align=center class=mh_titre colspan=12><b>CdM sur ce monstre</b></td></tr></table>";
            $text .= addslashes(affiche_liste_cdms($tab_cdm, false));
        }
    }
    if ($max_pa > 15) {
        $text .= "La taille en PA est sup&eacute;rieure &agrave; 15. Pour plus d\\'info sur ce monstre, consultez le bestiaire.<br>";
    }
    //	if ((	$monstre[infos_monstre][id_template] != "" ) && ($monstre[infos_monstre][id_age] != "") ) {
    //	$tab_cdm=SelectCdMs($monstre[infos_monstre][race],$monstre[infos_monstre][id_template],$monstre[infos_monstre][id_age],"-1","-1", true);
    if (count($monstre[tab_cdm]) > 0) {
        $text .= "<table class=mh_tdtitre>";
        $text .= "<tr><td align=center class=mh_titre colspan=12><b>Derni&egrave;re CdM de même race, même template et même âge</b></td></tr></table>";
        $text .= addslashes(affiche_liste_cdms($monstre['tab_cdm'], false));
    }
    //	}
    $tab = $monstre['caracs_moyennes'];
    $td = "td align=center width=50";
    /*$text .= "<br><table class=mh_tdborder>";
    	$text .= "<tr><td align=center class=mh_titre colspan=12><b>Caract&eacute;tistiques moyennes</b></td></tr>";
    	$text .= "<tr class=mh_tdtitre><$td>niv</td><$td>pdv</td><$td>att</td><$td>esq</td><$td>deg</td><$td>reg</td><$td>arm</td><$td>vue</td></tr>";
    	$text .= "<tr class=mh_tdpage><$td>$tab[niv]</td><$td>$tab[pdv]</td><$td>$tab[att]</td><$td>$tab[esq]</td><$td>$tab[deg]</td><$td>$tab[reg]</td><$td>$tab[arm]</td><td>$tab[vue]</td></tr>";
    	$text .= "</table><br>";*/
    $capspe = $monstre['capacites_speciales'];
    if ($capse) {
        $text .= "<table class=mh_tdborder>";
        $text .= " <tr><td colspan=6><em>Capacit&eacute; sp&eacute;ciale </em>&nbsp;&nbsp;" . htmlentities($capspe['nom_capspe']) . "&nbsp;&nbsp;&nbsp;<em>affecte</em>&nbsp;&nbsp;&nbsp;" . htmlentities($capspe['affecte_capspe']) . "</td>";
        $text .= "</tr>";
        $text .= "<tr class=mh_tdtitre>";
        $text .= "  <{$td}>MM</td><{$td}>deg</td><{$td}>portee</td><{$td}>dur&eacute;e</td><{$td}>zone</td></tr>";
        $carac = carac_monstre($capspe['MMsom_capspe'], $capspe['MMnbr_capspe']);
        $text .= "<tr class=mh_tdpage>";
        $text .= "  <{$td}>" . $carac . "</td>";
        $carac = carac_monstre($capspe['degatsom_capspe'], $capspe['degatnbr_capspe']);
        $text .= "  <{$td}>" . $carac . "</td>";
        $text .= "  <{$td}>" . $capspe['portee_capspe'] . "</td>";
        $text .= "  <{$td}>" . $capspe['duree_capspe'] . "</td>";
        $text .= "  <{$td}>" . $capspe['portee_zone_capspe'] . "</td>";
        $text .= "</tr>";
        $text .= "</table>";
        $text .= "</center>";
    }
    $text .= "<br><table align=center class=mh_tdborder><tr><td>";
    $text .= "<h2><a href=\\'/bestiaire2/bestiaire.php?Monstre={$nom}&Age={$age}\\'>lien vers le bestiaire</a></h2>";
    $text .= "</td></tr></table>";
    $info = " onmouseover=\"return overlib('{$text}',CAPTION,'Clique pour fixer la popup !');\"";
    $info .= " onclick=\"return overlib('{$text}', STICKY, CAPTION, '{$titre}', CLOSECLICK, EXCLUSIVE);\" ";
    $info .= " onmouseout=\"return nd();\"";
    return $info;
}