commit
e7767d12dc
@ -0,0 +1,32 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<actions> |
||||
<action> |
||||
<actionName>run</actionName> |
||||
<packagings> |
||||
<packaging>jar</packaging> |
||||
</packagings> |
||||
<goals> |
||||
<goal>process-classes</goal> |
||||
<goal>org.codehaus.mojo:exec-maven-plugin:1.5.0:exec</goal> |
||||
</goals> |
||||
<properties> |
||||
<exec.args>-classpath %classpath moe.nekojimi.charactermaker.Main</exec.args> |
||||
<exec.executable>java</exec.executable> |
||||
</properties> |
||||
</action> |
||||
<action> |
||||
<actionName>debug</actionName> |
||||
<packagings> |
||||
<packaging>jar</packaging> |
||||
</packagings> |
||||
<goals> |
||||
<goal>process-classes</goal> |
||||
<goal>org.codehaus.mojo:exec-maven-plugin:1.5.0:exec</goal> |
||||
</goals> |
||||
<properties> |
||||
<exec.args>-agentlib:jdwp=transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath moe.nekojimi.charactermaker.Main</exec.args> |
||||
<exec.executable>java</exec.executable> |
||||
<jpda.listen>true</jpda.listen> |
||||
</properties> |
||||
</action> |
||||
</actions> |
@ -0,0 +1,20 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||
<modelVersion>4.0.0</modelVersion> |
||||
<groupId>moe.nekojimi</groupId> |
||||
<artifactId>CharacterMaker</artifactId> |
||||
<version>1.0</version> |
||||
<packaging>jar</packaging> |
||||
<dependencies> |
||||
<dependency> |
||||
<groupId>commons-beanutils</groupId> |
||||
<artifactId>commons-beanutils</artifactId> |
||||
<version>1.9.4</version> |
||||
</dependency> |
||||
</dependencies> |
||||
<properties> |
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
||||
<maven.compiler.source>11</maven.compiler.source> |
||||
<maven.compiler.target>11</maven.compiler.target> |
||||
</properties> |
||||
</project> |
@ -0,0 +1,130 @@ |
||||
/* |
||||
* To change this license header, choose License Headers in Project Properties. |
||||
* To change this template file, choose Tools | Templates |
||||
* and open the template in the editor. |
||||
*/ |
||||
package moe.nekojimi.charactermaker; |
||||
|
||||
import java.util.HashMap; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* |
||||
* @author jimj316 |
||||
*/ |
||||
public class Character |
||||
{ |
||||
/*private int cognition; |
||||
private int coordination; |
||||
private int intuition; |
||||
private int reflexes; |
||||
private int savvy; |
||||
private int somatics; |
||||
private int willpower;*/ |
||||
|
||||
private int cp = 1000; |
||||
private final Map<String,Integer> aptitudes = new HashMap<>(); |
||||
private final Map<String,Integer> skills = new HashMap<>(); |
||||
|
||||
/* |
||||
public int getCognition() |
||||
{ |
||||
return cognition; |
||||
} |
||||
|
||||
public void setCognition(int cognition) |
||||
{ |
||||
this.cognition = cognition; |
||||
} |
||||
|
||||
public int getCoordination() |
||||
{ |
||||
return coordination; |
||||
} |
||||
|
||||
public void setCoordination(int coordination) |
||||
{ |
||||
this.coordination = coordination; |
||||
} |
||||
|
||||
public int getIntuition() |
||||
{ |
||||
return intuition; |
||||
} |
||||
|
||||
public void setIntuition(int intuition) |
||||
{ |
||||
this.intuition = intuition; |
||||
} |
||||
|
||||
public int getReflexes() |
||||
{ |
||||
return reflexes; |
||||
} |
||||
|
||||
public void setReflexes(int reflexes) |
||||
{ |
||||
this.reflexes = reflexes; |
||||
} |
||||
|
||||
public int getSavvy() |
||||
{ |
||||
return savvy; |
||||
} |
||||
|
||||
public void setSavvy(int savvy) |
||||
{ |
||||
this.savvy = savvy; |
||||
} |
||||
|
||||
public int getSomatics() |
||||
{ |
||||
return somatics; |
||||
} |
||||
|
||||
public void setSomatics(int somatics) |
||||
{ |
||||
this.somatics = somatics; |
||||
} |
||||
|
||||
public int getWillpower() |
||||
{ |
||||
return willpower; |
||||
} |
||||
|
||||
public void setWillpower(int willpower) |
||||
{ |
||||
this.willpower = willpower; |
||||
} */ |
||||
|
||||
public int getAptitude(String name) |
||||
{ |
||||
return aptitudes.getOrDefault(name, 0); |
||||
} |
||||
|
||||
public void setAptitude(String name, int value) |
||||
{ |
||||
int oldValue = getAptitude(name); |
||||
if (oldValue > 0) |
||||
{ |
||||
int change = value - oldValue; |
||||
cp -= change/10; // 10CP = 1 aptitude
|
||||
} |
||||
aptitudes.put(name, value); |
||||
} |
||||
|
||||
public int getSkill(String name) |
||||
{ |
||||
return skills.getOrDefault(name, 0); |
||||
} |
||||
|
||||
public void setSkill(String name, int value) |
||||
{ |
||||
int oldValue = getSkill(name); |
||||
int change = value - oldValue; |
||||
cp -= change; |
||||
skills.put(name, value); |
||||
} |
||||
|
||||
|
||||
} |
@ -0,0 +1,49 @@ |
||||
/* |
||||
* To change this license header, choose License Headers in Project Properties. |
||||
* To change this template file, choose Tools | Templates |
||||
* and open the template in the editor. |
||||
*/ |
||||
package moe.nekojimi.charactermaker; |
||||
|
||||
import moe.nekojimi.charactermaker.steps.Step; |
||||
import java.util.Deque; |
||||
import java.util.LinkedList; |
||||
import moe.nekojimi.charactermaker.steps.AptTemplateStep; |
||||
import moe.nekojimi.charactermaker.steps.NativeToungeStep; |
||||
|
||||
/** |
||||
* |
||||
* @author jimj316 |
||||
*/ |
||||
public class Main |
||||
{ |
||||
|
||||
public static Character character; |
||||
|
||||
public static UI ui; |
||||
private static final Deque<Step> steps = new LinkedList<>(); |
||||
|
||||
/** |
||||
* @param args the command line arguments |
||||
*/ |
||||
public static void main(String[] args) |
||||
{ |
||||
ui = new UI(); |
||||
character = new Character(); |
||||
|
||||
steps.add(new AptTemplateStep()); |
||||
steps.add(new NativeToungeStep()); |
||||
|
||||
while (!steps.isEmpty()) |
||||
{ |
||||
Step nextStep = steps.pop(); |
||||
nextStep.run(); |
||||
} |
||||
} |
||||
|
||||
public static void addStepFirst(Step step) |
||||
{ |
||||
steps.addFirst(step); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,51 @@ |
||||
/* |
||||
* To change this license header, choose License Headers in Project Properties. |
||||
* To change this template file, choose Tools | Templates |
||||
* and open the template in the editor. |
||||
*/ |
||||
package moe.nekojimi.charactermaker; |
||||
|
||||
import java.util.*; |
||||
import java.util.Map.Entry; |
||||
|
||||
/** |
||||
* |
||||
* @author jimj316 |
||||
*/ |
||||
public final class RollTable<T> |
||||
{ |
||||
private final int roll; |
||||
private final SortedMap<Integer,T> entries = new TreeMap<>(); |
||||
|
||||
public RollTable(int roll) |
||||
{ |
||||
this.roll = roll; |
||||
} |
||||
|
||||
public RollTable(int roll, Entry<Integer,T>... entries) |
||||
{ |
||||
this(roll); |
||||
for (Entry<Integer,T> entry: entries) |
||||
{ |
||||
addEntry(entry.getKey(), entry.getValue()); |
||||
} |
||||
} |
||||
|
||||
public void addEntry(int minRoll, T value) |
||||
{ |
||||
entries.put(minRoll, value); |
||||
} |
||||
|
||||
public T roll() |
||||
{ |
||||
Random r = new Random(); |
||||
int d = r.nextInt(roll)+1; |
||||
for (Entry<Integer,T> e : entries.entrySet()) |
||||
{ |
||||
if (e.getKey() >= d) |
||||
return e.getValue(); |
||||
} |
||||
return null; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,109 @@ |
||||
/* |
||||
* To change this license header, choose License Headers in Project Properties. |
||||
* To change this template file, choose Tools | Templates |
||||
* and open the template in the editor. |
||||
*/ |
||||
package moe.nekojimi.charactermaker; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
import java.util.Scanner; |
||||
import java.util.stream.Collectors; |
||||
|
||||
/** |
||||
* |
||||
* @author jimj316 |
||||
*/ |
||||
public class UI |
||||
{ |
||||
public final Scanner SC = new Scanner(System.in); |
||||
|
||||
public String showPrompt(String text, String prompt) |
||||
{ |
||||
if (!text.isEmpty()) |
||||
System.err.println(text); |
||||
if (!prompt.isEmpty()) |
||||
{ |
||||
System.err.println(prompt); |
||||
System.err.flush(); |
||||
} |
||||
return SC.nextLine(); |
||||
} |
||||
|
||||
public int showNumberPrompt(String text, int min, int max) |
||||
{ |
||||
int ret = 0; |
||||
boolean done = false; |
||||
if (!text.isEmpty()) |
||||
System.err.println(text); |
||||
while (!done) |
||||
{ |
||||
String prompt = "Choose number [" + min + "~" + max + "]: "; |
||||
// String resp = showPrompt(text, prompt);
|
||||
try |
||||
{ |
||||
System.err.println(prompt); |
||||
System.err.flush(); |
||||
String resp = SC.nextLine(); |
||||
ret = Integer.parseInt(resp); |
||||
if (ret < min) |
||||
{ |
||||
System.err.println("That number is too low (less than " + min + ")"); |
||||
} |
||||
else if (ret > max) |
||||
{ |
||||
System.err.println("That number is too high (more than " + max + ")"); |
||||
} |
||||
else |
||||
{ |
||||
done = true; |
||||
} |
||||
} |
||||
catch (NumberFormatException ex) |
||||
{ |
||||
System.err.println("That's not a number."); |
||||
} |
||||
} |
||||
return ret; |
||||
} |
||||
|
||||
public <T> int showChoicePrompt(String text, List<T> choices) |
||||
{ |
||||
List<String> strings = choices.stream() |
||||
.map((x)->x.toString()) |
||||
.collect(Collectors.toList()); |
||||
text += "\n"; |
||||
if (strings.size() > 1) |
||||
{ |
||||
for (int i = 0; i < strings.size(); i++) |
||||
{ |
||||
text += (i+1) + ": " + strings.get(i) + "\n"; |
||||
} |
||||
int resp = showNumberPrompt(text, 1, strings.size()); |
||||
return resp-1; |
||||
} |
||||
else if (strings.size()==1) |
||||
{ |
||||
showPrompt(text, ""); |
||||
return 0; |
||||
} |
||||
else |
||||
return -1; |
||||
} |
||||
|
||||
public <T> T showRollPrompt(String text, RollTable<T> table, int rolls) |
||||
{ |
||||
List<T> strings = new ArrayList<>(); |
||||
for (int i = 0; i < rolls; i++) |
||||
{ |
||||
strings.add(table.roll()); |
||||
} |
||||
if (strings.size() > 0) |
||||
{ |
||||
int choice = showChoicePrompt(text, strings); |
||||
return strings.get(choice); |
||||
} |
||||
else |
||||
return strings.get(0); |
||||
} |
||||
} |
@ -0,0 +1,72 @@ |
||||
/* |
||||
* To change this license header, choose License Headers in Project Properties. |
||||
* To change this template file, choose Tools | Templates |
||||
* and open the template in the editor. |
||||
*/ |
||||
package moe.nekojimi.charactermaker.steps; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
import java.util.stream.Collectors; |
||||
import moe.nekojimi.charactermaker.Main; |
||||
|
||||
|
||||
public class AptTemplateStep extends Step |
||||
{ |
||||
Template[] templates = |
||||
{ |
||||
new Template("Brawler ",10,20,15,20,10,20,10), |
||||
new Template("Dilettante ",15,15,15,15,15,15,15), |
||||
new Template("Extrovert ",15,15,15,15,20,10,15), |
||||
new Template("Inquisitive ",20,10,20,10,20,10,15), |
||||
new Template("Researcher ",20,15,20,15,10,10,15), |
||||
new Template("Survivor ",10,15,15,15,10,20,20), |
||||
new Template("Techie ",20,15,10,15,15,15,15), |
||||
new Template("Thrill Seeker ",10,20,15,20,15,15,10), |
||||
}; |
||||
|
||||
@Override |
||||
public void run() |
||||
{ |
||||
int resp = Main.ui.showChoicePrompt("Choose aptitude template", List.of(templates).stream().map((t)->t.name).collect(Collectors.toList())); |
||||
List<ChangeValueStep> steps = templates[resp].getSteps(); |
||||
steps.stream().forEach((step)->Main.addStepFirst(step)); |
||||
} |
||||
|
||||
private class Template |
||||
{ |
||||
String name; |
||||
int cognition; |
||||
int coordination; |
||||
int intuition; |
||||
int reflexes; |
||||
int savvy; |
||||
int somatics; |
||||
int willpower; |
||||
|
||||
public Template(String name, int cognition, int coordination, int intuition, int reflexes, int savvy, int somatics, int willpower) |
||||
{ |
||||
this.name = name; |
||||
this.cognition = cognition; |
||||
this.coordination = coordination; |
||||
this.intuition = intuition; |
||||
this.reflexes = reflexes; |
||||
this.savvy = savvy; |
||||
this.somatics = somatics; |
||||
this.willpower = willpower; |
||||
} |
||||
|
||||
List<ChangeValueStep> getSteps() |
||||
{ |
||||
List<ChangeValueStep> ret = new ArrayList<>(); |
||||
ret.add(new ChangePropertyStep(cognition, "COG", "cognition")); |
||||
ret.add(new ChangePropertyStep(coordination, "COO", "coordination")); |
||||
ret.add(new ChangePropertyStep(intuition, "INT", "intuition")); |
||||
ret.add(new ChangePropertyStep(reflexes, "REF", "reflexes")); |
||||
ret.add(new ChangePropertyStep(savvy, "SAV", "savvy")); |
||||
ret.add(new ChangePropertyStep(somatics, "SOM", "somatics")); |
||||
ret.add(new ChangePropertyStep(willpower, "WIL", "willpower")); |
||||
return ret; |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,31 @@ |
||||
/* |
||||
* To change this license header, choose License Headers in Project Properties. |
||||
* To change this template file, choose Tools | Templates |
||||
* and open the template in the editor. |
||||
*/ |
||||
package moe.nekojimi.charactermaker.steps; |
||||
|
||||
import moe.nekojimi.charactermaker.Main; |
||||
|
||||
|
||||
public class ChangeAptitudeStep extends ChangeValueStep |
||||
{ |
||||
|
||||
public ChangeAptitudeStep(int change, String name) |
||||
{ |
||||
super(change, name); |
||||
} |
||||
|
||||
@Override |
||||
protected int read() |
||||
{ |
||||
return Main.character.getAptitude(name); |
||||
} |
||||
|
||||
@Override |
||||
protected void write(int val) |
||||
{ |
||||
Main.character.setAptitude(name, val); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,50 @@ |
||||
/* |
||||
* To change this license header, choose License Headers in Project Properties. |
||||
* To change this template file, choose Tools | Templates |
||||
* and open the template in the editor. |
||||
*/ |
||||
package moe.nekojimi.charactermaker.steps; |
||||
|
||||
import java.lang.reflect.InvocationTargetException; |
||||
import moe.nekojimi.charactermaker.Main; |
||||
import org.apache.commons.beanutils.PropertyUtils; |
||||
|
||||
|
||||
public class ChangePropertyStep extends ChangeValueStep |
||||
{ |
||||
|
||||
private final String propName; |
||||
|
||||
public ChangePropertyStep(int change, String name, String propName) |
||||
{ |
||||
super(change, name); |
||||
this.propName = propName; |
||||
} |
||||
|
||||
@Override |
||||
protected int read() |
||||
{ |
||||
try |
||||
{ |
||||
return (int) PropertyUtils.getSimpleProperty(Main.character, propName); |
||||
} catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException ex) |
||||
{ |
||||
// Logger.getLogger(ChangePropertyStep.class.getName()).log(Level.SEVERE, null, ex);
|
||||
throw new RuntimeException(ex); |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
protected void write(int val) |
||||
{ |
||||
try |
||||
{ |
||||
PropertyUtils.setSimpleProperty(Main.character, propName, val); |
||||
} catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException ex) |
||||
{ |
||||
// Logger.getLogger(ChangePropertyStep.class.getName()).log(Level.SEVERE, null, ex);
|
||||
throw new RuntimeException(ex); |
||||
} |
||||
} |
||||
|
||||
} |
@ -0,0 +1,31 @@ |
||||
/* |
||||
* To change this license header, choose License Headers in Project Properties. |
||||
* To change this template file, choose Tools | Templates |
||||
* and open the template in the editor. |
||||
*/ |
||||
package moe.nekojimi.charactermaker.steps; |
||||
|
||||
import moe.nekojimi.charactermaker.Main; |
||||
|
||||
|
||||
public class ChangeSkillStep extends ChangeValueStep |
||||
{ |
||||
|
||||
public ChangeSkillStep(int change, String name) |
||||
{ |
||||
super(change, name); |
||||
} |
||||
|
||||
@Override |
||||
protected int read() |
||||
{ |
||||
return Main.character.getSkill(name); |
||||
} |
||||
|
||||
@Override |
||||
protected void write(int val) |
||||
{ |
||||
Main.character.setSkill(name, val); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,44 @@ |
||||
/* |
||||
* To change this license header, choose License Headers in Project Properties. |
||||
* To change this template file, choose Tools | Templates |
||||
* and open the template in the editor. |
||||
*/ |
||||
package moe.nekojimi.charactermaker.steps; |
||||
|
||||
import moe.nekojimi.charactermaker.Main; |
||||
|
||||
/** |
||||
* |
||||
* @author jimj316 |
||||
*/ |
||||
public abstract class ChangeValueStep extends Step |
||||
{ |
||||
private final int change; |
||||
final String name; |
||||
|
||||
public ChangeValueStep(int change, String name) |
||||
{ |
||||
this.change = change; |
||||
this.name = name; |
||||
} |
||||
|
||||
@Override |
||||
public void run() |
||||
{ |
||||
int oldValue = read(); |
||||
int newValue = oldValue + change; |
||||
String changeString = " (" + oldValue + " -> " + newValue + ")"; |
||||
if (change > 0) |
||||
{ |
||||
Main.ui.showPrompt("+ You gain " + change + " " + name + changeString, ""); |
||||
} |
||||
else |
||||
{ |
||||
Main.ui.showPrompt("- You lose " + -change + " " + name + changeString, ""); |
||||
} |
||||
write(newValue); |
||||
} |
||||
|
||||
protected abstract int read(); |
||||
protected abstract void write(int val); |
||||
} |
@ -0,0 +1,206 @@ |
||||
/* |
||||
* To change this license header, choose License Headers in Project Properties. |
||||
* To change this template file, choose Tools | Templates |
||||
* and open the template in the editor. |
||||
*/ |
||||
package moe.nekojimi.charactermaker.steps; |
||||
|
||||
import java.util.HashMap; |
||||
import java.util.Map; |
||||
import moe.nekojimi.charactermaker.RollTable; |
||||
|
||||
|
||||
public class ChooseMorphStep extends Step |
||||
{ |
||||
|
||||
@Override |
||||
public void run() |
||||
{ |
||||
|
||||
} |
||||
|
||||
private static enum MorphType |
||||
{ |
||||
BIO("biomorph"), |
||||
UPLIFT("uplift biomorph"), |
||||
POD("pod biomorph"), |
||||
SYNTH("synthmorph"), |
||||
INFO("infomorph"); |
||||
|
||||
String name; |
||||
|
||||
private MorphType(String name) |
||||
{ |
||||
this.name = name; |
||||
} |
||||
|
||||
@Override |
||||
public String toString() |
||||
{ |
||||
return name; |
||||
} |
||||
} |
||||
|
||||
private static final RollTable<MorphType> typeTable = new RollTable<>(100); |
||||
static |
||||
{ |
||||
typeTable.addEntry(1, ChooseMorphStep.MorphType.BIO); |
||||
typeTable.addEntry(51, ChooseMorphStep.MorphType.UPLIFT); |
||||
typeTable.addEntry(56, ChooseMorphStep.MorphType.POD); |
||||
typeTable.addEntry(66, ChooseMorphStep.MorphType.SYNTH); |
||||
typeTable.addEntry(96, ChooseMorphStep.MorphType.UPLIFT); |
||||
} |
||||
|
||||
private static enum Morph |
||||
{ |
||||
FLAT (MorphType.BIO,1,"Flat","p. 139, EP",0), |
||||
SPLICER (MorphType.BIO,4,"Splicer","p. 139, EP",10), |
||||
EXALT (MorphType.BIO,14,"Exalt","p. 139, EP",30), |
||||
MENTON (MorphType.BIO,22,"Menton","p. 139, EP",40), |
||||
OLYMPIAN (MorphType.BIO,27,"Olympian","p. 140, EP",40), |
||||
SYLPH (MorphType.BIO,35,"Sylph","p. 140, EP",40), |
||||
BOUNCER (MorphType.BIO,40,"Bouncer","p. 140, EP",40), |
||||
FURY (MorphType.BIO,47,"Fury","p. 140, EP",75), |
||||
FUTURA (MorphType.BIO,50,"Futura","p. 140, EP",40), |
||||
GHOST (MorphType.BIO,51,"Ghost","p. 140, EP",70), |
||||
HIBERNOID (MorphType.BIO,54,"Hibernoid","p. 140, EP",25), |
||||
NEOTENIC (MorphType.BIO,57,"Neotenic","p. 141, EP",25), |
||||
REMADE (MorphType.BIO,60,"Remade","p. 141, EP",60), |
||||
RUSTER (MorphType.BIO,63,"Ruster","p. 141, EP",25), |
||||
LUNAR_FLYER (MorphType.BIO,70,"Lunar Flyer","p. 162, S",35), |
||||
MARTIAN_ALPINER (MorphType.BIO,71,"Martian Alpiner","p. 162, S",30), |
||||
SALAMANDER (MorphType.BIO,73,"Salamander","p. 163, S",40), |
||||
SURYA (MorphType.BIO,74,"Surya","p. 164, S",50), |
||||
VENUSIAN_GLIDER (MorphType.BIO,75,"Venusian Glider","p. 164, S",40), |
||||
HAZER (MorphType.BIO,76,"Hazer","p. 186, R",35), |
||||
HULDER (MorphType.BIO,78,"Hulder","p. 186, R",50), |
||||
HYPERBRIGHT (MorphType.BIO,79,"Hyperbright","p. 186, R",70), |
||||
RING_FLYER (MorphType.BIO,80,"Ring Flyer","p. 187, R",70), |
||||
SELKIE (MorphType.BIO,81,"Selkie","p. 187, R",55), |
||||
AQUANAUT (MorphType.BIO,82,"Aquanaut","p. 150, G",50), |
||||
CRASHER (MorphType.BIO,83,"Crasher","p. 150, G",70), |
||||
DVERGR (MorphType.BIO,86,"Dvergr","p. 150, G",50), |
||||
ARIEL (MorphType.BIO,87,"Ariel","p. 188",50), |
||||
BRUISER (MorphType.BIO,88,"Bruiser","p. 189",60), |
||||
CLOUD_SKATE (MorphType.BIO,90,"Cloud Skate","p. 189",55), |
||||
FAUST (MorphType.BIO,91,"Faust","p. 190",85), |
||||
FREEMAN (MorphType.BIO,92,"Freeman","p. 191",10), |
||||
GREY (MorphType.BIO,93,"Grey","p. 192",25), |
||||
NOMAD (MorphType.BIO,94,"Nomad","p. 194",30), |
||||
OBSERVER (MorphType.BIO,96,"Observer","p. 194",40), |
||||
THESEUS (MorphType.BIO,100,"Theseus","p. 196",30), |
||||
NEO_AVIAN (MorphType.UPLIFT,1,"Neo-Avian","p. 141, EP",25), |
||||
NEO_HOMINID (MorphType.UPLIFT,31,"Neo-Hominid*","p. 141, EP",25), |
||||
OCTOMORPH (MorphType.UPLIFT,51,"Octomorph","p. 141, EP",50), |
||||
NEANDERTHAL (MorphType.UPLIFT,71,"Neanderthal","p. 162, S",40), |
||||
NEO_BELUGA (MorphType.UPLIFT,76,"Neo-Beluga","p. 142, P",45), |
||||
NEO_DOLPHIN (MorphType.UPLIFT,77,"Neo-Dolphin","p. 143, P",40), |
||||
NEO_GORILLA (MorphType.UPLIFT,78,"Neo-Gorilla","p. 143, P",35), |
||||
NEO_ORCA (MorphType.UPLIFT,93,"Neo-Orca","p. 143, P",60), |
||||
NEO_PIG (MorphType.UPLIFT,94,"Neo-Pig","p. 143, P",20), |
||||
NEO_PORPOISE (MorphType.UPLIFT,99,"Neo-Porpoise","p. 143, P",35), |
||||
NEO_WHALE (MorphType.UPLIFT,100,"Neo-Whale","p. 143, P",75), |
||||
PLEASURE_POD (MorphType.POD,1,"Pleasure Pod","p. 142, EP",20), |
||||
WORKER_POD (MorphType.POD,16,"Worker Pod","p. 142, EP",20), |
||||
NOVACRAB (MorphType.POD,31,"Novacrab","p. 142, EP",60), |
||||
DIGGER (MorphType.POD,34,"Digger","p. 150, G",30), |
||||
RIPWING (MorphType.POD,36,"Ripwing","p. 151, G",40), |
||||
SCURRIER (MorphType.POD,39,"Scurrier","p. 151, G",40), |
||||
WHIPLASH (MorphType.POD,40,"Whiplash","p. 151, G",50), |
||||
CHICKCHARNIE (MorphType.POD,41,"Chickcharnie","p. 142, P",35), |
||||
HYPERGIBBON (MorphType.POD,43,"Hypergibbon","p. 142, P",30), |
||||
SHAPER (MorphType.POD,45,"Shaper","p. 144, P",45), |
||||
AYAH (MorphType.POD,47,"Ayah","p. 188",25), |
||||
BASIC_POD (MorphType.POD,54,"Basic Pod","p. 188",5), |
||||
CRITTER (MorphType.POD,63,"Critter","p. 190",15), |
||||
FLYING_SQUID (MorphType.POD,68,"Flying Squid","p. 191",55), |
||||
JENKIN (MorphType.POD,71,"Jenkin","p. 193",20), |
||||
SAMSA (MorphType.POD,73,"Samsa","p. 195",60), |
||||
SECURITY_POD (MorphType.POD,76,"Security Pod","p. 195",30), |
||||
SPACE_MARINE (MorphType.POD,84,"Space Marine","p. 195",30), |
||||
SPECIALIST_POD (MorphType.POD,87,"Specialist Pod","p. 196",25), |
||||
VACUUM_POD (MorphType.POD,96,"Vacuum Pod","p. 197",30), |
||||
CASE (MorphType.SYNTH,1,"Case","p. 143, EP",5), |
||||
SYNTH (MorphType.SYNTH,21,"Synth","p. 143, EP",30), |
||||
ARACHNOID (MorphType.SYNTH,36,"Arachnoid","p. 143, EP",45), |
||||
DRAGONFLY (MorphType.SYNTH,41,"Dragonfly","p. 144, EP",20), |
||||
FLEXBOT (MorphType.SYNTH,46,"Flexbot","p. 144, EP",20), // cost=20*
|
||||
REAPER (MorphType.SYNTH,50,"Reaper","p. 144, EP",100), |
||||
SLITHEROID (MorphType.SYNTH,51,"Slitheroid","p. 144, EP",40), |
||||
SWARMANOID (MorphType.SYNTH,55,"Swarmanoid","p. 144, EP",25), |
||||
Q_MORPH (MorphType.SYNTH,59,"Q Morph","p. 163, S",100), |
||||
STEEL_MORPH (MorphType.SYNTH,60,"Steel Morph","p. 163, S",50), |
||||
STEEL_MORPH_MASKED(MorphType.SYNTH,62,"Steel Morph (Masked)","p. 163, S",55), |
||||
STEEL_MORPH_LIQUID_SILVER(MorphType.SYNTH,63,"Steel Morph (Liquid Silver)","p. 163, S",70), |
||||
SUNDIVER (MorphType.SYNTH,64,"Sundiver","p. 164, S",70), |
||||
CETUS (MorphType.SYNTH,65,"Cetus","p. 185, R",45), |
||||
COURIER (MorphType.SYNTH,66,"Courier","p. 185, R",70), |
||||
FENRIR (MorphType.SYNTH,67,"Fenrir","p. 186, R",0), // cost=NA
|
||||
SAVANT (MorphType.SYNTH,68,"Savant","p. 187, R",65), |
||||
KITE (MorphType.SYNTH,69,"Kite","p. 150, G",30), |
||||
SPARE (MorphType.SYNTH,70,"Spare","p. 151, G",5), |
||||
XU_FU (MorphType.SYNTH,71,"Xu Fu","p. 151, G",60), |
||||
GARGOYLE (MorphType.SYNTH,73,"Gargoyle","p. 142, P",40), |
||||
SKULKER (MorphType.SYNTH,75,"Skulker","p. 144, P",35), |
||||
TAKKO (MorphType.SYNTH,76,"Takko","p. 144, P",60), |
||||
BIOCORE (MorphType.SYNTH,78,"Biocore","p. 188",50), |
||||
BLACKBIRD (MorphType.SYNTH,79,"Blackbird","p. 189",45), |
||||
CLOUD_SKIMMER (MorphType.SYNTH,81,"Cloud Skimmer","p. 189",65), |
||||
DAITYA (MorphType.SYNTH,82,"Daitya","p. 190",80), |
||||
FIGHTING_KITE (MorphType.SYNTH,83,"Fighting Kite","p. 190",35), |
||||
GALATEA (MorphType.SYNTH,84,"Galatea","p. 192",65), |
||||
GRIEFER (MorphType.SYNTH,86,"Griefer","p. 192",5), |
||||
GUARD (MorphType.SYNTH,87,"Guard","p. 192",60), |
||||
GUARD_DELUXE (MorphType.SYNTH,89,"Guard Deluxe","p. 193",75), |
||||
MIMIC (MorphType.SYNTH,90,"Mimic","p. 193",25), |
||||
NAUTILOID (MorphType.SYNTH,91,"Nautiloid","p. 193",155), |
||||
OPTERYX (MorphType.SYNTH,92,"Opteryx","p. 194",40), |
||||
ROVER (MorphType.SYNTH,94,"Rover","p. 194",60), |
||||
SPACE_FIGHTER_ROVER(MorphType.SYNTH,96,"Space Fighter Rover","p. 194",60), |
||||
SMART_SWARM (MorphType.SYNTH,97,"Smart Swarm","p. 196",30), |
||||
SPHERE (MorphType.SYNTH,98,"Sphere","p. 196",65), |
||||
SYNTHTAUR (MorphType.SYNTH,100,"Synthtaur","p. 196",70), |
||||
INFOMORPH (MorphType.INFO,1,"Infomorph","p. 145, EP",0), |
||||
AGENT (MorphType.INFO,51,"Agent","p. 142",35), |
||||
DIGIMORPH (MorphType.INFO,58,"Digimorph","p. 142",25), |
||||
ELITE (MorphType.INFO,71,"Elite","p. 142",35), |
||||
HOT_SHOT (MorphType.INFO,75,"Hot Shot","p. 142",35), |
||||
SAGE (MorphType.INFO,82,"Sage","p. 142",40), |
||||
SCHOLAR (MorphType.INFO,86,"Scholar","p. 142",35), |
||||
SLAVE (MorphType.INFO,93,"Slave","p. 142",5), |
||||
WIREHEAD (MorphType.INFO,94,"Wirehead","p. 142",60), |
||||
; |
||||
|
||||
private Morph(MorphType type, int rollMin, String name, String pageRef, int cpCost) |
||||
{ |
||||
this.type = type; |
||||
this.rollMin = rollMin; |
||||
this.name = name; |
||||
this.pageRef = pageRef; |
||||
this.cpCost = cpCost; |
||||
} |
||||
|
||||
MorphType type; |
||||
int rollMin; |
||||
String name; |
||||
String pageRef; |
||||
int cpCost; |
||||
|
||||
@Override |
||||
public String toString() |
||||
{ |
||||
return name; |
||||
} |
||||
} |
||||
|
||||
private static final Map<MorphType, RollTable<Morph>> morphs = new HashMap<>(); |
||||
static |
||||
{ |
||||
for (Morph morph: Morph.values()) |
||||
{ |
||||
if (!morphs.containsKey(morph.type)) |
||||
morphs.put(morph.type, new RollTable<>(100)); |
||||
morphs.get(morph.type).addEntry(morph.rollMin, morph); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,41 @@ |
||||
/* |
||||
* To change this license header, choose License Headers in Project Properties. |
||||
* To change this template file, choose Tools | Templates |
||||
* and open the template in the editor. |
||||
*/ |
||||
package moe.nekojimi.charactermaker.steps; |
||||
|
||||
import moe.nekojimi.charactermaker.Main; |
||||
import moe.nekojimi.charactermaker.RollTable; |
||||
|
||||
/** |
||||
* |
||||
* @author jimj316 |
||||
*/ |
||||
public class ChooseYouthPath extends Step |
||||
{ |
||||
private static final RollTable<Path> table = new RollTable<>(10); |
||||
static |
||||
{ |
||||
table.addEntry(1, Path.WHOLESOME); |
||||
table.addEntry(7, Path.SPLIT); |
||||
table.addEntry(10, Path.FRACTURED); |
||||
}; |
||||
|
||||
static enum Path |
||||
{ |
||||
WHOLESOME, |
||||
SPLIT, |
||||
FRACTURED; |
||||
} |
||||
@Override |
||||
public void run() |
||||
{ |
||||
Path path = Main.ui.showRollPrompt("Choose youth path", table, 1); |
||||
switch (path) |
||||
{ |
||||
case WHOLESOME: |
||||
|
||||
} |
||||
} |
||||
} |
@ -0,0 +1,53 @@ |
||||
/* |
||||
* To change this license header, choose License Headers in Project Properties. |
||||
* To change this template file, choose Tools | Templates |
||||
* and open the template in the editor. |
||||
*/ |
||||
package moe.nekojimi.charactermaker.steps; |
||||
|
||||
import java.util.AbstractMap; |
||||
import moe.nekojimi.charactermaker.Main; |
||||
import moe.nekojimi.charactermaker.RollTable; |
||||
|
||||
|
||||
public class NativeToungeStep extends Step |
||||
{ |
||||
private static final RollTable<String> table = new RollTable<>(100, |
||||
new AbstractMap.SimpleEntry<>(1,"Arabic "), |
||||
new AbstractMap.SimpleEntry<>(7,"Bengali "), |
||||
new AbstractMap.SimpleEntry<>(10,"Cantonese/Yue "), |
||||
new AbstractMap.SimpleEntry<>(15,"Dutch "), |
||||
new AbstractMap.SimpleEntry<>(16,"English "), |
||||
new AbstractMap.SimpleEntry<>(25,"Farsi/Persian "), |
||||
new AbstractMap.SimpleEntry<>(28,"French "), |
||||
new AbstractMap.SimpleEntry<>(32,"German "), |
||||
new AbstractMap.SimpleEntry<>(36,"Hindi "), |
||||
new AbstractMap.SimpleEntry<>(42,"Italian "), |
||||
new AbstractMap.SimpleEntry<>(43,"Japanese "), |
||||
new AbstractMap.SimpleEntry<>(48,"Javanese "), |
||||
new AbstractMap.SimpleEntry<>(52,"Korean "), |
||||
new AbstractMap.SimpleEntry<>(54,"Mandarin "), |
||||
new AbstractMap.SimpleEntry<>(63,"Polish "), |
||||
new AbstractMap.SimpleEntry<>(64,"Portuguese "), |
||||
new AbstractMap.SimpleEntry<>(69,"Punjabi "), |
||||
new AbstractMap.SimpleEntry<>(72,"Russian "), |
||||
new AbstractMap.SimpleEntry<>(77,"Skandinaviska "), |
||||
new AbstractMap.SimpleEntry<>(79,"Spanish "), |
||||
new AbstractMap.SimpleEntry<>(85,"Swedish "), |
||||
new AbstractMap.SimpleEntry<>(86,"Tamil "), |
||||
new AbstractMap.SimpleEntry<>(88,"Turkish "), |
||||
new AbstractMap.SimpleEntry<>(90,"Urdu "), |
||||
new AbstractMap.SimpleEntry<>(93,"Vietnwamese "), |
||||
new AbstractMap.SimpleEntry<>(95,"Wu "), |
||||
new AbstractMap.SimpleEntry<>(99,"Other ") |
||||
); |
||||
|
||||
@Override |
||||
public void run() |
||||
{ |
||||
String choice = Main.ui.showRollPrompt("Choose native tounge",table,3); |
||||
String skillName = ("Language: " + choice).trim(); |
||||
Main.addStepFirst(new ChangeSkillStep(70, skillName)); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,17 @@ |
||||
/* |
||||
* To change this license header, choose License Headers in Project Properties. |
||||
* To change this template file, choose Tools | Templates |
||||
* and open the template in the editor. |
||||
*/ |
||||
package moe.nekojimi.charactermaker.steps; |
||||
|
||||
/** |
||||
* |
||||
* @author jimj316 |
||||
*/ |
||||
public abstract class Step implements Runnable |
||||
{ |
||||
|
||||
@Override |
||||
public abstract void run(); |
||||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,5 @@ |
||||
#Generated by Maven |
||||
#Sun Sep 19 21:53:24 BST 2021 |
||||
groupId=moe.nekojimi |
||||
artifactId=CharacterMaker |
||||
version=1.0 |
@ -0,0 +1,4 @@ |
||||
moe/nekojimi/charactermaker/Character.class |
||||
moe/nekojimi/charactermaker/Step.class |
||||
moe/nekojimi/charactermaker/UI.class |
||||
moe/nekojimi/charactermaker/Main.class |
@ -0,0 +1,4 @@ |
||||
/home/jimj316/ownCloud/Programming/CharacterMaker/src/main/java/moe/nekojimi/charactermaker/Step.java |
||||
/home/jimj316/ownCloud/Programming/CharacterMaker/src/main/java/moe/nekojimi/charactermaker/Character.java |
||||
/home/jimj316/ownCloud/Programming/CharacterMaker/src/main/java/moe/nekojimi/charactermaker/Main.java |
||||
/home/jimj316/ownCloud/Programming/CharacterMaker/src/main/java/moe/nekojimi/charactermaker/UI.java |
Loading…
Reference in new issue