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 820e279e403764826316f795b76a717d8f071397..08580e21c7f01190191b9675e708d5d0fee3ce44 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 85c7dccb44f60ed7aaed8877683eb08751c4c19e..3ccf1e3704af9b967bdd033f82bcf1a8ca35f289 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 b0ed447fa8b1a33b520314ef5d2a5a60d67329bf..9914ff4f45b116750d50c40c486b4c5cbe80f9a1 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();
+       }
 }