コード例 #1
0
ファイル: World.java プロジェクト: hh1990/SkypeCommandProject
                @Override
                public void performAction(Player player, String text) throws Exception {
                  if (TextAdventureCommand.rand.nextInt(2) == 1) {
                    int i = TextAdventureCommand.rand.nextInt(3) + 1;

                    player.print(player.name + " found " + i + " rock(s)!");

                    for (int g = 0; g < i; g++) player.items.add(new Item("Rock", "A small rock"));
                  } else {
                    player.print(player.name + " did not find any rocks.");
                  }
                }
コード例 #2
0
ファイル: World.java プロジェクト: hh1990/SkypeCommandProject
                @Override
                public void performAction(Player player, String text) throws Exception {
                  if (TextAdventureCommand.rand.nextInt(2) == 1) {
                    int i = TextAdventureCommand.rand.nextInt(3) + 1;

                    player.print(player.name + " found " + i + " twig(s)!");

                    for (int g = 0; g < i; g++)
                      player.items.add(new Item("Twig", "A small twig. Might be useful later"));
                  } else {
                    player.print(player.name + " did not find any twigs.");
                  }
                }
コード例 #3
0
ファイル: World.java プロジェクト: hh1990/SkypeCommandProject
 @Override
 public void performAction(Player player, String text) throws Exception {
   player.print(
       "You see large rocky hills. They do not seem climbable. The ground is littered with small rocks. ");
   // TODO Possible for enemies to appear when looking around
 }
コード例 #4
0
ファイル: World.java プロジェクト: hh1990/SkypeCommandProject
 @Override
 public void performAction(Player player, String text) throws Exception {
   player.print("You do not see anything special apart from snow and hills.");
   // TODO Possible for enemies to appear when looking around
 }
コード例 #5
0
ファイル: World.java プロジェクト: hh1990/SkypeCommandProject
 @Override
 public void performAction(Player player, String text) throws Exception {
   player.print(
       "You stop and look at the shore and watch the sea and the waves. You do not notice anything else.");
   // TODO Possible for enemies to appear when looking around
 }
コード例 #6
0
ファイル: World.java プロジェクト: hh1990/SkypeCommandProject
 @Override
 public void performAction(Player player, String text) throws Exception {
   player.print(player.name + " Tried climbing but fell and hurt themselves.");
   player.health -= 2;
 }
コード例 #7
0
ファイル: World.java プロジェクト: hh1990/SkypeCommandProject
 @Override
 public void performAction(Player player, String text) throws Exception {
   player.print(
       "You see a large forest with many trees surrounding the area. Twigs litter the ground. ");
   // TODO Possible for enemies to appear when looking around
 }
コード例 #8
0
ファイル: World.java プロジェクト: hh1990/SkypeCommandProject
 @Override
 public void performAction(Player player, String text) throws Exception {
   player.print("You see a large open plain with no specific features in sight.");
 }