Port a tracker to loot table. Doesn't really change much (???)

This commit is contained in:
sigonasr2 2016-08-05 19:15:49 -05:00
parent f56eec16dc
commit 8b6b35387c
2 changed files with 15 additions and 2 deletions

Binary file not shown.

View File

@ -6,6 +6,7 @@ import java.util.List;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import net.md_5.bungee.api.ChatColor;
import sig.plugin.TwosideKeeper.TwosideKeeper; import sig.plugin.TwosideKeeper.TwosideKeeper;
import sig.plugin.TwosideKeeper.HelperStructures.Common.GenericFunctions; import sig.plugin.TwosideKeeper.HelperStructures.Common.GenericFunctions;
@ -219,7 +220,10 @@ public enum MonsterDifficulty {
ItemStack gen_loot = DistributeRandomLoot(this.loot_rare, isRanger); ItemStack gen_loot = DistributeRandomLoot(this.loot_rare, isRanger);
TwosideKeeper.log("Adding "+gen_loot.toString()+" to loot table.", 4); TwosideKeeper.log("Adding "+gen_loot.toString()+" to loot table.", 4);
droplist.add(gen_loot); droplist.add(gen_loot);
if (Math.random()<=0.2) { double randomness = Math.random();
TwosideKeeper.log(ChatColor.DARK_GREEN+" Randomness is "+randomness, 3);
if (randomness<=0.2) {
TwosideKeeper.log(ChatColor.DARK_GREEN+" Spawn an essence!", 3);
switch (this) { switch (this) {
case DANGEROUS: case DANGEROUS:
droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.ANCIENT_ESSENCE)); droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.ANCIENT_ESSENCE));
@ -233,6 +237,9 @@ public enum MonsterDifficulty {
case NORMAL: case NORMAL:
droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.ARTIFACT_ESSENCE)); droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.ARTIFACT_ESSENCE));
break; break;
default: {
TwosideKeeper.log("Invalid Monster Type!", 2);
}
} }
} }
TwosideKeeper.Loot_Logger.AddRareLoot(); TwosideKeeper.Loot_Logger.AddRareLoot();
@ -244,7 +251,10 @@ public enum MonsterDifficulty {
ItemStack gen_loot = DistributeRandomLoot(this.loot_legendary, isRanger); ItemStack gen_loot = DistributeRandomLoot(this.loot_legendary, isRanger);
TwosideKeeper.log("Adding "+gen_loot.toString()+" to loot table.", 4); TwosideKeeper.log("Adding "+gen_loot.toString()+" to loot table.", 4);
droplist.add(gen_loot); droplist.add(gen_loot);
if (Math.random()<=0.2) { double randomness = Math.random();
TwosideKeeper.log(ChatColor.DARK_GREEN+" Randomness is "+randomness, 3);
if (randomness<=0.2) {
TwosideKeeper.log(ChatColor.DARK_GREEN+" Spawn a core!", 3);
switch (this) { switch (this) {
case DANGEROUS: case DANGEROUS:
droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.ANCIENT_CORE)); droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.ANCIENT_CORE));
@ -258,6 +268,9 @@ public enum MonsterDifficulty {
case NORMAL: case NORMAL:
droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.ARTIFACT_CORE)); droplist.add(sig.plugin.TwosideKeeper.Artifact.createArtifactItem(ArtifactItem.ARTIFACT_CORE));
break; break;
default: {
TwosideKeeper.log("Invalid Monster Type!", 2);
}
} }
} }
if (Math.random()<=0.6) { if (Math.random()<=0.6) {