Ejemplo n.º 1
0
        private void _Init()
        {
            this._record = new List <ShipModel_Battle>();
            List <SlotitemModel_Battle> list = new List <SlotitemModel_Battle>();

            for (int i = 0; i < this._base_data.Fmt.Slot.get_Count(); i++)
            {
                if (this._base_data.Fmt.Slot.get_Item(i) > 0)
                {
                    list.Add(new SlotitemModel_Battle(this._base_data.Fmt.Slot.get_Item(i)));
                }
                else
                {
                    list.Add(null);
                }
            }
            while (list.get_Count() < this.SlotCount)
            {
                list.Add(null);
            }
            SlotitemModel_Battle slotitemex = null;

            if (base.HasSlotEx())
            {
                int          exSlot = this._base_data.Fmt.ExSlot;
                Mst_slotitem mst;
                if (Mst_DataManager.Instance.Mst_Slotitem.TryGetValue(exSlot, ref mst))
                {
                    slotitemex = new SlotitemModel_Battle(mst);
                }
            }
            ShipModel_BattleStart shipModel_BattleStart = new ShipModel_BattleStart(this._mst_data, this._base_data, this.HpEnd, list, slotitemex);

            this._record.Add(shipModel_BattleStart);
        }
Ejemplo n.º 2
0
        public __ShipModel_Attacker__(ShipModel baseModel, int index)
            : base(null, null, 0, null, null)
        {
            _mst_data             = Mst_DataManager.Instance.Mst_ship[baseModel.MstId];
            _baseModel            = baseModel;
            _base_data            = new __ShipModel_Battle_BaseData__();
            _base_data.Index      = base.Index;
            _base_data.IsFriend   = true;
            _base_data.IsPractice = false;
            _slotitems            = new List <SlotitemModel_Battle>();
            List <SlotitemModel> slotitemList = baseModel.SlotitemList;

            for (int i = 0; i < slotitemList.Count; i++)
            {
                SlotitemModel slotitemModel = slotitemList[i];
                if (slotitemModel == null)
                {
                    _slotitems.Add(null);
                }
                else
                {
                    _slotitems.Add(new SlotitemModel_Battle(slotitemList[i].MstId));
                }
            }
            if (_baseModel.HasExSlot() && _baseModel.SlotitemEx != null)
            {
                int mstId = _baseModel.SlotitemEx.MstId;
                _slotitemex = new SlotitemModel_Battle(mstId);
            }
        }
Ejemplo n.º 3
0
        private void _Init()
        {
            _record = new List <ShipModel_Battle>();
            List <SlotitemModel_Battle> list = new List <SlotitemModel_Battle>();

            for (int i = 0; i < _base_data.Fmt.Slot.Count; i++)
            {
                if (_base_data.Fmt.Slot[i] > 0)
                {
                    list.Add(new SlotitemModel_Battle(_base_data.Fmt.Slot[i]));
                }
                else
                {
                    list.Add(null);
                }
            }
            while (list.Count < SlotCount)
            {
                list.Add(null);
            }
            SlotitemModel_Battle slotitemex = null;

            if (HasSlotEx())
            {
                int exSlot = _base_data.Fmt.ExSlot;
                if (Mst_DataManager.Instance.Mst_Slotitem.TryGetValue(exSlot, out Mst_slotitem value))
                {
                    slotitemex = new SlotitemModel_Battle(value);
                }
            }
            ShipModel_BattleStart item = new ShipModel_BattleStart(_mst_data, _base_data, HpEnd, list, slotitemex);

            _record.Add(item);
        }
Ejemplo n.º 4
0
 public __ShipModel_Battle__(Mst_ship mst_data, __ShipModel_Battle_BaseData__ baseData, int hp, List <SlotitemModel_Battle> slotitems, SlotitemModel_Battle slotitemex)
 {
     _mst_data   = mst_data;
     _base_data  = baseData;
     _hp         = hp;
     _slotitems  = slotitems;
     _slotitemex = slotitemex;
 }
