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

4b10 bug-fixes from SD #22

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
setup-item_rev
setup-item_rev.command
item_rev/backup/*
.DS_Store
7 changes: 6 additions & 1 deletion item_rev/components/backstabbing.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,13 @@ COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ override PATCH_IF SOURCE_SIZE>0x71 BEGIN
END
END ELSE BEGIN
READ_BYTE 0x1f us2
READ_BYTE 0x31 prof
PATCH_IF (us2 & 2)!=2 || (us3 & 11)!=11 BEGIN // usable by any thief multiclass
WRITE_BYTE 0x20 (us3 & `64)
PATCH_IF (IS_AN_INT %prof%) BEGIN
PATCH_IF (prof > 88) && (prof < 116) BEGIN
WRITE_BYTE 0x20 (us3 & `64)
END
END
END
END
END
Expand Down
4 changes: 4 additions & 0 deletions item_rev/components/main/item_content.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,10 @@ COPY ~%source%/STAFF_OF_RYNN_3.tpa~ ~%target%~
COPY ~item_rev/itm/sw1h10a.eff~ ~override~
COPY ~item_rev/itm/sw1h10b.eff~ ~override~
COPY ~item_rev/itm/sw1h10c.eff~ ~override~
COPY ~item_rev/itm/d51h10x.spl~ ~override~
ACTION_IF (FILE_EXISTS_IN_GAME ~clabth04.2da~) BEGIN
APPEND ~clabth04.2da~ ~NO_SW1H10 AP_D51H10X **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ~ UNLESS ~AP_D51H10X~
END
>>>>>>>>
COPY ~%source%/SHORT_SWORD_OF_BACKSTABBING_3.tpa~ ~%target%~

Expand Down
2 changes: 1 addition & 1 deletion item_rev/components/main/items.2da
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ POTION_OF_INSIGHT POTION potn43 1 1 1
POTION_OF_STRENGTH POTION potn44 1 1 1 1 1 1 #6976 @3084 #16264 @3085 * * * * //extra_content
POTION_OF_FREEDOM POTION potn45 1 1 1 1 1 1 #6976 @3086 #16264 @3087 * * * * //extra_content
POTION_OF_STONE_FORM POTION potn46 1 1 1 1 1 1 #6976 @3088 #16264 @3089 * * * * //extra_content
MAREKS_POTION_OF_ANTIDOTE POTION potn47 1 1 1 1 1 1 #6976 @3090 #16264 @3091 * * * * //extra_content
MAREKS_POTION_OF_ANTIDOTE POTION potn47 1 1 1 0 1 0 #6976 @3090 #16264 @3091 * * * * //extra_content
VIAL_OF_MYSTERIOUS_LIQUID POTION potn48 1 1 1 1 1 1 #6976 @3092 #16264 @3093 * * * *
POTION_OF_EXTRA_HEALING POTION potn52 1 1 1 1 1 1 #6976 @3094 #16264 @3095 * * * * //extra_content
FESTULE_THE_ALCHEMISTS_POTION POTION potn53 1 1 0 0 1 1 #6976 @3096 #16264 @3097 * * * *
Expand Down
1 change: 1 addition & 0 deletions item_rev/components/main/shared_effects.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ COPY ~item_rev/itm/goledam6.eff~ ~override~
COPY ~item_rev/itm/goledam8.eff~ ~override~
COPY ~item_rev/itm/goledie.eff~ ~override~
COPY ~item_rev/itm/holydam.eff~ ~override~
COPY ~item_rev/itm/holydam2.eff~ ~override~
COPY ~item_rev/itm/holydam3.eff~ ~override~
COPY ~item_rev/itm/holydam4.eff~ ~override~
COPY ~item_rev/itm/holydam6.eff~ ~override~
Expand Down
48 changes: 48 additions & 0 deletions item_rev/components/main_component.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -189,3 +189,51 @@ COPY - ~item_rev/components/main/items.2da~ ~item_rev/components/main~

/*------------------Iron Crisis-----------------*/
INCLUDE ~item_rev/lib/iron_crisis.tpa~


