2025/07/31 Update

Reverted Luminous Armor.
Updated NUI spellcast menu (@Alhooness).
Fixed Inlindl School.
Tweaked prc_2da_cache creature.
Fixed Celebrant of Sharess spellcasting.
Found a few more functions to remove Assassin from.
Added GetTotalShieldACBonus().
Made magic staves medium weapons again, so that small creatures can use them.
Added feat constants for Charge & Grapple.
Devil's Eye should be Extendable.
Setup talents for Combat maneuvers.
Updated PRC8 manual.
This commit is contained in:
Jaysyn904
2025-07-31 07:35:50 -04:00
parent 2181120567
commit 98e0b02799
41 changed files with 1953 additions and 1800 deletions

View File

@@ -2,20 +2,72 @@
//:: Name Inlindl School
//:: FileName prc_ft_inlindl.nss
//:://////////////////////////////////////////////
/** You can choose to sacrifice your shield bonus
to AC in exchange for a bonus on melee attack rolls
equal to one-half that bonus. This bonus applies
only on attacks made with light weapons.
/**
You can choose to sacrifice your shield bonus
to AC in exchange for a bonus on melee attack rolls
equal to one-half that bonus. This bonus applies
only on attacks made with light weapons.
Author: Stratovarius
Created: 12.11.2018
Author: Stratovarius
Created: 12.11.2018
Fixed by: Jaysyn
Fixed on: 2025-07-24 16:18:03
*/
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
#include "prc_inc_spells"
#include "prc_inc_combat"
#include "prc_inc_combmove"
void main()
{
object oInitiator = OBJECT_SELF;
object oTarget = PRCGetSpellTargetObject();
object oWeapon = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND);
int nWeaponType = GetBaseItemType(oWeapon);
int nWeaponSize = GetWeaponSize(oWeapon);
int nCreatureSize = GetCreatureSize(oInitiator);
if(DEBUG) DoDebug("prc_ft_inlindl >> Base item type: " + IntToString(nWeaponType));
if(DEBUG) DoDebug("prc_ft_inlindl >> Base item size: " + IntToString(nWeaponSize));
if(DEBUG) DoDebug("prc_ft_inlindl >> Creature size: " + IntToString(nCreatureSize));
effect eBlank;
if (nWeaponType != BASE_ITEM_RAPIER && nWeaponType != BASE_ITEM_ELVEN_THINBLADE && nWeaponType != BASE_ITEM_ELVEN_COURTBLADE &&
(nWeaponSize > 3 || nWeaponSize >= nCreatureSize))
{
SendMessageToPC(oInitiator, "Inlindl School strike requires a light weapon.");
PerformAttack(oTarget, oInitiator, eBlank);
return;
}
PRCRemoveEffectsFromSpell(oInitiator, GetSpellId());
int nShieldAC = GetTotalShieldACBonus(oInitiator);
effect eShieldMalus = EffectACDecrease(nShieldAC, AC_SHIELD_ENCHANTMENT_BONUS);
effect eVis = EffectVisualEffect(VFX_DUR_ARMOR_OF_DARKNESS);
effect eLink = EffectLinkEffects(eShieldMalus, eVis);
//DelayCommand(0.0f, ClearAllActions());
//DelayCommand(0.1f, AssignCommand(oInitiator,
PerformAttackRound(oTarget, oInitiator, eBlank, 0.0, nShieldAC/2, 0, 0, TRUE, "Inlindl School Strike (+"+IntToString(nShieldAC/2)+") : Hit!", "Inlindl School Strike (+"+IntToString(nShieldAC/2)+") : Miss!");
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ExtraordinaryEffect(eLink), oInitiator, 5.9);
ActionAttack(oTarget);
}
// Almost every part of this is wrong. - Jaysyn
/* void main()
{
object oInitiator = OBJECT_SELF;
int nSwitch = GetLocalInt(oInitiator, "InlindlSchool");
@@ -35,5 +87,5 @@ void main()
eLink = EffectLinkEffects(eLink, EffectVisualEffect(VFX_DUR_ARMOR_OF_DARKNESS));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ExtraordinaryEffect(eLink), oInitiator, 6.0);
}
}
} */

View File