Ejemplo n.º 5
0
 protected string _ToString(SlotitemModel_Battle item)
 {
     if (item == null)
     {
         return("[-]");
     }
     return($"[{item.Name}({item.MstId})]");
 }
 public ShipModel_Defender(Mst_ship mst_data, __ShipModel_Battle_BaseData__ baseData, int hp, List <SlotitemModel_Battle> slotitems, SlotitemModel_Battle slotitemex)
 {
     this._mst_data          = mst_data;
     this._base_data         = baseData;
     this._hp_before         = hp;
     this._slotitems_before  = slotitems;
     this._slotitemex_before = slotitemex;
     this._hp_after          = (this._hp_pre_after = (this._hp_after_recovery = this._hp_before));
 }
 public ShipModel_Eater(Mst_ship mst_data, __ShipModel_Battle_BaseData__ baseData, int hp, List <SlotitemModel_Battle> slotitems, SlotitemModel_Battle slotitemex)
 {
     this._mst_data          = mst_data;
     this._base_data         = baseData;
     this._hp                = hp;
     this._slotitems_before  = slotitems;
     this._slotitemex_before = slotitemex;
     this._init();
 }
Ejemplo n.º 8
0
        public bool HasRecoverMegami()
        {
            if (this.SlotitemExEnd != null && this.SlotitemExEnd.MstId == 43)
            {
                return(true);
            }
            SlotitemModel_Battle slotitemModel_Battle = this.SlotitemListEnd.Find((SlotitemModel_Battle item) => item != null && item.MstId == 43);

            return(slotitemModel_Battle != null);
        }
Ejemplo n.º 9
0
        public bool HasRecoverYouin()
        {
            if (SlotitemExEnd != null && SlotitemExEnd.MstId == 42)
            {
                return(true);
            }
            SlotitemModel_Battle slotitemModel_Battle = SlotitemListEnd.Find((SlotitemModel_Battle item) => item != null && item.MstId == 42);

            return(slotitemModel_Battle != null);
        }
        public bool HasRecoverMegami()
        {
            if (this.SlotitemExBefore != null && this.SlotitemExBefore.MstId == 43)
            {
                return(true);
            }
            SlotitemModel_Battle slotitemModel_Battle = this._slotitems_before.Find((SlotitemModel_Battle item) => item != null && item.MstId == 43);

            return(slotitemModel_Battle != null);
        }
Ejemplo n.º 11
0
        public bool HasRecoverYouin()
        {
            if (SlotitemExBefore != null && SlotitemExBefore.MstId == 42)
            {
                return(true);
            }
            SlotitemModel_Battle slotitemModel_Battle = _slotitems_before.Find((SlotitemModel_Battle item) => item != null && item.MstId == 42);

            return(slotitemModel_Battle != null);
        }
Ejemplo n.º 12
0
        protected string _ToString(List <SlotitemModel_Battle> items, SlotitemModel_Battle item_ex)
        {
            string str = "(";

            for (int i = 0; i < items.Count; i++)
            {
                SlotitemModel_Battle item = items[i];
                str += _ToString(item);
            }
            str = ((!HasSlotEx()) ? (str + " [X]") : (str + " ex:" + _ToString(item_ex)));
            return(str + ")");
        }
Ejemplo n.º 13
0
 public ShipModel_Practice(Mem_ship mem_ship, List <Mst_slotitem> slotitems) : base(mem_ship)
 {
     this._slotitems = new List <ISlotitemModel>();
     for (int i = 0; i < slotitems.get_Count(); i++)
     {
         Mst_slotitem   mst           = slotitems.get_Item(i);
         ISlotitemModel slotitemModel = new SlotitemModel_Battle(mst);
         this._slotitems.Add(slotitemModel);
     }
     while (this._slotitems.get_Count() < this.SlotCount)
     {
         this._slotitems.Add(null);
     }
 }
        protected string _ToString(SlotitemModel_Battle item)
        {
            string result;

            if (item == null)
            {
                result = "[-]";
            }
            else
            {
                result = string.Format("[{0}({1})]", item.Name, item.MstId);
            }
            return(result);
        }
