= Converted formatting for the core rpg
This commit is contained in:
@@ -7,7 +7,7 @@ import core.rpg.RPGState;
|
||||
public class RPGCommandBattleFight extends RPGCommand
|
||||
{
|
||||
@Override
|
||||
public String OnRun(RPGState state, RPGInput input)
|
||||
public String onRun(RPGState state, RPGInput input)
|
||||
{
|
||||
if(state.battleContext == null)
|
||||
return "```There's nothing to fight!```";
|
||||
@@ -19,7 +19,7 @@ public class RPGCommandBattleFight extends RPGCommand
|
||||
reward = "+150xp";
|
||||
|
||||
state.battleContext = null;
|
||||
state.player.ApplyEXP(150);
|
||||
state.player.applyEXP(150);
|
||||
|
||||
if(out != null && reward != null)
|
||||
{
|
||||
|
||||
@@ -7,15 +7,15 @@ import core.rpg.RPGState;
|
||||
public class RPGCommandBattleRun extends RPGCommand
|
||||
{
|
||||
@Override
|
||||
public String OnRun(RPGState state, RPGInput input)
|
||||
public String onRun(RPGState state, RPGInput input)
|
||||
{
|
||||
if(state.battleContext == null)
|
||||
return "```There's nothing to run from!```";
|
||||
|
||||
long lostGold = (long)(state.player.GetGold() * .1);
|
||||
long lostGold = (long)(state.player.getGold() * .1);
|
||||
String out = null;
|
||||
|
||||
state.player.SpendGold(lostGold);
|
||||
state.player.spendGold(lostGold);
|
||||
state.battleContext = null;
|
||||
|
||||
out = "You duck behind a tree and manage to escape from encounter just barely!";
|
||||
|
||||
@@ -28,7 +28,7 @@ public class RPGCommandExplore extends RPGCommand
|
||||
}
|
||||
|
||||
@Override
|
||||
public String OnRun(RPGState state, RPGInput input)
|
||||
public String onRun(RPGState state, RPGInput input)
|
||||
{
|
||||
Chance chance = new Chance(100);
|
||||
|
||||
@@ -50,7 +50,7 @@ public class RPGCommandExplore extends RPGCommand
|
||||
|
||||
out = "As you take a stroll, you spy a small shiny glint from a bush and decide to investigate! Looks like it's your lucky day!";
|
||||
reward = "+" + gp + "gp";
|
||||
state.player.GiveGold(gp);
|
||||
state.player.giveGold(gp);
|
||||
}
|
||||
else if(chance.Next(20))
|
||||
{
|
||||
@@ -59,8 +59,8 @@ public class RPGCommandExplore extends RPGCommand
|
||||
|
||||
out = "You head out on a lovely stroll down a familiar path - the sun is out and the birds are chirping! Nothing much comes of it, but you feel refreshed.";
|
||||
reward = "+" + xp + "xp, +" + healing + "hp";
|
||||
state.player.ApplyHealing(healing);
|
||||
state.player.ApplyEXP(xp);
|
||||
state.player.applyHealing(healing);
|
||||
state.player.applyEXP(xp);
|
||||
}
|
||||
else if(chance.Next(20))
|
||||
{
|
||||
@@ -69,8 +69,8 @@ public class RPGCommandExplore extends RPGCommand
|
||||
|
||||
out = "Today's the day you head out on a new path. You find a lot of little nicknacks and trinkets on the trail, but leave them be. The trail gets really steep, the rocks jagged, but you keep going. Eventually, you make it out to the other side into a small but pleasant town, and collapse on a bench to catch your breath.";
|
||||
reward = "+" + xp + "xp, -" + damage + "hp";
|
||||
state.player.ApplyEXP(xp);
|
||||
state.player.ApplyDamage(damage);
|
||||
state.player.applyEXP(xp);
|
||||
state.player.applyDamage(damage);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -78,7 +78,7 @@ public class RPGCommandExplore extends RPGCommand
|
||||
|
||||
out = "You step outside but it starts to rain. You decide not to do much today, and hang about the inn and the tavern.";
|
||||
reward = "+" + hp + "hp";
|
||||
state.player.ApplyHealing(hp);
|
||||
state.player.applyHealing(hp);
|
||||
}
|
||||
|
||||
if(out != null && reward != null)
|
||||
|
||||
@@ -10,7 +10,7 @@ public class RPGCommandInfo extends RPGCommand
|
||||
{
|
||||
|
||||
@Override
|
||||
public String OnRun(RPGState state, RPGInput input)
|
||||
public String onRun(RPGState state, RPGInput input)
|
||||
{
|
||||
String out = null;
|
||||
switch(input.value.trim().toLowerCase())
|
||||
@@ -27,7 +27,7 @@ public class RPGCommandInfo extends RPGCommand
|
||||
case "hand":
|
||||
case "att":
|
||||
case "attack":
|
||||
out = WeaponStats(state.player.GetWeapon());
|
||||
out = WeaponStats(state.player.getWeapon());
|
||||
break;
|
||||
|
||||
case "armour":
|
||||
@@ -44,7 +44,7 @@ public class RPGCommandInfo extends RPGCommand
|
||||
case "dress":
|
||||
case "wear":
|
||||
case "outfit":
|
||||
out = ArmorStats(state.player.GetArmor());
|
||||
out = ArmorStats(state.player.getArmor());
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -60,14 +60,14 @@ public class RPGCommandInfo extends RPGCommand
|
||||
return null;
|
||||
|
||||
String out = "";
|
||||
out += "[" + weapon.GetName() + "]";
|
||||
out += "[" + weapon.getName() + "]";
|
||||
out += "\n";
|
||||
out += " att: " + weapon.GetAttack();
|
||||
out += " att: " + weapon.getAttack();
|
||||
out += "\n";
|
||||
out += "value: " + weapon.GetValue() + "gp";
|
||||
out += "value: " + weapon.getValue() + "gp";
|
||||
out += "\n";
|
||||
out += "\n";
|
||||
out += weapon.GetDescription();
|
||||
out += weapon.getDescription();
|
||||
|
||||
return out;
|
||||
}
|
||||
@@ -78,14 +78,14 @@ public class RPGCommandInfo extends RPGCommand
|
||||
return null;
|
||||
|
||||
String out = "";
|
||||
out += "[" + armor.GetName() + "]";
|
||||
out += "[" + armor.getName() + "]";
|
||||
out += "\n";
|
||||
out += " def: " + armor.GetDefense();
|
||||
out += " def: " + armor.getDefense();
|
||||
out += "\n";
|
||||
out += "value: " + armor.GetValue() + "gp";
|
||||
out += "value: " + armor.getValue() + "gp";
|
||||
out += "\n";
|
||||
out += "\n";
|
||||
out += armor.GetDescription();
|
||||
out += armor.getDescription();
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
@@ -11,18 +11,18 @@ import core.rpg.RPGWeapon;
|
||||
public class RPGCommandStats extends RPGCommand
|
||||
{
|
||||
@Override
|
||||
public String OnRun(RPGState state, RPGInput input)
|
||||
public String onRun(RPGState state, RPGInput input)
|
||||
{
|
||||
RPGPlayer player = state.player;
|
||||
long exp = player.GetEXP();
|
||||
long level = RPGExpTable.LevelFromEXP(player.GetEXP());
|
||||
long ceil = RPGExpTable.EXPCeil(level);
|
||||
long exp = player.getEXP();
|
||||
long level = RPGExpTable.levelFromEXP(player.getEXP());
|
||||
long ceil = RPGExpTable.expCeil(level);
|
||||
|
||||
String indent = "";
|
||||
String linebreak = "\n";
|
||||
|
||||
String out = "";
|
||||
out += indent + "[" + player.GetName() + ", lv. " + level + "]";
|
||||
out += indent + "[" + player.getName() + ", lv. " + level + "]";
|
||||
out += indent + linebreak;
|
||||
out += indent + "_______________";
|
||||
out += indent + linebreak;
|
||||
@@ -31,26 +31,26 @@ public class RPGCommandStats extends RPGCommand
|
||||
out += indent + " (until next: " + (ceil - exp) + ")";
|
||||
out += indent + linebreak;
|
||||
|
||||
out += indent + " Gold: " + player.GetGold();
|
||||
out += indent + " Gold: " + player.getGold();
|
||||
out += indent + linebreak;
|
||||
|
||||
out += indent + "Health: " + player.GetHealthCurrent() + "/" + player.GetHealthMax();
|
||||
out += indent + "Health: " + player.getHealthCurrent() + "/" + player.getHealthMax();
|
||||
out += indent + linebreak;
|
||||
|
||||
RPGWeapon weapon = player.GetWeapon();
|
||||
RPGWeapon weapon = player.getWeapon();
|
||||
out += indent + "_____";
|
||||
out += indent + linebreak;
|
||||
out += indent + "Weapon: " + weapon.GetName();
|
||||
out += indent + "Weapon: " + weapon.getName();
|
||||
out += indent + linebreak;
|
||||
out += indent + " att: " + weapon.GetAttack();
|
||||
out += indent + " att: " + weapon.getAttack();
|
||||
out += indent + linebreak;
|
||||
|
||||
RPGArmor armor = player.GetArmor();
|
||||
RPGArmor armor = player.getArmor();
|
||||
out += indent + "_____";
|
||||
out += indent + linebreak;
|
||||
out += indent + "Armor: " + armor.GetName();
|
||||
out += indent + "Armor: " + armor.getName();
|
||||
out += indent + linebreak;
|
||||
out += indent + " def: " + armor.GetDefense() ;
|
||||
out += indent + " def: " + armor.getDefense() ;
|
||||
out += indent + linebreak;
|
||||
|
||||
out += indent + linebreak;
|
||||
|
||||
Reference in New Issue
Block a user