changeset 699:0c6510a626e2

Merge
author Gloval
date Sun, 17 Mar 2013 18:32:09 +0400
parents b097497f07e2 (diff) 2dfb67633b01 (current diff)
children 1d05543f522d
files
diffstat 4 files changed, 446 insertions(+), 486 deletions(-) [+]
line wrap: on
line diff
--- a/Monsters.cpp	Sun Mar 17 14:25:00 2013 +0000
+++ b/Monsters.cpp	Sun Mar 17 18:32:09 2013 +0400
@@ -16,6 +16,388 @@
 struct MonsterStats *pMonsterStats;
 struct MonsterList *pMonsterList;
 
+unsigned int __fastcall ParseSpellType(struct FrameTableTxtLine *, int a2);
+
+int  ParseAttackType(const char *damage_type_str);
+void ParseDamage( char *damage_str, unsigned __int8* dice_rolls, unsigned __int8* dice_sides, unsigned __int8* dmg_bonus );
+int ParseMissleAttackType(const char *missle_attack_str);
+int ParseSpecialAttack(const char *spec_att_str);
+
+//----- (004548E2) --------------------------------------------------------
+    unsigned int __fastcall ParseSpellType(FrameTableTxtLine *a1, int a2)
+    {
+    int v2; // edi@1
+    int v3; // esi@1
+    unsigned int result; // eax@1
+    std::string v5; // [sp-18h] [bp-28h]@75
+    const char *v6; // [sp-8h] [bp-18h]@75
+    signed int v7; // [sp-4h] [bp-14h]@3
+    std::string *v8; // [sp+8h] [bp-8h]@75
+    int a3; // [sp+Fh] [bp-1h]@75
+
+    v2 = (int)a1;
+    v3 = a2;
+    result = (int)a1->pProperties[0];
+    if ( result )
+        {
+        if ( !_strcmpi((const char *)result, "Dispel") )
+            {
+            v7 = 80;
+LABEL_71:
+            result = v7;
+LABEL_76:
+            ++*(int *)v3;
+            return result;
+            }
+        if ( _strcmpi(*(const char **)(v2 + 4), "Day") )
+            {
+            if ( _strcmpi(*(const char **)(v2 + 4), "Hour") )
+                {
+                if ( _strcmpi(*(const char **)(v2 + 4), "Shield") )
+                    {
+                    if ( !_strcmpi(*(const char **)(v2 + 4), "Spirit") )
+                        {
+                        v7 = 52;
+                        goto LABEL_71;
+                        }
+                    if ( !_strcmpi(*(const char **)(v2 + 4), "Power") )
+                        {
+                        v7 = 77;
+                        goto LABEL_71;
+                        }
+                    if ( !_strcmpi(*(const char **)(v2 + 4), "Meteor") )
+                        {
+                        v7 = 9;
+                        goto LABEL_71;
+                        }
+                    if ( !_strcmpi(*(const char **)(v2 + 4), "Lightning") )
+                        {
+                        v7 = 18;
+                        goto LABEL_71;
+                        }
+                    if ( _strcmpi(*(const char **)(v2 + 4), "Implosion") )
+                        {
+                        if ( !_strcmpi(*(const char **)(v2 + 4), "Stone") )
+                            {
+                            v7 = 38;
+                            goto LABEL_71;
+                            }
+                        if ( _strcmpi(*(const char **)(v2 + 4), "Haste") )
+                            {
+                            if ( _strcmpi(*(const char **)(v2 + 4), "Heroism") )
+                                {
+                                if ( !_strcmpi(*(const char **)(v2 + 4), "Pain") )
+                                    {
+                                    v7 = 95;
+                                    goto LABEL_71;
+                                    }
+                                if ( _strcmpi(*(const char **)(v2 + 4), "Sparks") )
+                                    {
+                                    if ( !_strcmpi(*(const char **)(v2 + 4), "Light") )
+                                        {
+                                        v7 = 78;
+                                        goto LABEL_71;
+                                        }
+                                    if ( !_strcmpi(*(const char **)(v2 + 4), "Toxic") )
+                                        {
+                                        v7 = 90;
+                                        goto LABEL_71;
+                                        }
+                                    if ( _strcmpi(*(const char **)(v2 + 4), "ShrapMetal") )
+                                        {
+                                        if ( _strcmpi(*(const char **)(v2 + 4), "Paralyze") )
+                                            {
+                                            if ( _strcmpi(*(const char **)(v2 + 4), "Fireball") )
+                                                {
+                                                if ( _strcmpi(*(const char **)(v2 + 4), "Incinerate") )
+                                                    {
+                                                    if ( !_strcmpi(*(const char **)(v2 + 4), "Fire") )
+                                                        {
+                                                        v7 = 2;
+                                                        goto LABEL_71;
+                                                        }
+                                                    if ( !_strcmpi(*(const char **)(v2 + 4), "Rock") )
+                                                        {
+                                                        v7 = 41;
+                                                        goto LABEL_71;
+                                                        }
+                                                    if ( !_strcmpi(*(const char **)(v2 + 4), "Mass") )
+                                                        {
+                                                        v7 = 44;
+                                                        goto LABEL_71;
+                                                        }
+                                                    if ( !_strcmpi(*(const char **)(v2 + 4), "Ice") )
+                                                        {
+                                                        v7 = 26;
+                                                        goto LABEL_71;
+                                                        }
+                                                    if ( !_strcmpi(*(const char **)(v2 + 4), "Acid") )
+                                                        {
+                                                        v7 = 29;
+                                                        goto LABEL_71;
+                                                        }
+                                                    if ( _strcmpi(*(const char **)(v2 + 4), "Bless") )
+                                                        {
+                                                        if ( !_strcmpi(*(const char **)(v2 + 4), "Dragon") )
+                                                            {
+                                                            v7 = 97;
+                                                            goto LABEL_71;
+                                                            }
+                                                        if ( _strcmpi(*(const char **)(v2 + 4), "Reanimate") )
+                                                            {
+                                                            if ( !_strcmpi(*(const char **)(v2 + 4), "Summon") )
+                                                                {
+                                                                v7 = 82;
+                                                                goto LABEL_71;
+                                                                }
+                                                            if ( _strcmpi(*(const char **)(v2 + 4), "Fate") )
+                                                                {
+                                                                if ( _strcmpi(*(const char **)(v2 + 4), "Harm") )
+                                                                    {
+                                                                    if ( !_strcmpi(*(const char **)(v2 + 4), "Mind") )
+                                                                        {
+                                                                        v7 = 57;
+                                                                        goto LABEL_71;
+                                                                        }
+                                                                    if ( _strcmpi(*(const char **)(v2 + 4), "Blades") )
+                                                                        {
+                                                                        if ( !_strcmpi(*(const char **)(v2 + 4), "Psychic") )
+                                                                            {
+                                                                            v7 = 65;
+                                                                            goto LABEL_71;
+                                                                            }
+                                                                        if ( _strcmpi(*(const char **)(v2 + 4), "Hammerhands") )
+                                                                            {
+                                                                            sprintf(pTmpBuf, "Unknown monster spell %s", *(int *)(v2 + 4));
+                                                                            MessageBoxA(nullptr, pTmpBuf, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Itemdata.cpp:1562", 0);
+                                                                            result = 0;
+                                                                            goto LABEL_76;
+                                                                            }
+                                                                        v7 = 73;
+                                                                        }
+                                                                    else
+                                                                        {
+                                                                        v7 = 39;
+                                                                        }
+                                                                    }
+                                                                else
+                                                                    {
+                                                                    v7 = 70;
+                                                                    }
+                                                                }
+                                                            else
+                                                                {
+                                                                v7 = 47;
+                                                                }
+                                                            }
+                                                        else
+                                                            {
+                                                            v7 = 89;
+                                                            }
+                                                        }
+                                                    else
+                                                        {
+                                                        v7 = 46;
+                                                        }
+                                                    }
+                                                else
+                                                    {
+                                                    v7 = 11;
+                                                    }
+                                                }
+                                            else
+                                                {
+                                                v7 = 6;
+                                                }
+                                            }
+                                        else
+                                            {
+                                            v7 = 81;
+                                            }
+                                        }
+                                    else
+                                        {
+                                        v7 = 93;
+                                        }
+                                    }
+                                else
+                                    {
+                                    v7 = 15;
+                                    }
+                                }
+                            else
+                                {
+                                v7 = 51;
+                                }
+                            }
+                        else
+                            {
+                            v7 = 5;
+                            }
+                        }
+                    else
+                        {
+                        v7 = 20;
+                        }
+                    }
+                else
+                    {
+                    v7 = 17;
+                    }
+                return v7;
+                }
+            v7 = 86;
+            }
+        else
+            {
+            v7 = 85;
+            }
+        *(int *)v3 += 2;
+        result = v7;
+        }
+    return result;
+    }
+
+//----- (00454CB4) --------------------------------------------------------
+int ParseAttackType( const char *damage_type_str )
+    {
+
+    switch (tolower(*damage_type_str))
+        {
+    case 'f': return 0;  //fire
+    case 'a': return 1; //air
+    case 'w': return 2; //water
+    case 'e': return 3; //earth 
+
+    case 's': return 6; //spirit
+    case 'm': return 7; //mind 
+        //m ?? 8
+    case 'l': return 9;  //light
+    case 'd': return 10; //dark
+        // d?? 11
+        }
+    return 4;  //phis
+
+    }
+
+//----- (00454D7D) --------------------------------------------------------
+void ParseDamage( char *damage_str, unsigned __int8* dice_rolls, unsigned __int8* dice_sides, unsigned __int8* dmg_bonus )
+    {
+    int str_len=0;
+    int str_pos=0;
+    bool dice_flag=false;
+
+    *dice_rolls = 0;
+    *dice_sides = 1;
+    *dmg_bonus = 0;
+ 
+    str_len = strlen(damage_str);
+    if (str_len<=0)
+        return;
+    for (str_pos=0;str_pos<str_len;++str_pos )
+        {
+        if (tolower(damage_str[str_pos])=='d')
+            {
+            damage_str[str_pos]='\0';
+            *dice_rolls=atoi(damage_str);
+            *dice_sides=atoi(&damage_str[str_pos+1]);
+            dice_flag=true;
+            damage_str[str_pos]='d';
+            }
+        else if (tolower(damage_str[str_pos])=='+')
+            *dmg_bonus=atoi(&damage_str[str_pos+1]);
+        }
+    if (!dice_flag)
+        {
+        if ((*damage_str>='0')&&(*damage_str<='9'))
+            {
+            *dice_rolls =atoi(damage_str);
+            *dice_sides = 1;
+            }
+        }
+    }
+
+//----- (00454E3A) --------------------------------------------------------
+int  ParseMissleAttackType(const char *missle_attack_str)
+    {
+    if ( !_strcmpi(missle_attack_str, "ARROW") )
+        return 1;
+    else if ( !_strcmpi(missle_attack_str, "ARROWF") )
+        return 2;
+    else if ( !_strcmpi(missle_attack_str, "FIRE") )
+        return 3;
+    else if ( !_strcmpi(missle_attack_str, "AIR") )       
+        return 4;
+    else if ( !_strcmpi(missle_attack_str, "WATER") )
+        return 5;
+    else if ( !_strcmpi(missle_attack_str, "EARTH") )
+        return 6;
+    else if ( !_strcmpi(missle_attack_str, "SPIRIT") )       
+        return 7;
+    else if ( !_strcmpi(missle_attack_str, "MIND") )
+        return 8;
+    else if ( !_strcmpi(missle_attack_str, "BODY") )
+        return 9;
+    else if ( !_strcmpi(missle_attack_str, "LIGHT") )       
+        return 10;
+    else if ( !_strcmpi(missle_attack_str, "DARK") )
+        return 11;
+    else if ( !_strcmpi(missle_attack_str, "ENER") )       
+        return 13;
+    else return 0;
+    }
+
+
+int ParseSpecialAttack(const char *spec_att_str)
+    {
+    if ( strstr(spec_att_str, "curse") )
+        return  1;
+    else if ( strstr(spec_att_str, "weak") )
+        return  2;
+    else if ( strstr(spec_att_str, "asleep") )
+         return  3;
+    else if ( strstr(spec_att_str, "afraid") )
+         return  23;
+    else if ( strstr(spec_att_str, "drunk") )
+         return  4;
+    else if ( strstr(spec_att_str, "insane") )
+         return  5;
+    else if ( strstr(spec_att_str, "poison1") )
+         return  6;
+    else if ( strstr(spec_att_str, "poison2") )
+        return  7;
+    else if ( strstr(spec_att_str, "poison3") )
+        return  8;
+    else if ( strstr(spec_att_str, "disease1") )  
+        return  9;
+    else if ( strstr(spec_att_str, "disease2") )
+        return  10;
+    else if ( strstr(spec_att_str, "disease3") )
+        return  11;
+    else if ( strstr(spec_att_str, "paralyze") )
+        return  12;
+    else if ( strstr(spec_att_str, "uncon") )
+        return  13;
+    else if ( strstr(spec_att_str, "dead") )
+        return  14;
+    else if ( strstr(spec_att_str, "stone") )
+        return  15;
+    else if ( strstr(spec_att_str, "errad") )
+        return  16;
+    else if ( strstr(spec_att_str, "brkitem") )
+        return  17;
+    else if ( strstr(spec_att_str, "brkarmor") )
+        return  18;
+    else if ( strstr(spec_att_str, "brkweapon") )
+        return  19;
+    else if ( strstr(spec_att_str, "steal") )
+        return  20;
+    else if ( strstr(spec_att_str, "age") )
+        return  21;
+    else if ( strstr(spec_att_str, "drainsp") )
+        return  22;
+    else return 0;                   
+    }
 
 //----- (004598FC) --------------------------------------------------------
 bool MonsterList::FromFileTxt(const char *Args)
@@ -159,8 +541,8 @@
 void MonsterList::FromFile(void *pSerialized)
 {
   uNumMonsters = *(int *)pSerialized;
-  pMonsters = (MonsterDesc *)pAllocator->AllocNamedChunk(pMonsters, 152 * uNumMonsters, "Mon Race");
-  memcpy(pMonsters, (char *)pSerialized + 4, 152 * uNumMonsters);
+  pMonsters = (MonsterDesc *)pAllocator->AllocNamedChunk(pMonsters, sizeof(MonsterDesc) * uNumMonsters, "Mon Race");
+  memcpy(pMonsters, (char *)pSerialized + 4, sizeof(MonsterDesc) * uNumMonsters);
 }
 
 //----- (00459860) --------------------------------------------------------
@@ -429,9 +811,7 @@
                     pInfos[curr_rec_num].pPictureName=RemoveQuotes(test_string);
                     break;
                 case 3:
-                    {
                     pInfos[curr_rec_num].uLevel=atoi(test_string);
-                    }
                     break;
                 case 4:
                     {
@@ -457,9 +837,7 @@
                     }
                     break;
                 case 5:
-                    {
                     pInfos[curr_rec_num].uAC=atoi(test_string);
-                    }
                     break;
                 case 6:
                     {
@@ -495,6 +873,8 @@
                     pInfos[curr_rec_num].uTreasureDropChance=0;
                     pInfos[curr_rec_num].uTreasureDiceRolls=0;
                     pInfos[curr_rec_num].uTreasureDiceSides=0;
+                    pInfos[curr_rec_num].uTreasureType=0;
+                    pInfos[curr_rec_num].uTreasureLevel=0;
                     if (test_string[0]=='"')
                         test_string[0]=' ';
                     str_len=strlen(test_string);
@@ -553,7 +933,7 @@
                                 ++str_pos;
                                 }
                                 while(str_pos<str_len);
-                                pInfos[curr_rec_num].uTreasureType=0;
+                              
                                 pInfos[curr_rec_num].uTreasureLevel=test_string[str_pos+1]-'0';
                                 item_name=&test_string[str_pos+2];
                                 if (*item_name)
@@ -656,19 +1036,13 @@
                     }
                     break;
                 case 12:
