Excavation ? WIP

This commit is contained in:
nossr50 2012-03-03 12:43:50 -08:00
parent 0dd9bc1cda
commit 07699fa651
5 changed files with 10 additions and 8 deletions

View File

@ -30,7 +30,6 @@ public class ExcavationCommand implements CommandExecutor {
ticks++; ticks++;
} }
player.sendMessage(""); player.sendMessage("");
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.SkillExcavation") })); player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.SkillExcavation") }));
player.sendMessage(mcLocale.getString("m.XPGain", new Object[] { mcLocale.getString("m.XPGainExcavation") })); player.sendMessage(mcLocale.getString("m.XPGain", new Object[] { mcLocale.getString("m.XPGainExcavation") }));

View File

@ -10,6 +10,7 @@ import com.gmail.nossr50.mcPermissions;
import com.gmail.nossr50.datatypes.PlayerProfile; import com.gmail.nossr50.datatypes.PlayerProfile;
import com.gmail.nossr50.datatypes.SkillType; import com.gmail.nossr50.datatypes.SkillType;
import com.gmail.nossr50.locale.mcLocale; import com.gmail.nossr50.locale.mcLocale;
import com.gmail.nossr50.util.Page;
public class MiningCommand implements CommandExecutor { public class MiningCommand implements CommandExecutor {
@Override @Override
@ -124,6 +125,8 @@ public class MiningCommand implements CommandExecutor {
else else
player.sendMessage(mcLocale.getString("m.MiningDemolitionsExpertDamageDecrease", new Object[] { damage })); player.sendMessage(mcLocale.getString("m.MiningDemolitionsExpertDamageDecrease", new Object[] { damage }));
Page.grabGuidePageForSkill(SkillType.MINING, player, args);
return true; return true;
} }
} }

View File

