require_once 'EPPersistentDataManager.php'; require_once '../php/EPConfigFile.php'; require_once '../php/EPListProvider.php'; require_once '../php/EPConfigFile.php'; require_once '../php/EPBackground.php'; require_once '../php/EPTrait.php'; require_once '../php/EPGear.php'; require_once '../php/EPPsySleight.php'; $epListP = new EPListProvider('../php/config.ini'); $persistManager = new EPPersistentDataManager('../php/config.ini'); $_SESSION['backgroundList'] = $epListP->getListBackgrounds(); $_SESSION['traitList'] = $epListP->getListTraits(); $_SESSION['gearList'] = $epListP->getListGears(); $_SESSION['psyList'] = $epListP->getListPsySleights(); $_SESSION['morphList'] = $epListP->getListMorph(); $_SESSION['aiList'] = $epListP->getListAi(); if (isset($_POST['addBook'])) { $totalInject = array(); if (isset($_POST['selectedBackground'])) { foreach ($_POST['selectedBackground'] as $b) { array_push($totalInject, $b); } } if (isset($_POST['selectedTraits'])) { foreach ($_POST['selectedTraits'] as $t) { array_push($totalInject, $t); } } if (isset($_POST['selectedGear'])) { foreach ($_POST['selectedGear'] as $g) { array_push($totalInject, $g);
$skillAiList = $listProvider->getListSkills($aptAiList); foreach ($skillAiList as $skl) { $skl->baseValue = 60; } $ai[0] = new EPAi("Ai Test", $aptAiList, EPCreditCost::$EXPENSIVE, $skillAiList, $statAiList, "test description"); foreach ($ai as $a) { if (!$persistManager->persistAi($a)) { echo $persistManager->getLastError(); echo "<br>"; } else { echo "DONE ! <br>"; } } //Echo Ai echo "<br><br>AI LIST------------------------------------------ <br><br>"; $aiList = $listProvider->getListAi(); if ($aiList == null) { echo $listProvider->getLastError(); echo "<br>"; } else { foreach ($aiList as $m) { echo $m->name . " : " . $m->description . " Cost : " . $m->getCost(); echo '<br>'; echo '<br>'; $aptitudes = $m->aptitudes; echo "With Aptitude : <br>"; foreach ($aptitudes as $o) { echo $o->name . " Desc : " . $o->description . " Abbr. : " . $o->abbreviation . "<br>"; echo "Aptitudes on groups : <br>"; $groupsList = $o->groups; foreach ($groupsList as $g) {