Skip to content

Commit

Permalink
1.6
Browse files Browse the repository at this point in the history
fixes for missile deflection, improvements for Missile Storm
  • Loading branch information
subtledoctor committed Jan 23, 2023
1 parent e660a63 commit ca2094a
Show file tree
Hide file tree
Showing 6 changed files with 124 additions and 57 deletions.
24 changes: 12 additions & 12 deletions d5_random_tweaks/comp/random_item_tweaks.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ DEFINE_ACTION_FUNCTION tweak_gloves_missile_snaring BEGIN

LAF d5_resolve_state STR_VAR new_state_id = ~D5_SNAREARROW~ RET new_state_ind END
OUTER_SET missile_snaring_state = %new_state_ind%
OUTER_SET nada = RESOLVE_STR_REF (~ ~)
ACTION_IF NOT FILE_EXISTS_IN_GAME ~7eyes.2da~ BEGIN
COPY ~d5_random_tweaks/data/item_tweaks/7eyes.2da~ ~override~
OUTER_SET snare_string = RESOLVE_STR_REF (~Deflect~)
ACTION_IF !(FILE_EXISTS_IN_GAME ~7eyes.2da~) BEGIN
COPY ~d5_random_tweaks/data/item_tweaks/7eyes.2da~ ~override~
END

APPEND ~7eyes.2da~ ~SNARE_ARROW %missile_snaring_state% %nada% 12*0x800000 * * * * * * * * ~ UNLESS ~SNARE_ARROW~
APPEND ~7eyes.2da~ ~SNARE_ARROW %missile_snaring_state% %snare_string% 12*0x800000 * * * * * * * * ~ UNLESS ~SNARE_ARROW~

COPY_EXISTING ~7eyes.2da~ ~override~
COUNT_2DA_ROWS 1 rows
FOR (row = 1; row < rows; ++row) BEGIN
READ_2DA_ENTRY row 0 1 tag
PATCH_IF (~%tag%~ STRING_EQUAL_CASE ~SNARE_ARROW~) BEGIN
SET 7eyes_row = row
SET snare_row = row
END
END
BUT_ONLY
Expand All @@ -55,17 +55,17 @@ ACTION_IF !(FILE_EXISTS_IN_GAME ~d5misgl.eff~) BEGIN
WRITE_LONG 0x18 0
WRITE_LONG 0x1c 0
WRITE_LONG 0x20 20
WRITE_LONG 0x24 0
WRITE_LONG 0x28 300
WRITE_LONG 0x24 2
WRITE_LONG 0x28 0
WRITE_SHORT 0x2c 100
WRITE_ASCII 0x30 ~d5misgl1~ #8
WRITE_LONG 0x28 102
WRITE_ASCII 0x30 ~D5MISGL1~ #8
WRITE_LONG 0x48 102
END

ACTION_IF !(FILE_EXISTS_IN_GAME ~d5misgl1.spl~) BEGIN
COPY ~d5_random_tweaks/misc/d5_base.spl~ ~override/d5misgl1.spl~
LPF ADD_SPELL_EFFECT INT_VAR opcode = 321 target = 1 timing = 1 STR_VAR resource = ~d5misgl1~ END
LPF ADD_SPELL_EFFECT INT_VAR insert_point = 0 opcode = 335 target = 1 power = 0 parameter1 = %missile_snaring_state% parameter2 = %7eyes_row% timing = 0 duration = 7 END
LPF ADD_SPELL_EFFECT INT_VAR opcode = 335 target = 1 power = 0 parameter1 = %missile_snaring_state% parameter2 = %snare_row% timing = 0 duration = 7 END
LPF ADD_SPELL_EFFECT INT_VAR insert_point = 0 opcode = 321 target = 1 timing = 1 STR_VAR resource = ~d5misgl1~ END
END

