Change door open conditions
authorMegaBrutal <code+git@megabrutal.com>
Thu, 20 Sep 2018 22:30:00 +0000 (00:30 +0200)
committerMegaBrutal <code+git@megabrutal.com>
Thu, 20 Sep 2018 22:30:00 +0000 (00:30 +0200)
modified:   tilemap.json
modified:   tilemap.tmx
modified:   wgj58.js

tilemap.json
tilemap.tmx
wgj58.js

index 820e279..08580e2 100644 (file)
                  "gid":62,
                  "height":64,
                  "id":24,
-                 "name":"saikidoor",
+                 "name":"peterdoor",
                  "properties":
                     {
                      "longpanel":false
                  "gid":62,
                  "height":64,
                  "id":25,
-                 "name":"saikidoor",
+                 "name":"peterdoor",
                  "properties":
                     {
                      "longpanel":false
                  "gid":62,
                  "height":64,
                  "id":27,
-                 "name":"peterdoor",
+                 "name":"biancadoor",
                  "properties":
                     {
                      "longpanel":true
                  "gid":62,
                  "height":64,
                  "id":28,
-                 "name":"peterdoor",
+                 "name":"biancadoor",
                  "properties":
                     {
                      "longpanel":true
index 85c7dcc..3ccf1e3 100644 (file)
     <property name="longpanel" type="bool" value="false"/>
    </properties>
   </object>
-  <object id="24" name="saikidoor" type="door" gid="62" x="832" y="1024" width="64" height="64">
+  <object id="24" name="peterdoor" type="door" gid="62" x="832" y="1024" width="64" height="64">
    <properties>
     <property name="longpanel" type="bool" value="false"/>
    </properties>
   </object>
-  <object id="25" name="saikidoor" type="door" gid="62" x="960" y="960" width="64" height="64" rotation="180">
+  <object id="25" name="peterdoor" type="door" gid="62" x="960" y="960" width="64" height="64" rotation="180">
    <properties>
     <property name="longpanel" type="bool" value="false"/>
    </properties>
   </object>
-  <object id="27" name="peterdoor" type="door" gid="62" x="1472" y="1792" width="64" height="64">
+  <object id="27" name="biancadoor" type="door" gid="62" x="1472" y="1792" width="64" height="64">
    <properties>
     <property name="longpanel" type="bool" value="true"/>
    </properties>
   </object>
-  <object id="28" name="peterdoor" type="door" gid="62" x="1600" y="1728" width="64" height="64" rotation="180">
+  <object id="28" name="biancadoor" type="door" gid="62" x="1600" y="1728" width="64" height="64" rotation="180">
    <properties>
     <property name="longpanel" type="bool" value="true"/>
    </properties>
index b0ed447..9914ff4 100644 (file)
--- a/wgj58.js
+++ b/wgj58.js
@@ -422,6 +422,7 @@ class NPC_Saiki extends GameNPC {
                                                { actor: logic.player, text: "Haha! I always get it, Saiki!" } ] ));
                                        logic.closeDoor("carlosdoor");
                                        logic.openDoor("saikidoor");
+                                       logic.openDoor("peterdoor");
                                        break;
                                case 1:
                                        logic.gameinterface.talk(new Dialogue( [ { actor: this, text: "Now that I think about it, there's still one thing. You could look into why the access control system is acting so funny today." },
@@ -509,6 +510,7 @@ class NPC_Saiki extends GameNPC {
        actionTake() {
                logic.closeDoor("carlosdoor");
                logic.openDoor("saikidoor");
+               logic.openDoor("peterdoor");
                logic.carlos.kill();
                return super.actionTake();
        }
@@ -527,9 +529,22 @@ class NPC_Saiki extends GameNPC {
 }
 
 class NPC_Peter extends GameNPC {
+       actionTake() {
+               logic.closeDoor("saikidoor");
+               logic.openDoor("peterdoor");
+               logic.openDoor("biancadoor");
+               return super.actionTake();
+       }
 }
 
 class NPC_Bianca extends GameNPC {
+       actionTake() {
+               // All doors open for you if you have all the cards.
+               logic.openDoor("cutedoor");
+               logic.openDoor("carlosdoor");
+               logic.openDoor("saikidoor");
+               return super.actionTake();
+       }
 }