Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NWN-ish Knockdown Feat #102

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions cdtweaks/languages/english/knockdowm.tra
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@0 = "Knockdown"

@1 = "Knockdown

A character with this feat can attempt to knock his opponents to the ground. The character makes an attack roll at -4, and if successful the defender makes a Save vs. Death. If failed, the defender is knocked to a prone position."

@50 = "Prone"

@100 = "The selected target is out of range"
@101 = "The selected target is already prone"
@102 = "The selected target is too large"
@103 = "This feat cannot be used while wielding a ranged weapon"

@104 = "The character cannot perform more than one action per round"

@105 = "Unaffected by effects from Knockdown"
10 changes: 10 additions & 0 deletions cdtweaks/languages/english/weidu.tra
Original file line number Diff line number Diff line change
Expand Up @@ -802,3 +802,13 @@ Use Baldur.lua options: a7_interval_ini
@504000 = ~Allow Yeslick to Use Axes~

@505000 = ~Ensure Shar-Teel Doesn't Die in the Original Challenge~

/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
///// \\\\\
///// NWN-ish feats collection \\\\\
///// \\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\

@600010 = "Knockdown class feat for Fighters and Monks [Luke]"
16 changes: 16 additions & 0 deletions cdtweaks/languages/italian/knockdown.tra
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@0 = "Buttare a Terra"

@1 = "Buttare a Terra

Un personaggio con questo talento può tentare di far cadere a terra i suoi avversari. Il personaggio effettua un attacco con una penalità di -4 ai tiri per colpire e, se ha successo, il difensore effettua un tiro-salvezza contro Morte. Se fallisce, il difensore viene buttato a terra."

@50 = "Steso a Terra"

@100 = "Il bersaglio selezionato è fuori portata"
@101 = "Il bersaglio selezionato è già a terra"
@102 = "Il bersaglio selezionato è troppo grande"
@103 = "Questo talento non può essere usato mentre si brandisce un'arma a distanza"

@104 = "Il personaggio non può compiere più di un'azione per round"

@105 = "Non soggetto agli effetti di Buttare a Terra"
10 changes: 10 additions & 0 deletions cdtweaks/languages/italian/weidu.tra
Original file line number Diff line number Diff line change
Expand Up @@ -718,3 +718,13 @@ Usa opzioni di Baldur.lua: a7_interval_ini
@504000 = ~Permettere a Yeslick di usare le asce~

@505000 = ~Assicura che Shar-Teel non muoia nella sfida iniziale~

/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
///// \\\\\
///// Raccolta di talenti in stile NWN \\\\\
///// \\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\

@600010 = "Aggiungi talento di classe Buttare a Terra per i Guerrieri e i Monaci [Luke]"
17 changes: 17 additions & 0 deletions cdtweaks/lib/comp_6010.tpa
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
///// \\\\\
///// Knockdown class feat for Fighters and Monks \\\\\
///// \\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\

