Esempio n. 1
0
        public string GetDataAsHtml( string stratum, int floor, T8BTEMST.T8BTEMST Enemies, T8BTEMGP.T8BTEMGP EnemyGroups, T8BTEMEG.T8BTEMEG EncounterGroups, GameVersion version, T8BTXTMT treasures, ItemDat.ItemDat items, Dictionary<uint, TSS.TSSEntry> inGameIdDict, bool surroundingTable = true, bool phpLinks = false )
        {
            StringBuilder sb = new StringBuilder();

            if ( surroundingTable ) {
                sb.Append( "<div id=\"" + stratum + floor + "\">" );
                sb.Append( "<table class=\"necropolisfloor\">" );
                sb.Append( "<tr>" );
                sb.Append( "<th colspan=\"6\">" );
                sb.Append( "<div class=\"itemname\" style=\"text-align: center;\">" );
                sb.Append( stratum + "-" + floor );
                sb.Append( "</div>" );
                sb.Append( "</td>" );
                sb.Append( "</tr>" );
            }
            for ( int y = 0; y < VerticalTiles; y++ ) {
                sb.Append( "<tr>" );
                for ( int x = 0; x < HorizontalTiles; x++ ) {
                    sb.Append( TileList[(int)( y * HorizontalTiles + x )].GetDataAsHtml( stratum, floor, Enemies, EnemyGroups, EncounterGroups, version, treasures, items, inGameIdDict, phpLinks: phpLinks ) );
                }
                sb.Append( "</tr>" );
                //sb.Append( "<tr><td colspan=\"" + HorizontalTiles + "\"><hr></td></tr>" );
            }
            if ( surroundingTable ) {
                sb.Append( "</table>" );
                sb.Append( "</div>" );
            }

            return sb.ToString();
        }
        public string GetDataAsHtml( T8BTEMGP.T8BTEMGP enemyGroups, T8BTEMST.T8BTEMST enemies, Dictionary<uint, TSS.TSSEntry> inGameIdDict )
        {
            StringBuilder sb = new StringBuilder();

            sb.Append( "<tr><td>" );
            sb.Append( RefString );
            sb.Append( "<br>" );
            sb.Append( inGameIdDict[StringDicID].StringEngOrJpnHtml( GameVersion.PS3 ) );
            for ( int i = 0; i < EnemyGroupIDs.Length; ++i ) {
                if ( EnemyGroupIDs[i] == 0xFFFFFFFFu ) { continue; }

                var group = enemyGroups.EnemyGroupIdDict[EnemyGroupIDs[i]];
                foreach ( int enemyId in group.EnemyIDs ) {
                    if ( enemyId < 0 ) { continue; }
                    var enemy = enemies.EnemyIdDict[(uint)enemyId];
                    sb.Append( inGameIdDict[enemy.NameStringDicID].StringEngOrJpnHtml( GameVersion.PS3 ) );
                    sb.Append( "<br>" );
                }
            }
            sb.Append( "</td></tr>" );

            return sb.ToString();
        }
