Skip to content

Commit

Permalink
Merge pull request Progether#1 from Progether/master
Browse files Browse the repository at this point in the history
Update my repo with the new changes
  • Loading branch information
Dev-Osmium authored Jun 7, 2018
2 parents e207ff2 + 1dba958 commit 46526b2
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 38 deletions.
6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ json/locations.json
*.war
*.ear
build/jar/*.jar
dependency-reduced-pom.xml

# Directories #
bin/
Expand All @@ -22,10 +23,6 @@ bin/
.classpath
.idea

/nbproject/private/
/nbbuild/


# NetBeans specific #
nbproject/private/
build/
Expand All @@ -41,4 +38,3 @@ nb-configuration.xml

# Log files #
*.log
package.zip
72 changes: 40 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,34 @@

Description
-------------
JAdventure is a Java (text) based implementation of a
[Role Playing Game](http://en.wikipedia.org/wiki/Role-playing_game) (RPG) -
[Single Player](http://en.wikipedia.org/wiki/Role-playing_game#Single-player).
JAdventure is a Java (text) based implementation of a
[Role Playing Game](http://en.wikipedia.org/wiki/Role-playing_game) (RPG) -
[Single Player](http://en.wikipedia.org/wiki/Role-playing_game#Single-player).


Project Background
-------------
It was originally created as a project of the
It was originally created as a project of the
[progether subreddit](http://www.reddit.com/r/progether)
and worked on by Applzor, add7, geniuus, Malfunction, bdong\_, Qasaur, and
and worked on by Applzor, add7, geniuus, Malfunction, bdong\_, Qasaur, and
tamul. It was revived by Hawk554.

Project Status
-------------
**Under Construction** This project is in a alpha status. The player can walk
through the game, find items and fight with some _nice_ characters!
--------------
**Under Construction** This project is in a alpha status. The player can walk
through the game, find items and fight with some _nice_ characters!

Developers are Welcome
-------------
----------------------
Everyone is welcome to help with the creation of JAdventure!
The best way to find out more about the game and the ideas that are there, is

The best way to find out more about the game and the ideas that are there, is
to have a look at [Reddit - JAdventure](https://www.reddit.com/search?q=jadventure).

Or drop by at our [IRC channel reddit-progether](http://webchat.freenode.net/?channels=reddit-progether&uio=d4)

All documentation is avaiable from the [JAdventure wiki](https://github.com/progether/JAdventure/wiki)
and from the [JAdventure website](https://progether.github.io/JAdventure). These
All documentation is avaiable from the [JAdventure wiki](https://github.com/progether/JAdventure/wiki)
and from the [JAdventure website](https://progether.github.io/JAdventure). These
form the majority of the project's documentation and development guidelines.

### Contributors ###
Expand All @@ -55,9 +55,9 @@ Contributing
**commit merged yet. Don't make pull requests if you're not willing to merge**
**that code.**

Rather than opening a pull request, consider opening an issue to discuss the
problem you're fixing. Keep the work-in-progress updates to your fork, maybe
merging the updates to a separate branch in the main repo if there's enough
Rather than opening a pull request, consider opening an issue to discuss the
problem you're fixing. Keep the work-in-progress updates to your fork, maybe
merging the updates to a separate branch in the main repo if there's enough
there to warrant it.

1. Create an issue (optional)
Expand All @@ -69,17 +69,18 @@ there to warrant it.
git branch <branchName>
git checkout <branchName>
```
1. Make your changes
1. Push to your branch
```
git push origin <branchName>
```
1. Make a pull request between your branch and the progether master
Setting Up The Game For Development or Gameplay
-----------------
-----------------------------------------------
### Gameplay
1. Download the game from [here](https://github.com/Progether/JAdventure/releases)
Expand All @@ -88,13 +89,20 @@ Setting Up The Game For Development or Gameplay
### Run with Maven - Developers
1. Install [Maven](http://maven.apache.com)
2. Go into the game directory and run `mvn exec:java` to play the game or `mvn clean install` to download
all dependencies.
1. Go into the game directory and run
```
$ mvn test
$ mvn exec:java
```
to play the game.
Maven has other useful targets such as `mvn compile` to compile and
`mvn install` to install a copy of JAdventure and all its dependencies to the
local Maven repo on your machine.
Playing the Game
--------------
----------------
To start a new game:
Expand Down Expand Up @@ -141,36 +149,36 @@ To equip/unequip item:
ue <itemName>
To attack:
a <monster>
To look around:
la
To talk to a Non-player Character:
t <npc>
Coding Standard/Convention/Style
-------------------
To help make code more readable, understandable, and consistent, each
contributor should follow the set guidelines laid out below. If you disagree
with something or come across a style that has not been decided upon, make an
issue or a pull request respectively for discussion on the best style. The
standard will be decided based on either majority rule or official documentation
--------------------------------
To help make code more readable, understandable, and consistent, each
contributor should follow the set guidelines laid out below. If you disagree
with something or come across a style that has not been decided upon, make an
issue or a pull request respectively for discussion on the best style. The
standard will be decided based on either majority rule or official documentation
(i.e. oracle coding standard).
1. Spaces not tabs
1. Space width is 4
1. No beginning/trailing empty lines
1. Each file should start with an import statement if necessary single-spaced
1. After class declaration and between class methods, there should be a space.
1. Within methods, there should be no spaces unless to separate specific chunks
1. Within methods, there should be no spaces unless to separate specific chunks
of code (i.e not for if statements, return values, or loops)
1. Opening curly braces appear a space after the closing parentheses, not
1. Opening curly braces appear a space after the closing parentheses, not
directly after.
1. Closing curly braces appear on own line unless followed by an else etc.
1. Closing curly braces appear on own line unless followed by an else etc.
which will be a space after the curly brace.
1. Comments should have one space after "//"
1. Comments 4 lines or greater in length should be multi-line commented
3 changes: 2 additions & 1 deletion src/main/java/com/jadventure/game/Trading.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,11 @@ public void playerSell() {
if ("exit".equals(itemName) || "back".equals(itemName)) {
return;
}
int goldBefore = player.getGold();
Item item = tradeItem(player, npc, itemName);
if (item != null) {
if (item != itemRepo.getItem("empty")) {
QueueProvider.offer("You have sold a " + item.getName() + " for " + (int)((0.5+0.05*(player.getIntelligence()+player.getLuck()))*item.getProperties().get("value")) + " gold coins.");
QueueProvider.offer("You have sold a " + item.getName() + " for " + (player.getGold() - goldBefore) + " gold coins.");
QueueProvider.offer("You now have " + player.getGold() + " gold coins remaining.");
}
else {
Expand Down

0 comments on commit 46526b2

Please sign in to comment.