Skip to content

Commit

Permalink
Merge pull request #63 from aaravrawal52/master
Browse files Browse the repository at this point in the history
minor bug fixes in interact command
  • Loading branch information
aaravrawal52 committed Apr 3, 2024
2 parents 9379bcb + a2f5008 commit fa96b0c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/command/mapmove/InteractingCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,16 @@ public void execute() {
String entityInteractedWith = currentMap.handleInteract();
if (Objects.equals(entityInteractedWith, "no interaction")) {
textBox.setNextNarration("Nothing to interact with here");
} else if (Objects.equals(entityInteractedWith, "@")) {
} else if (Objects.equals(entityInteractedWith, "@") ||
Objects.equals(entityInteractedWith, "$") ||
Objects.equals(entityInteractedWith, "%") ||
Objects.equals(entityInteractedWith, "^") ||
Objects.equals(entityInteractedWith, "&")) {
textBox.setNextNarration(entityInteractedWith + " appears in your path. What will you do?");
textBox.setNextInstruction("Will you [fight] or will you [run]?");
}


char entity = entityInteractedWith.charAt(0);
BaseMap battleMap;
InteractableEntity monster;
Expand Down

0 comments on commit fa96b0c

Please sign in to comment.