/*-------------------Shamans--------------------*/
// from subtledoctor
ACTION_IF FILE_EXISTS_IN_GAME ~enginest.2da~ BEGIN
COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~
PATCH_IF (~%SOURCE_SIZE%~ > ~0x71~) BEGIN
READ_BYTE 0x1c type
READ_BYTE 0x31 prof
PATCH_IF (%prof% = 92) OR (%prof% = 105) OR (%type% = 5) BEGIN // axes or shortbows or arrows
WRITE_BYTE 0x21 (THIS BAND 0b10111111)
LPF DELETE_EFFECT INT_VAR silent = 1 match_opcode = 319 match_target = 1 match_power = 0 match_parameter2 = 5 match_parameter1 = 11 match_timing = 2 END
LPF ADD_ITEM_EQEFFECT INT_VAR opcode = 319 target = 1 power = 0 parameter2 = 5 parameter1 = 11 timing = 2 END
END
END
BUT_ONLY
END


/*-----------starmetal hits loup garou------------*/
COPY_EXISTING ~smcudge.itm~ ~override~
~cdismcud.itm~ ~override~
~sw2h07.itm~ ~override~
WRITE_BYTE 0x19 (THIS BOR 0b00000010)
IF_EXISTS BUT_ONLY


/*-------------------EE brac11------------------*/
ACTION_IF GAME_IS ~bgee bg2ee eet iwdee~ BEGIN
COPY_EXISTING ~dvwinded.spl~ ~override~
LPF ALTER_SPELL_HEADER INT_VAR target = 7 END
BUT_ONLY
END


/*----------------EE ammo stacks----------------*/
// from subtledoctor
ACTION_IF GAME_IS ~bgee bg2ee eet iwdee~ BEGIN
COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~
PATCH_IF (~%SOURCE_SIZE%~ > ~0x71~) BEGIN
READ_BYTE 0x1c type
PATCH_IF (%type% = 5) OR (%type% = 14) OR (%type% = 31) BEGIN // arrows or bullets or bolts
WRITE_SHORT 0x38 80
END
END
BUT_ONLY
END

21 changes: 18 additions & 3 deletions item_rev/components/spellcasting_armor.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ ACTION_PHP_EACH armor AS ind => res BEGIN
PATCH_IF bards_armor_spell_penalties || (class != 5 || (res != 4 && res != 1 && res != 12 && res != 3 && res != 2 && res != 12 && res != 36)) BEGIN
LPF ADD_ITEM_EQEFFECT INT_VAR opcode=177 target=1 timing=2 parameter1=class parameter2=5 STR_VAR resource=EVAL ~7c#IR%value%~ END
END
END
END
END
END

Expand All @@ -157,9 +157,9 @@ ACTION_PHP_EACH armor AS ind => res BEGIN
17 // fighter/mage/cleric
BEGIN
/* CrevsDaak: avoid patching leather, studded, hide and chain (both mithral and elven) when it comes to Bards, as per Demi's request. */
PATCH_IF bards_armor_spell_penalties || (class != 5 || (res != 4 && res != 1 && res != 12 && res != 3 && res != 2 && res != 12 && res != 36)) BEGIN
PATCH_IF bards_armor_spell_penalties || (class != 5 || (res != 4 && res != 1 && res != 12 && res != 3 && res != 2 && res != 12 && res != 36)) BEGIN
LPF ADD_ITEM_EQEFFECT INT_VAR opcode=177 target=1 timing=2 parameter1=class parameter2=5 STR_VAR resource=EVAL ~ag#irs%value%~ END
END
END
END
PATCH_IF option=3 BEGIN
PATCH_FOR_EACH class IN
Expand All @@ -183,6 +183,21 @@ ACTION_PHP_EACH armor AS ind => res BEGIN

END

PATCH_FOR_EACH d5arca IN ~d5arcal~ ~d5arcac~ ~d5arcap~ ~d5arca1~ ~d5arca2~ ~d5arca3~ BEGIN // compat with subtledoctor
LPF DELETE_EFFECT INT_VAR match_opcode = 177 STR_VAR match_resource = EVAL ~%d5arca%~ END
END