-                    {
                     pInfos[curr_rec_num].uHostilityType=(MonsterInfo::HostilityRadius)atoi(test_string);
-                    }
                     break;
                 case 13:
-                    {
                     pInfos[curr_rec_num].uBaseSpeed=atoi(test_string);
-                    }
                     break;
                 case 14:
-                    {
                     pInfos[curr_rec_num].uRecoveryTime=atoi(test_string);
-                    }
                     break;
                 case 15:
                     {
@@ -687,7 +1061,7 @@
                         case '4': pInfos[curr_rec_num].uNumCharactersAttackedPerSpecialAbility=4; break;
                         case 'c': pInfos[curr_rec_num].uAttackPreference|=0x0010; break;
                         case 'd': pInfos[curr_rec_num].uAttackPreference|=0x0008; break;
-                        case 'e': pInfos[curr_rec_num].uAttackPreference|=0x0100; break;
+                        case 'e': pInfos[curr_rec_num].uAttackPreference|=0x1000; break;
                         case 'f': pInfos[curr_rec_num].uAttackPreference|=0x0400; break;
                         case 'h': pInfos[curr_rec_num].uAttackPreference|=0x0800; break;
                         case 'k': pInfos[curr_rec_num].uAttackPreference|=0x0001; break;
@@ -699,55 +1073,46 @@
                         case 't': pInfos[curr_rec_num].uAttackPreference|=0x0080; break;
                         case 'w': pInfos[curr_rec_num].uAttackPreference|=0x2000; break;
                         case 'x': pInfos[curr_rec_num].uAttackPreference|=0x0200; break;
-                        case 'l':  break;
                             }
                         }
                     }
                     break;
