testutil//NewSkill
icon_state = "magic"
lvlgain = list("soldier" = 10000)
MP = 0
outbattle = 0
difficulty = 4
magictype = Evil
NPC_AI(var/mob/m)
Target_Attack_Ai(m)
Random_Mob(mob/M)
Random_Enemy(M)
Battle_Select_Target(var/mob/M)
if (!M)
M = usr
if (Check_MP(M))
Battle_Group_Select(M)
Cast(var/mob/M)
if (!M)
M = usr
if (Use_Check_MP(M))
Consume_Magic(M)
var/hp
var/base = 20
if (prob(101-M:Fire_skill))
hp = rand(0,5) + base
else
hp = rand(5,10) + base
GSay("<font color = \"#ff8f4f\">\icon[M][M.name] readies \icon[src][src.name].")
Noise()
hp = Damage(hp,target,M)
target.health -= hp
if (hp)
GSay("<font color = red>\icon[target][target.name] is hit by the attack for [hp] points of damage.")
target.FlashMob(target,1,3)
Hit()
else
GSay("<font color = blue>\icon[src][src.name] fails!")
for (var/mob/mm in M.target_mob)
if (prob(65))
mm.totdef = round(mm.totdef*0.85)
GSay("<font color = \"#CC0000\"><b>\icon[mm][mm.name]'s defense is reduced to [mm.totdef]!","CombatLog")
if (mm.lvl<=50)
if (mm.totdef <=50)
GSay("<font color = \"#CC0000\"><b>\icon[mm][mm.name]'s defense cannot go down any further!","CombatLog")
return 0
if (mm.lvl<=10)
if (mm.totdef <= 1)
GSay("<font color = \"#CC0000\"><b>\icon[mm][mm.name]'s defense cannot go down any further!","CombatLog")
return 0
Problem description:
I am the main GM and content creator on this project, but I am not the main programmer. I can do simple grunt work and figure things out given enough time in source, but this has stumped me for months. Also be forewarned: this source is old. As for why I'm not asking the main programmer, he's extremely busy at the moment.
What this skill SHOULD be doing: Deals nominal damage to the target mob. Reduces target mob defense by 15% and caps said defense debuff by a certain determined amount. In this case, target mob's DEF drops to 50 for mobs level 50 and below. If target mob is level 10 or below, capped debuff is to 1 DEF.
What the skill currently is doing: Damage element of the skill is fine. It always seems to just default to allowing mob defense to be reduced to 1.
I'm fully prepared to be told I'm missing something so utterly simple to fix this.