mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2024-11-29 11:49:29 +00:00
removed protected from AbstractFile.name
This commit is contained in:
parent
7f2e963689
commit
5f29cfcd09
@ -15,7 +15,7 @@ public abstract class AbstractFile implements DataSource
|
|||||||
{
|
{
|
||||||
static boolean showDebugText;
|
static boolean showDebugText;
|
||||||
|
|
||||||
protected String name;
|
String name;
|
||||||
public byte[] buffer;
|
public byte[] buffer;
|
||||||
AssemblerProgram assembler;
|
AssemblerProgram assembler;
|
||||||
protected BufferedImage image;
|
protected BufferedImage image;
|
||||||
@ -30,6 +30,13 @@ public abstract class AbstractFile implements DataSource
|
|||||||
this.buffer = buffer;
|
this.buffer = buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------------//
|
||||||
|
public void setName (String name)
|
||||||
|
// ---------------------------------------------------------------------------------//
|
||||||
|
{
|
||||||
|
this.name = name; // Infocom ZObject uses this - but it sucks
|
||||||
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------------//
|
// ---------------------------------------------------------------------------------//
|
||||||
@Override
|
@Override
|
||||||
public String getText () // Override this to get a tailored text representation
|
public String getText () // Override this to get a tailored text representation
|
||||||
|
@ -139,7 +139,7 @@ public class AppleworksWPFile extends AbstractFile
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
System.out.printf ("Unknown value in %s: %02X %02X%n", name, b1, b2);
|
System.out.printf ("Unknown value in %s: %02X %02X%n", getName (), b1, b2);
|
||||||
}
|
}
|
||||||
ptr += 2;
|
ptr += 2;
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ import com.bytezone.diskbrowser.disk.Disk;
|
|||||||
import com.bytezone.diskbrowser.disk.DiskAddress;
|
import com.bytezone.diskbrowser.disk.DiskAddress;
|
||||||
import com.bytezone.diskbrowser.disk.SectorType;
|
import com.bytezone.diskbrowser.disk.SectorType;
|
||||||
import com.bytezone.diskbrowser.gui.DataSource;
|
import com.bytezone.diskbrowser.gui.DataSource;
|
||||||
|
import com.bytezone.diskbrowser.utilities.HexFormatter;
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------------//
|
// -----------------------------------------------------------------------------------//
|
||||||
public class CPMDisk extends AbstractFormattedDisk
|
public class CPMDisk extends AbstractFormattedDisk
|
||||||
@ -228,6 +229,7 @@ public class CPMDisk extends AbstractFormattedDisk
|
|||||||
for (int sector = 0; sector < 8; sector++)
|
for (int sector = 0; sector < 8; sector++)
|
||||||
{
|
{
|
||||||
byte[] buffer = disk.readBlock (3, sector);
|
byte[] buffer = disk.readBlock (3, sector);
|
||||||
|
System.out.println (HexFormatter.format (buffer));
|
||||||
|
|
||||||
// check if entire sector is empty (everything == 0xE5)
|
// check if entire sector is empty (everything == 0xE5)
|
||||||
if (bufferContainsAll (buffer, (byte) EMPTY_BYTE_VALUE))
|
if (bufferContainsAll (buffer, (byte) EMPTY_BYTE_VALUE))
|
||||||
|
@ -556,9 +556,6 @@ public class DiskFactory
|
|||||||
if (disk == null)
|
if (disk == null)
|
||||||
disk = checkPascalDisk (appleDisk512);
|
disk = checkPascalDisk (appleDisk512);
|
||||||
|
|
||||||
if (disk == null)
|
|
||||||
disk = checkCPMDisk (appleDisk256);
|
|
||||||
|
|
||||||
if (disk == null)
|
if (disk == null)
|
||||||
{
|
{
|
||||||
disk2 = checkInfocomDisk (appleDisk256);
|
disk2 = checkInfocomDisk (appleDisk256);
|
||||||
@ -566,6 +563,9 @@ public class DiskFactory
|
|||||||
disk = disk2;
|
disk = disk2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (disk == null)
|
||||||
|
disk = checkCPMDisk (appleDisk256); // checks almost nothing
|
||||||
|
|
||||||
if (disk == null)
|
if (disk == null)
|
||||||
disk = new DataDisk (appleDisk256);
|
disk = new DataDisk (appleDisk256);
|
||||||
|
|
||||||
|
@ -57,7 +57,9 @@ class ZObject extends AbstractFile implements Comparable<ZObject>
|
|||||||
propertyTablePtr = header.getWord (offset + 7);
|
propertyTablePtr = header.getWord (offset + 7);
|
||||||
int ptr = propertyTablePtr;
|
int ptr = propertyTablePtr;
|
||||||
int nameLength = header.getByte (ptr) * 2;
|
int nameLength = header.getByte (ptr) * 2;
|
||||||
this.name = nameLength == 0 ? "<<" + id + ">>" : new ZString (header, ++ptr).value;
|
System.out.printf ("was %s%n", this.getName ());
|
||||||
|
setName (nameLength == 0 ? "<<" + id + ">>" : new ZString (header, ++ptr).value);
|
||||||
|
System.out.printf ("now %s%n", this.getName ());
|
||||||
ptr += nameLength;
|
ptr += nameLength;
|
||||||
|
|
||||||
// read each property
|
// read each property
|
||||||
@ -84,11 +86,11 @@ class ZObject extends AbstractFile implements Comparable<ZObject>
|
|||||||
{
|
{
|
||||||
StringBuilder text = new StringBuilder ();
|
StringBuilder text = new StringBuilder ();
|
||||||
|
|
||||||
text.append (String.format ("ID : %02X (%<3d) %s%n%n", id, name));
|
text.append (String.format ("ID : %02X (%<3d) %s%n%n", id, getName ()));
|
||||||
|
|
||||||
String obj1 = parent == 0 ? "" : header.getObject (parent - 1).name;
|
String obj1 = parent == 0 ? "" : header.getObject (parent - 1).getName ();
|
||||||
String obj2 = sibling == 0 ? "" : header.getObject (sibling - 1).name;
|
String obj2 = sibling == 0 ? "" : header.getObject (sibling - 1).getName ();
|
||||||
String obj3 = child == 0 ? "" : header.getObject (child - 1).name;
|
String obj3 = child == 0 ? "" : header.getObject (child - 1).getName ();
|
||||||
|
|
||||||
text.append (String.format ("Parent : %02X (%<3d) %s%n", parent, obj1));
|
text.append (String.format ("Parent : %02X (%<3d) %s%n", parent, obj1));
|
||||||
text.append (String.format ("Sibling : %02X (%<3d) %s%n", sibling, obj2));
|
text.append (String.format ("Sibling : %02X (%<3d) %s%n", sibling, obj2));
|
||||||
@ -132,7 +134,7 @@ class ZObject extends AbstractFile implements Comparable<ZObject>
|
|||||||
public String toString ()
|
public String toString ()
|
||||||
// ---------------------------------------------------------------------------------//
|
// ---------------------------------------------------------------------------------//
|
||||||
{
|
{
|
||||||
return HexFormatter.getHexString (buffer, startPtr, HEADER_SIZE) + " " + name;
|
return HexFormatter.getHexString (buffer, startPtr, HEADER_SIZE) + " " + getName ();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------------//
|
// ---------------------------------------------------------------------------------//
|
||||||
@ -200,7 +202,7 @@ class ZObject extends AbstractFile implements Comparable<ZObject>
|
|||||||
if (propertyNumber >= 19) // directions
|
if (propertyNumber >= 19) // directions
|
||||||
{
|
{
|
||||||
ZObject object = getObject ();
|
ZObject object = getObject ();
|
||||||
String objectName = object == null ? "no object" : object.name;
|
String objectName = object == null ? "no object" : object.getName ();
|
||||||
|
|
||||||
switch (length)
|
switch (length)
|
||||||
{
|
{
|
||||||
@ -271,8 +273,8 @@ class ZObject extends AbstractFile implements Comparable<ZObject>
|
|||||||
for (int i = 0; i < length; i++)
|
for (int i = 0; i < length; i++)
|
||||||
{
|
{
|
||||||
int objectId = header.getByte (ptr + i + 1);
|
int objectId = header.getByte (ptr + i + 1);
|
||||||
text.append (
|
text.append (String.format ("%s%s", (i == 0 ? "" : ", "),
|
||||||
String.format ("%s%s", (i == 0 ? "" : ", "), getObject (objectId).name));
|
getObject (objectId).getName ()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// else
|
// else
|
||||||
@ -296,6 +298,6 @@ class ZObject extends AbstractFile implements Comparable<ZObject>
|
|||||||
public int compareTo (ZObject o)
|
public int compareTo (ZObject o)
|
||||||
// ---------------------------------------------------------------------------------//
|
// ---------------------------------------------------------------------------------//
|
||||||
{
|
{
|
||||||
return this.name.compareTo (o.name);
|
return this.getName ().compareTo (o.getName ());
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -104,7 +104,7 @@ class Character extends AbstractFile
|
|||||||
item.partyOwns++;
|
item.partyOwns++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
System.out.println (name + " ItemID : " + itemID + " is outside range 0:"
|
System.out.println (getName () + " ItemID : " + itemID + " is outside range 0:"
|
||||||
+ (itemList.size () - 1));
|
+ (itemList.size () - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -121,7 +121,7 @@ class Character extends AbstractFile
|
|||||||
if (index > 0 && index <= spellList.size ())
|
if (index > 0 && index <= spellList.size ())
|
||||||
spellBook.add (spellList.get (index - 1));
|
spellBook.add (spellList.get (index - 1));
|
||||||
else
|
else
|
||||||
System.out.println ("LinkSpell: " + name + " SpellID : " + index
|
System.out.println ("LinkSpell: " + getName () + " SpellID : " + index
|
||||||
+ " is outside range 1:" + spellList.size ());
|
+ " is outside range 1:" + spellList.size ());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -133,7 +133,7 @@ class Character extends AbstractFile
|
|||||||
{
|
{
|
||||||
StringBuilder text = new StringBuilder ();
|
StringBuilder text = new StringBuilder ();
|
||||||
|
|
||||||
text.append ("Character name ..... " + name);
|
text.append ("Character name ..... " + getName ());
|
||||||
text.append ("\n\nRace ............... " + stats.race);
|
text.append ("\n\nRace ............... " + stats.race);
|
||||||
text.append ("\nType ............... " + stats.type);
|
text.append ("\nType ............... " + stats.type);
|
||||||
text.append ("\nAlignment .......... " + stats.alignment);
|
text.append ("\nAlignment .......... " + stats.alignment);
|
||||||
@ -301,7 +301,7 @@ class Character extends AbstractFile
|
|||||||
public String toString ()
|
public String toString ()
|
||||||
// ---------------------------------------------------------------------------------//
|
// ---------------------------------------------------------------------------------//
|
||||||
{
|
{
|
||||||
return name;
|
return getName ();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------------//
|
// ---------------------------------------------------------------------------------//
|
||||||
|
@ -40,7 +40,7 @@ class Item extends AbstractFile implements Comparable<Item>
|
|||||||
{
|
{
|
||||||
StringBuilder text = new StringBuilder ();
|
StringBuilder text = new StringBuilder ();
|
||||||
|
|
||||||
text.append ("Name ......... : " + name);
|
text.append ("Name ......... : " + getName ());
|
||||||
// int length = HexFormatter.intValue (buffer[16]);
|
// int length = HexFormatter.intValue (buffer[16]);
|
||||||
text.append ("\nGeneric name . : " + genericName);
|
text.append ("\nGeneric name . : " + genericName);
|
||||||
text.append ("\nType ......... : " + type);
|
text.append ("\nType ......... : " + type);
|
||||||
@ -112,7 +112,7 @@ class Item extends AbstractFile implements Comparable<Item>
|
|||||||
// ---------------------------------------------------------------------------------//
|
// ---------------------------------------------------------------------------------//
|
||||||
{
|
{
|
||||||
StringBuilder line = new StringBuilder ();
|
StringBuilder line = new StringBuilder ();
|
||||||
line.append (String.format ("%-16s", name));
|
line.append (String.format ("%-16s", getName ()));
|
||||||
if (buffer[36] == -1)
|
if (buffer[36] == -1)
|
||||||
line.append ("(c) ");
|
line.append ("(c) ");
|
||||||
else
|
else
|
||||||
@ -142,7 +142,8 @@ class Item extends AbstractFile implements Comparable<Item>
|
|||||||
public String getDump (int block)
|
public String getDump (int block)
|
||||||
// ---------------------------------------------------------------------------------//
|
// ---------------------------------------------------------------------------------//
|
||||||
{
|
{
|
||||||
StringBuilder line = new StringBuilder (String.format ("%3d %-16s", itemID, name));
|
StringBuilder line =
|
||||||
|
new StringBuilder (String.format ("%3d %-16s", itemID, getName ()));
|
||||||
int lo = block == 0 ? 32 : block == 1 ? 46 : 70;
|
int lo = block == 0 ? 32 : block == 1 ? 46 : 70;
|
||||||
int hi = lo + 24;
|
int hi = lo + 24;
|
||||||
if (hi > buffer.length)
|
if (hi > buffer.length)
|
||||||
|
@ -75,7 +75,8 @@ class MessageDataBlock extends AbstractFile
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
lastMessageNo = firstMessageNo;
|
lastMessageNo = firstMessageNo;
|
||||||
this.name += " - " + lastMessageNo;
|
// this.name += " - " + lastMessageNo;
|
||||||
|
setName (getName () + " - " + lastMessageNo);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------------//
|
// ---------------------------------------------------------------------------------//
|
||||||
|
@ -151,7 +151,7 @@ class Monster extends AbstractFile
|
|||||||
|
|
||||||
text.append ("\n\nPartner ID ...... " + partnerID);
|
text.append ("\n\nPartner ID ...... " + partnerID);
|
||||||
if (partnerOdds > 0)
|
if (partnerOdds > 0)
|
||||||
text.append (" " + monsters.get (partnerID).name);
|
text.append (" " + monsters.get (partnerID).getName ());
|
||||||
text.append ("\nPartner odds .... " + partnerOdds + "%");
|
text.append ("\nPartner odds .... " + partnerOdds + "%");
|
||||||
|
|
||||||
text.append ("\n\nMage level ...... " + mageSpellLevel);
|
text.append ("\n\nMage level ...... " + mageSpellLevel);
|
||||||
|
@ -76,7 +76,7 @@ class Spell extends AbstractFile
|
|||||||
public String getName ()
|
public String getName ()
|
||||||
// ---------------------------------------------------------------------------------//
|
// ---------------------------------------------------------------------------------//
|
||||||
{
|
{
|
||||||
return name;
|
return getName ();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------------//
|
// ---------------------------------------------------------------------------------//
|
||||||
@ -165,7 +165,7 @@ class Spell extends AbstractFile
|
|||||||
text.append (" width=\"100%\">\n");
|
text.append (" width=\"100%\">\n");
|
||||||
|
|
||||||
text.append (" <tr>\n <td width=\"110\">Spell name</td>\n");
|
text.append (" <tr>\n <td width=\"110\">Spell name</td>\n");
|
||||||
text.append (" <td>" + name + "</td>\n </tr>\n");
|
text.append (" <td>" + getName () + "</td>\n </tr>\n");
|
||||||
|
|
||||||
text.append (" <tr>\n <td>Translation</td>\n");
|
text.append (" <tr>\n <td>Translation</td>\n");
|
||||||
text.append (" <td>" + translation + "</td>\n </tr>\n");
|
text.append (" <td>" + translation + "</td>\n </tr>\n");
|
||||||
@ -191,7 +191,7 @@ class Spell extends AbstractFile
|
|||||||
public String toString ()
|
public String toString ()
|
||||||
// ---------------------------------------------------------------------------------//
|
// ---------------------------------------------------------------------------------//
|
||||||
{
|
{
|
||||||
StringBuilder text = new StringBuilder (name);
|
StringBuilder text = new StringBuilder (getName ());
|
||||||
while (text.length () < 14)
|
while (text.length () < 14)
|
||||||
text.append (" ");
|
text.append (" ");
|
||||||
if (spellType == SpellType.PRIEST)
|
if (spellType == SpellType.PRIEST)
|
||||||
@ -211,198 +211,190 @@ class Spell extends AbstractFile
|
|||||||
return text.toString ();
|
return text.toString ();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String[] spellNames =
|
private static String[] spellNames = { "KALKI", "DIOS", "BADIOS", "MILWA", "PORFIC",
|
||||||
{ "KALKI", "DIOS", "BADIOS", "MILWA", "PORFIC", "MATU", "CALFO", "MANIFO",
|
"MATU", "CALFO", "MANIFO", "MONTINO", "LOMILWA", "DIALKO", "LATUMAPIC", "BAMATU",
|
||||||
"MONTINO", "LOMILWA", "DIALKO", "LATUMAPIC", "BAMATU", "DIAL", "BADIAL",
|
"DIAL", "BADIAL", "LATUMOFIS", "MAPORFIC", "DIALMA", "BADIALMA", "LITOKAN", "KANDI",
|
||||||
"LATUMOFIS", "MAPORFIC", "DIALMA", "BADIALMA", "LITOKAN", "KANDI", "DI", "BADI",
|
"DI", "BADI", "LORTO", "MADI", "MABADI", "LOKTOFEIT", "MALIKTO", "KADORTO",
|
||||||
"LORTO", "MADI", "MABADI", "LOKTOFEIT", "MALIKTO", "KADORTO",
|
|
||||||
|
|
||||||
"HALITO", "MOGREF", "KATINO", "DUMAPIC", "DILTO", "SOPIC", "MAHALITO", "MOLITO",
|
"HALITO", "MOGREF", "KATINO", "DUMAPIC", "DILTO", "SOPIC", "MAHALITO", "MOLITO",
|
||||||
"MORLIS", "DALTO", "LAHALITO", "MAMORLIS", "MAKANITO", "MADALTO", "LAKANITO",
|
"MORLIS", "DALTO", "LAHALITO", "MAMORLIS", "MAKANITO", "MADALTO", "LAKANITO",
|
||||||
"ZILWAN", "MASOPIC", "HAMAN", "MALOR", "MAHAMAN", "TILTOWAIT" };
|
"ZILWAN", "MASOPIC", "HAMAN", "MALOR", "MAHAMAN", "TILTOWAIT" };
|
||||||
|
|
||||||
private static String[] translations =
|
private static String[] translations = { "Blessings", "Heal", "Harm", "Light", "Shield",
|
||||||
{ "Blessings", "Heal", "Harm", "Light", "Shield", "Blessing & zeal", "X-ray vision",
|
"Blessing & zeal", "X-ray vision", "Statue", "Still air", "More light",
|
||||||
"Statue", "Still air", "More light", "Softness/supple", "Identification",
|
"Softness/supple", "Identification", "Prayer", "Heal (more)", "Hurt (more)",
|
||||||
"Prayer", "Heal (more)", "Hurt (more)", "Cure poison", "Shield (big)",
|
"Cure poison", "Shield (big)", "Heal (greatly)", "Hurt (greatly)", "Flame tower",
|
||||||
"Heal (greatly)", "Hurt (greatly)", "Flame tower", "Location", "Life", "Death",
|
"Location", "Life", "Death", "Blades", "Healing", "Harm (incredibly)", "Recall",
|
||||||
"Blades", "Healing", "Harm (incredibly)", "Recall", "The Word of Death",
|
"The Word of Death", "Resurrection",
|
||||||
"Resurrection",
|
|
||||||
|
|
||||||
"Little Fire", "Body Iron", "Bad Air", "Clarity", "Darkness", "Glass", "Big fire",
|
"Little Fire", "Body Iron", "Bad Air", "Clarity", "Darkness", "Glass", "Big fire",
|
||||||
"Spark storm", "Fear", "Blizzard blast", "Flame storm", "Terror", "Deadly air",
|
"Spark storm", "Fear", "Blizzard blast", "Flame storm", "Terror", "Deadly air",
|
||||||
"Frost", "Suffocation", "Dispell", "Big glass", "Change", "Apport",
|
"Frost", "Suffocation", "Dispell", "Big glass", "Change", "Apport", "Great change",
|
||||||
"Great change", "(untranslatable)" };
|
"(untranslatable)" };
|
||||||
|
|
||||||
private static SpellThrown[] when =
|
private static SpellThrown[] when = { SpellThrown.COMBAT, SpellThrown.ANY_TIME,
|
||||||
{ SpellThrown.COMBAT, SpellThrown.ANY_TIME, SpellThrown.COMBAT,
|
SpellThrown.COMBAT, SpellThrown.ANY_TIME, SpellThrown.COMBAT, SpellThrown.COMBAT,
|
||||||
SpellThrown.ANY_TIME, SpellThrown.COMBAT, SpellThrown.COMBAT, SpellThrown.LOOTING,
|
SpellThrown.LOOTING, SpellThrown.COMBAT, SpellThrown.COMBAT, SpellThrown.ANY_TIME,
|
||||||
SpellThrown.COMBAT, SpellThrown.COMBAT, SpellThrown.ANY_TIME,
|
SpellThrown.ANY_TIME, SpellThrown.COMBAT, SpellThrown.COMBAT, SpellThrown.ANY_TIME,
|
||||||
SpellThrown.ANY_TIME, SpellThrown.COMBAT, SpellThrown.COMBAT,
|
SpellThrown.COMBAT, SpellThrown.ANY_TIME, SpellThrown.ANY_TIME,
|
||||||
SpellThrown.ANY_TIME, SpellThrown.COMBAT, SpellThrown.ANY_TIME,
|
SpellThrown.ANY_TIME, SpellThrown.COMBAT, SpellThrown.COMBAT, SpellThrown.CAMP,
|
||||||
SpellThrown.ANY_TIME, SpellThrown.ANY_TIME, SpellThrown.COMBAT,
|
SpellThrown.CAMP, SpellThrown.COMBAT, SpellThrown.COMBAT, SpellThrown.ANY_TIME,
|
||||||
SpellThrown.COMBAT, SpellThrown.CAMP, SpellThrown.CAMP, SpellThrown.COMBAT,
|
SpellThrown.COMBAT, SpellThrown.COMBAT, SpellThrown.COMBAT, SpellThrown.ANY_TIME,
|
||||||
SpellThrown.COMBAT, SpellThrown.ANY_TIME, SpellThrown.COMBAT, SpellThrown.COMBAT,
|
|
||||||
SpellThrown.COMBAT, SpellThrown.ANY_TIME,
|
|
||||||
|
|
||||||
SpellThrown.COMBAT, SpellThrown.COMBAT, SpellThrown.COMBAT, SpellThrown.CAMP,
|
SpellThrown.COMBAT, SpellThrown.COMBAT, SpellThrown.COMBAT, SpellThrown.CAMP,
|
||||||
SpellThrown.COMBAT, SpellThrown.COMBAT, SpellThrown.COMBAT, SpellThrown.COMBAT,
|
SpellThrown.COMBAT, SpellThrown.COMBAT, SpellThrown.COMBAT, SpellThrown.COMBAT,
|
||||||
SpellThrown.COMBAT, SpellThrown.COMBAT, SpellThrown.COMBAT, SpellThrown.COMBAT,
|
SpellThrown.COMBAT, SpellThrown.COMBAT, SpellThrown.COMBAT, SpellThrown.COMBAT,
|
||||||
SpellThrown.COMBAT, SpellThrown.COMBAT, SpellThrown.COMBAT, SpellThrown.COMBAT,
|
SpellThrown.COMBAT, SpellThrown.COMBAT, SpellThrown.COMBAT, SpellThrown.COMBAT,
|
||||||
SpellThrown.COMBAT, SpellThrown.COMBAT, SpellThrown.COMBAT_OR_CAMP,
|
SpellThrown.COMBAT, SpellThrown.COMBAT, SpellThrown.COMBAT_OR_CAMP,
|
||||||
SpellThrown.COMBAT, SpellThrown.COMBAT, };
|
SpellThrown.COMBAT, SpellThrown.COMBAT, };
|
||||||
|
|
||||||
private static SpellTarget[] affects =
|
private static SpellTarget[] affects = { SpellTarget.PARTY, SpellTarget.PERSON,
|
||||||
{ SpellTarget.PARTY, SpellTarget.PERSON, SpellTarget.MONSTER, SpellTarget.PARTY,
|
SpellTarget.MONSTER, SpellTarget.PARTY, SpellTarget.CASTER, SpellTarget.PARTY,
|
||||||
SpellTarget.CASTER, SpellTarget.PARTY, SpellTarget.CASTER,
|
SpellTarget.CASTER, SpellTarget.MONSTER_GROUP, SpellTarget.MONSTER_GROUP,
|
||||||
SpellTarget.MONSTER_GROUP, SpellTarget.MONSTER_GROUP, SpellTarget.PARTY,
|
SpellTarget.PARTY, SpellTarget.PERSON, SpellTarget.PARTY, SpellTarget.PARTY,
|
||||||
SpellTarget.PERSON, SpellTarget.PARTY, SpellTarget.PARTY, SpellTarget.PERSON,
|
SpellTarget.PERSON, SpellTarget.MONSTER, SpellTarget.PERSON, SpellTarget.PARTY,
|
||||||
SpellTarget.MONSTER, SpellTarget.PERSON, SpellTarget.PARTY, SpellTarget.PERSON,
|
SpellTarget.PERSON, SpellTarget.MONSTER, SpellTarget.PARTY, SpellTarget.PERSON,
|
||||||
SpellTarget.MONSTER, SpellTarget.PARTY, SpellTarget.PERSON, SpellTarget.PERSON,
|
SpellTarget.PERSON, SpellTarget.MONSTER, SpellTarget.MONSTER_GROUP,
|
||||||
SpellTarget.MONSTER, SpellTarget.MONSTER_GROUP, SpellTarget.PERSON,
|
SpellTarget.PERSON, SpellTarget.MONSTER, SpellTarget.PARTY,
|
||||||
SpellTarget.MONSTER, SpellTarget.PARTY, SpellTarget.MONSTER_GROUP,
|
SpellTarget.MONSTER_GROUP, SpellTarget.PERSON,
|
||||||
SpellTarget.PERSON,
|
|
||||||
|
|
||||||
SpellTarget.MONSTER, SpellTarget.CASTER, SpellTarget.MONSTER_GROUP,
|
SpellTarget.MONSTER, SpellTarget.CASTER, SpellTarget.MONSTER_GROUP,
|
||||||
SpellTarget.NONE, SpellTarget.MONSTER_GROUP, SpellTarget.CASTER,
|
SpellTarget.NONE, SpellTarget.MONSTER_GROUP, SpellTarget.CASTER,
|
||||||
SpellTarget.MONSTER_GROUP, SpellTarget.MONSTER_GROUP, SpellTarget.MONSTER_GROUP,
|
SpellTarget.MONSTER_GROUP, SpellTarget.MONSTER_GROUP, SpellTarget.MONSTER_GROUP,
|
||||||
SpellTarget.MONSTER_GROUP, SpellTarget.MONSTER_GROUP, SpellTarget.ALL_MONSTERS,
|
SpellTarget.MONSTER_GROUP, SpellTarget.MONSTER_GROUP, SpellTarget.ALL_MONSTERS,
|
||||||
SpellTarget.ALL_MONSTERS, SpellTarget.MONSTER_GROUP, SpellTarget.MONSTER_GROUP,
|
SpellTarget.ALL_MONSTERS, SpellTarget.MONSTER_GROUP, SpellTarget.MONSTER_GROUP,
|
||||||
SpellTarget.MONSTER, SpellTarget.PARTY, SpellTarget.VARIABLE, SpellTarget.PARTY,
|
SpellTarget.MONSTER, SpellTarget.PARTY, SpellTarget.VARIABLE, SpellTarget.PARTY,
|
||||||
SpellTarget.PARTY, SpellTarget.ALL_MONSTERS };
|
SpellTarget.PARTY, SpellTarget.ALL_MONSTERS };
|
||||||
|
|
||||||
private static String[] descriptions =
|
private static String[] descriptions = {
|
||||||
{ "KALKI reduces the AC of all party members by one, and thus makes"
|
"KALKI reduces the AC of all party members by one, and thus makes"
|
||||||
+ " them harder to hit.",
|
+ " them harder to hit.",
|
||||||
"DIOS restores from one to eight hit points of damage from a party"
|
"DIOS restores from one to eight hit points of damage from a party"
|
||||||
+ "member. It will not bring dead back to life.",
|
+ "member. It will not bring dead back to life.",
|
||||||
"BADIOS causes one to eight hit points of damage to a monster, and"
|
"BADIOS causes one to eight hit points of damage to a monster, and"
|
||||||
+ " may kill it. It is the reverse of dios. Note the BA prefix which"
|
+ " may kill it. It is the reverse of dios. Note the BA prefix which"
|
||||||
+ " means 'not'.",
|
+ " means 'not'.",
|
||||||
"MILWA causes a softly glowing light to follow the party, allowing"
|
"MILWA causes a softly glowing light to follow the party, allowing"
|
||||||
+ " them to see further into the maze, and also revealing all secret"
|
+ " them to see further into the maze, and also revealing all secret"
|
||||||
+ " doors. See also LOMILWA. This spell lasts only a short while.",
|
+ " doors. See also LOMILWA. This spell lasts only a short while.",
|
||||||
"PORFIC lowers the AC of the caster considerably. The effects last"
|
"PORFIC lowers the AC of the caster considerably. The effects last"
|
||||||
+ " for the duration of combat.",
|
+ " for the duration of combat.",
|
||||||
"MATU has the same effects as KALKI, but at double the strength.",
|
"MATU has the same effects as KALKI, but at double the strength.",
|
||||||
"CALFO allows the caster to determine the exact nature of a trap"
|
"CALFO allows the caster to determine the exact nature of a trap"
|
||||||
+ " on a chest 95% of the time.",
|
+ " on a chest 95% of the time.",
|
||||||
"MANIFO causes some of the monsters in a group to become stiff as"
|
"MANIFO causes some of the monsters in a group to become stiff as"
|
||||||
+ " statues for one or more melee rounds. The chance of success,"
|
+ " statues for one or more melee rounds. The chance of success,"
|
||||||
+ " and the duration of the effects, depend on the power of the"
|
+ " and the duration of the effects, depend on the power of the"
|
||||||
+ " target monsters.",
|
+ " target monsters.",
|
||||||
"MONTINO causes the air around a group of monsters to stop"
|
"MONTINO causes the air around a group of monsters to stop"
|
||||||
+ " transmitting sound. Like MANIFO, only some of the monsters will"
|
+ " transmitting sound. Like MANIFO, only some of the monsters will"
|
||||||
+ " be affected, and for varying lengths of time. Monsters and"
|
+ " be affected, and for varying lengths of time. Monsters and"
|
||||||
+ " Party members under the influence of this spell cannot cast"
|
+ " Party members under the influence of this spell cannot cast"
|
||||||
+ " spells, as they cannot utter the spell words!",
|
+ " spells, as they cannot utter the spell words!",
|
||||||
"LOMILWA is a MILWA spell with a much longer life span. Note that"
|
"LOMILWA is a MILWA spell with a much longer life span. Note that"
|
||||||
+ " when this spell, or MILWA are active, the Q option while"
|
+ " when this spell, or MILWA are active, the Q option while"
|
||||||
+ " moving through the maze is active. If Q)UICK PLOTTING is on,"
|
+ " moving through the maze is active. If Q)UICK PLOTTING is on,"
|
||||||
+ " only the square you are in, and the next two squares, will"
|
+ " only the square you are in, and the next two squares, will"
|
||||||
+ " plot. Normally you might see five or six squares ahead with"
|
+ " plot. Normally you might see five or six squares ahead with"
|
||||||
+ " LOMILWA on. Quick Plotting lets you move fast through known"
|
+ " LOMILWA on. Quick Plotting lets you move fast through known"
|
||||||
+ " areas. Note that it will be turned off when you enter camp or"
|
+ " areas. Note that it will be turned off when you enter camp or"
|
||||||
+ " combat mode.",
|
+ " combat mode.",
|
||||||
"DIALKO cures paralysis, and removes the effects of MANIFO and"
|
"DIALKO cures paralysis, and removes the effects of MANIFO and"
|
||||||
+ " KATINO from one member of the party.",
|
+ " KATINO from one member of the party.",
|
||||||
"LATUMAPIC makes it readily apparent exactly what the opposing"
|
"LATUMAPIC makes it readily apparent exactly what the opposing"
|
||||||
+ " monsters really are.",
|
+ " monsters really are.",
|
||||||
"BAMATU has the effects of MATU at twice the effectiveness.",
|
"BAMATU has the effects of MATU at twice the effectiveness.",
|
||||||
"DIAL restores two to 16 hit points of damage, and is similar to" + " DIOS.",
|
"DIAL restores two to 16 hit points of damage, and is similar to" + " DIOS.",
|
||||||
"BADIAL causes two to 16 hit points of damage in the same way as" + " BADIOS.",
|
"BADIAL causes two to 16 hit points of damage in the same way as" + " BADIOS.",
|
||||||
"LATUMOFIS makes a poisoned person whole and fit again. Note that"
|
"LATUMOFIS makes a poisoned person whole and fit again. Note that"
|
||||||
+ " poison causes a person to lose hit points steadily during"
|
+ " poison causes a person to lose hit points steadily during"
|
||||||
+ " movement and combat.",
|
+ " movement and combat.",
|
||||||
"MAPORFIC is an improved PORFIC, with effects that last for the"
|
"MAPORFIC is an improved PORFIC, with effects that last for the"
|
||||||
+ " entire expedition.",
|
+ " entire expedition.",
|
||||||
"DIALMA restores three to 24 hit points.",
|
"DIALMA restores three to 24 hit points.",
|
||||||
"BADIALMA causes three to 24 hit points of damage.",
|
"BADIALMA causes three to 24 hit points of damage.",
|
||||||
"LITOKAN causes a pillar of flame to strike a group of monsters,"
|
"LITOKAN causes a pillar of flame to strike a group of monsters,"
|
||||||
+ " doing three to 24 hits of damage to each. However, as with"
|
+ " doing three to 24 hits of damage to each. However, as with"
|
||||||
+ " many spells that affect entire groups, there is a chance that"
|
+ " many spells that affect entire groups, there is a chance that"
|
||||||
+ " individual monsters will be able to avoid or minimise its"
|
+ " individual monsters will be able to avoid or minimise its"
|
||||||
+ " effects. And some monsters will be resistant to it.",
|
+ " effects. And some monsters will be resistant to it.",
|
||||||
"KANDI allows the user to locate characters in the maze. It tells on"
|
"KANDI allows the user to locate characters in the maze. It tells on"
|
||||||
+ " which level, and in which rough area the dead one can be found.",
|
+ " which level, and in which rough area the dead one can be found.",
|
||||||
"DI causes a dead person to be resurrected. However, the renewed"
|
"DI causes a dead person to be resurrected. However, the renewed"
|
||||||
+ " character has but one hit point. Also, this spell is not as"
|
+ " character has but one hit point. Also, this spell is not as"
|
||||||
+ " effective or as safe as using the Temple.",
|
+ " effective or as safe as using the Temple.",
|
||||||
"BADI gives the affected monster a coronary attack. It may or may"
|
"BADI gives the affected monster a coronary attack. It may or may"
|
||||||
+ " not cause death to occur.",
|
+ " not cause death to occur.",
|
||||||
"LORTO causes sharp blades to slice through a group, causing six to"
|
"LORTO causes sharp blades to slice through a group, causing six to"
|
||||||
+ " 36 points of damage.",
|
+ " 36 points of damage.",
|
||||||
"MADI causes all hit points to be restored and cures any condition"
|
"MADI causes all hit points to be restored and cures any condition" + " but death.",
|
||||||
+ " but death.",
|
"MABADI causes all but one to eight hit points to be removed from" + " the target.",
|
||||||
"MABADI causes all but one to eight hit points to be removed from"
|
"LOKTOFEIT causes all party members to be teleported back to the"
|
||||||
+ " the target.",
|
+ " castle, minus all their equipment and most of their gold. There"
|
||||||
"LOKTOFEIT causes all party members to be teleported back to the"
|
+ " is also a good chance this spell will not function.",
|
||||||
+ " castle, minus all their equipment and most of their gold. There"
|
"MALIKTO causes 12 to 72 hit points of damage to all monsters. None"
|
||||||
+ " is also a good chance this spell will not function.",
|
+ " can escape or minimise its effects.",
|
||||||
"MALIKTO causes 12 to 72 hit points of damage to all monsters. None"
|
"KADORTO restores the dead to life as does DI, but also restores all"
|
||||||
+ " can escape or minimise its effects.",
|
+ " hit points. However, it has the same drawbacks as the DI spell."
|
||||||
"KADORTO restores the dead to life as does DI, but also restores all"
|
+ " KADORTO can be used to resurrect people even if they are ashes.",
|
||||||
+ " hit points. However, it has the same drawbacks as the DI spell."
|
|
||||||
+ " KADORTO can be used to resurrect people even if they are ashes.",
|
|
||||||
|
|
||||||
"HALITO causes a flame ball the size of a baseball to hit a monster,"
|
"HALITO causes a flame ball the size of a baseball to hit a monster,"
|
||||||
+ " doing from one to eight points of damage.",
|
+ " doing from one to eight points of damage.",
|
||||||
"MOGREF reduces the caster's AC by two. The effect lasts the entire"
|
"MOGREF reduces the caster's AC by two. The effect lasts the entire"
|
||||||
+ " encounter.",
|
+ " encounter.",
|
||||||
"KATINO causes most of the monsters in a group to fall asleep."
|
"KATINO causes most of the monsters in a group to fall asleep."
|
||||||
+ " Katino only effects normal, animal or humanoid monsters. The"
|
+ " Katino only effects normal, animal or humanoid monsters. The"
|
||||||
+ " chance of the spell affecting an individual monster, and the"
|
+ " chance of the spell affecting an individual monster, and the"
|
||||||
+ " duration of the effect, is inversely proportional to the power"
|
+ " duration of the effect, is inversely proportional to the power"
|
||||||
+ " of the monster. While asleep, monsters are easier to hit and"
|
+ " of the monster. While asleep, monsters are easier to hit and"
|
||||||
+ " successful strikes do double damage.",
|
+ " successful strikes do double damage.",
|
||||||
"DUMAPIC informs you of the party's exact displacement from the"
|
"DUMAPIC informs you of the party's exact displacement from the"
|
||||||
+ " stairs to the castle, vertically, and North and East, and also"
|
+ " stairs to the castle, vertically, and North and East, and also"
|
||||||
+ " tells you what direction you are facing.",
|
+ " tells you what direction you are facing.",
|
||||||
|
|
||||||
"DILTO causes one group of monsters to be enveloped in darkness,"
|
"DILTO causes one group of monsters to be enveloped in darkness,"
|
||||||
+ " which reduces their ability to defend against your attacks.",
|
+ " which reduces their ability to defend against your attacks.",
|
||||||
"SOPIC causes the caster to become transparent. This means that"
|
"SOPIC causes the caster to become transparent. This means that"
|
||||||
+ " he is harder to see, and thus his AC is reduced by four.",
|
+ " he is harder to see, and thus his AC is reduced by four.",
|
||||||
|
|
||||||
"MAHALITO causes a fiery explosion in a monster group, doing four"
|
"MAHALITO causes a fiery explosion in a monster group, doing four"
|
||||||
+ " to 24 hit points of damage. As with other similar spells,"
|
+ " to 24 hit points of damage. As with other similar spells,"
|
||||||
+ " monsters may be able to minimise the damage done.",
|
+ " monsters may be able to minimise the damage done.",
|
||||||
"MOLITO causes sparks to fly out and damage about half of the"
|
"MOLITO causes sparks to fly out and damage about half of the"
|
||||||
+ " monsters in a group. Three to 18 hit points of damage are done"
|
+ " monsters in a group. Three to 18 hit points of damage are done"
|
||||||
+ " with no chance of avoiding the sparks.",
|
+ " with no chance of avoiding the sparks.",
|
||||||
"MORLIS causes one group of monsters to fear the party greatly. The"
|
"MORLIS causes one group of monsters to fear the party greatly. The"
|
||||||
+ " effects are the same as a double strength DILTO spell.",
|
+ " effects are the same as a double strength DILTO spell.",
|
||||||
"DALTO is similar to MAHALITO except that cold replaces flames."
|
"DALTO is similar to MAHALITO except that cold replaces flames."
|
||||||
+ " Also, six to 36 hit points of damage are done.",
|
+ " Also, six to 36 hit points of damage are done.",
|
||||||
"LAHALITO is an improved MAHALITO, doing the same damage as DALTO.",
|
"LAHALITO is an improved MAHALITO, doing the same damage as DALTO.",
|
||||||
"MAMORLIS is similar to MORLIS, except that all monster groups are"
|
"MAMORLIS is similar to MORLIS, except that all monster groups are" + " affected.",
|
||||||
+ " affected.",
|
"Any monsters of less than eigth level (i.e. about 35-40 hit points)"
|
||||||
"Any monsters of less than eigth level (i.e. about 35-40 hit points)"
|
+ " are killed by this spell outright.",
|
||||||
+ " are killed by this spell outright.",
|
"An improved DALTO causing eight to 64 hit points of damage.",
|
||||||
"An improved DALTO causing eight to 64 hit points of damage.",
|
"All monsters in the group affected by this spell die. Of course,"
|
||||||
"All monsters in the group affected by this spell die. Of course,"
|
+ " there is a chance that some of the monsters will not be affected.",
|
||||||
+ " there is a chance that some of the monsters will not be affected.",
|
"This spell will destroy any one monster that is of the Undead" + " variety",
|
||||||
"This spell will destroy any one monster that is of the Undead" + " variety",
|
"This spell duplicates the effects of SOPIC for the entire party.",
|
||||||
"This spell duplicates the effects of SOPIC for the entire party.",
|
"This spell is indeed terrible, and may backfire on the caster."
|
||||||
"This spell is indeed terrible, and may backfire on the caster."
|
+ " First, to even cast it, you must be of the thirteenth level or"
|
||||||
+ " First, to even cast it, you must be of the thirteenth level or"
|
+ " higher, and casting it will cost you one level of experience."
|
||||||
+ " higher, and casting it will cost you one level of experience."
|
+ " The effects of HAMAN are random, and usually help the party.",
|
||||||
+ " The effects of HAMAN are random, and usually help the party.",
|
"This spell's effects depend on the situation the party is in when it"
|
||||||
"This spell's effects depend on the situation the party is in when it"
|
+ " is cast.Basically, MALOR will teleport the entire party from one"
|
||||||
+ " is cast.Basically, MALOR will teleport the entire party from one"
|
+ " location to another. When used in melee, the teleport is random,"
|
||||||
+ " location to another. When used in melee, the teleport is random,"
|
+ " but when used in camp, where there is more chance for concentration"
|
||||||
+ " but when used in camp, where there is more chance for concentration"
|
+ ", it can be used to move the party anywhere in the maze. Be warned,"
|
||||||
+ ", it can be used to move the party anywhere in the maze. Be warned,"
|
+ " however, that if you teleport outside of the maze, or into an"
|
||||||
+ " however, that if you teleport outside of the maze, or into an"
|
+ " area that is solid rock, you will be lost forever, so this spell"
|
||||||
+ " area that is solid rock, you will be lost forever, so this spell"
|
+ " is to be used with the greatest of care. Combat use of MALOR will"
|
||||||
+ " is to be used with the greatest of care. Combat use of MALOR will"
|
+ " never put you outside of the maze, but it may move you deeper in,"
|
||||||
+ " never put you outside of the maze, but it may move you deeper in,"
|
+ " so it should be used only in panic situations.",
|
||||||
+ " so it should be used only in panic situations.",
|
"The same restrictions and qualifications apply to this spell as do"
|
||||||
"The same restrictions and qualifications apply to this spell as do"
|
+ " to HAMAN. However, the effects are even greater. Generally these"
|
||||||
+ " to HAMAN. However, the effects are even greater. Generally these"
|
+ " spells are only used when there is no other hope for survival.",
|
||||||
+ " spells are only used when there is no other hope for survival.",
|
"The effect of this spell can be described as similar to that of a"
|
||||||
"The effect of this spell can be described as similar to that of a"
|
+ " nuclear fusion explosion. Luckily the party is shielded from its"
|
||||||
+ " nuclear fusion explosion. Luckily the party is shielded from its"
|
+ " effects. Unluckily (for them) the monsters are not. This spell"
|
||||||
+ " effects. Unluckily (for them) the monsters are not. This spell"
|
+ " will do from 10-100 hit points of damage." };
|
||||||
+ " will do from 10-100 hit points of damage." };
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user