Beispiel #1
0
    public static void SetupBattleEnemy()
    {
        SB2_PATTERN[] patAddr   = FF9StateSystem.Battle.FF9Battle.btl_scene.PatAddr;
        SB2_HEAD      header    = FF9StateSystem.Battle.FF9Battle.btl_scene.header;
        BTL_SCENE     btl_scene = FF9StateSystem.Battle.FF9Battle.btl_scene;

        if (FF9StateSystem.Battle.isDebug)
        {
            btl_scene.Info.StartType = FF9StateSystem.Battle.debugStartType;
        }
        else
        {
            btl_scene.Info.StartType = btl_sys.StartType(btl_scene.Info);
        }
        SB2_MON_PARM[] monAddr = FF9StateSystem.Battle.FF9Battle.btl_scene.MonAddr;
        AA_DATA[]      atk     = FF9StateSystem.Battle.FF9Battle.btl_scene.atk;
        Int16          num     = (Int16)(header.TypCount + header.AtkCount);
        UInt16         num2    = 0;

        SB2_MON_PARM[] array      = monAddr;
        ENEMY_TYPE[]   enemy_type = FF9StateSystem.Battle.FF9Battle.enemy_type;
        Int16          num3;

        for (num3 = 0; num3 < (Int16)header.TypCount; num3 = (Int16)(num3 + 1))
        {
            btl_init.SetMonsterParameter(array[(Int32)num3], ref enemy_type[(Int32)num3]);
            enemy_type[(Int32)num3].name = FF9TextTool.BattleText((Int32)num2);
            enemy_type[(Int32)num3].mes  = (Byte)num;
            num  = (Int16)(num + (Int16)array[(Int32)num3].MesCnt);
            num2 = (UInt16)(num2 + 1);
        }
        AA_DATA[] array2       = atk;
        AA_DATA[] enemy_attack = FF9StateSystem.Battle.FF9Battle.enemy_attack;
        for (num3 = 0; num3 < (Int16)header.AtkCount; num3 = (Int16)(num3 + 1))
        {
            btl_init.SetAttackData(ref array2[(Int32)num3], ref enemy_attack[(Int32)num3]);
            enemy_attack[(Int32)num3].Name = FF9TextTool.BattleText((Int32)num2);
            num2 = (UInt16)(num2 + 1);
        }
        BTL_DATA    next        = FF9StateSystem.Battle.FF9Battle.btl_list.next;
        SB2_PATTERN sb2_PATTERN = patAddr[(Int32)FF9StateSystem.Battle.FF9Battle.btl_scene.PatNum];

        num3 = 0;
        while (num3 < (Int16)sb2_PATTERN.MonCount && next != null)
        {
            btl_init.PutMonster(sb2_PATTERN.Put[(Int32)num3], next, btl_scene, num3);
            btl_init.SetMonsterData(monAddr[(Int32)sb2_PATTERN.Put[(Int32)num3].TypeNo], next, num3);
            num3 = (Int16)(num3 + 1);
            next = next.next;
        }
    }
Beispiel #2
0
    public static void SetupBattleScene()
    {
        SB2_HEAD  header    = FF9StateSystem.Battle.FF9Battle.btl_scene.header;
        BTL_SCENE btl_scene = FF9StateSystem.Battle.FF9Battle.btl_scene;
        UInt16    flags     = header.Flags;

        btl_scene.Info = new BTL_SCENE_INFO();
        if ((flags & 1) != 0)
        {
            btl_scene.Info.SpecialStart = 1;
        }
        if ((flags & 2) != 0)
        {
            btl_scene.Info.BackAttack = 1;
        }
        if ((flags & 4) != 0)
        {
            btl_scene.Info.NoGameOver = 1;
        }
        if ((flags & 8) != 0)
        {
            btl_scene.Info.NoExp = 1;
        }
        if ((flags & 16) == 0)
        {
            btl_scene.Info.WinPose = 1;
        }
        if ((flags & 32) == 0)
        {
            btl_scene.Info.Runaway = 1;
        }
        if ((flags & 64) != 0)
        {
            btl_scene.Info.NoNeighboring = 1;
        }
        if ((flags & 128) != 0)
        {
            btl_scene.Info.NoMagical = true;
        }
        if ((flags & 256) != 0)
        {
            btl_scene.Info.ReverseAttack = 1;
        }
        if ((flags & 512) != 0)
        {
            btl_scene.Info.FixedCamera1 = 1;
        }
        if ((flags & 1024) != 0)
        {
            btl_scene.Info.FixedCamera2 = 1;
        }
        if ((flags & 2048) != 0)
        {
            btl_scene.Info.AfterEvent = 1;
        }
        if (FF9StateSystem.Battle.IsPlayFieldBGMInCurrentBattle)
        {
            btl_scene.Info.FieldBGM = 1;
        }
        else
        {
            btl_scene.Info.FieldBGM = 0;
        }
        battle.btl_bonus.ap = (UInt16)FF9StateSystem.Battle.FF9Battle.btl_scene.PatAddr[(Int32)FF9StateSystem.Battle.FF9Battle.btl_scene.PatNum].AP;
    }