Skip to content

Commit

Permalink
Fixing spell not expiring on Invisibility and Invisibility 10' Radius -
Browse files Browse the repository at this point in the history
  • Loading branch information
grannypron committed Jan 31, 2021
1 parent 44ca773 commit 6be8c3e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
Binary file modified game39/game39.dsn/Data/specialAbilities.dat
Binary file not shown.
22 changes: 17 additions & 5 deletions game39/game39.dsn/Data/specialAbilities.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2627,15 +2627,24 @@ name = IsInsectFlee

\(BEGIN)
name = IsInvisible
[CharDisplayStatus] = $VAR prm; $VAR exp;
-prm = $SA_PARAM_GET(); exp = $GET_PARTY_TIME();
-$IF (prm <# exp) {$RETURN $SA_REMOVE();};
[Dispel] = $SA_REMOVE();
[DoesAttackSucceed] = $IF ($GET_COMBATANT_SA($AttackerContext(),"IsInvisible") != "-?-?-")
[DoesAttackSucceed] = $VAR prm; $VAR exp;
-prm = $SA_PARAM_GET(); exp = $GET_PARTY_TIME();
-$IF (prm <# exp) {$RETURN $SA_REMOVE();};
-$IF ($GET_COMBATANT_SA($AttackerContext(),"IsInvisible") != "-?-?-")
- {
- $DELETE_COMBATANT_SA($AttackerContext(),"IsInvisibleSpell");
- $DELETE_COMBATANT_SA($AttackerContext(),"IsInvisible");
- };
-$IF ($GET_HOOK_PARAM(5) >=# $GET_HOOK_PARAM(6)){$RETURN "Y";}
-$ELSE {$RETURN "N";};
[IsValidTarget] = $IF ($SA_COMBATANT_GET("IsSeeingInvisible") != "-?-?-"){$RETURN "Y";};
[IsValidTarget] = $VAR prm; $VAR exp;
-prm = $SA_PARAM_GET(); exp = $GET_PARTY_TIME();
-$IF (prm <# exp) {$RETURN $SA_REMOVE();};
-$IF ($SA_COMBATANT_GET("IsSeeingInvisible") != "-?-?-"){$RETURN "Y";};
-$IF ($GET_CHARACTER_SA($TargetContext(),"IsFaerieFire") != "-?-?-"){$RETURN;}
-$ELSE {$RETURN "N";};
\(END)
Expand All @@ -2660,7 +2669,10 @@ name = IsInvisibleRing

\(BEGIN)
name = IsInvisibleSpell
[CharDisplayStatus] = $IF ($GET_HOOK_PARAM(5) == "DISPLAY")
[CharDisplayStatus] = $VAR prm; $VAR exp;
-prm = $SA_PARAM_GET(); exp = $GET_PARTY_TIME();
-$IF (prm <# exp) {$RETURN $SA_REMOVE();};
-$IF ($GET_HOOK_PARAM(5) == "DISPLAY")
- {$SET_HOOK_PARAM(7,"Invisible, spell"); $SET_HOOK_PARAM(6,2); $RETURN 1;};
[Dispel] = $SA_REMOVE();
[spawn] = $SET_COMBATANT_SA($CharacterContext(),"IsInvisible",1);
Expand Down Expand Up @@ -8987,8 +8999,8 @@ name = spell_Invisible
-adj = $GET_CHARACTER_SA($AttackerContext(),"casterLevel");
-lvl = $GET_CHAR_Lvl(atk,cls) -# adj;
-$SET_CHARACTER_SA($TargetContext(),"DispelLevel",lvl);
-$SET_CHARACTER_SA($TargetContext(),"IsInvisibleSpell",2);
-$SET_CHARACTER_SA($TargetContext(),"IsInvisible",2);
-$SET_CHARACTER_SA($TargetContext(),"IsInvisibleSpell",$GET_PARTY_TIME() +# lvl);
-$SET_CHARACTER_SA($TargetContext(),"IsInvisible",$GET_PARTY_TIME() +# lvl);
[RemoveLinger] = $RETURN "TARGETS";
\(END)

Expand Down
Binary file modified game39/game39.dsn/Data/spells.dat
Binary file not shown.
4 changes: 2 additions & 2 deletions game39/game39.dsn/Data/spells.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6005,8 +6005,8 @@ target quantity = 1
level = 2
casting time = 2
casting time units = initiative
duration = 1
duration units = days
duration = level
duration units = rounds
target duration = 0
price = 0
priority = 500
Expand Down

0 comments on commit 6be8c3e

Please sign in to comment.