Spruced up cheat buttons. Sorted out scrollers.

This commit is contained in:
Eric Fredricksen
2010-06-25 22:48:22 -07:00
parent 30f55290b0
commit 9060ccba84
3 changed files with 110 additions and 100 deletions
+72 -80
View File
@@ -1,7 +1,7 @@
<html>
<head>
<link rel="stylesheet" href="pq.css" type="text/css">
<title>Progress Qwest</title>
<title>Progress Quest</title>
</head>
<body>
@@ -16,10 +16,12 @@
<script src="config.js"></script>
<script src="main.js"></script>
<div class="hbox" flex="1">
<div class="vbox" flex="5">
<div class="hbox">
<div class="vbox">
<span class="label head" >Character Sheet</span>
<table class="listbox" rows="4" class="list">
<table class="listbox">
<thead>
<tr>
<th style="width:30%">Trait</th>
@@ -46,7 +48,7 @@
</tbody>
</table>
<div class="vbox" flex="4">
<div class="vbox">
<table class="listbox" id="Stats" rows="8">
<tr>
<th style="width:30%">Stat</th>
@@ -72,67 +74,55 @@
</div>
<span class="label head" >Spell Book</span>
<table class="listbox">
<thead>
<tr>
<th >Spell</th>
<th >Level</th>
</tr>
</thead>
<tbody id="Spells">
<tr><td>Black Idaho<td>LXI</tr>
<tr><td>&nbsp;<td></tr>
<tr><td>&nbsp;<td></tr>
<tr><td>&nbsp;<td></tr>
<tr><td>&nbsp;<td></tr>
<tr><td>&nbsp;<td></tr>
<tr><td>&nbsp;<td></tr>
<tr><td>&nbsp;<td></tr>
</tbody>
</table>
<div class="scroll listbox">
<table>
<thead>
<tr>
<th>Spell</th>
<th style="width:10ex">Level</th>
</tr>
</thead>
<tbody id="Spells">
<tr><td>Black Idaho<td>LXI</tr>
</tbody>
</table>
</div>
</div>
<div class="vbox" flex="1">
<span class="label head" >Equipment</span>
<table class="listbox" rows="11">
<div class="vbox">
<span class="label head">Equipment</span>
<table class="listbox">
<tbody id="Equips">
<tr><td >Weapon</td><td >Sharpened Stick</td></tr>
<tr><td >Shield</td><td></tr>
<tr><td >Helm<td></tr>
<tr><td >Hauberk<td></tr>
<tr><td >Brassairts<td></tr>
<tr><td >Vambraces<td></tr>
<tr><td >Gauntlets<td></tr>
<tr><td >Gambeson<td></tr>
<tr><td >Cuisses<td></tr>
<tr><td >Greaves<td></tr>
<tr><td >Sollerets<td></tr>
<tr><td style="width:12ex">Weapon</td><td>Sharpened Stick</td></tr>
<tr><td>Shield</td><td></tr>
<tr><td>Helm<td></tr>
<tr><td>Hauberk<td></tr>
<tr><td>Brassairts<td></tr>
<tr><td>Vambraces<td></td></tr>
<tr><td>Gauntlets<td></tr>
<tr><td>Gambeson<td></tr>
<tr><td>Cuisses<td></tr>
<tr><td>Greaves<td></tr>
<tr><td>Sollerets<td></tr>
</tbody>
</table>
<span class="label head" >Inventory</span>
<table class="listbox">
<thead>
<tr>
<th >Item</th>
<th >Qty</th>
</tr>
</thead>
<tbody id="Inventory">
<tr><td>Cruzle brass<td>15</tr>
<tr><td>&nbsp;<td></tr>
<tr><td>&nbsp;<td></tr>
<tr><td>&nbsp;<td></tr>
<tr><td>&nbsp;<td></tr>
<tr><td>&nbsp;<td></tr>
<tr><td>&nbsp;<td></tr>
<tr><td>&nbsp;<td></tr>
<tr><td>&nbsp;<td></tr>
<tr><td>&nbsp;<td></tr>
<tr><td>&nbsp;<td></tr>
<tr><td>&nbsp;<td></tr>
</tbody>
</table>
<div class="scroll listbox">
<table >
<thead>
<tr>
<th >Item</th>
<th style="width:6ex">Qty</th>
</tr>
</thead>
<tbody id="Inventory">
<tr><td>Gold<td>0</tr>
<tr><td>Cruzle brass<td>15</tr>
</tbody>
</table>
</div>
<span class="label" >Encumbrance</span>
<div class="progress-container" id="EncumBar">
@@ -141,7 +131,7 @@
</div>
<div class="vbox" flex="4">
<div class="vbox">
<span class="label head" >Plot Development</span>
<div class="scroll listbox">
@@ -156,26 +146,28 @@
</div>
<span class="label head" >Quests</span>
<table class="listbox">
<tbody id="Quests">
<tr>
<td><input type=checkbox checked="true"> Kill all the Bads
</tr>
<tr><td> &#9745; Kill all the Bads</tr>
<tr><td> &#9746; Kill all the Bads</tr>
<tr><td> &#9744; Kill all the Bads</tr>
<tr><td> &#x2713; Kill all the Bads</tr>
<tr><td> &#x2714; Kill all the Bads</tr>
<tr><td> <s>Kill all the Bads</s></tr>
<tr><td>&nbsp;</tr>
<tr><td>&nbsp;</tr>
<tr><td>&nbsp;</tr>
<tr><td>&nbsp;</tr>
<tr><td>&nbsp;</tr>
<tr><td>&nbsp;</tr>
<tr><td>&nbsp;</tr>
</tbody>
</table>
<div class="scroll listbox">
<table>
<tbody id="Quests">
<tr>
<td><input type=checkbox checked="true"> Kill all the Bads
</tr>
<tr><td> &#9745; Kill all the Bads</tr>
<tr><td> &#9746; Kill all the Bads</tr>
<tr><td> &#9744; Kill all the Bads</tr>
<tr><td> &#x2713; Kill all the Bads</tr>
<tr><td> &#x2714; Kill all the Bads</tr>
<tr><td> <s>Kill all the Bads</s></tr>
<tr><td>&nbsp;</tr>
<tr><td>&nbsp;</tr>
<tr><td>&nbsp;</tr>
<tr><td>&nbsp;</tr>
<tr><td>&nbsp;</tr>
<tr><td>&nbsp;</tr>
<tr><td>&nbsp;</tr>
</tbody>
</table>
</div>
<div class="progress-container" id="QuestBar">
<div class="bar" style="width: 50%"></div>
+32 -17
View File
@@ -525,12 +525,15 @@ function GoButtonClick() {
PlotBar.reset(26);
Plots.Add('Prologue');
Put(Inventory, "Gold", 0);
Put(Equips, "Hauberk", "-3 Burlap");
StartTimer();
SaveGame();
Brag('s');
AddR(Spells, "Lasers", 3);
alert("DEBUG " + GetI(Stats, 3));
//AddR(Spells, "Lasers", 3);
//alert("DEBUG " + GetI(Stats, 3));
}
@@ -566,7 +569,7 @@ function Abs(x) {
}
function WinEquip() {
var posn = Random(Equips.box.find("tr").length);
var posn = Random(Equips.length());
game.bestequip = posn; // remember as the "best item"
if (posn == 0) {
stuff = K.Weapons;
@@ -575,12 +578,9 @@ function WinEquip() {
} else {
better = K.DefenseAttrib;
worse = K.DefenseBad;
if (posn == 1)
stuff = K.Shields
else
stuff = K.Armors;
stuff = (posn == 1) ? K.Shields: K.Armors;
}
var name = LPick(stuff,GetI(Traits,'Level'));
var name = LPick(stuff, GetI(Traits,'Level'));
var qual = StrToInt(Split(name,1));
name = Split(name,0);
var plus = GetI(Traits,'Level') - qual;
@@ -762,7 +762,6 @@ function toArabic(s) {
}
function CompleteAct() {
PlotBar.reposition(0);
Plots.last().wrap("<s/>");
PlotBar.reset(60 * 60 * (1 + 5 * Plots.length())); // 1 hr + 5/act
PlotBar.Hint = 'Cutscene omitted';
@@ -1103,14 +1102,6 @@ $(function() {
LevelUp();
});
cheat("$$$", function () {
WinEquip();
WinItem();
WinSpell();
WinStat();
Add(Inventory,'Gold',Random(100));
});
cheat("Quest", function () {
QuestBar.reposition(QuestBar.Max);
TaskBar.reposition(TaskBar.Max);
@@ -1130,6 +1121,30 @@ $(function() {
}
});
cheat("Equip", function () {
WinEquip();
});
cheat("Item", function () {
WinItem();
});
cheat("Spell", function () {
WinSpell();
});
cheat("Stat", function () {
WinStat();
});
cheat("$$$", function () {
Add(Inventory,'Gold',Random(100));
});
cheat("ad hoc", function () {
Put(Equips, "Vambraces", "Holy shittles");
});
});
/*$ENDIF*/
+6 -3
View File
@@ -101,6 +101,7 @@ fieldset table td {
.head {
font-weight: bold;
font-size: 9pt;
margin: 2px 0 2px 0;
}
div.progress-container {
@@ -131,7 +132,7 @@ div.progress-container > div.bar {
.window {
background-color: #eee;
width: 800px;
width: 820px;
border: outset 2px silver;
padding: 2px;
margin: 1em;
@@ -142,9 +143,10 @@ div.progress-container > div.bar {
}
div.scroll {
overflow: auto;
overflow: scroll;
height: 100px;
width: 250px;
overflow-x: hidden;
}
div.scroll > table {
@@ -153,4 +155,5 @@ div.scroll > table {
.selected {
background-color: yellow;
}
}