<?php
include_once "../../../site.class.php";
include_once $PATH_TO_CODE."/script/weapon.class.php";
include_once $PATH_TO_CODE."/script/fonction.php";
include_once $PATH_TO_CODE."/modules/dungeon/dungeonconstante.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/dungeonplayer.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/objectmanager.class.php";
include_once $PATH_TO_CODE."/modules/dungeon/dungeonfunction.php";
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
$MAIN_TARGET="/modules/dungeon/";
//$MAIN_TARGET="/script/";
$MAIN_TARGET_2="/modules/dungeon/";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<TITLE>Dungeon Rules</TITLE>
<?php echoBaseHead()?>
<link rel="stylesheet" href="css/phpblock.css" type="text/css" />
<link rel="stylesheet" href="modules/dungeon/css/interface.css" type="text/css" />
</head>
<body class="dungeonstyle">
<h2>The Game</h2>
<p>This <a
href="<?php echo Site::$INSTALLATION_PATH_TO_BASE;?>/<?php echo $MAIN_TARGET?>">game</a>
is an online massive multiplayer turn-based game. You must issue orders
and wait one or two days before they are carried out. Units usually have
a small energy reserve, which allows you to connect once each two days
if you want, but this is not a real-time game.</p>
<h2>Introduction</h2>
<p>Deep in the gloomy underground, there are marvelous gold mines. Men
have therefore decided to seek them; unfortunately, so have done the
people of the underground. Dungeon is a game where players face each
other to obtain as much gold as possible.</p>
<h2>Your Mission</h2>
<p>You are either the chieftain of one of the underground people, or the
war chief of men. Your objective is to conquer a territory and mine its
gold.</p>
<h3>Creating Your Account</h3>
Go to
<a
href="<?php echo Site::$INSTALLATION_PATH_TO_BASE;?>/<?php echo $MAIN_TARGET?>/createplayer.php" />create
player<a />, choose your connection login and your password. You can
also choose the colors of your flag, that your units will proudly carry
throughout the game.
<h2>Block</h2>
<p>Each block is a 5x5 squares region.</p>
<h3>Conquering A Block</h3>
<p>To conquer a block, you need a unit standing on it; choose the option
"conquer a block". There cannot be enemy troops on it.</p>
<h3>Losing A Block</h3>
<p>A block is lost if enemy units stand on it for too long. You can also
voluntarily resign (liberate) a block at the cost of <?php echo getCostString(DungeonConstante::$ACTION_RELEASE_BLOCK_COST)?>,
if it does not contain cities or treasure rooms.
<h2>Militia</h2>
<p>Militia allow you to impose your point of view on your neighbors. It
also allows you to argue if your neighbors wish for diplomacy.</p>
<h3>Recruiting</h3>
<p>You can only hire troops near one of their barracks. Recently-hired
units have a number on them, which indicates the number of turns to wait
before they can be used.</p>
<h4>Human units type</h4>
<ul>
<li><?php echoImageIcone("image/object/miner.png");?> cost: <?php echo DungeonConstante::$ACTION_BUY_MINER_COST?>,
miners are used for fast drilling and trap detection.
<ul>
<li>move cost: <?php echo Constante::$REF_MAX_ACTION_POINT*Miner::$MOVE_COST_FACTOR/1000?>
<li>drill cost: <?php echo Constante::$REF_MAX_ACTION_POINT*1/10/1000?>
<li>find trap cost: <?php echo Constante::$REF_MAX_ACTION_POINT/4/1000?>
<li>shield : 2
<li>precision: -2
<li>damage: <?php echo DungeonConstante::$WEAPON_DEFAULT_DAMAGE;?>
</ul>
<li><?php echoImageIcone("image/object/soldier.png");?> cost: <?php echo DungeonConstante::$ACTION_BUY_SOLDIER_COST?>,
soldiers are an average unit
<ul>
<li>move cost: <?php echo Constante::$REF_MAX_ACTION_POINT*2/10/1000?>
<li>drill cost: <?php echo Constante::$REF_MAX_ACTION_POINT*3/10/1000?>
<li>find trap cost: <?php echo Constante::$REF_MAX_ACTION_POINT/2/1000?>
<li>shield: 4
<li>precision: -1
<li>damage: <?php echo DungeonConstante::$WEAPON_DEFAULT_DAMAGE;?>
</ul>
<li><?php echoImageIcone("image/object/knight.png");?> cost: <?php echo DungeonConstante::$ACTION_BUY_KNIGHT_COST?>,
knights are used for war
<ul>
<li>move cost: <?php echo Constante::$REF_MAX_ACTION_POINT/4/1000?>
<li>drill cost: <?php echo Constante::$REF_MAX_ACTION_POINT*5/10/1000?>
<li>find trap cost: <?php echo Constante::$REF_MAX_ACTION_POINT/2/1000?>
<li>shield: 6
<li>precision: 1
<li>damage: <?php echo DungeonConstante::$WEAPON_DEFAULT_DAMAGE;?>
</ul>
</ul>
<h4>Orkish units type</h4>
<ul>
<li><?php echoImageIcone("image/object/minerork.png");?> cost: <?php echo DungeonConstante::$ACTION_BUY_MINER_ORK_COST?>,
orkish miners are used for fast drilling and trap detection
<ul>
<li>move cost: <?php echo Constante::$REF_MAX_ACTION_POINT*MinerOrk::$MOVE_COST_FACTOR/1000?>
<li>drill cost: <?php echo Constante::$REF_MAX_ACTION_POINT*1/10/1000?>
<li>find trap cost: <?php echo Constante::$REF_MAX_ACTION_POINT/4/1000?>
<li>shield: 2
<li>precision: -2
<li>damage: <?php echo DungeonConstante::$WEAPON_DEFAULT_DAMAGE;?>
</ul>
<li><?php echoImageIcone("image/object/grunt.png");?> cost: <?php echo DungeonConstante::$ACTION_BUY_GRUNT_COST?>,
grunts are an average unit
<ul>
<li>move cost: <?php echo Constante::$REF_MAX_ACTION_POINT*2/10/1000?>
<li>drill cost: <?php echo Constante::$REF_MAX_ACTION_POINT*3/10/1000?>
<li>find trap cost: <?php echo Constante::$REF_MAX_ACTION_POINT/2/1000?>
<li>shield: 4
<li>precision: -1
<li>damage: <?php echo DungeonConstante::$WEAPON_DEFAULT_DAMAGE;?>
</ul>
<li><?php echoImageIcone("image/object/warork.png");?> cost: <?php echo DungeonConstante::$ACTION_BUY_WAR_ORK_COST?>,
orkish warriors are used for war
<ul>
<li>move cost: <?php echo Constante::$REF_MAX_ACTION_POINT/4/1000?>
<li>drill cost: <?php echo Constante::$REF_MAX_ACTION_POINT*5/10/1000?>
<li>find trap cost: <?php echo Constante::$REF_MAX_ACTION_POINT/2/1000?>
<li>shield: 6
<li>precision: 1
<li>damage: <?php echo DungeonConstante::$WEAPON_DEFAULT_DAMAGE;?>
</ul>
</ul>
<h4>Undead units type</h4>
<ul>
<li><?php echoImageIcone("image/object/deadworm.png");?> cost: <?php echo DungeonConstante::$ACTION_BUY_DEADWORM_COST?>,
dead worms are used for fast drilling and trap detection
<ul>
<li>move cost: <?php echo Constante::$REF_MAX_ACTION_POINT*DeadWorm::$MOVE_COST_FACTOR/1000?>
<li>drill cost: <?php echo Constante::$REF_MAX_ACTION_POINT*1/10/1000?>
<li>find trap cost: <?php echo Constante::$REF_MAX_ACTION_POINT/4/1000?>
<li>shield: 2
<li>precision: -2
<li>damage: <?php echo DungeonConstante::$WEAPON_DEFAULT_DAMAGE;?>
</ul>
<li><?php echoImageIcone("image/object/skeleton.png");?> cost: <?php echo DungeonConstante::$ACTION_BUY_SKELETON_COST?>,
skeletons are an average unit
<ul>
<li>move cost: <?php echo Constante::$REF_MAX_ACTION_POINT*2/10/1000?>
<li>drill cost: <?php echo Constante::$REF_MAX_ACTION_POINT*3/10/1000?>
<li>find trap cost: <?php echo Constante::$REF_MAX_ACTION_POINT/2/1000?>
<li>shield: 4
<li>precision: -1
<li>damage: <?php echo DungeonConstante::$WEAPON_DEFAULT_DAMAGE;?>
</ul>
<li><?php echoImageIcone("image/object/spectre.png");?> cost: <?php echo DungeonConstante::$ACTION_BUY_SPECTRE_COST?>,
spectres are used for war
<ul>
<li>move cost: <?php echo Constante::$REF_MAX_ACTION_POINT/4/1000?>
<li>drill cost: <?php echo Constante::$REF_MAX_ACTION_POINT*5/10/1000?>
<li>find trap cost: <?php echo Constante::$REF_MAX_ACTION_POINT/2/1000?>
<li>shield: 6
<li>precision: 1
<li>damage: <?php echo DungeonConstante::$WEAPON_DEFAULT_DAMAGE;?>
</ul>
</ul>
<h3>Upkeep Costs</h3>
<p>All units have (usually high) upkeep costs. Be careful to maintain
your upkeep costs below your income, or you can end up without
alternatives during difficult situations. Generally upkeep is equals to
recrutment price multiply per <?php echo DungeonConstante::$UPKEEP_PRICE_MUX?></p>
<h3>Battling</h3>
<h4>Description</h4>
<p>Troops fight all enemy troops in adjacent squares. Each troop has
action points to be used in battle, called "fight points". These points
are spent during battle and are slowly restored over time.</p>
<h4>Details</h4>
<p>To know if a unit hit an another, you take two random number between 1 and 10, you sum them
and you divide them per 2. You add precision, if you are greater or equals than 0, then
you hit. You add damage with the previous margin, you substract the shield and
you have damage point than unit deals.</p>
<h4>Experience</h4>
Each time unit kills an adversary unit, you earn experience. When unit has
experience point equals to next level value then it changes of level. When it changes
of level it earns action point, fight point, one life point and precision.
<h3>Movement</h3>
<p>If there are no enemy troops nearby, a unit moves one square towards
its destination.</p>
<h4>Change of ground level</h4>
<p>Change of ground level cost <?php echo Constante::$MOVE_Z_COST?> multiply
per move cost action point.
</p>
<h4>Move cost factor</h4>
All surface movement cost are to multiply per <?php echo DungeonConstante::$SURFACE_ZONE_MOVE_COST_FACTOR?>
<ul>
<li><?php echo DungeonZone::staticGetZoneTypeToString(Constante::$ZONE_TYPE_PLAIN); echoImageIcone("image/zoneplain.png");echoImageIcone("image/zoneunderground.png");?>: 1
<li><?php
echo DungeonZone::staticGetZoneTypeToString(DungeonConstante::$ZONE_TYPE_ROAD);
echoImageIcone("image/zoneplainroad.png");
echoImageIcone("image/zoneundergroundroad.png");
?>:
<?php echo DungeonConstante::$ROAD_ZONE_MOVE_COST_FACTOR?>
<li><?php
echoImageIcone("image/city5.png");
echo DungeonZone::staticGetZoneTypeToString(DungeonConstante::$ZONE_TYPE_CITY);
echo " / ";
echoImageIcone("image/treasure5.png");
echo DungeonZone::staticGetZoneTypeToString(DungeonConstante::$ZONE_TYPE_TREASURE);
echo " / ";
echoImageIcone("image/necropolis5.png");
echo DungeonZone::staticGetZoneTypeToString(DungeonConstante::$ZONE_TYPE_NECROPOLIS);
echo ": "; echo DungeonConstante::$GOLD_ROOM_MOVE_COST?>
<li><?php
echoImageIcone("image/zonedoor.png");
echo DungeonZone::staticGetZoneTypeToString(DungeonConstante::$ZONE_TYPE_DOOR);
?>: you have to dig if you are not the owner of the block. If you are the owner or if
block has no owner move cost is <?php echo DungeonConstante::$DOOR_ZONE_MOVE_COST_FACTOR?>
<li><?php
echoImageIcone("image/zonestair.png");
echo DungeonZone::staticGetZoneTypeToString(DungeonConstante::$ZONE_TYPE_STAIR);
?>: you don't paid the cost to change of ground level
(only if stair is in the next zone movement). Default move cost on this zone is
<?php echo DungeonConstante::$STAIR_ZONE_MOVE_COST_FACTOR?>
<li><?php
echoImageIcone("image/zonerock.png");
echo DungeonZone::staticGetZoneTypeToString(DungeonConstante::$ZONE_TYPE_ROCK);
echo " / ";
echoImageIcone("image/zonestone.png");
echo DungeonZone::staticGetZoneTypeToString(DungeonConstante::$ZONE_TYPE_STONE);
?>: you have to dig
<li><?php
echoImageIcone("image/zonegold.png");
echo DungeonZone::staticGetZoneTypeToString(DungeonConstante::$ZONE_TYPE_GOLD);
echo " / ";
echoImageIcone("image/zonegoldexploited.png");
echo DungeonZone::staticGetZoneTypeToString(DungeonConstante::$ZONE_TYPE_GOLD_EXPLOITED);
?>: you can't pass, but it is a block that you have to conquer !
<li><?php
echoImageIcone("image/zonebarracksurface.png");
echoImageIcone("image/zonebarrackunderground.png");
echo DungeonZone::staticGetZoneTypeToString(DungeonConstante::$ZONE_TYPE_BARRACK);
?>: you can't pass
</ul>
<h3>Conquering Territories</h3>
<h4>Conquest</h4>
If your troops stand on a territory without enemies, they can conquer it
with <?php echoImageIcone("image/actiontab/conquer.png")?>.
<h4>Liberation</h4>
If you do not want a block anymore, then you can liberate it with <?php echoImageIcone("image/actiontab/release.png")?>,
at the cost of <?php echo getCostString(DungeonConstante::$ACTION_RELEASE_BLOCK_COST)?>.
<h2>Resources</h2>
<h3>Blocks</h3>
The more blocks you have, the more resources you must pay for their
upkeep, so it is often better to have a limited number of
non-gold-mining blocks.
<h3>Cities and Treasures</h3>
Cities <?php for($i=0; $i <= 5; $i++) {echoImageIcone("image/city$i.png");}?>
represent gold explored by men, while treasures <?php for($i=0; $i <= 5; $i++) {echoImageIcone("image/treasure$i.png");}?>
are the equivalent for the underground people.
<h4>Pillaging</h4>
<p>If an enemy unit stands on your citys or treasure rooms, it loots the
place, redirecting its power to the pillager army. It is important to
protect them very well.</p>
<p>
Each turn of pillaging one a treasure reduces gold of
<?php echo DungeonConstante::$PILLAGE_GOLD_PER_TURN?>.
The pillager earn <?php echo DungeonConstante::$PILLAGE_RATIO_FOR_PILLER_PLAYER*100?>% of
this gold and pillaged lost <?php echo DungeonConstante::$PILLAGE_RATIO_FOR_TARGET_PLAYER*100?>% of power.
</p>
<h3>Income</h3>
The page resource allows you to know how much income you will receive after the next
resource tick.
<h2>Drilling</h2>
<p>An important action is drilling, which can be used to crush rocks
that are in your way, allowing you to expand your controlled areas. You
can drill in two different ways, on one of your blocks where there is a
nearby zone with <?php echoImageIcone("image/actiontab/blockdig.png")?>,
or with a unit <?php echoImageIcone("image/actiontab/objectdig.png")?>.
Drilling with a unit takes more time because the unit must defeat the
rock (each drilling action decreases rock strengh by
<?php echo DungeonConstante::$ZONE_DIG_UNIT_PER_ACTION/100?>),
besides the fact that it costs action points. You can also
reinforce areas with walls.</p>
<p>You can also reinforce areas with walls <?php echoImageIcone("image/zonestone.png")?>.
</p>
<h2>Hiring Units</h2>
<h3>Mobile Units</h3>
<p>You just need to click on a free square near your barracks <?php echoImageIcone("image/zonebarracksurface.png");echoImageIcone("image/zonebarrackunderground.png")?>.
The unit will then show up with a counter on it. The unit will be
unavailable until the counter reaches zero, which takes some time. There
cannot be enemies around your barracks when hiring units, so you must
prepare in advance for enemy attacks.</p>
<p>To move a unit, select it and click on the target square (at the
moment, you can only move it on a straight line). To move a unit up or
down, select the unit, click the <?php echoImageIcone("image/actiontab/up.png")?>
or <?php echoImageIcone("image/actiontab/down.png")?> buttons, and then
click on the target square.</p>
<h3>Traps</h3>
<p>Traps <?php echoImageIcone("image/object/trap.png")?> can be built on
any of your blocks and are usually invisible to enemies. When an enemy
unit steps on a trapped square, the trap can damage the unit, destroy
itself or do nothing. If the unit survives the trap, the trap is
destroyed.</p>
<p>Units can try detecting traps with the action <?php echoImageIcone("image/actiontab/searchtrap.png")?>,
but it is not guaranteed to succeed.</p>
<h2>Action points</h2>
Each unit has action points that allow it to move or to dig. It also has
combat points, allowing the unit to do battle. To obtain information
about a unit, click on it and look at the information zone displayed.
<h2>Ticks</h2>
Go to the page <a
href="<?php echo Site::$INSTALLATION_PATH_TO_BASE;?>/<?php echo $MAIN_TARGET?>/tick/ticker.php">ticker</a>
to find out the dates of the next ticks.
</body>
</html>