Spell & Ability Upgrade
Reorganized hak files & removed duplicates. Added @rafhot's PRC spell & ability level scaling expansion. Further script integration. Full compile.
This commit is contained in:
232
_haks/poa_exp_abilities/prc_kotmc_combat.nss
Normal file
232
_haks/poa_exp_abilities/prc_kotmc_combat.nss
Normal file
@@ -0,0 +1,232 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Knight of the Middle Circle - Combat Sense
|
||||
//:: prc_kotmc_combat.nss
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Applies a temporary AC and Attack bonus vs
|
||||
//:: monsters of the targets racial type
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Stratovarius
|
||||
//:: Created On: July 16, 2004
|
||||
//:://////////////////////////////////////////////
|
||||
#include "inc_item_props" //adicionado por mim, pq na versao 3.5 do prc essa biblioteca nao estava aqui.
|
||||
#include "prc_alterations"
|
||||
#include "prc_class_const"
|
||||
|
||||
|
||||
/*
|
||||
//adicionado essa funcao direto do prc 2.2c do inc_item_props pq o prc mais recente nao tinha essa funcao ou eu nao achei
|
||||
object GetPCSkin(object oPC);
|
||||
|
||||
|
||||
object GetPCSkinKMC(object oPC)
|
||||
{
|
||||
object oSkin = GetItemInSlot(INVENTORY_SLOT_CARMOUR, oPC);
|
||||
if (!GetIsObjectValid(oSkin))
|
||||
{
|
||||
if ( GetHasItem(oPC, "base_prc_skin"))
|
||||
{
|
||||
oSkin = GetItemPossessedBy(oPC,"base_prc_skin");
|
||||
AssignCommand(oPC, ActionEquipItem(oSkin, INVENTORY_SLOT_CARMOUR));
|
||||
}
|
||||
|
||||
//Added GetHasItem check to prevent creation of extra skins on module entry
|
||||
else {
|
||||
oSkin = CreateItemOnObject("base_prc_skin", oPC);
|
||||
AssignCommand(oPC, ActionEquipItem(oSkin, INVENTORY_SLOT_CARMOUR));
|
||||
}
|
||||
}
|
||||
return oSkin;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare main variables.
|
||||
object oPC = OBJECT_SELF;
|
||||
object oSkin = GetPCSkin(oPC);
|
||||
object oWeapon = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC);
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nRace = MyPRCGetRacialType(oTarget);
|
||||
int nClass = GetLevelByClass(CLASS_TYPE_KNIGHT_MIDDLECIRCLE, oPC) + GetLevelByClass(CLASS_TYPE_PALADIN, oPC);
|
||||
int nDur = nClass + 3;
|
||||
int nAC;
|
||||
int nAttack;
|
||||
|
||||
|
||||
|
||||
if (nClass >= 1)
|
||||
{
|
||||
nAC = 2;
|
||||
nAttack = 2;
|
||||
}
|
||||
if (nClass >= 5)
|
||||
{
|
||||
nAC = 4;
|
||||
nAttack = 4;
|
||||
}
|
||||
if (nClass >= 10)
|
||||
{
|
||||
nAC = 6;
|
||||
nAttack = 6;
|
||||
}
|
||||
if (nClass >= 15)
|
||||
{
|
||||
nAC = 8;
|
||||
nAttack = 8;
|
||||
}
|
||||
if (nClass >= 20)
|
||||
{
|
||||
nAC = 10;
|
||||
nAttack = 10;
|
||||
}
|
||||
if (nClass >= 25)
|
||||
{
|
||||
nAC = 12;
|
||||
nAttack = 12;
|
||||
}
|
||||
if (nClass >= 30)
|
||||
{
|
||||
nAC = 14;
|
||||
nAttack = 14;
|
||||
}
|
||||
|
||||
if (nClass >= 35)
|
||||
{
|
||||
nAC = 16;
|
||||
nAttack = 16;
|
||||
}
|
||||
|
||||
if (nClass >= 40)
|
||||
{
|
||||
nAC = 18;
|
||||
nAttack = 18;
|
||||
}
|
||||
|
||||
if (nClass >= 45)
|
||||
{
|
||||
nAC = 20;
|
||||
nAttack = 20;
|
||||
}
|
||||
|
||||
if (nClass >= 50)
|
||||
{
|
||||
nAC = 22;
|
||||
nAttack = 22;
|
||||
}
|
||||
|
||||
if (nClass >= 55)
|
||||
{
|
||||
nAC = 24;
|
||||
nAttack = 24;
|
||||
}
|
||||
|
||||
if (nClass >= 60)
|
||||
{
|
||||
nAC = 26;
|
||||
nAttack = 26;
|
||||
}
|
||||
|
||||
if (nClass >= 65)
|
||||
{
|
||||
nAC = 28;
|
||||
nAttack = 28;
|
||||
}
|
||||
|
||||
if (nClass >= 70)
|
||||
{
|
||||
nAC = 30;
|
||||
nAttack = 30;
|
||||
}
|
||||
|
||||
if (nClass >= 75)
|
||||
{
|
||||
nAC = 32;
|
||||
nAttack = 32;
|
||||
}
|
||||
|
||||
if (nClass >= 80)
|
||||
{
|
||||
nAC = 34;
|
||||
nAttack = 34;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
//codigo antigo prc 2.2c
|
||||
|
||||
if (GetLocalInt(oPC, "KOTMCCombat") == TRUE) return;
|
||||
|
||||
effect eAttack = EffectAttackIncrease(nAttack);
|
||||
effect eAC = EffectACIncrease(nAC);
|
||||
|
||||
VersusRacialTypeEffect(eAttack, nRace);
|
||||
VersusRacialTypeEffect(eAC, nRace);
|
||||
|
||||
SetLocalInt(oPC, "KOTMCCombat", TRUE);
|
||||
DelayCommand(RoundsToSeconds(nDur), DeleteLocalInt(oPC, "KOTMCCombat"));
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/* //codigo prc 3.5 que nao funciona
|
||||
|
||||
if (GetLocalInt(oPC, "KOTMCCombat") == TRUE) return;
|
||||
|
||||
effect eAttack = EffectAttackIncrease(nAttack);
|
||||
effect eAC = EffectACIncrease(nAC);
|
||||
|
||||
eAttack = VersusRacialTypeEffect(eAttack, nRace);
|
||||
eAC = VersusRacialTypeEffect(eAC, nRace);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAttack, oPC, RoundsToSeconds(nDur));
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eAC, oPC, RoundsToSeconds(nDur));
|
||||
|
||||
SetLocalInt(oPC, "KOTMCCombat", TRUE);
|
||||
DelayCommand(RoundsToSeconds(nDur), DeleteLocalInt(oPC, "KOTMCCombat"));
|
||||
|
||||
*/
|
||||
|
||||
|
||||
if (GetLocalInt(oPC, "KOTMCCombat") == TRUE) return;
|
||||
|
||||
//effect eVis = EffectVisualEffect(VFX_IMP_GOOD_HELP);
|
||||
effect eAC = EffectACIncrease(nAC);
|
||||
|
||||
eAC = VersusRacialTypeEffect(eAC, nRace);
|
||||
|
||||
effect eAttack = EffectAttackIncrease(nAttack);
|
||||
|
||||
eAttack = VersusRacialTypeEffect(eAttack, nRace);
|
||||
|
||||
|
||||
// effect eImmune = EffectImmunity(IMMUNITY_TYPE_MIND_SPELLS);
|
||||
// eImmune = VersusAlignmentEffect(eImmune,ALIGNMENT_ALL, nAlign);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_PROTECTION_GOOD_MINOR);
|
||||
effect eDur2 = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
|
||||
effect eLink = EffectLinkEffects( eAC, eAttack);
|
||||
// eLink = EffectLinkEffects(eLink, eAC);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
eLink = EffectLinkEffects(eLink, eDur2);
|
||||
|
||||
//Apply the VFX impact and effects
|
||||
//Fire cast spell at event for the specified target
|
||||
// SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_PROTECTION_FROM_EVIL, FALSE));
|
||||
//SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(nDur),TRUE,-1,nClass);
|
||||
|
||||
SetLocalInt(oPC, "KOTMCCombat", TRUE);
|
||||
DelayCommand(RoundsToSeconds(nDur), DeleteLocalInt(oPC, "KOTMCCombat"));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user