struct attack_data
{
ATTACK_DATA *next; // only used in clean up and recycling purposes, as in putting it into a free pointer list to re-use it like how char_data works
char *string; // A string for the name of the attack, it gets used by damage_mes and in my parry, dodge and shield block functions
long raw_damage; // Unmodified damage, both one_attack and raw_damage modify this as it passes through (sanc, hitting a sleeping victim etc etc)
int damtype; // Used in raw_damage to determine res/vuln/imm flags or however you have that set up.
int raw_accuracy; // your 1-100 range, I also included -1 as being an unavoidable hit
long flags; // I defined ones for parriable and shield block'abe etc, you'll want a flag for magic attack so that one_attack knows to check your saves system against it
OBJ_DATA *obj; // typically the wield weapon but good if you want alternate attacks where an object is involved(dual wield immediately apparent)
};
attack=new_attack();
attack->raw_damage=dice(level,12);
attack->string=str_dup("acid blast");
attack->damtype=DAM_ACID;
attack->raw_accuracy=60+level;
attack->defense_flags=ATTACK_DEF_SB|ATTACK_MAGIC; // shield block'able, also this attack is magic so anti-magic defenses are called within one_attack
one_attack(ch,victim,attack);
any ways I have taken my skills and set them up to run through the hit function *which I renamed and redesined a slight bit for skills and spells* any ways thing is I dont want all skills to hit the same nore do I want all skills to be the same my goal to add another field somehow to all my skills that adds an accuracy bonus only for that skill to your dice roll.
my general problem is I have no clue where to start to go about this and I was hopeing for some sagestions I was thinking about placeing it right in the skill function itself but have only basic knowledge of code *mostly reading it sadly* and dont know how to make it check the command beeing exicuted for possabole bonuses but there could also be a better way to do this I want it as easaly editabole and versitaile as possabole this way I could make the bonus dependent on more then one variabole and keep it from static
any ways to better convey what I meen I will try an exampole useing kick and punch lets say max accuracy to hit is 100 for eases sake
kick bonus 60
punch bonus 40
so when attacking kick would have a 6 in 10 chance of hitting with its bonus punch only a 4 in 10 this is just the raw chance without factoring in the dice roll
now that is more of a static bonus what I idealy want to be abile to set up is
kick bonus 60 + character levle /10 + skill level / 3
punch bonus 40 + character level / 5 + skill level /2
this would make accuaracy grow with your caracter so that skills dont become obsolite
I hope I was abile to make it clear enough to understand if not I shall try again in the morning as right now its late and I am exhosted from cooking food all day