Harb (TDM)

Harb is a team deathmatch map where you help your team in getting the most kills in 10 minutes. Players spawn with a speed effect and TNT that instantly ignites when placed in the world, making it frantic and fast paced.

Players spawn on opposite ends of the map and can run around with infinite speed.

The large spawn island for harb, where players initially spawn at when the map is loaded.

➡️ Every map XML file starts with the XML header and then the base <map> module.

<?xml version="1.0"?>
<map proto="1.4.2">
<!-- Specifies what the map is called -->
<name>Harb</name>
<!-- States what version the map is -->
<version>1.3.5</version>
<!-- Tells the teams what the objective is in order to win the game -->
<objective>Be the team with the least amount of deaths after 10 minutes.</objective>
<!-- States who made the map -->
<authors>
<author uuid="1379cb6e-f291-4498-9807-e636f9674ac0"/> <!-- SH4D0W_HAWK -->
<author uuid="ef4ea031-998f-4ec9-b7b6-1bdd428bcef8"/> <!-- Plastix -->
</authors>

➡️ Defines the teams colors, names and how many people can be on the teams.

<teams>
<team color="blue" max="50">Blue Team</team>
<team color="dark red" max="50">Red Team</team>
</teams>

➡️ A simple filter that denies TNT blocks from being placed.

<!-- If the block is TNT, deny -->
<filters>
<not id="no-tnt">
<block>tnt</block>
</not>
</filters>

➡️ Defines the playable area, and applies the no-tnt filter to spawn regions.

<regions>
<union id="playable">
<rectangle id="main-area" min="-50,-32" max="51,33"/>
<union id="bases">
<rectangle id="blue-base" min="-20,-62" max="21,-32"/>
<rectangle id="red-base" min="-20,33" max="21,63"/>
</union>
<complement id="portals-area">
<rectangle min="-56,-2" max="57,3"/>
<region id="main-area"/>
</complement>
</union>
<!-- Nothing will destroy any blcoks inside portals-area -->
<apply block="never">
<region id="portals-area"/>
</apply>
<apply block="no-tnt" message="You may not place TNT in the bases.">
<region id="bases"/>
</apply>
<apply leave="never" message="You can't leave the map!">
<region id="playable"/>
</apply>
</regions>

➡️ Defines the spawn kits that players get.

<kits>
<kit id="spawn">
<clear/>
<item slot="0" unbreakable="true">stone sword</item>
<item slot="1" unbreakable="true" enchantment="arrow infinite:1">bow</item>
<item slot="28">arrow</item>
<item slot="2">golden apple</item>
<item slot="3" amount="32">ladder</item>
<item slot="4" amount="2">TNT</item>
<leggings unbreakable="true" enchantment="protection projectile:3">chainmail leggings</leggings>
<boots unbreakable="true">iron boots</boots>
<potion duration="6">heal</potion>
<potion duration="6">damage resistance</potion>
<potion duration="oo">speed</potion>
</kit>
<kit id="red" parents="spawn">
<helmet color="cd0000" unbreakable="true">leather helmet</helmet>
<chestplate color="cd0000" enchantment="protection explosions:3" unbreakable="true">leather chestplate</chestplate>
</kit>
<kit id="blue" parents="spawn">
<helmet color="0066cc" unbreakable="true">leather helmet</helmet>
<chestplate color="0066cc" enchantment="protection explosions:3" unbreakable="true">leather chestplate</chestplate>
</kit>
</kits>

➡️ Defines the spawn areas.

<spawns>
<spawns safe="true" sequential="true">
<spawn team="blue" kit="blue" yaw="0">
<regions>
<cuboid min="-15,32,-57" max="16,42,-32"/>
<point>0.5,33,-47.5</point>
</regions>
</spawn>
<spawn team="red" kit="red" yaw="180">
<regions>
<cuboid min="-15,32,33" max="16,42,58"/>
<point>0.5,33,48.5</point>
</regions>
</spawn>
</spawns>
<default yaw="90">
<region>
<cuboid min="-75.5,42.5,-0.5" max="-73.5,42.5,1.5"/>
</region>
</default>
</spawns>

➡️ Defines the portals.

<portals>
<!-- Moves the player +110 blocks in the X axis -->
<!-- These coordinates are relative -->
<portal x="110">
<cuboid min="-56,33,-1" max="-55,35,2"/>
</portal>
<portal x="-110">
<cuboid min="56,33,-1" max="57,35,2"/>
</portal>
</portals>

➡️ Set a 10 minute time limit for the map, team with the most points after time is up wins.

<!-- Gain 1 point for killing a player by default, team with most points after 10 minutes wins -->
<score>
<time>10m</time>
</score>

➡️ We don't want an excessive amount of items dropped on the map, so this allows us to manage how to deal with dropped items more easily.

<!-- These items will drop, players that already have these items can pick it up and will be merged -->
<toolrepair>
<tool>stone sword</tool>
<tool>bow</tool>
<tool>shears</tool>
</toolrepair>
<!-- All of these items will be automatically removed when dropped -->
<itemremove>
<item>leather helmet</item>
<item>leather chestplate</item>
<item>leather leggings</item>
<item>leather boots</item>
<item>arrow</item>
<item>ladder</item>
<item>cooked chicken</item>
<item>glass bottle</item>
<item>golden apple</item>
<item>clay ball</item>
<item>glowstone dust</item>
<item>string</item>
</itemremove>

➡️ Give players a golden apple for killing an enemy.

<!-- Player gets a golden apple after killing a player -->
<killreward>
<item>golden apple</item>
</killreward>

➡️ This makes TNT instantly ignite when placed, and stops them from damaging any blocks.

<!-- TNT will automatically ignite when placed -->
<!-- TNT will not break any blocks but still cause damage to players -->
<tnt>
<instantignite>on</instantignite>
<blockdamage>off</blockdamage>
</tnt>

➡️ We use the disable damage module to configure who gets damage from TNT explosions.

<!-- TNT damages enemies and self, but not teammates -->
<disabledamage>
<damage ally="true" self="false" enemy="false" other="false">block explosion</damage>
</disabledamage>

➡️ Close the main <map> module.

</map>