Ejemplo n.º 15
0
 public ShipModel_Practice(Mem_ship mem_ship, List <Mst_slotitem> slotitems)
     : base(mem_ship)
 {
     _slotitems = new List <ISlotitemModel>();
     for (int i = 0; i < slotitems.Count; i++)
     {
         Mst_slotitem   mst  = slotitems[i];
         ISlotitemModel item = new SlotitemModel_Battle(mst);
         _slotitems.Add(item);
     }
     while (_slotitems.Count < SlotCount)
     {
         _slotitems.Add(null);
     }
 }
Ejemplo n.º 16
0
        public override string ToString()
        {
            string str = $"{base.Name}(mstId:{base.MstId})[{Hp}/{MaxHp}({DmgState})";

            str += " ";
            str += _ToString(SlotitemListBefore, SlotitemExBefore);
            str += " -> ";
            str += _ToString(SlotitemListAfterRation, SlotitemExAfterRation);
            str += " ((";
            for (int i = 0; i < SlotitemListRation.Count; i++)
            {
                SlotitemModel_Battle item = SlotitemListRation[i];
                str += _ToString(item);
            }
            return(str + "))");
        }
        protected string _ToString(List <SlotitemModel_Battle> items, SlotitemModel_Battle item_ex)
        {
            string text = "(";

            for (int i = 0; i < items.get_Count(); i++)
            {
                SlotitemModel_Battle item = items.get_Item(i);
                text += this._ToString(item);
            }
            if (this.HasSlotEx())
            {
                text = text + " ex:" + this._ToString(item_ex);
            }
            else
            {
                text += " [X]";
            }
            return(text + ")");
        }
        private void _init()
        {
            HashSet <int> hashSet = new HashSet <int>();

            this._slotitems_after_ration = new List <SlotitemModel_Battle>();
            this._slotitems_ration       = new List <SlotitemModel_Battle>();
            int num = 43;
            SlotitemModel_Battle slotitemModel_Battle = this._slotitemex_before;

            if (slotitemModel_Battle != null && slotitemModel_Battle.Type3 == num && !hashSet.Contains(slotitemModel_Battle.MstId))
            {
                this._slotitems_ration.Add(slotitemModel_Battle);
                hashSet.Add(slotitemModel_Battle.MstId);
                this._slotitemex_after_ration = null;
            }
            else
            {
                this._slotitemex_after_ration = slotitemModel_Battle;
            }
            for (int i = this._slotitems_before.get_Count() - 1; i >= 0; i--)
            {
                slotitemModel_Battle = this._slotitems_before.get_Item(i);
                if (slotitemModel_Battle != null && slotitemModel_Battle.Type3 == num && !hashSet.Contains(slotitemModel_Battle.MstId))
                {
                    this._slotitems_ration.Add(slotitemModel_Battle);
                    hashSet.Add(slotitemModel_Battle.MstId);
                }
                else
                {
                    this._slotitems_after_ration.Add(slotitemModel_Battle);
                }
            }
            this._slotitems_after_ration.Reverse();
            while (this._slotitems_after_ration.get_Count() < this.SlotCount)
            {
                this._slotitems_after_ration.Add(null);
            }
        }
