summaryrefslogtreecommitdiff
path: root/orig/pq-web/cheat.js
diff options
context:
space:
mode:
Diffstat (limited to 'orig/pq-web/cheat.js')
-rw-r--r--orig/pq-web/cheat.js74
1 files changed, 74 insertions, 0 deletions
diff --git a/orig/pq-web/cheat.js b/orig/pq-web/cheat.js
new file mode 100644
index 0000000..96a3087
--- /dev/null
+++ b/orig/pq-web/cheat.js
@@ -0,0 +1,74 @@
+function Cheats() {
+ if ($(".cheater").length) return;
+
+ function cheat(label, effect) {
+ $("<button/>", {
+ "class": "cheater",
+ text: label,
+ click: effect}).appendTo('body');
+ }
+
+ cheat("Task", function () {
+ TaskBar.reposition(TaskBar.Max());
+ });
+
+ cheat("Level", function () {
+ LevelUp();
+ });
+
+ cheat("Quest", function () {
+ QuestBar.reposition(QuestBar.Max());
+ TaskBar.reposition(TaskBar.Max());
+ });
+
+ cheat("Plot", function () {
+ PlotBar.reposition(PlotBar.Max());
+ TaskBar.reposition(TaskBar.Max());
+ });
+
+
+ cheat("Pause", function () {
+ if (timerid) {
+ StopTimer();
+ } else {
+ StartTimer();
+ }
+ });
+
+ cheat("Break", function () {
+ debugger;
+ });
+ cheat("Equip", function () {
+ WinEquip();
+ });
+
+ cheat("Item", function () {
+ WinItem();
+ });
+
+ cheat("Clear items", function () {
+ while (Inventory.length() > 1)
+ Inventory.remove1();
+ });
+
+ cheat("Spell", function () {
+ WinSpell();
+ });
+
+ cheat("Stat", function () {
+ WinStat();
+ });
+
+ cheat("$$$", function () {
+ Add(Inventory,'Gold',Random(100));
+ });
+
+ cheat("Save", function () {
+ SaveGame();
+ alert(JSON.stringify(game).length);
+ });
+
+ cheat("Quit", quit);
+
+}
+