Beispiel #1
0
function cards($r = "", $id = -1, $modifiers = false)
{
    global $site_url;
    // From global.php
    global $stats;
    if ($id != -1 && !is_array($r)) {
        $ab_id = $id;
        $ab_creatures = get_creatures();
        $r = reset($ab_creatures);
    }
    // Preparing shout
    $spaceless = str_replace(' ', '%20', $r['name']);
    $underscore = str_replace(' ', '_', $r['name']);
    $CallCreature = 'CallCreature(\'' . $spaceless . '_shout\');';
    // Side A
    ?>
	<div class="center" style="display:inline-block; vertical-align: top;">
		<div class="card sideA" style="background-image: url('<?php 
    echo $site_url;
    ?>
images/cards/margin.png'), url('<?php 
    echo $site_url;
    ?>
units/artwork/<?php 
    echo $r['name'];
    ?>
.jpg');">

			<!-- On hover mini tutorial -->
			<div class="card_info stats_desc"><br>
				<div><span class="icon health"></span> Health: The raw amount of damage points a creature can take before it dies.</div>
				<div><span class="icon regrowth"></span> Regrowth: Amount of health that gets restored at the beginning of every turn.</div>
				<div><span class="icon endurance"></span> Endurance :  Protects unit from fatigue, which disables regrowth and meditation.</div><br>
				<div><span class="icon energy"></span> Energy : Each unit ability requires a certain amount of energy to be used.</div>
				<div><span class="icon meditation"></span> Meditation : Energy restored each turn.</div>
				<div><span class="icon initiative"></span> Initiative : Units with higher amount of initiative points get to act their turn faster.</div><br>
				<div><span class="icon offense"></span> Offense : Influences the damage output done by all the creature's attack abilities.</div>
				<div><span class="icon defense"></span> Defense : Protects the creature by reducing some of the incoming damage.</div>
				<div><span class="icon movement"></span> Movement : Any creature can move a certain number of hexagons every turn.</div>
			</div>
			<div class="card_info masteries_desc">
				<span>There are 9 common types of damage and a rare one called Pure damage that bypasses the formula bellow, doing a fixed non-variable amount of harm no matter what.</span><br><br>
				<span><u>Damage Formula</u><br>attack damage +<br>attack damage / 100 *<br>(offense of attacking unit -<br>defense of unit attacked /<br>number of hexagons hit +<br>source stat of attacker -<br>source stat of defender)</span><br><br>
				<span>Minimum damage is usually 1<br>unless the hit is being avoided.</span>
			</div>

			<!-- Card Anchor -->
			<a href="#<?php 
    echo $underscore;
    ?>
"><div style="height:100%;"></div></a>
<?php 
    // Display unit info
    echo '<div class="section info sin' . $r['realm'] . '">
					<span class="type" creature_type="' . $r['realm'] . $r['lvl'] . '" style="float:left; margin-left:22px;">' . $r['realm'] . $r['lvl'] . '</span>
					<span><audio src="../units/shouts/' . $spaceless . '.ogg" id="' . $spaceless . '_shout" style="display:none;" preload="auto"></audio>
					<a class="name" onClick="' . $CallCreature . '" onmouseover="' . $CallCreature . '" creature_name="' . $r['name'] . '" >' . $r['name'] . '</a></span>
					<span class="hexs" creature_size="' . $r['size'] . 'H" style="float:right; margin-right:22px;">' . $r['size'] . 'H</span>
			</div>
		</div></div>';
    // Side B
    echo '
		<div class="card sideB" style="background-image: url(' . $site_url . 'images/cards/margin.png), url(' . $site_url . 'images/cards/' . $r['realm'] . '.jpg);">
				<div class="section numbers stats">';
    // Display Stats
    $i = 1;
    foreach ($r["stats"] as $key => $value) {
        if ($i > 0 && $i < 10) {
            displayStat($key, $value, $modifiers);
        }
        $i++;
    }
    echo '
				</div>
				<div class="section abilities">';
    // Display Abilities
    for ($i = 0; $i < 4; $i++) {
        echo '
						<div class="ability">
							<div class="icon" style="background-image: url(\'' . $site_url . 'units/icons/' . $r["name"] . ' ' . $i . '.svg\');">
								<div class="contour"></div>
							</div>
							<div class="wrapper">
								<div class="info">
									<h3>' . $r["ability_info"][$i]["title"] . '</h3>
									<span class="desc" id="desc">' . $r["ability_info"][$i]["desc"] . '</span><br>
									<span class="desc" id="info">' . $r["ability_info"][$i]["info"] . '</span>
								</div>
							</div>
						</div>';
    }
    echo '
				</div>
				<div class="section numbers masteries">';
    // Display Masteries
    $i = 1;
    foreach ($r["stats"] as $key => $value) {
        if ($i > 9 && $i < 19) {
            displayStat($key, $value, $modifiers);
        }
        $i++;
    }
    echo '
				</div>
			</div>';
}
Beispiel #2
0
					<div class="wrapper">
						<div class="info">
							<h3 id="fourth_title"></h3>
							<span class="desc" id="desc"></span>
						</div>
					</div>
				</div>
				';
echo '
			</div>
			<div class="section numbers masteries">';
// Display Masteries
$i = 1;
foreach ($r["stats"] as $key => $value) {
    if ($i > 9 && $i < 19) {
        displayStat($key, $value, "");
    }
    $i++;
}
echo '
			</div>
		</div>';
?>
</div>

<div class="div" id="plot">
<div style="width: 475px; text-align: justify; display:inline-block;">
<h3 class="indexheader"><a href="#plot">Plot</a></h3>
<p>
It's the year 2653. In the last few centuries, technology advanced exponentially and everyone had a fair chance of playing God. With help from the <a href="http://reprap.org" target="_blank"><b>RepRap</b></a> project, a free desktop 3d printer, which gave anyone power to build their own weapon factory or genetic laboratory on their own property. Mechanic parts or genetic modifications turned from a fashion option into a requirement for daily survival.
</p><p>