Esempio n. 1
0
function getBuildingVariables($strRace)
{
    include_once 'inc/functions/races.php';
    // OUTPUT ==================================================================
    if (in_array($strRace, getRaces('Winged'))) {
        $homes = "Eyries";
        $farms = "Crofts";
    } elseif (in_array($strRace, getRaces('Cursed'))) {
        $homes = "Crypts";
        $farms = "Sewage Farms";
    } elseif (in_array($strRace, getRaces('Elves'))) {
        $homes = "Houses";
        $farms = "Fields";
    } elseif (in_array($strRace, getRaces('Orks'))) {
        $homes = "Dwellings";
        $farms = "Pig Farms";
    } elseif (in_array($strRace, getRaces('Humans'))) {
        $homes = "Hovels";
        $farms = "Grain Farms";
    }
    $arrOutput = array(1 => $homes, $farms, 'Walls', 'Weaponries', 'Guilds', 'Mines', 'Markets', 'Labs', 'Churches', 'Guard Houses', 'Banks', 'Hideouts', 'Academies', 'Yards');
    // TOOL TIPS ===============================================================
    $arrToolTips = array(1 => 'Provide housing for military and citizens', 'Produce food for your population', 'Adds to the defence of your military', 'Adds to the offence of your military', 'Generate and store mana points', 'Produce money for your tribe', 'Reduce costs for constructing and exploring', 'Produce research points for your alliance', 'Adds protection against magic', 'Adds protection against thievery', 'Produce money for your tribe, depending on citizens', 'Generate and store thievery points', 'Increase your mage level', 'Produce logs for your tribe');
    // VARIABLES ===============================================================
    $arrVariables = array(1 => HOMES, FARMS, WALLS, WEAPONRIES, GUILDS, MINES, MARKETS, LABS, CHURCHES, GUARDHOUSES, BANKS, HIDEOUTS, ACADEMIES, YARDS);
    // HOUSING =================================================================
    $homes_hold = 300;
    $extra_hold = 10;
    $hideouts_hold = $extra_hold;
    if ($strRace == 'Brittonian') {
        $homes_hold = 600;
    } elseif ($strRace == 'High Elf') {
        $homes_hold = 360;
    } elseif ($strRace == 'Dragon') {
        $homes_hold = 50;
        $extra_hold = 5;
    } elseif ($strRace == 'Uruk Hai') {
        $homes_hold = 275;
    } elseif ($strRace == 'Meteor Elf') {
        $hideouts_hold = 150;
    }
    $arrHousing = array(1 => $homes_hold, $extra_hold, $extra_hold, $extra_hold, $extra_hold, $extra_hold, $extra_hold, $extra_hold, $extra_hold, $extra_hold, $extra_hold, $hideouts_hold, $extra_hold, $extra_hold);
    $arrBuildings['output'] = $arrOutput;
    $arrBuildings['tooltips'] = $arrToolTips;
    $arrBuildings['variables'] = $arrVariables;
    $arrBuildings['housing'] = $arrHousing;
    return $arrBuildings;
}
Esempio n. 2
0
function set_spell_vars(&$objUser)
{
    $arrBuild = $objUser->get_builds();
    $intBase = $arrBuild[LAND] * 0.001;
    if ($intBase <= 1) {
        $intBase = 1;
    }
    //==========================================================================
    // Race arrays :)                                       Martel July 02, 2006
    //==========================================================================
    include_once 'inc/functions/races.php';
    //==========================================================================
    // The spells
    //==========================================================================
    $arrSpells = array("defiance" => array("common" => "defiance", "display" => "Defiance", "dbfield" => DEFIANCE, "level" => 100, "acres" => 0, "chance" => 0, "cost" => ceil($intBase * 100), "fame" => 0, "durmin" => 0, "durmax" => 0, "race" => getRaces(), "type" => SPELL_SELF), "elendian" => array("common" => "pop", "display" => "Elendian", "dbfield" => POPULATION, "level" => 1, "acres" => 0, "chance" => 175, "cost" => ceil($intBase * 1), "fame" => 0, "durmin" => 10, "durmax" => 28, "race" => getRaces(), "type" => SPELL_SELF), "matawaska" => array("common" => "birth", "display" => "Matawaska River", "dbfield" => GROWTH, "level" => 1, "acres" => 0, "chance" => 175, "cost" => ceil($intBase * 1), "fame" => 0, "durmin" => 10, "durmax" => 28, "race" => getRaces(), "type" => SPELL_SELF), "lord_of_harvest" => array("common" => "food", "display" => "Lord of Harvest", "dbfield" => FOOD, "level" => 1, "acres" => 0, "chance" => 200, "cost" => ceil($intBase * 1), "fame" => 0, "durmin" => 10, "durmax" => 28, "race" => getRaces(), "type" => SPELL_SELF), "quanta" => array("common" => "income", "display" => "Quanta", "dbfield" => INCOME, "level" => 1, "acres" => 0, "chance" => 160, "cost" => ceil($intBase * 1), "fame" => 0, "durmin" => 10, "durmax" => 28, "race" => getRaces(), "type" => SPELL_SELF), "blaze_of_glory" => array("common" => "offence", "display" => "Ciorin's Blessing", "dbfield" => OFFENCE, "level" => 5, "acres" => 0, "chance" => 100, "cost" => ceil($intBase * 1), "fame" => 0, "durmin" => 15, "durmax" => 28, "race" => getRaces(), "type" => SPELL_SELF), "god_of_war" => array("common" => "defence", "display" => "Deam's hunt", "dbfield" => DEFENCE, "level" => 5, "acres" => 0, "chance" => 100, "cost" => ceil($intBase * 1), "fame" => 0, "durmin" => 15, "durmax" => 28, "race" => getRaces(), "type" => SPELL_SELF), "vision" => array("common" => "vision", "display" => "Vision", "dbfield" => "", "level" => 1, "acres" => 0, "chance" => 200, "cost" => ceil($intBase * 1), "fame" => 0, "durmin" => 0, "durmax" => 0, "race" => getRaces(), "type" => SPELL_ALL), "inner_sight" => array("common" => "inner_sight", "display" => "Inner Sight", "dbfield" => "", "level" => 4, "acres" => 0, "chance" => 220, "cost" => ceil($intBase * 2), "fame" => 2, "durmin" => 0, "durmax" => 0, "race" => getRaces(), "type" => SPELL_ALL), "flyover" => array("common" => "flyover", "display" => "Fly Over", "dbfield" => "", "level" => 6, "acres" => 0, "chance" => 100, "cost" => ceil($intBase * 1), "fame" => 1, "durmin" => 0, "durmax" => 0, "race" => getRaces(), "type" => SPELL_ALL), "fireball" => array("common" => "fireball", "display" => "Fireball", "dbfield" => "", "level" => 9, "acres" => 0, "chance" => 150, "cost" => ceil($intBase * 5), "fame" => 2, "durmin" => 0, "durmax" => 0, "race" => getRaces(), "type" => SPELL_ENEMY), "poison" => array("common" => "poison", "display" => "Poison", "dbfield" => "", "level" => 8, "acres" => 0, "chance" => 180, "cost" => ceil($intBase * 3), "fame" => 4, "durmin" => 0, "durmax" => 0, "race" => getRaces(), "type" => SPELL_ENEMY), "anthrax" => array("common" => "anthrax", "display" => "Anthrax", "dbfield" => "", "level" => 10, "acres" => 0, "chance" => 150, "cost" => ceil($intBase * 4), "fame" => 6, "durmin" => 0, "durmax" => 0, "race" => getRaces(), "type" => SPELL_ENEMY), "cyclops" => array("common" => "cyclops", "display" => "Wrath of Cyclops", "dbfield" => "", "level" => 12, "acres" => 0, "chance" => 125, "cost" => ceil($intBase * 3), "fame" => 4, "durmin" => 0, "durmax" => 0, "race" => getRaces(), "type" => SPELL_ENEMY), "thwart" => array("common" => "thwart", "display" => "Seal of Deflection", "dbfield" => THWART, "level" => 13, "acres" => 0, "chance" => 70, "cost" => ceil($intBase * 2), "fame" => 0, "durmin" => 1, "durmax" => 5, "race" => getRaces(), "type" => SPELL_SELF), "stunted_growth" => array("common" => "stunted_growth", "display" => "Stunted Growth", "dbfield" => STUNTED_GROWTH, "level" => 17, "acres" => 0, "chance" => 130, "cost" => ceil($intBase * 2), "fame" => 2, "durmin" => 4, "durmax" => 16, "race" => getRaces(), "type" => SPELL_ENEMY), "juranimosity" => array("common" => "juranimosity", "display" => "Juranimosity", "dbfield" => "", "level" => 18, "acres" => 0, "chance" => 60, "cost" => ceil($intBase * 10), "fame" => 7, "durmin" => 0, "durmax" => 0, "race" => getRaces(), "type" => SPELL_ENEMY), "salem" => array("common" => "salem", "display" => "Enchantress Salem", "dbfield" => SALEM, "level" => 15, "acres" => 0, "chance" => 80, "cost" => ceil($intBase * 10), "fame" => 10, "durmin" => 1, "durmax" => 1, "race" => getRaces(), "type" => SPELL_ENEMY), "rust" => array("common" => "rust", "display" => "Mystical Rust", "dbfield" => "", "level" => 7, "acres" => 0, "chance" => 200, "cost" => ceil($intBase * 2), "fame" => 1, "durmin" => 0, "durmax" => 0, "race" => getRaces(), "type" => SPELL_ENEMY), "unresearch" => array("common" => "burn_research", "display" => "Unresearch", "dbfield" => "", "level" => 10, "acres" => 0, "chance" => 90, "cost" => ceil($intBase * 5), "fame" => 4, "durmin" => 0, "durmax" => 0, "race" => getRaces(), "type" => SPELL_ENEMY), "magical_void" => array("common" => "magical_void", "display" => "Magical Void", "dbfield" => "", "level" => 20, "acres" => 0, "chance" => 60, "cost" => ceil($intBase * 4), "fame" => 6, "durmin" => 0, "durmax" => 0, "race" => getRaces(), "type" => SPELL_ALL), "dragonapprentice" => array("common" => "dragonapprentice", "display" => "DragonApprentice", "dbfield" => "", "level" => 12, "acres" => 0, "chance" => 100, "cost" => ceil($intBase * 6), "fame" => 6, "durmin" => 0, "durmax" => 0, "race" => getRaces(), "type" => SPELL_ENEMY), "dragonmage" => array("common" => "dragonmage", "display" => "DragonMage", "dbfield" => "", "level" => 25, "acres" => 0, "chance" => 60, "cost" => ceil($intBase * 8), "fame" => 12, "durmin" => 0, "durmax" => 0, "race" => getRaces(), "type" => SPELL_ENEMY), "fountain" => array("common" => "fountain", "display" => "Fountain of Resurrection", "dbfield" => FOUNTAIN, "level" => 22, "acres" => 0, "chance" => 70, "cost" => ceil($intBase * 5), "fame" => 0, "durmin" => 2, "durmax" => 8, "race" => getRaces(), "type" => SPELL_SELF), "cheaters" => array("common" => "cheaters", "display" => "Fry The Cheater", "dbfield" => "", "level" => 100, "acres" => 0, "chance" => 100, "cost" => 0, "fame" => 1000, "durmin" => 0, "durmax" => 0, "race" => array('Dragon'), "type" => SPELL_ALL), "roar" => array("common" => "roar", "display" => "Roar of the Horde", "dbfield" => ROAR, "level" => 15, "acres" => 0, "chance" => 100, "cost" => ceil($intBase * 14), "fame" => 0, "durmin" => 1, "durmax" => 10, "race" => getRaces('Orks'), "type" => SPELL_SELF), "forest" => array("common" => "forest", "display" => "Deep Forest", "dbfield" => FOREST, "level" => 15, "acres" => 0, "chance" => 100, "cost" => ceil($intBase * 14), "fame" => 0, "durmin" => 1, "durmax" => 10, "race" => getRaces('Elves'), "type" => SPELL_SELF), "mortality" => array("common" => "mortality", "display" => "Mortality", "dbfield" => MORTALITY, "level" => 15, "acres" => 0, "chance" => 100, "cost" => ceil($intBase * 14), "fame" => 0, "durmin" => 1, "durmax" => 10, "race" => getRaces('Humans'), "type" => SPELL_SELF), "pest" => array("common" => "pest", "display" => "Pestilence", "dbfield" => PEST, "level" => 15, "acres" => 0, "chance" => 100, "cost" => ceil($intBase * 14), "fame" => 0, "durmin" => 1, "durmax" => 10, "race" => getRaces('Cursed'), "type" => SPELL_SELF), "brood" => array("common" => "brood", "display" => "Brood", "dbfield" => BROOD, "level" => 10, "acres" => 0, "chance" => 100, "cost" => ceil($intBase * 14), "fame" => 0, "durmin" => 1, "durmax" => 10, "race" => getRaces('Winged'), "type" => SPELL_SELF), "XENE" => array("common" => "XENE", "display" => "Wrath of XENE", "dbfield" => "", "level" => 28, "acres" => 0, "chance" => 120, "cost" => ceil($intBase * 6), "fame" => 10, "durmin" => 0, "durmax" => 0, "race" => getRaces(), "type" => SPELL_ENEMY), "virus" => array("common" => "virus", "display" => "Engineered Virus", "dbfield" => VIRUS, "level" => 23, "acres" => 0, "chance" => 75, "cost" => ceil($intBase * 10), "fame" => 11, "durmin" => 1, "durmax" => 4, "race" => getRaces(), "type" => SPELL_WAR), "enforced" => array("common" => "enforced", "display" => "Enforced Honesty", "dbfield" => "", "level" => 19, "acres" => 0, "chance" => 60, "cost" => ceil($intBase * 12), "fame" => 0, "durmin" => 0, "durmax" => 0, "race" => getRaces(), "type" => SPELL_ENEMY), "heal" => array("common" => "heal", "display" => "Heal", "dbfield" => "", "level" => 20, "acres" => 0, "chance" => 100, "cost" => ceil($intBase * 2) * 3, "fame" => 2, "durmin" => 0, "durmax" => 0, "race" => getRaces(), "type" => SPELL_ALLIANCE));
    return $arrSpells;
}
function randomRace($alien, $human, $animal)
{
    $raceArray = array();
    $retrievedArr = getRaces();
    if ($alien) {
        foreach ($retrievedArr["alien"] as $i => $value) {
            raceArray[] = $value;
        }
    }
    if ($human) {
        foreach ($retrievedArr["human"] as $i => $value) {
            raceArray[] = $value;
        }
    }
    if ($animal) {
        foreach ($retrievedArr["animal"] as $i => $value) {
            raceArray[] = $value;
        }
    }
    $count = count($raceArray);
    return raceArray[rand(0, $count)];
}
Esempio n. 4
0
function getSpellBonuses(&$objUser)
{
    include_once 'inc/functions/races.php';
    $arrSpells = $objUser->get_spells();
    $strRace = $objUser->get_stat(RACE);
    $income = 0;
    $food = 0;
    $population = 0;
    $growthrate = 1.05;
    $offence = 0;
    $defence = 0;
    $losses = 0;
    // INCOME ==================================================================
    if ($arrSpells[INCOME] > 0) {
        $income = 0.1;
    }
    // FOOD ====================================================================
    if ($arrSpells[FOOD] > 0) {
        $food = 0.1;
    }
    // POPULATION ==============================================================
    if ($arrSpells[POPULATION] > 0) {
        $population = 0.1;
    }
    // GROWTH ==================================================================
    if ($arrSpells[GROWTH] > 0) {
        $growthrate = 1.15;
    }
    if ($arrSpells[BROOD] > 0) {
        $growthrate += 0.1;
    }
    if ($arrSpells[PEST] > 0 && in_array($strRace, getRaces('Cursed'))) {
        $growthrate += 0.045;
    } elseif ($arrSpells[PEST] > 9) {
        $growthrate = 0.955;
    }
    // OFFENCE =================================================================
    if ($arrSpells[OFFENCE] > 0) {
        $offence = 0.15;
    }
    if ($arrSpells[ROAR] > 0) {
        $offence += 0.1;
    } elseif ($arrSpells[MORTALITY] > 0) {
        $offence += 0.05;
    }
    // DEFENCE =================================================================
    if ($arrSpells[DEFENCE] > 0) {
        $defence = 0.1;
    }
    if ($arrSpells[SALEM] > 0) {
        $defence = 0.0;
    }
    // LOSSES ==================================================================
    if ($arrSpells[FOUNTAIN] > 0) {
        $losses = 0.4;
    }
    $modifiers['income'] = $income;
    $modifiers['food'] = $food;
    $modifiers['population'] = $population;
    $modifiers['growthrate'] = $growthrate;
    $modifiers['offence'] = $offence;
    $modifiers['defence'] = $defence;
    $modifiers['losses'] = $losses;
    return $modifiers;
}
Esempio n. 5
0
    ?>
<br/>
                    <b>Name</b> <?php 
    echo $base['name'];
    ?>
<br/>
                    <b>Category:</b> <?php 
    echo $aa_category[$base['category']];
    ?>
<br/>
                    <b>Classes:</b> <?php 
    echo getClasses($base['classes']);
    ?>
<br/>
                    <b>Races:</b> <?php 
    echo getRaces($base['races']);
    ?>
<br/>
                    <b>Deities:</b> <?php 
    echo getDeities($base['deities']);
    ?>
<br/>
                    <b>Type:</b> <?php 
    echo $aa_type[$base['type']];
    ?>
<br/>
                    <b>Charges:</b> <?php 
    echo $base['charges'];
    ?>
<br/>
                    <b>Enabled:</b> <?php