Esempio n. 3
0
        public string GetDataAsHtml( string stratum, int floor, T8BTEMST.T8BTEMST Enemies, T8BTEMGP.T8BTEMGP EnemyGroups, T8BTEMEG.T8BTEMEG EncounterGroups, GameVersion version, T8BTXTMT treasures, ItemDat.ItemDat items, Dictionary<uint, TSS.TSSEntry> inGameIdDict, bool phpLinks = false )
        {
            StringBuilder sb = new StringBuilder();
            bool printEnemies = Enemies != null && EnemyGroups != null && EncounterGroups != null;

            sb.Append( "<td class=\"necropolistile" + RoomType + "\">" );
            if ( RoomType != 0 ) {
                sb.Append( "<div class=\"necropolis-arrow-up\">" );
                if ( MoveUpAllowed > 0 ) { sb.Append( "<img src=\"etc/up.png\" width=\"16\" height=\"16\">" ); }
                sb.Append( "</div>" );
                sb.Append( "<div class=\"necropolis-arrow-side\">" );
                if ( MoveLeftAllowed > 0 ) { sb.Append( "<img src=\"etc/left.png\" width=\"16\" height=\"16\">" ); }
                sb.Append( "</div>" );

                sb.Append( "<div class=\"necropolis-data\">" );

                if ( printEnemies ) {
                    foreach ( uint groupId in EncounterGroups.EncounterGroupIdDict[EnemyGroup].EnemyGroupIDs ) {
                        if ( groupId == 0xFFFFFFFFu ) { continue; }
                        foreach ( int enemyId in EnemyGroups.EnemyGroupIdDict[groupId].EnemyIDs ) {
                            if ( enemyId < 0 ) { continue; }
                            var enemy = Enemies.EnemyIdDict[(uint)enemyId];
                            sb.Append( "<a href=\"" + Website.GenerateWebsite.GetUrl( Website.WebsiteSection.Enemy, version, phpLinks, category: (int)enemy.Category, id: (int)enemy.InGameID ) + "\">" );
                            sb.Append( "<img src=\"monster-icons/46px/monster-" + enemy.IconID.ToString( "D3" ) + ".png\" title=\"" + inGameIdDict[enemy.NameStringDicID].StringEngOrJpnHtml( version ) + "\" width=\"23\" height=\"23\">" );
                            sb.Append( "</a>" );
                        }
                        sb.Append( "<br>" );
                    }
                } else {
                    sb.Append( "<img src=\"item-icons/ICON60.png\" width=\"16\" height=\"16\"> " + ( FramesToMove / 60 ) + " sec<br>" );

                    int targetFloor;
                    string targetID;
                    switch ( RoomType ) {
                        case 1: sb.Append( "Entrance<br>" ); break;
                        case 2:
                        case 5:
                            if ( RoomType == 5 ) {
                                targetFloor = ( floor + FloorExitDiff );
                            } else {
                                targetFloor = ( floor + 1 );
                            }
                            if ( targetFloor == 11 ) {
                                targetID = (char)( ( (int)stratum[0] ) + 1 ) + "1";
                            } else {
                                targetID = stratum + targetFloor;
                            }

                            sb.Append( "Exit to <a href=\"" );
                            if ( phpLinks ) {
                                sb.Append( "?version=ps3&section=necropolis&map=" + targetID );
                            } else {
                                sb.Append( "#" + targetID );
                            }
                            sb.Append( "\">" + stratum + "-" + targetFloor + "</a><br>" );

                            break;
                        case 3:
                            //sb.Append( "Regular Room<br>" );
                            break;
                        case 4:
                            //sb.Append( "Treasure Room<br>" );
                            break;
                    }

                    if ( RegularTreasure > 0 ) {
                        // not a generic solution, but the unmodified game has all four slots identical for regular treasures
                        var treasureInfo = treasures.TreasureInfoList[(int)RegularTreasure];
                        sb.Append( "<table>" );
                        sb.Append( "<tr>" );
                        for ( int i = 0; i < 3; ++i ) {
                            var item = items.itemIdDict[treasureInfo.Items[i]];
                            sb.Append( "<td>" );
                            sb.Append( "<a href=\"" + Website.GenerateWebsite.GetUrl( Website.WebsiteSection.Item, version, phpLinks, id: (int)item.Data[(int)ItemData.ID], icon: (int)item.Data[(int)ItemData.Icon] ) + "\">" );
                            sb.Append( "<img src=\"items/U_" + item.ItemString.TrimNull() + ".png\" height=\"32\" width=\"32\" title=\"" + inGameIdDict[item.NamePointer].StringEngOrJpnHtml( version ) + "\">" );
                            sb.Append( "</a>" );
                            sb.Append( "</td>" );
                        }
                        sb.Append( "</tr>" );
                        sb.Append( "<tr>" );
                        for ( int i = 0; i < 3; ++i ) {
                            sb.Append( "<td>" );
                            sb.Append( treasureInfo.Chances[i] + "%" );
                            sb.Append( "</td>" );
                        }
                        sb.Append( "</tr>" );
                        sb.Append( "</table>" );
                    }

                    if ( SpecialTreasure > 0 ) {
                        // unmodified game always has special treasures as one in the first slot with 100% chance
                        var treasureInfo = treasures.TreasureInfoList[(int)SpecialTreasure];
                        var item = items.itemIdDict[treasureInfo.Items[0]];
                        sb.Append( "<img src=\"item-icons/ICON" + item.Data[(int)ItemDat.ItemData.Icon] + ".png\" height=\"16\" width=\"16\"> " );
                        sb.Append( "<a href=\"" + Website.GenerateWebsite.GetUrl( Website.WebsiteSection.Item, version, phpLinks, id: (int)item.Data[(int)ItemData.ID], icon: (int)item.Data[(int)ItemData.Icon] ) + "\">" );
                        sb.Append( inGameIdDict[item.NamePointer].StringEngOrJpnHtml( version ) + "</a><br>" );
                    }
                }

                sb.Append( "</div>" );

                sb.Append( "<div class=\"necropolis-arrow-side\">" );
                if ( MoveRightAllowed > 0 ) { sb.Append( "<img src=\"etc/right.png\" width=\"16\" height=\"16\">" ); }
                sb.Append( "</div>" );
                sb.Append( "<div class=\"necropolis-arrow-down\">" );
                if ( MoveDownAllowed > 0 ) { sb.Append( "<img src=\"etc/down.png\" width=\"16\" height=\"16\">" ); }
                sb.Append( "</div>" );
            }
            sb.Append( "</td>" );

            return sb.ToString();
        }