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

New component: Parry Mode #121

Open
wants to merge 3 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
13 changes: 13 additions & 0 deletions cdtweaks/languages/english/parry.tra
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@0 = "Parry Mode"
@1 = "Parry Mode

Parry allows the character to block incoming attacks and make spectacular counterattacks.
A successful parry (save vs. Breath) means that the attack does not damage the parrying character."

@2 = "Parry Mode On"

@3 = "Parry Mode Off"

@4 = "Parry (Success)"

@5 = "Riposte Attack"
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 \\\\\
///// \\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\

@600220 = "Parry Mode kit feat for Blades e Swashbucklers [Luke (EEex)]"
13 changes: 13 additions & 0 deletions cdtweaks/languages/italian/parry.tra
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@0 = "Modalità Parata"
@1 = "Modalità Parata

La Modalità Parata consente al personaggio di bloccare gli attacchi ed effettuare spettacolari controattacchi.
Se un attacco viene parato con successo (tiro-salvezza contro Soffio), esso non danneggerà il personaggio."

@2 = "Modalità Parata Attivata"

@3 = "Modalità Parata Disattivata"

@4 = "Modalità Parata (Successo)"

@5 = "Controattacco"
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~

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

@600220 = "Aggiungi talento di classe Modalità Parata per Bardi Lama e Rodomonti [Luke (EEex)]"
18 changes: 18 additions & 0 deletions cdtweaks/lib/comp_6220.tpa
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\////\\\\////
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\////\\\\////
///// \\\\\////\\\\////
///// Parry Mode kit feat for Blades and Swashbucklers \\\\\
///// \\\\\////\\\\////
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\////\\\\////
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\////\\\\////

