forked from tdauth/dmdf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Import.j
executable file
·277 lines (267 loc) · 17 KB
/
Import.j
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
//! import "Spells/Struct Damage Protector.j"
//! import "Spells/Struct Spell Abatement.j"
//! import "Spells/Struct Spell Absorbation.j"
//! import "Spells/Struct Spell Agility.j"
//! import "Spells/Struct Spell Alpha.j"
//! import "Spells/Struct Spell Ancestor Pact.j"
//! import "Spells/Struct Spell An Eye For An Eye.j"
//! import "Spells/Struct Spell Arcane Hunger.j"
//! import "Spells/Struct Spell Arcane Protection.j"
//! import "Spells/Struct Spell Arcane Ruse.j"
//! import "Spells/Struct Spell Arcane Time.j"
//! import "Spells/Struct Spell Attribute Bonus.j"
//! import "Spells/Struct Spell Aura Of Authority.j"
//! import "Spells/Struct Spell Aura Of Iron Skin.j"
//! import "Spells/Struct Spell Aura Of Redemption.j"
//! import "Spells/Struct Spell Awakening Of The Forest.j"
//! import "Spells/Struct Spell Ban.j"
//! import "Spells/Struct Spell Bear Form.j"
//! import "Spells/Struct Spell Beast Hunter.j"
//! import "Spells/Struct Spell Blaze.j"
//! import "Spells/Struct Spell Blessing.j"
//! import "Spells/Struct Spell Blind.j"
//! import "Spells/Struct Spell Block.j"
//! import "Spells/Struct Spell Burning Arrows.j"
//! import "Spells/Struct Spell Cat Rune.j"
//! import "Spells/Struct Spell Clarity.j"
//! import "Spells/Struct Spell Colossus.j"
//! import "Spells/Struct Spell Concentration.j"
//! import "Spells/Struct Spell Conquest.j"
//! import "Spells/Struct Spell Consume.j"
//! import "Spells/Struct Spell Controlled Time Flow.j"
//! import "Spells/Struct Spell Conversion.j"
//! import "Spells/Struct Spell Cow Nova.j"
//! import "Spells/Struct Spell Crow Form.j"
//! import "Spells/Struct Spell Curb.j"
//! import "Spells/Struct Spell Damnation.j"
//! import "Spells/Struct Spell Damned Ground.j"
//! import "Spells/Struct Spell Dark Servant.j"
//! import "Spells/Struct Spell Dark Spell.j"
//! import "Spells/Struct Spell Daunt.j"
//! import "Spells/Struct Spell Death Herald.j"
//! import "Spells/Struct Spell Defend.j"
//! import "Spells/Struct Spell Demon Servant.j"
//! import "Spells/Struct Spell Dryad Source.j"
//! import "Spells/Struct Spell Eagle Eye.j"
//! import "Spells/Struct Spell Earth Prison.j"
//! import "Spells/Struct Spell Elemental Creatures.j"
//! import "Spells/Struct Spell Elemental Force.j"
//! import "Spells/Struct Spell Elemental Mage Damage Spell.j"
//! import "Spells/Struct Spell Emblaze.j"
//! import "Spells/Struct Spell Epidemic.j"
//! import "Spells/Struct Spell Exorcize Evil.j"
//! import "Spells/Struct Spell Father Heir.j"
//! import "Spells/Struct Spell Feed Back.j"
//! import "Spells/Struct Spell Fette Beute.j"
//! import "Spells/Struct Spell Fire Missile.j"
//! import "Spells/Struct Spell First Man.j"
//! import "Spells/Struct Spell Forest Castle.j"
//! import "Spells/Struct Spell Forest Faeries Spell.j"
//! import "Spells/Struct Spell Forest Wood Fists.j"
//! import "Spells/Struct Spell Freeze.j"
//! import "Spells/Struct Spell Frozen Arrows.j"
//! import "Spells/Struct Spell Furious Bloodthirstiness.j"
//! import "Spells/Struct Spell Gods Favor.j"
//! import "Spells/Struct Spell Grove.j"
//! import "Spells/Struct Spell Hail Of Arrows.j"
//! import "Spells/Struct Spell Herbal Cure.j"
//! import "Spells/Struct Spell Holy Power.j"
//! import "Spells/Struct Spell Holy Will.j"
//! import "Spells/Struct Spell Ice Age.j"
//! import "Spells/Struct Spell Ice Missile.j"
//! import "Spells/Struct Spell Impending Disaster.j"
//! import "Spells/Struct Spell Inferno.j"
//! import "Spells/Struct Spell Jump Attack Dragon Slayer.j"
//! import "Spells/Struct Spell Jump Attack.j"
//! import "Spells/Struct Spell Kennels.j"
//! import "Spells/Struct Spell Leprechaun.j"
//! import "Spells/Struct Spell Lie In Wait.j"
//! import "Spells/Struct Spell Lightning.j"
//! import "Spells/Struct Spell Living Will.j"
//! import "Spells/Struct Spell Maertyrer.j"
//! import "Spells/Struct Spell Magical Shock Waves.j"
//! import "Spells/Struct Spell Mana Explosion.j"
//! import "Spells/Struct Spell Mana Shield.j"
//! import "Spells/Struct Spell Mana Stream.j"
//! import "Spells/Struct Spell Mastery.j"
//! import "Spells/Struct Spell Master Of Necromancy.j"
//! import "Spells/Struct Spell Mercilessness.j"
//! import "Spells/Struct Spell Metamorphosis.j"
//! import "Spells/Struct Spell Multiply.j"
//! import "Spells/Struct Spell Multi Shot.j"
//! import "Spells/Struct Spell Necromancy.j"
//! import "Spells/Struct Spell Nordic Power.j"
//! import "Spells/Struct Spell Parasite.j"
//! import "Spells/Struct Spell Plague.j"
//! import "Spells/Struct Spell Poisoned Arrows.j"
//! import "Spells/Struct Spell Power Of Shrines.j"
//! import "Spells/Struct Spell Prevent Ill.j"
//! import "Spells/Struct Spell Protect.j"
//! import "Spells/Struct Spell Pure Energy.j"
//! import "Spells/Struct Spell Quiver.j"
//! import "Spells/Struct Spell Rage Of Elements.j"
//! import "Spells/Struct Spell Rage.j"
//! import "Spells/Struct Spell Raid.j"
//! import "Spells/Struct Spell Recovery.j"
//! import "Spells/Struct Spell Relief.j"
//! import "Spells/Struct Spell Reserves.j"
//! import "Spells/Struct Spell Resolution.j"
//! import "Spells/Struct Spell Revive Creeps.j"
//! import "Spells/Struct Spell Revive.j"
//! import "Spells/Struct Spell Rigidity.j"
//! import "Spells/Struct Spell Rob.j"
//! import "Spells/Struct Spell Rush.j"
//! import "Spells/Struct Spell Select Destination.j"
//! import "Spells/Struct Spell Selflessness.j"
//! import "Spells/Struct Spell Shooter.j"
//! import "Spells/Struct Spell Shot Into Heart.j"
//! import "Spells/Struct Spell Slash.j"
//! import "Spells/Struct Spell Soul Thievery.j"
//! import "Spells/Struct Spell Sprint.j"
//! import "Spells/Struct Spell Stab.j"
//! import "Spells/Struct Spell Supremacy.j"
//! import "Spells/Struct Spell Taunt.j"
//! import "Spells/Struct Spell Teleportation.j"
//! import "Spells/Struct Spell Tendrils.j"
//! import "Spells/Struct Spell Thrill Of Victory.j"
//! import "Spells/Struct Spell Transfer.j"
//! import "Spells/Struct Spell Trap.j"
//! import "Spells/Struct Spell Treefolk.j"
//! import "Spells/Struct Spell Undermine.j"
//! import "Spells/Struct Spell Weak Point.j"
//! import "Spells/Struct Spell Wrath Of The Forest.j"
//! import "Spells/Struct Spell Witch Song.j"
//! import "Spells/Struct Spell Worlds Portal.j"
//! import "Spells/Struct Spell Zoology.j"
// spells from talras which are global now
//! import "Spells/Struct Spell Amulet Of Foresight.j"
//! import "Spells/Struct Spell Book Crafting Spell.j"
//! import "Spells/Struct Spell Book of Demonology.j"
//! import "Spells/Struct Spell Book of Hunting.j"
//! import "Spells/Struct Spell Book Of Magic.j"
//! import "Spells/Struct Spell Book Of Potions.j"
//! import "Spells/Struct Spell Book Of Smith Craft.j"
//! import "Spells/Struct Spell Neck Stone.j"
//! import "Spells/Struct Spell Ride Horse.j"
//! import "Spells/Struct Spell Ride Sheep.j"
//! import "Spells/Struct Spell Scroll Of Ancestors.j"
//! import "Spells/Struct Spell Scroll Of Collector.j"
//! import "Spells/Struct Spell Scroll Of The Realm Of The Dead.j"
//! import "Spells/Struct Spell Unearth.j"
//! import "Spells/Struct Spell Wings Of Deranors Guard.j"
library Spells requires StructSpellsDamageProtector, StructSpellsSpellAbatement, StructSpellsSpellAbsorbation, StructSpellsSpellAgility, StructSpellsSpellAlpha, StructSpellsSpellAncestorPact, StructSpellsSpellAnEyeForAnEye, StructSpellsSpellArcaneHunger, StructSpellsSpellArcaneProtection, StructSpellsSpellArcaneRuse, StructSpellsSpellArcaneTime, StructSpellsSpellAttributeBonus, StructSpellsSpellBan, StructSpellsSpellAuraOfAuthority, StructSpellsSpellAuraOfIronSkin, StructSpellsSpellAuraOfRedemption, StructSpellsSpellAwakeningOfTheForest, StructSpellsSpellBearForm, StructSpellsSpellBeastHunter, StructSpellsSpellBlaze, StructSpellsSpellBlessing, StructSpellsSpellBlind, StructSpellsSpellBlock, StructSpellsSpellBurningArrows, StructSpellsSpellCatRune, StructSpellsSpellClarity, StructSpellsSpellColossus, StructSpellsSpellConcentration, StructSpellsSpellConquest, StructSpellsSpellConsume, StructSpellsSpellControlledTimeFlow, StructSpellsSpellConversion, StructSpellsSpellCowNova, StructSpellsSpellCrowForm, StructSpellsSpellCurb, StructSpellsSpellDamnation, StructSpellsSpellDamnedGround, StructSpellsSpellDarkServant, StructSpellsSpellDarkSpell, StructSpellsSpellDaunt, StructSpellsSpellDeathHerald, StructSpellsSpellDefend, StructSpellsSpellDemonServant, StructSpellsSpellDryadSource, StructSpellsSpellEagleEye, StructSpellsSpellElementalCreatures, StructSpellsSpellEarthPrison, StructSpellsSpellElementalCreatures, StructSpellsSpellElementalForce, StructSpellsSpellElementalMageDamageSpell, StructSpellsSpellEmblaze, StructSpellsSpellEpidemic, StructSpellsSpellExorcizeEvil, StructSpellsSpellFatherHeir, StructSpellsSpellFeedBack, StructSpellsSpellFetteBeute, StructSpellsSpellFireMissile, StructSpellsSpellFirstMan, StructSpellsSpellForestCastle, StructSpellsSpellForestFaeriesSpell, StructSpellsSpellForestWoodFists, StructSpellsSpellFreeze, StructSpellsSpellFrozenArrows, StructSpellsSpellFuriousBloodthirstiness, StructSpellsSpellGodsFavor, StructSpellsSpellGrove, StructSpellsSpellHailOfArrows, StructSpellsSpellHolyPower, StructSpellsSpellHolyWill, StructSpellsSpellIceAge, StructSpellsSpellIceMissile, StructSpellsSpellImpendingDisaster, StructSpellsSpellInferno, StructSpellsSpellJumpAttackDragonSlayer, StructSpellsSpellJumpAttack, StructSpellsSpellKennels, StructSpellsSpellLeprechaun, StructSpellsSpellLieInWait, StructSpellsSpellLightning, StructSpellsSpellLivingWill, StructSpellsSpellMaertyrer, StructSpellsSpellMagicalShockWaves, StructSpellsSpellManaExplosion, StructSpellsSpellManaShield, StructSpellsSpellManaStream, StructSpellsSpellMastery, StructSpellsSpellMasterOfNecromancy, StructSpellsSpellMercilessness, StructSpellsSpellMetamorphosis, StructSpellsSpellMultiply, StructSpellsSpellMultiShot, StructSpellsSpellNecromancy, StructSpellsSpellNordicPower, StructSpellsSpellParasite, StructSpellsSpellPlague, StructSpellsSpellPoisonedArrows, StructSpellsSpellPowerOfShrines, StructSpellsSpellPreventIll, StructSpellsSpellProtect, StructSpellsSpellPureEnergy, StructSpellsSpellQuiver, StructSpellsSpellRageOfElements, StructSpellsSpellRage, StructSpellsSpellRaid, StructSpellsSpellRecovery, StructSpellsSpellRelief, StructSpellsSpellReserves, StructSpellsSpellResolution, StructSpellsSpellReviveCreeps, StructSpellsSpellRob, StructSpellsSpellRush, StructSpellsSpellRevive, StructSpellsSpellRigidity, StructSpellsSpellSelectDestination, StructSpellsSpellSelflessness, StructSpellsSpellShooter, StructSpellsSpellShotIntoHeart, StructSpellsSpellSlash, StructSpellsSpellSoulThievery, StructSpellsSpellSprint, StructSpellsSpellStab, StructSpellsSpellSupremacy, StructSpellsSpellTaunt, StructSpellsSpellTeleportation, StructSpellsSpellTendrils, StructSpellsSpellThrillOfVictory, StructSpellsSpellTransfer, StructSpellsSpellTrap, StructSpellsSpellTreefolk, StructSpellsSpellUndermine, StructSpellsSpellWeakPoint, StructSpellsSpellWrathOfTheForest, StructSpellsSpellWitchSong, StructSpellsSpellWorldsPortal, StructSpellsSpellZoology, StructSpellsSpellAmuletOfForesight, StructSpellsSpellBookCraftingSpell, StructSpellsSpellBookOfDemonology, StructSpellsSpellBookOfHunting, StructSpellsSpellBookOfMagic, StructSpellsSpellBookOfPotions, StructSpellsSpellBookOfSmithCraft, StructSpellsSpellNeckStone, StructSpellsSpellRideHorse, StructSpellsSpellRideSheep, StructSpellsSpellScrollOfAncestors, StructSpellsSpellScrollOfCollector, StructSpellsSpellScrollOfTheRealmOfTheDead, StructSpellsSpellUnearth, StructSpellsSpellWingsOfDeranorsGuard
/// Init non-character spells!
function initSpells takes nothing returns nothing
// add all ditch spider-like unit type ids and all dich spider-like units here
call SpellUnearth.init()
call SpellUnearth.addUnitTypeId('n01E')
call SpellCatRune.init()
call SpellJumpAttack.init()
call SpellSelectDestination.init()
call SpellQuiver.create()
call SpellFatherHeir.create()
endfunction
/**
* This function is called when the character class is selected and the character is newly created (on repick as well).
* It initializes all spells specifically for \p character.
*/
function initCharacterSpells takes Character character returns nothing
call SpellCowNova.create(character)
call SpellAmuletOfForesight.create(character)
/// \todo Filter class for Baldars ring
// Baldar's and Haldar's rings
if (character.class() == Classes.dragonSlayer()) then
// ride a sheep
call SpellRideSheep.create(character, 'A15R', 'A15S', 'A15T')
// neck stone
call SpellNeckStone.create(character, 'A1AH', 'A1AM', 'A1AT')
// wings of deranors guard
call SpellWingsOfDeranorsGuard.create(character, 'A1EM', 'A1EN', 'A1EV')
elseif (character.class() == Classes.druid()) then
// ride a sheep
call SpellRideSheep.create(character, 'A15R', 'A16Z', 'A176')
// neck stone
call SpellNeckStone.create(character, 'A1AH', 'A1AL', 'A1AS')
// wings of deranors guard
call SpellWingsOfDeranorsGuard.create(character, 'A1EM', 'A1EU', 'A1F2')
elseif (character.class() == Classes.elementalMage()) then
// ride a sheep
call SpellRideSheep.create(character, 'A15R', 'A172', 'A179')
// neck stone
call SpellNeckStone.create(character, 'A1AH', 'A1AP', 'A1AW')
// wings of deranors guard
call SpellWingsOfDeranorsGuard.create(character, 'A1EM', 'A1EQ', 'A1EY')
elseif (character.class() == Classes.cleric()) then
// ride a sheep
call SpellRideSheep.create(character, 'A15R', 'A16X', 'A174')
// neck stone
call SpellNeckStone.create(character, 'A1AH', 'A1AI', 'A1AJ')
// wings of deranors guard
call SpellWingsOfDeranorsGuard.create(character, 'A1EM', 'A1ES', 'A1F0')
elseif (character.class() == Classes.necromancer()) then
// ride a sheep
call SpellRideSheep.create(character, 'A15R', 'A16Y', 'A175')
// neck stone
call SpellNeckStone.create(character, 'A1AH', 'A1AK', 'A1AR')
// wings of deranors guard
call SpellWingsOfDeranorsGuard.create(character, 'A1EM', 'A1ET', 'A1F1')
elseif (character.class() == Classes.knight()) then
// ride a sheep
call SpellRideSheep.create(character, 'A15R', 'A170', 'A177')
// neck stone
call SpellNeckStone.create(character, 'A1AH', 'A1AN', 'A1AU')
// wings of deranors guard
call SpellWingsOfDeranorsGuard.create(character, 'A1EM', 'A1EO', 'A1EW')
elseif (character.class() == Classes.ranger()) then
// ride a sheep
call SpellRideSheep.create(character, 'A15R', 'A171', 'A178')
// neck stone
call SpellNeckStone.create(character, 'A1AH', 'A1AO', 'A1AV')
// wings of deranors guard
call SpellWingsOfDeranorsGuard.create(character, 'A1EM', 'A1EP', 'A1EX')
elseif (character.class() == Classes.wizard()) then
// ride a sheep
call SpellRideSheep.create(character, 'A15R', 'A173', 'A17A')
// neck stone
call SpellNeckStone.create(character, 'A1AH', 'A1AQ', 'A1AX')
// wings of deranors guard
call SpellWingsOfDeranorsGuard.create(character, 'A1EM', 'A1ER', 'A1EZ')
endif
call SpellScrollOfAncestors.create(character)
call SpellScrollOfCollector.create(character)
call SpellScrollOfTheRealmOfTheDead.create(character)
call SpellWitchSong.create(character)
// TODO there might be a problem with initializing the books successfully???
call NewOpLimitSpellInitializer.initCharacterBookSpellsWithNewOpLimit.evaluate(character)
endfunction
struct NewOpLimitSpellInitializer
public static method initCharacterBookSpellsWithNewOpLimit takes Character character returns nothing
call SpellBookOfDemonologySacrificeChild.create(character)
call SpellBookOfDemonologySacrificeAnimal.create(character)
call SpellBookOfDemonologyConjuration.create(character)
call SpellBookOfDemonologyBloodRitual.create(character)
call SpellBookOfDemonologyLordOfDarkness.create(character)
call SpellBookOfHuntingPullFangs.create(character)
call SpellBookOfHuntingPullFurs.create(character)
call SpellBookOfHuntingPullBones.create(character)
call SpellBookOfMagicScrollOfHex.create(character)
call SpellBookOfMagicScrollOfNecromancy.create(character)
call SpellBookOfMagicScrollOfHealing.create(character)
call SpellBookOfMagicScrollOfMana.create(character)
call SpellBookOfMagicScrollOfAncestors.create(character)
call SpellBookOfMagicScrollOfCollector.create(character)
call SpellBookOfMagicScrollOfWay.create(character)
call SpellBookOfPotionsHealPotion.create(character)
call SpellBookOfPotionsManaPotion.create(character)
call SpellBookOfPotionsPoison.create(character)
call SpellBookOfPotionsBigHealPotion.create(character)
call SpellBookOfPotionsBigManaPotion.create(character)
call SpellBookOfSmithCraftIron.create(character)
call SpellBookOfSmithCraftAxe.create(character)
call SpellBookOfSmithCraftShortSword.create(character)
call SpellBookOfSmithCraftLongSword.create(character)
call SpellBookOfSmithIronHelmet.create(character)
call SpellBookOfSmithCraftEinarsSword.create(character) // Quest spell
endmethod
endstruct
endlibrary