Ejemplo n.º 19
0
        private void _init()
        {
            HashSet <int> hashSet = new HashSet <int>();

            _slotitems_after_ration = new List <SlotitemModel_Battle>();
            _slotitems_ration       = new List <SlotitemModel_Battle>();
            int num = 43;
            SlotitemModel_Battle slotitemex_before = _slotitemex_before;

            if (slotitemex_before != null && slotitemex_before.Type3 == num && !hashSet.Contains(slotitemex_before.MstId))
            {
                _slotitems_ration.Add(slotitemex_before);
                hashSet.Add(slotitemex_before.MstId);
                _slotitemex_after_ration = null;
            }
            else
            {
                _slotitemex_after_ration = slotitemex_before;
            }
            for (int num2 = _slotitems_before.Count - 1; num2 >= 0; num2--)
            {
                slotitemex_before = _slotitems_before[num2];
                if (slotitemex_before != null && slotitemex_before.Type3 == num && !hashSet.Contains(slotitemex_before.MstId))
                {
                    _slotitems_ration.Add(slotitemex_before);
                    hashSet.Add(slotitemex_before.MstId);
                }
                else
                {
                    _slotitems_after_ration.Add(slotitemex_before);
                }
            }
            _slotitems_after_ration.Reverse();
            while (_slotitems_after_ration.Count < SlotCount)
            {
                _slotitems_after_ration.Add(null);
            }
        }
        public override string ToString()
        {
            string text = string.Format("{0}(mstId:{1})[{2}/{3}({4})", new object[]
            {
                base.Name,
                base.MstId,
                this.Hp,
                this.MaxHp,
                this.DmgState
            });

            text += " ";
            text += base._ToString(this.SlotitemListBefore, this.SlotitemExBefore);
            text += " -> ";
            text += base._ToString(this.SlotitemListAfterRation, this.SlotitemExAfterRation);
            text += " ((";
            for (int i = 0; i < this.SlotitemListRation.get_Count(); i++)
            {
                SlotitemModel_Battle item = this.SlotitemListRation.get_Item(i);
                text += base._ToString(item);
            }
            return(text + "))");
        }
