Disabled debug on prc_coc

Disabled debug on prc_coc
This commit is contained in:
Jaysyn904 2024-05-29 07:24:42 -04:00
parent 99740b2249
commit 31a7a88252
2 changed files with 14 additions and 14 deletions

Binary file not shown.

View File

@ -49,12 +49,12 @@ void SuperiorDefense(object oPC, int nLevel)
int nMithral = 0; int nMithral = 0;
int nBonus = 0; int nBonus = 0;
SendMessageToPC(GetFirstPC(), "DEBUG: prc_coc -> PC's DEX bonus is "+ IntToString(nDEXb)+"."); //SendMessageToPC(GetFirstPC(), "DEBUG: prc_coc -> PC's DEX bonus is "+ IntToString(nDEXb)+".");
//:: Abort CoC & Mithral checks if not wearing armor //:: Abort CoC & Mithral checks if not wearing armor
if (oArmor == OBJECT_INVALID) if (oArmor == OBJECT_INVALID)
{ {
SendMessageToPC(GetFirstPC(), "DEBUG: prc_coc -> No armor found, aborting."); //SendMessageToPC(GetFirstPC(), "DEBUG: prc_coc -> No armor found, aborting.");
SetCompositeBonus(oSkin, "SuperiorDefenseDexBonus", 0, ITEM_PROPERTY_AC_BONUS); SetCompositeBonus(oSkin, "SuperiorDefenseDexBonus", 0, ITEM_PROPERTY_AC_BONUS);
SetCompositeBonus(oSkin, "PRC_CRAFT_MITHRAL", 0, ITEM_PROPERTY_AC_BONUS); SetCompositeBonus(oSkin, "PRC_CRAFT_MITHRAL", 0, ITEM_PROPERTY_AC_BONUS);
return; return;
@ -62,12 +62,12 @@ void SuperiorDefense(object oPC, int nLevel)
//:: Determine the base AC value of the armor //:: Determine the base AC value of the armor
int nAC = GetBaseAC(oArmor); int nAC = GetBaseAC(oArmor);
SendMessageToPC(GetFirstPC(), "DEBUG: prc_coc -> Base AC is "+ IntToString(nAC)+"."); //SendMessageToPC(GetFirstPC(), "DEBUG: prc_coc -> Base AC is "+ IntToString(nAC)+".");
//:: Get modifier for Mithral armor, if any. //:: Get modifier for Mithral armor, if any.
if(StringToInt(GetStringLeft(GetTag(oArmor), 3)) & 16) //:: TAG ID for Mithral armor if(StringToInt(GetStringLeft(GetTag(oArmor), 3)) & 16) //:: TAG ID for Mithral armor
{ {
SendMessageToPC(GetFirstPC(), "DEBUG: prc_coc -> Mithral armor found. +2 Max DEX Bonus"); //SendMessageToPC(GetFirstPC(), "DEBUG: prc_coc -> Mithral armor found. +2 Max DEX Bonus");
nMithral = 2; nMithral = 2;
nBonus = nBonus + 2; nBonus = nBonus + 2;
} }
@ -75,43 +75,43 @@ void SuperiorDefense(object oPC, int nLevel)
//:: Get the maximum Dexterity bonus from armor.2da //:: Get the maximum Dexterity bonus from armor.2da
string sMaxDexBonus = Get2DACache("armor", "DEXBONUS", nAC); string sMaxDexBonus = Get2DACache("armor", "DEXBONUS", nAC);
int nMaxDexBonus = StringToInt(sMaxDexBonus); int nMaxDexBonus = StringToInt(sMaxDexBonus);
SendMessageToPC(GetFirstPC(), "DEBUG: prc_coc -> Armor's Max DEX bonus is "+ IntToString(nMaxDexBonus)+"."); //SendMessageToPC(GetFirstPC(), "DEBUG: prc_coc -> Armor's Max DEX bonus is "+ IntToString(nMaxDexBonus)+".");
//:: Calculate the new bonus from CoC levels //:: Calculate the new bonus from CoC levels
nBonus = 1 + (nLevel - 3) / 3; nBonus = 1 + (nLevel - 3) / 3;
SendMessageToPC(GetFirstPC(), "DEBUG: prc_coc -> nBonus from class levels is "+ IntToString(nBonus)+"."); //SendMessageToPC(GetFirstPC(), "DEBUG: prc_coc -> nBonus from class levels is "+ IntToString(nBonus)+".");
SendMessageToPC(GetFirstPC(), "DEBUG: prc_coc -> nBonus before DEX cap is "+ IntToString(nBonus)+"."); //SendMessageToPC(GetFirstPC(), "DEBUG: prc_coc -> nBonus before DEX cap is "+ IntToString(nBonus)+".");
if (nBonus > nDEXb) //:: Caps AC bonus @ PCs Dex bonus if (nBonus > nDEXb) //:: Caps AC bonus @ PCs Dex bonus
{ {
nBonus == nDEXb; nBonus == nDEXb;
} }
SendMessageToPC(GetFirstPC(), "DEBUG: prc_coc -> nBonus after DEX cap is "+ IntToString(nBonus)+"."); //SendMessageToPC(GetFirstPC(), "DEBUG: prc_coc -> nBonus after DEX cap is "+ IntToString(nBonus)+".");
if (nAC > 3) //:: Medium armor starts @ 4 AC if (nAC > 3) //:: Medium armor starts @ 4 AC
{ {
int nNewDexBonus = nMaxDexBonus + nBonus; int nNewDexBonus = nMaxDexBonus + nBonus;
SendMessageToPC(GetFirstPC(), "DEBUG: prc_coc -> nNewDexBonus is "+ IntToString(nNewDexBonus)+"."); //SendMessageToPC(GetFirstPC(), "DEBUG: prc_coc -> nNewDexBonus is "+ IntToString(nNewDexBonus)+".");
SendMessageToPC(GetFirstPC(), "DEBUG: prc_coc -> nMithral Bonus is "+ IntToString(nMithral)+"."); //SendMessageToPC(GetFirstPC(), "DEBUG: prc_coc -> nMithral Bonus is "+ IntToString(nMithral)+".");
//:: Store the new Dex bonus as deflection AC on the character's skin (should be dodge) //:: Store the new Dex bonus as deflection AC on the character's skin (should be dodge)
SendMessageToPC(GetFirstPC(), "DEBUG: prc_coc -> Final SuperiorDefenseDexBonus is "+ IntToString(nNewDexBonus + nMithral)+"."); //SendMessageToPC(GetFirstPC(), "DEBUG: prc_coc -> Final SuperiorDefenseDexBonus is "+ IntToString(nNewDexBonus + nMithral)+".");
SetCompositeBonus(oSkin, "SuperiorDefenseDexBonus", nNewDexBonus + nMithral, ITEM_PROPERTY_AC_BONUS); SetCompositeBonus(oSkin, "SuperiorDefenseDexBonus", nNewDexBonus + nMithral, ITEM_PROPERTY_AC_BONUS);
SendMessageToPC(GetFirstPC(), "DEBUG: prc_coc -> -------------------------------------------"); //SendMessageToPC(GetFirstPC(), "DEBUG: prc_coc -> -------------------------------------------");
} }
else else
{ {
if(nMithral) if(nMithral)
{ {
SendMessageToPC(GetFirstPC(), "DEBUG: prc_coc -> Light Mithral Armor found"); //SendMessageToPC(GetFirstPC(), "DEBUG: prc_coc -> Light Mithral Armor found");
SetCompositeBonus(oSkin, "SuperiorDefenseDexBonus", nMithral, ITEM_PROPERTY_AC_BONUS); SetCompositeBonus(oSkin, "SuperiorDefenseDexBonus", nMithral, ITEM_PROPERTY_AC_BONUS);
} }
else else
{ {
SendMessageToPC(GetFirstPC(), "DEBUG: prc_coc -> Light Armor found"); //SendMessageToPC(GetFirstPC(), "DEBUG: prc_coc -> Light Armor found");
SetCompositeBonus(oSkin, "SuperiorDefenseDexBonus", 0, ITEM_PROPERTY_AC_BONUS); SetCompositeBonus(oSkin, "SuperiorDefenseDexBonus", 0, ITEM_PROPERTY_AC_BONUS);
} }