COPY_EXISTING ~brac18.itm~ ~override~
Expand All @@ -75,7 +75,7 @@ COPY_EXISTING ~brac18.itm~ ~override~
LPF DELETE_EFFECT INT_VAR match_opcode = 305 END
LPF DELETE_EFFECT INT_VAR match_opcode = 206 STR_VAR match_resource = ~spra303~ END
LPF DELETE_EFFECT INT_VAR match_opcode = 206 STR_VAR match_resource = ~spwi311~ END
LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 328 target = 1 parameter2 = %missile_snaring_state% timing = 2 END
LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 335 target = 1 parameter1 = %missile_snaring_state% parameter2 = %snare_row% timing = 0 duration = 7 END
LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 177 target = 1 parameter2 = 2 timing = 2 STR_VAR resource = ~d5misgl~ END
LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 0 target = 1 parameter1 = 3 parameter2 = 2 timing = 2 END
IF_EXISTS BUT_ONLY
Expand Down
91 changes: 60 additions & 31 deletions d5_random_tweaks/comp/random_spell_tweaks.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -300,48 +300,48 @@ DEFINE_ACTION_FUNCTION tweak_blur BEGIN

LAF d5_resolve_state STR_VAR new_state_id = ~D5_SNAREARROW~ RET new_state_ind END
OUTER_SET missile_snaring_state = %new_state_ind%
OUTER_SET nada = RESOLVE_STR_REF (~ ~)
OUTER_SET snare_string = RESOLVE_STR_REF (~Deflect~)
ACTION_IF !(FILE_EXISTS_IN_GAME ~7eyes.2da~) BEGIN
COPY ~d5_random_tweaks/data/item_tweaks/7eyes.2da~ ~override~
COPY ~d5_random_tweaks/data/item_tweaks/7eyes.2da~ ~override~
END

APPEND ~7eyes.2da~ ~SNARE_ARROW %missile_snaring_state% %nada% 12*0x800000 * * * * * * * * ~ UNLESS ~SNARE_ARROW~
APPEND ~7eyes.2da~ ~SNARE_ARROW %missile_snaring_state% %snare_string% 12*0x800000 * * * * * * * * ~ UNLESS ~SNARE_ARROW~

COPY_EXISTING ~7eyes.2da~ ~override~
COUNT_2DA_ROWS 1 rows
FOR (row = 1; row < rows; ++row) BEGIN
READ_2DA_ENTRY row 0 1 tag
PATCH_IF (~%tag%~ STRING_EQUAL_CASE ~SNARE_ARROW~) BEGIN
SET 7eyes_row = row
SET snare_row = row
END
END
BUT_ONLY

ACTION_IF !(FILE_EXISTS_IN_GAME ~d5misgl.eff~) BEGIN
CREATE EFF ~d5misgl~
ACTION_IF !(FILE_EXISTS_IN_GAME ~d5misbl.eff~) BEGIN
CREATE EFF ~d5misbl~
WRITE_LONG 0x10 232
WRITE_LONG 0x14 1
WRITE_LONG 0x18 0
WRITE_LONG 0x1c 0
WRITE_LONG 0x20 20
WRITE_LONG 0x24 2
WRITE_LONG 0x28 0
WRITE_LONG 0x24 0
WRITE_LONG 0x28 300
WRITE_SHORT 0x2c 100
WRITE_ASCII 0x30 ~d5misgl1~ #8
WRITE_LONG 0x28 102
WRITE_ASCII 0x30 ~D5MISGL1~ #8
WRITE_LONG 0x48 102
END

ACTION_IF !(FILE_EXISTS_IN_GAME ~d5misgl1.spl~) BEGIN
COPY ~d5_random_tweaks/misc/d5_base.spl~ ~override/d5misgl1.spl~
LPF ADD_SPELL_EFFECT INT_VAR opcode = 321 target = 1 timing = 1 STR_VAR resource = ~d5misgl1~ END
LPF ADD_SPELL_EFFECT INT_VAR insert_point = 0 opcode = 335 target = 1 power = 0 parameter1 = %missile_snaring_state% parameter2 = %7eyes_row% timing = 0 duration = 7 END
LPF ADD_SPELL_EFFECT INT_VAR opcode = 335 target = 1 power = 0 parameter1 = %missile_snaring_state% parameter2 = %snare_row% timing = 0 duration = 7 END
LPF ADD_SPELL_EFFECT INT_VAR insert_point = 0 opcode = 321 target = 1 timing = 1 STR_VAR resource = ~d5misgl1~ END
END

