but maybe it will be usefull for someone.
This is very similar to what FPS, MMORPG, RPG's etc do.
Code: Select all
Procedure.l GetPlayerAttackDamage(level.l,strength.l,weapon.l)
;This is our magic. add more *(whatever/level) to include more stats.
multiplier.f=(weapon/level)*(strength/level)
If multiplier>1.2 ;max 20% OE (over equipping) allowed, more and give a penalty.
multiplier=1.0/multiplier
If multiplier<0.5
multiplier=0.5 ;max 50% penalty, give them a fighting chance.
EndIf
EndIf
ProcedureReturn (level*multiplier)
EndProcedure
playerlevel.l=10
playerstrength.l=10
playerweapon.l=10
playerdamage.l=GetPlayerAttackDamage(playerlevel,playerstrength,playerweapon)
Debug "A level "+Str(playerlevel)+" player"
Debug "with level "+Str(playerstrength)+" strength"
Debug "and level "+Str(playerweapon)+" weapon"
Debug "can do "+Str(playerdamage)+" damage."playerlevel.l=10
playerstrength.l=10
playerweapon.l=10
values to see how the OE (over equipping) behaves, how much the penalty is.
