Esempio n. 1
0
                        continue;
                    }
                    $diffence = $tmp;
                    break;
                }
            }
        } else {
            if ($offence->hitPoint > 0 && teamPoint($teamA) > 0) {
                shuffle($teamA->members);
                foreach ($teamA->members as $tmp) {
                    if ($tmp->hitPoint <= 0) {
                        continue;
                    }
                    $diffence = $tmp;
                    break;
                }
            }
        }
        if ($diffence != null) {
            Attack($offence, $diffence);
        }
    }
    echo "<hr>\n";
    echo $taro->name . "HP:" . $taro->hitPoint . " / " . $jiro->name . "HP:" . $jiro->hitPoint;
    echo "  |  ";
    echo $hooliganA->name . "HP:" . $hooliganA->hitPoint . " / " . $hooliganB->name . "HP:" . $hooliganB->hitPoint . " / " . $hooliganC->name . "HP:" . $hooliganC->hitPoint;
    echo "<br>\n<hr>\n";
}
?>
</body>
</html>
Esempio n. 2
0
function Fuir($cible)
{
    if ($cible == PLAYER) {
        Attack(PLAYER);
        $P_Vie = $_SESSION['Class']->__get("Hp");
        if ($P_Vie > 0) {
            $_SESSION['Class']->Reset();
            echo 'fuite réussi,';
        }
    } else {
        $M_Vie = $_SESSION['Monstre']->__get("Hp");
        if ($M_Vie > 0) {
            $_SESSION['Class']->Reset();
            echo 'le monstre a fui,';
        }
    }
}