COPY_EXISTING ~spwi201.spl~ ~override~
// SAY UNIDENTIFIED_DESC @22012
// LPF ALTER_EFFECT INT_VAR silent = 1 match_opcode = 0 match_parameter1 = 3 parameter1 = 2 END
LPF CLONE_EFFECT INT_VAR silent = 1 multi_match = 1 match_opcode = 65 opcode = 328 target = 1 parameter2 = %missile_snaring_state% END
LPF CLONE_EFFECT INT_VAR silent = 1 multi_match = 1 match_opcode = 65 opcode = 177 target = 1 parameter2 = 2 STR_VAR resource = ~d5misgl~ END
LPF CLONE_EFFECT INT_VAR silent = 1 multi_match = 1 match_opcode = 65 opcode = 335 target = 1 parameter1 = %missile_snaring_state% parameter2 = %snare_row% duration = 7 END
LPF CLONE_EFFECT INT_VAR silent = 1 multi_match = 1 match_opcode = 65 opcode = 177 target = 1 parameter2 = 2 STR_VAR resource = ~d5misbl~ END
IF_EXISTS BUT_ONLY

END
Expand Down Expand Up @@ -1443,7 +1443,7 @@ ACTION_IF !(spell_ios = 0 - 1) BEGIN
LPF ADD_SPELL_EFFECT INT_VAR insert_point = 0 opcode = 318 target = 2 power = 4 parameter2 = 43 STR_VAR resource = EVAL ~%spell_res%d~ END
LPF ADD_SPELL_EFFECT INT_VAR insert_point = 0 opcode = 318 target = 2 power = 4 parameter2 = 49 STR_VAR resource = EVAL ~%spell_res%d~ END
END
COPY ~%MOD_FOLDER%/data/spell_tweaks/idpro302.pro~ ~override~
// COPY ~%MOD_FOLDER%/data/spell_tweaks/idpro302.pro~ ~override~
END

END
Expand Down Expand Up @@ -1508,31 +1508,23 @@ END

//__________________________________________________________________________________

DEFINE_ACTION_FUNCTION tweak_sunfire BEGIN
DEFINE_ACTION_FUNCTION tweak_sunfire_missiles BEGIN
// sunfire: change to Missile Storm - cast MM at everybody two (or three!) times
ACTION_IF (MOD_IS_INSTALLED ~d5_random_tweaks.tp2~ ~2217~) BEGIN
COPY_EXISTING ~spwi217.spl~ ~override/d5rt217.spl~
WRITE_LONG 0x34 5
COPY_EXISTING ~spwi523.spl~ ~override~
SAY NAME1 @25231
LPF DELETE_EFFECT END
LPF ALTER_SPELL_HEADER INT_VAR target = 5 projectile = 159 END
SAY UNIDENTIFIED_DESC @25233
LPF ADD_SPELL_EFFECT INT_VAR opcode = 146 target = 2 parameter2 = 1 timing = 1 STR_VAR resource = ~d5rt217~ END
LPF ADD_SPELL_EFFECT INT_VAR opcode = 146 target = 2 parameter2 = 1 timing = 4 duration = 1 STR_VAR resource = ~d5rt217~ END
IF_EXISTS BUT_ONLY
END

ACTION_IF !(MOD_IS_INSTALLED ~d5_random_tweaks.tp2~ ~2217~) BEGIN
/* eh, just cast the regular level 1 MM
COPY_EXISTING ~spwi112.spl~ ~override/d5rt112.spl~
WRITE_LONG 0x34 5
COPY_EXISTING_REGEXP GLOB ~^.+\.spl$~ ~override~
LPF CLONE_EFFECT INT_VAR silent = 1 match_opcode = 206 STR_VAR match_resource = ~spwi112~ resource = ~d5rt112~ END
BUT_ONLY
COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~
LPF CLONE_EFFECT INT_VAR silent = 1 match_opcode = 206 STR_VAR match_resource = ~spwi112~ resource = ~d5rt112~ END
BUT_ONLY
*/