PATCH_FOR_EACH zarm IN ~d5zarm1l~ ~d5zarm2l~ ~d5zarm3l~ ~d5zarm1c~ ~d5zarm2c~ ~d5zarm3c~ ~d5zarm1p~ ~d5zarm2p~ ~d5zarm3p~ BEGIN // compat with subtledoctor
LPF DELETE_EFFECT INT_VAR match_opcode = 177 STR_VAR match_resource = EVAL ~%zarm%~ END
END
LPF DELETE_EFFECT INT_VAR match_opcode = 146 STR_VAR match_resource = ~d5zarml~ END
LPF DELETE_EFFECT INT_VAR match_opcode = 146 STR_VAR match_resource = ~d5zarmc~ END
LPF DELETE_EFFECT INT_VAR match_opcode = 146 STR_VAR match_resource = ~d5zarmp~ END
LPF DELETE_EFFECT INT_VAR match_opcode = 146 STR_VAR match_resource = ~d5zw172l~ END
LPF DELETE_EFFECT INT_VAR match_opcode = 146 STR_VAR match_resource = ~d5zw172c~ END
LPF DELETE_EFFECT INT_VAR match_opcode = 146 STR_VAR match_resource = ~d5zw172p~ END
LPF DELETE_EFFECT INT_VAR match_opcode = 177 STR_VAR match_resource = ~d5zncast~ END

END BUT_ONLY
END
END
Expand Down
15 changes: 14 additions & 1 deletion item_rev/item_rev.tp2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ README ~item_rev/readme-item_rev.html~

ASK_EVERY_COMPONENT

VERSION ~V4 Beta 10~
VERSION ~v4beta10sd19~

ALWAYS
OUTER_PATCH ~~ BEGIN
Expand Down Expand Up @@ -45,6 +45,10 @@ LANGUAGE ~Russian~
~item_rev/languages/russian/description_updates.tra~



///////////////////////////////////////////////////////////////////////////


///////////////////////////////////////////////////////////////////////////
// Item Revisions by Demivrgvs (Main Component) - Installs all items //
///////////////////////////////////////////////////////////////////////////
Expand All @@ -65,8 +69,10 @@ LOAD_TRA ~item_rev/languages/english/potion_descriptions.tra~
LOAD_TRA ~item_rev/languages/%LANGUAGE%/item_descriptions.tra~
LOAD_TRA ~item_rev/languages/%LANGUAGE%/item_upgrades.tra~
LOAD_TRA ~item_rev/languages/%LANGUAGE%/potion_descriptions.tra~

INCLUDE ~item_rev/components/main_component.tpa~


///////////////////////////////////////////////////////////////////////////
// Store Revisions //
///////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -105,6 +111,7 @@ END
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////


///////////////////////////////////////////////////////////////////////////
// Revised Armor //
///////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -224,6 +231,11 @@ LOAD_TRA ~item_rev/languages/english/proficiencies.tra~
LOAD_TRA ~item_rev/languages/%LANGUAGE%/proficiencies.tra~
INCLUDE ~item_rev/components/weapon_changes.tpa~

ACTION_IF (MOD_IS_INSTALLED ~faiths_and_powers.tp2~ ~75~) BEGIN
INCLUDE ~item_rev/lib/fnp_weapons.tpa~
LAF d5_fnp_weaps END
END


///////////////////////////////////////////////////////////////////////////
// Enchantment Doesn't Affect Speed Factor of Weapons //
Expand Down Expand Up @@ -425,3 +437,4 @@ INCLUDE ~item_rev/components/wands.tpa~
//REQUIRE_PREDICATE (ENGINE_IS ~tob bgee bg2ee~ /* || ENGINE_IS ~iwdee~ */) @9002
//
//INCLUDE ~item_rev/components/shield_bash.tpa~

