Difference between revisions of "Barriers"

From TheReincarnation
Jump to: navigation, search
m
m
Line 1: Line 1:
 
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.
 
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.
  
Barriers provide no space for population, vs 10 for wilderness.
+
 
Building barriers:
+
*Barriers provide no space for population, vs 10 for wilderness.
 +
*Barriers require 30 m.p./turn upkeep
 +
 
 +
==Building barriers==
 
* 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:03, 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.


  • Barriers provide no space for population, vs 10 for wilderness.
  • Barriers require 30 m.p./turn upkeep

Building barriers

  • 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;

}