COPY_EXISTING ~spwi523.spl~ ~override~
SAY NAME1 @25231
SAY UNIDENTIFIED_DESC @25232
SAY NAME1 @25233
SAY UNIDENTIFIED_DESC @25234
LPF DELETE_EFFECT END
LPF ALTER_SPELL_HEADER INT_VAR target = 5 projectile = 159 END
PATCH_IF !(MOD_IS_INSTALLED ~tomeandblood.tp2~ ~62~) BEGIN
Expand All @@ -1546,6 +1538,43 @@ ACTION_IF !(MOD_IS_INSTALLED ~d5_random_tweaks.tp2~ ~2217~) BEGIN
END
IF_EXISTS BUT_ONLY
END

ACTION_IF (MOD_IS_INSTALLED ~d5_random_tweaks.tp2~ ~2217~) BEGIN
COPY_EXISTING ~spwi217.spl~ ~override/d5rt217.spl~
WRITE_LONG 0x34 5
COPY_EXISTING_REGEXP GLOB ~^.+\.spl$~ ~override~
LPF CLONE_EFFECT INT_VAR silent = 1 match_opcode = 206 STR_VAR match_resource = ~spwi217~ resource = ~d5rt217~ END
BUT_ONLY
COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~
LPF CLONE_EFFECT INT_VAR silent = 1 match_opcode = 206 STR_VAR match_resource = ~spwi217~ resource = ~d5rt217~ END
BUT_ONLY
COPY_EXISTING ~spwi523.spl~ ~override~
SAY NAME1 @25233
SAY UNIDENTIFIED_DESC @25235
LPF DELETE_EFFECT END
LPF ALTER_SPELL_HEADER INT_VAR target = 5 projectile = 159 END
// LPF ADD_SPELL_EFFECT INT_VAR opcode = 146 target = 2 parameter2 = 1 timing = 1 STR_VAR resource = ~d5rt217~ END
// LPF ADD_SPELL_EFFECT INT_VAR opcode = 146 target = 2 parameter2 = 1 timing = 4 duration = 1 STR_VAR resource = ~d5rt217~ END
LPF ADD_SPELL_EFFECT INT_VAR opcode = 146 target = 2 parameter2 = 1 timing = 1 STR_VAR resource = ~spwi217~ END
// LPF ADD_SPELL_EFFECT INT_VAR opcode = 146 target = 2 parameter2 = 1 timing = 4 duration = 1 STR_VAR resource = ~spwi217~ END
IF_EXISTS BUT_ONLY
END

END

//__________________________________________________________________________________

DEFINE_ACTION_FUNCTION tweak_sunfire_scorcher BEGIN
// sunfire: change to Scorcher Storm - cast AS at everybody
ACTION_IF !(MOD_IS_INSTALLED ~d5_random_tweaks.tp2~ ~2217~) BEGIN
COPY_EXISTING ~spwi523.spl~ ~override~
SAY NAME1 @25236
SAY UNIDENTIFIED_DESC @25237
LPF DELETE_EFFECT END
LPF ALTER_SPELL_HEADER INT_VAR target = 5 projectile = 159 END
LPF ADD_SPELL_EFFECT INT_VAR opcode = 146 target = 2 parameter2 = 1 timing = 1 STR_VAR resource = ~spwi217~ END
IF_EXISTS BUT_ONLY
END

END

Expand Down
16 changes: 12 additions & 4 deletions d5_random_tweaks/d5_random_tweaks.tp2
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
BACKUP ~weidu_external/backup/d5_random_tweaks~
AUTHOR ~SubtleD~

VERSION ~1.5.7~
VERSION ~1.6~

AUTO_EVAL_STRINGS

