Rename Block Runner to Build Race. Final changes on Treasure Digger map creation.

This commit is contained in:
Thanos paravantis 2015-11-14 16:00:51 +02:00
parent c2c99c1d5d
commit b4f9899fb1
3 changed files with 23 additions and 16 deletions

View File

@ -29,7 +29,7 @@ import nautilus.game.arcade.game.GameTeam.PlayerState;
import nautilus.game.arcade.game.SoloGame;
import nautilus.game.arcade.game.games.holeinwall.KitNormal;
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeAnvilDance;
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeBlockRunner;
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeBuildRace;
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeFallingBlocks;
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeFastFood;
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeTreasureDigger;
@ -147,7 +147,7 @@ public class MineWare extends SoloGame implements IThrown
{
_challenges.add(ChallengeTreasureDigger.class);
_challenges.add(ChallengeFastFood.class);
_challenges.add(ChallengeBlockRunner.class);
_challenges.add(ChallengeBuildRace.class);
_challenges.add(ChallengeAnvilDance.class);
_challenges.add(ChallengeFallingBlocks.class);

View File

@ -25,7 +25,7 @@ import org.bukkit.event.EventHandler;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.inventory.ItemStack;
public class ChallengeBlockRunner extends Challenge
public class ChallengeBuildRace extends Challenge
{
// The amount of blocks for every hotbar slot.
private static final int InventoryBlockAmount = 5;
@ -34,9 +34,9 @@ public class ChallengeBlockRunner extends Challenge
{ Material.DIRT, Material.STONE, Material.COBBLESTONE, Material.LOG, Material.WOOD, Material.WOOL, Material.BRICK, Material.SMOOTH_BRICK,
Material.GLASS };
public ChallengeBlockRunner(MineWare host)
public ChallengeBuildRace(MineWare host)
{
super(host, ChallengeType.FirstComplete, "Block Runner", "Your inventory is filled with blocks.",
super(host, ChallengeType.FirstComplete, "Build Race", "Your inventory is filled with blocks.",
"Be the first to place them all in the ground!");
}

View File

@ -124,31 +124,32 @@ public class ChallengeTreasureDigger extends Challenge
{
block.setType(Material.SAND);
if(chance < 20.0)
if(chance < 45.0) // 20%
{
block.setData((byte) 1);
}
if(chance < 10.0)
{
makeChestWithTreasure(block);
}
else if(chance < 20.0)
if(chance < 25.0) // 10%
{
block.setType(Material.SANDSTONE);
block.setData((byte) 0);
}
if(chance < 15.0) // 15%
{
makeChestWithTreasure(block);
}
}
else if(i == 2)
{
block.setType(Material.SAND);
if(chance < 20.0)
if(chance < 30.0) // 20%
{
block.setData((byte) 1);
}
if(chance < 10.0)
if(chance < 10.0) // 10%
{
block.setType(Material.SANDSTONE);
block.setData((byte) 0);
@ -158,7 +159,7 @@ public class ChallengeTreasureDigger extends Challenge
{
block.setType(Material.SAND);
if(chance < 10.0)
if(chance < 10.0) // 10%
{
block.setType(Material.SANDSTONE);
}
@ -241,8 +242,8 @@ public class ChallengeTreasureDigger extends Challenge
{
Player damager = (Player) event.getDamager();
ItemStack item = damager.getItemInHand();
if (!Host.IsAlive(damager))
if(!Host.IsAlive(damager))
return;
if(item != null)
@ -329,4 +330,10 @@ public class ChallengeTreasureDigger extends Challenge
{
return _lootChance.get(loot);
}
@Override
public int getMinPlayers()
{
return 4;
}
}