Rename Block Runner to Build Race. Final changes on Treasure Digger map creation.
This commit is contained in:
parent
c2c99c1d5d
commit
b4f9899fb1
@ -29,7 +29,7 @@ import nautilus.game.arcade.game.GameTeam.PlayerState;
|
|||||||
import nautilus.game.arcade.game.SoloGame;
|
import nautilus.game.arcade.game.SoloGame;
|
||||||
import nautilus.game.arcade.game.games.holeinwall.KitNormal;
|
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.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.ChallengeFallingBlocks;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeFastFood;
|
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeFastFood;
|
||||||
import nautilus.game.arcade.game.games.mineware.challenges.ChallengeTreasureDigger;
|
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(ChallengeTreasureDigger.class);
|
||||||
_challenges.add(ChallengeFastFood.class);
|
_challenges.add(ChallengeFastFood.class);
|
||||||
_challenges.add(ChallengeBlockRunner.class);
|
_challenges.add(ChallengeBuildRace.class);
|
||||||
_challenges.add(ChallengeAnvilDance.class);
|
_challenges.add(ChallengeAnvilDance.class);
|
||||||
_challenges.add(ChallengeFallingBlocks.class);
|
_challenges.add(ChallengeFallingBlocks.class);
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ import org.bukkit.event.EventHandler;
|
|||||||
import org.bukkit.event.block.BlockPlaceEvent;
|
import org.bukkit.event.block.BlockPlaceEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
public class ChallengeBlockRunner extends Challenge
|
public class ChallengeBuildRace extends Challenge
|
||||||
{
|
{
|
||||||
// The amount of blocks for every hotbar slot.
|
// The amount of blocks for every hotbar slot.
|
||||||
private static final int InventoryBlockAmount = 5;
|
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.DIRT, Material.STONE, Material.COBBLESTONE, Material.LOG, Material.WOOD, Material.WOOL, Material.BRICK, Material.SMOOTH_BRICK,
|
||||||
Material.GLASS };
|
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!");
|
"Be the first to place them all in the ground!");
|
||||||
}
|
}
|
||||||
|
|
@ -124,31 +124,32 @@ public class ChallengeTreasureDigger extends Challenge
|
|||||||
{
|
{
|
||||||
block.setType(Material.SAND);
|
block.setType(Material.SAND);
|
||||||
|
|
||||||
if(chance < 20.0)
|
if(chance < 45.0) // 20%
|
||||||
{
|
{
|
||||||
block.setData((byte) 1);
|
block.setData((byte) 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(chance < 10.0)
|
if(chance < 25.0) // 10%
|
||||||
{
|
|
||||||
makeChestWithTreasure(block);
|
|
||||||
}
|
|
||||||
else if(chance < 20.0)
|
|
||||||
{
|
{
|
||||||
block.setType(Material.SANDSTONE);
|
block.setType(Material.SANDSTONE);
|
||||||
block.setData((byte) 0);
|
block.setData((byte) 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(chance < 15.0) // 15%
|
||||||
|
{
|
||||||
|
makeChestWithTreasure(block);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(i == 2)
|
else if(i == 2)
|
||||||
{
|
{
|
||||||
block.setType(Material.SAND);
|
block.setType(Material.SAND);
|
||||||
|
|
||||||
if(chance < 20.0)
|
if(chance < 30.0) // 20%
|
||||||
{
|
{
|
||||||
block.setData((byte) 1);
|
block.setData((byte) 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(chance < 10.0)
|
if(chance < 10.0) // 10%
|
||||||
{
|
{
|
||||||
block.setType(Material.SANDSTONE);
|
block.setType(Material.SANDSTONE);
|
||||||
block.setData((byte) 0);
|
block.setData((byte) 0);
|
||||||
@ -158,7 +159,7 @@ public class ChallengeTreasureDigger extends Challenge
|
|||||||
{
|
{
|
||||||
block.setType(Material.SAND);
|
block.setType(Material.SAND);
|
||||||
|
|
||||||
if(chance < 10.0)
|
if(chance < 10.0) // 10%
|
||||||
{
|
{
|
||||||
block.setType(Material.SANDSTONE);
|
block.setType(Material.SANDSTONE);
|
||||||
}
|
}
|
||||||
@ -242,7 +243,7 @@ public class ChallengeTreasureDigger extends Challenge
|
|||||||
Player damager = (Player) event.getDamager();
|
Player damager = (Player) event.getDamager();
|
||||||
ItemStack item = damager.getItemInHand();
|
ItemStack item = damager.getItemInHand();
|
||||||
|
|
||||||
if (!Host.IsAlive(damager))
|
if(!Host.IsAlive(damager))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(item != null)
|
if(item != null)
|
||||||
@ -329,4 +330,10 @@ public class ChallengeTreasureDigger extends Challenge
|
|||||||
{
|
{
|
||||||
return _lootChance.get(loot);
|
return _lootChance.get(loot);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getMinPlayers()
|
||||||
|
{
|
||||||
|
return 4;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user