()
| 31 | } |
| 32 | |
| 33 | private update(): void{ |
| 34 | // Erase everything |
| 35 | this.renderArea.resetAllButSize(); |
| 36 | |
| 37 | // Back to the village button |
| 38 | this.addBackToTheVillageButton(this.renderArea, "fifthHouseBackToTheVillageButton"); |
| 39 | |
| 40 | // Draw the house |
| 41 | this.renderArea.drawArray(Database.getAscii("places/village/fifthHouse"), 0, 3); |
| 42 | |
| 43 | // If we haven't defeated the rats yet |
| 44 | if(Saving.loadBool("cellarDone") == false){ |
| 45 | // If we have a weapon |
| 46 | if(this.getGame().getSelectedEqItems()["weapon"] != null){ |
| 47 | // Draw the speech |
| 48 | this.renderArea.drawSpeech(Database.getText("mapVillageFifthHouseWeaponSpeech"), 6, 44, 67, "fifthHouseSpeech", Database.getTranslatedText("mapVillageFifthHouseWeaponSpeech")); |
| 49 | |
| 50 | // Add the button |
| 51 | this.renderArea.addAsciiRealButton(Database.getText("mapVillageFifthHouseAgree"), 69, 8, "mapVillageFifthHouseAgreeButton", Database.getTranslatedText("mapVillageFifthHouseAgree"), true); |
| 52 | this.renderArea.addLinkCall(".mapVillageFifthHouseAgreeButton", new CallbackCollection(this.beginQuest.bind(this))); |
| 53 | } |
| 54 | // Else, we don't have a weapon yet |
| 55 | else{ |
| 56 | // Draw the speech |
| 57 | this.renderArea.drawSpeech(Database.getText("mapVillageFifthHouseNoWeaponSpeech"), 6, 44, 67, "fifthHouseSpeech", Database.getTranslatedText("mapVillageFifthHouseNoWeaponSpeech")); |
| 58 | } |
| 59 | } |
| 60 | // If we have defeated the rats |
| 61 | else{ |
| 62 | // Draw the speech |
| 63 | this.renderArea.drawSpeech(Database.getText("mapVillageFifthHouseCellarDone"), 6, 44, 82, "fifthHouseSpeech", Database.getTranslatedText("mapVillageFifthHouseCellarDone")); |
| 64 | |
| 65 | // Change the NPC mouth |
| 66 | this.renderArea.drawString("U", 52, 17); |
| 67 | } |
| 68 | } |
| 69 | } |
no test coverage detected