My code right now:
var/Hitz = 'Graphics/Sounds/Hit.wav'
var/Mizz = 'Graphics/Sounds/Miss.wav'
mob
proc
Fight(mob/User,Type,mob/Target,Combo,Chance)
world <<"DEBUG"
var/damage
if(!prob(Chance))
if(Type == "Heavy")
world << "[User] missed the Heavy attack on [Target]"
if(Type == "Light")
world << "[User] missed the very light attack on [Target]"
if(Type == "Medium")
world << "[User] missed the shot at [Target]"
world << Mizz
return
else
switch(Type)
if("Heavy")
damage = 2*(User.Strength) - Target.Endurance
var/stemina = 0.5*(damage)
world << "DEBUG2"
User.Stamina -= stemina
//if(User.Stamina <= 0)
// User.Stamina = 1
if("Light")
damage = 1*(User.Strength) - Target.Endurance
var/stemina = 0.9*(damage)
world << "DEBUG3"
User.Stamina -= stemina
//if(User.Stamina <= 0)
// User.Stamina = 1
if("Medium")
damage = 1.50*(User.Strength) - Target.Endurance
var/stemina = 0.7*(damage)
world << "DEBUG4"
User.Stamina -= stemina
//if(User.Stamina <= 0)
// User.Stamina = 1
damage = max(0,damage)
world << "WAHTS UPZ"
world << "[User] Punches [Target] with a [Type] attack, doing [damage] damage."
world << Hitz
Target.Health -= damage
if(Target.TKOCheck(User)) return
if(Combo && prob(Combo))
world << "Unbelieveable he does a combo!"
Fight(User,Type,Target,Combo,Chance)
TKOCheck(mob/Attacker)
if(src.Health <= 0)
oview(10, src) << "[src] has been knocked out by [Attacker]!"
Attacker.Wins += 1
src.Lose += 1
Attacker.skillpoints += 2
src.skillpoints += 1