Binary file modified item_rev/itm/blun10.itm
Binary file not shown.
Binary file added item_rev/itm/d51h10x.spl
Binary file not shown.
Binary file modified item_rev/itm/dvjelly.itm
Binary file not shown.
Binary file modified item_rev/itm/dvrat.itm
Binary file not shown.
Binary file modified item_rev/itm/dvwere.itm
Binary file not shown.
Binary file modified item_rev/itm/helm24.itm
Binary file not shown.
Binary file added item_rev/itm/holydam2.eff
Binary file not shown.
Binary file modified item_rev/itm/misc75.itm
Binary file not shown.
Binary file modified item_rev/itm/potn19.spl
Binary file not shown.
Binary file modified item_rev/itm/shld06.itm
Binary file not shown.
Binary file modified item_rev/itm/shld15.itm
Binary file not shown.
Binary file modified item_rev/itm/shld18.itm
Binary file not shown.
Binary file modified item_rev/itm/shld23.itm
Binary file not shown.
Binary file modified item_rev/itm/shld27.itm
Binary file not shown.
Binary file modified item_rev/itm/shld27i.eff
Binary file not shown.
Binary file modified item_rev/itm/shld30.itm
Binary file not shown.
Binary file modified item_rev/itm/staf19.itm
Binary file not shown.
Binary file modified item_rev/itm/sw1h03.itm
Binary file not shown.
Binary file modified item_rev/itm/sw1h10.itm
Binary file not shown.
Binary file modified item_rev/itm/sw1h10b.eff
Binary file not shown.
Binary file modified item_rev/itm/sw1h15.itm
Binary file not shown.
Binary file modified item_rev/itm/sw1h18.itm
Binary file not shown.
Binary file modified item_rev/itm/sw1h24.itm
Binary file not shown.
Binary file modified item_rev/itm/sw1h31.itm
Binary file not shown.
Empty file modified item_rev/languages/english/description_updates.tra
100644 → 100755
Empty file.
Empty file modified item_rev/languages/english/item_descriptions.tra
100644 → 100755
Empty file.
Empty file modified item_rev/languages/english/item_upgrades.tra
100644 → 100755
Empty file.
Empty file modified item_rev/languages/english/masterwork.tra
100644 → 100755
Empty file.
Empty file modified item_rev/languages/english/multiclasses.tra
100644 → 100755
Empty file.
Empty file modified item_rev/languages/english/potion_descriptions.tra
100644 → 100755
Empty file.
Empty file modified item_rev/languages/english/proficiencies.tra
100644 → 100755
Empty file.
Empty file modified item_rev/languages/english/spell_revisions.tra
100644 → 100755
Empty file.
Empty file modified item_rev/languages/english/store_revisions.tra
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion item_rev/lib/armor_list.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ bdchan04 => 4 // Commander's Chain (chain)
bdchan05 => 4 // Corwin's armor (chain)
bdchan06 => 5 // Stalwart Scale (splint)
bdchanca => 4 // Hallowed Hero (chain)
bdchanel => 4 // elven chain
bdchanel => 36 // elven chain
bdchangh => 5 // splint +1
bdleat01 => 3 // Cornugon Revenge (hide)
bdleat02 => 3 // Goblin Hide (hide)
Expand Down
32 changes: 32 additions & 0 deletions item_rev/lib/fnp_weapons.tpa
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Function for compatibility with Faiths & Powers revised cleric weapon use


DEFINE_ACTION_FUNCTION d5_fnp_weaps BEGIN

ACTION_DEFINE_ASSOCIATIVE_ARRAY fnpproftypes BEGIN
89 => 22
90 => 20
91 => 19
92 => 25
93 => 57
94 => 30
95 => 29
96 => 16
97 => 21
98 => 44
99 => 69
100 => 23
101 => 17
102 => 26
115 => 26
END
COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~
READ_BYTE 0x31 prof
PHP_EACH fnpproftypes AS profnum => itemtype BEGIN
PATCH_IF prof = %profnum% BEGIN
WRITE_SHORT 0x1c %itemtype%
END
END
BUT_ONLY

END // end define function
Loading