Expanded spells for PoA .35
Expanded spells for PoA .35
This commit is contained in:
parent
d8135ed45c
commit
7debaedd2a
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
*.hak
|
||||
_haks/output/poa_dev.md5
|
||||
Compiler - 35spells.bat
|
||||
|
66
35expandedspells/disease.2da
Normal file
66
35expandedspells/disease.2da
Normal file
@ -0,0 +1,66 @@
|
||||
2DA V2.0
|
||||
|
||||
Label Name First_Save Subs_Save Incu_Hours Dice_1 Dam_1 Type_1 Dice_2 Dam_2 Type_2 Dice_3 Dam_3 Type_3 Type End_Incu_Script 24_Hour_Script
|
||||
0 Blinding_Sickness 4689 26 26 1 4 1 0 **** **** **** **** **** **** EXTRA **** NW_S3_BlindSick
|
||||
1 Cackle_Fever 4690 26 26 1 6 1 4 **** **** **** **** **** **** EXTRA **** ****
|
||||
2 Demon_Fever 4691 28 28 1 6 1 2 **** **** **** **** **** **** SUPER **** Nw_S3_DemonFev
|
||||
3 Devil_Chills 4692 24 24 1 4 1 0 **** **** **** **** **** **** SUPER **** ****
|
||||
4 Filth_Fever 4693 22 22 1 3 1 3 3 1 2 **** **** **** EXTRA **** ****
|
||||
5 Mindfire 4694 22 22 1 4 1 3 **** **** **** **** **** **** EXTRA **** ****
|
||||
6 Mummy_Rot 4695 30 30 1 6 1 2 **** **** **** **** **** **** SUPER **** ****
|
||||
7 Red_Ache 4696 25 25 1 6 1 0 **** **** **** **** **** **** EXTRA **** ****
|
||||
8 Shakes 4697 23 23 1 6 1 0 **** **** **** **** **** **** EXTRA **** ****
|
||||
9 Slimy_Doom 4698 24 24 1 4 1 1 **** **** **** **** **** **** EXTRA **** ****
|
||||
10 Red_Slaad_Eggs 4699 27 27 1 6 2 1 6 2 0 6 2 2 EXTRA NW_S3_SlaadEgg ****
|
||||
11 Ghoul_Rot 4700 28 28 1 6 1 2 6 1 0 **** **** **** SUPER **** ****
|
||||
12 Zombie_Creep 4701 25 25 1 4 1 2 4 1 1 **** **** **** SUPER **** ****
|
||||
13 Dread_Blisters 4702 23 23 1 4 1 2 4 1 5 **** **** **** SUPER **** ****
|
||||
14 Burrow_Maggots 4703 27 27 1 4 1 3 4 1 4 **** **** **** SUPER **** ****
|
||||
15 Soldier_Shakes 4704 35 35 1 **** **** **** **** **** **** **** **** **** **** **** Nw_S3_SoldShake
|
||||
16 Vermin_Madness 4705 23 13 1 1 1 3 1 1 4 1 1 5 EXTRA **** ****
|
||||
17 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
|
||||
18 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
|
||||
19 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
|
||||
20 Contagion_Blinding_Sickness 4689 127 16 1 4 1 0 **** **** **** **** **** **** EXTRA **** NW_S3_BlindSick
|
||||
21 Contagion_Cackle_Fever 4690 127 16 1 6 1 4 **** **** **** **** **** **** EXTRA **** ****
|
||||
22 Contagion_Filth_Fever 4693 127 12 1 3 1 3 3 1 2 **** **** **** EXTRA **** ****
|
||||
23 Contagion_Mindfire 4694 127 12 1 4 1 3 **** **** **** **** **** **** EXTRA **** ****
|
||||
24 Contagion_Red_Ache 4696 127 15 1 6 1 0 **** **** **** **** **** **** EXTRA **** ****
|
||||
25 Contagion_Shakes 4697 127 13 1 6 1 0 **** **** **** **** **** **** EXTRA **** ****
|
||||
26 Contagion_Slimy_Doom 4698 127 14 1 4 1 1 **** **** **** **** **** **** EXTRA **** ****
|
||||
27 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
|
||||
28 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
|
||||
29 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
|
||||
30 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
|
||||
31 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
|
||||
32 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
|
||||
33 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
|
||||
34 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
|
||||
35 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
|
||||
36 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
|
||||
37 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
|
||||
38 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
|
||||
39 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
|
||||
40 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
|
||||
41 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
|
||||
42 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
|
||||
43 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
|
||||
44 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
|
||||
45 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
|
||||
46 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
|
||||
47 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
|
||||
48 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
|
||||
49 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
|
||||
50 **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** ****
|
||||
51 Pestilence_disease 16826251 127 127 0 **** **** **** **** **** **** **** **** **** SUPER **** sp_pest_aux
|
||||
52 Talonas_Blight 16824947 127 127 2 1 4 2 1 4 5 **** **** **** SUPER **** prc_talona
|
||||
53 Blue_guts 16829286 127 127 0 **** **** **** **** **** **** **** **** **** SUPER **** prc_blue_guts
|
||||
54 Soul_Rot 16829287 127 127 0 **** **** **** **** **** **** **** **** **** SUPER **** prc_soul_rot
|
||||
55 Agony_Addiction **** 127 127 0 **** **** **** **** **** **** **** **** **** SUPER **** prc_addct_ag
|
||||
56 Baccaran_Addiction **** 127 127 0 **** **** **** **** **** **** **** **** **** SUPER **** prc_addct_bac
|
||||
57 Devilweed_Addiction **** 127 127 0 **** **** **** **** **** **** **** **** **** SUPER **** prc_addct_dw
|
||||
58 Luhix_Addiction **** 127 127 0 **** **** **** **** **** **** **** **** **** SUPER **** prc_addct_lhx
|
||||
59 Mushroom_powder_Addiction **** 127 127 0 **** **** **** **** **** **** **** **** **** SUPER **** prc_addct_msh
|
||||
60 Sannish_Addiction **** 127 127 0 **** **** **** **** **** **** **** **** **** SUPER **** prc_addct_snh
|
||||
61 Terran_Brandy_Addiction **** 127 127 0 **** **** **** **** **** **** **** **** **** SUPER **** prc_addct_tb
|
||||
62 Vodare_Addiction **** 127 127 0 **** **** **** **** **** **** **** **** **** SUPER **** prc_addct_vdr
|
949
35expandedspells/magias alteradas.txt
Normal file
949
35expandedspells/magias alteradas.txt
Normal file
@ -0,0 +1,949 @@
|
||||
- alteracoes de magias: nw_s0_ (primeira leva de magias do nwn)
|
||||
|
||||
fireball- caster lvl ate 20 ao inves de 10
|
||||
meteor swarm - ao inves de 20d6 de dano agora eh d6(casterlvl) de dano
|
||||
aberrate- +1 de ac a cada 3 caster lvls sem o cap em 5 de ac
|
||||
Searing Light- caster lvl max era 10 passou a ser 20
|
||||
shadow shield- soak +3/10 alterada para +3/caster lvl
|
||||
sleep- caster lvl 20
|
||||
virtue- ao inves de 1 de hp acima do maximo agora a spell da o seu nivel de caster como hp acima do maximo
|
||||
Chain Lightning- caster lvl ate 40 ao inves de 20
|
||||
Lightning Bolt- era 10 o cap foi para 20
|
||||
Phantasmal Killer- ao inves dos 3d6 de dano alterado para 7d6
|
||||
Aid/Mass Aid- aumento do maximo de bonus de hp
|
||||
nw_s0_awaken- aumento nos buffs da criatura ao inves de 4 mudou para 4d4
|
||||
Barkskin- removido cap de +5 podendo chegar ate +20
|
||||
Blade Barrier b c- maximo 40d6 de dano
|
||||
Burning Hands- caster maximo de 5 para 20
|
||||
Call Lightning- caster maximo de 10 para 20
|
||||
Circle of Death- maximo hd afetado subiu de 10 para 40
|
||||
Cloudkill a c- hd menor q 20 morre direto, hd entre 21-40 teste contra morte, hd41+ dano
|
||||
Color Spray- hd 1 a 20 para sleep, 20 a 30 para blind, 40+ para stun
|
||||
Cone of Cold- cap era 15 passou para 40 caster lvls
|
||||
daze- adicionado casterlvl/2 ao cap
|
||||
Delayed Blast Fireball- cap era 20 foi para 60
|
||||
Destruction- dano era 10d6 subi para 60d6
|
||||
Enervation- hp para undead com cap em 125hp
|
||||
Energy Drain- hp para undead alem do valor normal da magia + casterlvl+spellpenetration/2
|
||||
Fire Storm- cap era 20 agora é 60 caster lvls
|
||||
Flame Strike- cap era 15d6, agora é 40d6
|
||||
Hammer of the Gods- cap era 15 agora é 40 caster lvls
|
||||
Healing Circle- o cap era 20 caster lvls agora é 40
|
||||
Heal/Harm- cap era 150hp e o caster lvl era capado em 20, agora o hp é 150+casterlvl e o lvl 40 de caster
|
||||
Horrid Wilting- cap era 25 agora é 60
|
||||
Incendiary Cloud abc- dano (casterlvl)d6 ao inves de 4d6
|
||||
Magic Missile- cap de 5 misseis alterado para ate 20 misseis, classe force missle magic ganha mais misseis a cada 5 levels, dano era 1d4 por missel agora é (casterlvl/4)d4+1
|
||||
Power Word Stun- minimo um round de stun
|
||||
Ray of Frost- sem cap
|
||||
regeneration- 6+ casterlvl/2 de pontos de hp regenerados a cada 6 segundos
|
||||
soundburst- dano antes era d8, agora d8() +(casterlvl + spell penetration/4)
|
||||
Storm of Vengeance- sem cap d6(casterlvl)
|
||||
Sunbeam= caster cap de 20 para 60
|
||||
nw_s0_vamptch- cap estaa em 10 agora esta em 20
|
||||
Wall of Fire- adicionado casterlvl/2 ao dano original
|
||||
Weird- adicionado o caster lvl ao dano original
|
||||
Word of Faith- hd menor q 20 morre direto, 20a 30 stun ou confusion ou blind, 30 a 40 stun ou blind, 41+ blind
|
||||
|
||||
- nao alteradas (ou nao precisavam, ou ja estao com o cap removido pelo prc, ou necessitam alteracoes em summons, ou muito complicadas para este primeiro lançamento)
|
||||
convert wand
|
||||
create tatoo
|
||||
dimension door
|
||||
dimension lock
|
||||
heart ripper
|
||||
protection from spells
|
||||
powerword kill
|
||||
remove fear
|
||||
Remove Paralysis
|
||||
sanctuary
|
||||
see invisibility
|
||||
Shapechange
|
||||
spell resist
|
||||
stoneskin
|
||||
tenser transformation
|
||||
time stop
|
||||
true seeing
|
||||
warcry
|
||||
web
|
||||
contagion
|
||||
Control Undead
|
||||
deathward
|
||||
dmgred
|
||||
Dominate Animal
|
||||
Dominate Monster
|
||||
Dominate Person
|
||||
doom
|
||||
elements
|
||||
energy buffer
|
||||
Ethereal Visage
|
||||
Ghostly Visage
|
||||
Potion of Extra Theiving NW_S0_ExtraThf
|
||||
Freedom of Movement
|
||||
Elemental Shield
|
||||
nw_s0_protection
|
||||
NW_S0_EvardsB
|
||||
Flame Lash
|
||||
Greater Bull's Strength
|
||||
Greater Cat's Grace
|
||||
Greater Eagles Splendor
|
||||
Greater Endurance
|
||||
Greater Fox's Cunning
|
||||
Greater Owl's Wisdom
|
||||
Lesser Spell Breach
|
||||
Greater Spell Breach
|
||||
Lesser Spell Mantle
|
||||
spell mantle
|
||||
Greater Spell Mantle
|
||||
Greater Spell Turning
|
||||
Haste
|
||||
Hold Animal
|
||||
Hold Monster
|
||||
Hold Person
|
||||
Identify
|
||||
Knock
|
||||
Legend Lore
|
||||
Mass Haste
|
||||
Polymorph Self
|
||||
nw_s0_negprot
|
||||
Minor Globe of Invulnerability
|
||||
Globe of Invulnerability
|
||||
Mage Armor
|
||||
Mordenkainen's Disjunction
|
||||
Lesser Dispel
|
||||
Dispel Magic
|
||||
Greater Dispelling
|
||||
NW_S0_2PitFiend
|
||||
nw_s0_abilbuff
|
||||
Melf's Acid Arrow
|
||||
Acid Fog
|
||||
NW_S0_AcidFoga
|
||||
NW_S0_AcidFogB
|
||||
NW_S0_AcidFogC
|
||||
Aura of Vitality
|
||||
Bestow Curse
|
||||
NW_S0_BladeBar
|
||||
Bless
|
||||
Blindness/Deafness
|
||||
Charm Person or Animal
|
||||
Charm Monster
|
||||
Charm Person
|
||||
Magic Cirle Against Good a b
|
||||
Magic Cirle Against Evil a b
|
||||
clairadvorance
|
||||
Clarity
|
||||
Confusion
|
||||
Create Undead
|
||||
Create Greater Undead
|
||||
Summon Shadow
|
||||
NW_S0_SummShad02
|
||||
Creeping Doom a b c
|
||||
darkness abc
|
||||
Dismissal
|
||||
Divine Power
|
||||
Elemental Swarm
|
||||
Entangle a b c
|
||||
Evards Black Tentacles a b c
|
||||
Fear
|
||||
Feeblemind
|
||||
Find Traps
|
||||
Finger of Death
|
||||
Flame Arrow
|
||||
Gate
|
||||
nw_s0_ghoultch
|
||||
Grease a b c
|
||||
Lesser Planar Binding
|
||||
Planar Binding
|
||||
Greater Planar Binding
|
||||
Holy Aura
|
||||
Unholy Aura
|
||||
Ice Storm
|
||||
nw_s0_imprinvis
|
||||
nw_s0_invisib
|
||||
Invisibility Purge ab
|
||||
Invisibility Sphere ab
|
||||
Lesser Mind Blank
|
||||
Mind Blank
|
||||
Mind Fog abc
|
||||
Mordenkainen's Sword
|
||||
nw_s0_poison
|
||||
Ray of EnFeeblement
|
||||
nw_s0_resis
|
||||
Scare
|
||||
Silence abc
|
||||
nw_s0_slaylive
|
||||
Slow
|
||||
Stinking Cloud
|
||||
Wail of the Banshee
|
||||
Web abc
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------------
|
||||
feats/magias alteradas nw_s1_
|
||||
|
||||
NW_S1_DragWeak - Dragon Breath Weaken - evolutiva ate hd 180
|
||||
NW_S1_DragAcid - evolutiva ate hd 180
|
||||
NW_S1_DragCold - evolutiva ate hd 180
|
||||
NW_S1_DragGas - evolutiva ate hd 180
|
||||
NW_S1_Dragfire- evolutiva ate hd 180
|
||||
NW_S1_DragLightn- evolutiva ate hd 180
|
||||
NW_S1_Dragparal- evolutiva ate hd 180
|
||||
NW_S1_Dragsleep- evolutiva ate hd 180
|
||||
NW_S1_Dragslow- evolutiva ate hd 180
|
||||
Barbarian Rage- comba com todos os rages de classes de prestigio e é evolutiva ate o nivel 180 caso o servidor suporte
|
||||
|
||||
nao alteradas
|
||||
|
||||
Dragon Aura of Fear
|
||||
Aura of Fire
|
||||
Aura of Menace
|
||||
Aura of Protection
|
||||
Aura of Stunning
|
||||
Aura of Electricity
|
||||
Aura of Cold
|
||||
Aura of Blinding
|
||||
Howl of Doom
|
||||
Aura Unearthly Visage
|
||||
Aura of Unnatural
|
||||
|
||||
----------------------------------------------------------------------------------------------------------------------
|
||||
magias/feats alteradas nw_s2_
|
||||
|
||||
|
||||
Vampiric Drain- cap era 5hd foi para 20
|
||||
Lay_On_Hands- adicionado healer e combat mdic ao stack de lvls para o bonus de pontos de cura
|
||||
bard song - evolutiva ate o hitdice 180 caso o servidor suporte, todas as classes bardicas combam no somatorios dos levels
|
||||
|
||||
|
||||
|
||||
nao alteradas
|
||||
|
||||
Summon Animal Companion
|
||||
Summon Familiar
|
||||
Wild Shape
|
||||
Elemental Shape
|
||||
Wholeness of Body
|
||||
Divine Trickery
|
||||
Divine Strength
|
||||
Turn Undead
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
magias alteradas x0_s0
|
||||
|
||||
|
||||
|
||||
Acid Splash - sem cap
|
||||
Bigby's Forceful Hand bigby2- adicionado casterlvl/2 ao dc da magia
|
||||
Bombardment- cap era 20 casterlvls agora eh 60
|
||||
Divine Favor- cap de+5 removido evolutivo ate 20
|
||||
Earthquake- adicionado casterlvl nos danos e saves
|
||||
Electric Jolt- sem cap
|
||||
Firebrand- o cap era 15 agora eh casterlvl/2
|
||||
Flare- antes era 1 de attack descrease, agora eh 1+(casterlvl/4) de penalidade
|
||||
magicfang e greatermagicfang- evolutivas ate+20 ao inves de +5
|
||||
Inferno- ao inves de 2d6 de dano, random entre 2 e (casterlvl/2) de dano
|
||||
Isaacs Lesser Missile Storm- adicionado casterlvl/6 no dano e casterlvl/5 na quantidade de misseis
|
||||
Isaacs Greater Missile Storm- adicionado casterlvl/5 no dano e casterlvl/5 na quantidade de misseis
|
||||
Quillfire- cap era 5 agora eh 20
|
||||
x0_s0_shieldfait- cap era+5 agora o cap eh +20 respeitando a regra original do buff (2 + (nCasterLevel)/6;)
|
||||
Spike Growth- cap era 4 agora eh 20
|
||||
Sunburst- cap era 25 agora eh 60 e ainda + spell penetration combando com os 60 contra undeads
|
||||
Bigby's Clenched Fist bigby4- adicionado casterlvl ao dano
|
||||
Bigby's Crushing Hand bigby5- adicionado casterlvl ao dano
|
||||
|
||||
|
||||
nao alteradas
|
||||
|
||||
x0_s0_amplify
|
||||
Aura of Glory
|
||||
Bane
|
||||
Banishment
|
||||
Bigby's Interposing Hand bigby1
|
||||
Bigby's Grasping Hand bigby3
|
||||
Blood Frenzy
|
||||
Camoflage
|
||||
Continual Flame
|
||||
Dirge abc
|
||||
displace
|
||||
Drown
|
||||
x0_s0_entEN
|
||||
x0_s0_entEX
|
||||
Entropic Shield
|
||||
Etherealness
|
||||
Expeditious retreat
|
||||
Flesh to Stone
|
||||
Gust of Wind
|
||||
Balagarn's Iron Horn
|
||||
Tasha's Hideous Laughter
|
||||
Mass Camoflage
|
||||
One with the Land
|
||||
x0_s0_owlins
|
||||
Planar Ally
|
||||
Shield
|
||||
Stone To Flesh
|
||||
True Strike
|
||||
Undeath's Eternal Foe
|
||||
Wounding Whispers
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
feats/ magias alteradas x0_s1_ x0_s2_ x0_s3_
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
nao alteradas
|
||||
|
||||
X0_S1_PETRGAZE
|
||||
X0_S1_PETRtouch
|
||||
x0_s2_blkdead
|
||||
Divine Might
|
||||
Divine Shield
|
||||
Holy Water
|
||||
X0_S2_RODWONDER
|
||||
X0_S1_PETRBREATH
|
||||
x1_s2_imbuearrow
|
||||
|
||||
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
magias alteradas x2_s0_
|
||||
|
||||
Mestil's Acid Breath- cap era 10 agora eh 20
|
||||
Mestil's Acid Sheath- cap de 30 foi para 40
|
||||
ball lighting- cap era 15 foi para 40
|
||||
x2_s0_combust- cap era 10 foi para 20
|
||||
Crumble- cap era 15 agora eh 40
|
||||
x2_s0_cureother- cap era 20 agora eh 40
|
||||
Death Armor- cap era+5 agora +20
|
||||
Gedlee's Electric Loop- cap era+5 agora +20
|
||||
Horizikaul's Boom- cap era+5 agora +20
|
||||
Ice Dagger- cap era+5 agora +20
|
||||
magic vestiment- cap era 5 agora 21
|
||||
Scintillating Sphere- cap era 10 agora 20
|
||||
Tide of Battle- minimo 60 de dano, maximo casterlvl+d100
|
||||
Undeath to Death- cap era 20 agora 40
|
||||
|
||||
|
||||
|
||||
nao alteradas
|
||||
|
||||
Vine Mine, Camouflage abc
|
||||
Vine Mine, Entangle abc
|
||||
Vine Mine, Hamper Movement abc
|
||||
Aura of Glory
|
||||
Battletide abc
|
||||
Black blade of disaster
|
||||
Cloud of Bewilderment abc
|
||||
Create Undead
|
||||
x2_s0_enhweap
|
||||
Evil Blight
|
||||
Glyph of Warding abc
|
||||
Great Thunderclap
|
||||
Haste or Slow
|
||||
x2_s0_healstng
|
||||
hellfire abc
|
||||
Hellish Inferno
|
||||
x2_s0_infestmag
|
||||
x2_s0_ironguts
|
||||
Shelgarn's Persistent Blade
|
||||
Restoration
|
||||
x2_s0_stnbones
|
||||
Stonehold abc
|
||||
|
||||
|
||||
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
feats/magias alteradas x2_s1_ x2_s2_ x2_s3_
|
||||
|
||||
|
||||
Breath Weapon for Dragon Disciple Class- evolutiva ate 60 lvls da classe caso o servidor suporte
|
||||
curse song- igual a bardsong so que com debuffs
|
||||
Dragon Breath Negative Energy- evolutivo ate 180 hd
|
||||
Epic Ward- ao inves de 50/+20, 10+(casterlvl/2)/+20
|
||||
Epic Mage Armor- ao inves de 5 de ac de cada tipo da casterlvl/4 de ac de cada tipo
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
nao alteradas
|
||||
|
||||
Slaad Chaos Spittle
|
||||
x2_s1_petrgaze
|
||||
Psionic Inertial Barrier
|
||||
Dragon Knight
|
||||
Mummy Dust
|
||||
Greater Wild Shape, Humanoid Shape
|
||||
Summon Greater Undead
|
||||
Summon Undead
|
||||
Wild Shape
|
||||
X2_S2_WildShpeDK
|
||||
OnHit Darkfire
|
||||
OnHitCastSpell Deafening Clang
|
||||
OnHit Firedamage
|
||||
x2_s3_sequencer
|
||||
Slay Rakshasa
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
magias alteradas sp_a*
|
||||
|
||||
Ayailla's Radiant Burst- cap era+5 agora +20
|
||||
acid storm- cap era 15 agora 40
|
||||
Agannazzar's Scorcher- cap era 5 agora 20
|
||||
Apocalypse from the Sky- d8(casterlvl) sem cap
|
||||
sp_armordark- cap de ac era 8 agora 25
|
||||
|
||||
nao alteradas
|
||||
|
||||
Absorb Strength
|
||||
Abyssal Might
|
||||
Acidic Fire
|
||||
acidorb
|
||||
Addiction
|
||||
Agony
|
||||
Alchemist's Frost
|
||||
Alchemical Sleep Gas
|
||||
Alchemist's Spark
|
||||
Amber Sarcophagus
|
||||
Angry Ache
|
||||
Animalistic Power
|
||||
Animal Trance
|
||||
Animate Objects
|
||||
Antimagic Field
|
||||
Antitoxin
|
||||
Arcane Eye
|
||||
Arrow of Bone
|
||||
Arrow Storm
|
||||
Arrowsplit
|
||||
Augment Familiar
|
||||
Avascular Mass abc
|
||||
Avasculate
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
magias sp_b*
|
||||
|
||||
Bigby's Striking Fist- cap era 5 agora 20
|
||||
Bibgy's Tripping Hand- cap era 5 agora 20
|
||||
Blast of Force- cap era 5 agora 20
|
||||
Blessing of Bahamut- adicionado o casterlvl/2 na reducao de dano
|
||||
Blast of Flame- cap era 10 agora 40
|
||||
Bolt of Glory- cap era 15 e 7, agora 40 e 30
|
||||
|
||||
|
||||
nao alteradas
|
||||
|
||||
Brilliant Emanation abc
|
||||
Brilliant Energy Arrow
|
||||
Brittlebone
|
||||
Break Enchantment
|
||||
Burning Bolt
|
||||
Baccaran
|
||||
Baleful Polymorph
|
||||
Baleful Transposition
|
||||
Benign Transposition
|
||||
Bestow Wound
|
||||
Bile Droppings
|
||||
blacklight abc
|
||||
Blade of Blood
|
||||
Blades of Fire
|
||||
blasphemy
|
||||
Bloodfreeze Arrow
|
||||
Blend Cream
|
||||
Bless Water
|
||||
Blink
|
||||
Blinding Glory abc
|
||||
Blood of the Martyr
|
||||
Blur
|
||||
Bodak Birth
|
||||
Bone Blade
|
||||
Bones of the Earth ab
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
magias sp_c*
|
||||
|
||||
Celestial blood adicionado casterlvl/2 nas resistencias originais da magia
|
||||
Chaav's Laugh- cap era 20 em bonus de hp agora 40
|
||||
Channeled Pyroburst- cap era 10 agora 40
|
||||
close wounds- d4(nCasterLvl)+8 ao inves de 2d4 de heal
|
||||
Cloud of the Achaierai- caster lvl adicionado ao dano
|
||||
Clutch of Orcus- casterlvl/4 adicionado ao dano
|
||||
Curse of Impending Blades- cap era 5 agora 20
|
||||
Curse of Petty Failing-cap era 5 agora 20
|
||||
|
||||
|
||||
nao alteradas
|
||||
|
||||
Curse Water
|
||||
Call Dretch Horde
|
||||
Call Faithful Servants
|
||||
Call Lemure Horde
|
||||
Calm Emotions abc
|
||||
Changestaff
|
||||
prc_chilltouch
|
||||
Change Shape use
|
||||
Change Shape
|
||||
sp_clarityofmind
|
||||
Claws of the Bebilith
|
||||
Claws of the Savage
|
||||
True Resurrection
|
||||
coldorb
|
||||
sp_comm_undead
|
||||
Command
|
||||
Consecrate abc
|
||||
sp_contagious
|
||||
Control Weather
|
||||
Convert Wand
|
||||
sp_convict
|
||||
Crackle Powder ab
|
||||
Crafter's Blessing
|
||||
Crafter's Curse
|
||||
sp_createtatoo
|
||||
Crown of Might
|
||||
Crown of Protection
|
||||
Crushing Despair
|
||||
Crushing Fist of Spite
|
||||
Curse of the Putrid Husk
|
||||
|
||||
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
magias sp_d*
|
||||
|
||||
Dispelling Touch- cap era 10 agora 20
|
||||
Disrupt Undead/Greater Disrupt Undead- adicionado casterlvl/4 ecasterlvl/3 ao dano respectivamente
|
||||
Diamond Spray-cap era 10 agora 40
|
||||
Doom Scarabs-cap era 10 agora 40
|
||||
Damning Darkness- casterlvl/2 adicionado ao dano
|
||||
Dancing Web-cap era 10 agora 40
|
||||
darkbolt- cap era 7 agora 40
|
||||
Deep Slumber-cap era 9 agora 20
|
||||
Deflect cap era 5 agora 20
|
||||
|
||||
nao alteradas
|
||||
|
||||
Discern Location
|
||||
Disintegrate
|
||||
Divine Inspiration
|
||||
Divine Sacrifice
|
||||
Divine Protection
|
||||
Draconic Might
|
||||
OnHit Firedamage
|
||||
Dread Word
|
||||
Dragon Ally
|
||||
Dragon Cloud
|
||||
Darkflame Arrow
|
||||
Drug Resistance
|
||||
Death by Thorns
|
||||
Dancing Lights
|
||||
Daylight
|
||||
Doublestrike Arrow
|
||||
Death Knell
|
||||
deepdarkness
|
||||
Demoncall
|
||||
Demonflesh
|
||||
Desecrate
|
||||
Despoil
|
||||
Detect Favored Enemy
|
||||
sp_det_undead
|
||||
Detect Evil
|
||||
detectchaos
|
||||
detectgood
|
||||
detectlaw
|
||||
detectmagic
|
||||
Devil's Ego
|
||||
Devil's Eye
|
||||
Devil Weed
|
||||
Dimensional Anchor
|
||||
Dimension Door
|
||||
Dimension Hop
|
||||
Dimensional Lock
|
||||
dictum
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
magias sp_e*
|
||||
|
||||
|
||||
Elemental Strike- cap era 15 agora 40
|
||||
Energize Potion- cap era 3 agora 20
|
||||
Exalted Fury- adicionado casterlvl ao dano
|
||||
Exalted Raiment- maximo de ac era+4 agora eh +8 no lvl 40, ainda continua alterando tendencia de alinhamento
|
||||
Extract Water Elemental- cap era 20 agora 40
|
||||
|
||||
|
||||
|
||||
nao alteradas
|
||||
|
||||
Ectoplasmic Enhancement
|
||||
sp_eiacid,cold,elec...
|
||||
energy immunity
|
||||
Elation
|
||||
elecorb
|
||||
Elemental Comflaguration spellscript
|
||||
Embalming Fire
|
||||
Energy Ebb
|
||||
Energy Surge
|
||||
Enlarge Person
|
||||
Energy Aegis
|
||||
Enthrall
|
||||
eterCharm Monster
|
||||
eterCharm Person
|
||||
Eternity of Torture
|
||||
Evil Eye
|
||||
Evil Weather
|
||||
Extract Drug
|
||||
Eye of the Beholder
|
||||
Eyebite
|
||||
Eyes of the Avoral
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
magias sp_f*
|
||||
|
||||
Forceblast- cap era 10 agora 20
|
||||
Force Orb- cap era 10 agora 40
|
||||
False Life- cap era 10 agora 20
|
||||
Song of Festering Death- cap era 2 agora 20
|
||||
Fire Trap- cap era 20 agora 40
|
||||
fireburst- cap era 5 agora 20
|
||||
Flesh Armor- adicionado casterlvl/2 ao soak resistence
|
||||
Flesh Ripper-cap era 10 agora 20
|
||||
|
||||
nao alteradas
|
||||
|
||||
Fog Cloud
|
||||
Foresight
|
||||
Rain of Frogs or Fish
|
||||
Faerie Fire
|
||||
Fareye Oil
|
||||
Fiendish Clarity
|
||||
Festering Bomb
|
||||
Fire in the Blood
|
||||
fireorb
|
||||
FIST OF STONE
|
||||
flashburst
|
||||
Flash Pellet
|
||||
flensing
|
||||
Tenser's Floating Disk
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
magias alteradas sp_g_*
|
||||
|
||||
Greater Heroism- cap era 20 agora 40
|
||||
Gutwrench- adicionado o casterlvl ao dano
|
||||
Greater Fireburst- cap era 15 agora 40
|
||||
|
||||
nao alteradas
|
||||
|
||||
Ghoul Gauntlet
|
||||
Glibness
|
||||
Greater Command
|
||||
greenfire
|
||||
Grim Revenge
|
||||
Greater Scrying
|
||||
sp_green_fogC
|
||||
Greater Teleport
|
||||
Gaseous Form
|
||||
Glitterdust
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
magias alteradas sp_h_*
|
||||
|
||||
hellfire- ao inves de 3d6 de dano d6(nCasterLvl/2)+3
|
||||
sp_heroism-unificada com a spell greater heroism
|
||||
hellfirestorm- ao inves de 5d6 dano é d6(nCasterLvl)+5
|
||||
Hail of Stone- cap era 5 agora 20
|
||||
Healer's Balm- 5pontos de skill heal ao inves de 1
|
||||
|
||||
nao alteradas
|
||||
|
||||
Heartclutch
|
||||
Hide from Animals
|
||||
Hide from Undead
|
||||
Holy Aura
|
||||
Holy Word
|
||||
Hound of Doom
|
||||
Halt
|
||||
Halt Undead
|
||||
Hammer of Righteousness
|
||||
Heal Animal Companion
|
||||
Heart Ripper
|
||||
Heartache
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
magias alteradas sp_i_* j k
|
||||
|
||||
Ice Knife- adicionado casterlvl/4 ao dano
|
||||
Ice Burst- cap era 10 agora 20
|
||||
Improved Mage Armor- cap em 13 de ac ao inves de 8
|
||||
Kelgore's Fire Bolt- cap era 5 agora 20
|
||||
|
||||
|
||||
nao alteradas
|
||||
|
||||
Ilyykur's Mantle
|
||||
Insanity
|
||||
Iron Body
|
||||
Jump
|
||||
Keenear Powder
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
magias alteradas sp_l_*
|
||||
|
||||
Legion's Curse of Impending Blades- cap do save bonus era 5 agora 15
|
||||
Legion's Curse of Petty Failing- cap do save bonus era 5 agora 15
|
||||
Leonal's Roar- adicionado casterlvl ao dano
|
||||
lower spell resistence- cap era 15 agora 40
|
||||
Lahm's Finger Darts- caster lvl adicionado ao dano
|
||||
Legion's Conviction- cap do save bonus era 5 agora 15
|
||||
|
||||
|
||||
|
||||
|
||||
nao alteradas
|
||||
|
||||
Lesser Shivering Touch
|
||||
Life Bolt
|
||||
sp_lionheart
|
||||
Liquid Pain
|
||||
Living Undeath
|
||||
Locate Creature
|
||||
Lockslip Grease
|
||||
Locate Object
|
||||
Longstrider
|
||||
Last Judgment
|
||||
Luhix
|
||||
Luminous Armor
|
||||
Lantern Light
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
magias alteradas sp_m_n_o*
|
||||
|
||||
Necrotic Bloat- cap era 10 agora 20
|
||||
Necrotic Burst-cap era 15 agora 40
|
||||
Necrotic Eruption-cap era 15 agora 60
|
||||
Necrotic Termination-cap era 25 agora 80
|
||||
sp_nght_caress-cap era 15 agora 40
|
||||
Otiluke's Freezing Sphere- cap era 15 agora 40
|
||||
Mass Fire Shield- cap era 15 agora 40
|
||||
|
||||
|
||||
|
||||
|
||||
nao alteradas
|
||||
|
||||
Morality Undone
|
||||
Necrotic Cyst
|
||||
Necrotic Domination
|
||||
Necrotic Empowerment
|
||||
sp_nondetection
|
||||
Obscuring Mist
|
||||
Otiluke's Resilient Sphere abc
|
||||
sp_magehand
|
||||
Magic Stone
|
||||
Masochism
|
||||
Mass Contagion
|
||||
mass drown
|
||||
mass hold monster
|
||||
mass hold person
|
||||
Mirror Image
|
||||
Mislead x
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
magias alteradas sp_p_*
|
||||
|
||||
Phoenix Fire- cap era 40 agora 60
|
||||
pnp Fire Shield-cap era 15 agora 40
|
||||
Polar Ray-cap era 25 agora 60
|
||||
Prismatic Wall-adicionado casterlvl+spell penetration ao dano
|
||||
Prismatic Ray- adicionado casterlvl/2 ao dano
|
||||
Prismatic Sphere-adicionado casterlvl+spell penetration ao dano
|
||||
Protection from Arrows- adicionado (casterlvl/4) aos 10/ de reducao de dano piercing
|
||||
Panacea- cap era 20 agora 40
|
||||
|
||||
|
||||
nao alteradas
|
||||
|
||||
Pestilence abc
|
||||
Phantom Steed
|
||||
Phieran's Resolve
|
||||
Plague of Undead
|
||||
Power Leech
|
||||
Pox
|
||||
Power Word Blind
|
||||
Pyrotechnics abc
|
||||
sp_pattern
|
||||
|
||||
================================================================================================================================================================================
|
||||
|
||||
magias alteradas sp_r_*
|
||||
|
||||
|
||||
Ring of Blades abc- cap era 10 agora 20
|
||||
Rain of Black Tulips- adicionado caster lvl ao dano
|
||||
Rain of Embers- adicionado caster lvl ao dano
|
||||
Rainbow Blast-cap ate casterlvl 20
|
||||
Rapture of Rupture-adicionado casterlvl+spell penetration ao dano
|
||||
Righteous Smite- removido o cap que era 20
|
||||
Righteous Might-damage reduction evolutivo a cada 2 casterlvls ate lvl 41 com um total de +2 soak 28
|
||||
|
||||
nao alteradas
|
||||
|
||||
Rotting Curse of Urfestra
|
||||
Rouse
|
||||
Rage
|
||||
Rain of Blood
|
||||
Rain of Roses abc
|
||||
Rain of Frogs or Fish
|
||||
sp_ray_charmm.nss beholder
|
||||
sp_ray_charmp.nss beholder
|
||||
sp_ray_disint.nss beholder
|
||||
Ray of Exhaustion
|
||||
sp_ray_fear.nss beholder
|
||||
sp_ray_flshstn beholder
|
||||
sp_ray_fingdth beholder
|
||||
Ray of Hope
|
||||
Eye of the Beholder: Inlfict Moderate Wounds beholder
|
||||
sp_ray_sleep.nss beholder
|
||||
sp_ray_slow.nss beholder
|
||||
Read Magic
|
||||
Reality Blind
|
||||
Recitation
|
||||
Red Fester
|
||||
Regroup
|
||||
Repel Vermin
|
||||
Repulsion abc
|
||||
Resonating Resistance
|
||||
Revivify
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
magias alteradas sp_s_*
|
||||
|
||||
Sudden Stalagmite- cap era 10 agora 40
|
||||
Storm of Shards -cap era 20 agora 40
|
||||
Sunmantle- adicionado casterlvl/4 nas resistencias a dano
|
||||
Scorching Ray-adicionado casterlvl e spell penetration ao dano e mais raios
|
||||
Seeking Ray-adicionado casterlvl+spellpenetration/4
|
||||
Seething Eyebane- adicionado casterlvl/4 ao dano
|
||||
Serpent's Sigh-cap era 10 agora 20
|
||||
Shocking Grasp-cap era 5 agora 20
|
||||
Shout/greater series adicionado casterlvl +spell/2 penetration ao dano
|
||||
Shriveling-cap era 10 agora 20
|
||||
Slashing Dispell-cap era 10 agora 40
|
||||
Slashing Darkness-cap era 5 agora 20
|
||||
Snilloc's Snowball-cap era 5 agora 20
|
||||
Spiderskin-maximo +8 de buff ao inves de 5 no lvl21
|
||||
|
||||
nao alteradas
|
||||
|
||||
|
||||
Starmantle
|
||||
Stunning Screech
|
||||
Stop Heart
|
||||
Summon Undead Series
|
||||
Sure Strike
|
||||
Sword of Conscience
|
||||
sp_symbol abc series
|
||||
Sannish
|
||||
Sarcophagus of Stone
|
||||
Scintillating Pattern
|
||||
Screaming Flask
|
||||
Scrying
|
||||
Sequester
|
||||
Serpent Arrow
|
||||
Shadow Arrow
|
||||
Shadow Spray
|
||||
Shedden
|
||||
Shield Other
|
||||
Shivering Touch
|
||||
Sicken Evil abc
|
||||
Sinsabur's Baleful Bolt
|
||||
Sleet Storm abc
|
||||
Snare abc
|
||||
Sobriety
|
||||
Softfoot
|
||||
Solid Fog abc
|
||||
Song of Discord
|
||||
Sonic Shield
|
||||
sonic orb
|
||||
sorrow
|
||||
sp_soulscour
|
||||
Spell Turning
|
||||
sphere of ultimate destruction
|
||||
Spell Resistance
|
||||
Spores of the Vrock
|
||||
Spellslayer Arrow
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
magias alteradas sp_ t u v w *
|
||||
|
||||
Thousand Needles-adicionado casterlvl/2 ao dano
|
||||
Touch of Fatigue-cap era 5 agora 20
|
||||
Unliving Weapon- cap era 10 agora 20
|
||||
Wall of Frost abc-adicionado casterlvl/2 ao dano
|
||||
Wretched Blight- cap era 15 agora 60
|
||||
|
||||
nao alteradas
|
||||
|
||||
Touch of Idiocy
|
||||
Touch of Juiblex
|
||||
Teleportation Circle
|
||||
Teleport
|
||||
Terran Brandy
|
||||
Throw energized potion
|
||||
Tongue of Baalzebul
|
||||
Tomb of Light
|
||||
Towering Oak
|
||||
Transport via Plants
|
||||
Tree Shape
|
||||
sp_tru_truefrnd
|
||||
True Resurrection
|
||||
True Casting
|
||||
Twilight Luck
|
||||
Undetectable alignment
|
||||
Unheavened
|
||||
Unnerving Gaze
|
||||
unyieldroots
|
||||
Utterdark
|
||||
sp_vigor series
|
||||
sp_vigor_mass
|
||||
Vile Death
|
||||
Violet Rain
|
||||
Viscid Globe
|
||||
Vision of Heaven
|
||||
Vodare
|
||||
sp_walldispel a b c
|
||||
Water Breathing
|
||||
Wave of Exhaustion
|
||||
Wave of Grief
|
||||
Wave of Pain
|
||||
Waves of Fatigue
|
||||
Weeping Stone
|
||||
Whirling Blade
|
||||
Wolfskin
|
||||
Wrack
|
||||
Word of Recall
|
||||
Word of Balance
|
||||
Word of Chaos
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
BIN
35expandedspells/nw_s0_aid.ncs
Normal file
BIN
35expandedspells/nw_s0_aid.ncs
Normal file
Binary file not shown.
131
35expandedspells/nw_s0_aid.nss
Normal file
131
35expandedspells/nw_s0_aid.nss
Normal file
@ -0,0 +1,131 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name Aid/Mass Aid
|
||||
//:: FileName nw_s0_aid.nss
|
||||
/*:://////////////////////////////////////////////
|
||||
Aid
|
||||
Enchantment (Compulsion) [Mind-Affecting]
|
||||
Level: Clr 2, Good 2, Luck 2
|
||||
Components: V, S, DF
|
||||
Casting Time: 1 standard action
|
||||
Range: Touch
|
||||
Target: Living creature touched
|
||||
Duration: 1 min./level
|
||||
Saving Throw: None
|
||||
Spell Resistance: Yes (harmless)
|
||||
|
||||
Aid grants the target a +1 morale bonus on attack
|
||||
rolls and saves against fear effects, plus
|
||||
temporary hit points equal to 1d8 + caster level
|
||||
(to a maximum of 1d8 + 10 temporary hit points at
|
||||
caster level 10th).
|
||||
|
||||
Mass Aid
|
||||
Enchantment (Compulsion) [Mind-Affecting]
|
||||
Level: Clr 3
|
||||
Range: Close (25 ft. + 5 ft./2 levels)
|
||||
Targets: One or more creatures within a 30 ft. range.
|
||||
Components: V, S, DF
|
||||
Casting Time: 1 standard action
|
||||
Duration: 1 min./level
|
||||
Saving Throw: None
|
||||
Spell Resistance: Yes (harmless)
|
||||
|
||||
Subjects gain +1 morale bonus on attack rolls and
|
||||
saves against fear effects, plus temporary hit
|
||||
points equal to 1d8 + caster level (to a maximum
|
||||
of 1d8 + 15 at caster level 15).
|
||||
//::*/////////////////////////////////////////////
|
||||
|
||||
#include "prc_sp_func"
|
||||
|
||||
void StripBuff(object oTarget, int nBuffSpellID, int nMassBuffSpellID)
|
||||
{
|
||||
effect eEffect = GetFirstEffect(oTarget);
|
||||
while (GetIsEffectValid(eEffect))
|
||||
{
|
||||
int nSpellID = GetEffectSpellId(eEffect);
|
||||
if (nBuffSpellID == nSpellID || nMassBuffSpellID == nSpellID)
|
||||
RemoveEffect(oTarget, eEffect);
|
||||
eEffect = GetNextEffect(oTarget);
|
||||
}
|
||||
}
|
||||
|
||||
int DoSpell(object oCaster, object oTarget, int nCasterLevel, int nSpellID)
|
||||
{
|
||||
//Declare major variables
|
||||
location lTarget;
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int bMass = nSpellID == SPELL_MASS_AID;
|
||||
int nBonusLimit = bMass ? 20 : 15;
|
||||
float fDuration = TurnsToSeconds(nCasterLevel);
|
||||
if(nMetaMagic & METAMAGIC_EXTEND) fDuration *= 2;
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_HOLY_AID);
|
||||
effect eAttack = EffectAttackIncrease(1);
|
||||
effect eSave = EffectSavingThrowIncrease(SAVING_THROW_ALL, 1, SAVING_THROW_TYPE_FEAR);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
effect eLink = EffectLinkEffects(eAttack, eSave);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
|
||||
if(bMass)
|
||||
{
|
||||
lTarget = PRCGetSpellTargetLocation();
|
||||
oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, lTarget, TRUE, OBJECT_TYPE_CREATURE);
|
||||
}
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(((!bMass) || (spellsIsTarget(oTarget, SPELL_TARGET_ALLALLIES, oCaster))) && PRCGetIsAliveCreature(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(oCaster, nSpellID, FALSE));
|
||||
|
||||
int nBonus = d8(1);
|
||||
if(nMetaMagic & METAMAGIC_MAXIMIZE) nBonus = 8;
|
||||
if(nMetaMagic & METAMAGIC_EMPOWER) nBonus += (nBonus / 2);
|
||||
nBonus += nBonusLimit > nCasterLevel ? nCasterLevel : nBonusLimit;
|
||||
|
||||
effect eHP = EffectTemporaryHitpoints(nBonus);
|
||||
|
||||
// Remove pervious castings of it
|
||||
StripBuff(oTarget, SPELL_AID, SPELL_MASS_AID);
|
||||
|
||||
//Apply the VFX impact and effects
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, fDuration, TRUE, nSpellID, nCasterLevel, oCaster);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHP, oTarget, fDuration);
|
||||
}
|
||||
if(!bMass) break;
|
||||
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, lTarget, TRUE, OBJECT_TYPE_CREATURE);
|
||||
}
|
||||
|
||||
return TRUE; //return TRUE if spell charges should be decremented
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
if (!X2PreSpellCastCode()) return;
|
||||
PRCSetSchool(SPELL_SCHOOL_ENCHANTMENT);
|
||||
object oCaster = OBJECT_SELF;
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nSpellID = PRCGetSpellId();
|
||||
int nCasterLevel = PRCGetCasterLevel(oCaster);
|
||||
int nEvent = GetLocalInt(oCaster, PRC_SPELL_EVENT); //use bitwise & to extract flags
|
||||
if(!nEvent) //normal cast
|
||||
{
|
||||
if(GetLocalInt(oCaster, PRC_SPELL_HOLD) && oCaster == oTarget && IsTouchSpell(nSpellID))
|
||||
{ //holding the charge, casting spell on self
|
||||
SetLocalSpellVariables(oCaster, 1); //change 1 to number of charges
|
||||
return;
|
||||
}
|
||||
DoSpell(oCaster, oTarget, nCasterLevel, nSpellID);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(nEvent & PRC_SPELL_EVENT_ATTACK)
|
||||
{
|
||||
if(DoSpell(oCaster, oTarget, nCasterLevel, nSpellID))
|
||||
DecrementSpellCharges(oCaster);
|
||||
}
|
||||
}
|
||||
PRCSetSchool();
|
||||
}
|
BIN
35expandedspells/nw_s0_awaken.ncs
Normal file
BIN
35expandedspells/nw_s0_awaken.ncs
Normal file
Binary file not shown.
92
35expandedspells/nw_s0_awaken.nss
Normal file
92
35expandedspells/nw_s0_awaken.nss
Normal file
@ -0,0 +1,92 @@
|
||||
/*
|
||||
nw_s0_awaken
|
||||
|
||||
This spell makes an animal ally more
|
||||
powerful, intelligent and robust for the
|
||||
duration of the spell. Requires the caster to
|
||||
make a Will save to succeed.
|
||||
|
||||
By: Preston Watamaniuk
|
||||
Created: Aug 10, 2001
|
||||
Modified: Jun 12, 2006
|
||||
*/
|
||||
|
||||
#include "prc_sp_func"
|
||||
#include "inc_npc"
|
||||
|
||||
//Implements the spell impact, put code here
|
||||
// if called in many places, return TRUE if
|
||||
// stored charges should be decreased
|
||||
// eg. touch attack hits
|
||||
//
|
||||
// Variables passed may be changed if necessary
|
||||
int DoSpell(object oCaster, object oTarget, int nCasterLevel, int nEvent)
|
||||
{
|
||||
//Declare major variables
|
||||
effect eStr = EffectAbilityIncrease(ABILITY_STRENGTH, d4(4));
|
||||
effect eCon = EffectAbilityIncrease(ABILITY_CONSTITUTION, d4(4));
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
effect eInt;
|
||||
effect eAttack = EffectAttackIncrease(d4(2));
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_HOLY_AID);
|
||||
int nInt = d10();
|
||||
//int nDuration = 24;
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
|
||||
if(GetAssociateTypeNPC(oTarget) == ASSOCIATE_TYPE_ANIMALCOMPANION && GetMasterNPC(oTarget) == oCaster)
|
||||
{
|
||||
if(!GetHasSpellEffect(SPELL_AWAKEN))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_AWAKEN, FALSE));
|
||||
//Enter Metamagic conditions
|
||||
if(nMetaMagic & METAMAGIC_MAXIMIZE)
|
||||
nInt = 10;//Damage is at max
|
||||
if(nMetaMagic & METAMAGIC_EMPOWER)
|
||||
nInt += (nInt/2); //Damage/Healing is +50%
|
||||
//if(nMetaMagic & METAMAGIC_EXTEND)
|
||||
// nDuration *= 2; //Duration is +100%
|
||||
|
||||
eInt = EffectAbilityIncrease(ABILITY_WISDOM, nInt);
|
||||
|
||||
effect eLink = EffectLinkEffects(eStr, eCon);
|
||||
eLink = EffectLinkEffects(eLink, eAttack);
|
||||
eLink = EffectLinkEffects(eLink, eInt);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
eLink = SupernaturalEffect(eLink);
|
||||
//Apply the VFX impact and effects
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink, oTarget, 0.0f, TRUE, SPELL_AWAKEN, nCasterLevel);
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE; //return TRUE if spell charges should be decremented
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
if(!X2PreSpellCastCode()) return;
|
||||
PRCSetSchool(SPELL_SCHOOL_TRANSMUTATION);
|
||||
object oCaster = OBJECT_SELF;
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nCasterLevel = PRCGetCasterLevel(oCaster);
|
||||
int nEvent = GetLocalInt(oCaster, PRC_SPELL_EVENT); //use bitwise & to extract flags
|
||||
if(!nEvent) //normal cast
|
||||
{
|
||||
if(GetLocalInt(oCaster, PRC_SPELL_HOLD) && oCaster == oTarget)
|
||||
{ //holding the charge, casting spell on self
|
||||
SetLocalSpellVariables(oCaster, 1); //change 1 to number of charges
|
||||
return;
|
||||
}
|
||||
DoSpell(oCaster, oTarget, nCasterLevel, nEvent);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(nEvent & PRC_SPELL_EVENT_ATTACK)
|
||||
{
|
||||
if(DoSpell(oCaster, oTarget, nCasterLevel, nEvent))
|
||||
DecrementSpellCharges(oCaster);
|
||||
}
|
||||
}
|
||||
PRCSetSchool();
|
||||
}
|
BIN
35expandedspells/nw_s0_barkskin.ncs
Normal file
BIN
35expandedspells/nw_s0_barkskin.ncs
Normal file
Binary file not shown.
95
35expandedspells/nw_s0_barkskin.nss
Normal file
95
35expandedspells/nw_s0_barkskin.nss
Normal file
@ -0,0 +1,95 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Barkskin
|
||||
//:: nw_s0_barkskin.nss
|
||||
//::///////////////////////////////////////////////
|
||||
/*
|
||||
Transmutation
|
||||
Level: Drd 2, Rgr 2, Plant 2
|
||||
Components: V, S, DF
|
||||
Casting Time: 1 standard action
|
||||
Range: Touch
|
||||
Target: Living creature touched
|
||||
Duration: 10 min./level
|
||||
Saving Throw: None
|
||||
Spell Resistance: Yes (harmless)
|
||||
|
||||
Barkskin toughens a creature’s skin. The effect
|
||||
grants a +2 enhancement bonus to the creature’s
|
||||
existing natural armor bonus. This enhancement
|
||||
bonus increases by 1 for every three caster levels
|
||||
above 3rd, to a maximum of +5 at caster level 12th.
|
||||
|
||||
The enhancement bonus provided by barkskin stacks
|
||||
with the target’s natural armor bonus, but not with
|
||||
other enhancement bonuses to natural armor. A
|
||||
creature without natural armor has an effective
|
||||
natural armor bonus of +0.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: By: Preston Watamaniuk
|
||||
//:: Created: Feb 21, 2001
|
||||
//:: Modified: Jun 12, 2006
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "prc_sp_func"
|
||||
|
||||
int DoSpell(object oCaster, object oTarget, int nCasterLevel)
|
||||
{
|
||||
if(!PRCGetIsAliveCreature(oTarget))
|
||||
{
|
||||
FloatingTextStringOnCreature("Selected target is not a living creature.", oCaster, FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
float fDuration = TurnsToSeconds(nCasterLevel) * 10;
|
||||
//Enter Metamagic conditions
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
if(nMetaMagic & METAMAGIC_EXTEND) //Duration is +100%
|
||||
fDuration *= 2;
|
||||
|
||||
//Determine AC Bonus based Level.
|
||||
int nBonus = (nCasterLevel / 3) + 1;
|
||||
if(nBonus > 20)
|
||||
nBonus = 20;
|
||||
|
||||
//Make sure the Armor Bonus is of type Natural
|
||||
effect eLink = EffectACIncrease(nBonus, AC_NATURAL_BONUS);
|
||||
eLink = EffectLinkEffects(eLink, EffectVisualEffect(VFX_DUR_PROT_BARKSKIN));
|
||||
eLink = EffectLinkEffects(eLink, EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE));
|
||||
effect eHead = EffectVisualEffect(VFX_IMP_HEAD_NATURE);
|
||||
|
||||
//Signal spell cast at event
|
||||
SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_BARKSKIN, FALSE));
|
||||
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, fDuration, TRUE, SPELL_BARKSKIN, nCasterLevel);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHead, oTarget);
|
||||
|
||||
return TRUE; //return TRUE if spell charges should be decremented
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
if (!X2PreSpellCastCode()) return;
|
||||
PRCSetSchool(SPELL_SCHOOL_TRANSMUTATION);
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nCasterLevel = PRCGetCasterLevel();
|
||||
int nEvent = GetLocalInt(OBJECT_SELF, PRC_SPELL_EVENT); //use bitwise & to extract flags
|
||||
if(!nEvent) //normal cast
|
||||
{
|
||||
if(GetLocalInt(OBJECT_SELF, PRC_SPELL_HOLD) && OBJECT_SELF == oTarget)
|
||||
{ //holding the charge, casting spell on self
|
||||
SetLocalSpellVariables(OBJECT_SELF, 1); //change 1 to number of charges
|
||||
return;
|
||||
}
|
||||
DoSpell(OBJECT_SELF, oTarget, nCasterLevel);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(nEvent & PRC_SPELL_EVENT_ATTACK)
|
||||
{
|
||||
if(DoSpell(OBJECT_SELF, oTarget, nCasterLevel))
|
||||
DecrementSpellCharges(OBJECT_SELF);
|
||||
}
|
||||
}
|
||||
PRCSetSchool();
|
||||
}
|
BIN
35expandedspells/nw_s0_bladebara.ncs
Normal file
BIN
35expandedspells/nw_s0_bladebara.ncs
Normal file
Binary file not shown.
81
35expandedspells/nw_s0_bladebara.nss
Normal file
81
35expandedspells/nw_s0_bladebara.nss
Normal file
@ -0,0 +1,81 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Blade Barrier: On Enter
|
||||
//:: NW_S0_BladeBarA.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Creates a wall 10m long and 2m thick of whirling
|
||||
blades that hack and slice anything moving into
|
||||
them. Anything caught in the blades takes
|
||||
2d6 per caster level.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: July 20, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_EVOCATION);
|
||||
|
||||
//Declare major variables
|
||||
object oTarget = GetEnteringObject();
|
||||
effect eDam;
|
||||
effect eVis = EffectVisualEffect(VFX_COM_BLOOD_LRG_RED);
|
||||
object aoeCreator = GetAreaOfEffectCreator();
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int nLevel = GetLocalInt(OBJECT_SELF, "X2_AoE_Caster_Level");
|
||||
int CasterLvl = nLevel;
|
||||
|
||||
int nPenetr = SPGetPenetrAOE(aoeCreator,CasterLvl);
|
||||
|
||||
//Make level check
|
||||
if (nLevel > 40)
|
||||
{
|
||||
nLevel = 40;
|
||||
}
|
||||
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, aoeCreator))
|
||||
{
|
||||
//Fire spell cast at event
|
||||
SignalEvent(oTarget, EventSpellCastAt(aoeCreator, SPELL_BLADE_BARRIER));
|
||||
//Roll Damage
|
||||
int nDamage = d6(nLevel);
|
||||
//Enter Metamagic conditions
|
||||
if ((nMetaMagic & METAMAGIC_MAXIMIZE))
|
||||
{
|
||||
nDamage = nLevel * 6;//Damage is at max
|
||||
}
|
||||
if ((nMetaMagic & METAMAGIC_EMPOWER))
|
||||
{
|
||||
nDamage = nDamage + (nDamage/2);
|
||||
}
|
||||
//nDamage += ApplySpellBetrayalStrikeDamage(oTarget, OBJECT_SELF, FALSE);
|
||||
//Make SR Check
|
||||
if (!PRCDoResistSpell(aoeCreator, oTarget,nPenetr) )
|
||||
{
|
||||
// 1.69 change
|
||||
//Adjust damage according to Reflex Save, Evasion or Improved Evasion
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, PRCGetSaveDC(oTarget,aoeCreator),SAVING_THROW_TYPE_SPELL);
|
||||
|
||||
//Set damage effect
|
||||
eDam = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_SLASHING);
|
||||
//Apply damage and VFX
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the local integer storing the spellschool name
|
||||
}
|
||||
|
BIN
35expandedspells/nw_s0_bladebarc.ncs
Normal file
BIN
35expandedspells/nw_s0_bladebarc.ncs
Normal file
Binary file not shown.
102
35expandedspells/nw_s0_bladebarc.nss
Normal file
102
35expandedspells/nw_s0_bladebarc.nss
Normal file
@ -0,0 +1,102 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Blade Barrier: Heartbeat
|
||||
//:: NW_S0_BladeBarA.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Creates a wall 10m long and 2m thick of whirling
|
||||
blades that hack and slice anything moving into
|
||||
them. Anything caught in the blades takes
|
||||
2d6 per caster level.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: July 20, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_EVOCATION);
|
||||
|
||||
//Declare major variables
|
||||
object oTarget;
|
||||
effect eDam;
|
||||
effect eVis = EffectVisualEffect(VFX_COM_BLOOD_LRG_RED);
|
||||
object aoeCreator = GetAreaOfEffectCreator();
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int CasterLvl = GetLocalInt(OBJECT_SELF, "X2_AoE_Caster_Level");
|
||||
int nLevel = CasterLvl;
|
||||
//Make level check
|
||||
if (nLevel > 40)
|
||||
{
|
||||
nLevel = 40;
|
||||
}
|
||||
|
||||
int nPenetr = SPGetPenetrAOE(aoeCreator,CasterLvl);
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// GZ 2003-Oct-15
|
||||
// Add damage to placeables/doors now that the command support bit fields
|
||||
//--------------------------------------------------------------------------
|
||||
oTarget = GetFirstInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE | OBJECT_TYPE_PLACEABLE | OBJECT_TYPE_DOOR);
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// GZ 2003-Oct-15
|
||||
// When the caster is no longer there, all functions calling
|
||||
// GetAreaOfEffectCreator will fail. Its better to remove the barrier then
|
||||
//--------------------------------------------------------------------------
|
||||
if (!GetIsObjectValid(aoeCreator))
|
||||
{
|
||||
DestroyObject(OBJECT_SELF);
|
||||
return;
|
||||
}
|
||||
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, aoeCreator))
|
||||
{
|
||||
//Fire spell cast at event
|
||||
SignalEvent(oTarget, EventSpellCastAt(aoeCreator, SPELL_BLADE_BARRIER));
|
||||
//Make SR Check
|
||||
if (!PRCDoResistSpell(aoeCreator, oTarget,CasterLvl) )
|
||||
{
|
||||
int nDC = PRCGetSaveDC(oTarget,aoeCreator);
|
||||
//Roll Damage
|
||||
int nDamage = d6(nLevel);
|
||||
//Enter Metamagic conditions
|
||||
if((nMetaMagic & METAMAGIC_MAXIMIZE))
|
||||
{
|
||||
nDamage = nLevel * 6;//Damage is at max
|
||||
}
|
||||
if ((nMetaMagic & METAMAGIC_EMPOWER))
|
||||
{
|
||||
nDamage = nDamage + (nDamage/2);
|
||||
}
|
||||
//nDamage += ApplySpellBetrayalStrikeDamage(oTarget, OBJECT_SELF, FALSE);
|
||||
// 1.69 change
|
||||
//Adjust damage according to Reflex Save, Evasion or Improved Evasion
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, PRCGetSaveDC(oTarget,aoeCreator),SAVING_THROW_TYPE_SPELL);
|
||||
//Set damage effect
|
||||
eDam = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_SLASHING);
|
||||
//Apply damage and VFX
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
oTarget = GetNextInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE | OBJECT_TYPE_PLACEABLE | OBJECT_TYPE_DOOR);
|
||||
}
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the local integer storing the spellschool name
|
||||
|
||||
}
|
||||
|
BIN
35expandedspells/nw_s0_burnhand.ncs
Normal file
BIN
35expandedspells/nw_s0_burnhand.ncs
Normal file
Binary file not shown.
98
35expandedspells/nw_s0_burnhand.nss
Normal file
98
35expandedspells/nw_s0_burnhand.nss
Normal file
@ -0,0 +1,98 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Burning Hands
|
||||
//:: NW_S0_BurnHand
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Evocation [Fire]
|
||||
Level: Fire 1, Sor/Wiz 1
|
||||
Components: V, S
|
||||
Casting Time: 1 standard action
|
||||
Range: 15 ft.
|
||||
Area: Cone-shaped burst
|
||||
Duration: Instantaneous
|
||||
Saving Throw: Reflex half
|
||||
Spell Resistance: Yes
|
||||
|
||||
A cone of searing flame shoots from your fingertips.
|
||||
Any creature in the area of the flames takes 1d4
|
||||
points of fire damage per caster level (maximum 5d4).
|
||||
Flammable materials burn if the flames touch them.
|
||||
A character can extinguish burning items as a
|
||||
full-round action.
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: April 5, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated On: April 5th, 2001
|
||||
//:: VFX Pass By: Preston W, On: June 20, 2001
|
||||
//:: Update Pass By: Preston W, On: July 23, 2001
|
||||
//:: modified by mr_bumpkin Dec 4, 2003
|
||||
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
void main()
|
||||
{
|
||||
if (!X2PreSpellCastCode()) return;
|
||||
|
||||
PRCSetSchool(SPELL_SCHOOL_TRANSMUTATION);
|
||||
|
||||
//Declare major variables
|
||||
object oCaster = OBJECT_SELF;
|
||||
location lTarget = PRCGetSpellTargetLocation();
|
||||
int nCasterLevel = PRCGetCasterLevel(oCaster);
|
||||
int nPenetr = nCasterLevel + SPGetPenetr();
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int EleDmg = ChangedElementalDamage(oCaster, DAMAGE_TYPE_FIRE);
|
||||
int nSaveType = ChangedSaveType(EleDmg);
|
||||
int nDice = min(20, nCasterLevel);
|
||||
int nDamage;
|
||||
float fDist;
|
||||
|
||||
//Declare and assign personal impact visual effect.
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S);
|
||||
|
||||
//Declare the spell shape, size and the location. Capture the first target object in the shape.
|
||||
object oTarget = MyFirstObjectInShape(SHAPE_SPELLCONE, 10.0, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
|
||||
//Cycle through the targets within the spell shape until an invalid object is captured.
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, oCaster))
|
||||
{
|
||||
//Signal spell cast at event to fire.
|
||||
SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_BURNING_HANDS));
|
||||
//Calculate the delay time on the application of effects based on the distance
|
||||
//between the caster and the target
|
||||
fDist = GetDistanceBetween(oCaster, oTarget)/20;
|
||||
//Make SR check, and appropriate saving throw.
|
||||
if(!PRCDoResistSpell(oCaster, oTarget, nPenetr, fDist) && oTarget != oCaster)
|
||||
{
|
||||
nDamage = d4(nDice);
|
||||
//Enter Metamagic conditions
|
||||
if(nMetaMagic & METAMAGIC_MAXIMIZE)
|
||||
nDamage = 4 * nDice;//Damage is at max
|
||||
if(nMetaMagic & METAMAGIC_EMPOWER)
|
||||
nDamage += nDamage / 2; //Damage/Healing is +50%
|
||||
|
||||
//Run the damage through the various reflex save and evasion feats
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, PRCGetSaveDC(oTarget, oCaster), nSaveType);
|
||||
if(nDamage > 0)
|
||||
{
|
||||
effect eFire = PRCEffectDamage(oTarget, nDamage, EleDmg);
|
||||
|
||||
// Apply effects to the currently selected target.
|
||||
DelayCommand(fDist, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDist, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eFire, oTarget));
|
||||
PRCBonusDamage(oTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
//Select the next target within the spell shape.
|
||||
oTarget = MyNextObjectInShape(SHAPE_SPELLCONE, 10.0, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
}
|
||||
PRCSetSchool();
|
||||
}
|
BIN
35expandedspells/nw_s0_calllghtn.ncs
Normal file
BIN
35expandedspells/nw_s0_calllghtn.ncs
Normal file
Binary file not shown.
112
35expandedspells/nw_s0_calllghtn.nss
Normal file
112
35expandedspells/nw_s0_calllghtn.nss
Normal file
@ -0,0 +1,112 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Call Lightning
|
||||
//:: NW_S0_CallLghtn.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//::///////////////////////////////////////////////
|
||||
/*
|
||||
Evocation [Electricity]
|
||||
Level: Drd 3
|
||||
Components: V, S
|
||||
Casting Time: 1 round
|
||||
Range: Medium (100 ft. + 10 ft./level)
|
||||
Effect: One or more 30-ft.-long vertical lines of lightning
|
||||
Duration: 1 min./level
|
||||
Saving Throw: Reflex half
|
||||
Spell Resistance: Yes
|
||||
|
||||
Immediately upon completion of the spell, and once
|
||||
per round thereafter, you may call down a 5-foot-wide,
|
||||
30-foot-long, vertical bolt of lightning that deals
|
||||
3d6 points of electricity damage. The bolt of lightning
|
||||
flashes down in a vertical stroke at whatever target
|
||||
point you choose within the spell’s range (measured
|
||||
from your position at the time). Any creature in the
|
||||
target square or in the path of the bolt is affected.
|
||||
|
||||
You need not call a bolt of lightning immediately;
|
||||
other actions, even spellcasting, can be performed.
|
||||
However, each round after the first you may use a
|
||||
standard action (concentrating on the spell) to call
|
||||
a bolt. You may call a total number of bolts equal to
|
||||
your caster level (maximum 10 bolts).
|
||||
|
||||
If you are outdoors and in a stormy area—a rain shower,
|
||||
clouds and wind, hot and cloudy conditions, or even a
|
||||
tornado (including a whirlwind formed by a djinni or an
|
||||
air elemental of at least Large size)—each bolt deals
|
||||
3d10 points of electricity damage instead of 3d6.
|
||||
|
||||
This spell functions indoors or underground but not
|
||||
underwater.
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Notes: totally not like PnP version,
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 22, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 20, 2001
|
||||
//:: modified by mr_bumpkin Dec 4, 2003
|
||||
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
void main()
|
||||
{
|
||||
if (!X2PreSpellCastCode()) return;
|
||||
|
||||
PRCSetSchool(SPELL_SCHOOL_EVOCATION);
|
||||
|
||||
//Declare major variables
|
||||
object oCaster = OBJECT_SELF;
|
||||
location lTarget = PRCGetSpellTargetLocation();
|
||||
int nCasterLvl = PRCGetCasterLevel(oCaster);
|
||||
int nPenetr = nCasterLvl + SPGetPenetr();
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int nDice = min(20, nCasterLvl);
|
||||
int EleDmg = ChangedElementalDamage(oCaster, DAMAGE_TYPE_ELECTRICAL);
|
||||
int nSaveType = ChangedSaveType(EleDmg);
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_M);
|
||||
|
||||
//Declare the spell shape, size and the location. Capture the first target object in the shape.
|
||||
object oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
//Cycle through the targets within the spell shape until an invalid object is captured.
|
||||
while (GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, oCaster))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_CALL_LIGHTNING));
|
||||
//Get the distance between the explosion and the target to calculate delay
|
||||
float fDelay = PRCGetRandomDelay(0.4, 1.75);
|
||||
if (!PRCDoResistSpell(oCaster, oTarget, nPenetr, fDelay))
|
||||
{
|
||||
//Roll damage for each target
|
||||
int nDamage = d6(nDice);
|
||||
//Resolve metamagic
|
||||
if(nMetaMagic & METAMAGIC_MAXIMIZE)
|
||||
nDamage = 6 * nDice;
|
||||
if(nMetaMagic & METAMAGIC_EMPOWER)
|
||||
nDamage += nDamage / 2;
|
||||
|
||||
//Adjust the damage based on the Reflex Save, Evasion and Improved Evasion.
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, PRCGetSaveDC(oTarget, oCaster), nSaveType);
|
||||
if(nDamage > 0)
|
||||
{
|
||||
//Set the damage effect
|
||||
effect eDam = PRCEffectDamage(oTarget, nDamage, EleDmg);
|
||||
|
||||
// Apply effects to the currently selected target.
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||
PRCBonusDamage(oTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
//Select the next target within the spell shape.
|
||||
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
}
|
||||
PRCSetSchool();
|
||||
}
|
BIN
35expandedspells/nw_s0_chlightn.ncs
Normal file
BIN
35expandedspells/nw_s0_chlightn.ncs
Normal file
Binary file not shown.
204
35expandedspells/nw_s0_chlightn.nss
Normal file
204
35expandedspells/nw_s0_chlightn.nss
Normal file
@ -0,0 +1,204 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Chain Lightning
|
||||
//:: NW_S0_ChLightn
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
The primary target is struck with 1d6 per caster,
|
||||
1/2 with a reflex save. 1 secondary target per
|
||||
level is struck for 1d6 / 2 caster levels. No
|
||||
repeat targets can be chosen.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Brennon Holmes
|
||||
//:: Created On: March 8, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Preston Watamaniuk, On: April 26, 2001
|
||||
//:: Update Pass By: Preston W, On: July 26, 2001
|
||||
|
||||
/*
|
||||
bugfix by Kovi 2002.07.28
|
||||
- successful saving throw and (improved) evasion was ignored for
|
||||
secondary targets,
|
||||
- all secondary targets suffered exactly the same damage
|
||||
2002.08.25
|
||||
- primary target was not effected
|
||||
*/
|
||||
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_EVOCATION);
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
int CasterLvl = PRCGetCasterLevel(OBJECT_SELF);
|
||||
int nCasterLevel = CasterLvl;
|
||||
//Limit caster level
|
||||
// June 2/04 - Bugfix: Cap the level BEFORE the damage calculation, not after. Doh.
|
||||
if (nCasterLevel > 40) //alterado cap de 20 para 40 rafael
|
||||
{
|
||||
nCasterLevel = 40;
|
||||
}
|
||||
|
||||
int nDamage = d6(nCasterLevel);
|
||||
int nDamStrike;
|
||||
int nNumAffected = 0;
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
//Declare lightning effect connected the casters hands
|
||||
effect eLightning = EffectBeam(VFX_BEAM_LIGHTNING, OBJECT_SELF, BODY_NODE_HAND);;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_S);
|
||||
effect eDamage;
|
||||
object oFirstTarget = PRCGetSpellTargetObject();
|
||||
object oHolder;
|
||||
object oTarget;
|
||||
location lSpellLocation;
|
||||
|
||||
//Enter Metamagic conditions
|
||||
if ((nMetaMagic & METAMAGIC_MAXIMIZE))
|
||||
{
|
||||
nDamage = 6 * nCasterLevel;//Damage is at max
|
||||
}
|
||||
if ((nMetaMagic & METAMAGIC_EMPOWER))
|
||||
{
|
||||
nDamage = nDamage + (nDamage/2); //Damage/is +50%
|
||||
}
|
||||
//nDamage += ApplySpellBetrayalStrikeDamage(oTarget, OBJECT_SELF, FALSE);
|
||||
|
||||
CasterLvl +=SPGetPenetr();
|
||||
|
||||
int EleDmg = ChangedElementalDamage(OBJECT_SELF, DAMAGE_TYPE_ELECTRICAL);
|
||||
|
||||
//Damage the initial target
|
||||
if (spellsIsTarget(oFirstTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oFirstTarget, EventSpellCastAt(OBJECT_SELF, SPELL_CHAIN_LIGHTNING));
|
||||
//Make an SR Check
|
||||
if (!PRCDoResistSpell(OBJECT_SELF, oFirstTarget,CasterLvl))
|
||||
{
|
||||
int nDC = PRCGetSaveDC(oTarget,OBJECT_SELF);
|
||||
//Adjust damage via Reflex Save or Evasion or Improved Evasion
|
||||
nDamStrike = PRCGetReflexAdjustedDamage(nDamage, oFirstTarget, nDC, SAVING_THROW_TYPE_ELECTRICITY);
|
||||
//Set the damage effect for the first target
|
||||
eDamage = PRCEffectDamage(oTarget, nDamStrike, EleDmg);
|
||||
//Apply damage to the first target and the VFX impact.
|
||||
if(nDamStrike > 0)
|
||||
{
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT,eDamage,oFirstTarget);
|
||||
PRCBonusDamage(oFirstTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oFirstTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
//Apply the lightning stream effect to the first target, connecting it with the caster
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLightning,oFirstTarget,0.5,FALSE);
|
||||
|
||||
|
||||
//Reinitialize the lightning effect so that it travels from the first target to the next target
|
||||
eLightning = EffectBeam(VFX_BEAM_LIGHTNING, oFirstTarget, BODY_NODE_CHEST);
|
||||
|
||||
|
||||
float fDelay = 0.2;
|
||||
int nCnt = 0;
|
||||
|
||||
|
||||
// *
|
||||
// * Secondary Targets
|
||||
// *
|
||||
|
||||
|
||||
//Get the first target in the spell shape
|
||||
oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oFirstTarget), TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
while (GetIsObjectValid(oTarget) && nCnt < nCasterLevel)
|
||||
{
|
||||
//Make sure the caster's faction is not hit and the first target is not hit
|
||||
if (oTarget != oFirstTarget && spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF) && oTarget != OBJECT_SELF)
|
||||
{
|
||||
//Connect the new lightning stream to the older target and the new target
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLightning,oTarget,0.5,FALSE));
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_CHAIN_LIGHTNING));
|
||||
//Do an SR check
|
||||
if (!PRCDoResistSpell(OBJECT_SELF, oTarget,CasterLvl, fDelay))
|
||||
{
|
||||
int nDC = PRCGetSaveDC(oTarget,OBJECT_SELF);
|
||||
nDamage = d6(nCasterLevel) ;
|
||||
|
||||
if ((nMetaMagic & METAMAGIC_MAXIMIZE))
|
||||
{
|
||||
nDamage = 6 * nCasterLevel;//Damage is at max
|
||||
}
|
||||
if ((nMetaMagic & METAMAGIC_EMPOWER))
|
||||
{
|
||||
nDamage = nDamage + (nDamage/2); //Damage/is +50%
|
||||
}
|
||||
//Adjust damage via Reflex Save or Evasion or Improved Evasion
|
||||
nDamStrike = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_ELECTRICITY);
|
||||
//Apply the damage and VFX impact to the current target
|
||||
eDamage = PRCEffectDamage(oTarget, nDamStrike /2, EleDmg);
|
||||
if(nDamStrike > 0) //age > 0)
|
||||
{
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT,eDamage,oTarget));
|
||||
PRCBonusDamage(oTarget);
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget));
|
||||
}
|
||||
}
|
||||
oHolder = oTarget;
|
||||
|
||||
//change the currect holder of the lightning stream to the current target
|
||||
if (GetObjectType(oTarget) == OBJECT_TYPE_CREATURE)
|
||||
{
|
||||
eLightning = EffectBeam(VFX_BEAM_LIGHTNING, oHolder, BODY_NODE_CHEST);
|
||||
}
|
||||
else
|
||||
{
|
||||
// * April 2003 trying to make sure beams originate correctly
|
||||
effect eNewLightning = EffectBeam(VFX_BEAM_LIGHTNING, oHolder, BODY_NODE_CHEST);
|
||||
if(GetIsEffectValid(eNewLightning))
|
||||
{
|
||||
eLightning = eNewLightning;
|
||||
}
|
||||
}
|
||||
|
||||
fDelay = fDelay + 0.1f;
|
||||
}
|
||||
//Count the number of targets that have been hit.
|
||||
if(GetObjectType(oTarget) == OBJECT_TYPE_CREATURE)
|
||||
{
|
||||
nCnt++;
|
||||
}
|
||||
|
||||
// April 2003: Setting the new origin for the beam
|
||||
// oFirstTarget = oTarget;
|
||||
|
||||
//Get the next target in the shape.
|
||||
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(oFirstTarget), TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
}
|
||||
|
||||
|
||||
}
|
BIN
35expandedspells/nw_s0_circdeath.ncs
Normal file
BIN
35expandedspells/nw_s0_circdeath.ncs
Normal file
Binary file not shown.
152
35expandedspells/nw_s0_circdeath.nss
Normal file
152
35expandedspells/nw_s0_circdeath.nss
Normal file
@ -0,0 +1,152 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Circle of Death
|
||||
//:: NW_S0_CircDeath
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
The caster slays a number of HD worth of creatures
|
||||
equal to 1d4 times level. The creature gets a
|
||||
Fort Save or dies.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: June 1, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Aidan Scanlan
|
||||
//:: VFX Pass By: Preston W, On: June 20, 2001
|
||||
//:: Update Pass By: Preston W, On: July 25, 2001
|
||||
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_NECROMANCY);
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
object oTarget;
|
||||
object oLowest;
|
||||
effect eDeath = EffectDeath();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DEATH);
|
||||
effect eFNF = EffectVisualEffect(VFX_FNF_LOS_EVIL_20);
|
||||
int bContinueLoop = FALSE; //Used to determine if we have a next valid target
|
||||
int CasterLvl = PRCGetCasterLevel(OBJECT_SELF);
|
||||
|
||||
int nHD = d4(CasterLvl); //Roll to see how many HD worth of creature will be killed
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int nCurrentHD;
|
||||
int bAlreadyAffected;
|
||||
int nMax = 40;// maximun hd creature affected, set this to 9 so that a lower HD creature is chosen automatically
|
||||
//Also 9 is the maximum HD a creature can have and still be affected by the spell
|
||||
float fDelay;
|
||||
string sIdentifier = GetTag(OBJECT_SELF);
|
||||
|
||||
//Enter Metamagic conditions
|
||||
if ((nMetaMagic & METAMAGIC_MAXIMIZE))
|
||||
{
|
||||
nHD = 4 * CasterLvl;
|
||||
}
|
||||
if ((nMetaMagic & METAMAGIC_EMPOWER))
|
||||
{
|
||||
nHD = nHD + (nHD/2); //Damage/Healing is +50%
|
||||
}
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eFNF, PRCGetSpellTargetLocation());
|
||||
//Check for at least one valid object to start the main loop
|
||||
oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, PRCGetSpellTargetLocation());
|
||||
if (GetIsObjectValid(oTarget))
|
||||
{
|
||||
bContinueLoop = TRUE;
|
||||
}
|
||||
// The above checks to see if there is at least one valid target. If no value target exists we do not enter
|
||||
// the loop.
|
||||
|
||||
|
||||
CasterLvl +=SPGetPenetr();
|
||||
|
||||
|
||||
while ((nHD > 0) && (bContinueLoop))
|
||||
{
|
||||
int nLow = nMax; //Set nLow to the lowest HD creature in the last pass through the loop
|
||||
bContinueLoop = FALSE; //Set this to false so that the loop only continues in the case of new low HD creature
|
||||
//Get first target creature in loop
|
||||
oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, PRCGetSpellTargetLocation());
|
||||
while (GetIsObjectValid(oTarget))
|
||||
{
|
||||
//Make sure the currect target is not an enemy
|
||||
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF) && oTarget != OBJECT_SELF)
|
||||
{
|
||||
//Get a local set on the creature that checks if the spell has already allowed them to save
|
||||
bAlreadyAffected = GetLocalInt(oTarget, "bDEATH" + sIdentifier);
|
||||
if (!bAlreadyAffected)
|
||||
{
|
||||
nCurrentHD = GetHitDice(oTarget);
|
||||
//If the selected creature is of lower HD then the current nLow value and
|
||||
//the HD of the creature is of less HD than the number of HD available for
|
||||
//the spell to affect then set the creature as the currect primary target
|
||||
if(nCurrentHD < nLow && nCurrentHD <= nHD)
|
||||
{
|
||||
nLow = nCurrentHD;
|
||||
oLowest = oTarget;
|
||||
bContinueLoop = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get next target in shape to test for a new
|
||||
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, PRCGetSpellTargetLocation());
|
||||
}
|
||||
//Check to make sure that oLowest has changed
|
||||
if(bContinueLoop == TRUE)
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oLowest, EventSpellCastAt(OBJECT_SELF, SPELL_CIRCLE_OF_DEATH));
|
||||
fDelay = PRCGetRandomDelay();
|
||||
if(!PRCDoResistSpell(OBJECT_SELF, oLowest,CasterLvl, fDelay))
|
||||
{
|
||||
int nDC = PRCGetSaveDC(oTarget,OBJECT_SELF);
|
||||
//Make a Fort Save versus death effects
|
||||
if(!PRCMySavingThrow(SAVING_THROW_FORT, oLowest, nDC, SAVING_THROW_TYPE_DEATH, OBJECT_SELF, fDelay))
|
||||
{
|
||||
DeathlessFrenzyCheck(oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oLowest);
|
||||
//DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oLowest));
|
||||
}
|
||||
}
|
||||
//Even if the target made their save mark them as having been affected by the spell
|
||||
SetLocalInt(oLowest, "bDEATH" + sIdentifier, TRUE);
|
||||
//Destroy the local after 1/4 of a second in case other Circles of Death are cast on
|
||||
//the creature laster
|
||||
DelayCommand(fDelay + 0.25, DeleteLocalInt(oLowest, "bDEATH" + sIdentifier));
|
||||
//Adjust the number of HD that have been affected by the spell
|
||||
nHD = nHD - GetHitDice(oLowest);
|
||||
oLowest = OBJECT_INVALID;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the local integer storing the spellschool name
|
||||
}
|
BIN
35expandedspells/nw_s0_cloudkilla.ncs
Normal file
BIN
35expandedspells/nw_s0_cloudkilla.ncs
Normal file
Binary file not shown.
115
35expandedspells/nw_s0_cloudkilla.nss
Normal file
115
35expandedspells/nw_s0_cloudkilla.nss
Normal file
@ -0,0 +1,115 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Cloudkill: On Enter
|
||||
//:: NW_S0_CloudKillA.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
All creatures with 3 or less HD die, those with
|
||||
4 to 6 HD must make a save Fortitude Save or die.
|
||||
Those with more than 6 HD take 1d10 Poison damage
|
||||
every round.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 17, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003
|
||||
//:: modified by Ornedan Dec 22, 2004 to PnP rules
|
||||
#include "prc_inc_spells"
|
||||
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_CONJURATION);
|
||||
|
||||
|
||||
//Declare major variables
|
||||
object oTarget = GetEnteringObject();
|
||||
int nHD = GetHitDice(oTarget);
|
||||
effect eDeath = EffectDeath();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DEATH);
|
||||
effect eNeg = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
effect eConceal = EffectConcealment(20);
|
||||
effect eVis2 = EffectVisualEffect(VFX_DUR_GHOST_TRANSPARENT);
|
||||
effect eLink = EffectLinkEffects(eConceal, eVis2);
|
||||
|
||||
//effect eDam;
|
||||
int nDam = d4();
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
|
||||
object aoeCreator = GetAreaOfEffectCreator();
|
||||
int CasterLvl = GetLocalInt(OBJECT_SELF, "X2_AoE_Caster_Level");
|
||||
|
||||
//int nPenetr = SPGetPenetrAOE(aoeCreator,CasterLvl);
|
||||
|
||||
//Enter Metamagic conditions
|
||||
if(nMetaMagic & METAMAGIC_MAXIMIZE)
|
||||
{
|
||||
nDam = 4;//Damage is at max
|
||||
}
|
||||
if(nMetaMagic & METAMAGIC_EMPOWER)
|
||||
{
|
||||
nDam = nDam + (nDam/2); //Damage/Healing is +50%
|
||||
}
|
||||
|
||||
if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, aoeCreator))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_CLOUDKILL));
|
||||
|
||||
//Concealement by fog happens no matter what
|
||||
SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eConceal, oTarget, 0.0f, FALSE);
|
||||
|
||||
//Determine spell effect based on the targets HD
|
||||
if (nHD <= 20)
|
||||
{
|
||||
if(!GetIsImmune(oTarget, IMMUNITY_TYPE_DEATH))
|
||||
{
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oTarget);
|
||||
}
|
||||
}
|
||||
else if (nHD >= 21 && nHD <= 40)
|
||||
{
|
||||
//Make a save or die
|
||||
if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, PRCGetSaveDC(oTarget, aoeCreator), SAVING_THROW_TYPE_DEATH, OBJECT_SELF))
|
||||
{
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GetHasMettle(oTarget, SAVING_THROW_FORT))
|
||||
// This script does nothing if it has Mettle, bail
|
||||
return;
|
||||
AssignCommand(aoeCreator, ApplyAbilityDamage(oTarget, ABILITY_CONSTITUTION, nDam, DURATION_TYPE_TEMPORARY, TRUE, -1.0f));
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eNeg, oTarget);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, PRCGetSaveDC(oTarget, aoeCreator), SAVING_THROW_TYPE_SPELL, OBJECT_SELF))
|
||||
{
|
||||
AssignCommand(aoeCreator, ApplyAbilityDamage(oTarget, ABILITY_CONSTITUTION, nDam, DURATION_TYPE_TEMPORARY, TRUE, -1.0f));
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eNeg, oTarget);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GetHasMettle(oTarget, SAVING_THROW_FORT))
|
||||
// This script does nothing if it has Mettle, bail
|
||||
return;
|
||||
// Halve the damage on succesfull save.
|
||||
AssignCommand(aoeCreator, ApplyAbilityDamage(oTarget, ABILITY_CONSTITUTION, nDam / 2, DURATION_TYPE_TEMPORARY, TRUE, -1.0f));
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eNeg, oTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the local integer storing the spellschool name
|
||||
}
|
BIN
35expandedspells/nw_s0_cloudkillc.ncs
Normal file
BIN
35expandedspells/nw_s0_cloudkillc.ncs
Normal file
Binary file not shown.
109
35expandedspells/nw_s0_cloudkillc.nss
Normal file
109
35expandedspells/nw_s0_cloudkillc.nss
Normal file
@ -0,0 +1,109 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Cloudkill: Heartbeat
|
||||
//:: NW_S0_CloudKillC.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
All creatures with 3 or less HD die, those with
|
||||
4 to 6 HD must make a save Fortitude Save or die.
|
||||
Those with more than 6 HD take 1d10 Poison damage
|
||||
every round.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 17, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003
|
||||
//:: modified by Ornedan Dec 22, 2004 to PnP rules
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_CONJURATION);
|
||||
|
||||
|
||||
//Declare major variables
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int nDamage = d4();
|
||||
//effect eDam;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
object oTarget;
|
||||
int nHD;
|
||||
float fDelay;
|
||||
|
||||
//Enter Metamagic conditions
|
||||
if(nMetaMagic & METAMAGIC_MAXIMIZE)
|
||||
{
|
||||
nDamage = 4;//Damage is at max
|
||||
}
|
||||
if(nMetaMagic & METAMAGIC_EMPOWER)
|
||||
{
|
||||
nDamage = nDamage + (nDamage/2); //Damage/Healing is +50%
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// GZ 2003-Oct-15
|
||||
// When the caster is no longer there, all functions calling
|
||||
// GetAreaOfEffectCreator will fail. Its better to remove the barrier then
|
||||
//--------------------------------------------------------------------------
|
||||
if (!GetIsObjectValid(GetAreaOfEffectCreator()))
|
||||
{
|
||||
DestroyObject(OBJECT_SELF);
|
||||
return;
|
||||
}
|
||||
|
||||
object aoeCreator = GetAreaOfEffectCreator();
|
||||
int CasterLvl = GetLocalInt(OBJECT_SELF, "X2_AoE_Caster_Level");
|
||||
int nPenetr = SPGetPenetrAOE(aoeCreator,CasterLvl);
|
||||
|
||||
|
||||
//Set damage effect
|
||||
//Get the first object in the persistant AOE
|
||||
oTarget = GetFirstInPersistentObject();
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
fDelay = PRCGetRandomDelay();
|
||||
if(spellsIsTarget(oTarget,SPELL_TARGET_STANDARDHOSTILE , aoeCreator) )
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_CLOUDKILL));
|
||||
|
||||
nHD = GetHitDice(oTarget);
|
||||
|
||||
//Apply VFX impact and damage
|
||||
//Creatures with less than 6 HD take full damage automatically
|
||||
//Any with more than 6 get to save (Fortitued) for half
|
||||
if (nHD < 40)
|
||||
{
|
||||
AssignCommand(aoeCreator, ApplyAbilityDamage(oTarget, ABILITY_CONSTITUTION, nDamage, DURATION_TYPE_TEMPORARY, TRUE, -1.0f));
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, (PRCGetSaveDC(oTarget,aoeCreator)), SAVING_THROW_TYPE_SPELL, OBJECT_SELF))
|
||||
{
|
||||
AssignCommand(aoeCreator, ApplyAbilityDamage(oTarget, ABILITY_CONSTITUTION, nDamage, DURATION_TYPE_TEMPORARY, TRUE, -1.0f));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GetHasMettle(oTarget, SAVING_THROW_FORT))
|
||||
// This script does nothing if it has Mettle, bail
|
||||
nDamage = 0;
|
||||
// Halve the damage on succesfull save.
|
||||
AssignCommand(aoeCreator, ApplyAbilityDamage(oTarget, ABILITY_CONSTITUTION, nDamage / 2, DURATION_TYPE_TEMPORARY, TRUE, -1.0f));
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get the next target in the AOE
|
||||
oTarget = GetNextInPersistentObject();
|
||||
}
|
||||
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the local integer storing the spellschool name
|
||||
}
|
BIN
35expandedspells/nw_s0_colspray.ncs
Normal file
BIN
35expandedspells/nw_s0_colspray.ncs
Normal file
Binary file not shown.
137
35expandedspells/nw_s0_colspray.nss
Normal file
137
35expandedspells/nw_s0_colspray.nss
Normal file
@ -0,0 +1,137 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Color Spray
|
||||
//:: NW_S0_ColSpray.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
A cone of sparkling lights flashes out in a cone
|
||||
from the casters hands affecting all those within
|
||||
the Area of Effect.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: July 25, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_ILLUSION);
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int nHD;
|
||||
int nDuration;
|
||||
float fDelay;
|
||||
object oTarget;
|
||||
effect eSleep = EffectSleep();
|
||||
effect eStun = EffectStunned();
|
||||
effect eBlind = EffectBlindness();
|
||||
effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_NEGATIVE);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
|
||||
effect eLink1 = EffectLinkEffects(eSleep, eMind);
|
||||
|
||||
effect eLink2 = EffectLinkEffects(eStun, eMind);
|
||||
eLink2 = EffectLinkEffects(eLink2, eDur);
|
||||
|
||||
effect eLink3 = EffectLinkEffects(eBlind, eMind);
|
||||
|
||||
effect eVis1 = EffectVisualEffect(VFX_IMP_SLEEP);
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_STUN);
|
||||
effect eVis3 = EffectVisualEffect(VFX_IMP_BLIND_DEAF_M);
|
||||
|
||||
int CasterLvl = PRCGetCasterLevel(OBJECT_SELF);
|
||||
int nPenetr = CasterLvl + SPGetPenetr();
|
||||
|
||||
|
||||
//Get first object in the spell cone
|
||||
oTarget = MyFirstObjectInShape(SHAPE_SPELLCONE, 10.0, PRCGetSpellTargetLocation(), TRUE);
|
||||
//Cycle through the target until the current object is invalid
|
||||
while (GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)
|
||||
&& !PRCGetHasEffect(EFFECT_TYPE_BLINDNESS, oTarget)
|
||||
&& oTarget != OBJECT_SELF)
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_COLOR_SPRAY));
|
||||
fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/30;
|
||||
if(!PRCDoResistSpell(OBJECT_SELF, oTarget, nPenetr, fDelay))
|
||||
{
|
||||
int nDC = PRCGetSaveDC(oTarget,OBJECT_SELF);
|
||||
if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS, OBJECT_SELF, fDelay))
|
||||
{
|
||||
nDuration = 3 + d4();
|
||||
//Enter Metamagic conditions
|
||||
if ((nMetaMagic & METAMAGIC_MAXIMIZE))
|
||||
{
|
||||
nDuration = 7;//Damage is at max
|
||||
}
|
||||
if ((nMetaMagic & METAMAGIC_EMPOWER))
|
||||
{
|
||||
nDuration = nDuration + (nDuration/2); //Damage/Healing is +50%
|
||||
}
|
||||
if ((nMetaMagic & METAMAGIC_EXTEND))
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
|
||||
nHD = GetHitDice(oTarget);
|
||||
if(nHD <= 20)
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis1, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink1, oTarget, RoundsToSeconds(nDuration),TRUE,-1,CasterLvl));
|
||||
}
|
||||
else if(nHD > 20 && nHD < 30)
|
||||
{
|
||||
nDuration = nDuration - 1;
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis3, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink3, oTarget, RoundsToSeconds(nDuration),TRUE,-1,CasterLvl)); }
|
||||
else
|
||||
{
|
||||
nDuration = nDuration - 2;
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink2, oTarget, RoundsToSeconds(nDuration),TRUE,-1,CasterLvl));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = MyNextObjectInShape(SHAPE_SPELLCONE, 10.0, PRCGetSpellTargetLocation(), TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the local integer storing the spellschool name
|
||||
}
|
||||
|
BIN
35expandedspells/nw_s0_conecold.ncs
Normal file
BIN
35expandedspells/nw_s0_conecold.ncs
Normal file
Binary file not shown.
125
35expandedspells/nw_s0_conecold.nss
Normal file
125
35expandedspells/nw_s0_conecold.nss
Normal file
@ -0,0 +1,125 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Cone of Cold
|
||||
//:: NW_S0_ConeCold
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
// Cone of cold creates an area of extreme cold,
|
||||
// originating at your hand and extending outward
|
||||
// in a cone. It drains heat, causing 1d6 points of
|
||||
// cold damage per caster level (maximum 15d6).
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Noel Borstad
|
||||
//:: Created On: 10/18/02000
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Aidan Scanlan On: April 11, 2001
|
||||
//:: Update Pass By: Preston W, On: July 25, 2001
|
||||
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
float SpellDelay (object oTarget, int nShape);
|
||||
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_EVOCATION);
|
||||
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
int CasterLvl = PRCGetCasterLevel(OBJECT_SELF);
|
||||
|
||||
int nCasterLevel = CasterLvl;
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int nDamage;
|
||||
float fDelay;
|
||||
location lTargetLocation = PRCGetSpellTargetLocation();
|
||||
object oTarget;
|
||||
//Limit Caster level for the purposes of damage.
|
||||
if (nCasterLevel > 40)
|
||||
{
|
||||
nCasterLevel = 40;
|
||||
}
|
||||
|
||||
CasterLvl +=SPGetPenetr();
|
||||
|
||||
int EleDmg = ChangedElementalDamage(OBJECT_SELF, DAMAGE_TYPE_COLD);
|
||||
|
||||
//Declare the spell shape, size and the location. Capture the first target object in the shape.
|
||||
oTarget = MyFirstObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
//Cycle through the targets within the spell shape until an invalid object is captured.
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF))
|
||||
{
|
||||
// March 2003. Removed this as part of the reputation pass
|
||||
// if((PRCGetSpellId() == 340 && !GetIsFriend(oTarget)) || PRCGetSpellId() == 25)
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_CONE_OF_COLD));
|
||||
//Get the distance between the target and caster to delay the application of effects
|
||||
fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20.0;
|
||||
//Make SR check, and appropriate saving throw(s).
|
||||
if(!PRCDoResistSpell(OBJECT_SELF, oTarget,CasterLvl, fDelay) && (oTarget != OBJECT_SELF))
|
||||
{
|
||||
int nDC = PRCGetSaveDC(oTarget,OBJECT_SELF);
|
||||
//Detemine damage
|
||||
nDamage = d6(nCasterLevel);
|
||||
//Enter Metamagic conditions
|
||||
if ((nMetaMagic & METAMAGIC_MAXIMIZE))
|
||||
{
|
||||
nDamage = 6 * nCasterLevel;//Damage is at max
|
||||
}
|
||||
if ((nMetaMagic & METAMAGIC_EMPOWER))
|
||||
{
|
||||
nDamage = nDamage + (nDamage/2); //Damage/Healing is +50%
|
||||
}
|
||||
//nDamage += ApplySpellBetrayalStrikeDamage(oTarget, OBJECT_SELF, FALSE);
|
||||
//Adjust damage according to Reflex Save, Evasion or Improved Evasion
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, SAVING_THROW_TYPE_COLD);
|
||||
|
||||
// Apply effects to the currently selected target.
|
||||
effect eCold = PRCEffectDamage(oTarget, nDamage, EleDmg);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_FROST_L);
|
||||
if(nDamage > 0)
|
||||
{
|
||||
//Apply delayed effects
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eCold, oTarget));
|
||||
PRCBonusDamage(oTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//Select the next target within the spell shape.
|
||||
oTarget = MyNextObjectInShape(SHAPE_SPELLCONE, 11.0, lTargetLocation, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
}
|
||||
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the local integer storing the spellschool name
|
||||
}
|
||||
|
BIN
35expandedspells/nw_s0_daze.ncs
Normal file
BIN
35expandedspells/nw_s0_daze.ncs
Normal file
Binary file not shown.
140
35expandedspells/nw_s0_daze.nss
Normal file
140
35expandedspells/nw_s0_daze.nss
Normal file
@ -0,0 +1,140 @@
|
||||
/*::///////////////////////////////////////////////
|
||||
//:: [Daze]
|
||||
//:: [NW_S0_Daze.nss]
|
||||
//:: Copyright (c) 2000 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 15, 2001
|
||||
//:: Update Pass By: Preston W, On: July 27, 2001
|
||||
//:: modified by mr_bumpkin Dec 4, 2003
|
||||
//:: modified by xwarren Jul 22, 2010
|
||||
//:://////////////////////////////////////////////
|
||||
//::
|
||||
//:: Daze
|
||||
//::
|
||||
//:: Enchantment (Compulsion) [Mind-Affecting]
|
||||
//:: Level: Brd 0, Sor/Wiz 0
|
||||
//:: Components: V, S, M
|
||||
//:: Casting Time: 1 standard action
|
||||
//:: Range: Close (25 ft. + 5 ft./2 levels)
|
||||
//:: Target: One humanoid creature of 4 HD or less
|
||||
//:: Duration: 1 round
|
||||
//:: Saving Throw: Will negates
|
||||
//:: Spell Resistance: Yes
|
||||
//::
|
||||
//:: This enchantment clouds the mind of a humanoid
|
||||
//:: creature with 4 or fewer Hit Dice so that it
|
||||
//:: takes no actions. Humanoids of 5 or more HD are
|
||||
//:: not affected. A dazed subject is not stunned,
|
||||
//:: so attackers get no special advantage against it.
|
||||
//::
|
||||
//:: Material Component
|
||||
//:: A pinch of wool or similar substance.
|
||||
//::
|
||||
//:://////////////////////////////////////////////
|
||||
//::
|
||||
//:: Daze Monster
|
||||
//::
|
||||
//:: Enchantment (Compulsion) [Mind-Affecting]
|
||||
//:: Level: Beguiler 2, Brd 2, Sor/Wiz 2
|
||||
//:: Components: V, S, M
|
||||
//:: Casting Time: 1 standard action
|
||||
//:: Range: Medium (100 ft. + 10 ft./level)
|
||||
//:: Target: One living creature of 6 HD or less
|
||||
//:: Duration: 1 round
|
||||
//:: Saving Throw: Will negates
|
||||
//:: Spell Resistance: Yes
|
||||
//::
|
||||
//:: This enchantment clouds the mind of
|
||||
//:: a living creature with 6 or fewer Hit
|
||||
//:: Dice so that it takes no actions. Creatures
|
||||
//:: of 7 or more HD are not affected. A dazed
|
||||
//:: subject is not stunned, so attackers get no
|
||||
//:: special advantage against it.
|
||||
//::
|
||||
//:: Material Component
|
||||
//:: A pinch of wool or similar substance.
|
||||
//::
|
||||
//::////////////////////////////////////////////*/
|
||||
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
#include "prc_sp_func"
|
||||
|
||||
int DoSpell(object oCaster, object oTarget, int nCasterLevel, int nEvent)
|
||||
{
|
||||
//Declare major variables
|
||||
effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_NEGATIVE);
|
||||
effect eDaze = EffectDazed();
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
|
||||
effect eLink = EffectLinkEffects(eMind, eDaze);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DAZED_S);
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int nDuration = 2;
|
||||
//check meta magic for extend
|
||||
if ((nMetaMagic & METAMAGIC_EXTEND))
|
||||
{
|
||||
nDuration = 4;
|
||||
}
|
||||
int nSpellID = GetSpellId();
|
||||
int nMaxHD = nSpellID == SPELL_DAZE ? 4+(nCasterLevel/2) : 6+(nCasterLevel/2);
|
||||
int nPenetr = nCasterLevel + SPGetPenetr();
|
||||
|
||||
//Make sure the target of Daze spell is a humaniod
|
||||
if(nSpellID == SPELL_DAZE && PRCAmIAHumanoid(oTarget) != TRUE)
|
||||
return TRUE;
|
||||
//Make sure the target of Daze Monster spell is a living creature
|
||||
if(nSpellID == SPELL_DAZE_MONSTER && PRCGetIsAliveCreature(oTarget) != TRUE)
|
||||
return TRUE;
|
||||
if(GetHitDice(oTarget) <= nMaxHD)
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, nSpellID));
|
||||
//Make SR check
|
||||
if (!PRCDoResistSpell(oCaster, oTarget,nPenetr))
|
||||
{
|
||||
//Make Will Save to negate effect
|
||||
if (!/*Will Save*/ PRCMySavingThrow(SAVING_THROW_WILL, oTarget, PRCGetSaveDC(oTarget, oCaster), SAVING_THROW_TYPE_MIND_SPELLS))
|
||||
{
|
||||
//Apply VFX Impact and daze effect
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration),TRUE,-1,nCasterLevel);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return TRUE; //return TRUE if spell charges should be decremented
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
PRCSetSchool(SPELL_SCHOOL_ENCHANTMENT);
|
||||
if (!X2PreSpellCastCode()) return;
|
||||
object oCaster = OBJECT_SELF;
|
||||
int nCasterLevel = PRCGetCasterLevel(oCaster);
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nEvent = GetLocalInt(oCaster, PRC_SPELL_EVENT); //use bitwise & to extract flags
|
||||
if(!nEvent) //normal cast
|
||||
{
|
||||
if(GetLocalInt(oCaster, PRC_SPELL_HOLD) && oCaster == oTarget)
|
||||
{ //holding the charge, casting spell on self
|
||||
SetLocalSpellVariables(oCaster, 1); //change 1 to number of charges
|
||||
return;
|
||||
}
|
||||
DoSpell(oCaster, oTarget, nCasterLevel, nEvent);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(nEvent & PRC_SPELL_EVENT_ATTACK)
|
||||
{
|
||||
if(DoSpell(oCaster, oTarget, nCasterLevel, nEvent))
|
||||
DecrementSpellCharges(oCaster);
|
||||
}
|
||||
}
|
||||
PRCSetSchool();
|
||||
}
|
BIN
35expandedspells/nw_s0_delfirea.ncs
Normal file
BIN
35expandedspells/nw_s0_delfirea.ncs
Normal file
Binary file not shown.
97
35expandedspells/nw_s0_delfirea.nss
Normal file
97
35expandedspells/nw_s0_delfirea.nss
Normal file
@ -0,0 +1,97 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Delayed Blast Fireball: On Enter
|
||||
//:: NW_S0_DelFireA.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
The caster creates a trapped area which detects
|
||||
the entrance of enemy creatures into 3 m area
|
||||
around the spell location. When tripped it
|
||||
causes a fiery explosion that does 1d6 per
|
||||
caster level up to a max of 20d6 damage.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: July 27, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: modified by mr_bumpkin Dec 4, 2003
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_EVOCATION);
|
||||
|
||||
//Declare major variables
|
||||
object oTarget = GetEnteringObject();
|
||||
object oCaster = GetAreaOfEffectCreator();
|
||||
location lTarget = GetLocation(OBJECT_SELF);
|
||||
int nDamage;
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int CasterLvl = GetLocalInt(OBJECT_SELF, "X2_AoE_Caster_Level");
|
||||
|
||||
int nCasterLevel = CasterLvl;
|
||||
//Limit caster level
|
||||
if (nCasterLevel > 60)
|
||||
nCasterLevel = 60;
|
||||
|
||||
CasterLvl += SPGetPenetr();
|
||||
|
||||
int EleDmg = GetLocalInt(OBJECT_SELF, "DelayedBlastFireballDamage");
|
||||
int nSaveType = ChangedSaveType(EleDmg);
|
||||
|
||||
effect eDam;
|
||||
effect eExplode = EffectVisualEffect(VFX_FNF_FIREBALL);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M);
|
||||
//Check the faction of the entering object to make sure the entering object is not in the casters faction
|
||||
if(!GetLocalInt(OBJECT_SELF, "NW_SPELL_DELAY_BLAST_FIREBALL") && spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, oCaster))
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF, "NW_SPELL_DELAY_BLAST_FIREBALL",TRUE);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget);
|
||||
//Cycle through the targets in the explosion area
|
||||
oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, oCaster))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_DELAYED_BLAST_FIREBALL));
|
||||
//Make SR check
|
||||
if (!PRCDoResistSpell(oCaster, oTarget,CasterLvl))
|
||||
{
|
||||
//Enter Metamagic conditions
|
||||
if(nMetaMagic & METAMAGIC_MAXIMIZE)
|
||||
nDamage = 6 * nCasterLevel;//Damage is at max
|
||||
else
|
||||
nDamage = d6(nCasterLevel);
|
||||
|
||||
if(nMetaMagic & METAMAGIC_EMPOWER)
|
||||
nDamage += nDamage/2;//Damage/Healing is +50%
|
||||
|
||||
//nDamage += ApplySpellBetrayalStrikeDamage(oTarget, OBJECT_SELF, FALSE);
|
||||
//Change damage according to Reflex, Evasion and Improved Evasion
|
||||
int nDC = PRCGetSaveDC(oTarget, oCaster, -1);
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC, nSaveType, GetAreaOfEffectCreator());
|
||||
if(nDamage > 0)
|
||||
{
|
||||
//Set up the damage effect
|
||||
eDam = PRCEffectDamage(oTarget, nDamage, EleDmg);
|
||||
|
||||
//Apply VFX impact and damage effect
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
DelayCommand(0.01, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||
PRCBonusDamage(oTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get next target in the sequence
|
||||
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
}
|
||||
DestroyObject(OBJECT_SELF, 1.0);
|
||||
}
|
||||
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the local integer storing the spellschool name
|
||||
}
|
BIN
35expandedspells/nw_s0_destruc.ncs
Normal file
BIN
35expandedspells/nw_s0_destruc.ncs
Normal file
Binary file not shown.
101
35expandedspells/nw_s0_destruc.nss
Normal file
101
35expandedspells/nw_s0_destruc.nss
Normal file
@ -0,0 +1,101 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Destruction
|
||||
//:: NW_S0_Destruc
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
The target creature is destroyed if it fails a
|
||||
Fort save, otherwise it takes 10d6 damage.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Aug 13, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_NECROMANCY);
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int nDamage;
|
||||
effect eDeath = EffectDeath();
|
||||
effect eDam;
|
||||
effect eVis = EffectVisualEffect(234);
|
||||
|
||||
|
||||
int CasterLvl = PRCGetCasterLevel(OBJECT_SELF);
|
||||
CasterLvl +=SPGetPenetr();
|
||||
|
||||
if(!GetIsReactionTypeFriendly(oTarget) && PRCGetIsAliveCreature(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_DESTRUCTION));
|
||||
//Make SR check
|
||||
if(!PRCDoResistSpell(OBJECT_SELF, oTarget,CasterLvl))
|
||||
{
|
||||
//Make a saving throw check
|
||||
if(!/*Fort Save*/ PRCMySavingThrow(SAVING_THROW_FORT, oTarget, PRCGetSaveDC(oTarget, OBJECT_SELF)))
|
||||
{
|
||||
DeathlessFrenzyCheck(oTarget);
|
||||
|
||||
//Apply the VFX impact and effects
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oTarget);
|
||||
}
|
||||
else if (GetHasMettle(oTarget, SAVING_THROW_FORT))
|
||||
{
|
||||
// This script does nothing if it has Mettle, bail
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
nDamage = d6(60);
|
||||
//Enter Metamagic conditions
|
||||
if ((nMetaMagic & METAMAGIC_MAXIMIZE))
|
||||
{
|
||||
nDamage = 360;//Damage is at max
|
||||
}
|
||||
if ((nMetaMagic & METAMAGIC_EMPOWER))
|
||||
{
|
||||
nDamage = nDamage + (nDamage/2); //Damage/Healing is +50%
|
||||
}
|
||||
//nDamage += ApplySpellBetrayalStrikeDamage(oTarget, OBJECT_SELF);
|
||||
//Set damage effect
|
||||
eDam = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_DIVINE);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
}
|
||||
//Apply VFX impact
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the local integer storing the spellschool name
|
||||
}
|
BIN
35expandedspells/nw_s0_dismagic.ncs
Normal file
BIN
35expandedspells/nw_s0_dismagic.ncs
Normal file
Binary file not shown.
111
35expandedspells/nw_s0_dismagic.nss
Normal file
111
35expandedspells/nw_s0_dismagic.nss
Normal file
@ -0,0 +1,111 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Dispel Magic
|
||||
//:: NW_S0_DisMagic.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Attempts to dispel all magic on a targeted
|
||||
//:: object, or simply the most powerful that it
|
||||
//:: can on every object in an area if no target
|
||||
//:: specified.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 7, 2002
|
||||
//:: Updated On: Oct 20, 2003, Georg Zoeller
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003
|
||||
#include "inc_dispel"
|
||||
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_ABJURATION);
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
*/
|
||||
//--------------------------------------------------------------------------
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
return;
|
||||
}
|
||||
// End of Spell Cast Hook
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_BREACH);
|
||||
effect eImpact = EffectVisualEffect(VFX_FNF_DISPEL);
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
location lLocal = PRCGetSpellTargetLocation();
|
||||
int nCasterLevel = PRCGetCasterLevel(OBJECT_SELF);
|
||||
int iTypeDispel = GetLocalInt(GetModule(),"BIODispel");
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Dispel Magic is capped at caster level 10
|
||||
//--------------------------------------------------------------------------
|
||||
if(nCasterLevel > 10)
|
||||
{
|
||||
nCasterLevel = 10;
|
||||
}
|
||||
|
||||
if (GetIsObjectValid(oTarget))
|
||||
{
|
||||
//----------------------------------------------------------------------
|
||||
// Targeted Dispel - Dispel all
|
||||
//----------------------------------------------------------------------
|
||||
if (iTypeDispel)
|
||||
spellsDispelMagic(oTarget, nCasterLevel, eVis, eImpact);
|
||||
else
|
||||
spellsDispelMagicMod(oTarget, nCasterLevel, eVis, eImpact);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//----------------------------------------------------------------------
|
||||
// Area of Effect - Only dispel best effect
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, PRCGetSpellTargetLocation());
|
||||
oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, lLocal, FALSE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_AREA_OF_EFFECT | OBJECT_TYPE_PLACEABLE );
|
||||
while (GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(GetObjectType(oTarget) == OBJECT_TYPE_AREA_OF_EFFECT)
|
||||
{
|
||||
//--------------------------------------------------------------
|
||||
// Handle Area of Effects
|
||||
//--------------------------------------------------------------
|
||||
if (iTypeDispel)
|
||||
spellsDispelAoE(oTarget, OBJECT_SELF,nCasterLevel);
|
||||
else
|
||||
spellsDispelAoEMod(oTarget, OBJECT_SELF,nCasterLevel);
|
||||
|
||||
}
|
||||
else if (GetObjectType(oTarget) == OBJECT_TYPE_PLACEABLE)
|
||||
{
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId()));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (iTypeDispel)
|
||||
spellsDispelMagic(oTarget, nCasterLevel, eVis, eImpact, FALSE);
|
||||
else
|
||||
spellsDispelMagicMod(oTarget, nCasterLevel, eVis, eImpact, FALSE);
|
||||
}
|
||||
|
||||
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE,lLocal, FALSE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_AREA_OF_EFFECT | OBJECT_TYPE_PLACEABLE);
|
||||
}
|
||||
}
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the local integer storing the spellschool name
|
||||
}
|
||||
|
||||
|
||||
|
BIN
35expandedspells/nw_s0_enedrain.ncs
Normal file
BIN
35expandedspells/nw_s0_enedrain.ncs
Normal file
Binary file not shown.
107
35expandedspells/nw_s0_enedrain.nss
Normal file
107
35expandedspells/nw_s0_enedrain.nss
Normal file
@ -0,0 +1,107 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Energy Drain
|
||||
//:: NW_S0_EneDrain.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Target loses 2d4 levels.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 7, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003 for PRC stuff
|
||||
|
||||
//::Added code to maximize for Faith Healing and Blast Infidel
|
||||
//::Aaon Graywolf - Jan 7, 2003
|
||||
|
||||
//::Added hold ray functionality - HackyKid
|
||||
|
||||
#include "prc_sp_func"
|
||||
#include "prc_inc_function"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
//Implements the spell impact, put code here
|
||||
// if called in many places, return TRUE if
|
||||
// stored charges should be decreased
|
||||
// eg. touch attack hits
|
||||
//
|
||||
// Variables passed may be changed if necessary
|
||||
int DoSpell(object oCaster, object oTarget, int nCasterLevel, int nEvent)
|
||||
{
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int nSaveDC = PRCGetSaveDC(oTarget, oCaster);
|
||||
int nPenetr = nCasterLevel + SPGetPenetr();
|
||||
int nDrain = d4(2);
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE);
|
||||
|
||||
//Undead Gain HP from Energy Drain
|
||||
int nHP = d4(2) + (nPenetr/2);
|
||||
nHP = nHP + nHP + nHP + nHP +nHP;
|
||||
effect eHP = EffectTemporaryHitpoints(nHP);
|
||||
|
||||
//Enter Metamagic conditions
|
||||
int iBlastFaith = BlastInfidelOrFaithHeal(OBJECT_SELF, oTarget, DAMAGE_TYPE_NEGATIVE, TRUE);
|
||||
if ((nMetaMagic & METAMAGIC_MAXIMIZE) || iBlastFaith)
|
||||
{
|
||||
nDrain = 8;//Damage is at max
|
||||
}
|
||||
if (nMetaMagic & METAMAGIC_EMPOWER)
|
||||
{
|
||||
nDrain = nDrain + (nDrain/2); //Damage/Healing is +50%
|
||||
}
|
||||
effect eDrain = EffectNegativeLevel(nDrain);
|
||||
eDrain = SupernaturalEffect(eDrain);
|
||||
|
||||
if (MyPRCGetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
|
||||
{
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHP, oTarget, HoursToSeconds(1),TRUE,-1,nCasterLevel);
|
||||
}
|
||||
else if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_ENERGY_DRAIN));
|
||||
if(!PRCDoResistSpell(OBJECT_SELF, oTarget, nPenetr))
|
||||
{
|
||||
|
||||
if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, PRCGetSaveDC(oTarget,OBJECT_SELF), SAVING_THROW_TYPE_NEGATIVE))
|
||||
{
|
||||
SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eDrain, oTarget,0.0f,TRUE,-1,nCasterLevel);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE; //return TRUE if spell charges should be decremented
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
object oCaster = OBJECT_SELF;
|
||||
int nCasterLevel = PRCGetCasterLevel(oCaster);
|
||||
PRCSetSchool(GetSpellSchool(PRCGetSpellId()));
|
||||
if (!X2PreSpellCastCode()) return;
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nEvent = GetLocalInt(oCaster, PRC_SPELL_EVENT); //use bitwise & to extract flags
|
||||
if(!nEvent) //normal cast
|
||||
{
|
||||
if (GetLocalInt(oCaster, PRC_SPELL_HOLD) && GetHasFeat(FEAT_EF_HOLD_RAY, oCaster) && oCaster == oTarget)
|
||||
{ //holding the charge, casting spell on self
|
||||
SetLocalSpellVariables(oCaster, 1); //change 1 to number of charges
|
||||
return;
|
||||
}
|
||||
if (oCaster != oTarget) //cant target self with this spell, only when holding charge
|
||||
DoSpell(oCaster, oTarget, nCasterLevel, nEvent);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(nEvent & PRC_SPELL_EVENT_ATTACK)
|
||||
{
|
||||
if(DoSpell(oCaster, oTarget, nCasterLevel, nEvent))
|
||||
DecrementSpellCharges(oCaster);
|
||||
}
|
||||
}
|
||||
PRCSetSchool();
|
||||
}
|
BIN
35expandedspells/nw_s0_enervat.ncs
Normal file
BIN
35expandedspells/nw_s0_enervat.ncs
Normal file
Binary file not shown.
125
35expandedspells/nw_s0_enervat.nss
Normal file
125
35expandedspells/nw_s0_enervat.nss
Normal file
@ -0,0 +1,125 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Enervation
|
||||
//:: NW_S0_Enervat.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Target Loses 1d4 levels for 1 hour per caster
|
||||
level
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 7, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003 for PRC stuff
|
||||
|
||||
//::Added code to maximize for Faith Healing and Blast Infidel
|
||||
//::Aaon Graywolf - Jan 7, 2003
|
||||
|
||||
|
||||
#include "prc_inc_sp_tch"
|
||||
#include "prc_inc_function"
|
||||
#include "prc_sp_func"
|
||||
#include "prc_add_spell_dc"
|
||||
//Implements the spell impact, put code here
|
||||
// if called in many places, return TRUE if
|
||||
// stored charges should be decreased
|
||||
// eg. touch attack hits
|
||||
//
|
||||
// Variables passed may be changed if necessary
|
||||
int DoSpell(object oCaster, object oTarget, int nCasterLevel, int nEvent)
|
||||
{
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int nSaveDC = PRCGetSaveDC(oTarget, oCaster);
|
||||
int nPenetr = nCasterLevel + SPGetPenetr();
|
||||
int nDrain = d4();
|
||||
int nDuration = nCasterLevel;
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE);
|
||||
|
||||
//Undead Gain HP from Enervation
|
||||
int nHP = ((nCasterLevel/2) * 5);
|
||||
if (nHP > 125)
|
||||
{
|
||||
nHP = 125;
|
||||
}
|
||||
|
||||
effect eHP = EffectTemporaryHitpoints(nHP);
|
||||
|
||||
//Enter Metamagic conditions
|
||||
int iBlastFaith = BlastInfidelOrFaithHeal(OBJECT_SELF, oTarget, DAMAGE_TYPE_NEGATIVE, TRUE);
|
||||
if ((nMetaMagic & METAMAGIC_MAXIMIZE) || iBlastFaith)
|
||||
{
|
||||
nDrain = 4;//Damage is at max
|
||||
}
|
||||
if (nMetaMagic & METAMAGIC_EMPOWER)
|
||||
{
|
||||
nDrain = nDrain + (nDrain/2); //Damage/Healing is +50%
|
||||
}
|
||||
if (nMetaMagic & METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
|
||||
effect eDrain = EffectNegativeLevel(nDrain);
|
||||
effect eLink = EffectLinkEffects(eDrain, eDur);
|
||||
|
||||
int iAttackRoll = PRCDoRangedTouchAttack(oTarget);;
|
||||
if(iAttackRoll > 0)
|
||||
{
|
||||
if (MyPRCGetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
|
||||
{
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eHP, oTarget, HoursToSeconds(1),TRUE,-1,nCasterLevel);
|
||||
}
|
||||
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_ENERVATION));
|
||||
//Resist magic check
|
||||
if(!PRCDoResistSpell(OBJECT_SELF, oTarget, nPenetr))
|
||||
{
|
||||
if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, PRCGetSaveDC(oTarget, OBJECT_SELF), SAVING_THROW_TYPE_NEGATIVE))
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(nDuration),TRUE,-1,nCasterLevel);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
|
||||
ApplyTouchAttackDamage(OBJECT_SELF, oTarget, iAttackRoll, 0, DAMAGE_TYPE_NEGATIVE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return iAttackRoll; //return TRUE if spell charges should be decremented
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
object oCaster = OBJECT_SELF;
|
||||
int nCasterLevel = PRCGetCasterLevel(oCaster);
|
||||
PRCSetSchool(GetSpellSchool(PRCGetSpellId()));
|
||||
if (!X2PreSpellCastCode()) return;
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nEvent = GetLocalInt(oCaster, PRC_SPELL_EVENT); //use bitwise & to extract flags
|
||||
if(!nEvent) //normal cast
|
||||
{
|
||||
if (GetLocalInt(oCaster, PRC_SPELL_HOLD) && GetHasFeat(FEAT_EF_HOLD_RAY, oCaster) && oCaster == oTarget)
|
||||
{ //holding the charge, casting spell on self
|
||||
SetLocalSpellVariables(oCaster, 1); //change 1 to number of charges
|
||||
return;
|
||||
}
|
||||
if (oCaster != oTarget) //cant target self with this spell, only when holding charge
|
||||
DoSpell(oCaster, oTarget, nCasterLevel, nEvent);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(nEvent & PRC_SPELL_EVENT_ATTACK)
|
||||
{
|
||||
if(DoSpell(oCaster, oTarget, nCasterLevel, nEvent))
|
||||
DecrementSpellCharges(oCaster);
|
||||
}
|
||||
}
|
||||
PRCSetSchool();
|
||||
}
|
BIN
35expandedspells/nw_s0_fireball.ncs
Normal file
BIN
35expandedspells/nw_s0_fireball.ncs
Normal file
Binary file not shown.
96
35expandedspells/nw_s0_fireball.nss
Normal file
96
35expandedspells/nw_s0_fireball.nss
Normal file
@ -0,0 +1,96 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Fireball
|
||||
//:: NW_S0_Fireball
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
// A fireball is a burst of flame that detonates with
|
||||
// a low roar and inflicts 1d6 points of damage per
|
||||
// caster level (maximum of 10d6) to all creatures
|
||||
// within the area. Unattended objects also take
|
||||
// damage. The explosion creates almost no pressure.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Noel Borstad
|
||||
//:: Created On: Oct 18 , 2000
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Preston Watamaniuk, On: April 6, 2001
|
||||
//:: Last Updated By: AidanScanlan, On: April 11, 2001
|
||||
//:: Last Updated By: Preston Watamaniuk, On: May 25, 2001
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003 for PRC stuff
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
if(!X2PreSpellCastCode()) return;
|
||||
|
||||
PRCSetSchool(SPELL_SCHOOL_EVOCATION);
|
||||
|
||||
//Declare major variables
|
||||
object oCaster = OBJECT_SELF;
|
||||
location lTarget = PRCGetSpellTargetLocation();
|
||||
int nCasterLvl = PRCGetCasterLevel(oCaster);
|
||||
int EleDmg = ChangedElementalDamage(oCaster, DAMAGE_TYPE_FIRE);
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int nDamage;
|
||||
float fDelay;
|
||||
effect eExplode = EffectVisualEffect(VFX_FNF_FIREBALL);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M);
|
||||
effect eDam;
|
||||
//Limit Caster level for the purposes of damage
|
||||
int nDice = min(20, nCasterLvl); //alterado rafael era 10 mudei para 20 d6
|
||||
|
||||
nCasterLvl += SPGetPenetr();
|
||||
|
||||
//Apply the fireball explosion at the location captured above.
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget);
|
||||
//Declare the spell shape, size and the location. Capture the first target object in the shape.
|
||||
object oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
//Cycle through the targets within the spell shape until an invalid object is captured.
|
||||
while (GetIsObjectValid(oTarget))
|
||||
{
|
||||
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_FIREBALL));
|
||||
//Get the distance between the explosion and the target to calculate delay
|
||||
fDelay = GetDistanceBetweenLocations(lTarget, GetLocation(oTarget))/20;
|
||||
if (!PRCDoResistSpell(oCaster, oTarget, nCasterLvl, fDelay))
|
||||
{
|
||||
//Resolve metamagic
|
||||
if ((nMetaMagic & METAMAGIC_MAXIMIZE))
|
||||
nDamage = 6 * nDice;
|
||||
else
|
||||
//Roll damage for each target
|
||||
nDamage = d6(nDice);
|
||||
if ((nMetaMagic & METAMAGIC_EMPOWER))
|
||||
nDamage += nDamage / 2;
|
||||
|
||||
//nDamage += ApplySpellBetrayalStrikeDamage(oTarget, OBJECT_SELF, FALSE);
|
||||
//Adjust the damage based on the Reflex Save, Evasion and Improved Evasion.
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, (PRCGetSaveDC(oTarget, oCaster)), SAVING_THROW_TYPE_FIRE);
|
||||
if(nDamage > 0)
|
||||
{
|
||||
//Set the damage effect
|
||||
eDam = PRCEffectDamage(oTarget, nDamage, EleDmg);
|
||||
// Apply effects to the currently selected target.
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||
PRCBonusDamage(oTarget);
|
||||
//This visual effect is applied to the target object not the location as above. This visual effect
|
||||
//represents the flame that erupts on the target not on the ground.
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
}
|
||||
//Select the next target within the spell shape.
|
||||
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
}
|
||||
|
||||
PRCSetSchool();
|
||||
}
|
||||
|
BIN
35expandedspells/nw_s0_firestrm.ncs
Normal file
BIN
35expandedspells/nw_s0_firestrm.ncs
Normal file
Binary file not shown.
98
35expandedspells/nw_s0_firestrm.nss
Normal file
98
35expandedspells/nw_s0_firestrm.nss
Normal file
@ -0,0 +1,98 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Fire Storm
|
||||
//:: NW_S0_FireStm
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Creates a zone of destruction around the caster
|
||||
within which all living creatures are pummeled
|
||||
with fire.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: April 11, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 21, 2001
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003 for PRC stuff
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
void main()
|
||||
{
|
||||
if(!X2PreSpellCastCode()) return;
|
||||
|
||||
PRCSetSchool(SPELL_SCHOOL_EVOCATION);
|
||||
|
||||
//Declare major variables
|
||||
object oCaster = OBJECT_SELF;
|
||||
location lTarget = GetLocation(oCaster);
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int nDamage;
|
||||
int nDamage2;
|
||||
|
||||
int CasterLvl = PRCGetCasterLevel(OBJECT_SELF);
|
||||
|
||||
|
||||
int EleDmg = ChangedElementalDamage(OBJECT_SELF, DAMAGE_TYPE_FIRE);
|
||||
|
||||
|
||||
int nCasterLevel = CasterLvl;
|
||||
if(nCasterLevel > 60)
|
||||
{
|
||||
nCasterLevel = 60; //bugfix, was == 20
|
||||
}
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M);
|
||||
effect eFireStorm = EffectVisualEffect(VFX_FNF_FIRESTORM);
|
||||
float fDelay;
|
||||
CasterLvl +=SPGetPenetr();
|
||||
|
||||
//Apply Fire and Forget Visual in the area;
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eFireStorm, lTarget);
|
||||
//Declare the spell shape, size and the location. Capture the first target object in the shape.
|
||||
object oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, lTarget, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
//Cycle through the targets within the spell shape until an invalid object is captured.
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
//This spell smites everyone who is more than 2 meters away from the caster.
|
||||
//if (GetDistanceBetween(oTarget, OBJECT_SELF) > 2.0)
|
||||
//{
|
||||
if (spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF) && oTarget != OBJECT_SELF)
|
||||
{
|
||||
fDelay = PRCGetRandomDelay(1.5, 2.5);
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_FIRE_STORM));
|
||||
//Make SR check, and appropriate saving throw(s).
|
||||
if (!PRCDoResistSpell(OBJECT_SELF, oTarget,CasterLvl, fDelay))
|
||||
{
|
||||
//Roll Damage
|
||||
nDamage = d6(nCasterLevel);
|
||||
//Enter Metamagic conditions
|
||||
if(nMetaMagic & METAMAGIC_MAXIMIZE)
|
||||
nDamage = 6 * nCasterLevel;//Damage is at max
|
||||
if(nMetaMagic & METAMAGIC_EMPOWER)
|
||||
nDamage = nDamage + (nDamage/2);//Damage/Healing is +50%
|
||||
int nDC = PRCGetSaveDC(oTarget,OBJECT_SELF);
|
||||
//Save versus both holy and fire damage
|
||||
//nDamage2 += ApplySpellBetrayalStrikeDamage(oTarget, OBJECT_SELF, FALSE);
|
||||
nDamage2 = PRCGetReflexAdjustedDamage(nDamage/2, oTarget, (nDC), SAVING_THROW_TYPE_DIVINE);
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage/2, oTarget, (nDC), SAVING_THROW_TYPE_FIRE);
|
||||
if(nDamage)
|
||||
{
|
||||
// Apply effects to the currently selected target. For this spell we have used
|
||||
//both Divine and Fire damage.
|
||||
effect eDivine = PRCEffectDamage(oTarget, nDamage2, DAMAGE_TYPE_DIVINE);
|
||||
effect eFire = PRCEffectDamage(oTarget, nDamage, EleDmg);
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eFire, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDivine, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
//Select the next target within the spell shape.
|
||||
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, lTarget, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
}
|
||||
|
||||
PRCSetSchool();
|
||||
}
|
BIN
35expandedspells/nw_s0_flmstrike.ncs
Normal file
BIN
35expandedspells/nw_s0_flmstrike.ncs
Normal file
Binary file not shown.
96
35expandedspells/nw_s0_flmstrike.nss
Normal file
96
35expandedspells/nw_s0_flmstrike.nss
Normal file
@ -0,0 +1,96 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Flame Strike
|
||||
//:: NW_S0_FlmStrike
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
// A flame strike is a vertical column of divine fire
|
||||
// roaring downward. The spell deals 1d6 points of
|
||||
// damage per level, to a maximum of 15d6. Half the
|
||||
// damage is fire damage, but the rest of the damage
|
||||
// results directly from divine power and is therefore
|
||||
// not subject to protection from elements (fire),
|
||||
// fire shield (chill shield), etc.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Noel Borstad
|
||||
//:: Created On: Oct 19, 2000
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 20, 2001
|
||||
//:: Update Pass By: Preston W, On: Aug 1, 2001
|
||||
//:: modified by mr_bumpkin Dec 4, 2003 for PRC stuff
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
void main()
|
||||
{
|
||||
if(!X2PreSpellCastCode()) return;
|
||||
|
||||
PRCSetSchool(SPELL_SCHOOL_EVOCATION);
|
||||
|
||||
//Declare major variables
|
||||
object oCaster = OBJECT_SELF;
|
||||
location lTarget = PRCGetSpellTargetLocation();
|
||||
int nCasterLvl = PRCGetCasterLevel(oCaster);
|
||||
int nPenetr = nCasterLvl + SPGetPenetr();
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int EleDmg = ChangedElementalDamage(oCaster, DAMAGE_TYPE_FIRE);
|
||||
int nSaveType = ChangedSaveType(EleDmg);
|
||||
int nDice = min(40, nCasterLvl);
|
||||
|
||||
int nDamage, nDamage2;
|
||||
effect eStrike = EffectVisualEffect(VFX_IMP_DIVINE_STRIKE_FIRE);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S);
|
||||
effect eHoly, eFire;
|
||||
|
||||
//Apply the location impact visual to the caster location instead of caster target creature.
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eStrike, lTarget);
|
||||
|
||||
//Declare the spell shape, size and the location. Capture the first target object in the shape.
|
||||
object oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, lTarget, FALSE, OBJECT_TYPE_CREATURE|OBJECT_TYPE_PLACEABLE|OBJECT_TYPE_DOOR);
|
||||
//Cycle through the targets within the spell shape until an invalid object is captured.
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, oCaster))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_FLAME_STRIKE));
|
||||
|
||||
//Make SR check, and appropriate saving throw(s).
|
||||
if(!PRCDoResistSpell(oCaster, oTarget, nPenetr, 0.6))
|
||||
{
|
||||
nDamage = d6(nDice);
|
||||
if(nMetaMagic & METAMAGIC_MAXIMIZE)
|
||||
nDamage = 6 * nDice;
|
||||
if(nMetaMagic & METAMAGIC_EMPOWER)
|
||||
nDamage = nDamage + (nDamage/2);
|
||||
|
||||
//Adjust the damage based on Reflex Save, Evasion and Improved Evasion
|
||||
int nDC = PRCGetSaveDC(oTarget, oCaster);
|
||||
nDamage2 = PRCGetReflexAdjustedDamage(nDamage/2, oTarget, nDC, nSaveType);
|
||||
|
||||
//Make a faction check so that only enemies receieve the full brunt of the damage.
|
||||
if(!GetIsFriend(oTarget))
|
||||
{
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage/2, oTarget, nDC, SAVING_THROW_TYPE_DIVINE);
|
||||
if(nDamage)
|
||||
{
|
||||
eHoly = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_DIVINE);
|
||||
DelayCommand(0.6, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eHoly, oTarget));
|
||||
}
|
||||
}
|
||||
// Apply effects to the currently selected target.
|
||||
if(nDamage2)
|
||||
{
|
||||
eFire = PRCEffectDamage(oTarget, nDamage2, EleDmg);
|
||||
DelayCommand(0.6, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eFire, oTarget));
|
||||
DelayCommand(0.6, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
}
|
||||
//Select the next target within the spell shape.
|
||||
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, lTarget, FALSE, OBJECT_TYPE_CREATURE|OBJECT_TYPE_PLACEABLE|OBJECT_TYPE_DOOR);
|
||||
}
|
||||
|
||||
PRCSetSchool();
|
||||
}
|
BIN
35expandedspells/nw_s0_grdispel.ncs
Normal file
BIN
35expandedspells/nw_s0_grdispel.ncs
Normal file
Binary file not shown.
95
35expandedspells/nw_s0_grdispel.nss
Normal file
95
35expandedspells/nw_s0_grdispel.nss
Normal file
@ -0,0 +1,95 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Greater Dispelling
|
||||
//:: NW_S0_GrDispel.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 7, 2002
|
||||
//:: Updated On: Oct 20, 2003, Georg Zoeller
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003 for PRC stuff
|
||||
#include "inc_dispel"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_ABJURATION);
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
*/
|
||||
//--------------------------------------------------------------------------
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
return;
|
||||
}
|
||||
// End of Spell Cast Hook
|
||||
|
||||
effect eVis = EffectVisualEffect( VFX_IMP_BREACH );
|
||||
effect eImpact = EffectVisualEffect( VFX_FNF_DISPEL_GREATER );
|
||||
int nCasterLevel = PRCGetCasterLevel(OBJECT_SELF);
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
location lLocal = PRCGetSpellTargetLocation();
|
||||
int iTypeDispel = GetLocalInt(GetModule(),"BIODispel");
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Greater Dispel Magic is capped at caster level 20
|
||||
//--------------------------------------------------------------------------
|
||||
if(nCasterLevel >20 )
|
||||
{
|
||||
nCasterLevel = 20;
|
||||
}
|
||||
|
||||
if (GetIsObjectValid(oTarget))
|
||||
{
|
||||
//----------------------------------------------------------------------
|
||||
// Targeted Dispel - Dispel all
|
||||
//----------------------------------------------------------------------
|
||||
if (iTypeDispel)
|
||||
spellsDispelMagic(oTarget, nCasterLevel, eVis, eImpact);
|
||||
else
|
||||
spellsDispelMagicMod(oTarget, nCasterLevel, eVis, eImpact);
|
||||
}
|
||||
else
|
||||
{
|
||||
//----------------------------------------------------------------------
|
||||
// Area of Effect - Only dispel best effect
|
||||
//----------------------------------------------------------------------
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, PRCGetSpellTargetLocation());
|
||||
oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, lLocal, FALSE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_AREA_OF_EFFECT | OBJECT_TYPE_PLACEABLE);
|
||||
while (GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(GetObjectType(oTarget) == OBJECT_TYPE_AREA_OF_EFFECT)
|
||||
{
|
||||
//--------------------------------------------------------------
|
||||
// Handle Area of Effects
|
||||
//--------------------------------------------------------------
|
||||
if (iTypeDispel)
|
||||
spellsDispelAoE(oTarget, OBJECT_SELF,nCasterLevel);
|
||||
else
|
||||
spellsDispelAoEMod(oTarget, OBJECT_SELF,nCasterLevel);
|
||||
|
||||
}
|
||||
else if (GetObjectType(oTarget) == OBJECT_TYPE_PLACEABLE)
|
||||
{
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId()));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (iTypeDispel)
|
||||
spellsDispelMagic(oTarget, nCasterLevel, eVis, eImpact, FALSE);
|
||||
else
|
||||
spellsDispelMagicMod(oTarget, nCasterLevel, eVis, eImpact, FALSE);
|
||||
}
|
||||
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE,lLocal, FALSE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_AREA_OF_EFFECT | OBJECT_TYPE_PLACEABLE);
|
||||
}
|
||||
}
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the local integer storing the spellschool name
|
||||
}
|
BIN
35expandedspells/nw_s0_hammgods.ncs
Normal file
BIN
35expandedspells/nw_s0_hammgods.ncs
Normal file
Binary file not shown.
130
35expandedspells/nw_s0_hammgods.nss
Normal file
130
35expandedspells/nw_s0_hammgods.nss
Normal file
@ -0,0 +1,130 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Hammer of the Gods
|
||||
//:: [NW_S0_HammGods.nss]
|
||||
//:: Copyright (c) 2000 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Does 1d8 damage to all enemies within the
|
||||
//:: spells 20m radius and dazes them if a
|
||||
//:: Will save is failed.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 12, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 21, 2001
|
||||
//:: Update Pass By: Preston W, On: Aug 1, 2001
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003 for PRC stuff
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_EVOCATION);
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
int CasterLvl = PRCGetCasterLevel(OBJECT_SELF);
|
||||
|
||||
|
||||
|
||||
|
||||
int nCasterLvl = CasterLvl;
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
effect eDam;
|
||||
effect eDaze = EffectDazed();
|
||||
effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_NEGATIVE);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
|
||||
effect eLink = EffectLinkEffects(eMind, eDaze);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DIVINE_STRIKE_HOLY);
|
||||
effect eStrike = EffectVisualEffect(VFX_FNF_STRIKE_HOLY);
|
||||
float fDelay;
|
||||
int nDamageDice = nCasterLvl/2;
|
||||
if(nDamageDice == 0)
|
||||
{
|
||||
nDamageDice = 1;
|
||||
}
|
||||
//Limit caster level
|
||||
if (nDamageDice > 40)
|
||||
{
|
||||
nDamageDice = 40;
|
||||
}
|
||||
int nDamage;
|
||||
int nPenetr = CasterLvl +SPGetPenetr();
|
||||
|
||||
//Apply the holy strike VFX
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eStrike, PRCGetSpellTargetLocation());
|
||||
object oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, PRCGetSpellTargetLocation());
|
||||
while (GetIsObjectValid(oTarget))
|
||||
{
|
||||
//Make faction checks
|
||||
if (spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HAMMER_OF_THE_GODS));
|
||||
//Make SR Check
|
||||
if (!PRCDoResistSpell(OBJECT_SELF, oTarget,nPenetr))
|
||||
{
|
||||
fDelay = PRCGetRandomDelay(0.6, 1.3);
|
||||
//Roll damage
|
||||
nDamage = d8(nDamageDice);
|
||||
//Make metamagic checks
|
||||
if ((nMetaMagic & METAMAGIC_MAXIMIZE))
|
||||
{
|
||||
nDamage = 8 * nDamageDice;
|
||||
}
|
||||
if ((nMetaMagic & METAMAGIC_EMPOWER))
|
||||
{
|
||||
nDamage = FloatToInt( IntToFloat(nDamage) * 1.5 );
|
||||
}
|
||||
//nDamage += ApplySpellBetrayalStrikeDamage(oTarget, OBJECT_SELF, FALSE);
|
||||
int nDC = PRCGetSaveDC(oTarget,OBJECT_SELF);
|
||||
|
||||
//Make a will save for half damage and negation of daze effect
|
||||
if (PRCMySavingThrow(SAVING_THROW_WILL, oTarget, (nDC), SAVING_THROW_TYPE_DIVINE, OBJECT_SELF, 0.5))
|
||||
{
|
||||
nDamage = nDamage / 2;
|
||||
}
|
||||
else if (GetHasMettle(oTarget, SAVING_THROW_WILL)) // Ignores partial effects
|
||||
{
|
||||
nDamage = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Apply daze effect
|
||||
DelayCommand(0.5, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(d6()),TRUE,-1,CasterLvl));
|
||||
}
|
||||
//Set damage effect
|
||||
eDam = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_DIVINE );
|
||||
//Apply the VFX impact and damage effect
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
//Get next target in shape
|
||||
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, PRCGetSpellTargetLocation());
|
||||
}
|
||||
|
||||
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the local integer storing the spellschool name
|
||||
}
|
BIN
35expandedspells/nw_s0_healcirc.ncs
Normal file
BIN
35expandedspells/nw_s0_healcirc.ncs
Normal file
Binary file not shown.
160
35expandedspells/nw_s0_healcirc.nss
Normal file
160
35expandedspells/nw_s0_healcirc.nss
Normal file
@ -0,0 +1,160 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Healing Circle
|
||||
//:: NW_S0_HealCirc
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
// Positive energy spreads out in all directions
|
||||
// from the point of origin, curing 1d8 points of
|
||||
// damage plus 1 point per caster level (maximum +20)
|
||||
// to nearby living allies.
|
||||
//
|
||||
// Like cure spells, healing circle damages undead in
|
||||
// its area rather than curing them.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Noel Borstad
|
||||
//:: Created On: Oct 18,2000
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 20, 2001
|
||||
//:: Update Pass By: Preston W, On: Aug 1, 2001
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003 for PRC stuff
|
||||
|
||||
//::Added code to maximize for Faith Healing and Blast Infidel
|
||||
//::Aaon Graywolf - Jan 7, 2004
|
||||
|
||||
#include "prc_inc_function"
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_CONJURATION);
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
object oTarget;
|
||||
|
||||
int CasterLvl = PRCGetCasterLevel(OBJECT_SELF);
|
||||
|
||||
|
||||
|
||||
|
||||
int nCasterLvl = CasterLvl;
|
||||
int nDamagen, nModify, nHP;
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
effect eKill;
|
||||
effect eHeal;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_SUNSTRIKE);
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_HEALING_M);
|
||||
effect eImpact = EffectVisualEffect(VFX_FNF_LOS_HOLY_20);
|
||||
float fDelay;
|
||||
//Limit caster level
|
||||
if (nCasterLvl > 40)
|
||||
{
|
||||
nCasterLvl = 40;
|
||||
}
|
||||
|
||||
CasterLvl +=SPGetPenetr();
|
||||
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, PRCGetSpellTargetLocation());
|
||||
//Get first target in shape
|
||||
oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, PRCGetSpellTargetLocation());
|
||||
while (GetIsObjectValid(oTarget))
|
||||
{
|
||||
fDelay = PRCGetRandomDelay();
|
||||
//Check if racial type is undead
|
||||
if(MyPRCGetRacialType(oTarget) == RACIAL_TYPE_UNDEAD
|
||||
|| (GetHasFeat(FEAT_TOMB_TAINTED_SOUL, oTarget) && GetAlignmentGoodEvil(oTarget) != ALIGNMENT_GOOD))
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HEALING_CIRCLE));
|
||||
//Make SR check
|
||||
if (!PRCDoResistSpell(OBJECT_SELF, oTarget,CasterLvl, fDelay))
|
||||
{
|
||||
int nDC = PRCGetSaveDC(oTarget,OBJECT_SELF);
|
||||
nModify = d8() + nCasterLvl;
|
||||
//Make metamagic check
|
||||
int iBlastFaith = BlastInfidelOrFaithHeal(OBJECT_SELF, oTarget, DAMAGE_TYPE_POSITIVE, FALSE);
|
||||
if ((nMetaMagic & METAMAGIC_MAXIMIZE) || iBlastFaith)
|
||||
{
|
||||
nModify = 8 + nCasterLvl;
|
||||
}
|
||||
if ((nMetaMagic & METAMAGIC_EMPOWER))
|
||||
{
|
||||
nModify += (nModify/2); //Damage/Healing is +50%
|
||||
}
|
||||
if (GetLevelByClass(CLASS_TYPE_HEALER, OBJECT_SELF))
|
||||
nModify += GetAbilityModifier(ABILITY_CHARISMA, OBJECT_SELF);
|
||||
//Make Fort save
|
||||
if (PRCMySavingThrow(SAVING_THROW_FORT, oTarget, (nDC), SAVING_THROW_TYPE_NONE, OBJECT_SELF, fDelay))
|
||||
{
|
||||
if (GetHasMettle(oTarget, SAVING_THROW_FORT))
|
||||
// This script does nothing if it has Mettle, bail
|
||||
nModify = 0;;
|
||||
nModify /= 2;
|
||||
}
|
||||
//Set damage effect
|
||||
eKill = PRCEffectDamage(oTarget, nModify, DAMAGE_TYPE_POSITIVE);
|
||||
//Apply damage effect and VFX impact
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eKill, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// * May 2003: Heal Neutrals as well
|
||||
if(!GetIsReactionTypeHostile(oTarget) || GetFactionEqual(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HEALING_CIRCLE, FALSE));
|
||||
nHP = d8() + nCasterLvl;
|
||||
//Enter Metamagic conditions
|
||||
int iBlastFaith = BlastInfidelOrFaithHeal(OBJECT_SELF, oTarget, DAMAGE_TYPE_POSITIVE, FALSE);
|
||||
if ((nMetaMagic & METAMAGIC_MAXIMIZE) || iBlastFaith)
|
||||
{
|
||||
nHP = 8 + nCasterLvl;//Damage is at max
|
||||
}
|
||||
if ((nMetaMagic & METAMAGIC_EMPOWER))
|
||||
{
|
||||
nHP = nHP + (nHP/2); //Damage/Healing is +50%
|
||||
}
|
||||
//Set healing effect
|
||||
if (GetLevelByClass(CLASS_TYPE_HEALER, OBJECT_SELF))
|
||||
nHP += GetAbilityModifier(ABILITY_CHARISMA, OBJECT_SELF);
|
||||
eHeal = PRCEffectHeal(nHP, oTarget);
|
||||
//Apply heal effect and VFX impact
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget));
|
||||
}
|
||||
}
|
||||
//Get next target in the shape
|
||||
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, PRCGetSpellTargetLocation());
|
||||
}
|
||||
|
||||
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the local integer storing the spellschool name
|
||||
}
|
BIN
35expandedspells/nw_s0_healharm.ncs
Normal file
BIN
35expandedspells/nw_s0_healharm.ncs
Normal file
Binary file not shown.
194
35expandedspells/nw_s0_healharm.nss
Normal file
194
35expandedspells/nw_s0_healharm.nss
Normal file
@ -0,0 +1,194 @@
|
||||
/*
|
||||
nw_s0_healharm
|
||||
|
||||
Heal/Harm in the one script
|
||||
|
||||
By: Flaming_Sword
|
||||
Created: Jun 14, 2006
|
||||
Modified: Nov 21, 2006
|
||||
|
||||
Consolidation of heal/harm scripts
|
||||
Mass Heal vfx on target looks like heal
|
||||
added greater harm, mass harm
|
||||
*/
|
||||
|
||||
#include "prc_sp_func"
|
||||
#include "prc_inc_sp_tch"
|
||||
#include "prc_inc_function"
|
||||
#include "prc_add_spell_dc"
|
||||
#include "inc_dispel"
|
||||
|
||||
//Implements the spell impact, put code here
|
||||
// if called in many places, return TRUE if
|
||||
// stored charges should be decreased
|
||||
// eg. touch attack hits
|
||||
//
|
||||
// Variables passed may be changed if necessary
|
||||
int DoSpell(object oCaster, object oTarget, int nSpellID)
|
||||
{
|
||||
int bIsHeal = IsHeal(nSpellID); //whether it is a heal or harm spell
|
||||
int bMass = IsMassHealHarm(nSpellID);
|
||||
int nCasterLevel = PRCGetCasterLevel(oCaster);
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int nHealVFX, nHurtVFX, nEnergyType, nDice, iBlastFaith, nHeal;
|
||||
float fRadius;
|
||||
string nSwitch;
|
||||
int nCap = 150 + nCasterLevel;
|
||||
if(bIsHeal)
|
||||
{
|
||||
nHealVFX = VFX_IMP_HEALING_X;
|
||||
nHurtVFX = VFX_IMP_SUNSTRIKE;
|
||||
nEnergyType = DAMAGE_TYPE_POSITIVE;
|
||||
nSwitch = PRC_BIOWARE_HEAL;
|
||||
fRadius = RADIUS_SIZE_COLOSSAL;
|
||||
if(nSpellID == SPELL_MASS_HEAL)
|
||||
{
|
||||
nSwitch = PRC_BIOWARE_MASS_HEAL;
|
||||
nCap = 250 + nCasterLevel;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
nHealVFX = VFX_IMP_HEALING_G;
|
||||
nHurtVFX = 246;
|
||||
nEnergyType = DAMAGE_TYPE_NEGATIVE;
|
||||
nSwitch = PRC_BIOWARE_HARM;
|
||||
fRadius = RADIUS_SIZE_HUGE;
|
||||
}
|
||||
int iHeal;
|
||||
int iAttackRoll = 1;
|
||||
if((nSpellID == SPELL_MASS_HARM) || (nSpellID == SPELL_GREATER_HARM))
|
||||
{
|
||||
nDice = (nCasterLevel > 40) ? 40 : nCasterLevel;
|
||||
nHeal = d12(nDice);
|
||||
if((nMetaMagic & METAMAGIC_MAXIMIZE) || BlastInfidelOrFaithHeal(oCaster, oTarget, nEnergyType, TRUE))
|
||||
nHeal = 12 * nDice; //in case higher level spell slots are available
|
||||
}
|
||||
else
|
||||
{
|
||||
nHeal = 10 * nCasterLevel;
|
||||
}
|
||||
if(nHeal > nCap && !GetPRCSwitch(nSwitch))
|
||||
nHeal = nCap;
|
||||
location lLoc;
|
||||
if(bMass)
|
||||
{
|
||||
lLoc = (nSpellID == SPELL_MASS_HARM) ? GetLocation(oCaster) : PRCGetSpellTargetLocation();
|
||||
oTarget = MyFirstObjectInShape(SHAPE_SPHERE, fRadius, lLoc);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(bIsHeal ? VFX_FNF_LOS_HOLY_30 : VFX_FNF_LOS_EVIL_20), lLoc);
|
||||
}
|
||||
float fDelay = 0.0;
|
||||
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(bMass) fDelay = PRCGetRandomDelay();
|
||||
int iTombTainted = GetHasFeat(FEAT_TOMB_TAINTED_SOUL, oTarget) && GetAlignmentGoodEvil(oTarget) != ALIGNMENT_GOOD;
|
||||
|
||||
iHeal = GetObjectType(oTarget) == OBJECT_TYPE_CREATURE &&
|
||||
((!bIsHeal && (MyPRCGetRacialType(oTarget) == RACIAL_TYPE_UNDEAD || iTombTainted)) ||
|
||||
(bIsHeal && MyPRCGetRacialType(oTarget) != RACIAL_TYPE_UNDEAD && !iTombTainted));
|
||||
if (GetLocalInt(oTarget, "AcererakHealing")) iHeal = TRUE;
|
||||
|
||||
if(iHeal && (spellsIsTarget(oTarget, SPELL_TARGET_ALLALLIES, oCaster) || (GetIsDead(oTarget) && (GetCurrentHitPoints(oTarget) > -10))))
|
||||
{
|
||||
SignalEvent(oTarget, EventSpellCastAt(oCaster, nSpellID, FALSE));
|
||||
|
||||
//Warforged are only healed for half, none if they have Improved Fortification
|
||||
if(GetIsWarforged(oTarget)) nHeal /= 2;
|
||||
if(GetHasFeat(FEAT_IMPROVED_FORTIFICATION, oTarget)) nHeal = 0;
|
||||
|
||||
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, PRCEffectHeal(nHeal, oTarget), oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(nHealVFX), oTarget));
|
||||
// Code for FB to remove damage that would be caused at end of Frenzy
|
||||
SetLocalInt(oTarget, "PC_Damage", 0);
|
||||
}
|
||||
else if((GetObjectType(oTarget) != OBJECT_TYPE_CREATURE && !bIsHeal) ||
|
||||
(GetObjectType(oTarget) == OBJECT_TYPE_CREATURE && !iHeal))
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget) && oTarget != oCaster)
|
||||
{
|
||||
SignalEvent(oTarget, EventSpellCastAt(oCaster, nSpellID));
|
||||
iAttackRoll = PRCDoMeleeTouchAttack(oTarget);
|
||||
if(iAttackRoll)
|
||||
{
|
||||
if (!PRCDoResistSpell(oCaster, oTarget, nCasterLevel + SPGetPenetr()))
|
||||
{
|
||||
int nModify = d4();
|
||||
iBlastFaith = BlastInfidelOrFaithHeal(oCaster, oTarget, nEnergyType, TRUE);
|
||||
if((nMetaMagic & METAMAGIC_MAXIMIZE) || iBlastFaith)
|
||||
{
|
||||
nModify = 1;
|
||||
}
|
||||
if((nSpellID == SPELL_MASS_HARM) || (nSpellID == SPELL_GREATER_HARM))
|
||||
{
|
||||
nHeal = d12(nDice);
|
||||
if((nMetaMagic & METAMAGIC_MAXIMIZE) || iBlastFaith)
|
||||
nHeal = 12 * nDice;
|
||||
}
|
||||
else
|
||||
{
|
||||
nHeal = 10 * nCasterLevel;
|
||||
}
|
||||
if(nHeal > nCap && !GetPRCSwitch(nSwitch))
|
||||
nHeal = nCap;
|
||||
|
||||
if(PRCMySavingThrow(SAVING_THROW_WILL, oTarget, PRCGetSaveDC(oTarget, OBJECT_SELF)))
|
||||
{
|
||||
nHeal /= 2;
|
||||
if (GetHasMettle(oTarget, SAVING_THROW_WILL)) // Ignores partial effects
|
||||
nHeal = 0;
|
||||
}
|
||||
int nHP = GetCurrentHitPoints(oTarget);
|
||||
if (nHeal > nHP - nModify)
|
||||
nHeal = nHP - nModify;
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, PRCEffectDamage(oTarget, nHeal, nEnergyType), oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(nHurtVFX), oTarget));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!bMass) break;
|
||||
oTarget = MyNextObjectInShape(SHAPE_SPHERE, fRadius, lLoc);
|
||||
}
|
||||
//Spell Removal Check
|
||||
SpellRemovalCheck(oCaster, oTarget);
|
||||
return iAttackRoll; //return TRUE if spell charges should be decremented
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
if (DEBUG) DoDebug("nw_s0_healharm running "+IntToString(GetIsPC(OBJECT_SELF)));
|
||||
int nSpellID = PRCGetSpellId();
|
||||
PRCSetSchool(GetSpellSchool(nSpellID));
|
||||
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
if(X2PreSpellCastCode())
|
||||
{
|
||||
object oCaster = OBJECT_SELF;
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nEvent = GetLocalInt(oCaster, PRC_SPELL_EVENT); //use bitwise & to extract flags
|
||||
if(!nEvent) //normal cast
|
||||
{
|
||||
if (DEBUG )DoDebug("nw_s0_healharm running normal casting");
|
||||
if(IsTouchSpell(nSpellID) && GetLocalInt(oCaster, PRC_SPELL_HOLD) && oCaster == oTarget)
|
||||
{ //holding the charge, casting spell on self
|
||||
SetLocalSpellVariables(oCaster, 1); //change 1 to number of charges
|
||||
if (DEBUG) DoDebug("nw_s0_healharm running returning");
|
||||
return;
|
||||
}
|
||||
if (DEBUG) DoDebug("nw_s0_healharm running DoSpell");
|
||||
DoSpell(oCaster, oTarget, nSpellID);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (DEBUG) DoDebug("nw_s0_healharm running else casting");
|
||||
if(nEvent & PRC_SPELL_EVENT_ATTACK)
|
||||
{
|
||||
if(DoSpell(oCaster, oTarget, nSpellID))
|
||||
DecrementSpellCharges(oCaster);
|
||||
}
|
||||
}
|
||||
}
|
||||
PRCSetSchool();
|
||||
}
|
BIN
35expandedspells/nw_s0_horrwilt.ncs
Normal file
BIN
35expandedspells/nw_s0_horrwilt.ncs
Normal file
Binary file not shown.
121
35expandedspells/nw_s0_horrwilt.nss
Normal file
121
35expandedspells/nw_s0_horrwilt.nss
Normal file
@ -0,0 +1,121 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Horrid Wilting
|
||||
//:: NW_S0_HorrWilt
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
All living creatures (not undead or constructs)
|
||||
suffer 1d8 damage per caster level to a maximum
|
||||
of 25d8 damage.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Sept 12 , 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003 for PRC stuff
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_NECROMANCY);
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
object oCaster = OBJECT_SELF;
|
||||
int nCasterLvl = PRCGetCasterLevel(oCaster);
|
||||
|
||||
int CasterLvl = nCasterLvl;
|
||||
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int nDamage;
|
||||
float fDelay;
|
||||
effect eExplode = EffectVisualEffect(VFX_FNF_HORRID_WILTING);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
effect eDam;
|
||||
//Get the spell target location as opposed to the spell target.
|
||||
location lTarget = PRCGetSpellTargetLocation();
|
||||
//Limit Caster level for the purposes of damage
|
||||
if (nCasterLvl > 60)
|
||||
{
|
||||
nCasterLvl = 60;
|
||||
}
|
||||
|
||||
CasterLvl +=SPGetPenetr();
|
||||
|
||||
//Apply the horrid wilting explosion at the location captured above.
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eExplode, lTarget);
|
||||
//Declare the spell shape, size and the location. Capture the first target object in the shape.
|
||||
object oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget);
|
||||
//Cycle through the targets within the spell shape until an invalid object is captured.
|
||||
while (GetIsObjectValid(oTarget))
|
||||
{
|
||||
// GZ: Not much fun if the caster is always killing himself
|
||||
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF) && oTarget != OBJECT_SELF)
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HORRID_WILTING));
|
||||
//Get the distance between the explosion and the target to calculate delay
|
||||
fDelay = PRCGetRandomDelay(1.5, 2.5);
|
||||
if (!PRCDoResistSpell(OBJECT_SELF, oTarget,CasterLvl, fDelay))
|
||||
{
|
||||
if(PRCGetIsAliveCreature(oTarget))
|
||||
{
|
||||
int nDC = PRCGetSaveDC(oTarget,OBJECT_SELF);
|
||||
//Roll damage for each target
|
||||
nDamage = d8(nCasterLvl);
|
||||
//Resolve metamagic
|
||||
if ((nMetaMagic & METAMAGIC_MAXIMIZE))
|
||||
{
|
||||
nDamage = 8 * nCasterLvl;
|
||||
}
|
||||
if ((nMetaMagic & METAMAGIC_EMPOWER))
|
||||
{
|
||||
nDamage = nDamage + nDamage / 2;
|
||||
}
|
||||
if(/*Fort Save*/ PRCMySavingThrow(SAVING_THROW_FORT, oTarget, (nDC), SAVING_THROW_TYPE_NONE, OBJECT_SELF, fDelay))
|
||||
{
|
||||
if (GetHasMettle(oTarget, SAVING_THROW_FORT))
|
||||
// This script does nothing if it has Mettle, bail
|
||||
nDamage = 0;
|
||||
nDamage = nDamage/2;
|
||||
}
|
||||
//nDamage += ApplySpellBetrayalStrikeDamage(oTarget, OBJECT_SELF, FALSE);
|
||||
//Set the damage effect
|
||||
eDam = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_MAGICAL);
|
||||
// Apply effects to the currently selected target.
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
PRCBonusDamage(oTarget);
|
||||
//This visual effect is applied to the target object not the location as above. This visual effect
|
||||
//represents the flame that erupts on the target not on the ground.
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
}
|
||||
//Select the next target within the spell shape.
|
||||
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget);
|
||||
}
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the local integer storing the spellschool name
|
||||
}
|
BIN
35expandedspells/nw_s0_imprinvis.ncs
Normal file
BIN
35expandedspells/nw_s0_imprinvis.ncs
Normal file
Binary file not shown.
90
35expandedspells/nw_s0_imprinvis.nss
Normal file
90
35expandedspells/nw_s0_imprinvis.nss
Normal file
@ -0,0 +1,90 @@
|
||||
/*
|
||||
nw_s0_imprinvis
|
||||
|
||||
Target creature can attack and cast spells while
|
||||
invisible
|
||||
|
||||
By: Preston Watamaniuk
|
||||
Created: Jan 7, 2002
|
||||
Modified: Jun 12, 2006
|
||||
*/
|
||||
|
||||
void ReapplyInvis(object oTarget, effect eInvis, float fDur, int CasterLvl);
|
||||
|
||||
#include "prc_sp_func"
|
||||
|
||||
void ReapplyInvis(object oTarget, effect eInvis, float fDur, int CasterLvl)
|
||||
{
|
||||
if(!PRCGetHasEffect(EFFECT_TYPE_INVISIBILITY, oTarget) && GetHasSpellEffect(SPELL_IMPROVED_INVISIBILITY))
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eInvis, oTarget, fDur,TRUE,-1,CasterLvl);
|
||||
DelayCommand(1.0, ReapplyInvis(oTarget, eInvis, fDur-1.0, CasterLvl));
|
||||
}
|
||||
|
||||
//Implements the spell impact, put code here
|
||||
// if called in many places, return TRUE if
|
||||
// stored charges should be decreased
|
||||
// eg. touch attack hits
|
||||
//
|
||||
// Variables passed may be changed if necessary
|
||||
int DoSpell(object oCaster, object oTarget, int nCasterLevel, int nEvent)
|
||||
{
|
||||
int bBio = GetPRCSwitch(PRC_BIOWARE_INVISIBILITY);
|
||||
float fDur;
|
||||
effect eImpact = EffectVisualEffect(VFX_IMP_HEAD_MIND);
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_INVISIBILITY);
|
||||
effect eInvis = EffectInvisibility(bBio ? INVISIBILITY_TYPE_NORMAL : INVISIBILITY_TYPE_IMPROVED);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
effect eCover = EffectConcealment(25 + (nCasterLevel/10) ); //era 50 diminui para 25 +castrlvl/10
|
||||
effect eLink = EffectLinkEffects(eDur, eCover);
|
||||
eLink = EffectLinkEffects(eLink, eVis);
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_IMPROVED_INVISIBILITY, FALSE));
|
||||
int CasterLvl = nCasterLevel;
|
||||
int nDuration = CasterLvl/4; //alterei aqui para metade da duracao
|
||||
if (GetHasFeat(FEAT_INSIDIOUSMAGIC,OBJECT_SELF) && GetHasFeat(FEAT_SHADOWWEAVE,oTarget))
|
||||
nDuration = nDuration*2;
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
//Enter Metamagic conditions
|
||||
if (CheckMetaMagic(nMetaMagic, METAMAGIC_EXTEND))
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
fDur = bBio ? TurnsToSeconds(nDuration) : RoundsToSeconds(nDuration);
|
||||
//Apply the VFX impact and effects
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oTarget);
|
||||
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, fDur,TRUE,-1,CasterLvl);
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eInvis, oTarget, fDur,TRUE,-1,CasterLvl);
|
||||
DelayCommand(1.0, ReapplyInvis(oTarget, eInvis, fDur, CasterLvl));
|
||||
|
||||
return TRUE; //return TRUE if spell charges should be decremented
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
object oCaster = OBJECT_SELF;
|
||||
int nCasterLevel = PRCGetCasterLevel(oCaster);
|
||||
PRCSetSchool(GetSpellSchool(PRCGetSpellId()));
|
||||
if (!X2PreSpellCastCode()) return;
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nEvent = GetLocalInt(oCaster, PRC_SPELL_EVENT); //use bitwise & to extract flags
|
||||
if(!nEvent) //normal cast
|
||||
{
|
||||
if(GetLocalInt(oCaster, PRC_SPELL_HOLD) && oCaster == oTarget)
|
||||
{ //holding the charge, casting spell on self
|
||||
SetLocalSpellVariables(oCaster, 1); //change 1 to number of charges
|
||||
return;
|
||||
}
|
||||
DoSpell(oCaster, oTarget, nCasterLevel, nEvent);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(nEvent & PRC_SPELL_EVENT_ATTACK)
|
||||
{
|
||||
if(DoSpell(oCaster, oTarget, nCasterLevel, nEvent))
|
||||
DecrementSpellCharges(oCaster);
|
||||
}
|
||||
}
|
||||
PRCSetSchool();
|
||||
}
|
BIN
35expandedspells/nw_s0_incclouda.ncs
Normal file
BIN
35expandedspells/nw_s0_incclouda.ncs
Normal file
Binary file not shown.
81
35expandedspells/nw_s0_incclouda.nss
Normal file
81
35expandedspells/nw_s0_incclouda.nss
Normal file
@ -0,0 +1,81 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Incendiary Cloud
|
||||
//:: NW_S0_IncCloud.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Person within the AoE take 4d6 fire damage
|
||||
per round.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 17, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: March 2003: Removed movement speed penalty
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003 for PRC stuff
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_EVOCATION);
|
||||
|
||||
//Declare major variables
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int nDamage;
|
||||
effect eDam;
|
||||
object oTarget;
|
||||
//Declare and assign personal impact visual effect.
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S);
|
||||
// effect eSpeed = EffectMovementSpeedDecrease(50);
|
||||
effect eVis2 = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink = eVis2; //EffectLinkEffects(eSpeed, eVis2);
|
||||
float fDelay;
|
||||
//Capture the first target object in the shape.
|
||||
oTarget = GetEnteringObject();
|
||||
|
||||
int nPenetr = SPGetPenetrAOE(GetAreaOfEffectCreator());
|
||||
int CasterLvl = PRCGetCasterLevel();
|
||||
|
||||
//Declare the spell shape, size and the location.
|
||||
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator()))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_INCENDIARY_CLOUD));
|
||||
//Make SR check, and appropriate saving throw(s).
|
||||
if(!PRCDoResistSpell(GetAreaOfEffectCreator(), oTarget,nPenetr, fDelay))
|
||||
{
|
||||
fDelay = PRCGetRandomDelay(0.5, 2.0);
|
||||
//Roll damage.
|
||||
nDamage = d6(CasterLvl);
|
||||
//Enter Metamagic conditions
|
||||
if ((nMetaMagic & METAMAGIC_MAXIMIZE))
|
||||
{
|
||||
nDamage = 6 * CasterLvl;//Damage is at max
|
||||
}
|
||||
if ((nMetaMagic & METAMAGIC_EMPOWER))
|
||||
{
|
||||
nDamage = nDamage + (nDamage/2); //Damage/Healing is +50%
|
||||
}
|
||||
//nDamage += ApplySpellBetrayalStrikeDamage(oTarget, OBJECT_SELF, FALSE);
|
||||
//Adjust damage for Reflex Save, Evasion and Improved Evasion
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, PRCGetSaveDC(oTarget, GetAreaOfEffectCreator(), SPELL_INCENDIARY_CLOUD), SAVING_THROW_TYPE_FIRE, GetAreaOfEffectCreator());
|
||||
// Apply effects to the currently selected target.
|
||||
eDam = PRCEffectDamage(oTarget, nDamage, GetLocalInt(OBJECT_SELF, "IC_Damage"));
|
||||
if(nDamage > 0)
|
||||
{
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||
PRCBonusDamage(oTarget);
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
// SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eSpeed, oTarget);
|
||||
}
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the local integer storing the spellschool name
|
||||
}
|
BIN
35expandedspells/nw_s0_inccloudc.ncs
Normal file
BIN
35expandedspells/nw_s0_inccloudc.ncs
Normal file
Binary file not shown.
100
35expandedspells/nw_s0_inccloudc.nss
Normal file
100
35expandedspells/nw_s0_inccloudc.nss
Normal file
@ -0,0 +1,100 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Incendiary Cloud
|
||||
//:: NW_S0_IncCloudC.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Objects within the AoE take 4d6 fire damage
|
||||
per round.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 17, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Updated By: GeorgZ 2003-08-21: Now affects doors and placeables as well
|
||||
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003 for PRC stuff
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_EVOCATION);
|
||||
|
||||
//Declare major variables
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int nDamage;
|
||||
effect eDam;
|
||||
object oTarget;
|
||||
//Declare and assign personal impact visual effect.
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_FLAME_S);
|
||||
float fDelay;
|
||||
//Capture the first target object in the shape.
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// GZ 2003-Oct-15
|
||||
// When the caster is no longer there, all functions calling
|
||||
// GetAreaOfEffectCreator will fail. Its better to remove the barrier then
|
||||
//--------------------------------------------------------------------------
|
||||
object aoeCreator = GetAreaOfEffectCreator();
|
||||
if (!GetIsObjectValid(aoeCreator))
|
||||
{
|
||||
DestroyObject(OBJECT_SELF);
|
||||
return;
|
||||
}
|
||||
|
||||
int CasterLvl = PRCGetCasterLevel(aoeCreator);
|
||||
|
||||
int nPenetr = SPGetPenetrAOE(aoeCreator,CasterLvl);
|
||||
|
||||
int EleDmg = GetLocalInt(OBJECT_SELF, "IC_Damage");
|
||||
|
||||
|
||||
oTarget = GetFirstInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
//Declare the spell shape, size and the location.
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, aoeCreator))
|
||||
{
|
||||
fDelay = PRCGetRandomDelay(0.5, 2.0);
|
||||
//Make SR check, and appropriate saving throw(s).
|
||||
if(!PRCDoResistSpell(aoeCreator, oTarget,nPenetr, fDelay))
|
||||
{
|
||||
SignalEvent(oTarget, EventSpellCastAt(aoeCreator, SPELL_INCENDIARY_CLOUD));
|
||||
//Roll damage.
|
||||
nDamage = d6(CasterLvl);
|
||||
//Enter Metamagic conditions
|
||||
if ((nMetaMagic & METAMAGIC_MAXIMIZE))
|
||||
{
|
||||
nDamage = 6 * CasterLvl;//Damage is at max
|
||||
}
|
||||
if ((nMetaMagic & METAMAGIC_EMPOWER))
|
||||
{
|
||||
nDamage = nDamage + (nDamage/2); //Damage/Healing is +50%
|
||||
}
|
||||
//nDamage += ApplySpellBetrayalStrikeDamage(oTarget, OBJECT_SELF, FALSE);
|
||||
int nDC = PRCGetSaveDC(oTarget,aoeCreator);
|
||||
//Adjust damage for Reflex Save, Evasion and Improved Evasion
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC,SAVING_THROW_TYPE_FIRE, aoeCreator);
|
||||
// Apply effects to the currently selected target.
|
||||
eDam = PRCEffectDamage(oTarget, nDamage, EleDmg);
|
||||
if(nDamage > 0)
|
||||
{
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||
PRCBonusDamage(oTarget);
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
}
|
||||
//Select the next target within the spell shape.
|
||||
oTarget = GetNextInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
}
|
||||
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the local integer storing the spellschool name
|
||||
}
|
BIN
35expandedspells/nw_s0_lghtnbolt.ncs
Normal file
BIN
35expandedspells/nw_s0_lghtnbolt.ncs
Normal file
Binary file not shown.
132
35expandedspells/nw_s0_lghtnbolt.nss
Normal file
132
35expandedspells/nw_s0_lghtnbolt.nss
Normal file
@ -0,0 +1,132 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Lightning Bolt
|
||||
//:: NW_S0_LightnBolt
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Does 1d6 per level in a 5ft tube for 30m
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Noel Borstad
|
||||
//:: Created On: March 8, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Preston Watamaniuk, On: May 2, 2001
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003 for PRC stuff
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_EVOCATION);
|
||||
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
int CasterLvl = PRCGetCasterLevel(OBJECT_SELF);
|
||||
|
||||
|
||||
|
||||
int EleDmg = ChangedElementalDamage(OBJECT_SELF, DAMAGE_TYPE_ELECTRICAL);
|
||||
|
||||
int nCasterLevel = CasterLvl;
|
||||
//Limit caster level
|
||||
if (nCasterLevel > 20) // cap era 10 mudei para 20
|
||||
{
|
||||
nCasterLevel = 20;
|
||||
}
|
||||
int nDamage;
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
//Set the lightning stream to start at the caster's hands
|
||||
effect eLightning = EffectBeam(VFX_BEAM_LIGHTNING, OBJECT_SELF, BODY_NODE_HAND);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_S);
|
||||
effect eDamage;
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
location lTarget = GetLocation(oTarget);
|
||||
object oNextTarget, oTarget2;
|
||||
float fDelay;
|
||||
int nCnt = 1;
|
||||
|
||||
CasterLvl +=SPGetPenetr();
|
||||
|
||||
oTarget2 = GetNearestObject(OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE, OBJECT_SELF, nCnt);
|
||||
while(GetIsObjectValid(oTarget2) && GetDistanceToObject(oTarget2) <= 30.0)
|
||||
{
|
||||
//Get first target in the lightning area by passing in the location of first target and the casters vector (position)
|
||||
oTarget = MyFirstObjectInShape(SHAPE_SPELLCYLINDER, 30.0, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE, GetPosition(OBJECT_SELF));
|
||||
while (GetIsObjectValid(oTarget))
|
||||
{
|
||||
//Exclude the caster from the damage effects
|
||||
if (oTarget != OBJECT_SELF && oTarget2 == oTarget)
|
||||
{
|
||||
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_LIGHTNING_BOLT));
|
||||
//Make an SR check
|
||||
if (!PRCDoResistSpell(OBJECT_SELF, oTarget,CasterLvl))
|
||||
{
|
||||
int nDC = PRCGetSaveDC(oTarget,OBJECT_SELF);
|
||||
//Roll damage
|
||||
nDamage = d6(nCasterLevel);
|
||||
//Enter Metamagic conditions
|
||||
if ((nMetaMagic & METAMAGIC_MAXIMIZE))
|
||||
{
|
||||
nDamage = 6 * nCasterLevel;//Damage is at max
|
||||
}
|
||||
if ((nMetaMagic & METAMAGIC_EMPOWER))
|
||||
{
|
||||
nDamage = nDamage + (nDamage/2); //Damage/Healing is +50%
|
||||
}
|
||||
//nDamage += ApplySpellBetrayalStrikeDamage(oTarget, OBJECT_SELF, FALSE);
|
||||
//Adjust damage based on Reflex Save, Evasion and Improved Evasion
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, nDC,SAVING_THROW_TYPE_ELECTRICITY);
|
||||
//Set damage effect
|
||||
eDamage = PRCEffectDamage(oTarget, nDamage, EleDmg);
|
||||
if(nDamage > 0)
|
||||
{
|
||||
fDelay = PRCGetSpellEffectDelay(GetLocation(oTarget), oTarget);
|
||||
//Apply VFX impcat, damage effect and lightning effect
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT,eDamage,oTarget));
|
||||
PRCBonusDamage(oTarget);
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget));
|
||||
}
|
||||
}
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLightning,oTarget,1.0,FALSE);
|
||||
//Set the currect target as the holder of the lightning effect
|
||||
oNextTarget = oTarget;
|
||||
eLightning = EffectBeam(VFX_BEAM_LIGHTNING, oNextTarget, BODY_NODE_CHEST);
|
||||
}
|
||||
}
|
||||
//Get the next object in the lightning cylinder
|
||||
oTarget = MyNextObjectInShape(SHAPE_SPELLCYLINDER, 30.0, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE, GetPosition(OBJECT_SELF));
|
||||
}
|
||||
nCnt++;
|
||||
oTarget2 = GetNearestObject(OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE, OBJECT_SELF, nCnt);
|
||||
}
|
||||
|
||||
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the local integer storing the spellschool name
|
||||
}
|
||||
|
BIN
35expandedspells/nw_s0_magmiss.ncs
Normal file
BIN
35expandedspells/nw_s0_magmiss.ncs
Normal file
Binary file not shown.
109
35expandedspells/nw_s0_magmiss.nss
Normal file
109
35expandedspells/nw_s0_magmiss.nss
Normal file
@ -0,0 +1,109 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Magic Missile
|
||||
//:: NW_S0_MagMiss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
// A missile of magical energy darts forth from your
|
||||
// fingertip and unerringly strikes its target. The
|
||||
// missile deals 1d4+1 points of damage.
|
||||
//
|
||||
// For every two extra levels of experience past 1st, you
|
||||
// gain an additional missile.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: April 10, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Preston Watamaniuk, On: May 8, 2001
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003 for PRC stuff
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_EVOCATION);
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
return;
|
||||
|
||||
//Declare major variables ( fDist / (3.0f * log( fDist ) + 2.0f) )
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int CasterLvl = PRCGetCasterLevel(OBJECT_SELF);
|
||||
int nCasterLvl = CasterLvl;
|
||||
int nDamage = 0;
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int nCnt;
|
||||
effect eMissile = EffectVisualEffect(VFX_IMP_MIRV);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_MAGBLUE);
|
||||
int nMissiles = (nCasterLvl + 1)/2;
|
||||
float fDist = GetDistanceBetween(OBJECT_SELF, oTarget);
|
||||
float fDelay = fDist/(3.0 * log(fDist) + 2.0);
|
||||
float fDelay2, fTime;
|
||||
|
||||
CasterLvl +=SPGetPenetr();
|
||||
int nClass = GetLevelByClass(CLASS_TYPE_FMM);
|
||||
if (GetIsObjectValid(PRCGetSpellCastItem())) nClass = 0; // The FMM boosts don't apply to wands/scrolls/etc.
|
||||
if (nClass >= 3)
|
||||
CasterLvl += 2;
|
||||
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_MAGIC_MISSILE));
|
||||
//Limit missiles to five
|
||||
if (nMissiles > 20)
|
||||
nMissiles = 20;
|
||||
|
||||
// Force missile mage adds a bonus missile at 1st and 5th levels
|
||||
if (nClass) nMissiles++;
|
||||
if (nClass >= 5) nMissiles++;
|
||||
if (nClass >= 10) nMissiles++;
|
||||
if (nClass >= 15) nMissiles++;
|
||||
if (nClass >= 20) nMissiles++;
|
||||
if (nClass >= 25) nMissiles++;
|
||||
if (nClass >= 30) nMissiles++;
|
||||
if (nClass >= 35) nMissiles++;
|
||||
if (nClass >= 40) nMissiles++;
|
||||
if (nClass >= 45) nMissiles++;
|
||||
if (nClass >= 50) nMissiles++;
|
||||
if (nClass >= 55) nMissiles++;
|
||||
if (nClass >= 60) nMissiles++;
|
||||
//Make SR Check
|
||||
if (!PRCDoResistSpell(OBJECT_SELF, oTarget,CasterLvl, fDelay))
|
||||
{
|
||||
//Apply a single damage hit for each missile instead of as a single mass
|
||||
for (nCnt = 1; nCnt <= nMissiles; nCnt++)
|
||||
{
|
||||
//Roll damage
|
||||
int nDam = d4(nMissiles/4) + 1;
|
||||
//Enter Metamagic conditions
|
||||
if ((nMetaMagic & METAMAGIC_MAXIMIZE))
|
||||
nDam = 4*(nMissiles/4)+1;//Damage is at max
|
||||
if ((nMetaMagic & METAMAGIC_EMPOWER))
|
||||
nDam = nDam + nDam/2; //Damage/Healing is +50%
|
||||
|
||||
fTime = fDelay;
|
||||
fDelay2 += 0.1;
|
||||
fTime += fDelay2;
|
||||
|
||||
//Apply the MIRV and damage effect
|
||||
effect eDam = PRCEffectDamage(oTarget, nDam, DAMAGE_TYPE_MAGICAL);
|
||||
DelayCommand(fTime, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||
DelayCommand(fTime, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oTarget,0.0f,FALSE));
|
||||
DelayCommand(fDelay2, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eMissile, oTarget));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (nCnt = 1; nCnt <= nMissiles; nCnt++)
|
||||
{
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eMissile, oTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the local integer storing the spellschool name
|
||||
}
|
BIN
35expandedspells/nw_s0_metswarm.ncs
Normal file
BIN
35expandedspells/nw_s0_metswarm.ncs
Normal file
Binary file not shown.
112
35expandedspells/nw_s0_metswarm.nss
Normal file
112
35expandedspells/nw_s0_metswarm.nss
Normal file
@ -0,0 +1,112 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Meteor Swarm
|
||||
//:: NW_S0_MetSwarm
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Everyone in a 50ft radius around the caster
|
||||
takes 20d6 fire damage. Those within 6ft of the
|
||||
caster will take no damage.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 24 , 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 22, 2001
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003 for PRC stuff
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_EVOCATION);
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
int CasterLvl = PRCGetCasterLevel(OBJECT_SELF);
|
||||
|
||||
CasterLvl +=SPGetPenetr();
|
||||
|
||||
int EleDmg = ChangedElementalDamage(OBJECT_SELF, DAMAGE_TYPE_FIRE);
|
||||
|
||||
|
||||
//Declare major variables
|
||||
int nMetaMagic;
|
||||
int nDamage;
|
||||
effect eFire;
|
||||
effect eMeteor = EffectVisualEffect(VFX_FNF_METEOR_SWARM);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M);
|
||||
//Apply the meteor swarm VFX area impact
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eMeteor, GetLocation(OBJECT_SELF));
|
||||
//Get first object in the spell area
|
||||
float fDelay;
|
||||
object oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF) && oTarget != OBJECT_SELF)
|
||||
{
|
||||
fDelay = PRCGetRandomDelay();
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_METEOR_SWARM));
|
||||
//Make sure the target is outside the 2m safe zone
|
||||
if (GetDistanceBetween(oTarget, OBJECT_SELF) > 2.0)
|
||||
{
|
||||
//Make SR check
|
||||
if (!PRCDoResistSpell(OBJECT_SELF, oTarget,CasterLvl, 0.5))
|
||||
{
|
||||
int nDC = PRCGetSaveDC(oTarget,OBJECT_SELF);
|
||||
//Roll damage
|
||||
nDamage = d6(CasterLvl); //alterado rafael antes era 20 troquei pelo caster lvl
|
||||
|
||||
//Enter Metamagic conditions
|
||||
if ((nMetaMagic & METAMAGIC_MAXIMIZE))
|
||||
{
|
||||
nDamage = 6 * CasterLvl;//Damage is at max //alterado rafael antes era 20 troquei pelo caster lvl
|
||||
}
|
||||
if ((nMetaMagic & METAMAGIC_EMPOWER))
|
||||
{
|
||||
nDamage = nDamage + (nDamage/2); //Damage/Healing is +50%
|
||||
}
|
||||
//nDamage += ApplySpellBetrayalStrikeDamage(oTarget, OBJECT_SELF, FALSE);
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, (nDC),SAVING_THROW_TYPE_FIRE);
|
||||
//Set the damage effect
|
||||
eFire = PRCEffectDamage(oTarget, nDamage, EleDmg);
|
||||
if(nDamage > 0)
|
||||
{
|
||||
//Apply damage effect and VFX impact.
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eFire, oTarget));
|
||||
PRCBonusDamage(oTarget);
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get next target in the spell area
|
||||
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the local integer storing the spellschool name
|
||||
}
|
||||
|
BIN
35expandedspells/nw_s0_phankill.ncs
Normal file
BIN
35expandedspells/nw_s0_phankill.ncs
Normal file
Binary file not shown.
161
35expandedspells/nw_s0_phankill.nss
Normal file
161
35expandedspells/nw_s0_phankill.nss
Normal file
@ -0,0 +1,161 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Phantasmal Killer
|
||||
//:: NW_S0_PhantKill
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Target of the spell must make 2 saves or die.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Dec 14 , 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 22, 2001
|
||||
//:: Update Pass By: Preston W, On: Aug 3, 2001
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003 for PRC stuff
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
|
||||
|
||||
int PRCMySavingThrow2(int nSavingThrow, object oTarget, int nDC, int nSaveType=SAVING_THROW_TYPE_NONE, object oSaveVersus = OBJECT_SELF, float fDelay = 0.0);
|
||||
|
||||
void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_ILLUSION);
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
int nDamage = d6(7);
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
effect eDam;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DEATH);
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_SONIC);
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_PHANTASMAL_KILLER));
|
||||
//Make an SR check
|
||||
if(!PRCDoResistSpell(OBJECT_SELF, oTarget) && !GetIsImmune(oTarget, IMMUNITY_TYPE_MIND_SPELLS))
|
||||
{
|
||||
//Make a Will save
|
||||
// Feb 17, 2004
|
||||
// !MySavingThrow does not work here, because it does not take into account whether
|
||||
// the creature is immune to the effect. If immune, it still does the fort save, so
|
||||
// the target will still take damage or die. To avoid messing with things too much,
|
||||
// I've made a copy of the function in this script, with an edit to return the proper
|
||||
// value if the spell was resisted.
|
||||
//Make a Will save
|
||||
if (!PRCMySavingThrow2(SAVING_THROW_WILL, oTarget, PRCGetSaveDC(oTarget, OBJECT_SELF), SAVING_THROW_TYPE_MIND_SPELLS))
|
||||
{
|
||||
// Immunity to fear, makes you immune to Phantasmal Killer.
|
||||
if ( GetIsImmune( oTarget, IMMUNITY_TYPE_FEAR ) == FALSE )
|
||||
{
|
||||
//Make a Fort save
|
||||
if (PRCMySavingThrow(SAVING_THROW_FORT, oTarget, PRCGetSaveDC(oTarget, OBJECT_SELF),SAVING_THROW_TYPE_DEATH))
|
||||
{
|
||||
if (GetHasMettle(oTarget, SAVING_THROW_FORT))
|
||||
// This script does nothing if it has Mettle, bail
|
||||
return;
|
||||
//Check for metamagic
|
||||
if ((nMetaMagic & METAMAGIC_MAXIMIZE))
|
||||
{
|
||||
nDamage = 42;
|
||||
}
|
||||
if ((nMetaMagic & METAMAGIC_EMPOWER))
|
||||
{
|
||||
nDamage = FloatToInt( IntToFloat(nDamage) * 1.5 );
|
||||
}
|
||||
//nDamage += ApplySpellBetrayalStrikeDamage(oTarget, OBJECT_SELF);
|
||||
//Set the damage property
|
||||
eDam = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_MAGICAL);
|
||||
//Apply the damage effect and VFX impact
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget);
|
||||
}
|
||||
else
|
||||
{
|
||||
DeathlessFrenzyCheck(oTarget);
|
||||
effect eDeath = EffectDeath();
|
||||
if(!GetPRCSwitch(PRC_165_DEATH_IMMUNITY))
|
||||
eDeath = SupernaturalEffect(eDeath);
|
||||
//Apply the death effect and VFX impact
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oTarget);
|
||||
//SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the integer used to hold the spells spell school
|
||||
}
|
||||
|
||||
int PRCMySavingThrow2(int nSavingThrow, object oTarget, int nDC, int nSaveType=SAVING_THROW_TYPE_NONE, object oSaveVersus = OBJECT_SELF, float fDelay = 0.0)
|
||||
{
|
||||
|
||||
object oCaster = GetLastSpellCaster();
|
||||
int iRW = GetLevelByClass(CLASS_TYPE_RED_WIZARD, oCaster);
|
||||
int iTK = GetLevelByClass(CLASS_TYPE_THAYAN_KNIGHT, oTarget);
|
||||
int iRedWizard = GetLevelByClass(CLASS_TYPE_RED_WIZARD, oTarget);
|
||||
int nSpell = PRCGetSpellId();
|
||||
|
||||
// Handle the target having Force of Will and being targeted by a psionic power
|
||||
if(nSavingThrow != SAVING_THROW_WILL &&
|
||||
nSpell > 14000 && nSpell < 14360 &&
|
||||
GetHasFeat(FEAT_FORCE_OF_WILL, oTarget) &&
|
||||
!GetLocalInt(oTarget, "ForceOfWillUsed") &&
|
||||
// Only use will save if it's better
|
||||
(nSavingThrow == SAVING_THROW_FORT ? GetFortitudeSavingThrow(oTarget) : GetReflexSavingThrow(oTarget)) > GetWillSavingThrow(oTarget)
|
||||
)
|
||||
{
|
||||
nSavingThrow = SAVING_THROW_WILL;
|
||||
SetLocalInt(oTarget, "ForceOfWillUsed", TRUE);
|
||||
DelayCommand(6.0f, DeleteLocalInt(oTarget, "ForceOfWillUsed"));
|
||||
SendMessageToPC(oTarget, "Force Of Will used");
|
||||
}
|
||||
|
||||
if (iRW > 0 && iTK > 0 && nSaveType == SAVING_THROW_TYPE_MIND_SPELLS)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
//racial pack code
|
||||
if(nSaveType == SAVING_THROW_TYPE_FIRE && GetHasFeat(FEAT_HARD_FIRE, oTarget) )
|
||||
{ nDC -= 1+(GetHitDice(oTarget)/5); }
|
||||
else if(nSaveType == SAVING_THROW_TYPE_COLD && GetHasFeat(FEAT_HARD_WATER, oTarget) )
|
||||
{ nDC -= 1+(GetHitDice(oTarget)/5); }
|
||||
else if(nSaveType == SAVING_THROW_TYPE_ELECTRICITY )
|
||||
{
|
||||
if(GetHasFeat(FEAT_HARD_AIR, oTarget))
|
||||
nDC -= 1+(GetHitDice(oTarget)/5);
|
||||
else if(GetHasFeat(FEAT_HARD_ELEC, oTarget))
|
||||
nDC -= 2;
|
||||
}
|
||||
else if(nSaveType == SAVING_THROW_TYPE_POISON && GetHasFeat(FEAT_POISON_3, oTarget) )
|
||||
{ nDC -= 3; }
|
||||
else if(nSaveType == SAVING_THROW_TYPE_ACID && GetHasFeat(FEAT_HARD_EARTH, oTarget) )
|
||||
{ nDC -= 1+(GetHitDice(oTarget)/5); }
|
||||
|
||||
return BWSavingThrow(nSavingThrow, oTarget, nDC, nSaveType, oSaveVersus, fDelay);
|
||||
}
|
BIN
35expandedspells/nw_s0_pwstun.ncs
Normal file
BIN
35expandedspells/nw_s0_pwstun.ncs
Normal file
Binary file not shown.
125
35expandedspells/nw_s0_pwstun.nss
Normal file
125
35expandedspells/nw_s0_pwstun.nss
Normal file
@ -0,0 +1,125 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: [Power Word Stun]
|
||||
//:: [NW_S0_PWStun.nss]
|
||||
//:: Copyright (c) 2000 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
The creature is stunned for a certain number of
|
||||
rounds depending on its HP. No save.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Feb 4, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 22, 2001
|
||||
|
||||
/*
|
||||
bugfix by Kovi 2002.07.28
|
||||
- =151HP stunned for 4d4 rounds
|
||||
- >151HP sometimes stunned for indefinit duration
|
||||
*/
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003 for PRC stuff
|
||||
#include "prc_inc_spells"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_DIVINATION);
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
int CasterLvl = PRCGetCasterLevel(OBJECT_SELF);
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nHP = GetCurrentHitPoints(oTarget);
|
||||
effect eStun = EffectStunned();
|
||||
effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED);
|
||||
effect eLink = EffectLinkEffects(eMind, eStun);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_STUN);
|
||||
effect eWord = EffectVisualEffect(VFX_FNF_PWSTUN);
|
||||
int nDuration;
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int nMeta;
|
||||
//Apply the VFX impact
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eWord, PRCGetSpellTargetLocation());
|
||||
//Determine the number rounds the creature will be stunned
|
||||
if (nHP >= 201)
|
||||
{
|
||||
nDuration = 1;
|
||||
nMeta = 1;
|
||||
}
|
||||
else if (nHP >= 151 && nHP <= 200)
|
||||
{
|
||||
nDuration = d2(1);
|
||||
nMeta = 2;
|
||||
}
|
||||
else if (nHP >= 101 && nHP <= 150)
|
||||
{
|
||||
nDuration = d4(1);
|
||||
nMeta = 4;
|
||||
}
|
||||
else if (nHP >= 51 && nHP <= 100)
|
||||
{
|
||||
nDuration = d4(2);
|
||||
nMeta = 8;
|
||||
}
|
||||
else
|
||||
{
|
||||
nDuration = d4(4);
|
||||
nMeta = 16;
|
||||
}
|
||||
|
||||
//Enter Metamagic conditions
|
||||
if (CheckMetaMagic(nMetaMagic, METAMAGIC_MAXIMIZE))
|
||||
{
|
||||
nDuration = nMeta;//Damage is at max
|
||||
}
|
||||
if (CheckMetaMagic(nMetaMagic, METAMAGIC_EMPOWER))
|
||||
{
|
||||
nDuration = nDuration + (nDuration/2); //Damage/Healing is +50%
|
||||
}
|
||||
if (CheckMetaMagic(nMetaMagic, METAMAGIC_EXTEND))
|
||||
{
|
||||
nDuration = nDuration * 2; //Duration is +100%
|
||||
}
|
||||
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_POWER_WORD_STUN));
|
||||
//Make an SR check
|
||||
if(!PRCDoResistSpell(OBJECT_SELF, oTarget))
|
||||
{
|
||||
if (nDuration>0)
|
||||
{
|
||||
//Apply linked effect and the VFX impact
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration),TRUE,-1,CasterLvl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the integer used to hold the spells spell school
|
||||
}
|
||||
|
BIN
35expandedspells/nw_s0_rayfrost.ncs
Normal file
BIN
35expandedspells/nw_s0_rayfrost.ncs
Normal file
Binary file not shown.
99
35expandedspells/nw_s0_rayfrost.nss
Normal file
99
35expandedspells/nw_s0_rayfrost.nss
Normal file
@ -0,0 +1,99 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Ray of Frost
|
||||
//:: [NW_S0_RayFrost.nss]
|
||||
//:: Copyright (c) 2000 Bioware Corp.
|
||||
//::///////////////////////////////////////////////
|
||||
/*
|
||||
Evocation [Cold]
|
||||
Level: Sor/Wiz 0
|
||||
Components: V, S
|
||||
Casting Time: 1 standard action
|
||||
Range: Close (25 ft. + 5 ft./2 levels)
|
||||
Effect: Ray
|
||||
Duration: Instantaneous
|
||||
Saving Throw: None
|
||||
Spell Resistance: Yes
|
||||
|
||||
A ray of freezing air and ice projects from your
|
||||
pointing finger. You must succeed on a ranged
|
||||
touch attack with the ray to deal damage to a
|
||||
target. The ray deals 1d3 points of cold damage.
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: feb 4, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Bug Fix: Andrew Nobbs, April 17, 2003
|
||||
//:: Notes: Took out ranged attack roll.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: modified by mr_bumpkin Dec 4, 2003 for PRC stuff
|
||||
//:: added hold ray functionality - HackyKid
|
||||
|
||||
#include "prc_inc_sp_tch"
|
||||
#include "prc_sp_func"
|
||||
|
||||
int DoSpell(object oCaster, object oTarget, int nCasterLevel)
|
||||
{
|
||||
//Declare major variables
|
||||
int nPenetr = nCasterLevel + SPGetPenetr();
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int EleDmg = ChangedElementalDamage(oCaster, DAMAGE_TYPE_COLD);
|
||||
int iAttackRoll = 0;//placeholder
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_FROST_S);
|
||||
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_RAY_OF_FROST));
|
||||
|
||||
iAttackRoll = PRCDoRangedTouchAttack(oTarget);
|
||||
if(iAttackRoll > 0)
|
||||
{
|
||||
//Make SR Check
|
||||
if(!PRCDoResistSpell(oCaster, oTarget, nPenetr))
|
||||
{
|
||||
int nDamage = PRCMaximizeOrEmpower(nPenetr, 1, nMetaMagic); //alterei o 3 para nPenetr
|
||||
|
||||
//Apply the VFX impact and damage effect
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
|
||||
// perform ranged touch attack and apply sneak attack if any exists
|
||||
ApplyTouchAttackDamage(oCaster, oTarget, iAttackRoll, nDamage, EleDmg);
|
||||
PRCBonusDamage(oTarget);
|
||||
}
|
||||
}
|
||||
effect eRay = EffectBeam(VFX_BEAM_COLD, oCaster, BODY_NODE_HAND, !iAttackRoll);
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eRay, oTarget, 1.7, FALSE);
|
||||
}
|
||||
return iAttackRoll; //return TRUE if spell charges should be decremented
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
if (!X2PreSpellCastCode()) return;
|
||||
PRCSetSchool(SPELL_SCHOOL_EVOCATION);
|
||||
object oCaster = OBJECT_SELF;
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nCasterLevel = PRCGetCasterLevel(oCaster);
|
||||
int nEvent = GetLocalInt(oCaster, PRC_SPELL_EVENT); //use bitwise & to extract flags
|
||||
if(!nEvent) //normal cast
|
||||
{
|
||||
if (GetLocalInt(oCaster, PRC_SPELL_HOLD) && GetHasFeat(FEAT_EF_HOLD_RAY, oCaster) && oCaster == oTarget)
|
||||
{ //holding the charge, casting spell on self
|
||||
SetLocalSpellVariables(oCaster, 1); //change 1 to number of charges
|
||||
return;
|
||||
}
|
||||
if (oCaster != oTarget) //cant target self with this spell, only when holding charge
|
||||
DoSpell(oCaster, oTarget, nCasterLevel);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(nEvent & PRC_SPELL_EVENT_ATTACK)
|
||||
{
|
||||
if(DoSpell(oCaster, oTarget, nCasterLevel))
|
||||
DecrementSpellCharges(oCaster);
|
||||
}
|
||||
}
|
||||
PRCSetSchool();
|
||||
}
|
BIN
35expandedspells/nw_s0_regen.ncs
Normal file
BIN
35expandedspells/nw_s0_regen.ncs
Normal file
Binary file not shown.
78
35expandedspells/nw_s0_regen.nss
Normal file
78
35expandedspells/nw_s0_regen.nss
Normal file
@ -0,0 +1,78 @@
|
||||
/*
|
||||
nw_s0_regen
|
||||
|
||||
Grants the selected target 6 HP of regeneration
|
||||
every round.
|
||||
|
||||
By: Preston Watamaniuk
|
||||
Created: Oct 22, 2001
|
||||
Modified: Jun 16, 2006
|
||||
*/
|
||||
|
||||
#include "prc_sp_func"
|
||||
|
||||
//Implements the spell impact, put code here
|
||||
// if called in many places, return TRUE if
|
||||
// stored charges should be decreased
|
||||
// eg. touch attack hits
|
||||
//
|
||||
// Variables passed may be changed if necessary
|
||||
int DoSpell(object oCaster, object oTarget, int nCasterLevel, int nEvent)
|
||||
{
|
||||
int nDur = PRCGetCasterLevel(OBJECT_SELF);
|
||||
effect eRegen = EffectRegenerate(6 + (nDur/2), 6.0);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_HEAD_NATURE);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
effect eLink = EffectLinkEffects(eRegen, eDur);
|
||||
int nMeta = PRCGetMetaMagicFeat();
|
||||
|
||||
//Meta-Magic Checks
|
||||
if (nMeta & METAMAGIC_EXTEND)
|
||||
nDur *= 2;
|
||||
|
||||
PRCRemoveEffectsFromSpell(oTarget, SPELL_REGENERATE);
|
||||
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_REGENERATE, FALSE));
|
||||
//Apply effects and VFX
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDur),TRUE,-1,nCasterLevel);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
|
||||
//Regrow fingers
|
||||
if(GetPersistantLocalInt(OBJECT_SELF, "FINGERS_LEFT_HAND"))
|
||||
{
|
||||
SetPersistantLocalInt(OBJECT_SELF, "FINGERS_LEFT_HAND", 6);
|
||||
SetPersistantLocalInt(OBJECT_SELF, "FINGERS_RIGHT_HAND", 6);
|
||||
DeletePersistantLocalInt(OBJECT_SELF, "LEFT_HAND_USELESS");
|
||||
DeletePersistantLocalInt(OBJECT_SELF, "RIGHT_HAND_USELESS");
|
||||
}
|
||||
|
||||
return TRUE; //return TRUE if spell charges should be decremented
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
object oCaster = OBJECT_SELF;
|
||||
int nCasterLevel = PRCGetCasterLevel(oCaster);
|
||||
PRCSetSchool(GetSpellSchool(PRCGetSpellId()));
|
||||
if (!X2PreSpellCastCode()) return;
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nEvent = GetLocalInt(oCaster, PRC_SPELL_EVENT); //use bitwise & to extract flags
|
||||
if(!nEvent) //normal cast
|
||||
{
|
||||
if(GetLocalInt(oCaster, PRC_SPELL_HOLD) && oCaster == oTarget)
|
||||
{ //holding the charge, casting spell on self
|
||||
SetLocalSpellVariables(oCaster, 1); //change 1 to number of charges
|
||||
return;
|
||||
}
|
||||
DoSpell(oCaster, oTarget, nCasterLevel, nEvent);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(nEvent & PRC_SPELL_EVENT_ATTACK)
|
||||
{
|
||||
if(DoSpell(oCaster, oTarget, nCasterLevel, nEvent))
|
||||
DecrementSpellCharges(oCaster);
|
||||
}
|
||||
}
|
||||
PRCSetSchool();
|
||||
}
|
BIN
35expandedspells/nw_s0_sanctuary.ncs
Normal file
BIN
35expandedspells/nw_s0_sanctuary.ncs
Normal file
Binary file not shown.
109
35expandedspells/nw_s0_sanctuary.nss
Normal file
109
35expandedspells/nw_s0_sanctuary.nss
Normal file
@ -0,0 +1,109 @@
|
||||
/*
|
||||
nw_s0_sanctuary
|
||||
|
||||
Makes the target creature invisible to hostile
|
||||
creatures unless they make a Will Save to ignore
|
||||
the Sanctuary Effect
|
||||
|
||||
By: Preston Watamaniuk
|
||||
Created: Jan 7, 2002
|
||||
Modified: Jun 29, 2006
|
||||
|
||||
Flaming_Sword: added greater sanctuary
|
||||
cleaned up
|
||||
*/
|
||||
|
||||
#include "prc_sp_func"
|
||||
#include "prc_inc_teleport"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
//Implements the spell impact, put code here
|
||||
// if called in many places, return TRUE if
|
||||
// stored charges should be decreased
|
||||
// eg. touch attack hits
|
||||
//
|
||||
// Variables passed may be changed if necessary
|
||||
int DoSpell(object oCaster, object oTarget, int nCasterLevel, int nEvent)
|
||||
{
|
||||
int nSpellID = PRCGetSpellId();
|
||||
int bSanc = (nSpellID == SPELL_SANCTUARY);
|
||||
effect eSanc = bSanc ? EffectSanctuary((PRCGetSaveDC(oTarget,oCaster))) : EffectEthereal();
|
||||
effect eLink = EffectLinkEffects(EffectVisualEffect(VFX_DUR_SANCTUARY), eSanc);
|
||||
eLink = EffectLinkEffects(eLink, EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE));
|
||||
float fDuration = bSanc ? RoundsToSeconds(1+(nCasterLevel/10)) : TurnsToSeconds(1+(nCasterLevel/10));
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
if (CheckMetaMagic(nMetaMagic, METAMAGIC_EXTEND))
|
||||
fDuration *= 2; //Duration is +100%
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, nSpellID, FALSE));
|
||||
if(bSanc || GetCanTeleport(oTarget, GetLocation(oTarget), FALSE, TRUE))
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, fDuration,TRUE,-1,nCasterLevel);
|
||||
|
||||
return TRUE; //return TRUE if spell charges should be decremented
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
//teste cooldown
|
||||
//Spell Time Lock duration (in seconds, use float values)
|
||||
float iLockTimer = 240.0;
|
||||
//Defining time variables
|
||||
float f120togo = ( 120 - iLockTimer ) * -1;
|
||||
float f60togo = ( 60 - iLockTimer ) * -1;
|
||||
float f10togo = ( 10 - iLockTimer ) * -1;
|
||||
|
||||
//Checking spell's caster
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
//Checking if he used GS recently
|
||||
int iTimer = GetLocalInt(oTarget, "GSTimer");
|
||||
|
||||
|
||||
|
||||
|
||||
if (iTimer == 0) //teste
|
||||
{
|
||||
SetLocalInt(oTarget, "GSTimer", 1);
|
||||
//Change: Checking target's area
|
||||
object oArea = GetArea(oTarget);
|
||||
|
||||
|
||||
|
||||
object oCaster = OBJECT_SELF;
|
||||
int nCasterLevel = PRCGetCasterLevel(oCaster);
|
||||
PRCSetSchool(GetSpellSchool(PRCGetSpellId()));
|
||||
if (!X2PreSpellCastCode()) return;
|
||||
//object oTarget = PRCGetSpellTargetObject();
|
||||
int nEvent = GetLocalInt(oCaster, PRC_SPELL_EVENT); //use bitwise & to extract flags
|
||||
if(!nEvent) //normal cast
|
||||
{
|
||||
if(GetLocalInt(oCaster, PRC_SPELL_HOLD) && oCaster == oTarget)
|
||||
{ //holding the charge, casting spell on self
|
||||
SetLocalSpellVariables(oCaster, 1); //change 1 to number of charges
|
||||
return;
|
||||
}
|
||||
DoSpell(oCaster, oTarget, nCasterLevel, nEvent);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(nEvent & PRC_SPELL_EVENT_ATTACK)
|
||||
{
|
||||
if(DoSpell(oCaster, oTarget, nCasterLevel, nEvent))
|
||||
DecrementSpellCharges(oCaster);
|
||||
}
|
||||
}
|
||||
PRCSetSchool();
|
||||
|
||||
|
||||
SendMessageToAllDMs("Player "+ObjectToString(oCaster)+" has just cast Greater Sanctuary. He is currently in "+ObjectToString(oArea)+".");
|
||||
SendMessageToPC(oTarget, "Greater Sanctuary has a timer of "+FloatToString(iLockTimer, 3, 1)+" seconds. You may not use GS again for this period of time. Attempting to do so will spend the spell while producing no effect.");
|
||||
DelayCommand(f120togo, SendMessageToPC(oTarget, "You have two minutes left on your Greater Sanctuary Lock Timer."));
|
||||
DelayCommand(f60togo, SendMessageToPC(oTarget, "You have one minute left on your Greater Sanctuary Lock Timer."));
|
||||
DelayCommand(f10togo, SendMessageToPC(oTarget, "You have 10 seconds left on your Greater Sanctuary Lock Timer."));
|
||||
DelayCommand(iLockTimer, SendMessageToPC(oTarget, "Greater Sanctuary is once again available for use."));
|
||||
DelayCommand(iLockTimer, SetLocalInt(oTarget, "GSTimer", 0));
|
||||
}
|
||||
else
|
||||
{
|
||||
SendMessageToPC(oTarget, "You have used Greater Sanctuary too recently, the effect has been cancelled");
|
||||
}
|
||||
|
||||
}
|
BIN
35expandedspells/nw_s0_searlght.ncs
Normal file
BIN
35expandedspells/nw_s0_searlght.ncs
Normal file
Binary file not shown.
139
35expandedspells/nw_s0_searlght.nss
Normal file
139
35expandedspells/nw_s0_searlght.nss
Normal file
@ -0,0 +1,139 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Searing Light
|
||||
//:: s_SearLght.nss
|
||||
//:: Copyright (c) 2000 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Focusing holy power like a ray of the sun, you project
|
||||
//:: a blast of light from your open palm. You must succeed
|
||||
//:: at a ranged touch attack to strike your target. A creature
|
||||
//:: struck by this ray of light suffers 1d8 points of damage
|
||||
//:: per two caster levels (maximum 5d8). Undead creatures suffer
|
||||
//:: 1d6 points of damage per caster level (maximum 10d6), and
|
||||
//:: undead creatures particularly vulnerable to sunlight, such
|
||||
//:: as vampires, suffer 1d8 points of damage per caster level
|
||||
//:: (maximum 10d8). Constructs and inanimate objects suffer only
|
||||
//:: 1d6 points of damage per two caster levels (maximum 5d6).
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Keith Soleski
|
||||
//:: Created On: 02/05/2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: VFX Pass By: Preston W, On: June 25, 2001
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003 for PRC stuff
|
||||
|
||||
//:: Added hold ray functionality - HackyKid
|
||||
|
||||
#include "prc_sp_func"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
//Implements the spell impact, put code here
|
||||
// if called in many places, return TRUE if
|
||||
// stored charges should be decreased
|
||||
// eg. touch attack hits
|
||||
//
|
||||
// Variables passed may be changed if necessary
|
||||
int DoSpell(object oCaster, object oTarget, int nCasterLevel, int nEvent)
|
||||
{
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int nSaveDC = PRCGetSaveDC(oTarget, oCaster);
|
||||
int nPenetr = nCasterLevel + SPGetPenetr();
|
||||
int nDamage;
|
||||
int nMax;
|
||||
effect eDam;
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_SUNSTRIKE);
|
||||
effect eRay = EffectBeam(VFX_BEAM_HOLY, OBJECT_SELF, BODY_NODE_HAND);
|
||||
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_SEARING_LIGHT));
|
||||
eRay = EffectBeam(VFX_BEAM_HOLY, OBJECT_SELF, BODY_NODE_HAND);
|
||||
//Make an SR Check
|
||||
if (!PRCDoResistSpell(oCaster, oTarget, nPenetr))
|
||||
{
|
||||
//Limit caster level
|
||||
if (nCasterLevel > 20)
|
||||
{
|
||||
nCasterLevel = 20;
|
||||
}
|
||||
//Check for racial type undead
|
||||
if (MyPRCGetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
|
||||
{
|
||||
nDamage = d8(nCasterLevel);
|
||||
nMax = 8;
|
||||
}
|
||||
//Check for racial type construct
|
||||
else if (MyPRCGetRacialType(oTarget) == RACIAL_TYPE_CONSTRUCT)
|
||||
{
|
||||
nCasterLevel /= 2;
|
||||
if(nCasterLevel == 0)
|
||||
{
|
||||
nCasterLevel = 1;
|
||||
}
|
||||
nDamage = d6(nCasterLevel);
|
||||
nMax = 6;
|
||||
}
|
||||
else
|
||||
{
|
||||
nCasterLevel = nCasterLevel/2;
|
||||
if(nCasterLevel == 0)
|
||||
{
|
||||
nCasterLevel = 1;
|
||||
}
|
||||
nDamage = d8(nCasterLevel);
|
||||
nMax = 8;
|
||||
}
|
||||
|
||||
//Make metamagic checks
|
||||
if ((nMetaMagic & METAMAGIC_MAXIMIZE))
|
||||
{
|
||||
nDamage = nMax * nCasterLevel;
|
||||
}
|
||||
if ((nMetaMagic & METAMAGIC_EMPOWER))
|
||||
{
|
||||
nDamage = nDamage + (nDamage/2);
|
||||
}
|
||||
|
||||
//nDamage += ApplySpellBetrayalStrikeDamage(oTarget, OBJECT_SELF, FALSE);
|
||||
//Set the damage effect
|
||||
eDam = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_DIVINE);
|
||||
//Apply the damage effect and VFX impact
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
DelayCommand(0.5, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
//SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eRay, oTarget, 1.0);
|
||||
}
|
||||
}
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eRay, oTarget, 1.7,FALSE);
|
||||
|
||||
return !GetIsReactionTypeFriendly(oTarget); //return TRUE if spell charges should be decremented
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
object oCaster = OBJECT_SELF;
|
||||
int nCasterLevel = PRCGetCasterLevel(oCaster);
|
||||
PRCSetSchool(GetSpellSchool(PRCGetSpellId()));
|
||||
if (!X2PreSpellCastCode()) return;
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nEvent = GetLocalInt(oCaster, PRC_SPELL_EVENT); //use bitwise & to extract flags
|
||||
if(!nEvent) //normal cast
|
||||
{
|
||||
if (GetLocalInt(oCaster, PRC_SPELL_HOLD) && GetHasFeat(FEAT_EF_HOLD_RAY, oCaster) && oCaster == oTarget)
|
||||
{ //holding the charge, casting spell on self
|
||||
SetLocalSpellVariables(oCaster, 1); //change 1 to number of charges
|
||||
return;
|
||||
}
|
||||
if (oCaster != oTarget) //cant target self with this spell, only when holding charge
|
||||
DoSpell(oCaster, oTarget, nCasterLevel, nEvent);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(nEvent & PRC_SPELL_EVENT_ATTACK)
|
||||
{
|
||||
if(DoSpell(oCaster, oTarget, nCasterLevel, nEvent))
|
||||
DecrementSpellCharges(oCaster);
|
||||
}
|
||||
}
|
||||
PRCSetSchool();
|
||||
}
|
||||
|
BIN
35expandedspells/nw_s0_shadshld.ncs
Normal file
BIN
35expandedspells/nw_s0_shadshld.ncs
Normal file
Binary file not shown.
81
35expandedspells/nw_s0_shadshld.nss
Normal file
81
35expandedspells/nw_s0_shadshld.nss
Normal file
@ -0,0 +1,81 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Shadow Shield
|
||||
//:: NW_S0_ShadShld.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Grants the caster +5 AC and 10 / +3 Damage
|
||||
Reduction and immunity to death effects
|
||||
and negative energy damage for 3 Turns per level.
|
||||
Makes the caster immune Necromancy Spells
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 22, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003
|
||||
#include "prc_inc_spells"
|
||||
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_ILLUSION);
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int CasterLvl = PRCGetCasterLevel(OBJECT_SELF);
|
||||
int nDuration = CasterLvl;
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
//Do metamagic extend check
|
||||
if (CheckMetaMagic(nMetaMagic, METAMAGIC_EXTEND))
|
||||
{
|
||||
nDuration *= 2; //Duration is +100%
|
||||
}
|
||||
effect eStone = EffectDamageReduction(CasterLvl, DAMAGE_POWER_PLUS_THREE);
|
||||
effect eAC = EffectACIncrease(5, AC_NATURAL_BONUS);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DEATH_WARD);
|
||||
effect eShadow = EffectVisualEffect(VFX_DUR_PROT_SHADOW_ARMOR);
|
||||
effect eSpell = EffectSpellLevelAbsorption(9, 0, SPELL_SCHOOL_NECROMANCY);
|
||||
effect eImmDeath = EffectImmunity(IMMUNITY_TYPE_DEATH);
|
||||
effect eImmNeg = EffectDamageImmunityIncrease(DAMAGE_TYPE_NEGATIVE, 100);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
|
||||
//Link major effects
|
||||
effect eLink = EffectLinkEffects(eStone, eAC);
|
||||
eLink = EffectLinkEffects(eLink, eVis);
|
||||
eLink = EffectLinkEffects(eLink, eShadow);
|
||||
eLink = EffectLinkEffects(eLink, eImmDeath);
|
||||
eLink = EffectLinkEffects(eLink, eImmNeg);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
eLink = EffectLinkEffects(eLink, eSpell);
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_SHADOW_SHIELD, FALSE));
|
||||
//Apply linked effect
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nDuration),TRUE,-1,CasterLvl);
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the integer used to hold the spells spell school
|
||||
}
|
||||
|
BIN
35expandedspells/nw_s0_sleep.ncs
Normal file
BIN
35expandedspells/nw_s0_sleep.ncs
Normal file
Binary file not shown.
172
35expandedspells/nw_s0_sleep.nss
Normal file
172
35expandedspells/nw_s0_sleep.nss
Normal file
@ -0,0 +1,172 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Sleep
|
||||
//:: NW_S0_Sleep
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Goes through the area and sleeps the lowest 4+d4
|
||||
HD of creatures first.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: March 7 , 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Preston Watamaniuk, On: April 11, 2001
|
||||
//:: VFX Pass By: Preston W, On: June 25, 2001
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_ENCHANTMENT);
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
object oTarget;
|
||||
object oLowest;
|
||||
effect eImpact = EffectVisualEffect(VFX_FNF_LOS_NORMAL_20);
|
||||
effect eSleep = EffectSleep();
|
||||
effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_NEGATIVE);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_SLEEP);
|
||||
|
||||
effect eLink = EffectLinkEffects(eSleep, eMind);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
|
||||
// * Moved the linking for the ZZZZs into the later code
|
||||
// * so that they won't appear if creature immune
|
||||
|
||||
int bContinueLoop;
|
||||
int nHD = 1 + d20();
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int nCurrentHD;
|
||||
int bAlreadyAffected;
|
||||
int nMax = 21;// maximun hd creature affected
|
||||
int nLow;
|
||||
int CasterLvl = PRCGetCasterLevel(OBJECT_SELF);
|
||||
|
||||
|
||||
|
||||
int nDuration = CasterLvl;
|
||||
int nScaledDuration;
|
||||
nDuration = 3 + nDuration;
|
||||
int nPenetr = CasterLvl + SPGetPenetr();
|
||||
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, PRCGetSpellTargetLocation());
|
||||
string sSpellLocal = "BIOWARE_SPELL_LOCAL_SLEEP_" + ObjectToString(OBJECT_SELF);
|
||||
//Enter Metamagic conditions
|
||||
if ((nMetaMagic & METAMAGIC_MAXIMIZE))
|
||||
{
|
||||
nHD = 21;//Damage is at max
|
||||
}
|
||||
if ((nMetaMagic & METAMAGIC_EMPOWER))
|
||||
{
|
||||
nHD = nHD + (nHD/2); //Damage/Healing is +50%
|
||||
}
|
||||
if ((nMetaMagic & METAMAGIC_EXTEND))
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
nDuration += 2;
|
||||
//Get the first target in the spell area
|
||||
oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, PRCGetSpellTargetLocation());
|
||||
//If no valid targets exists ignore the loop
|
||||
if (GetIsObjectValid(oTarget))
|
||||
{
|
||||
bContinueLoop = TRUE;
|
||||
}
|
||||
// The above checks to see if there is at least one valid target.
|
||||
while ((nHD > 0) && (bContinueLoop))
|
||||
{
|
||||
nLow = nMax;
|
||||
bContinueLoop = FALSE;
|
||||
//Get the first creature in the spell area
|
||||
oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, PRCGetSpellTargetLocation());
|
||||
while (GetIsObjectValid(oTarget))
|
||||
{
|
||||
//Make faction check to ignore allies
|
||||
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF)
|
||||
&& MyPRCGetRacialType(oTarget) != RACIAL_TYPE_CONSTRUCT
|
||||
&& MyPRCGetRacialType(oTarget) != RACIAL_TYPE_UNDEAD)
|
||||
{
|
||||
//Get the local variable off the target and determined if the spell has already checked them.
|
||||
bAlreadyAffected = GetLocalInt(oTarget, sSpellLocal);
|
||||
if (!bAlreadyAffected)
|
||||
{
|
||||
//Get the current HD of the target creature
|
||||
nCurrentHD = GetHitDice(oTarget);
|
||||
//Check to see if the HD are lower than the current Lowest HD stored and that the
|
||||
//HD of the monster are lower than the number of HD left to use up.
|
||||
if(nCurrentHD < nLow
|
||||
&& nCurrentHD <= nHD
|
||||
&& (nCurrentHD < 2 || GetPRCSwitch(PRC_SLEEP_NO_HD_CAP)))
|
||||
{
|
||||
nLow = nCurrentHD;
|
||||
oLowest = oTarget;
|
||||
bContinueLoop = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get the next target in the shape
|
||||
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, PRCGetSpellTargetLocation());
|
||||
}
|
||||
//Check to see if oLowest returned a valid object
|
||||
if(oLowest != OBJECT_INVALID)
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oLowest, EventSpellCastAt(OBJECT_SELF, SPELL_SLEEP));
|
||||
//Make SR check
|
||||
if (!PRCDoResistSpell(OBJECT_SELF, oLowest,nPenetr))
|
||||
{
|
||||
int nDC = PRCGetSaveDC(oTarget,OBJECT_SELF);
|
||||
//Make Fort save
|
||||
if(!PRCMySavingThrow(SAVING_THROW_WILL, oLowest, (nDC), SAVING_THROW_TYPE_MIND_SPELLS))
|
||||
{
|
||||
//SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oLowest);
|
||||
if (GetIsImmune(oLowest, IMMUNITY_TYPE_SLEEP) == FALSE)
|
||||
{
|
||||
effect eLink2 = EffectLinkEffects(eLink, eVis);
|
||||
nScaledDuration = PRCGetScaledDuration(nDuration, oLowest);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink2, oLowest, RoundsToSeconds(nScaledDuration));
|
||||
}
|
||||
else
|
||||
// * even though I am immune apply just the sleep effect for the immunity message
|
||||
{
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSleep, oLowest, RoundsToSeconds(nDuration),TRUE,-1,CasterLvl);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
//Set a local int to make sure the creature is not used twice in the pass. Destroy that variable in
|
||||
//.3 seconds to remove it from the creature
|
||||
SetLocalInt(oLowest, sSpellLocal, TRUE);
|
||||
DelayCommand(0.5, SetLocalInt(oLowest, sSpellLocal, FALSE));
|
||||
DelayCommand(0.5, DeleteLocalInt(oLowest, sSpellLocal));
|
||||
//Remove the HD of the creature from the total
|
||||
nHD = nHD - GetHitDice(oLowest);
|
||||
oLowest = OBJECT_INVALID;
|
||||
}
|
||||
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the integer used to hold the spells spell school
|
||||
}
|
BIN
35expandedspells/nw_s0_sndburst.ncs
Normal file
BIN
35expandedspells/nw_s0_sndburst.ncs
Normal file
Binary file not shown.
104
35expandedspells/nw_s0_sndburst.nss
Normal file
104
35expandedspells/nw_s0_sndburst.nss
Normal file
@ -0,0 +1,104 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: [Sound Burst]
|
||||
//:: [NW_S0_SndBurst.nss]
|
||||
//:: Copyright (c) 2000 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Evocation [Sonic]
|
||||
Level: Brd 2, Clr 2
|
||||
Components: V, S, F/DF
|
||||
Casting Time: 1 standard action
|
||||
Range: Close (25 ft. + 5 ft./2 levels)
|
||||
Area: 10-ft.-radius spread
|
||||
Duration: Instantaneous
|
||||
Saving Throw: Fortitude partial
|
||||
Spell Resistance: Yes
|
||||
|
||||
You blast an area with a tremendous cacophony.
|
||||
Every creature in the area takes 1d8 points of
|
||||
sonic damage and must succeed on a Fortitude save
|
||||
to avoid being stunned for 1 round.
|
||||
|
||||
Creatures that cannot hear are not stunned but
|
||||
are still damaged.
|
||||
|
||||
Arcane Focus
|
||||
A musical instrument.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 31, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Georg Z, Oct. 2003
|
||||
//:: modified by mr_bumpkin Dec 4, 2003
|
||||
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
void main()
|
||||
{
|
||||
if(!X2PreSpellCastCode()) return;
|
||||
|
||||
PRCSetSchool(SPELL_SCHOOL_EVOCATION);
|
||||
|
||||
//Declare major variables
|
||||
object oCaster = OBJECT_SELF;
|
||||
location lLoc = PRCGetSpellTargetLocation();
|
||||
int nCasterLevel = PRCGetCasterLevel(oCaster);
|
||||
int nPenetr = nCasterLevel + SPGetPenetr();
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int EleDmg = ChangedElementalDamage(oCaster, DAMAGE_TYPE_SONIC);
|
||||
int nSaveType = ChangedSaveType(EleDmg);
|
||||
|
||||
effect eFNF = EffectVisualEffect(VFX_FNF_SOUND_BURST);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_SONIC);
|
||||
|
||||
effect eStun = EffectStunned();
|
||||
effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_NEGATIVE);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink = EffectLinkEffects(eStun, eMind);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
|
||||
//Apply the FNF to the spell location
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eFNF, lLoc);
|
||||
|
||||
//Get the first target in the spell area
|
||||
object oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, lLoc);
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, oCaster))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(oCaster, SPELL_SOUND_BURST));
|
||||
//Make a SR check
|
||||
if(!PRCDoResistSpell(oCaster, oTarget, nPenetr))
|
||||
{
|
||||
// Should not work on creatures already deafened or silenced
|
||||
if(!PRCGetHasEffect(EFFECT_TYPE_DEAF, oTarget) && !PRCGetHasEffect(EFFECT_TYPE_SILENCE, oTarget))
|
||||
{
|
||||
int nDC = PRCGetSaveDC(oTarget, oCaster);
|
||||
//Make a Fortitude roll to avoid being stunned
|
||||
if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, nSaveType))
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(2), TRUE, SPELL_SOUND_BURST, nCasterLevel);
|
||||
}
|
||||
|
||||
//Roll damage
|
||||
int nDamage = d8() +(nPenetr/4) ;
|
||||
//Make meta magic checks
|
||||
if(nMetaMagic & METAMAGIC_MAXIMIZE)
|
||||
nDamage = 8 +(nPenetr/4) ;
|
||||
if(nMetaMagic & METAMAGIC_EMPOWER)
|
||||
nDamage += nDamage / 2;
|
||||
|
||||
//Set the damage effect
|
||||
effect eDam = PRCEffectDamage(oTarget, nDamage, EleDmg);
|
||||
//Apply the VFX impact and damage effect
|
||||
DelayCommand(0.01, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
//Get the next target in the spell area
|
||||
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_MEDIUM, lLoc);
|
||||
}
|
||||
PRCSetSchool();
|
||||
}
|
BIN
35expandedspells/nw_s0_spmantle.ncs
Normal file
BIN
35expandedspells/nw_s0_spmantle.ncs
Normal file
Binary file not shown.
78
35expandedspells/nw_s0_spmantle.nss
Normal file
78
35expandedspells/nw_s0_spmantle.nss
Normal file
@ -0,0 +1,78 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Spell Turning
|
||||
//:: NW_S0_SpTurn.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Absorbes 1d8 + 8 spell levels before disapearing.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 7, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_ABJURATION);
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-23 by GeorgZ
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_SPELLTURNING);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
int CasterLvl = PRCGetCasterLevel(OBJECT_SELF);
|
||||
int nDuration = CasterLvl;
|
||||
int nAbsorb = d8() + 8;
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
|
||||
PRCRemoveEffectsFromSpell(oTarget, GetSpellId());
|
||||
PRCRemoveEffectsFromSpell(oTarget, SPELL_LESSER_SPELL_MANTLE);
|
||||
PRCRemoveEffectsFromSpell(oTarget, SPELL_GREATER_SPELL_MANTLE);
|
||||
|
||||
//Enter Metamagic conditions
|
||||
if (CheckMetaMagic(nMetaMagic, METAMAGIC_MAXIMIZE))
|
||||
{
|
||||
nAbsorb = 16;//Damage is at max
|
||||
}
|
||||
if (CheckMetaMagic(nMetaMagic, METAMAGIC_EMPOWER))
|
||||
{
|
||||
nAbsorb = nAbsorb + (nAbsorb/2); //Damage/Healing is +50%
|
||||
}
|
||||
if (CheckMetaMagic(nMetaMagic, METAMAGIC_EXTEND))
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
//Link Effects
|
||||
effect eAbsob = EffectSpellLevelAbsorption(9, nAbsorb);
|
||||
effect eLink = EffectLinkEffects(eVis, eAbsob);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_SPELL_MANTLE, FALSE));
|
||||
|
||||
//Apply the VFX impact and effects
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration),TRUE,-1,CasterLvl);
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the integer used to hold the spells spell school
|
||||
}
|
||||
|
||||
|
BIN
35expandedspells/nw_s0_stormvenc.ncs
Normal file
BIN
35expandedspells/nw_s0_stormvenc.ncs
Normal file
Binary file not shown.
100
35expandedspells/nw_s0_stormvenc.nss
Normal file
100
35expandedspells/nw_s0_stormvenc.nss
Normal file
@ -0,0 +1,100 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Storm of Vengeance: Heartbeat
|
||||
//:: NW_S0_StormVenC.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Creates an AOE that decimates the enemies of
|
||||
the cleric over a 30ft radius around the caster
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Nov 8, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003
|
||||
//:: Elemental Damage note: Only made the lightning aspect variable, the acid aspect is always acid.
|
||||
//:: the Lightning part seemed like the better of the 2 to go with because it accounts for more
|
||||
//:: of the total damage than the acid does.
|
||||
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_CONJURATION);
|
||||
|
||||
//Declare major variables
|
||||
effect eStun = EffectStunned();
|
||||
effect eVisAcid = EffectVisualEffect(VFX_IMP_ACID_S);
|
||||
effect eVisElec = EffectVisualEffect(VFX_IMP_LIGHTNING_M);
|
||||
effect eVisStun = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink = EffectLinkEffects(eStun, eVisStun);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
float fDelay;
|
||||
|
||||
int CasterLvl = PRCGetCasterLevel(GetAreaOfEffectCreator());
|
||||
int nPenetr = SPGetPenetrAOE(GetAreaOfEffectCreator(),CasterLvl);
|
||||
|
||||
|
||||
|
||||
//Get first target in spell area
|
||||
object oTarget = GetFirstInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE);
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
int nDamage = d6(CasterLvl) + ApplySpellBetrayalStrikeDamage(oTarget, OBJECT_SELF, FALSE);
|
||||
effect eElec = PRCEffectDamage(oTarget, nDamage, ChangedElementalDamage(GetAreaOfEffectCreator(), DAMAGE_TYPE_ELECTRICAL));
|
||||
|
||||
if (spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, GetAreaOfEffectCreator()))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELL_STORM_OF_VENGEANCE));
|
||||
//Make an SR Check
|
||||
fDelay = PRCGetRandomDelay(0.5, 2.0);
|
||||
if(PRCDoResistSpell(GetAreaOfEffectCreator(), oTarget,nPenetr, fDelay) == 0)
|
||||
{
|
||||
int nDC = PRCGetSaveDC(oTarget,GetAreaOfEffectCreator());
|
||||
int nAcid = d6(CasterLvl/2);
|
||||
// Acid Sheath adds +1 damage per die to acid descriptor spells
|
||||
if (GetHasDescriptor(SPELL_STORM_OF_VENGEANCE, DESCRIPTOR_ACID) && GetHasSpellEffect(SPELL_MESTILS_ACID_SHEATH, GetAreaOfEffectCreator()))
|
||||
nAcid += 3;
|
||||
effect eAcid = PRCEffectDamage(oTarget, nAcid, DAMAGE_TYPE_ACID);
|
||||
|
||||
//Make a saving throw check
|
||||
// * if the saving throw is made they still suffer acid damage.
|
||||
// * if they fail the saving throw, they suffer Electrical damage too
|
||||
if(PRCMySavingThrow(SAVING_THROW_REFLEX, oTarget, (nDC), SAVING_THROW_TYPE_ELECTRICITY, GetAreaOfEffectCreator(), fDelay))
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVisAcid, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eAcid, oTarget));
|
||||
if (d2()==1)
|
||||
{
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVisElec, oTarget));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVisAcid, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eAcid, oTarget));
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVisElec, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eElec, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(2)));
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = GetNextInPersistentObject(OBJECT_SELF,OBJECT_TYPE_CREATURE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the integer used to hold the spells spell school
|
||||
}
|
BIN
35expandedspells/nw_s0_sunbeam.ncs
Normal file
BIN
35expandedspells/nw_s0_sunbeam.ncs
Normal file
Binary file not shown.
147
35expandedspells/nw_s0_sunbeam.nss
Normal file
147
35expandedspells/nw_s0_sunbeam.nss
Normal file
@ -0,0 +1,147 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Sunbeam
|
||||
//:: s_Sunbeam.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: All creatures in the beam are struck blind and suffer 4d6 points of damage. (A successful
|
||||
//:: Reflex save negates the blindness and reduces the damage by half.) Creatures to whom sunlight
|
||||
//:: is harmful or unnatural suffer double damage.
|
||||
//::
|
||||
//:: Undead creatures caught within the ray are dealt 1d6 points of damage per caster level
|
||||
//:: (maximum 20d6), or half damage if a Reflex save is successful. In addition, the ray results in
|
||||
//:: the total destruction of undead creatures specifically affected by sunlight if they fail their saves.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Keith Soleski
|
||||
//:: Created On: Feb 22, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Modified By: Keith Soleski, On: March 21, 2001
|
||||
//:: VFX Pass By: Preston W, On: June 25, 2001
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_EVOCATION);
|
||||
/*
|
||||
Spellcast Hook Code
|
||||
Added 2003-06-20 by Georg
|
||||
If you want to make changes to all spells,
|
||||
check x2_inc_spellhook.nss to find out more
|
||||
|
||||
*/
|
||||
|
||||
if (!X2PreSpellCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
// End of Spell Cast Hook
|
||||
|
||||
|
||||
//Declare major variables
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DEATH);
|
||||
effect eVis2 = EffectVisualEffect(VFX_IMP_SUNSTRIKE);
|
||||
effect eStrike = EffectVisualEffect(VFX_FNF_SUNBEAM);
|
||||
effect eDam;
|
||||
effect eBlind = EffectBlindness();
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink = EffectLinkEffects(eBlind, eDur);
|
||||
int CasterLvl = PRCGetCasterLevel(OBJECT_SELF);
|
||||
int nDamage;
|
||||
int nOrgDam;
|
||||
int nMax;
|
||||
float fDelay;
|
||||
int nBlindLength = 3;
|
||||
|
||||
|
||||
int nPenetr = CasterLvl + SPGetPenetr();
|
||||
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eStrike, PRCGetSpellTargetLocation());
|
||||
//Get the first target in the spell area
|
||||
object oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, PRCGetSpellTargetLocation());
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
|
||||
int nCasterLevel= CasterLvl;
|
||||
//Limit caster level
|
||||
if (nCasterLevel > 60)
|
||||
{
|
||||
nCasterLevel = 60;
|
||||
}
|
||||
|
||||
// Make a faction check
|
||||
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF))
|
||||
{
|
||||
fDelay = PRCGetRandomDelay(1.0, 2.0);
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_SUNBEAM));
|
||||
//Make an SR check
|
||||
if ( ! PRCDoResistSpell(OBJECT_SELF, oTarget,nPenetr, 1.0))
|
||||
{
|
||||
//Check if the target is an undead
|
||||
if (MyPRCGetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
|
||||
{
|
||||
//Roll damage and save
|
||||
nDamage = d6(nCasterLevel);
|
||||
nMax = 360;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Roll damage and save
|
||||
nDamage = d6(nCasterLevel/3);
|
||||
nOrgDam = nDamage;
|
||||
nMax = 160;
|
||||
nCasterLevel = 3;
|
||||
//Get the adjusted damage due to Reflex Save, Evasion or Improved Evasion
|
||||
}
|
||||
|
||||
//Do metamagic checks
|
||||
if ((nMetaMagic & METAMAGIC_MAXIMIZE))
|
||||
{
|
||||
nDamage = nMax * nCasterLevel;
|
||||
}
|
||||
if ((nMetaMagic & METAMAGIC_EMPOWER))
|
||||
{
|
||||
nDamage = nDamage + (nDamage/2);
|
||||
}
|
||||
|
||||
//nDamage += ApplySpellBetrayalStrikeDamage(oTarget, OBJECT_SELF, FALSE);
|
||||
int nDC = PRCGetSaveDC(oTarget,OBJECT_SELF);
|
||||
|
||||
//Check that a reflex save was made.
|
||||
if(PRCMySavingThrow(SAVING_THROW_REFLEX, oTarget, (nDC), SAVING_THROW_TYPE_DIVINE, OBJECT_SELF, 1.0) == 0)
|
||||
{
|
||||
DelayCommand(1.0, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nBlindLength),TRUE,-1,CasterLvl));
|
||||
}
|
||||
else
|
||||
{
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, 0, SAVING_THROW_TYPE_DIVINE);
|
||||
}
|
||||
//Set damage effect
|
||||
eDam = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_DIVINE);
|
||||
if(nDamage > 0)
|
||||
{
|
||||
//Apply the damage effect and VFX impact
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis2, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||
PRCBonusDamage(oTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get the next target in the spell area
|
||||
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, PRCGetSpellTargetLocation());
|
||||
}
|
||||
|
||||
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the integer used to hold the spells spell school
|
||||
}
|
BIN
35expandedspells/nw_s0_vamptch.ncs
Normal file
BIN
35expandedspells/nw_s0_vamptch.ncs
Normal file
Binary file not shown.
127
35expandedspells/nw_s0_vamptch.nss
Normal file
127
35expandedspells/nw_s0_vamptch.nss
Normal file
@ -0,0 +1,127 @@
|
||||
/*
|
||||
nw_s0_vamptch
|
||||
|
||||
drain 1d6
|
||||
HP per 2 caster levels from the target.
|
||||
|
||||
By: Preston Watamaniuk
|
||||
Created: Oct 29, 2001
|
||||
Modified: Jun 28, 2006
|
||||
|
||||
Cleaned up
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// GZ: gets rids of temporary hit points so that they will not stack
|
||||
//------------------------------------------------------------------------------
|
||||
void PRCRemoveTempHitPoints()
|
||||
{
|
||||
effect eProtection;
|
||||
int nCnt = 0;
|
||||
|
||||
eProtection = GetFirstEffect(OBJECT_SELF);
|
||||
while (GetIsEffectValid(eProtection))
|
||||
{
|
||||
if(GetEffectType(eProtection) == EFFECT_TYPE_TEMPORARY_HITPOINTS)
|
||||
RemoveEffect(OBJECT_SELF, eProtection);
|
||||
eProtection = GetNextEffect(OBJECT_SELF);
|
||||
}
|
||||
}
|
||||
|
||||
#include "prc_sp_func"
|
||||
#include "prc_inc_sp_tch"
|
||||
|
||||
//Implements the spell impact, put code here
|
||||
// if called in many places, return TRUE if
|
||||
// stored charges should be decreased
|
||||
// eg. touch attack hits
|
||||
//
|
||||
// Variables passed may be changed if necessary
|
||||
int DoSpell(object oCaster, object oTarget, int nCasterLevel, int nEvent)
|
||||
{
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int nDDice = nCasterLevel / 2;
|
||||
if ((nDDice) == 0)
|
||||
nDDice = 1;
|
||||
else if (nDDice > 20)
|
||||
nDDice = 20;
|
||||
|
||||
int nDamage = PRCMaximizeOrEmpower(6,nDDice,nMetaMagic);
|
||||
int nDuration = nCasterLevel/2;
|
||||
|
||||
if ((nMetaMagic & METAMAGIC_EXTEND))
|
||||
nDuration *= 2;
|
||||
|
||||
int nMax = GetCurrentHitPoints(oTarget) + 10;
|
||||
if(nMax < nDamage)
|
||||
nDamage = nMax;
|
||||
|
||||
|
||||
effect eHeal = EffectTemporaryHitpoints(nDamage);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
effect eLink = EffectLinkEffects(eHeal, eDur);
|
||||
|
||||
//effect eDamage = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_NEGATIVE);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
effect eVisHeal = EffectVisualEffect(VFX_IMP_HEALING_M);
|
||||
|
||||
int nPenetr = nCasterLevel + SPGetPenetr();
|
||||
int iAttackRoll;
|
||||
if(GetObjectType(oTarget) == OBJECT_TYPE_CREATURE)
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget) &&
|
||||
MyPRCGetRacialType(oTarget) != RACIAL_TYPE_UNDEAD &&
|
||||
!(GetHasFeat(FEAT_TOMB_TAINTED_SOUL, oTarget) && GetAlignmentGoodEvil(oTarget) != ALIGNMENT_GOOD) &&
|
||||
MyPRCGetRacialType(oTarget) != RACIAL_TYPE_CONSTRUCT &&
|
||||
!GetHasSpellEffect(SPELL_NEGATIVE_ENERGY_PROTECTION, oTarget))
|
||||
{
|
||||
SignalEvent(oCaster, EventSpellCastAt(OBJECT_SELF, SPELL_VAMPIRIC_TOUCH, FALSE));
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_VAMPIRIC_TOUCH, TRUE));
|
||||
|
||||
iAttackRoll = PRCDoMeleeTouchAttack(oTarget);
|
||||
|
||||
if (iAttackRoll > 0)
|
||||
{
|
||||
if(!PRCDoResistSpell(oCaster, oTarget, nPenetr))
|
||||
{
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
ApplyTouchAttackDamage(oCaster, oTarget, iAttackRoll, nDamage, DAMAGE_TYPE_NEGATIVE);
|
||||
PRCBonusDamage(oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVisHeal, oCaster);
|
||||
PRCRemoveTempHitPoints();
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oCaster, HoursToSeconds(nDuration),TRUE,-1,nCasterLevel);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return iAttackRoll; //return TRUE if spell charges should be decremented
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
object oCaster = OBJECT_SELF;
|
||||
int nCasterLevel = PRCGetCasterLevel(oCaster);
|
||||
PRCSetSchool(GetSpellSchool(PRCGetSpellId()));
|
||||
if (!X2PreSpellCastCode()) return;
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nEvent = GetLocalInt(oCaster, PRC_SPELL_EVENT); //use bitwise & to extract flags
|
||||
if(!nEvent) //normal cast
|
||||
{
|
||||
if(GetLocalInt(oCaster, PRC_SPELL_HOLD) && oCaster == oTarget)
|
||||
{ //holding the charge, casting spell on self
|
||||
SetLocalSpellVariables(oCaster, 1); //change 1 to number of charges
|
||||
return;
|
||||
}
|
||||
DoSpell(oCaster, oTarget, nCasterLevel, nEvent);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(nEvent & PRC_SPELL_EVENT_ATTACK)
|
||||
{
|
||||
if(DoSpell(oCaster, oTarget, nCasterLevel, nEvent))
|
||||
DecrementSpellCharges(oCaster);
|
||||
}
|
||||
}
|
||||
PRCSetSchool();
|
||||
}
|
BIN
35expandedspells/nw_s0_virtue.ncs
Normal file
BIN
35expandedspells/nw_s0_virtue.ncs
Normal file
Binary file not shown.
60
35expandedspells/nw_s0_virtue.nss
Normal file
60
35expandedspells/nw_s0_virtue.nss
Normal file
@ -0,0 +1,60 @@
|
||||
/*
|
||||
nw_s0_virtue
|
||||
|
||||
Target gains 1 temporary HP
|
||||
|
||||
By: Preston Watamaniuk
|
||||
Created: Sept 6, 2001
|
||||
Modified: Jun 28, 2006
|
||||
|
||||
Cleaned up
|
||||
*/
|
||||
|
||||
#include "prc_sp_func"
|
||||
|
||||
//Implements the spell impact, put code here
|
||||
// if called in many places, return TRUE if
|
||||
// stored charges should be decreased
|
||||
// eg. touch attack hits
|
||||
//
|
||||
// Variables passed may be changed if necessary
|
||||
int DoSpell(object oCaster, object oTarget, int nCasterLevel, int nEvent)
|
||||
{
|
||||
int nDuration = nCasterLevel;
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_HOLY_AID);
|
||||
effect eLink = EffectLinkEffects(EffectTemporaryHitpoints(nCasterLevel), EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE));
|
||||
if (CheckMetaMagic(nMetaMagic, METAMAGIC_EXTEND)) nDuration *= 2; //Duration is +100%
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_VIRTUE, FALSE));
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nDuration),TRUE,-1,nCasterLevel);
|
||||
return TRUE; //return TRUE if spell charges should be decremented
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
object oCaster = OBJECT_SELF;
|
||||
int nCasterLevel = PRCGetCasterLevel(oCaster);
|
||||
PRCSetSchool(GetSpellSchool(PRCGetSpellId()));
|
||||
if (!X2PreSpellCastCode()) return;
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
int nEvent = GetLocalInt(oCaster, PRC_SPELL_EVENT); //use bitwise & to extract flags
|
||||
if(!nEvent) //normal cast
|
||||
{
|
||||
if(GetLocalInt(oCaster, PRC_SPELL_HOLD) && oCaster == oTarget)
|
||||
{ //holding the charge, casting spell on self
|
||||
SetLocalSpellVariables(oCaster, 1); //change 1 to number of charges
|
||||
return;
|
||||
}
|
||||
DoSpell(oCaster, oTarget, nCasterLevel, nEvent);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(nEvent & PRC_SPELL_EVENT_ATTACK)
|
||||
{
|
||||
if(DoSpell(oCaster, oTarget, nCasterLevel, nEvent))
|
||||
DecrementSpellCharges(oCaster);
|
||||
}
|
||||
}
|
||||
PRCSetSchool();
|
||||
}
|
BIN
35expandedspells/nw_s0_wallfirea.ncs
Normal file
BIN
35expandedspells/nw_s0_wallfirea.ncs
Normal file
Binary file not shown.
71
35expandedspells/nw_s0_wallfirea.nss
Normal file
71
35expandedspells/nw_s0_wallfirea.nss
Normal file
@ -0,0 +1,71 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Wall of Fire: On Enter
|
||||
//:: NW_S0_WallFireA.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Person within the AoE take 4d6 fire damage
|
||||
per round.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 17, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_EVOCATION);
|
||||
|
||||
//Declare major variables
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
int nDamage;
|
||||
effect eDam;
|
||||
object oTarget;
|
||||
//Declare and assign personal impact visual effect.
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M);
|
||||
int nPenetr = SPGetPenetrAOE(GetAreaOfEffectCreator());
|
||||
int CasterLvl = PRCGetCasterLevel(GetAreaOfEffectCreator());
|
||||
//Capture the first target object in the shape.
|
||||
oTarget = GetEnteringObject();
|
||||
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator()))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_WALL_OF_FIRE));
|
||||
//Make SR check, and appropriate saving throw(s).
|
||||
if(!PRCDoResistSpell(GetAreaOfEffectCreator(), oTarget,nPenetr))
|
||||
{
|
||||
//Roll damage.
|
||||
nDamage = d6(4) + (CasterLvl/2);
|
||||
//Enter Metamagic conditions
|
||||
if ((nMetaMagic & METAMAGIC_MAXIMIZE))
|
||||
{
|
||||
nDamage = 24 + (CasterLvl/2);//Damage is at max
|
||||
}
|
||||
if ((nMetaMagic & METAMAGIC_EMPOWER))
|
||||
{
|
||||
nDamage = nDamage + (nDamage/2); //Damage/Healing is +50%
|
||||
}
|
||||
//nDamage += ApplySpellBetrayalStrikeDamage(oTarget, OBJECT_SELF, FALSE);
|
||||
nDamage = PRCGetReflexAdjustedDamage(nDamage, oTarget, (PRCGetSaveDC(oTarget,GetAreaOfEffectCreator())), SAVING_THROW_TYPE_FIRE);
|
||||
if(nDamage > 0)
|
||||
{
|
||||
// Apply effects to the currently selected target.
|
||||
eDam = PRCEffectDamage(oTarget, nDamage, GetLocalInt(OBJECT_SELF, "Wall_Fire_Damage"));
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
|
||||
PRCBonusDamage(oTarget);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the integer used to hold the spells spell school
|
||||
}
|
BIN
35expandedspells/nw_s0_wallfirec.ncs
Normal file
BIN
35expandedspells/nw_s0_wallfirec.ncs
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user