-                    /*    case 16:
+                    case 16:
                     {
 
                     }
                     break;
                     case 17:
-                    {
-
-                    }
+                         pInfos[curr_rec_num].uAttack1Type=ParseAttackType(test_string);
                     break;
                     case 18:
                     {
-
+                    ParseDamage(test_string, &pInfos[curr_rec_num].uAttack1DamageDiceRolls,
+                                             &pInfos[curr_rec_num].uAttack1DamageDiceSides,
+                                             &pInfos[curr_rec_num].uAttack1DamageBonus);
                     }
                     break;
-                    case 19:
-                    {
-
-                    }
+                   case 19:
+                        pInfos[curr_rec_num].uMissleAttack1Type=ParseMissleAttackType(test_string);
                     break;
                     case 20:
-                    {
-
-                    }
+                        pInfos[curr_rec_num].uAttack2Chance=atoi(test_string);
                     break;
                     case 21:
-                    {
-
-                    }
+                          pInfos[curr_rec_num].uAttack2Type=ParseAttackType(test_string);
                     break;
                     case 22:
                     {
-
+                    ParseDamage(test_string, &pInfos[curr_rec_num].uAttack2DamageDiceRolls,
+                                             &pInfos[curr_rec_num].uAttack2DamageDiceSides,
+                                             &pInfos[curr_rec_num].uAttack2DamageBonus);
                     }
                     break;
                     case 23:
-                    {
-
-                    }
+                        pInfos[curr_rec_num].uMissleAttack2Type=ParseMissleAttackType(test_string);
                     break;
                     case 24:
-                    {
-
-                    }
+                         pInfos[curr_rec_num].uSpell1UseChance=atoi(test_string);
                     break;
                     case 25:
                     {
@@ -755,9 +1120,7 @@
                     }
                     break;
                     case 26:
-                    {
-
-                    }
+                        pInfos[curr_rec_num].uSpell2UseChance=atoi(test_string);
                     break;
                     case 27:
                     {
@@ -766,59 +1129,89 @@
                     break;
                     case 28:
                     {
-
+                    if (tolower(test_string[0])=='i')
+                        pInfos[curr_rec_num].uResFire=200;
+                    else
+                        pInfos[curr_rec_num].uResFire=atoi(test_string);
                     }
                     break;
                     case 29:
                     {
-
+                    if (tolower(test_string[0])=='i')
+                        pInfos[curr_rec_num].uResAir=200;
+                    else
+                        pInfos[curr_rec_num].uResAir=atoi(test_string);
                     }
                     break;
                     case 30:
                     {
-
+                    if (tolower(test_string[0])=='i')
+                        pInfos[curr_rec_num].uResWater=200;
+                    else
+                        pInfos[curr_rec_num].uResWater=atoi(test_string);
                     }
                     break;
                     case 31:
                     {
-
+                    if (tolower(test_string[0])=='i')
+                        pInfos[curr_rec_num].uResEarth=200;
+                    else
+                        pInfos[curr_rec_num].uResEarth=atoi(test_string);
                     }
                     break;
                     case 32:
                     {
-
+                    if (tolower(test_string[0])=='i')
+                        pInfos[curr_rec_num].uResMind=200;
+                    else
+                        pInfos[curr_rec_num].uResMind=atoi(test_string);
                     }
                     break;
                     case 33:
                     {
-
+                    if (tolower(test_string[0])=='i')
+                        pInfos[curr_rec_num].uResSpirit=200;
+                    else
+                        pInfos[curr_rec_num].uResSpirit=atoi(test_string);
                     }
                     break;
                     case 34:
                     {
-
+                    if (tolower(test_string[0])=='i')
+                        pInfos[curr_rec_num].uResBody=200;
+                    else
+                        pInfos[curr_rec_num].uResBody=atoi(test_string);
                     }
                     break;
                     case 35:
                     {
-
+                    if (tolower(test_string[0])=='i')
+                        pInfos[curr_rec_num].uResLight=200;
+                    else
+                        pInfos[curr_rec_num].uResLight=atoi(test_string);
                     }
                     break;
                     case 36:
                     {
-
+                    if (tolower(test_string[0])=='i')
+                        pInfos[curr_rec_num].uResDark=200;
+                    else
+                        pInfos[curr_rec_num].uResDark=atoi(test_string);
                     }
                     break;
                     case 37:
                     {
-
+                    if (tolower(test_string[0])=='i')
+                        pInfos[curr_rec_num].uResPhysical=200;
+                    else
+                        pInfos[curr_rec_num].uResPhysical=atoi(test_string);
                     }
                     break;
                     case 38:
                     {
 
                     }
-                    break;   */  
+                    break;     
                     }
                 }
             else
