Пример #1
0
        public static Enemy Load(Battle.EnemyInstanceInformation eii, byte fixedLevel = 0, ushort?startingHP = null)
        {
            var r = new Enemy
            {
                EII        = eii,
                FixedLevel = fixedLevel
            };

            r._CurrentHP = startingHP ?? r.MaxHP();
            if ((r.Info.BitSwitch & Flag1.Zombie) != 0)
            {
                r.Statuses0 |= PersistentStatuses.Zombie;
            }
            if ((r.Info.BitSwitch & Flag1.AutoProtect) != 0)
            {
                r.Statuses1 |= BattleOnlyStatuses.Protect;
            }
            if ((r.Info.BitSwitch & Flag1.AutoReflect) != 0)
            {
                r.Statuses1 |= BattleOnlyStatuses.Reflect;
            }
            if ((r.Info.BitSwitch & Flag1.AutoShell) != 0)
            {
                r.Statuses1 |= BattleOnlyStatuses.Shell;
            }
            if ((r.Info.BitSwitch & Flag1.Fly) != 0)
            {
                r.Statuses1 |= BattleOnlyStatuses.Float;
            }
            r.Init();
            return(r);
        }
Пример #2
0
        public static Enemy Load(Battle.EnemyInstanceInformation eII, byte fixedLevel = 0, ushort?startinghp = null)
        {
            Enemy r = new Enemy
            {
                EII        = eII,
                FixedLevel = fixedLevel
            };

            r._CurrentHP = startinghp ?? r.MaxHP();
            if ((r.Info.bitSwitch & Debug_battleDat.Information.Flag1.Zombie) != 0)
            {
                r.Statuses0 |= Kernel_bin.Persistent_Statuses.Zombie;
            }
            if ((r.Info.bitSwitch & Debug_battleDat.Information.Flag1.Auto_Protect) != 0)
            {
                r.Statuses1 |= Kernel_bin.Battle_Only_Statuses.Protect;
            }
            if ((r.Info.bitSwitch & Debug_battleDat.Information.Flag1.Auto_Reflect) != 0)
            {
                r.Statuses1 |= Kernel_bin.Battle_Only_Statuses.Reflect;
            }
            if ((r.Info.bitSwitch & Debug_battleDat.Information.Flag1.Auto_Shell) != 0)
            {
                r.Statuses1 |= Kernel_bin.Battle_Only_Statuses.Shell;
            }
            if ((r.Info.bitSwitch & Debug_battleDat.Information.Flag1.Fly) != 0)
            {
                r.Statuses1 |= Kernel_bin.Battle_Only_Statuses.Float;
            }
            r.Init();
            return(r);
        }