<?php
class DungeonConstante
{
public static $RULES_URL="http://dungeon.no-ip.info/modules/dungeon/rules/rules.php";
public static $PLAYER_LEVEL_NEWBIE = 30;
public static $WEAPON_DEFAULT_DAMAGE=3;
public static $LOW_ARMOR = 2;
public static $MEDIUM_ARMOR = 4;
public static $HIGH_ARMOR = 6;
public static $PLAYER_TYPE_DUNGEON_MASTER = 0;
public static $PLAYER_TYPE_HUMAN_KNIGHT = 1;
public static $PLAYER_TYPE_UNDEAD = 2;
public static $ZONE_TYPE_RUINS = 4;
public static $ZONE_TYPE_ROCK = 5;
public static $ZONE_TYPE_BARRACK = 6;
public static $ZONE_TYPE_GOLD = 7;
public static $ZONE_TYPE_GOLD_EXPLOITED = 8;
public static $ZONE_TYPE_TREASURE = 9;
public static $ZONE_TYPE_CITY = 15;
public static $ZONE_TYPE_STONE = 17;
public static $ZONE_TYPE_ROAD = 18;
public static $ZONE_TYPE_DOOR = 19;
public static $ZONE_TYPE_NECROPOLIS = 20;
public static $ZONE_TYPE_STAIR = 21;
/**Multiplier for moving*/
public static $DOOR_ZONE_MOVE_COST_FACTOR = 0.5;
public static $ROAD_ZONE_MOVE_COST_FACTOR = 0.25;
public static $STAIR_ZONE_MOVE_COST_FACTOR = 0.5;
public static $SURFACE_ZONE_MOVE_COST_FACTOR = 0.75;
public static $GOLD_ROOM_MOVE_COST = 2.0;
public static $CITY_MAX_GOLD = 1000000;
public static $TREASURE_MAX_GOLD = 300000;
public static $NECROPOLIS_MAX_GOLD = 300000;
public static $HUMAN_RATIO_GOLD_POWER=1.25;
public static $DUNGEON_MASTER_RATIO_GOLD_POWER=1.25;
public static $UNDEAD_RATIO_GOLD_POWER=1.25;
public static $EARN_GOLD_PER_ZONE_EXPLOITED=200;
public static $CASH_EARN_BY_LEVEL=1000;
public static $EARN_PER_POPULATION=20;
public static $MAX_POPULATION_PER_ZONE = 10000;
public static $POPULATION_LOSS_FOR_UNIT_CREATION = 16000;
public static $PILLAGE_POPULATION_PER_TURN=5000;
public static $PILLAGE_EVIL_POINTS_EARNED=3;
public static $PILLAGE_EVIL_POINTS_EARNED_PAR_LE_PILLARD=2;
/**if cash < 0 then income is -cash*thisConstante*/
public static $FACTOR_TO_SET_CASH_TO_ZERO=0.25;
/**if cash < 0 then shame+=-cash*thisConstante*/
public static $FACTOR_FOR_SHAME=0.01;
/**shame=shame*thisConstante (whatever is cash)*/
public static $FACTOR_TO_SET_SHAME_TO_ZERO=0.9;
/**Multiply price of unit to find the current upkeep, only for unit recruitment*/
public static $UPKEEP_PRICE_MUX=0.025;
public static $UNIT_ARE_HAPPY_AT_HOME_FACTOR=0.05;
//<action list>
public static $ACTION_BUY_BLOCK = 1004;
public static $ACTION_BUY_TANK = 1005;
public static $ACTION_BUILD_BARRACK = 1006;
public static $ACTION_BUILD_TREASURE = 1007;
public static $ACTION_BUILD_CITY = 1008;
public static $ACTION_EXPLOIT_GOLD = 1009;
public static $ACTION_STOP_EXPLOIT_GOLD = 1010;
public static $ACTION_BUILD_ROAD = 1013;
public static $ACTION_BUILD_DOOR = 1014;
public static $ACTION_BUILD_WALL = 1015;
public static $ACTION_BUILD_NECROPOLIS = 1016;
public static $ACTION_BUILD_STAIR = 1017;
public static $ACTION_CONQUER_BLOCK = 1011;
public static $ACTION_RELEASE_BLOCK = 1012;
public static $ACTION_DUNGEON_PLAYER_START = 2000;
public static $ACTION_HUMAN_PLAYER_START = 2001;
//</action list>
//<cost list>
public static $ACTION_CHANGE_ZONE_TYPE_PLAIN_COST = 5000;
public static $ACTION_BUY_BLOCK_COST=200000;
public static $ACTION_BUY_BARRACK_COST=50000;
public static $ACTION_BUY_TREASURE_COST = 200;
public static $ACTION_BUY_NECROPOLIS_COST = 200;
public static $ACTION_BUY_CITY_COST = 200;
public static $ACTION_BUILD_ROAD_COST = 50;
public static $ACTION_BUILD_DOOR_COST = 200;
public static $ACTION_BUILD_STAIR_COST = 300;
//</cost list>
public static $DEFAULT_TIME_TO_LOST_CONTROL = 20;
/**Upkeep for barrack if player has two or more*/
public static $UPKEEP_BY_BARRACK_BEGIN_TWO = 1000;
public static $UPKEEP_BY_BLOCK_OWNING = 100;
public static $INCOME_LORD_BEING = 5000;
public static $PILLAGE_GOLD_PER_TURN=500000;
public static $PILLAGE_RATIO_FOR_TARGET_PLAYER=0.05;
public static $PILLAGE_RATIO_FOR_PILLER_PLAYER=0.1;
//<action list>
public static $ACTION_BUILD_GRUNT = 10000;
public static $ACTION_BUILD_WARORK = 10004;
public static $ACTION_BUILD_MINERORK = 10005;
public static $ACTION_BUILD_SOLDIER = 10001;
public static $ACTION_BUILD_KNIGHT = 10006;
public static $ACTION_BUILD_MINER = 10007;
public static $ACTION_BUILD_SKELETON = 10003;
public static $ACTION_BUILD_SPECTRE = 10008;
public static $ACTION_BUILD_DEAD_WORM = 10009;
public static $ACTION_BUILD_MONSTER_NEST = 10010;
public static $ACTION_LAVA_SPELL = 10021;
public static $ACTION_ZIZANY_SPELL = 10022;
public static $ACTION_RECRUIT_SPELL = 10023;
public static $ACTION_DISBAND_SPELL = 10024;
public static $ACTION_BUILD_TRAP = 10002;
public static $ACTION_BUILD_RALLY_POINT_1 = 10011;
public static $ACTION_BUILD_RALLY_POINT_2 = 10012;
public static $ACTION_BUILD_RALLY_POINT_3 = 10013;
public static $ACTION_BUILD_RALLY_POINT_4 = 10014;
public static $ACTION_BUILD_RALLY_POINT_5 = 10015;
public static $ACTION_BUILD_RALLY_POINT_6 = 10016;
public static $ACTION_BUILD_RALLY_POINT_7 = 10017;
public static $ACTION_BUILD_RALLY_POINT_8 = 10018;
public static $ACTION_BUILD_RALLY_POINT_9 = 10019;
public static $ACTION_BUILD_RALLY_POINT_10 = 10020;
public static $ACTION_BUILD_STONE = 11000;
public static $ACTION_OBJECT_DIG = 11001;
public static $ACTION_BLOCK_DIG = 11002;
public static $ACTION_OBJECT_SEARCH_TRAP = 11003;
public static $ACTION_BUILD_ROCK = 11004;
public static $ACTION_KILL_OBJECT = 11005;
//</action list>
public static $DEFAULT_PERCENT_FIND_TRAP = 70;
public static $MAX_EVIL_POINT = 2500;
//<cost list>
public static $ACTION_BUY_MONSTER_NEST_COST = 300;
public static $ACTION_BUY_ZIZANY_SPELL_COST = 50;
public static $ACTION_BUY_LAVA_SPELL_COST = 100;
public static $ACTION_BUY_RECRUIT_SPELL_COST = 0;
public static $ACTION_BUY_DISBAND_SPELL_COST = 0;
public static $ACTION_BUY_GRUNT_COST = 10000;
public static $ACTION_BUY_MINER_ORK_COST = 12500;
public static $ACTION_BUY_WAR_ORK_COST = 15000;
public static $ACTION_BUY_DEADWORM_COST = 18750;
public static $ACTION_BUY_SPECTRE_COST = 22500;
public static $ACTION_BUY_SKELETON_COST = 15000;
public static $ACTION_BUY_SOLDIER_COST = 10000;
public static $ACTION_BUY_KNIGHT_COST = 15000;
public static $ACTION_BUY_MINER_COST = 12500;
public static $ACTION_BUY_TRAP_COST = 10000;
public static $ACTION_BUY_STONE_COST = 40;
public static $ACTION_BUY_ROCK_COST = 15;
public static $ACTION_DIG_COST = 20;
public static $ACTION_RELEASE_BLOCK_COST = 0;
//</cost list>
public static $ZONE_ROCK_STRENGTH_START = 10000;
public static $ZONE_ROCK_STRENGTH_FOR_ROCK = 10000;
public static $ZONE_ROCK_STRENGTH_FOR_STONE = 90000;
public static $ZONE_ROCK_STRENGTH_FOR_DOOR = 60000;
public static $ZONE_DIG_UNIT_PER_ACTION = 10000;
public static $ZONE_INFO_TYPE1_ROCK_STRENGTH=10000;
public static $ZONE_INFO_TYPE2_CURRENT_ROCK_STRENGTH=10000;
//public static $ZONE_INFO_TYPE1_ROCK_IMAGE=10001;
//public static $ZONE_INFO_TYPE2_ROCK_HAS_BEEN_MODIFIED=10002;
public static $BLOCK_INFO_TYPE1_ROCK_IMAGE=10001;
public static $BLOCK_INFO_TYPE2_ROCK_HAS_BEEN_MODIFIED=10002;
public static $BLOCK_INFO_TYPE2_ROCK_IMAGE_PATH_NUM=10003;
public static $BLOCK_INFO_TYPE2_ROCK_IMAGE_MODIFIER_COUNT=10004;
public static $BLOCK_INFO_TYPE2_ROCK_IMAGE_TIMESTAMP=10005;
public static $ZONE_INFO_TYPE1_DIG=10010;
public static $ZONE_INFO_TYPE2_CURRENT_DIG=10010;
//<unitlist>
public static $REAL_OBJECT_TYPE_TRAP=7;
public static $REAL_OBJECT_INFO_VALUE_TRAP_IMAGE=40000;
public static $REAL_OBJECT_TYPE_RALLY_POINT=101;
public static $REAL_OBJECT_INFO_VALUE_RALLY_POINT_IMAGE=40001;
public static $REAL_OBJECT_TYPE_SOLDIER=6;
public static $REAL_OBJECT_INFO_VALUE_SOLDIER_IMAGE=31000;
public static $REAL_OBJECT_TYPE_KNIGHT=9;
public static $REAL_OBJECT_INFO_VALUE_KNIGHT_IMAGE=31001;
public static $REAL_OBJECT_TYPE_MINER=10;
public static $REAL_OBJECT_INFO_VALUE_MINER_IMAGE=31002;
public static $REAL_OBJECT_TYPE_GRUNT=5;
public static $REAL_OBJECT_INFO_VALUE_GRUNT_IMAGE=30000;
public static $REAL_OBJECT_TYPE_MINER_GRUNT=11;
public static $REAL_OBJECT_INFO_VALUE_MINER_GRUNT_IMAGE=30001;
public static $REAL_OBJECT_TYPE_WAR_GRUNT=12;
public static $REAL_OBJECT_INFO_VALUE_WAR_ORK_IMAGE=30002;
public static $REAL_OBJECT_TYPE_SKELETON=8;
public static $REAL_OBJECT_INFO_VALUE_SKELETON_IMAGE=32000;
public static $REAL_OBJECT_TYPE_SPECTRE=13;
public static $REAL_OBJECT_INFO_VALUE_SPECTRE_IMAGE=32001;
public static $REAL_OBJECT_TYPE_DEADWORM=14;
public static $REAL_OBJECT_INFO_VALUE_DEADWORM_IMAGE=32002;
public static $REAL_OBJECT_TYPE_MONSTER_NEST=100;
public static $REAL_OBJECT_INFO_VALUE_MONSTER_NEST_IMAGE=32003;
//</unitlist>
public static $REAL_OBJECT_CATEGORY_MEDIUM_TANK=2;
public static $REAL_OBJECT_CATEGORY_MEDIUM_INFANTERY=5;
public static $REAL_OBJECT_CATEGORY_DECORUM=7;
public static $REAL_OBJECT_CATEGORY_MEDIUM_CIVILIAN_BUILDING=9;
public static $REAL_OBJECT_CATEGORY_TRAP=999;
public static $REAL_OBJECT_CATEGORY_TURRET=1000;
public static $FOW_IS_ACTIVATED = false;
public static $AUTO_CONQUER_ON_MOVE_IS_ACTIVATED=true;
public static function calculateXpUnitAboutPopulation($parAveragePopulationBlock) {
return round($parAveragePopulationBlock/1000.0*generateURand(2)*2);
}
}
?>