--- a/Outdoor.cpp	Sun Mar 17 14:25:00 2013 +0000
+++ b/Outdoor.cpp	Sun Mar 17 18:32:09 2013 +0400
@@ -3158,7 +3158,7 @@
 		v36 = actor->pMonsterInfo.uID;
         v28->field_1E = v62 | 0x200;
         v28->pSpriteFrame = v15;
-        v28->uTintColor = *((int *)&v35[v36] - 36);
+        v28->uTintColor = pMonsterList->pMonsters[actor->pMonsterInfo.uID-1].uTintColor;//*((int *)&v35[v36] - 36);
         if (actor->pActorBuffs[ACTOR_BUFF_STONED].uExpireTime)
           v28->field_1E = v62 | 0x200;
       }
--- a/mm7_2.cpp	Sun Mar 17 14:25:00 2013 +0000
+++ b/mm7_2.cpp	Sun Mar 17 18:32:09 2013 +0400
@@ -7002,436 +7002,6 @@
   }
 }
 
-//----- (004548E2) --------------------------------------------------------
-unsigned int __fastcall ParseSpellType(FrameTableTxtLine *a1, int a2)
-{
-  int v2; // edi@1
-  int v3; // esi@1
-  unsigned int result; // eax@1
-  std::string v5; // [sp-18h] [bp-28h]@75
-  const char *v6; // [sp-8h] [bp-18h]@75
-  signed int v7; // [sp-4h] [bp-14h]@3
-  std::string *v8; // [sp+8h] [bp-8h]@75
-  int a3; // [sp+Fh] [bp-1h]@75
-
-  v2 = (int)a1;
-  v3 = a2;
-  result = (int)a1->pProperties[0];
-  if ( result )
-  {
-    if ( !_strcmpi((const char *)result, "Dispel") )
-    {
-      v7 = 80;
-LABEL_71:
-      result = v7;
-LABEL_76:
-      ++*(int *)v3;
-      return result;
-    }
-    if ( _strcmpi(*(const char **)(v2 + 4), "Day") )
-    {
-      if ( _strcmpi(*(const char **)(v2 + 4), "Hour") )
-      {
-        if ( _strcmpi(*(const char **)(v2 + 4), "Shield") )
-        {
-          if ( !_strcmpi(*(const char **)(v2 + 4), "Spirit") )
-          {
-            v7 = 52;
-            goto LABEL_71;
-          }
-          if ( !_strcmpi(*(const char **)(v2 + 4), "Power") )
-          {
-            v7 = 77;
-            goto LABEL_71;
-          }
-          if ( !_strcmpi(*(const char **)(v2 + 4), "Meteor") )
-          {
-            v7 = 9;
-            goto LABEL_71;
-          }
-          if ( !_strcmpi(*(const char **)(v2 + 4), "Lightning") )
-          {
-            v7 = 18;
-            goto LABEL_71;
-          }
-          if ( _strcmpi(*(const char **)(v2 + 4), "Implosion") )
-          {
-            if ( !_strcmpi(*(const char **)(v2 + 4), "Stone") )
-            {
-              v7 = 38;
-              goto LABEL_71;
-            }
-            if ( _strcmpi(*(const char **)(v2 + 4), "Haste") )
-            {
-              if ( _strcmpi(*(const char **)(v2 + 4), "Heroism") )
-              {
-                if ( !_strcmpi(*(const char **)(v2 + 4), "Pain") )
-                {
-                  v7 = 95;
-                  goto LABEL_71;
-                }
-                if ( _strcmpi(*(const char **)(v2 + 4), "Sparks") )
-                {
-                  if ( !_strcmpi(*(const char **)(v2 + 4), "Light") )
-                  {
-                    v7 = 78;
-                    goto LABEL_71;
-                  }
-                  if ( !_strcmpi(*(const char **)(v2 + 4), "Toxic") )
-                  {
-                    v7 = 90;
-                    goto LABEL_71;
-                  }
-                  if ( _strcmpi(*(const char **)(v2 + 4), "ShrapMetal") )
-                  {
-                    if ( _strcmpi(*(const char **)(v2 + 4), "Paralyze") )
-                    {
-                      if ( _strcmpi(*(const char **)(v2 + 4), "Fireball") )
-                      {
-                        if ( _strcmpi(*(const char **)(v2 + 4), "Incinerate") )
-                        {
-                          if ( !_strcmpi(*(const char **)(v2 + 4), "Fire") )
-                          {
-                            v7 = 2;
-                            goto LABEL_71;
-                          }
-                          if ( !_strcmpi(*(const char **)(v2 + 4), "Rock") )
-                          {
-                            v7 = 41;
-                            goto LABEL_71;
-                          }
-                          if ( !_strcmpi(*(const char **)(v2 + 4), "Mass") )
-                          {
-                            v7 = 44;
-                            goto LABEL_71;
-                          }
-                          if ( !_strcmpi(*(const char **)(v2 + 4), "Ice") )
-                          {
-                            v7 = 26;
-                            goto LABEL_71;
-                          }
-                          if ( !_strcmpi(*(const char **)(v2 + 4), "Acid") )
-                          {
-                            v7 = 29;
-                            goto LABEL_71;
-                          }
-                          if ( _strcmpi(*(const char **)(v2 + 4), "Bless") )
-                          {
-                            if ( !_strcmpi(*(const char **)(v2 + 4), "Dragon") )
-                            {
-                              v7 = 97;
-                              goto LABEL_71;
-                            }
-                            if ( _strcmpi(*(const char **)(v2 + 4), "Reanimate") )
-                            {
-                              if ( !_strcmpi(*(const char **)(v2 + 4), "Summon") )
-                              {
-                                v7 = 82;
-                                goto LABEL_71;
-                              }
-                              if ( _strcmpi(*(const char **)(v2 + 4), "Fate") )
-                              {
-                                if ( _strcmpi(*(const char **)(v2 + 4), "Harm") )
-                                {
-                                  if ( !_strcmpi(*(const char **)(v2 + 4), "Mind") )
-                                  {
-                                    v7 = 57;
-                                    goto LABEL_71;
-                                  }
-                                  if ( _strcmpi(*(const char **)(v2 + 4), "Blades") )
-                                  {
-                                    if ( !_strcmpi(*(const char **)(v2 + 4), "Psychic") )
-                                    {
-                                      v7 = 65;
-                                      goto LABEL_71;
-                                    }
-                                    if ( _strcmpi(*(const char **)(v2 + 4), "Hammerhands") )
-                                    {
-                                      sprintf(pTmpBuf, "Unknown monster spell %s", *(int *)(v2 + 4));
-                                      MessageBoxA(nullptr, pTmpBuf, "E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Itemdata.cpp:1562", 0);
-                                      result = 0;
-                                      goto LABEL_76;
-                                    }
-                                    v7 = 73;
-                                  }
-                                  else
-                                  {
-                                    v7 = 39;
-                                  }
-                                }
-                                else
-                                {
-                                  v7 = 70;
-                                }
-                              }
-                              else
-                              {
-                                v7 = 47;
-                              }
-                            }
-                            else
-                            {
-                              v7 = 89;
-                            }
-                          }
-                          else
-                          {
-                            v7 = 46;
-                          }
-                        }
-                        else
-                        {
-                          v7 = 11;
-                        }
-                      }
-                      else
-                      {
-                        v7 = 6;
-                      }
-                    }
-                    else
-                    {
-                      v7 = 81;
-                    }
-                  }
-                  else
-                  {
-                    v7 = 93;
-                  }
-                }
-                else
-                {
-                  v7 = 15;
-                }
-              }
-              else
-              {
-                v7 = 51;
-              }
-            }
-            else
-            {
-              v7 = 5;
-            }
-          }
-          else
-          {
-            v7 = 20;
-          }
-        }
-        else
-        {
-          v7 = 17;
-        }
-        return v7;
-      }
-      v7 = 86;
-    }
-    else
-    {
-      v7 = 85;
-    }
-    *(int *)v3 += 2;
-    result = v7;
-  }
-  return result;
-}
-
-//----- (00454CB4) --------------------------------------------------------
-int __thiscall ParseAttackType(unsigned __int8 *a1)
-{
-  unsigned __int8 *v1; // esi@1
-  int result; // eax@4
-  int v3; // eax@15
-  int v4; // eax@18
-
-  v1 = a1;
-  if ( !a1 )
-    return 4;
-  if ( tolower(*a1) == 'f' )
-    return 0;
-  if ( tolower(*v1) == 'a' )
-    return 1;
-  if ( tolower(*v1) == 'w' )
-    return 2;
-  if ( tolower(*v1) == 'e' )
-  {
-    tolower(v1[1]);
-    return 3;
-  }
-  if ( tolower(*v1) == 's' )
-    return 6;
-  if ( tolower(*v1) == 'm' )
-  {
-    v3 = -(tolower(v1[1]) != 'i');
-    LOBYTE(v3) = v3 & 0xFE;
-    result = v3 + 7;
-  }
-  else
-  {
-    if ( tolower(*v1) == 'l' )
-      return 9;
-    v4 = -(tolower(*v1) != 'd');
-    LOBYTE(v4) = v4 & 0xFA;
-    result = v4 + 10;
-  }
-  return result;
-}
-
-//----- (00454D7D) --------------------------------------------------------
-char __fastcall ParseDamage(const char *Str, int a2, int a3, int a4)
-{
-  int v4; // esi@1
-  const char *v5; // edi@1
-  signed int v6; // ebx@1
-  int *v7; // esi@2
-  int v8; // eax@3
-  size_t v10; // [sp+Ch] [bp-Ch]@1
-  int v11; // [sp+10h] [bp-8h]@1
-  signed int v12; // [sp+14h] [bp-4h]@1
-
-  v4 = a2;
-  v5 = Str;
-  *(char *)a2 = 0;
-  *(char *)a3 = 1;
-  v11 = a2;
-  *(char *)a4 = 0;
-  v6 = 0;
-  v10 = strlen(Str);
-  v12 = 0;
-  if ( (signed int)v10 <= 0 )
-  {
-LABEL_9:
-    LOBYTE(v8) = *v5;
-    if ( (unsigned __int8)*v5 >= 0x30u && (unsigned __int8)v8 <= 0x39u )
-    {
-      *(char *)v4 = atoi(v5);
-      LOBYTE(v8) = a3;
-      *(char *)a3 = 1;
-    }
-    return v8;
-  }
-  do
-  {
-    v7 = (int *)&v5[v6];
-    if ( tolower((unsigned __int8)v5[v6]) == 100 )
-    {
-      *(char *)v7 = 0;
-      *(char *)v11 = atoi(v5);
-      LOBYTE(v8) = atoi(&v5[v6 + 1]);
-      v12 = 1;
-      *(char *)a3 = v8;
-      *(char *)v7 = 100;
-    }
-    else
-    {
-      v8 = tolower(*(char *)v7);
-      if ( v8 == 43 )
-      {
-        LOBYTE(v8) = atoi(&v5[v6 + 1]);
-        *(char *)a4 = v8;
-      }
-    }
-    ++v6;
-  }
-  while ( v6 < (signed int)v10 );
-  if ( !v12 )
-  {
-    v4 = v11;
-    goto LABEL_9;
-  }
-  return v8;
-}
-
-//----- (00454E3A) --------------------------------------------------------
-int __fastcall ParseMissleAttackType(const char *Str1)
-{
-  const char *v1; // esi@1
-  int v2; // edi@1
-  int v4; // [sp-4h] [bp-Ch]@4
-
-  v1 = Str1;
-  v2 = 0;
-  if ( _strcmpi(Str1, "ARROW") )
-  {
-    if ( _strcmpi(v1, "ARROWF") )
-    {
-      if ( _strcmpi(v1, "FIRE") )
-      {
-        if ( _strcmpi(v1, "AIR") )
-        {
-          if ( _strcmpi(v1, "WATER") )
-          {
-            if ( _strcmpi(v1, "EARTH") )
-            {
-              if ( _strcmpi(v1, "SPIRIT") )
-              {
-                if ( _strcmpi(v1, "MIND") )
-                {
-                  if ( _strcmpi(v1, "BODY") )
-                  {
-                    if ( _strcmpi(v1, "LIGHT") )
-                    {
-                      if ( _strcmpi(v1, "DARK") )
-                      {
-                        if ( _strcmpi(v1, "ENER") )
-                          return v2;
-                        v4 = 13;
-                      }
-                      else
-                      {
-                        v4 = 11;
-                      }
-                    }
-                    else
-                    {
-                      v4 = 10;
-                    }
-                  }
-                  else
-                  {
-                    v4 = 9;
-                  }
-                }
-                else
-                {
-                  v4 = 8;
-                }
-              }
-              else
-              {
-                v4 = 7;
-              }
-            }
-            else
-            {
-              v4 = 6;
-            }
-          }
-          else
-          {
-            v4 = 5;
-          }
-        }
-        else
-        {
-          v4 = 4;
-        }
-      }
-      else
-      {
-        v4 = 3;
-      }
-    }
-    else
-    {
-      v4 = 2;
-    }
-    return v4;
-  }
-  return 1;
-}
-
 
 
 
--- a/mm7_data.h	Sun Mar 17 14:25:00 2013 +0000
+++ b/mm7_data.h	Sun Mar 17 18:32:09 2013 +0400
@@ -2073,10 +2073,7 @@
 // int __cdecl crt_452B74();
 int __cdecl j_SetSomeItemsNames();
 
-unsigned int __fastcall ParseSpellType(struct FrameTableTxtLine *, int a2);
-int __thiscall ParseAttackType(unsigned __int8 *_this);
-char __fastcall ParseDamage(const char *Str, int a2, int a3, int a4);
-int __fastcall ParseMissleAttackType(const char *Str1);
+
 unsigned int __fastcall SkillToMastery(unsigned __int16 a1);
 unsigned int __fastcall GetSpellColor(signed int a1);
 void *__thiscall unknown_vdtor_6(void *_this, bool a2);