My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
CannonsFormulas  
A look at some of the more interesting formulas in Cannons
Updated May 7, 2008 by pindi.al...@gmail.com

Variables in ALL CAPS represent options at the beginning of the game

Damage

Damage calculation

max_distance = 20*power + 20
damage_from_explosion = floor( 200*power / max(distance-13, 10))

power:
flare = 0.5
small missile = 1
large_missile = 2
atom_bomb = 4
fusion_bomb = 8
supernova = 16
hypernova = 64

Damage mitigation

shield_absorb = (shield/2+50)/100  (0 if shield=0)
armor_absorb = armor/100
throughshield = damage * DAMAGE_FACTOR * shield_absorb
througharmor = throughshield * armor_absorb
shield_damge = round(damage - throghshield)
armor_damage = round(throughshield-througharmor)*0.4

if upgrade = EM:
   shield_damage *= 2
if upgrade = Armor Piercing:
   armor_damage *= 5

Score

The "min()"s cap the points you get for damage at slightly above the original amount, so you don't get much score for doing 100 damage to someone with 10 health.

score = min(structure_damage, original_structure + 20)*200 + min(shield_damage, original_shield) * 50 * MONEY_FACTOR

Sign in to add a comment
Powered by Google Project Hosting