Skip to content

Commit

Permalink
more clear
Browse files Browse the repository at this point in the history
lvl is now level and some other tweaks
  • Loading branch information
DreadKnight committed Sep 21, 2015
1 parent 23bac54 commit ca9e53f
Show file tree
Hide file tree
Showing 5 changed files with 225 additions and 141 deletions.
51 changes: 23 additions & 28 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

require_once('header.php');
?>
<article>

<div class="center">
<!-- Featured Blog Article -->
<div style="display: inline-block;" class="lighten">
Expand Down Expand Up @@ -216,48 +216,42 @@
<audio id="narration" src="plot.ogg"></audio>
</div>

</article>

<?php
include('blog/subscribe.php');
include('footer.php');
?>

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>

<!-- Change Feature Slides -->
<script>
function nextSlide() {
var x = $('#screenshot img:not(.active)');
return $(x[Math.floor(Math.random() * x.length)]);
}
// Change Feature Slides
function nextSlide() {
var x = $('#screenshot img:not(.active)');
return $(x[Math.floor(Math.random() * x.length)]);
}

function slideSwitch() {
var active = $('#screenshot img.active');
if (active.length == 0)
active = nextSlide();
var next = nextSlide();
active.addClass('last-active');
next.css({opacity: 0.0})
.addClass('active')
.animate({opacity: 1.0}, 1000, function() {
active.removeClass('active last-active');
});
}
$(function() { setInterval("slideSwitch()", 4000); });
</script>
function slideSwitch() {
var active = $('#screenshot img.active');
if (active.length == 0)
active = nextSlide();
var next = nextSlide();
active.addClass('last-active');
next.css({opacity: 0.0})
.addClass('active')
.animate({opacity: 1.0}, 1000, function() {
active.removeClass('active last-active');
});
}
$(function() { setInterval("slideSwitch()", 4000); });

<!-- Toggle Plot Narration -->
<script>
// Toggle Plot Narration
function toggleSound() {
var audioElem = document.getElementById('narration');
if (audioElem.paused) audioElem.play();
else audioElem.pause();
}
</script>

<script>
$(function(){
$(function() {
// Shows description of stats
$(".stats").mouseenter(function() {
var card = jQuery(this).parent().siblings().find(".stats_desc");
Expand All @@ -275,6 +269,7 @@ function toggleSound() {
});
nextCard();
});

// Show next info card
var i = 0;
var total = 5;
Expand All @@ -295,7 +290,7 @@ function nextCard() {
$("#fourth_title").text("Hard to Master").next().html("The game only relies on pure skill and never on dice throws, chances or other luck factors. It's always all up to you!");
break;
case 2:
$("#first_title").text("Browser Based").next().html("You don't have to bother yourself with downloading and installing the game or some problematic browser plug-in.");
$("#first_title").text("Browser Based").next().html("You don't have to bother yourself with downloading and installing the game or some silly problematic browser plug-in.");
$("#second_title").text("Optional User").next().html("Eager to play? Go right ahead, you can enjoy most of the game without even having to spend any time registering.");
$("#third_title").text("Open Source").next().html("This project is mostly a community effort, so you can contribute to it as well while having fun and learning.");
$("#fourth_title").text("Everything Translated - Coming Soon").next().html("We don't like to marginalize anyone, so we're making an effort to have this project translated in many languages.");
Expand Down
2 changes: 1 addition & 1 deletion units/cards.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

.abilities { text-align: left; }

.abilities h3 { font-size: 16px; margin: 0; text-decoration: underline; }
.abilities h3 { font-size: 16px; margin: 0; }

.abilities .icon { position: absolute; left: 0px; top: 0px; }

Expand Down
16 changes: 11 additions & 5 deletions units/cards.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function cards($r = "", $id = -1, $modifiers = false) {
global $site_url; // From global.php
global $stats;

if ($id != -1 && !is_array($r)){
if ($id != -1 && !is_array($r)) {
$ab_id = $id;

$ab_creatures = get_creatures();
Expand Down Expand Up @@ -108,7 +108,7 @@ function cards($r = "", $id = -1, $modifiers = false) {
<?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 class="type" creature_type="'.$r['realm'].$r['level'].'" style="float:left; margin-left:22px;">'.$r['realm'].$r['level'].'</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>
Expand All @@ -132,27 +132,33 @@ function cards($r = "", $id = -1, $modifiers = false) {
<div class="section abilities">';
// Display Abilities
for ($i=0; $i < 4; $i++) {
// Figure out if upgradable
if (!empty($r["ability_info"][$i]["upgrade"])) { $upgrade = '<br><span class="desc" id="info">Upgrade: ' . $r["ability_info"][$i]["upgrade"] . '</span>'; }
// Figure out the cost
if ($i==0) { $cost = ' - this ability is passive.'; } else { $cost = ' - costs ' . $r["ability_info"][$i]["costs"]["energy"] . ' energy pts.'; }
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>
<h3><span style="text-decoration: underline;">' . $r["ability_info"][$i]["title"] . '</span>' . $cost . '</h3>
<span class="desc" id="desc">' . $r["ability_info"][$i]["desc"] . '</span><br>
<span class="desc" id="info">' . $r["ability_info"][$i]["info"] . '</span>
<span class="desc" id="info">' . $r["ability_info"][$i]["info"] . '</span>'
. $upgrade . '
</div>
</div>
</div>';
$upgrade = NULL;
}
echo '
</div>
<div class="section numbers masteries">';
// Display Masteries
$i=1;
foreach ($r["stats"] as $key => $value) {
if( $i > 9 && $i < 19) {
if( $i > 9) {
displayStat($key,$value,$modifiers);
}
$i++;
Expand Down
Loading

0 comments on commit ca9e53f

Please sign in to comment.