I need this for a combat system, so i have 2 sprites, Red and Blue.

They both have the variable Chance to attack(CTA), Chance to deffend(CTD)

When they get close I want them to share values of those variables to determine how will the fight turn out

For example:

They enter each others ranges

-Red's CTA is 5, Blue's CTA is 4

-1 for Red he now has 10% percent chance to go first (10% for each CTA point)

-The chance paid off Red goes first and attackes

Now, they "shared" CTA, but CTD is unique to each

-Blue's CTD is 4 (40% to effectivly deffend)

-he deffends himself

And then it goes again, until one of them loses

So, I am not sure how actually complex it is, it seems pretty hard to me, I tried but nothing good ever comes out of that , i usually end up here lol, so thanks in advance