Initial upload
Initial upload. PRC8 has been added. Module compiles, PRC's default AI & treasure scripts have been integrated. Started work on top hak for SLA / Ability / Scripting modifications.
This commit is contained in:
56
_module/nss/x2_im_getcostdc.nss
Normal file
56
_module/nss/x2_im_getcostdc.nss
Normal file
@@ -0,0 +1,56 @@
|
||||
//
|
||||
#include "prc_x2_craft"
|
||||
#include "jw_inc_craft"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
object oBackup = CIGetCurrentModBackup(oPC);
|
||||
object oNew;
|
||||
int nDC;
|
||||
int nCost;
|
||||
|
||||
oNew = CIGetCurrentModItem(oPC);
|
||||
|
||||
if (CIGetCurrentModMode(oPC) == X2_CI_MODMODE_ARMOR)
|
||||
{
|
||||
if (GetIsObjectValid(oNew))
|
||||
{
|
||||
nDC = CIGetArmorModificationDC(oBackup, oNew );
|
||||
nCost = CIGetArmorModificationCost(oBackup, oNew );
|
||||
}
|
||||
}
|
||||
else if (CIGetCurrentModMode(oPC) == X2_CI_MODMODE_WEAPON)
|
||||
{
|
||||
if (GetIsObjectValid(oNew))
|
||||
{
|
||||
nCost = CIGetWeaponModificationCost(oBackup,oNew); //CIGetArmorModificationCost(CIGetCurrentModBackup(oPC),oNew);;
|
||||
nDC= JWGetWeaponModificationDC (oBackup,oNew) ;
|
||||
}
|
||||
}
|
||||
else if (CIGetCurrentModMode(oPC) == X2_CI_MODMODE_HELMET)
|
||||
{
|
||||
if (GetIsObjectValid(oNew))
|
||||
{
|
||||
nCost = 100; // any helmet design for 100
|
||||
nDC= 10 ; // DC is10
|
||||
}
|
||||
}
|
||||
else if (CIGetCurrentModMode(oPC) == X2_CI_MODMODE_SHIELD)
|
||||
{
|
||||
if (GetIsObjectValid(oNew))
|
||||
{
|
||||
nDC=JWGetShieldModificationDC(oNew); // from 5 to 25
|
||||
nCost=JWGetShieldModificationCost(oNew); // from 50 to 800
|
||||
}
|
||||
}
|
||||
|
||||
if (GetIsDM(GetPCSpeaker())||GetIsDMPossessed(GetPCSpeaker()))
|
||||
{
|
||||
nCost=0;
|
||||
nDC=0;
|
||||
}
|
||||
|
||||
CIUpdateModItemCostDC(oPC, nDC, nCost);
|
||||
//CISetDefaultModItemCamera(oPC);
|
||||
}
|
||||
Reference in New Issue
Block a user