func void B_AddFightSkill(var C_Npc slf,var int talent,var int percent)
{
if(talent == NPC_TALENT_1H)
{
if(slf.id == 0)
{
PrintScreen("1H + Bonus",-1,26,FONT_ScreenSmall,10);
};
slf.HitChance[NPC_TALENT_1H] += percent;
if(slf.HitChance[NPC_TALENT_1H] > 100)
{
slf.HitChance[NPC_TALENT_1H] = 100;
};
if(slf.HitChance[NPC_TALENT_1H] < 0)
{
slf.HitChance[NPC_TALENT_1H] = 0;
};
if(slf.HitChance[NPC_TALENT_1H] >= 60)
{
if(slf.id == 0)
{
PrintScreen("1H - add overlay master",-1,28,FONT_ScreenSmall,10);
};
Npc_SetTalentSkill(slf,NPC_TALENT_1H,2);
Mdl_ApplyOverlayMds(slf,"humans_1hST2.mds");
}
else if(slf.HitChance[NPC_TALENT_1H] >= 30)
{
if(slf.id == 0)
{
PrintScreen("1H - add overlay fighter",-1,30,FONT_ScreenSmall,10);
};
Npc_SetTalentSkill(slf,NPC_TALENT_1H,1);
Mdl_ApplyOverlayMds(slf,"humans_1hST1.mds");
}
else
{
if(slf.id == 0)
{
PrintScreen("1H - remove overlay",-1,32,FONT_ScreenSmall,10);
};
Npc_SetTalentSkill(slf,NPC_TALENT_1H,0);
Mdl_RemoveOverlayMds(slf,"humans_1hST1.MDS");
Mdl_RemoveOverlayMds(slf,"humans_1hST2.MDS");
};
};
if(talent == NPC_TALENT_2H)
{
if(slf.id == 0)
{
PrintScreen("2H + Bonus",-1,34,FONT_ScreenSmall,10);
};
slf.HitChance[NPC_TALENT_2H] += percent;
if(slf.HitChance[NPC_TALENT_2H] > 100)
{
slf.HitChance[NPC_TALENT_2H] = 100;
};
if(slf.HitChance[NPC_TALENT_2H] < 0)
{
slf.HitChance[NPC_TALENT_2H] = 0;
};
if(slf.HitChance[NPC_TALENT_2H] >= 60)
{
if(slf.id == 0)
{
PrintScreen("2H + add overlay master",-1,36,FONT_ScreenSmall,10);
};
Npc_SetTalentSkill(slf,NPC_TALENT_2H,2);
Mdl_ApplyOverlayMds(slf,"humans_2hST2.mds");
}
else if(slf.HitChance[NPC_TALENT_2H] >= 30)
{
if(slf.id == 0)
{
PrintScreen("2H - add overlay fighter",-1,38,FONT_ScreenSmall,10);
};
Npc_SetTalentSkill(slf,NPC_TALENT_2H,1);
Mdl_ApplyOverlayMds(slf,"humans_2hST1.mds");
}
else
{
if(slf.id == 0)
{
PrintScreen("2H - remove overlay",-1,40,FONT_ScreenSmall,10);
};
Npc_SetTalentSkill(slf,NPC_TALENT_2H,0);
Mdl_RemoveOverlayMds(slf,"humans_2hST1.MDS");
Mdl_RemoveOverlayMds(slf,"humans_2hST2.MDS");
};
};
if(talent == NPC_TALENT_BOW)
{
if(slf.id == 0)
{
PrintScreen("Bow + Bonus",-1,42,FONT_ScreenSmall,10);
};
slf.HitChance[NPC_TALENT_BOW] += percent;
if(slf.HitChance[NPC_TALENT_BOW] > 100)
{
slf.HitChance[NPC_TALENT_BOW] = 100;
};
if(slf.HitChance[NPC_TALENT_BOW] >= 60)
{
if(slf.id == 0)
{
PrintScreen("Bow + add overlay master",-1,44,FONT_ScreenSmall,10);
};
Npc_SetTalentSkill(slf,NPC_TALENT_BOW,2);
Mdl_ApplyOverlayMds(slf,"humans_bowT2.mds");
}
else if(slf.HitChance[NPC_TALENT_BOW] >= 30)
{
if(slf.id == 0)
{
PrintScreen("Bow + add overlay fighter",-1,46,FONT_ScreenSmall,10);
};
Npc_SetTalentSkill(slf,NPC_TALENT_BOW,1);
Mdl_ApplyOverlayMds(slf,"humans_bowT1.mds");
}
else
{
if(slf.id == 0)
{
PrintScreen("Bow - remove overlay",-1,48,FONT_ScreenSmall,10);
};
Npc_SetTalentSkill(slf,NPC_TALENT_BOW,0);
Mdl_RemoveOverlayMds(slf,"humans_bowT1.MDS");
Mdl_RemoveOverlayMds(slf,"humans_bowT2.MDS");
};
};
if(talent == NPC_TALENT_CROSSBOW)
{
if(slf.id == 0)
{
PrintScreen("CrossBow + Bonus",-1,50,FONT_ScreenSmall,10);
};
slf.HitChance[NPC_TALENT_CROSSBOW] += percent;
if(slf.HitChance[NPC_TALENT_CROSSBOW] > 100)
{
slf.HitChance[NPC_TALENT_CROSSBOW] = 100;
};
if(slf.HitChance[NPC_TALENT_CROSSBOW] >= 60)
{
if(slf.id == 0)
{
PrintScreen("CrossBow + add overlay master",-1,52,FONT_ScreenSmall,10);
};
Npc_SetTalentSkill(slf,NPC_TALENT_CROSSBOW,2);
Mdl_ApplyOverlayMds(slf,"humans_cbowT2.mds");
}
else if(slf.HitChance[NPC_TALENT_CROSSBOW] >= 30)
{
if(slf.id == 0)
{
PrintScreen("CrossBow + add overlay fighter",-1,54,FONT_ScreenSmall,10);
};
Npc_SetTalentSkill(slf,NPC_TALENT_CROSSBOW,1);
Mdl_ApplyOverlayMds(slf,"humans_cbowT1.mds");
}
else
{
if(slf.id == 0)
{
PrintScreen("Crossbow - remove overlay",-1,56,FONT_ScreenSmall,10);
};
Npc_SetTalentSkill(slf,NPC_TALENT_CROSSBOW,0);
Mdl_RemoveOverlayMds(slf,"humans_cbowT1.MDS");
Mdl_RemoveOverlayMds(slf,"humans_cbowT2.MDS");
};
};
};