Skip to content
Snippets Groups Projects
Commit c0fb9ee7 authored by keyno10's avatar keyno10
Browse files

Several charms added. Penalties added

parent 02761642
No related branches found
No related tags found
No related merge requests found
Showing
with 279 additions and 54 deletions
......@@ -14,6 +14,7 @@ public class CharacterInterface {
private static final Willpower willpower = new Willpower(1, 2, 3, 4);
private static final StaticValues staticValues = new StaticValues();
private static final Soak soak = new Soak();
private static final Penalties penalties = new Penalties();
public CharacterInterface() {
......@@ -76,5 +77,8 @@ public class CharacterInterface {
public static Soak getSoak() {
return soak;
}
public static Penalties getPenalties() {
return penalties;
}
}
......@@ -15,8 +15,7 @@ public class KnownCharms {
setUpSupplementalList();
//Add charms to list
addSupplementalCharms();
addOtherCharms();
addCharms();
}
/**
......@@ -45,16 +44,9 @@ public class KnownCharms {
}
/**
* Add supplemental charms to supplemental charm list
* Add charms to charm list
*/
private void addSupplementalCharms() {
}
/**
* Add to other charm list
*/
private void addOtherCharms() {
private void addCharms() {
charms.add(new GaiasSurvival());
charms.add(new FlutteringCryOfWarning());
charms.add(new CrossedWingsDenial());
......@@ -74,6 +66,13 @@ public class KnownCharms {
FormOfGaia formOfGaia = new FormOfGaia();
charms.add(formOfGaia);
supplementalCharms.get("Survival").add(formOfGaia);
charms.add(new RestorationOfNature());
FormOfTheFirstborn formOfTheFirstborn = new FormOfTheFirstborn();
charms.add(formOfTheFirstborn);
supplementalCharms.get("Martial Arts").add(formOfTheFirstborn);
supplementalCharms.get("Melee").add(formOfTheFirstborn);
}
/**
......
......@@ -53,7 +53,7 @@ public class Motes {
public void commitPersonal(int commit) {
if(commit < personalCurrent.getValue()) {
personalCurrent.set(personalCurrent.getValue() - commit);
personalMoteMaximum.set(peripheralMoteMaximum.getValue() - commit);
personalMoteMaximum.set(personalMoteMaximum.getValue() - commit);
} else {
notEnoughMotes(commit);
}
......@@ -112,7 +112,7 @@ public class Motes {
*/
public void uncommit(boolean personal, int amount) {
if(personal) {
peripheralMoteMaximum.set(personalMoteMaximum.getValue()+amount);
personalMoteMaximum.set(personalMoteMaximum.getValue()+amount);
spendPersonal(-amount);
} else {
peripheralMoteMaximum.set(peripheralMoteMaximum.getValue()+amount);
......@@ -121,4 +121,11 @@ public class Motes {
fixCaps();
}
/**
* Return current essence
*/
public int getEssence() {
return essence;
}
}
package Character;
import javafx.util.Pair;
import java.util.ArrayList;
import java.util.HashMap;
public class Penalties {
private final HashMap<String, Integer> penaltyList = new HashMap<>();
private final ArrayList<Pair<String,Integer>> penaltyListPairs = new ArrayList<>();
public Penalties() {
}
/**
* Return list of all penalties
*/
public ArrayList getPenalties() {
//Create new array list for return
ArrayList<Pair<String, Integer>> returnList = penaltyListPairs;
//Add wounds penalty to return list
return returnList;
}
/**
* Get wound penalty
*/
/**
* Add new penalty
*/
public void addPenalty(String reason, int amount) {
penaltyListPairs.add(new Pair<>(reason, amount));
}
/**
* Remove specific penalty
*/
}
......@@ -106,7 +106,8 @@ public abstract class Charm {
addCostsToWindow(hBox);
//Add charm specific parts to listing pane
split.getChildren().add(optionsPane());
optionsPane();
split.getChildren().add(optionsPane);
//Set green if charm is active
if(active) {
......@@ -150,7 +151,7 @@ public abstract class Charm {
/**
* Get options section of listing pane
*/
public abstract StackPane optionsPane();
public abstract void optionsPane();
/**
* Complete info for charm's info screen
......
package CharmBaggage;
/**
* For charms with lasting effects
*/
public interface Continual {
//Method(s) to activate and deactivate
void setActive(boolean activated);
}
package CharmBaggage;
import javafx.scene.layout.Pane;
/**
* For charms which apply to ability checks & static values
*/
......
......@@ -19,7 +19,7 @@ public class BeakSpearsFrog extends Charm {
}
@Override
public StackPane optionsPane() {
public void optionsPane() {
//Create new options pane
optionsPane = new StackPane();
......@@ -35,8 +35,6 @@ public class BeakSpearsFrog extends Charm {
//Add reminder label
optionsPane.getChildren().add(new Label("Become counter-attacker"));
}
return optionsPane;
}
@Override
......
......@@ -20,7 +20,7 @@ public class CraneForm extends Charm implements Supplemental {
}
@Override
public StackPane optionsPane() {
public void optionsPane() {
//Create stack pane for options
optionsPane = new StackPane();
......@@ -41,8 +41,6 @@ public class CraneForm extends Charm implements Supplemental {
App.getSheet().resetCharmList();
});
}
return optionsPane;
}
@Override
......
......@@ -23,7 +23,7 @@ public class CrossedWingsDenial extends Charm {
}
@Override
public StackPane optionsPane() {
public void optionsPane() {
//Create stack pane for options
optionsPane = new StackPane();
......@@ -45,8 +45,6 @@ public class CrossedWingsDenial extends Charm {
cost[0] = Integer.parseInt(input.getText());
App.getSheet().resetCharmList();
});
return optionsPane;
}
@Override
......
package Charms;
import CharmBaggage.Charm;
public class DeathStallingRiver extends Charm {
public DeathStallingRiver(String charmName, int[] charmCost) {
super(charmName, charmCost);
}
@Override
public void doCharmEffect() {
}
@Override
public void optionsPane() {
}
@Override
public void fillCharmInfo() {
charmDetails = new String[3];
charmDetails[0] = "Providence";
charmDetails[1] = "Spell";
charmDetails[2] = "Instant";
charmInfo = "The Elemental Dragon of Water faces dangers darker and more deadly than any other, and she does so alone. Hidden things that lie deep beneath the oceans, beyond the province of men or the gods of Heaven, are the foes she must contend with, away from the provinces of her siblings or their servants. Her domain continually faces incursion by the Wyld, just as it restrains the old forgotten things that would devour the world. It is seldom that she faces against the forces of death, however, her Mother's greatest enemies; she regrets that the minions of the Neverborn do not pass beneath her waves, that she might bend her strength upon them and sweep them into the abyss they seem to crave. When called by this Spell, however, she will gladly focus a greater measure of her might into a portion of her being, creating a barrier that the dead dare not cross.\n" +
"This spell may be cast on any flowing water, from the merest mountain stream to the broadest of rivers; as the providentress ceases to channel the spell, it will appear for a moment that some half-seen, glowing blue serpentine... something... passes under its surface. For a year and a day after this, along a length of up to [Essence] miles away from where the spell was cast, those waters will serve as an impassable ward to creatures of death. All manner of ghosts, as well as mindless undead such as zombies, will find themselves unable to cross; if forced, they will freeze at the point of moving over the water, unable to go any further regardless of what force is put upon them. Most intelligent undead will feel an aversion to the water's path and will refuse to even go near it. If a ghost is occupying an object or a creature that crosses the water's path, they are forced out. Even objects of soulsteel, if one attempts to bring them over (or under) the water, will inexplicably become heavier as one approaches, until they can be carried no further.\n" +
"Only beings of death who yet live, namely the Abyssal Exalted and ghost-blooded mortals, can make an attempt to cross running water that has been affected by this Spell. Such characters be carried by others, or else must succeed at a Willpower roll (difficulty equal to their own Essence rating) to force themselves across. So long as they remain over the water, they suffer a -4 penalty to all actions as they feel their minds and bodies become sluggish and slow.";
}
}
......@@ -29,7 +29,7 @@ public class EmpoweringJusticeRedirection extends Charm implements Supplemental
}
@Override
public StackPane optionsPane() {
public void optionsPane() {
//Create new options pane
optionsPane = new StackPane();
......@@ -61,8 +61,6 @@ public class EmpoweringJusticeRedirection extends Charm implements Supplemental
textField.setPrefWidth(50);
hBox.getChildren().add(textField);
}
return optionsPane;
}
@Override
......
......@@ -16,14 +16,12 @@ public class FlutteringCryOfWarning extends Charm {
}
@Override
public StackPane optionsPane() {
public void optionsPane() {
//Create stack pane for options
optionsPane = new StackPane();
//Add reminder label
optionsPane.getChildren().add(new Label("Prevent surprise attack"));
return optionsPane;
}
@Override
......
......@@ -17,6 +17,9 @@ public class FormOfGaia extends Charm implements Supplemental {
@Override
public void doCharmEffect() {
if(active) {
return;
}
//Set charm active
active = true;
becomingHuman();
......@@ -27,8 +30,8 @@ public class FormOfGaia extends Charm implements Supplemental {
*/
private void becomingHuman() {
//Decrease strength & stamina
CharacterInterface.getAttributes().getAttribute(4).add(-13);
CharacterInterface.getAttributes().getAttribute(6).add(-4);
CharacterInterface.getAttributes().getAttribute(3).set(CharacterInterface.getAttributes().getAttribute(3).getValue() - 13);
CharacterInterface.getAttributes().getAttribute(5).set(CharacterInterface.getAttributes().getAttribute(5).getValue() - 4);
//Decrease Soak & recalculate it
CharacterInterface.getSoak().increaseSoak(-10, -10,0);
CharacterInterface.getSoak().recalculateSoak();
......@@ -39,21 +42,21 @@ public class FormOfGaia extends Charm implements Supplemental {
*/
private void becomingMassive() {
//Increase strength & stamina
CharacterInterface.getAttributes().getAttribute(4).add(13);
CharacterInterface.getAttributes().getAttribute(6).add(4);
CharacterInterface.getAttributes().getAttribute(3).set(CharacterInterface.getAttributes().getAttribute(3).getValue() + 13);
CharacterInterface.getAttributes().getAttribute(5).set(CharacterInterface.getAttributes().getAttribute(5).getValue() + 4);
//Increase Soak & recalculate it
CharacterInterface.getSoak().increaseSoak(10, 10,0);
CharacterInterface.getSoak().recalculateSoak();
}
@Override
public StackPane optionsPane() {
public void optionsPane() {
//Create stack pane for options
optionsPane = new StackPane();
//If active, add button to abandon
if(active) {
Button button = new Button("Abandon Human Form");
Button button = new Button("Abandon Dragon Form");
optionsPane.getChildren().add(button);
button.setOnAction((e) -> {
active = false;
......@@ -65,8 +68,6 @@ public class FormOfGaia extends Charm implements Supplemental {
Label label = new Label("Currently in Large Form");
optionsPane.getChildren().add(label);
}
return optionsPane;
}
@Override
......@@ -90,6 +91,6 @@ public class FormOfGaia extends Charm implements Supplemental {
@Override
public int[] getEffect() {
return new int[]{4,0,1};
return new int[]{-4,0,1};
}
}
package Charms;
import CharmBaggage.Charm;
import Character.CharacterInterface;
import CharmBaggage.Supplemental;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
import uk.ac.soton.comp1206.App;
public class FormOfTheFirstborn extends Charm implements Supplemental {
public FormOfTheFirstborn() {
super("Form of the Firstborn", new int[]{50,2,0,0,0});
}
@Override
public void doCharmEffect() {
if(active) {
return;
}
//Set charm active
active = true;
//Regain motes spent
if(committedToPersonal) {
CharacterInterface.getMotes().spendPersonal(-cost[0]);
} else {
CharacterInterface.getMotes().spendPeripheral(-cost[0]);
}
//Become dragon form
becomeDragon();
}
/**
* Becoming dragon
*/
public void becomeDragon() {
//Increase Strength by 2E
CharacterInterface.getAttributes().getAttribute(3).set(CharacterInterface.getAttributes().getAttribute(3).getValue() + (CharacterInterface.getMotes().getEssence()*2));
//Increase soak & recalculate it
CharacterInterface.getSoak().increaseSoak(10, 10, 10);
}
/**
* Becoming human
*/
public void becomeHuman() {
//Decrease Strength by 2E
CharacterInterface.getAttributes().getAttribute(3).set(CharacterInterface.getAttributes().getAttribute(3).getValue() - (CharacterInterface.getMotes().getEssence()*2));
//Decrease soak & recalculate it
CharacterInterface.getSoak().increaseSoak(-10, -10, -10);
}
@Override
public void optionsPane() {
//Create stack pane for options
optionsPane = new StackPane();
//If active, add option to abandon
if(active) {
Button button = new Button("Abandon Dragon Form");
optionsPane.getChildren().add(button);
button.setOnAction((e) -> {
active = false;
becomeHuman();
CharacterInterface.getMotes().uncommit(committedToPersonal, cost[0]);
App.getSheet().resetCharmList();
});
} else { //If inactive, show reminder
Label label = new Label("Wing Beat & Tail Swipe");
optionsPane.getChildren().add(label);
}
//When active, gain Wing attack & tail sweep
}
@Override
public void fillCharmInfo() {
charmDetails = new String[3];
charmDetails[0] = "Providence";
charmDetails[1] = "Spell";
charmDetails[2] = "Instant";
charmInfo = "To live is to struggle. Death is easy; too much of any one thing, too far down any one path, and it will come. Life must fight to maintain balance, and all living things must war against the world to find the place where they can survive. Thus, though Gaia cares for all things, it is also in her nature to do battle. When the Emerald Mother calls her servants to fight in her name, they in turn may call upon her through this Spell, asking that she give them the weapons needed to be victorious. To Gaia's eyes, of course, the only true weapon in any fight is the self: one's own body, mind and essence. The Titan of Life answers this spell, therefore, by reshaping these things in the caster, calling back to a time before all history and bringing forth the form of a creature that existed at the dawn of time, when the world was young and vulnerable.\n" +
"The providentress who channels this spell is engulfed in a swirling storm of all Creation's elements, terrestrial and celestial alike. Those who can sense such things will feel the presence of primordial essence as well, and if cast in Creation, there is a sense of answering in the world as it remembers its youth; air and water seem momentarily clearer, plants more vivid in their verdancy, scents more compelling. The caster's body grows and twists, taking on a powerful predatory form reminiscent of cat, wolf and horse; hand and feet twist to better suit their new form, springing great metal claws, while their head is stretched and sharpened into fierce reptilian jaws with great horns sweeping back from their skull. Massive wings burst forth from their back, whilst a heavy tail lashes back from behind their body; thick scales and horn of living iron flow and harden over their whole body, whilst bright elemental essence begins to spill from their jaws with every breath they take.\n" +
"The caster (or lead caster) is transformed into a Primordial Dragon. They grow to 14 feet when standing, or 20 feet from head to tail-tip. They can walk on four legs or two as they wish; staying upright allows them to use their hands,which remain capable of grasping objects (though they suffer a -4 penalty to all rolls for manual dexterity), while moving on all fours allows them to jump, move and Dash at four times their normal limits. Their Strength is increased by twice their Essence rating (this is considered natural and not as dice gained from Charms), and they gain claws and fangs with which they may make unarmed attacks with +2 Accuracy and +6L damage; they can also perform a Wing Buffet attack (+8B damage, otherwise as for a Kick) and a Tail Sweep (+6B damage, otherwise as Kick, normal human targets must roll [Stamina + Resistance] against user's Strength or be knocked over). Their claws and teeth are made of iron, as are their scales, which grant +10B/10L soak and hardness and protect them completely from the Wyld and the supernatural powers of the Fair Folk. If injured, they bleed a slick, flammable black fluid. They may use the Dragon's Suspire as if they were an elemental, as for the element to which they were Aspected: if this spell is somehow cast by someone who is not a Terrestrial Exalt, this ability becomes aspected towards their natural essence, which can have unusual effects. Their eyes also take on a strange supernatural power: any mortal that meets their focused gaze must have an MDV of greater than 6 or spend a dot of willpower else be paralyzed, while any Fair Folk unfortunate enough to do the same must roll their [Essence + highest Virtue] against difficulty 4 or be turned to stone. Their wings allow them to fly at twice their (improved) movement speed, as for the Wings mutation, and they can easily carry up to three normal humans with no difficulty.\n" +
"The character remains able to use all their Charms as normal, though mortal equipment is destroyed by the transformation and Artifacts are shifted Elsewhere.\n" +
"While transformed, the character's peripheral essence is considered personal; they no longer produce an anima flare, as their essence is contained within their iron hide. It leaks from their mouth as they breathe, however, causing them to lose 5m an hour. They cannot recover essence normally (save through stunts and mote-restoring Charms), and if they run completely out of essence they will return to their normal form. However, they gain the ability to \"drink\" essence from demenses and Manses: they regain twice the amount of essence such places normally grant, and do not need to attune to them to do so. They can also consume hearthstones, gaining [hearthstone's Rating x 5] motes immediately by doing so. They also lose the ability to heal normally; instead, they must restore their bodies by spending essence, at 3m per bashing, 5m per lethal and 10m per aggravated HL.";
}
@Override
public int[] getEffect() {
return new int[]{2,0,1};
}
}
......@@ -17,14 +17,12 @@ public class GaiasSurvival extends Charm {
}
@Override
public StackPane optionsPane() {
public void optionsPane() {
//Create stack pane for options
optionsPane = new StackPane();
//Add reminder label
optionsPane.getChildren().add(new Label("Reduce damage by E"));
return optionsPane;
}
@Override
......
package Charms;
import CharmBaggage.Charm;
import javafx.scene.control.CheckBox;
import javafx.scene.control.Label;
import javafx.scene.layout.HBox;
import javafx.scene.layout.StackPane;
import Character.CharacterInterface;
public class RestorationOfNature extends Charm {
//Checkbox to see if spell used on self
private CheckBox onSelf;
public RestorationOfNature() {
super("Restoration of Nature", new int[]{40,2,0,0,0});
}
@Override
public void doCharmEffect() {
//Regain motes spent
if(committedToPersonal) {
CharacterInterface.getMotes().spendPersonal(-cost[0]);
} else {
CharacterInterface.getMotes().spendPeripheral(-cost[0]);
}
//If used on self
if(onSelf.isSelected()) {
//Heal fully
CharacterInterface.getHealth().aggDamage(-9999);
CharacterInterface.getHealth().lethalDamage(-9999);
CharacterInterface.getHealth().bashingDamage(-9999);
//Apply penalty
CharacterInterface.getPenalties().addPenalty("After-Heal", 2);
}
}
@Override
public void optionsPane() {
//Create stack pane for options
optionsPane = new StackPane();
//Create HBox and set into pane
HBox hBox = new HBox();
optionsPane.getChildren().add(hBox);
//Add label
hBox.getChildren().add(new Label("Cast on self?"));
//Add check box
onSelf = new CheckBox();
hBox.getChildren().add(onSelf);
}
@Override
public void fillCharmInfo() {
charmDetails = new String[3];
charmDetails[0] = "Providence";
charmDetails[1] = "Spell";
charmDetails[2] = "Instant";
charmInfo = "The proper shape of any living creature is written in their blood. From tiny variances such as the color of an eye or the length of a nose up to the placement of limbs and the formation of the inner organs are all encoded thus into these spiraling letters, carved into even the tiniest parts of mortal beings; it is according to such instructions that the body grows to adulthood or restores itself from injury. The servants of Gaia know this, for their primordial Goddess made it so when she created beings of flesh and blood. This spell, which is called upon by the Emerald Mother's priestesses to restore health to the injured, draws upon these patterns for its instruction. Such restoration is quite violent, often messy and always painful for the recipient, but it will almost instantly restore wholeness even to one whose body has been mangled beyond recognition, so long as the spark of life remains.\n" +
"This Spell instantly heals its target of all health levels of damage and any crippling effects, and eliminates all normal poisons and diseases; as it heals the physical body only, however, it cannot cure supernatural diseases or poisons that attack a creature's essence, though the progress and effects of the illness on the body will be \"reset\". However, if the target possesses any prosthetic implants or grafts (including those of necro- or hell- tech), these will be forcibly ejected from the body. Mutations from exposure to the wyld or an uncapped demense, however, as well as those granted by First Age Solar medicine, are not removed, as these become written into a character's blood-pattern. The Spell will also fail to cure injury, disease or other ills that are caused by or associated with the essence of Ligier, for the burn of his green light causes damage to those patterns. In addition to these drawbacks, the Spell takes a toll on the target's body: the pain of restoration causes a lingering discomfort and disorientation that causes a -2 penalty to all actions for a day, and as its elimination of all foreign bodies includes recently eaten food, the character will suffer additional penalties due to hunger, as if they had not eaten for three days.\n" +
"Theoretically, if cast on plants or animals that are not yet fully grown, it will cause them to physically age into adulthood on the spot. No-one has ever tried this, however.";
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment