Commit b5270363 authored by Kevin Whitaker's avatar Kevin Whitaker

Laid down the models/enums.

parent 9e3a796b
package com.eyecreate.miceandmystics.miceandmystics.model;
import io.realm.RealmObject;
public class Ability extends RealmObject {
private String abilityName;
public String getAbilityName() {
return abilityName;
}
public void setAbilityName(String abilityName) {
this.abilityName = abilityName;
}
}
package com.eyecreate.miceandmystics.miceandmystics.model;
import io.realm.RealmObject;
public class Achievement extends RealmObject {
private String achievementName;
public String getAchievementName() {
return achievementName;
}
public void setAchievementName(String achievementName) {
this.achievementName = achievementName;
}
}
package com.eyecreate.miceandmystics.miceandmystics.model;
import io.realm.RealmObject;
public class BackpackItem extends RealmObject {
//TODO:Look into seeing if it's worth hard coding these instead of manual entry.
private String itemName;
public String getItemName() {
return itemName;
}
public void setItemName(String itemName) {
this.itemName = itemName;
}
}
package com.eyecreate.miceandmystics.miceandmystics.model;
import io.realm.RealmList;
import io.realm.RealmObject;
public class Campaign extends RealmObject {
private RealmList<Character> currentCharacters;
private RealmList<Achievement> partyStoryAchievments;
public RealmList<Character> getCurrentCharacters() {
return currentCharacters;
}
public void setCurrentCharacters(RealmList<Character> currentCharacters) {
this.currentCharacters = currentCharacters;
}
public RealmList<Achievement> getPartyStoryAchievments() {
return partyStoryAchievments;
}
public void setPartyStoryAchievments(RealmList<Achievement> partyStoryAchievments) {
this.partyStoryAchievments = partyStoryAchievments;
}
}
package com.eyecreate.miceandmystics.miceandmystics.model;
import io.realm.RealmList;
import io.realm.RealmObject;
public class Character extends RealmObject {
private String characterName;
private RealmList<Ability> abilities;
private RealmList<BackpackItem> storedItems; //Not sure why I made this a list when rulebook says you can only have one xD
private Player controllingPlayer;
public String getCharacterName() {
return characterName;
}
public void setCharacterName(String characterName) {
this.characterName = characterName;
}
public RealmList<Ability> getAbilities() {
return abilities;
}
public void setAbilities(RealmList<Ability> abilities) {
this.abilities = abilities;
}
public RealmList<BackpackItem> getStoredItems() {
return storedItems;
}
public void setStoredItems(RealmList<BackpackItem> storedItems) {
this.storedItems = storedItems;
}
public Player getControllingPlayer() {
return controllingPlayer;
}
public void setControllingPlayer(Player controllingPlayer) {
this.controllingPlayer = controllingPlayer;
}
}
package com.eyecreate.miceandmystics.miceandmystics.model.Enums;
import java.util.Arrays;
public enum Abilities {
First_Aid("First Aid",new CharacterType[]{CharacterType.Mystic,CharacterType.Archer,CharacterType.Scamp,CharacterType.Leader,CharacterType.Healer,CharacterType.Tinkerer,CharacterType.Warrior}),
Chain_Lightning("Chain Lightning",new CharacterType[]{CharacterType.Mystic}),
Mystic_Blast("Mystic Blast",new CharacterType[]{CharacterType.Mystic}),
Major_Heal("Major Heal",new CharacterType[]{CharacterType.Healer}),
Feint("Feint",new CharacterType[]{CharacterType.Warrior}),
Battle_Squeak("Battle Squeak",new CharacterType[]{CharacterType.Warrior}),
Battle_Leader("Battle Leader",new CharacterType[]{CharacterType.Leader}),
Set_Trap("Set Trap",new CharacterType[]{CharacterType.Tinkerer}),
Fortify("Fortify",new CharacterType[]{CharacterType.Healer}),
Cure("Cure",new CharacterType[]{CharacterType.Healer}),
Knife_Strike("Knife Strike",new CharacterType[]{CharacterType.Scamp}),
Find("Find",new CharacterType[]{CharacterType.Scamp}),
Dodge("Dodge",new CharacterType[]{CharacterType.Scamp}),
Thundersqueak("Thundersqueak",new CharacterType[]{CharacterType.Warrior,CharacterType.Tinkerer,CharacterType.Healer}),
Backslash("Backslash",new CharacterType[]{CharacterType.Warrior}),
Mystic_Bolt("Mystic Bolt",new CharacterType[]{CharacterType.Mystic}),
Inspire("Inspire",new CharacterType[]{CharacterType.Leader}),
Keen_Eye("Keen Eye",new CharacterType[]{CharacterType.Scamp,CharacterType.Archer}),
Meeps("Meeps",new CharacterType[]{CharacterType.Maginos}),
Invisibility("Invisibility",new CharacterType[]{CharacterType.Mystic}),
Accurate_Shot("Accurate Shot",new CharacterType[]{CharacterType.Archer}),
Aimed_Shot("Aimed Shot",new CharacterType[]{CharacterType.Archer}),
Power_Shot("Power Shot",new CharacterType[]{CharacterType.Archer}),
Preemptive_Shot("Preemptive Shot",new CharacterType[]{CharacterType.Archer}),
Resolve("Resolve",new CharacterType[]{CharacterType.Warrior}),
Protect("Protect",new CharacterType[]{CharacterType.Warrior}),
Give_Order("Give Order",new CharacterType[]{CharacterType.Leader}),
Energy_Rush("Energy Rush",new CharacterType[]{CharacterType.Scamp});
private String displayName;
private CharacterType[] appliesTo;
Abilities(String displayName,CharacterType[] appliesTo) {
this.displayName = displayName;
this.appliesTo = appliesTo;
}
public boolean doesApply(CharacterType type) {
return Arrays.asList(appliesTo).contains(type);
}
public boolean doesApply(CharacterType[] types) {
for(CharacterType t: types) {
if(doesApply(t)) return true;
}
return false;
}
public String displayName() { return displayName; }
@Override public String toString() { return displayName; }
}
package com.eyecreate.miceandmystics.miceandmystics.model.Enums;
public enum Achievement {
Miz_Maggie("Miz Maggie"),
Vanestras_Brush("Vanestra's Brush"),
King("King"),
Cats_Horn_Claw("Cat's Horn Claw"),
Catnip("Catnip");
private String displayName;
Achievement(String displayName) {
this.displayName = displayName;
}
public String displayName() { return displayName; }
@Override public String toString() { return displayName; }
}
package com.eyecreate.miceandmystics.miceandmystics.model.Enums;
public enum CharacterNames {
Collin(new CharacterType[]{CharacterType.Warrior,CharacterType.Leader}),
Filch(new CharacterType[]{CharacterType.Scamp}),
Lily(new CharacterType[]{CharacterType.Archer}),
Maginos(new CharacterType[]{CharacterType.Mystic,CharacterType.Maginos}),
Nez(new CharacterType[]{CharacterType.Tinkerer,CharacterType.Warrior}),
Tilda(new CharacterType[]{CharacterType.Healer});
private CharacterType[] types;
CharacterNames(CharacterType[] types) {
this.types = types;
}
public CharacterType[] characterTypes() { return types; }
}
package com.eyecreate.miceandmystics.miceandmystics.model.Enums;
public enum CharacterType {
Warrior,
Leader,
Mystic,
Scamp,
Tinkerer,
Archer,
Healer,
Maginos
}
package com.eyecreate.miceandmystics.miceandmystics.model;
import io.realm.RealmObject;
public class Player extends RealmObject {
private String playerName;
public String getPlayerName() {
return playerName;
}
public void setPlayerName(String playerName) {
this.playerName = playerName;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment