Selaa lähdekoodia

Added Initialization to for old save games to keep spells learned from old metaphor.

KeyMasterOfGozer 5 vuotta sitten
vanhempi
säilyke
733e3fec3f
3 muutettua tiedostoa jossa 42 lisäystä ja 1 poistoa
  1. 1 1
      locations/castSpell.qsrc
  2. 2 0
      locations/magik.qsrc
  3. 39 0
      locations/saveupdater.qsrc

+ 1 - 1
locations/castSpell.qsrc

@@ -1,5 +1,5 @@
 # castSpell
-! Used to cast a spell.  Use as a function.  Returns 1 OR 0 for Success or Failure.
+! Used to cast a spell.
 !
 ! ARGS[0] is the spell being cast
 !	Valid Spells are listed below

+ 2 - 0
locations/magik.qsrc

@@ -33,6 +33,8 @@ killvar 'i'
 killvar '$ThisSpellName'
 killvar '$SpellListStr'
 
+act 'Physical attacks':gt'boxing'
+
 
 --- magik ---------------------------------
 

+ 39 - 0
locations/saveupdater.qsrc

@@ -411,5 +411,44 @@ if arrsize('$bodimgsets') = 30:
 	$bodimgsets[39] = 'default_preg'
 end
 
+!! reorganizes old spell variables into new arrrays
+if spell_update ! 1:
+	spell_update = 1
+
+	if spelltuman = 1:spellKnown['fog'] = 1
+	if spellklon = 1:spellKnown['clone'] = 1
+	if spellstun = 1:spellKnown['stun'] = 1
+	if spellweap = 1:spellKnown['weapon'] = 1
+	if spellwind = 1:spellKnown['wind'] = 1
+	if spellklon2 = 1:spellKnown['multiclone'] = 1
+	if spellinit = 1:spellKnown['haste'] = 1
+	if spellhel = 1:spellKnown['heal'] = 1
+	if spellfire0 = 1:spellKnown['scaldingtouch'] = 1
+	if spellfire2 = 1:spellKnown['burninghands'] = 1
+	if spellfire3 = 1:spellKnown['firebarrier'] = 1
+	if spellfire4 = 1:spellKnown['firestorm'] = 1
+	if spellfire5 = 1:spellKnown['flameshield'] = 1
+	if spellele0 = 1:spellKnown['shock'] = 1
+	if spellele2 = 1:spellKnown['lightning'] = 1
+	if spellele3 = 1:spellKnown['electricbarrier'] = 1
+	if spellele4 = 1:spellKnown['1000birds'] = 1
+	if spellele5 = 1:spellKnown['dancingsphere'] = 1
+	if spellert0 = 1:spellKnown['quicksand'] = 1
+	if spellert2 = 1:spellKnown['earthshield'] = 1
+	if spellert3 = 1:spellKnown['abyss'] = 1
+	if spellert4 = 1:spellKnown['earthguardian'] = 1
+	if spellert5 = 1:spellKnown['sando'] = 1
+	if spellwind0 = 1:spellKnown['windgust'] = 1
+	if spellwind2 = 1:spellKnown['pressure'] = 1
+	if spellwind3 = 1:spellKnown['vacuum'] = 1
+	if spellwind4 = 1:spellKnown['vacuumshells'] = 1
+	if spellwind5 = 1:spellKnown['devouringvacuum'] = 1
+	if spellwater0 = 1:spellKnown['leechmana'] = 1
+	if spellwater2 = 1:spellKnown['flood'] = 1
+	if spellwater3 = 1:spellKnown['blister'] = 1
+	if spellwater4 = 1:spellKnown['sharkrockets'] = 1
+	if spellwater5 = 1:spellKnown['greatflood'] = 1
+end
+
 --- saveupdater ---------------------------------