WITH_SCOPE BEGIN
INCLUDE "cdtweaks\luke\misc.tph"
INCLUDE "cdtweaks\ardanis\functions.tph"
//
INCLUDE "cdtweaks\lib\parry.tph"
//
WITH_TRA "cdtweaks\languages\english\parry.tra" "cdtweaks\languages\%LANGUAGE%\parry.tra" BEGIN
LAF "PARRY" END
END
END
117 changes: 117 additions & 0 deletions cdtweaks/lib/parry.tph
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
DEFINE_ACTION_FUNCTION "PARRY"
BEGIN
LAF "GT_ADD_SPELL"
INT_VAR
"type" = 4
"level" = 5
STR_VAR
"idsName" = "BLADE_SWASHBUCKLER_PARRY"
RET
"BLADE_SWASHBUCKLER_PARRY" = "resName"
END
//
LAF "ADD_EXTENDED_STAT" INT_VAR "max" = 30 STR_VAR "identifier" = "GT_NUMBER_OF_ATTACKS_PARRIED" END
//
WITH_SCOPE BEGIN
ACTION_TO_LOWER "BLADE_SWASHBUCKLER_PARRY"
//
COPY "cdtweaks\luke\bam\kit\parry\portrait_icon.bam" "override\%BLADE_SWASHBUCKLER_PARRY%d.bam"
COPY "cdtweaks\luke\bam\kit\parry\spl_icon.bam" "override\%BLADE_SWASHBUCKLER_PARRY%b.bam"
// main
CREATE "spl" "%BLADE_SWASHBUCKLER_PARRY%"
COPY_EXISTING "%BLADE_SWASHBUCKLER_PARRY%.spl" "override"
WRITE_LONG NAME1 RESOLVE_STR_REF (@0)
WRITE_LONG UNIDENTIFIED_DESC RESOLVE_STR_REF (@1)
WRITE_LONG DESC "-1"
WRITE_LONG NAME2 "-1"
WRITE_LONG 0x18 (BIT14 BOR BIT25) // ignore dead/wild magic, castable when silenced
WRITE_SHORT 0x1C 4 // type: innate
WRITE_LONG 0x34 1 // level
WRITE_ASCII 0x3A "%DEST_RES%B" #8 // icon
//
LPF "ADD_SPELL_HEADER" INT_VAR "target" = 5 "range" = 30 STR_VAR "icon" = "%DEST_RES%B" END
//
LPF "ADD_SPELL_EFFECT" INT_VAR "opcode" = 138 "target" = 1 "parameter2" = 7 END // SEQ_READY
LPF "ADD_SPELL_EFFECT" INT_VAR "opcode" = 174 "target" = 1 STR_VAR "resource" = "EFF_M11B" END // play sound
LPF "ADD_SPELL_EFFECT" INT_VAR "opcode" = 139 "target" = 1 "parameter1" = RESOLVE_STR_REF (@2) END // feedback string
//
LPF "ADD_SPELL_EFFECT" INT_VAR "opcode" = 402 "target" = 1 STR_VAR "resource" = "%DEST_RES%" END // invoke lua
BUT_ONLY
// cancel
CREATE "spl" "%BLADE_SWASHBUCKLER_PARRY%b"
COPY_EXISTING "%BLADE_SWASHBUCKLER_PARRY%b.spl" "override"
WRITE_LONG NAME1 RESOLVE_STR_REF (@3)
WRITE_LONG UNIDENTIFIED_DESC "-1"
WRITE_LONG DESC "-1"
WRITE_LONG NAME2 "-1"
WRITE_LONG 0x18 (BIT14 BOR BIT25) // ignore dead/wild magic, castable when silenced
WRITE_SHORT 0x1C 4 // type: innate
WRITE_LONG 0x34 1 // level
WRITE_ASCII 0x3A "%DEST_RES%" #8
//
LPF "ADD_SPELL_HEADER" INT_VAR "target" = 5 "range" = 30 STR_VAR "icon" = "%DEST_RES%" END
//
LPF "ADD_SPELL_EFFECT" INT_VAR "opcode" = 402 "target" = 1 "parameter1" = 1 STR_VAR "resource" = "%BLADE_SWASHBUCKLER_PARRY%" END // invoke lua
BUT_ONLY
// SEQ_ATTACK + feedback string
CREATE "spl" "%BLADE_SWASHBUCKLER_PARRY%e"
COPY_EXISTING "%BLADE_SWASHBUCKLER_PARRY%e.spl" "override"
WRITE_LONG NAME1 "-1"
WRITE_LONG UNIDENTIFIED_DESC "-1"
WRITE_LONG DESC "-1"
WRITE_LONG NAME2 "-1"
WRITE_LONG 0x18 (BIT14 BOR BIT25) // ignore dead/wild magic, castable when silenced
WRITE_SHORT 0x1C 4 // type: innate
WRITE_LONG 0x34 1 // level
WRITE_ASCII 0x3A "%DEST_RES%" #8
//
LPF "ADD_SPELL_HEADER" INT_VAR "range" = 30 STR_VAR "icon" = "%DEST_RES%" END
//
LPF "ADD_SPELL_EFFECT" INT_VAR "opcode" = 138 "target" = 1 "parameter2" = 0 END // set animation (ATTACK)
LPF "ADD_SPELL_EFFECT" INT_VAR "opcode" = 139 "target" = 1 "parameter1" = RESOLVE_STR_REF (@4) END // "Parry (Success)"
BUT_ONLY
// riposte attack
CREATE "spl" "%BLADE_SWASHBUCKLER_PARRY%f"
COPY_EXISTING "%BLADE_SWASHBUCKLER_PARRY%f.spl" "override"
WRITE_LONG NAME1 RESOLVE_STR_REF (@5)
WRITE_LONG UNIDENTIFIED_DESC "-1"
WRITE_LONG DESC "-1"
WRITE_LONG NAME2 "-1"
WRITE_LONG 0x18 (BIT14 BOR BIT25) // ignore dead/wild magic, castable when silenced
WRITE_SHORT 0x1C 4 // type: innate
WRITE_LONG 0x34 1 // level
WRITE_ASCII 0x3A "%BLADE_SWASHBUCKLER_PARRY%B" #8
//
LPF "ADD_SPELL_HEADER" INT_VAR "range" = 30 STR_VAR "icon" = "%BLADE_SWASHBUCKLER_PARRY%B" END
//
LPF "ADD_SPELL_EFFECT" INT_VAR "opcode" = 402 "target" = 2 "parameter1" = 2 STR_VAR "resource" = "%BLADE_SWASHBUCKLER_PARRY%" END // invoke lua
BUT_ONLY
// SEQ_READY
CREATE "spl" "%BLADE_SWASHBUCKLER_PARRY%g"
COPY_EXISTING "%BLADE_SWASHBUCKLER_PARRY%g.spl" "override"
WRITE_LONG NAME1 "-1"
WRITE_LONG UNIDENTIFIED_DESC "-1"
WRITE_LONG DESC "-1"
WRITE_LONG NAME2 "-1"
WRITE_LONG 0x18 (BIT14 BOR BIT25) // ignore dead/wild magic, castable when silenced
WRITE_SHORT 0x1C 4 // type: innate
WRITE_LONG 0x34 1 // level
WRITE_ASCII 0x3A "%BLADE_SWASHBUCKLER_PARRY%B" #8
//
LPF "ADD_SPELL_HEADER" INT_VAR "target" = 5 "range" = 30 STR_VAR "icon" = "%BLADE_SWASHBUCKLER_PARRY%B" END
//
LPF "ADD_SPELL_EFFECT" INT_VAR "opcode" = 138 "target" = 1 "parameter2" = 7 END // set animation (READY)
BUT_ONLY
END
// lua
WITH_SCOPE BEGIN
LAF "ADD_STATDESC_ENTRY" INT_VAR "description" = RESOLVE_STR_REF (@0) STR_VAR "bam_file" = "%BLADE_SWASHBUCKLER_PARRY%D" RET "feedback_icon" = "index" END
//
LAF "APPEND_LUA_FUNCTION" STR_VAR "description" = "Class/Kit Abilities" "sourceFileSpec" = "cdtweaks\luke\lua\kit\parry.lua" "destRes" = "m_gtspcl" END
LAF "APPEND_LUA_FUNCTION" STR_VAR "description" = "AI-related stuff" "sourceFileSpec" = "cdtweaks\luke\lua\ai\object_type.lua" "destRes" = "m_gt#ai" 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/kit/parry/portrait_icon.bam
Binary file not shown.
Binary file added cdtweaks/luke/bam/kit/parry/spl_icon.bam
Binary file not shown.
Loading