You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
257 lines
8.0 KiB
HTML
257 lines
8.0 KiB
HTML
4 years ago
|
<!DOCTYPE html>
|
||
|
<html lang="en-US">
|
||
|
<head>
|
||
|
<meta charset="utf-8" />
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||
|
<title>square</title>
|
||
|
<link rel="icon" href="imgs/square_s/house9.gif">
|
||
|
<link rel="stylesheet" href="square_satanism.css">
|
||
|
|
||
|
</head>
|
||
|
<body>
|
||
|
<div id="ground"></div>
|
||
|
<!--houses-->
|
||
|
<!--game bar-->
|
||
|
|
||
|
<div class="game_bar" >
|
||
|
villagers: <span class="fighters"></span> / 9
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<!--characters-->
|
||
|
|
||
|
<div id="player_img" class="moving_duo"></div>
|
||
|
<div class="bubble moving_duo">!!!</div>
|
||
|
|
||
|
|
||
|
<div class="figure1 figures">
|
||
|
<img id="person1" class="people" src="imgs/square_s/person1.gif" height="120px">
|
||
|
<img id="fighter1" class="fighters" src="imgs/square_s/fighter1.gif" height="120px" style="display: none;">
|
||
|
</div>
|
||
|
<div class="figure2 figures">
|
||
|
<img id="person2" class="people" src="imgs/square_s/person2.gif" height="100px">
|
||
|
<img id="fighter2" class="fighters" src="imgs/square_s/fighter2.gif" height="120px" style="display: none;">
|
||
|
</div>
|
||
|
<div class="figure3 figures">
|
||
|
<img id="person3" class="people" src="imgs/square_s/person3.gif" height="110px">
|
||
|
<img id="fighter3" class="fighters" src="imgs/square_s/fighter3.gif" height="120px" style="display: none;">
|
||
|
</div>
|
||
|
<div class="figure4 figures">
|
||
|
<img id="person4" class="people" src="imgs/square_s/person4.gif" height="110px">
|
||
|
<img id="fighter4" class="fighters" src="imgs/square_s/fighter4.gif" height="120px" style="display: none;">
|
||
|
</div>
|
||
|
<div class="figure5 figures">
|
||
|
<img id="person5" class="people" src="imgs/square_s/person5.gif" height="90px">
|
||
|
<img id="fighter5" class="fighters" src="imgs/square_s/fighter5.gif" height="110px" style="display: none;">
|
||
|
</div>
|
||
|
<div class="figure6 figures">
|
||
|
<img id="person6" class="people" src="imgs/square_s/person6.gif" height="120px">
|
||
|
<img id="fighter6" class="fighters" src="imgs/square_s/fighter6.gif" height="120px" style="display: none;">
|
||
|
</div>
|
||
|
<div class="figure7 figures">
|
||
|
<img id="person7" class="people" src="imgs/square_s/person7.gif" height="120px">
|
||
|
<img id="fighter7" class="fighters" src="imgs/square_s/fighter7.gif" height="140px" style="display: none;">
|
||
|
</div>
|
||
|
<div class="figure8 figures">
|
||
|
<img id="person8" class="people" src="imgs/square_s/person8.gif" height="120px">
|
||
|
<img id="fighter8" class="fighters" src="imgs/square_s/fighter8.gif" height="180px" style="display: none;">
|
||
|
</div>
|
||
|
<div class="figure9 figures">
|
||
|
<img id="person9" class="people" src="imgs/square_s/person9.gif" height="100px">
|
||
|
<img id="fighter9" class="fighters" src="imgs/square_s/fighter9.gif" height="180px" style="display: none;">
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
<!--baloons-->
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<!--bottom text-->
|
||
|
<div class="text_container">
|
||
|
<div class="message1">
|
||
|
You are in the village square. You must inform the villagers of what is going on in the school: the kids need to be rescued from the evil staff. <br>
|
||
|
<span class="instructions">Click on the villagers to share with them your findings!</span>
|
||
|
</div>
|
||
|
<div class="message2" style="display: none;" >
|
||
|
It looks like you managed to reclute an impressive army: <button onclick="location.href='river_bank.html';"><span class="button_text"> Guide them to the river bank</span></button> and raise anchor to Spring River.
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<script src="jquery.min.js"></script>
|
||
|
<script>
|
||
|
|
||
|
// saves game step in the local storage
|
||
|
window.onload = function() {
|
||
|
window.localStorage.setItem("square_satanism","opened");
|
||
|
console.log ("square satanism:",localStorage.square_satanism);
|
||
|
$(".fighters").html("0");
|
||
|
}
|
||
|
|
||
|
//get player avatar from local storage
|
||
|
console.log (localStorage.myavatar)
|
||
|
var img = document.createElement("img");
|
||
|
img.src = localStorage.myavatar;
|
||
|
var player_img = document.querySelector("#player_img");
|
||
|
player_img.appendChild(img);
|
||
|
|
||
|
//change characters + invert
|
||
|
/* $().click (function(){
|
||
|
|
||
|
});*/
|
||
|
|
||
|
//warriors
|
||
|
|
||
|
var villagers = 0;
|
||
|
|
||
|
var duo = $(".moving_duo");
|
||
|
var avatar = $("#player_img");
|
||
|
var baloon = $(".bubble");
|
||
|
|
||
|
$(".figure1").click (function(){
|
||
|
villagers ++;
|
||
|
$(".fighters").html(villagers);
|
||
|
avatar.css({ top: "15%", left: "34%" });
|
||
|
baloon.css({ top: "5%", left: "38%" })
|
||
|
baloon.show();
|
||
|
setTimeout ( function (){
|
||
|
$("#person1").hide();
|
||
|
$("#fighter1").show();
|
||
|
baloon.hide();
|
||
|
}, 1000);
|
||
|
end_recluting();
|
||
|
});
|
||
|
|
||
|
$(".figure2").click (function(){
|
||
|
villagers ++;
|
||
|
$(".fighters").html(villagers);
|
||
|
avatar.css({ top: "12%", left: "57%" });
|
||
|
baloon.css({ top: "3%", left: "61%" })
|
||
|
baloon.show();
|
||
|
setTimeout ( function (){
|
||
|
$("#person2").hide();
|
||
|
$("#fighter2").show();
|
||
|
baloon.hide();
|
||
|
}, 1000);
|
||
|
end_recluting();
|
||
|
});
|
||
|
|
||
|
$(".figure3").click (function(){
|
||
|
villagers ++;
|
||
|
$(".fighters").html(villagers);
|
||
|
duo.css ("zIndex", 5);
|
||
|
avatar.css({ top: "26%", left: "84%"});
|
||
|
baloon.css({ top: "15%", left: "88%" })
|
||
|
baloon.show();
|
||
|
setTimeout ( function (){
|
||
|
$("#person3").hide();
|
||
|
$("#fighter3").show();
|
||
|
baloon.hide();
|
||
|
}, 1000);
|
||
|
end_recluting();
|
||
|
});
|
||
|
|
||
|
$(".figure4").click (function(){
|
||
|
villagers ++;
|
||
|
$(".fighters").html(villagers);
|
||
|
avatar.css({ top: "50%", left: "60%"});
|
||
|
baloon.css({ top: "41%", left: "64%" })
|
||
|
baloon.show();
|
||
|
setTimeout ( function (){
|
||
|
$("#person4").hide();
|
||
|
$("#fighter4").show();
|
||
|
baloon.hide();
|
||
|
}, 1000);
|
||
|
end_recluting();
|
||
|
});
|
||
|
|
||
|
$(".figure5").click (function(){
|
||
|
villagers ++;
|
||
|
$(".fighters").html(villagers);
|
||
|
duo.css ("zIndex", 5);
|
||
|
avatar.css({ top: "17%", left: "16%" });
|
||
|
baloon.css({ top: "8%", left: "20%" });
|
||
|
baloon.show();
|
||
|
setTimeout ( function (){
|
||
|
$("#person5").hide();
|
||
|
$("#fighter5").show();
|
||
|
baloon.hide();
|
||
|
}, 1000);
|
||
|
end_recluting();
|
||
|
});
|
||
|
|
||
|
$(".figure6").click (function(){
|
||
|
villagers ++;
|
||
|
$(".fighters").html(villagers);
|
||
|
duo.css({ top: "15%", left: "34%" });
|
||
|
baloon.show();
|
||
|
setTimeout ( function (){
|
||
|
$("#person6").hide();
|
||
|
$("#fighter6").show();
|
||
|
baloon.hide();
|
||
|
}, 2000);
|
||
|
end_recluting();
|
||
|
});
|
||
|
|
||
|
$(".figure7").click (function(){
|
||
|
villagers ++;
|
||
|
$(".fighters").html(villagers);
|
||
|
duo.css({ top: "15%", left: "34%" });
|
||
|
baloon.show();
|
||
|
setTimeout ( function (){
|
||
|
$("#person7").hide();
|
||
|
$("#fighter7").show();
|
||
|
baloon.hide();
|
||
|
}, 2000);
|
||
|
end_recluting();
|
||
|
});
|
||
|
|
||
|
$(".figure8").click (function(){
|
||
|
villagers ++;
|
||
|
$(".fighters").html(villagers);
|
||
|
duo.css({ top: "15%", left: "34%" });
|
||
|
baloon.show();
|
||
|
setTimeout ( function (){
|
||
|
$("#person8").hide();
|
||
|
$("#fighter8").show();
|
||
|
baloon.hide();
|
||
|
}, 2000);
|
||
|
end_recluting();
|
||
|
});
|
||
|
|
||
|
$(".figure9").click (function(){
|
||
|
villagers ++;
|
||
|
$(".fighters").html(villagers);
|
||
|
duo.css({ top: "15%", left: "34%" });
|
||
|
baloon.show();
|
||
|
setTimeout ( function (){
|
||
|
$("#person9").hide();
|
||
|
$("#fighter9").show();
|
||
|
baloon.hide();
|
||
|
}, 2000);
|
||
|
end_recluting();
|
||
|
});
|
||
|
|
||
|
|
||
|
function end_recluting(){
|
||
|
if (villagers == 9) {
|
||
|
$(".message1").hide();
|
||
|
$(".message2").show();
|
||
|
setTimeout ( function (){
|
||
|
figures.detach();
|
||
|
avatar.css({ top: "55%", left: "8%" })
|
||
|
}, 1000);
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
</script>
|
||
|
|
||
|
<script type="text/javascript" src="index.js" ></script>
|
||
|
|
||
|
|
||
|
</body>
|