Expand Down Expand Up @@ -361,10 +361,18 @@ LAF tweak_phantom_blade END

//____________________________________________________________________________________

BEGIN @2523
DESIGNATED 2523
BEGIN @25231
DESIGNATED 25231
SUBCOMPONENT @2523

LAF tweak_sunfire END
LAF tweak_sunfire_missiles END


BEGIN @25232
DESIGNATED 25232
SUBCOMPONENT @2523

LAF tweak_sunfire_scorcher END

//____________________________________________________________________________________

Expand Down
Binary file modified d5_random_tweaks/data/spell_tweaks/idpro302.pro
100644 → 100755
Binary file not shown.
25 changes: 20 additions & 5 deletions d5_random_tweaks/lang/english/setup.tra
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
@1451 = ~Make Smashing Wave Party-Friendly~
@2508 = ~Improve Function of SR's Waves of Fatigue~
@2518 = ~Change Damage Type and School of Phantom Blade~
@2523 = ~Change Sunfire into 'Missile Storm'~
@2523 = ~Change Sunfire~
@25231 = ~Change Sunfire into 'Missile Storm'~
@25232 = ~Change Sunfire into 'Scorcher Storm'~
@1505 = ~Make True Seeing Party-Wide~
@1603 = ~Set Blade Barrier to be Breachable~
@1609 = ~Make False Dawn Bypass Magic Resistance~
Expand Down Expand Up @@ -352,8 +354,8 @@ This spell creates a translucent, shadow-like, weightless area of magical force

The phantom blade acts as a +3 magical sword in terms of to-hit and damage bonuses as well as the type of creatures it can hit. Due to its etheric nature, it causes spellcasters struck to be unable to use magic for one round. This sword can only be used by the caster and remains in <PRO_HISHER> hand for the duration of the spell or until dispelled.
~
@25231 = ~Missile Storm~
@25232 = ~Missile Storm
@25233 = ~Missile Storm~
@25234 = ~Missile Storm

Level: 5
School: Invocation
Expand All @@ -365,7 +367,7 @@ Saving Throw: None

The air around the caster crackles with energy as up to ten Magic Missiles race toward each enemy within the area of effect. These are identical to Magic Missiles created by the 1st-level spell, in every respect: each one does 1d6+1 damage, and they are blocked by the Shield spell as well as anything else that would block the Magic Missile spell.
~
@25233 = ~Missile Storm
@25235 = ~Missile Storm

Level: 5
School: Invocation
Expand All @@ -375,7 +377,20 @@ Casting Time: 3
Area of Effect: Enemies within range
Saving Throw: None

The air around the caster crackles with energy as up to ten Fiery Missiles race toward each enemy within the area of effect. These are identical to the flaiming Magic Missiles created by the 2nd-level spell, in every respect: each one does 1d4 base damage plus 1d4 fire damage, and they are blocked by the Shield spell as well as anything else that would block the Magic Missile spell.
The air around the caster crackles with energy as up to ten Fiery Missiles race toward each enemy within the area of effect. These are identical to the flaming Magic Missiles created by the 2nd-level spell "Melf's Fiery Missiles," in every respect: each one does 1d4 base damage plus 1d4 fire damage, and they are blocked by the Shield spell as well as anything else that would block the Fiery Missiles spell (including Globes of Invulnerability).
~
@25236 = ~Scorcher Storm~
@25237 = ~Scorcher Storm

Level: 5
School: Invocation
Range: 30 feet
Duration: Instant
Casting Time: 3
Area of Effect: Enemies within range
Saving Throw: None

The air around the caster crackles with energy as a ray of fire hits each enemy within the area of effect. These are identical to the 2nd-level spell "Agannazar's Scorcher."
~
@16112 = ~Wondrous Recall