Ejemplo n.º 21
0
 private void _SetHpAfterRecovery()
 {
     _slotitems_after_recovery  = null;
     _slotitemex_after_recovery = null;
     if (DamageEventAfter == DamagedStates.Youin)
     {
         if (_slotitemex_before != null && _slotitemex_before.MstId == 42)
         {
             _slotitemex_after_recovery = null;
             if (base.Index == 0)
             {
                 _hp_after_recovery = (int)Math.Floor((double)MaxHp * 0.5);
             }
             else
             {
                 _hp_after_recovery = (int)Math.Floor((double)MaxHp * 0.20000000298023224);
             }
             return;
         }
         _slotitems_after_recovery = new List <SlotitemModel_Battle>();
         bool flag = false;
         for (int i = 0; i < _slotitems_before.Count; i++)
         {
             SlotitemModel_Battle slotitemModel_Battle = _slotitems_before[i];
             if (!flag && slotitemModel_Battle != null && slotitemModel_Battle.MstId == 42)
             {
                 if (base.Index == 0)
                 {
                     _hp_after_recovery = (int)Math.Floor((double)MaxHp * 0.5);
                 }
                 else
                 {
                     _hp_after_recovery = (int)Math.Floor((double)MaxHp * 0.20000000298023224);
                 }
                 flag = true;
             }
             else
             {
                 _slotitems_after_recovery.Add(slotitemModel_Battle);
             }
         }
         while (_slotitems_after_recovery.Count < _slotitems_before.Count)
         {
             _slotitems_after_recovery.Add(null);
         }
         _slotitemex_after_recovery = _slotitemex_before;
     }
     else if (DamageEventAfter == DamagedStates.Megami)
     {
         if (_slotitemex_before != null && _slotitemex_before.MstId == 43)
         {
             _slotitemex_after_recovery = null;
             _hp_after_recovery         = MaxHp;
             return;
         }
         _slotitems_after_recovery = new List <SlotitemModel_Battle>();
         bool flag2 = false;
         for (int j = 0; j < _slotitems_before.Count; j++)
         {
             SlotitemModel_Battle slotitemModel_Battle2 = _slotitems_before[j];
             if (!flag2 && slotitemModel_Battle2 != null && slotitemModel_Battle2.MstId == 43)
             {
                 _hp_after_recovery = MaxHp;
                 flag2 = true;
             }
             else
             {
                 _slotitems_after_recovery.Add(slotitemModel_Battle2);
             }
         }
         while (_slotitems_after_recovery.Count < _slotitems_before.Count)
         {
             _slotitems_after_recovery.Add(null);
         }
         _slotitemex_after_recovery = _slotitemex_before;
     }
     else
     {
         _hp_after_recovery         = _hp_after;
         _slotitemex_after_recovery = _slotitemex_before;
     }
 }
 private void _SetHpAfterRecovery()
 {
     this._slotitems_after_recovery  = null;
     this._slotitemex_after_recovery = null;
     if (this.DamageEventAfter == DamagedStates.Youin)
     {
         if (this._slotitemex_before != null && this._slotitemex_before.MstId == 42)
         {
             this._slotitemex_after_recovery = null;
             if (base.Index == 0)
             {
                 this._hp_after_recovery = (int)Math.Floor((double)this.MaxHp * 0.5);
             }
             else
             {
                 this._hp_after_recovery = (int)Math.Floor((double)this.MaxHp * 0.20000000298023224);
             }
         }
         else
         {
             this._slotitems_after_recovery = new List <SlotitemModel_Battle>();
             bool flag = false;
             for (int i = 0; i < this._slotitems_before.get_Count(); i++)
             {
                 SlotitemModel_Battle slotitemModel_Battle = this._slotitems_before.get_Item(i);
                 if (!flag && slotitemModel_Battle != null && slotitemModel_Battle.MstId == 42)
                 {
                     if (base.Index == 0)
                     {
                         this._hp_after_recovery = (int)Math.Floor((double)this.MaxHp * 0.5);
                     }
                     else
                     {
                         this._hp_after_recovery = (int)Math.Floor((double)this.MaxHp * 0.20000000298023224);
                     }
                     flag = true;
                 }
                 else
                 {
                     this._slotitems_after_recovery.Add(slotitemModel_Battle);
                 }
             }
             while (this._slotitems_after_recovery.get_Count() < this._slotitems_before.get_Count())
             {
                 this._slotitems_after_recovery.Add(null);
             }
             this._slotitemex_after_recovery = this._slotitemex_before;
         }
     }
     else if (this.DamageEventAfter == DamagedStates.Megami)
     {
         if (this._slotitemex_before != null && this._slotitemex_before.MstId == 43)
         {
             this._slotitemex_after_recovery = null;
             this._hp_after_recovery         = this.MaxHp;
         }
         else
         {
             this._slotitems_after_recovery = new List <SlotitemModel_Battle>();
             bool flag2 = false;
             for (int j = 0; j < this._slotitems_before.get_Count(); j++)
             {
                 SlotitemModel_Battle slotitemModel_Battle2 = this._slotitems_before.get_Item(j);
                 if (!flag2 && slotitemModel_Battle2 != null && slotitemModel_Battle2.MstId == 43)
                 {
                     this._hp_after_recovery = this.MaxHp;
                     flag2 = true;
                 }
                 else
                 {
                     this._slotitems_after_recovery.Add(slotitemModel_Battle2);
                 }
             }
             while (this._slotitems_after_recovery.get_Count() < this._slotitems_before.get_Count())
             {
                 this._slotitems_after_recovery.Add(null);
             }
             this._slotitemex_after_recovery = this._slotitemex_before;
         }
     }
     else
     {
         this._hp_after_recovery         = this._hp_after;
         this._slotitemex_after_recovery = this._slotitemex_before;
     }
 }
Ejemplo n.º 23
0
        public bool HasRocket()
        {
            SlotitemModel_Battle slotitemModel_Battle = _slotitems.Find((SlotitemModel_Battle item) => item != null && item.Type3 == 37);

            return(slotitemModel_Battle != null);
        }
Ejemplo n.º 24
0
        public bool HasMihari()
        {
            SlotitemModel_Battle slotitemModel_Battle = _slotitems.Find((SlotitemModel_Battle item) => item != null && item.MstId == 129);

            return(slotitemModel_Battle != null);
        }
Ejemplo n.º 25
0
 public ShipModel_Attacker(Mst_ship mst_data, __ShipModel_Battle_BaseData__ baseData, int hp, List <SlotitemModel_Battle> slotitems, SlotitemModel_Battle slotitemex)
     : base(mst_data, baseData, hp, slotitems, slotitemex)
 {
 }