WITH_SCOPE BEGIN
INCLUDE "cdtweaks\luke\misc.tph"
INCLUDE "cdtweaks\ardanis\functions.tph"
//
INCLUDE "cdtweaks\lib\knockdown.tph"
WITH_TRA "cdtweaks\languages\english\knockdown.tra" "cdtweaks\languages\%LANGUAGE%\knockdown.tra" BEGIN
LAF "KNOCKDOWN" END
END
END
77 changes: 77 additions & 0 deletions cdtweaks/lib/knockdown.tph
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
DEFINE_ACTION_FUNCTION "KNOCKDOWN"
BEGIN
LAF "GT_ADD_SPELL"
INT_VAR
"level" = 1
"preferredSlot" = 44
STR_VAR
"idsName" = "INNATE_KNOCKDOWN"
RET
"INNATE_KNOCKDOWN" = "resName"
END
//
//LAF "ADD_EXTENDED_STAT" INT_VAR "max" = 25 STR_VAR "identifier" = "GT_IGNORE_ACTION_ADD_SPRITE_STARTED_ACTION_LISTENER" END
//
WITH_SCOPE BEGIN
ACTION_TO_LOWER "INNATE_KNOCKDOWN"
// Knockdown (spl file)
CREATE "spl" "%INNATE_KNOCKDOWN%"
COPY_EXISTING "%INNATE_KNOCKDOWN%.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" = 30 STR_VAR "icon" = "%DEST_RES%B" END
//
LPF "ADD_SPELL_EFFECT" INT_VAR "opcode" = 402 "target" = 2 STR_VAR "resource" = "%DEST_RES%" END // Invoke lua
BUT_ONLY
// EFF
CREATE "eff" "%INNATE_KNOCKDOWN%"
COPY_EXISTING "%INNATE_KNOCKDOWN%.eff" "override"
WRITE_LONG 0x10 146 // Cast spell
WRITE_LONG 0x14 2 // Projectile target
WRITE_LONG 0x20 1 // Mode: instant/ignore level
WRITE_SHORT 0x2C 100 // prob1
WRITE_ASCII 0x30 "%DEST_RES%" #8 // spl file
BUT_ONLY
// icons
LAF "ADD_STATDESC_ENTRY" INT_VAR "description" = RESOLVE_STR_REF (@50) STR_VAR "bam_file" = "GTPRONE" RET "feedback_icon" = "index" END
COPY "cdtweaks\luke\bam\innate\knockdown\spl_icon.bam" "override\%INNATE_KNOCKDOWN%b.bam" "cdtweaks\luke\bam\gtprone.bam" "override"
//
CREATE "eff" "gtprone"
COPY_EXISTING "gtprone.eff" "override"
WRITE_LONG 0x10 39 // Sleep
WRITE_LONG 0x14 2 // Projectile target
WRITE_LONG 0x20 1 // p2: wake on damage? no
WRITE_SHORT 0x2C 100 // prob1
WRITE_LONG 0x48 "%feedback_icon%" // icon
BUT_ONLY
END
// lua
WITH_SCOPE BEGIN
OUTER_SET "feedback_strref_already_prone" = RESOLVE_STR_REF (@101)
OUTER_SET "feedback_strref_too_large" = RESOLVE_STR_REF (@102)
OUTER_SET "feedback_strref_melee_only" = RESOLVE_STR_REF (@103)
OUTER_SET "feedback_strref_aura_free" = RESOLVE_STR_REF (@104)
//
WITH_SCOPE BEGIN
ACTION_TO_LOWER "INNATE_KNOCKDOWN"
COPY "cdtweaks\luke\bam\innate\knockdown\portrait_icon.bam" "override\%INNATE_KNOCKDOWN%d.bam"
END
LAF "ADD_STATDESC_ENTRY" INT_VAR "description" = RESOLVE_STR_REF (@0) STR_VAR "bam_file" = "%INNATE_KNOCKDOWN%D" RET "feedback_icon_can_knockdown" = "index" END
//
LAF "APPEND_LUA_FUNCTION" STR_VAR "description" = "Innate Abilities" "sourceFileSpec" = "cdtweaks\luke\lua\innate\knockdown.lua" "destRes" = "m_gtspin" END
END
//
LAF "APPEND_LUA_FUNCTION" STR_VAR "description" = "Lua Tools" "sourceFileSpec" = "cdtweaks\luke\lua\tools\key_exists.lua" "destRes" = "m_gttool" END
LAF "APPEND_LUA_FUNCTION" STR_VAR "description" = "Utility Functions / Listeners" "sourceFileSpec" = "cdtweaks\luke\lua\utility\effect_check.lua" "destRes" = "m_gtutil" 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/gtprone.bam
Binary file not shown.
Binary file added cdtweaks/luke/bam/innate/knockdown/portrait_icon.bam
Binary file not shown.
Binary file added cdtweaks/luke/bam/innate/knockdown/spl_icon.bam
Binary file not shown.
Loading