punch
format = "$'punch', $'p'; $anything; ~$mob(oview, user, 0)"
Process(mob/user, T, mob/M)
var/dmgreduc = 25 - M.DamageReduction
var/damage = round((dmgreduc/100)*user.PowerLevel)
// BATTLE CHECKS //
user.CheckInView(M)
//////////////////
if(M.Unconcious == 1)
user << "You can't attack someone who is unconcious you must finish them!"
return
if(T == "right" || T == "r")
// Var Changes //
user.InAction = 1
user.inFight = 1
user.fighting += M
user.Energy -= 3
M.inFight = 1
M.fighting += user
////////////////
// Messages //
user << "<font color=blue><b>You retract your right arm...</b></font>"
user.inview << "[user.name] retracts their right arm..."
M << "<font color=red><b>[user.name] retracts their right arm...</b></font> [M.CheckPowerTips(M.MaxPowerLevel, 1)]"
/////////////
// Execute Attack //
// I want this proc to be cancelled if starting another action such as another punch or kick or something it doesnt matter im confused on how to do it currently ;/
user.Attack(user, M, damage, 1)
///////////////////
proc
mob
proc
Attack(mob/user, mob/M, damage, attacktype)
if(attacktype == 1)
while(user.InAction == 1)
spawn(25 - user.Speed)
M.PowerLevel -= damage
M.Energy -= 3
user << "[damage]"
M << 2
user.inview << 3
user.InAction = 0
M.CheckPower()
break
Problem description:
Trying to figure a good way to cancel an attack to make a attack faking system say you start an attack and it takes a moment to take effect but then you do the same attack again you want the last one to cancel out and the new one proceed.