@@ -3,9 +3,13 @@
//:: prc_ft_spnhlbrd.nss
//::///////////////////////////////////////////////
/*
If you hit the same creature with both your
sword and your axe in the same round, you may
make a free trip attempt against that foe.
Type of Feat: General
Prerequisite: Two-Weapon Fighting, Weapon Focus (halberd)
Benefit: When you make a full attack with your halberd, you gain
a +1 dodge bonus to your Armor Class as well as an additional
attack with the weapon at a -5 penalty. This attack deals points
of bludgeoning damage equal to 1d6 + 1/2 your Strength modifier.
Use: Selected
*/
//:://////////////////////////////////////////////
//:: Modified By: Stratovarius

View File

@@ -133,7 +133,7 @@ void main()
title = title + ": " + GetStringByStrRef(StringToInt(Get2DACache("classes", "Name", selectedClassId)));
// This is the main window with jRoot as the main pane. It includes titles and parameters (more on those later)
json nui = NuiWindow(jRoot, JsonString(title), NuiBind("geometry"), NuiBind("resizable"), NuiBind("collapsed"), NuiBind("closable"), NuiBind("transparent"), NuiBind("border"));
json nui = NuiWindow(jRoot, JsonString(title), NuiBind("geometry"), NuiBind("resizable"), NuiBind("collapsed"), NuiBind("closable"), NuiBind("transparent"), NuiBind("border"),JSON_NULL,JSON_NULL, NuiBind("edgeConstraint"));
// finally create it and it'll return us a non-zero token.
int nToken = NuiCreate(OBJECT_SELF, nui, PRC_SPELLBOOK_NUI_WINDOW_ID);
@@ -141,7 +141,7 @@ void main()
// get the geometry of the window in case we opened this before and have a
// preference for location
json geometry = GetLocalJson(OBJECT_SELF, PRC_SPELLBOOK_NUI_GEOMETRY_VAR);
// Default to put this near the middle and let the person adjust its location
if (geometry == JsonNull())
{
@@ -150,18 +150,37 @@ void main()
else
{
float x = JsonGetFloat(JsonObjectGet(geometry, "x"));
float y = JsonGetFloat(JsonObjectGet(geometry, "y"));
geometry = NuiRect(x, y, 489.0f, 351.0f);
float y = JsonGetFloat(JsonObjectGet(geometry, "y"));
float WINDOW_WIDTH = 489.0f;
float WINDOW_HEIGHT = 351.0f;
geometry = NuiRect(x, y, WINDOW_WIDTH, WINDOW_HEIGHT);
}
float QUICKBAR_HEIGHT_ESTIMATE = 40.0f;
float CHAT_BAR_ESTIMATE = 20.0f;
float MIN_BOTTOM_PADDING = 10.0f;
int uiScale = GetPlayerDeviceProperty(OBJECT_SELF, PLAYER_DEVICE_PROPERTY_GUI_SCALE);
float scale = IntToFloat(uiScale) / 100.0f;
float bottomSize = QUICKBAR_HEIGHT_ESTIMATE * scale + CHAT_BAR_ESTIMATE * scale + MIN_BOTTOM_PADDING;
float screenW = IntToFloat(GetPlayerDeviceProperty(OBJECT_SELF, PLAYER_DEVICE_PROPERTY_GUI_WIDTH));
float screenH = IntToFloat(GetPlayerDeviceProperty(OBJECT_SELF, PLAYER_DEVICE_PROPERTY_GUI_HEIGHT));
json edgeConstraint = NuiRect(0.0f,0.0f, 0.0f, bottomSize);
//json edgeConstraint = NuiRect(0.0f, 0.0f, 0.0f, 0.0f);
// Set the binds to their default values
NuiSetBind(OBJECT_SELF, nToken, "geometry", geometry);
NuiSetBind(OBJECT_SELF, nToken, "collapsed", JsonBool(FALSE));
NuiSetBind(OBJECT_SELF, nToken, "resizable", JsonBool(FALSE));
NuiSetBind(OBJECT_SELF, nToken, "closable", JsonBool(TRUE));
NuiSetBind(OBJECT_SELF, nToken, "transparent", JsonBool(TRUE));
NuiSetBind(OBJECT_SELF, nToken, "border", JsonBool(FALSE));
NuiSetBind(OBJECT_SELF, nToken, "border", JsonBool(FALSE));
NuiSetBind(OBJECT_SELF, nToken, "edgeConstraint", edgeConstraint);
NuiSetBindWatch(OBJECT_SELF, nToken, "geometry", TRUE);
}