12-11-2009, 11:55 AM
I tried to post this:
and got:

Quote:/* All formulas take from http://tibia.wikia.com/wiki/Formulas */
#include <stdio.h>
int main()
{
float min, max, average;
int creature_atk,
shield,
total_armor,
shielding,
defense_factor,
atk_mode;
printf("Creature atk: ");
scanf("%5d", &creature_atk);
printf("Shield + modifier: ");
scanf("%2d", &shield);
printf("Total armor: ");
scanf("%2d", &total_armor);
printf("Shielding skill: ");
scanf("%3d", &shielding);
printf("Attacking mode: atk=0, bal=1, def=2: ");
scanf("%1d", &atk_mode);
switch(atk_mode)
{
case 0:
defense_factor = 5;
break;
case 1:
defense_factor = 7;
break;
case 2:
defense_factor = 10;
break;
}
min = total_armor * 0.475;
max = (total_armor * 0.95) - 1;
average = (float) creature_atk - (float) shield * ((float) shielding * (float) defense_factor / 100.0) - ((float) creature_atk / 100.0) * (float) total_armor;
printf("Min damage reduction: %.2f\n", min);
printf("Max damage reduction: %.2f\n", max);
printf("Average damage: %.2f\n", average);
return 0;
}
and got:
Quote:Akismet has detected that this is a spam message and will not be processed.
If you find this is in error please contact your forum administrator.
You may return to the thread here.
Alternatively, return to the forum.
