This is my first suggestion/submission be gentle
Thanks to Teven for helping out with this.
Code: Select all
Index: bluemagic/blank_gaze.lua
===================================================================
--- bluemagic/blank_gaze.lua (revision 0)
+++ bluemagic/blank_gaze.lua (working copy)
@@ -0,0 +1,43 @@
+-----------------------------------------
+-- Spell: Blank Gaze
+--
+-----------------------------------------
+require("scripts/globals/magic");
+require("scripts/globals/status");
+require("scripts/globals/settings");
+-----------------------------------------
+-- OnSpellCast
+-----------------------------------------
+
+function OnMagicCastingCheck(caster,target,spell)
+ return 0;
+end;
+
+function onSpellCast(caster,target,spell)
+
+ -- Pull base stats.
+ dINT = (caster:getStat(MOD_INT) - target:getStat(MOD_INT));
+
+ -- apply bonus, flash is hard to fully resist
+ bonus = AffinityBonus(caster,spell) + 300;
+
+ local resist = applyResistance(caster,spell,target,dINT,BLUE_SKILL,bonus);
+ local effect = EFFECT_NONE;
+
+ if(resist > 0.0625) then
+ if(target:hasStatusEffect(EFFECT_FLASH) == false) then
+ spell:setMsg(341);
+ effect = target:dispelStatusEffect();
+ if(effect == EFFECT_NONE) then
+ -- no effect
+ spell:setMsg(75);
+ end
+ else
+ spell:setMsg(75);
+ end
+ else
+ spell:setMsg(85);
+ end
+
+ return effect;
+end;
Index: bluemagic/geist_wall.lua
===================================================================
--- bluemagic/geist_wall.lua (revision 0)
+++ bluemagic/geist_wall.lua (working copy)
@@ -0,0 +1,42 @@
+-----------------------------------------
+-- Spell: Geist Wall
+--
+-----------------------------------------
+require("scripts/globals/magic");
+require("scripts/globals/status");
+require("scripts/globals/settings");
+-----------------------------------------
+-- OnSpellCast
+-----------------------------------------
+
+function OnMagicCastingCheck(caster,target,spell)
+ return 0;
+end;
+
+function onSpellCast(caster,target,spell)
+ -- Pull base stats.
+ dINT = (caster:getStat(MOD_INT)*1.3 - target:getStat(MOD_INT));
+
+ -- apply bonus, flash is hard to fully resist
+ bonus = AffinityBonus(caster,spell);
+
+ local resist = applyResistance(caster,spell,target,dINT,BLUE_SKILL,bonus);
+ local effect = EFFECT_NONE;
+
+ if(resist > 0.0625) then
+ if(target:hasStatusEffect(EFFECT_FLASH) == false) then
+ spell:setMsg(341);
+ effect = target:dispelStatusEffect();
+ if(effect == EFFECT_NONE) then
+ -- no effect
+ spell:setMsg(75);
+ end
+ else
+ spell:setMsg(75);
+ end
+ else
+ spell:setMsg(85);
+ end
+
+ return effect;
+end;
\ No newline at end of file
Index: dispel.lua
===================================================================
--- dispel.lua (revision 3257)
+++ dispel.lua (working copy)
@@ -2,7 +2,9 @@
-- Spell: Dispel
--
-----------------------------------------
-
+require("scripts/globals/magic");
+require("scripts/globals/status");
+require("scripts/globals/settings");
-----------------------------------------
-- OnSpellCast
-----------------------------------------
Index: dispelga.lua
===================================================================
--- dispelga.lua (revision 3257)
+++ dispelga.lua (working copy)
@@ -2,7 +2,9 @@
-- Spell: Dispelga
--
-----------------------------------------
-
+require("scripts/globals/magic");
+require("scripts/globals/status");
+require("scripts/globals/settings");
-----------------------------------------
-- OnSpellCast
-----------------------------------------
@@ -37,3 +39,4 @@
end
return effect;
+end;
\ No newline at end of file