@ -14,7 +14,7 @@ public class Page {
public static int getTotalPageNumber(String address) public static int getTotalPageNumber(String address)
{ {
String[] addressSplit = mcLocale.getString(address).split("\n"); String[] addressSplit = mcLocale.getString(address).split("\n");
if(addressSplit.length < 8) if(addressSplit.length <= 8)
return 1; return 1;
else else
return (addressSplit.length/8)+1; return (addressSplit.length/8)+1;
@ -31,7 +31,7 @@ public class Page {
} }
ArrayList<String> allStrings = new ArrayList<String>(); ArrayList<String> allStrings = new ArrayList<String>();
String[] addressSplit = mcLocale.getString(address).split("\n"); String split[] = mcLocale.getString(address).split("\n");
allStrings.add(ChatColor.GOLD+"-="+ChatColor.GREEN+header+ChatColor.GOLD+"=-"); //So stylish allStrings.add(ChatColor.GOLD+"-="+ChatColor.GREEN+header+ChatColor.GOLD+"=-"); //So stylish
@ -39,10 +39,10 @@ public class Page {
while(allStrings.size() < 9) while(allStrings.size() < 9)
{ {
if(pageIndexStart+allStrings.size() > addressSplit.length) if(pageIndexStart+allStrings.size() > split.length)
allStrings.add(""); allStrings.add("");
else else
allStrings.add(addressSplit[pageIndexStart+allStrings.size()-1]); allStrings.add(split[pageIndexStart+allStrings.size()-1]);
} }
allStrings.add("Page "+pagenum+" of "+getTotalPageNumber(address)); allStrings.add("Page "+pagenum+" of "+getTotalPageNumber(address));

View File

@ -414,4 +414,4 @@ Skills.SerratedStrikesPlayerOff=[[RED]]Serrated Strikes[[GREEN]] has worn off fo
Skills.BlastMiningPlayer=[[GREEN]]{0}[[DARK_GREEN]] has used [[RED]]Blast Mining! Skills.BlastMiningPlayer=[[GREEN]]{0}[[DARK_GREEN]] has used [[RED]]Blast Mining!
Skills.YourBlastMining=[[GREEN]]Your [[YELLOW]]Blast Mining [[GREEN]]ability is refreshed! Skills.YourBlastMining=[[GREEN]]Your [[YELLOW]]Blast Mining [[GREEN]]ability is refreshed!
TreeFeller.AxeSplinters=[[RED]]YOUR AXE SPLINTERS INTO DOZENS OF PIECES TreeFeller.AxeSplinters=[[RED]]YOUR AXE SPLINTERS INTO DOZENS OF PIECES
Guides.Excavation=XP GAIN:\n\nGain XP from soft materials with your shovel.\nMaterials include Grass, Dirt, Sand,\nGravel, Mycelium, and Clay\nTHIS IS PROOF\nOF CONCEPT\nTHIS IS PROOF\nOF CONCEPT\nTHIS IS PROOF\nOF CONCEPT\nTHIS IS PROOF\nOF CONCEPT\nTHIS IS PROOF\nOF CONCEPT\nTHIS IS PROOF\nOF CONCEPT\nTHIS IS PROOF\nOF CONCEPT\nTHIS IS PROOF\nOF CONCEPT\nTHIS IS PROOF\nOF CONCEPT\nTHIS IS PROOF\nOF CONCEPT\nTHIS IS PROOF\nOF CONCEPT\nTHIS IS PROOF\nOF CONCEPT\nTHIS IS PROOF\nOF CONCEPT\nTHIS IS PROOF\nOF CONCEPT\nTHIS IS PROOF\nOF CONCEPT\nTHIS IS PROOF\nOF CONCEPT\nTHIS IS PROOF\nOF CONCEPT\nTHIS IS PROOF\nOF CONCEPT\nTHIS IS PROOF\nOF CONCEPT\nTHIS IS PROOF\nOF CONCEPT\nTHIS IS PROOF\nOF CONCEPT\nTHIS IS PROOF\nOF CONCEPT\nTHE END Guides.Excavation=[[DARK_AQUA]]About Excavation:\n[[YELLOW]]Excavation is the act of digging up dirt to find treasures.\n[[YELLOW]]In the process of excavating the land you will find treasures\n[[YELLOW]]The more you do this the better treasures you will find.\n\n[[DARK_AQUA]]XP GAIN:\n[[YELLOW]]To gain XP in this skill you must dig with a shovel in hand\n[[YELLOW]]only certain materials can be dug up for treasures and XP.\n[[DARK_AQUA]]Compatible Materials:\n[[YELLOW]]Grass, Dirt, Sand, Clay, Gravel, Mycelium, Soul Sand\n\n[[DARK_AQUA]]How to use Giga Drill Breaker:\n[[YELLOW]]With a shovel in hand right click to ready your tool.\n[[YELLOW]]Once in this state you have about 4 seconds to make\n[[YELLOW]]contact with Excavation compatible materials this will\n[[YELLOW]]activate Giga Drill Breaker.\n[[DARK_AQUA]]What is Giga Drill Breaker?\n[[YELLOW]]Giga Drill Breaker is an ability with a cooldown\n[[YELLOW]]tied to Excavation skill. It triples your chance\n[[YELLOW]]of finding treasures and enables instant break\n[[YELLOW]] on Excavation materials.\n\n[[DARK_AQUA]]How does Treasure Hunter work?\n[[YELLOW]]Every possible treasure for Excavation has its own\n[[YELLOW]]skill level requirement for it to drop, as a result\n[[YELLOW]]it's hard to say how much it is helping you.\n[[YELLOW]]Just keep in mind that the higher your\n[[YELLOW]]Excavation skill is, the more treasures can be found.\n[[YELLOW]]And also keep in mind that each type of\n[[YELLOW]]Excavation compatible material has its own[[YELLOW]]unique list of treasures.\n[[YELLOW]]In other words you will find different treasures in Dirt\n[[YELLOW]]than in Gravel.