forked from anathema/anathema_legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Checking in Spirit, God-Blood, Ghost WIP.
- Loading branch information
Showing
64 changed files
with
1,705 additions
and
0 deletions.
There are no files selected for viewing
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,9 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | ||
<classpathentry kind="src" path="resources"/> | ||
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/Character_Library"/> | ||
<classpathentry combineaccessrules="false" kind="src" path="/Character_Main"/> | ||
<classpathentry kind="output" path="build/classes"/> | ||
</classpath> |
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,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>Character_Ghost</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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,4 @@ | ||
CharacterGenerator.NewCharacter.Ghost.Name=Ghost | ||
CharacterGenerator.Templates.Ghost.TemplateType.Default=Ghost | ||
|
||
Ghost=Ghost |
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,14 @@ | ||
<!DOCTYPE plugin-fragment PUBLIC "-//JPF//Java Plug-in Manifest 0.6" "http://jpf.sourceforge.net/plugin_0_6.dtd"> | ||
<plugin-fragment id="net.sf.anathema.character.ghost" version="1.03" plugin-id="net.sf.anathema.character" plugin-version="1.03"> | ||
<runtime> | ||
<library id="ghost" path="./" type="code"> | ||
<export prefix="*"/> | ||
</library> | ||
<library id="ghostresources" path="./" type="resources"> | ||
<export prefix="*"/> | ||
</library> | ||
</runtime> | ||
<extension plugin-id="net.sf.anathema.core" point-id="AnathemaResources" id="GhostResources"> | ||
<parameter id="bundle" value="Ghost"/> | ||
</extension> | ||
</plugin-fragment> |
51 changes: 51 additions & 0 deletions
51
Character_Ghost/src/net/sf/anathema/character/ghost/GhostCharacterModule.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,51 @@ | ||
package net.sf.anathema.character.ghost; | ||
|
||
import net.sf.anathema.character.generic.framework.ICharacterGenerics; | ||
import net.sf.anathema.character.generic.framework.magic.FirstExcellency; | ||
import net.sf.anathema.character.generic.framework.magic.SecondExcellency; | ||
import net.sf.anathema.character.generic.framework.magic.ThirdExcellency; | ||
import net.sf.anathema.character.generic.framework.module.NullObjectCharacterModuleAdapter; | ||
import net.sf.anathema.character.generic.impl.rules.ExaltedEdition; | ||
import net.sf.anathema.character.generic.impl.rules.ExaltedSourceBook; | ||
import net.sf.anathema.character.generic.impl.traits.EssenceTemplate; | ||
import net.sf.anathema.character.generic.magic.IMagicStats; | ||
import net.sf.anathema.character.generic.type.CharacterType; | ||
import net.sf.anathema.character.ghost.generic.DivineSubordination; | ||
import net.sf.anathema.character.ghost.generic.InfiniteMastery; | ||
import net.sf.anathema.character.ghost.reporting.SecondEditionSpiritPartEncoder; | ||
import net.sf.anathema.character.reporting.CharacterReportingModule; | ||
import net.sf.anathema.character.reporting.CharacterReportingModuleObject; | ||
import net.sf.anathema.character.reporting.sheet.PdfEncodingRegistry; | ||
import net.sf.anathema.character.reporting.sheet.page.IPdfPartEncoder; | ||
import net.sf.anathema.lib.resources.IResources; | ||
|
||
public class GhostCharacterModule extends NullObjectCharacterModuleAdapter { | ||
|
||
private static final int ESSENCE_MAX = EssenceTemplate.SYSTEM_ESSENCE_MAX; | ||
|
||
@Override | ||
public void registerCommonData(ICharacterGenerics characterGenerics) | ||
{ | ||
/*characterGenerics.getGenericCharmStatsRegistry().register( | ||
CharacterType.SPIRIT, | ||
new IMagicStats[] { new FirstExcellency(CharacterType.SPIRIT, ExaltedSourceBook.SecondEdition, "1 m per die"), //$NON-NLS-1$ | ||
new SecondExcellency(CharacterType.SPIRIT, ExaltedSourceBook.SecondEdition), | ||
new ThirdExcellency(CharacterType.SPIRIT, "4 m", ExaltedSourceBook.SecondEdition), //$NON-NLS-1$ | ||
new InfiniteMastery(), | ||
new DivineSubordination()});*/ | ||
} | ||
|
||
@Override | ||
public void addCharacterTemplates(ICharacterGenerics characterGenerics) { | ||
registerParsedTemplate(characterGenerics, "template/Ghost2nd.template"); //$NON-NLS-1$ | ||
} | ||
|
||
@Override | ||
public void addReportTemplates(ICharacterGenerics generics, IResources resources) { | ||
/*CharacterReportingModuleObject moduleObject = generics.getModuleObjectMap().getModuleObject( | ||
CharacterReportingModule.class); | ||
PdfEncodingRegistry registry = moduleObject.getPdfEncodingRegistry(); | ||
IPdfPartEncoder secondEditionEncoder = new SecondEditionSpiritPartEncoder(resources, registry, ESSENCE_MAX); | ||
registry.setPartEncoder(CharacterType.SPIRIT, ExaltedEdition.SecondEdition, secondEditionEncoder);*/ | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
Character_Ghost/src/net/sf/anathema/character/ghost/generic/DivineSubordination.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,46 @@ | ||
|
||
|
||
package net.sf.anathema.character.ghost.generic; | ||
|
||
import net.sf.anathema.character.generic.framework.magic.AbstractGenericCharm; | ||
import net.sf.anathema.character.generic.framework.magic.stringbuilder.type.ShortCharmTypeStringBuilder; | ||
import net.sf.anathema.character.generic.impl.magic.charm.type.CharmTypeModel; | ||
import net.sf.anathema.character.generic.impl.rules.ExaltedSourceBook; | ||
import net.sf.anathema.character.generic.magic.charms.duration.SimpleDuration; | ||
import net.sf.anathema.character.generic.magic.charms.type.CharmType; | ||
import net.sf.anathema.lib.resources.IResources; | ||
|
||
public class DivineSubordination extends AbstractGenericCharm{ | ||
|
||
@Override | ||
protected String getId() { | ||
return "Spirit.DivineSubordination"; | ||
} | ||
|
||
@Override | ||
protected ExaltedSourceBook getSourceBook() { | ||
return ExaltedSourceBook.RollsOfGloriousDivinityOne; | ||
} | ||
|
||
@Override | ||
protected boolean isComboOk() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public String getCostString(IResources resources) { | ||
return "5m, 1wp"; | ||
} | ||
|
||
@Override | ||
public String getDurationString(IResources resources) { | ||
return SimpleDuration.INSTANT_DURATION.getText(resources); | ||
} | ||
|
||
@Override | ||
public String getType(IResources resources) { | ||
CharmTypeModel model = new CharmTypeModel(); | ||
model.setCharmType(CharmType.Permanent); | ||
return new ShortCharmTypeStringBuilder(resources).createTypeString(model); | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
Character_Ghost/src/net/sf/anathema/character/ghost/generic/InfiniteMastery.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,41 @@ | ||
package net.sf.anathema.character.ghost.generic; | ||
|
||
import net.sf.anathema.character.generic.framework.magic.AbstractGenericCharm; | ||
import net.sf.anathema.character.generic.framework.magic.stringbuilder.type.ShortCharmTypeStringBuilder; | ||
import net.sf.anathema.character.generic.impl.magic.charm.type.CharmTypeModel; | ||
import net.sf.anathema.character.generic.impl.rules.ExaltedSourceBook; | ||
import net.sf.anathema.character.generic.magic.charms.duration.QualifiedAmountDuration; | ||
import net.sf.anathema.character.generic.magic.charms.type.CharmType; | ||
import net.sf.anathema.lib.resources.IResources; | ||
|
||
public class InfiniteMastery extends AbstractGenericCharm { | ||
|
||
@Override | ||
protected String getId() { | ||
return "Solar.InfiniteMastery"; //$NON-NLS-1$ | ||
} | ||
|
||
@Override | ||
protected ExaltedSourceBook getSourceBook() { | ||
return ExaltedSourceBook.SecondEdition; | ||
} | ||
|
||
@Override | ||
protected boolean isComboOk() { | ||
return false; | ||
} | ||
|
||
public String getCostString(IResources resources) { | ||
return "2 m+, 1 wp"; | ||
} | ||
|
||
public String getDurationString(IResources resources) { | ||
return new QualifiedAmountDuration("1", "scene").getText(resources); //$NON-NLS-1$ //$NON-NLS-2$ | ||
} | ||
|
||
public String getType(IResources resources) { | ||
CharmTypeModel model = new CharmTypeModel(); | ||
model.setCharmType(CharmType.Simple); | ||
return new ShortCharmTypeStringBuilder(resources).createTypeString(model); | ||
} | ||
} |
91 changes: 91 additions & 0 deletions
91
Character_Ghost/src/net/sf/anathema/character/ghost/reporting/PdfSolarVirtueFlawEncoder.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,91 @@ | ||
package net.sf.anathema.character.ghost.reporting; | ||
|
||
import net.disy.commons.core.util.StringUtilities; | ||
import net.sf.anathema.character.generic.character.IGenericCharacter; | ||
import net.sf.anathema.character.reporting.sheet.common.IPdfContentBoxEncoder; | ||
import net.sf.anathema.character.reporting.sheet.elements.Line; | ||
import net.sf.anathema.character.reporting.sheet.pageformat.IVoidStateFormatConstants; | ||
import net.sf.anathema.character.reporting.sheet.util.PdfTextEncodingUtilities; | ||
import net.sf.anathema.character.reporting.sheet.util.TableEncodingUtilities; | ||
import net.sf.anathema.character.reporting.sheet.util.VirtueFlawBoxEncoder; | ||
import net.sf.anathema.character.reporting.util.Bounds; | ||
import net.sf.anathema.character.reporting.util.Position; | ||
|
||
import com.lowagie.text.Chunk; | ||
import com.lowagie.text.DocumentException; | ||
import com.lowagie.text.Font; | ||
import com.lowagie.text.Phrase; | ||
import com.lowagie.text.pdf.BaseFont; | ||
import com.lowagie.text.pdf.ColumnText; | ||
import com.lowagie.text.pdf.PdfContentByte; | ||
|
||
public class PdfSolarVirtueFlawEncoder implements IPdfContentBoxEncoder { | ||
|
||
private final VirtueFlawBoxEncoder traitEncoder; | ||
private final Font nameFont; | ||
private final Font font; | ||
|
||
public PdfSolarVirtueFlawEncoder(BaseFont baseFont) { | ||
this.font = createFont(baseFont); | ||
this.nameFont = createNameFont(baseFont); | ||
this.traitEncoder = new VirtueFlawBoxEncoder(baseFont); | ||
} | ||
|
||
public String getHeaderKey() { | ||
return "GreatCurse.Solar"; //$NON-NLS-1$ | ||
} | ||
|
||
public void encode(PdfContentByte directContent, IGenericCharacter character, Bounds bounds) throws DocumentException { | ||
/* Bounds textBounds = traitEncoder.encode(directContent, bounds); | ||
int leading = IVoidStateFormatConstants.LINE_HEIGHT - 2; | ||
ISolarVirtueFlaw virtueFlaw = ((ISolarVirtueFlawModel) character.getAdditionalModel(SolarVirtueFlawTemplate.ID)).getVirtueFlaw(); | ||
String name = virtueFlaw.getName().getText(); | ||
String condition = virtueFlaw.getLimitBreak().getText(); | ||
boolean nameDefined = !StringUtilities.isNullOrTrimEmpty(name); | ||
boolean conditionDefined = !StringUtilities.isNullOrEmpty(condition); | ||
if (!nameDefined && !conditionDefined) { | ||
encodeLines(directContent, bounds, leading, textBounds.getMaxY()); | ||
} | ||
if (nameDefined && conditionDefined) { | ||
Phrase phrase = new Phrase(); | ||
phrase.add(new Chunk(name, nameFont)); | ||
phrase.add(new Chunk(": ", nameFont)); //$NON-NLS-1$ | ||
phrase.add(new Chunk(condition, font)); | ||
PdfTextEncodingUtilities.encodeText(directContent, phrase, textBounds, leading); | ||
} | ||
if (nameDefined && !conditionDefined) { | ||
Phrase phrase = new Phrase(); | ||
phrase.add(new Chunk(name, nameFont)); | ||
ColumnText columnText = PdfTextEncodingUtilities.encodeText(directContent, phrase, textBounds, leading); | ||
float baseLine = columnText.getYLine(); | ||
encodeLines(directContent, bounds, leading, baseLine); | ||
} | ||
if (!nameDefined && conditionDefined) { | ||
Phrase phrase = new Phrase(); | ||
Font undefinedFont = new Font(nameFont); | ||
undefinedFont.setStyle(Font.UNDERLINE); | ||
phrase.add(new Chunk(" ", undefinedFont)); //$NON-NLS-1$ | ||
phrase.add(new Chunk(": ", nameFont)); //$NON-NLS-1$ | ||
phrase.add(new Chunk(condition, font)); | ||
PdfTextEncodingUtilities.encodeText(directContent, phrase, textBounds, leading); | ||
}*/ | ||
} | ||
|
||
private void encodeLines(PdfContentByte directContent, Bounds bounds, int leading, float yPosition) { | ||
yPosition -= leading; | ||
while (yPosition > bounds.getMinY()) { | ||
Line.createHorizontalByCoordinate(new Position(bounds.x, yPosition), bounds.getMaxX()).encode(directContent); | ||
yPosition -= leading; | ||
} | ||
} | ||
|
||
private Font createNameFont(BaseFont baseFont) { | ||
Font newFont = createFont(baseFont); | ||
newFont.setStyle(Font.BOLD); | ||
return newFont; | ||
} | ||
|
||
private Font createFont(BaseFont baseFont) { | ||
return TableEncodingUtilities.createFont(baseFont); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...r_Ghost/src/net/sf/anathema/character/ghost/reporting/SecondEditionSpiritPartEncoder.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,22 @@ | ||
package net.sf.anathema.character.ghost.reporting; | ||
|
||
import net.sf.anathema.character.reporting.sheet.PdfEncodingRegistry; | ||
import net.sf.anathema.character.reporting.sheet.common.IPdfContentBoxEncoder; | ||
import net.sf.anathema.character.reporting.sheet.page.AbstractSecondEditionExaltPdfPartEncoder; | ||
import net.sf.anathema.lib.resources.IResources; | ||
|
||
public class SecondEditionSpiritPartEncoder extends AbstractSecondEditionExaltPdfPartEncoder { | ||
|
||
public SecondEditionSpiritPartEncoder(IResources resources, PdfEncodingRegistry registry, int essenceMax) { | ||
super(resources, registry, essenceMax); | ||
} | ||
|
||
public IPdfContentBoxEncoder getGreatCurseEncoder() { | ||
return new PdfSolarVirtueFlawEncoder(getBaseFont()); | ||
} | ||
|
||
@Override | ||
public IPdfContentBoxEncoder getAnimaEncoder() { | ||
return new SpiritAnimaEncoderFactory(getResources(), getBaseFont(), getSymbolBaseFont()).createAnimaEncoder(); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
Character_Ghost/src/net/sf/anathema/character/ghost/reporting/SpiritAnimaEncoderFactory.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,25 @@ | ||
package net.sf.anathema.character.ghost.reporting; | ||
|
||
import net.sf.anathema.character.reporting.sheet.common.anima.AbstractAnimaEncoderFactory; | ||
import net.sf.anathema.character.reporting.sheet.common.anima.AnimaTableEncoder; | ||
import net.sf.anathema.character.reporting.sheet.util.IPdfTableEncoder; | ||
import net.sf.anathema.lib.resources.IResources; | ||
|
||
import com.lowagie.text.pdf.BaseFont; | ||
|
||
public class SpiritAnimaEncoderFactory extends AbstractAnimaEncoderFactory { | ||
|
||
public SpiritAnimaEncoderFactory(IResources resources, BaseFont basefont, BaseFont symbolBaseFont) { | ||
super(resources, basefont, symbolBaseFont); | ||
} | ||
|
||
@Override | ||
protected IPdfTableEncoder getAnimaTableEncoder() { | ||
return new AnimaTableEncoder(getResources(), getBaseFont(), getFontSize()); | ||
} | ||
|
||
@Override | ||
protected int getAnimaPowerCount() { | ||
return 3; | ||
} | ||
} |
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,9 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | ||
<classpathentry kind="src" path="resources"/> | ||
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/Character_Library"/> | ||
<classpathentry combineaccessrules="false" kind="src" path="/Character_Main"/> | ||
<classpathentry kind="output" path="build/classes"/> | ||
</classpath> |
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,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>Character_Godblooded</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
29 changes: 29 additions & 0 deletions
29
Character_Godblooded/resources/data/template/DemonBlooded2nd.template
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,29 @@ | ||
<exaltedCharacterTemplate characterType="Spirit" subtemplate="DemonBlooded"> | ||
<general> | ||
<edition edition="SecondEdition"/> | ||
<abilityGroups uses="trait/DefaultSecondEditionAbilityGroup.template" /> | ||
<attributeGroups uses="trait/DefaultAttributeGroup.template"/> | ||
<essence uses="template/GodBloodedEssence.template" /> | ||
<traitCollection uses="template/GodBloodedTraitCollection2nd.template"/> | ||
<magicTemplate uses="template/GodBloodedMagic2nd.template"/> | ||
<presentation uses="template/SpiritPresentation2nd.template"/> | ||
<additionalRules uses="template/GodBloodedAdditionalRules2nd.template"/> | ||
<healthTemplate> | ||
<toughnessControllingTrait type="Resistance"/> | ||
</healthTemplate> | ||
</general> | ||
<creation> | ||
<bonusPointCosts uses="template/GodBloodedBonusPointCost2nd.template" /> | ||
<creationPoints uses="net.sf.anathema.character.godblooded.template.GodBloodCreationPoints"> | ||
<attributeDots primary="6" secondary="5" tertiary="3" /> | ||
<abilityDots general="25" favoredPicks="1" /> | ||
<backgroundDots count="6" /> | ||
<virtueDots count="5" /> | ||
<bonusPoints count="21" /> | ||
<charmPicks favored="0" general="0" /> | ||
</creationPoints> | ||
</creation> | ||
<experience> | ||
<experiencePointCost uses="template/GodBloodedExperienceCost2nd.template" /> | ||
</experience> | ||
</exaltedCharacterTemplate> |
Oops, something went wrong.