-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge for Saving Throws and Money (#6)
* Started to add the character class into the Game. * + Added references in game_references.xml for - Genders - Classes - Levels + Finalized Warrior Type Classes along with Base Classes + Created Barbarian Class + Created Util Class to provide helper functions and values + Removed CharClass + Renamed Core to Score to better explain usage. * Actually pushed the files * Started to add the character class into the Game. * + Added references in game_references.xml for - Genders - Classes - Levels + Finalized Warrior Type Classes along with Base Classes + Created Barbarian Class + Created Util Class to provide helper functions and values + Removed CharClass + Renamed Core to Score to better explain usage. * Actually pushed the files * + Changed the code to use AttributeScores rather than just raw Integers. + Created a basic form of Amazon + Swapped the ResId in Barbarian for the ResId defined in the Enum. * + Added Money enum + Added Money property to Character + Improved the functionality of Barbarian - Added LevelUp - Added LevelDown - Added property to track user choices of leveling up + Added Money strings to game_references.xml + Created Magician abstract class + Created mEffectiveLevel property in base class to ease the burden of leveling up and down. * + Changed Character class to PlayerCharacter * + Changed getCoreStatScore to getScore * + Modified LevelUp and LevelDown to restore the proper scores rather than calculated scores. ---WARNING--- Changes made in a sleepy state, they may not be implemented properly or effectively. * Removed the EffectiveLevel property from BaseClass Removed the updateLevel method Added an example of getting modifier to CharacterSheet * + Added methods for saving throws in PlayerCharacter.java +getAthleticProwess +getDangerEvasion +getMysticFortitude +getPhysicalVigor +getCharisma
- Loading branch information
Justin Smith
authored and
Thorin Schmidt
committed
Apr 16, 2017
1 parent
e715e18
commit 265a7a8
Showing
8 changed files
with
358 additions
and
89 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
MazesAndMinotaurs/app/src/main/java/com/example/cis/mazeminotaurs/character/Money.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.example.cis.mazeminotaurs.character; | ||
|
||
import com.example.cis.mazeminotaurs.R; | ||
|
||
/** | ||
* Created by jusmith on 4/5/17. | ||
*/ | ||
|
||
public enum Money { | ||
COPPER(R.string.copper), | ||
SILVER(R.string.silver), | ||
GOLD(R.string.gold); | ||
|
||
private int resId; | ||
|
||
Money(int resId) { | ||
setResId(resId); | ||
} | ||
|
||
public int getResId() { | ||
return resId; | ||
} | ||
|
||
public void setResId(int resId) { | ||
this.resId = resId; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 2 additions & 35 deletions
37
...ndMinotaurs/app/src/main/java/com/example/cis/mazeminotaurs/character/classes/Amazon.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,8 @@ | ||
package com.example.cis.mazeminotaurs.character.classes; | ||
|
||
import com.example.cis.mazeminotaurs.R; | ||
import com.example.cis.mazeminotaurs.character.PlayerCharacter; | ||
import com.example.cis.mazeminotaurs.character.Gender; | ||
import com.example.cis.mazeminotaurs.character.stats.Score; | ||
import com.example.cis.mazeminotaurs.util.Util; | ||
|
||
/** | ||
* Created by jusmith on 4/4/17. | ||
* Created by jusmith on 4/13/17. | ||
*/ | ||
|
||
public class Amazon extends Warrior{ | ||
public Amazon(PlayerCharacter playerCharacter) { | ||
Score[] primAttributes = {Score.SKILL, Score.GRACE}; | ||
|
||
int rolledGold = 0; | ||
for (int i = 0; i < 3; i++) { | ||
rolledGold += Util.roll(6); | ||
} | ||
|
||
setAddedHits(0); | ||
setBasicHits(12); | ||
setPlayerCharacter(playerCharacter); | ||
setExperience(0); | ||
setLevel(1); | ||
setPrimaryAttributes(primAttributes); | ||
setRequiredGender(Gender.FEMALE); | ||
setResId(Classes.AMAZON.getResId()); | ||
setStartGold(rolledGold); | ||
setWeaponOfChoice(R.string.bow); | ||
} | ||
|
||
public int getDeadlyShotBonus(){ | ||
return getPlayerCharacter().getCoreStatScore(Score.SKILL).getModifier(); | ||
} | ||
|
||
public int getBattleGraceBonus(){ | ||
return getPlayerCharacter().getCoreStatScore(Score.GRACE).getModifier(); | ||
} | ||
public class Amazon extends Warrior implements Level { | ||
} |
Oops, something went wrong.