Skip to content

Commit

Permalink
Merge pull request #110 from 4Luke4/disarm
Browse files Browse the repository at this point in the history
New Component: NWN-ish Disarm
  • Loading branch information
CamDawg authored Jan 23, 2025
2 parents 21e219d + 308fd68 commit 8ead2aa
Show file tree
Hide file tree
Showing 12 changed files with 751 additions and 1 deletion.
13 changes: 13 additions & 0 deletions cdtweaks/languages/english/disarm.tra
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@0 = "Disarm"

@1 = "Disarm

The character can attempt to disarm an opponent in melee combat. The combatant with the larger weapon gains a +2 bonus per size category of difference. If the opponent fails a Save vs. Breath, then the weapon flies from the opponent's hands."

//@100 = "The selected target is out of range"
@101 = "Disarm Canceled: Inventory full"
@102 = "Disarm: Resisted"
@103 = "Disarm: Hit"
@104 = "This feat cannot be used while wielding a ranged weapon"
@105 = "The targeted creature cannot be disarmed"
//@106 = "Unaffected by effects from Disarm"
2 changes: 2 additions & 0 deletions cdtweaks/languages/english/weidu.tra
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,8 @@ Use Baldur.lua options: a7_interval_ini
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\

@600000 = "Disarm class feat for Rogues [Luke (EEex)]"

@602000 = "Spellcaster Skill/Counterspell Class Talent [Luke (EEex)]"

@603000 = "Spontaneous Casting for Clerics [Luke]"
Expand Down
13 changes: 13 additions & 0 deletions cdtweaks/languages/italian/disarm.tra
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@0 = "Disarmare"

@1 = "Disarmare

Il personaggio può tentare di disarmare un avversario durante un combattimento in mischia. Il combattente con l'arma più grande ottiene un bonus di +2 per ogni categoria di taglia di differenza. Se l'avversario fallisce un tiro-salvezza contro Soffio, l'arma gli vola via dalle mani."

//@100 = "Il bersaglio selezionato è fuori portata"
@101 = "Disarmare Annullato: Inventario pieno"
@102 = "Disarmare: Resistito"
@103 = "Disarmare: Colpito"
@104 = "Questa abilità non può essere usata mentre si brandisce un'arma a distanza"
@105 = "La creatura selezionata non può essere disarmata"
//@106 = "Non soggetto agli effetti di Disarmare"
3 changes: 3 additions & 0 deletions cdtweaks/languages/italian/weidu.tra
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ o rimpiazzata da - un'altra facente parte di uno dei mods installati.~
@27 = ~E' necessario utilizzare Modmerge prima che i mod possano essere installati su questo gioco. Controllare il readme per ulteriori informazioni e per un link per scaricare Modmerge.~
@28 = ~Non sono disponibili abbastanza slot per lo stato dell'incantesimo o di tipo secondario per installare questo componente.~
@29 = "Questo componente richiede EEex (https://github.com/Bubb13/EEex)."
@30 = "Talenti in stile NWN"

// questo componente non è pronto, puoi saltare la traduzione di questo blocco
//@100 = ~Programma di installazione automatizzato~
Expand Down Expand Up @@ -735,6 +736,8 @@ Usa opzioni di Baldur.lua: a7_interval_ini
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\

@600000 = "Aggiungi talento di classe Disarmare per i Ladri [Luke (EEex)]"

@602000 = "Aggiungi talento di classe Sapienza Magica / Controincantesimo per gli incantatori [Luke (EEex)]"

@603000 = "Aggiungi talento di classe Lancio Spontaneo per i Chierici [Luke]"
Expand Down
17 changes: 17 additions & 0 deletions cdtweaks/lib/comp_6000.tpa
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
///// \\\\\
///// Disarm class feat for Rogues \\\\\
///// \\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\

WITH_SCOPE BEGIN
INCLUDE "cdtweaks\luke\misc.tph"
INCLUDE "cdtweaks\ardanis\functions.tph"
//
INCLUDE "cdtweaks\lib\disarm.tph"
WITH_TRA "cdtweaks\languages\english\disarm.tra" "cdtweaks\languages\%LANGUAGE%\disarm.tra" BEGIN
LAF "DISARM" END
END
END
49 changes: 49 additions & 0 deletions cdtweaks/lib/disarm.tph
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
DEFINE_ACTION_FUNCTION "DISARM"
BEGIN
LAF "GT_ADD_SPELL"
INT_VAR
"level" = 4
"preferredSlot" = 44
"type" = 4
STR_VAR
"idsName" = "THIEF_DISARM"
RET
"THIEF_DISARM" = "resName"
END
//
WITH_SCOPE BEGIN
ACTION_TO_LOWER "THIEF_DISARM"
// Disarm (main spl file)
CREATE "spl" "%THIEF_DISARM%"
COPY_EXISTING "%THIEF_DISARM%.spl" "override"
WRITE_LONG NAME1 RESOLVE_STR_REF (@0)
WRITE_LONG NAME2 "-1"
WRITE_LONG UNIDENTIFIED_DESC RESOLVE_STR_REF (@1)
WRITE_LONG DESC "-1"
WRITE_LONG 0x18 (BIT14 BOR BIT25) // ignore dead/wild magic, castable when silenced
WRITE_SHORT 0x1C 4 // innate
WRITE_LONG 0x34 1 // level
WRITE_ASCII 0x3A "%DEST_RES%B" #8 // icon
//
LPF "ADD_SPELL_HEADER" INT_VAR "range" = 0 STR_VAR "icon" = "%DEST_RES%B" END
//
LPF "ADD_SPELL_EFFECT" INT_VAR "opcode" = 138 "target" = 1 "parameter2" = 0 END // SEQ_ATTACK
BUT_ONLY
// icon
COPY "cdtweaks\luke\bam\class\disarm.bam" "override\%THIEF_DISARM%b.bam"
END
// lua
WITH_SCOPE BEGIN
OUTER_SET "feedback_strref_inventory_full" = RESOLVE_STR_REF (@101)
OUTER_SET "feedback_strref_resisted" = RESOLVE_STR_REF (@102)
OUTER_SET "feedback_strref_hit" = RESOLVE_STR_REF (@103)
OUTER_SET "feedback_strref_melee_only" = RESOLVE_STR_REF (@104)
OUTER_SET "feedback_strref_cannot_be_disarmed" = RESOLVE_STR_REF (@105)
//
LAF "APPEND_LUA_FUNCTION" STR_VAR "description" = "Class/Kit Abilities" "sourceFileSpec" = "cdtweaks\luke\lua\class\disarm.lua" "destRes" = "m_gtspcl" END
END
//
ACTION_IF !(FILE_EXISTS_IN_GAME "m_gttbls.lua") BEGIN
COPY "cdtweaks\luke\lua\m_gttbls.lua" "override"
END
END
Binary file added cdtweaks/luke/bam/class/disarm.bam
Binary file not shown.
Loading

0 comments on commit 8ead2aa

Please sign in to comment.