Mod Help - Weapons

Greetings! So I want to start tinkering with Modding although I am no programmer! So ill have lots of questions lol. The first of which is:

Is there a way to create a weapon/enchantment that would allow be to modify damage based on stats like stamina amount, health, or even effects like exhaustion or weariness?

Basically I want to create a weapon that does more damage and maybe even get a move cost discount when stamina is low maybe about 20-25% or at a flat value if thats easier.