Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
0.75.27
Browse files Browse the repository at this point in the history
targeting changes
  • Loading branch information
subtledoctor committed Mar 22, 2019
1 parent 6e85210 commit 7b57e00
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 80 deletions.
2 changes: 1 addition & 1 deletion faiths_and_powers/Faiths_and_Powers.tp2
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ BACKUP ~faiths_and_powers/backup~
AUTHOR ~SubtleD and Grammarsalad~


VERSION ~0.75.26~
VERSION ~0.75.27~


//README ~faiths_and_powers/readme-pnp.html~
Expand Down
114 changes: 35 additions & 79 deletions faiths_and_powers/lib/create_sphere_system.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ LAM d5_minor_access_levels
ACTION_PHP_EACH spellsphere AS spl => sph BEGIN
//
OUTER_SET lvl = spl_1
OUTER_SET mlvl = (%lvl% + 1)
OUTER_SET mlvl = (%lvl% + %d5_minor_shift%)
OUTER_SET flvl = (%lvl% - 1)
//
ACTION_IF !(~%sph%~ STRING_EQUAL_CASE ~universal~) BEGIN
Expand Down Expand Up @@ -496,14 +496,14 @@ ACTION_PHP_EACH spellsphere AS spl => sph BEGIN
END
SAY_EVALUATED 0x50 ~%new_desc%~
END
BUT_ONLY
IF_EXISTS BUT_ONLY
COPY_EXISTING ~%sphere%.spl~ ~override~
LPF CLONE_EFFECT INT_VAR match_opcode=171 STR_VAR match_resource=~SPWI101~ resource = EVAL ~%the_spell%~ END
BUT_ONLY
IF_EXISTS BUT_ONLY
ACTION_IF (%lvl% = 1) OR (%lvl% = 7) BEGIN
COPY_EXISTING ~%fsphere%.spl~ ~override~
LPF CLONE_EFFECT INT_VAR match_opcode=171 STR_VAR match_resource=~SPWI101~ resource = EVAL ~%the_spell%~ END
BUT_ONLY
IF_EXISTS BUT_ONLY
END
END
ACTION_IF (%lvl% != %spell_lvl%) BEGIN
Expand Down Expand Up @@ -545,10 +545,10 @@ ACTION_PHP_EACH spellsphere AS spl => sph BEGIN
END
SAY_EVALUATED 0x50 ~%new_desc%~
END
BUT_ONLY
IF_EXISTS BUT_ONLY
COPY_EXISTING ~%sphere%.spl~ ~override~
LPF CLONE_EFFECT INT_VAR match_opcode=171 STR_VAR match_resource=~SPWI101~ resource = EVAL ~%priest_res%~ END
BUT_ONLY
IF_EXISTS BUT_ONLY
ACTION_IF (%lvl% = 1) OR (%lvl% = 7) BEGIN
COPY_EXISTING ~%fsphere%.spl~ ~override~
LPF CLONE_EFFECT INT_VAR match_opcode=171 STR_VAR match_resource=~SPWI101~ resource = EVAL ~%priest_res%~ END
Expand Down Expand Up @@ -589,9 +589,10 @@ ACTION_PHP_EACH spellsphere AS spl => sph BEGIN
ELSE BEGIN
LPF ADD_SPELL_EFFECT INT_VAR opcode = 146 target = %eff_target% power = %lvl% parameter1 = 0 parameter2 = 1 timing = 2 STR_VAR resource = EVAL ~%the_spell%~ END
END
IF_EXISTS BUT_ONLY
COPY_EXISTING ~%msphere%.spl~ ~override~
LPF CLONE_EFFECT INT_VAR match_opcode=171 STR_VAR match_resource=~SPWI101~ resource = EVAL ~%minor_res%~ END
BUT_ONLY
IF_EXISTS BUT_ONLY
END
ACTION_IF (1 < %lvl%) BEGIN
COPY_EXISTING ~%the_spell%.spl~ ~override/%focus_res%.spl~
Expand All @@ -605,7 +606,7 @@ ACTION_PHP_EACH spellsphere AS spl => sph BEGIN
SET abil_number = (%abil_number% - 1)
WRITE_SHORT (%abil_offset% + 0x26 + (0x28 * %abil_number%)) 1
END
READ_BYTE (%eff_offset% + 0x02) eff_target
// READ_BYTE (%eff_offset% + 0x02) eff_target
LPF DELETE_EFFECT INT_VAR match_probability2 = 0 END
PATCH_IF (%abil_target% = 4) BEGIN
LPF ADD_SPELL_EFFECT INT_VAR opcode = 148 target = 1 power = %lvl% parameter1 = 0 parameter2 = 1 timing = 1 STR_VAR resource = EVAL ~%the_spell%~ END
Expand All @@ -620,11 +621,12 @@ ACTION_PHP_EACH spellsphere AS spl => sph BEGIN
END
END
ELSE BEGIN
LPF ADD_SPELL_EFFECT INT_VAR opcode = 146 target = %eff_target% power = %lvl% parameter1 = 0 parameter2 = 1 timing = 2 STR_VAR resource = EVAL ~%the_spell%~ END
LPF ADD_SPELL_EFFECT INT_VAR opcode = 146 target = 2 power = %lvl% parameter1 = 0 parameter2 = 1 timing = 2 STR_VAR resource = EVAL ~%the_spell%~ END
END
IF_EXISTS BUT_ONLY
COPY_EXISTING ~%fsphere%.spl~ ~override~
LPF CLONE_EFFECT INT_VAR match_opcode=171 STR_VAR match_resource=~SPWI101~ resource = EVAL ~%focus_res%~ END
BUT_ONLY
IF_EXISTS BUT_ONLY
END
END // end type = priest spells
//
Expand All @@ -646,90 +648,43 @@ ACTION_PHP_EACH spellsphere AS spl => sph BEGIN
END
COPY_EXISTING ~%sphere%.spl~ ~override~
LPF CLONE_EFFECT INT_VAR match_opcode=171 STR_VAR match_resource=~SPWI101~ resource = EVAL ~%priest_res%~ END
BUT_ONLY
IF_EXISTS BUT_ONLY
ACTION_IF (%lvl% = 7) BEGIN
COPY_EXISTING ~%fsphere%.spl~ ~override~
LPF CLONE_EFFECT INT_VAR match_opcode=171 STR_VAR match_resource=~SPWI101~ resource = EVAL ~%priest_res%~ END
BUT_ONLY
COPY_EXISTING ~%fsphere%.spl~ ~override~
LPF CLONE_EFFECT INT_VAR match_opcode=171 STR_VAR match_resource=~SPWI101~ resource = EVAL ~%priest_res%~ END
IF_EXISTS BUT_ONLY
END
ACTION_IF (%lvl% < 4) BEGIN
COPY_EXISTING ~%the_spell%.spl~ ~override/%minor_res%.spl~
WRITE_SHORT 0x1c 2
LPF ALTER_SPELL_HEADER INT_VAR location = 2 END
PATCH_IF (%d5_minor_shift% = 1) BEGIN
ACTION_IF (%d5_minor_shift% > 0) BEGIN
COPY_EXISTING ~%the_spell%.spl~ ~override/%minor_res%.spl~
WRITE_SHORT 0x1c 2
LPF ALTER_SPELL_HEADER INT_VAR location = 2 END
WRITE_LONG 0x34 %mlvl%
END
PATCH_IF (%d5_minor_shift% = 0) BEGIN
WRITE_LONG 0x34 %lvl%
END
READ_LONG 0x64 abil_offset
READ_SHORT 0x68 abil_number
READ_BYTE (%abil_offset% + 0x0c) abil_target
READ_SHORT (%abil_offset% + 0x0e) abil_range
READ_LONG 0x6a eff_offset
WHILE (%abil_number% > 0) BEGIN
SET abil_number = (%abil_number% - 1)
WRITE_SHORT (%abil_offset% + 0x26 + (0x28 * %abil_number%)) 1
END
READ_BYTE (%eff_offset% + 0x02) eff_target
LPF DELETE_EFFECT INT_VAR match_probability2 = 0 END
PATCH_IF (%abil_target% = 4) BEGIN
LPF ADD_SPELL_EFFECT INT_VAR opcode = 148 target = 1 power = %lvl% parameter1 = 0 parameter2 = 1 timing = 1 STR_VAR resource = EVAL ~%the_spell%~ END
PATCH_IF (%abil_range% < 35) BEGIN
PATCH_IF (%abil_range% > 4) BEGIN
LPF ALTER_SPELL_HEADER INT_VAR range = (%abil_range% - 3) END
END
PATCH_IF (%abil_range% < 5) BEGIN
LPF ALTER_SPELL_HEADER INT_VAR target = 5 END // what the hell?? why did I do this??
// LPF ALTER_SPELL_HEADER INT_VAR range = 2 END // maybe this is what I meant to do
END
END
END
ELSE BEGIN
LPF ADD_SPELL_EFFECT INT_VAR opcode = 146 target = %eff_target% power = %lvl% parameter1 = 0 parameter2 = 1 timing = 2 STR_VAR resource = EVAL ~%the_spell%~ END
END
COPY_EXISTING ~%msphere%.spl~ ~override~
LPF CLONE_EFFECT INT_VAR match_opcode=171 STR_VAR match_resource=~SPWI101~ resource = EVAL ~%minor_res%~ END
BUT_ONLY
IF_EXISTS BUT_ONLY
COPY_EXISTING ~%msphere%.spl~ ~override~
LPF CLONE_EFFECT INT_VAR match_opcode=171 STR_VAR match_resource=~SPWI101~ resource = EVAL ~%minor_res%~ END
IF_EXISTS BUT_ONLY
END
ACTION_IF (%d5_minor_shift% = 0) BEGIN
COPY_EXISTING ~%msphere%.spl~ ~override~
LPF CLONE_EFFECT INT_VAR match_opcode=171 STR_VAR match_resource=~SPWI101~ resource = EVAL ~%priest_res%~ END
IF_EXISTS BUT_ONLY
END
END
ACTION_IF (1 < %lvl%) BEGIN
ACTION_IF (%lvl% > 1) BEGIN
COPY_EXISTING ~%the_spell%.spl~ ~override/%focus_res%.spl~
WRITE_SHORT 0x1c 2
LPF ALTER_SPELL_HEADER INT_VAR location = 2 END
WRITE_LONG 0x34 %flvl%
READ_LONG 0x64 abil_offset
READ_SHORT 0x68 abil_number
READ_BYTE (%abil_offset% + 0x0c) abil_target
READ_SHORT (%abil_offset% + 0x0e) abil_range
READ_LONG 0x6a eff_offset
WHILE (%abil_number% > 0) BEGIN
SET abil_number = (%abil_number% - 1)
WRITE_SHORT (%abil_offset% + 0x26 + (0x28 * %abil_number%)) 1
END
READ_BYTE (%eff_offset% + 0x02) eff_target
LPF DELETE_EFFECT INT_VAR match_probability2 = 0 END
PATCH_IF (%abil_target% = 4) BEGIN
LPF ADD_SPELL_EFFECT INT_VAR opcode = 148 target = 1 power = %lvl% parameter1 = 0 parameter2 = 1 timing = 1 STR_VAR resource = EVAL ~%the_spell%~ END
PATCH_IF (%abil_range% < 35) BEGIN
PATCH_IF (%abil_range% > 4) BEGIN
LPF ALTER_SPELL_HEADER INT_VAR range = (%abil_range% - 3) END
END
PATCH_IF (%abil_range% < 5) BEGIN
LPF ALTER_SPELL_HEADER INT_VAR target = 5 END // what the hell?? why did I do this??
// LPF ALTER_SPELL_HEADER INT_VAR range = 2 END // maybe this is what I meant to do
END
END
END
ELSE BEGIN
LPF ADD_SPELL_EFFECT INT_VAR opcode = 146 target = %eff_target% power = %lvl% parameter1 = 0 parameter2 = 1 timing = 2 STR_VAR resource = EVAL ~%the_spell%~ END
END
IF_EXISTS BUT_ONLY
COPY_EXISTING ~%fsphere%.spl~ ~override~
LPF CLONE_EFFECT INT_VAR match_opcode=171 STR_VAR match_resource=~SPWI101~ resource = EVAL ~%focus_res%~ END
BUT_ONLY
IF_EXISTS BUT_ONLY
END
END
END
END
/*
ACTION_IF (~%sph%~ STRING_EQUAL_CASE ~universal~) BEGIN
ACTION_IF (FILE_CONTAINS_EVALUATED (~spell.ids~ ~%spl%~)) BEGIN
LAF RES_NUM_OF_SPELL_NAME STR_VAR spell_name = EVAL ~%spl%~ RET spell_res spell_num END
Expand All @@ -744,6 +699,7 @@ ACTION_PHP_EACH spellsphere AS spl => sph BEGIN
BUT_ONLY
END
END
*/
END
//__________________________________________________________________________________

Expand Down

0 comments on commit 7b57e00

Please sign in to comment.