Difference between revisions of "Barriers"

From TheReincarnation
Jump to: navigation, search
m
m (Building barriers)
Line 9: Line 9:
  
 
==Building barriers==
 
==Building barriers==
* The number of [[Workshops]] does not increase the building rate for barriers (these are magical buildings)
+
* The number of [[Workshops]] does not increase the building rate for barriers (these are magical buildings, only the mage can make them)
** Neither does the [[Engineer]]
+
** Neither does the [[Engineer]] (these are magical buildings, only the mage can make them)
 
* If you build 50 barriers at once you will pay upkeep for 50 barriers for 50 [[turns]] at a cost of 75,000 [[mana]] in upkeep alone.  
 
* If you build 50 barriers at once you will pay upkeep for 50 barriers for 50 [[turns]] at a cost of 75,000 [[mana]] in upkeep alone.  
 
* Building them one turn at a time saves you ~37,500 [[mana]].  
 
* Building them one turn at a time saves you ~37,500 [[mana]].  

Revision as of 13:09, 24 March 2008

Magical barriers block enemy's spells and items to your country. Requiring certain formula and technique, only an Archmage can build a barrier. There's no way to order anything when you are concentrating to build them. Higher rate of barriers will increase the chance of protecting yourself from various kind of magical attacks.

==Effects]]

  • The percentage of barriers on your land determines overall spell resistance
    • Building ~2.66% barriers gives the maximum 75% barrier resistance
    • The skill Barrier Proficiency can raise maximum resistance to 83%.
  • Barriers require 30 m.p./turn upkeep
  • Barriers provide no space for population, vs 10 for wilderness.

Building barriers

  • The number of Workshops does not increase the building rate for barriers (these are magical buildings, only the mage can make them)
    • Neither does the Engineer (these are magical buildings, only the mage can make them)
  • If you build 50 barriers at once you will pay upkeep for 50 barriers for 50 turns at a cost of 75,000 mana in upkeep alone.
  • Building them one turn at a time saves you ~37,500 mana.
    • of course the faster you move, the less you risk being attacked while building barriers...

Program Code of Barriers

Source: [1]

sub spell_resisted {

my $caster_mage = shift;
my $target_mage = shift;
my $spell_color = shift;
my $barrier_resistance = $target_mage->getBarrierResistance() / 100;
my $sl_resistance = 0;
my $barrier_piercing = $caster_mage->{mage_spellpiercing} / 100;
my $color_resistance = 0;
$color_resistance = $target_mage->getResistanceNether() if $spell_color eq 'NETHER';
$color_resistance = $target_mage->getResistancePhantasm() if $spell_color eq 'PHANTASM';
$color_resistance = $target_mage->getResistanceAscendant() if $spell_color eq 'ASCENDANT';
$color_resistance = $target_mage->getResistanceVerdant() if $spell_color eq 'VERDANT';
$color_resistance = $target_mage->getResistanceEradication() if $spell_color eq 'ERADICATION';
$color_resistance = 75 if $color_resistance > 75;
#Spell Penetration also reduces color resistance
$color_resistance -= $caster_mage->{mage_spellpiercing};
$color_resistance = 0 if $color_resistance < 0;
$color_resistance /= 100;
#check barriers
if ( rand() < ($barrier_resistance + $sl_resistance - $barrier_piercing)) {
return 0;
}
#check resistances
if (rand() < $color_resistance) {
return 1;
}
#not blocked
return 2;

}