Expand Down
25 changes: 20 additions & 5 deletions d5_random_tweaks/lang/french/setup.tra
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
@1451 = ~Modifier Vague destructrice pour ne pas affecter le groupe~
@2508 = ~Améliorer Vagues de fatigue de Spell Revisions~
@2518 = ~Changer le type de dégâts et l'école de Lame fantomatique~
@2523 = ~Remplacer Feu du soleil par « Tempête de projectiles »~
@2523 = ~Remplacer Feu du Soleil~
@25231 = ~Remplacer Feu du Soleil par « Tempête de Projectiles »~
@25232 = ~Remplacer Feu du Soleil par « Tempête de Incinérateur »~
@1505 = ~Modifier Vision Véritable pour affecter le groupe~
@1603 = ~Rendre Barrière de lames dissipable par Brèche~
@1609 = ~Modifier Aube illusoire pour ignorer la résistance à la magie~
Expand Down Expand Up @@ -79,7 +81,7 @@
@3111 = ~Rings of Wizardry cast Spell Sequencers~
@3112 = ~Only Evermemory + Kontik's Ring cast Spell Sequencer~
@3113 = ~Replace Evermemory with a Ring of Acuity~

// *****
@4010 = ~Ajouter un jet de sauvegarde pour les effets d'absorption de niveau~
@4020 = ~Améliorer les valeurs de caractéristiques des monstres~
@4030 = ~Augmenter les points de vie des dragons~
Expand Down Expand Up @@ -315,8 +317,8 @@ Ce sort fait apparaître une épée silencieuse entièrement constituée de clar

La lame de lune absorbe l'énergie de la cible, ce qui se traduit par un total de 1d12, +4 points de dégâts magiques à chaque coup. Une victime touchée par la lame de lune a 50 % de chance d'être affectée par un effet de Lueur féerique si elle échoue à un jet de sauvegarde contre les sorts, ce qui lui donne un malus de 2 points à la CA et lui interdit de devenir invisible. Les morts-vivants, qui sont particulièrement vulnérables à l'énergie qui irradie de la lame, subissent 1d12 points de dégâts supplémentaires et doivent réussir un jet de sauvegarde pour ne pas être sous l'effet de Lenteur pendant 3 rounds.
~
@25231 = ~Tempête de projectiles~
@25232 = ~Tempête de projectiles
@25233 = ~Tempête de projectiles~
@25234 = ~Tempête de projectiles

Niveau : 5
École : Invocation
Expand All @@ -328,7 +330,7 @@ Jet de sauvegarde : aucun

L'air autour du lanceur crépite d'énergie alors que jusqu'à 10 projectiles magiques fusent vers chacun des ennemis dans la zone d'effet. Ils sont identiques aux Projectiles magiques générés par le sort du premier niveau à tout point de vue : chacun d'entre eux inflige 1d6+1 points de dégâts. Les projectiles sont bloqués par le sort de Bouclier et tout ce qui bloque Projectiles magiques.
~
@25233 = ~Tempête de projectiles
@25235 = ~Tempête de projectiles

Niveau : 5
École : Invocation
Expand All @@ -340,6 +342,19 @@ Jet de sauvegarde : aucun

L'air autour du lanceur crépite d'énergie alors que jusqu'à 10 projectiles ardents fusent vers chacun des ennemis dans la zone d'effet. Ils sont identiques aux Projectiles Ardents générés par le sort de niveau 2 à tout point de vue : chacun d'entre eux cause 1d4 points de dégâts de base plus 1d4 dégâts de feu, et sont bloqués par le sort de Bouclier et tout ce qui bloque Projectiles magiques.
~
@25236 = ~Tempête Incinérateur~
@25237 = ~Tempête Incinérateur

Niveau : 5
École : Invocation
Portée : 9m
Durée : Instantanée
Temps d'incantation : 3
Zone d'effet : Les ennemis à portée
Jet de sauvegarde : aucun

L'air autour du lanceur crépite d'énergie alors que feu d'incinerateur fuse vers chacun des ennemis dans la zone d'effet. Chacun projectile est identique au « Incinérateur d'Agannazar. »
~
@16112 = ~Souvenir merveilleux

Niveau :6
Expand Down

0 comments on commit ca2094a

Please sign in to comment.