//private bool _hpchanged = false; protected override void UpdateProp() { Exp = new Exp(rawdata.api_exp, Level, true); //_hpchanged = HP.Current != rawdata.api_nowhp; HP = new LimitedValue(rawdata.api_nowhp, rawdata.api_maxhp); if (!IsRepairing) { RepairingHP = HP.Current; } Evasion = new LimitedValue(rawdata.api_kaihi); //ASW = new LimitedValue(rawdata.api_taisen); //LoS = new LimitedValue(rawdata.api_sakuteki); if (_ignorenextcondition) { _ignorenextcondition = false; } else if (rawdata.api_cond <= 49) { ConditionHelper.Instance.OnCondition(rawdata.api_cond - Condition); } Condition = rawdata.api_cond; Firepower = new Modernizable(ShipInfo.FirePower, rawdata.api_kyouka[0], rawdata.api_karyoku[0]); Torpedo = new Modernizable(ShipInfo.Torpedo, rawdata.api_kyouka[1], rawdata.api_raisou[0]); AA = new Modernizable(ShipInfo.AA, rawdata.api_kyouka[2], rawdata.api_taiku[0]); Armor = new Modernizable(ShipInfo.Armor, rawdata.api_kyouka[3], rawdata.api_soukou[0]); Luck = new Modernizable(ShipInfo.Luck, rawdata.api_kyouka[4], rawdata.api_lucky[0]); Fuel = new LimitedValue(rawdata.api_fuel, ShipInfo.MaxFuel); Bull = new LimitedValue(rawdata.api_bull, ShipInfo.MaxBull); UpdateEquipCore(); RepairTimePerHP = HP.IsMax ? TimeSpan.Zero : TimeSpan.FromSeconds((RepairTime.TotalSeconds - 30) / HP.Shortage); UpdateStatus(); }
protected override void UpdateProp() { FirePower = new LimitedValue(rawdata.api_houg); Torpedo = new LimitedValue(rawdata.api_raig); AA = new LimitedValue(rawdata.api_tyku); Armor = new LimitedValue(rawdata.api_souk); Luck = new LimitedValue(rawdata.api_luck); }
public QuestTarget(ICounter counter, int questid, QuestPeriod period, int max, int sharedwith = 0, string description = "") { Counter = counter; counter.Increased += Increase; QuestId = questid; Period = period; Progress = new LimitedValue(0, max); Description = description; sharedwithid = sharedwith; }
private void UpdateEquipCore() { Slots?.ForEach(x => x.Item?.SetNotOnShip()); int asw = rawdata.api_taisen[0]; int los = rawdata.api_sakuteki[0]; var slots = new List <Slot>(4); for (int i = 0; i < SlotNum; i++) { var slot = new Slot(); if (rawdata.api_slot[i] != -1 && (slot.Item = Staff.Current.Homeport.Equipments[rawdata.api_slot[i]]) != null) { slot.Item.OnShip = this; asw -= slot.Item.EquipInfo.ASW; los -= slot.Item.EquipInfo.LoS; } slots.Add(slot); } ASW = new LimitedValue(asw, rawdata.api_taisen[1]); LoS = new LimitedValue(los, rawdata.api_sakuteki[1]); for (int i = 0; i < slots.Count; i++) { slots[i].AirCraft = new LimitedValue(rawdata.api_onslot[i], ShipInfo.AirCraft[i]); } Slots = slots; SlotEx?.Item?.SetNotOnShip(); SlotEx = new Slot(); if (rawdata.api_slot_ex == 0) { SlotEx.IsLocked = true; } else if (rawdata.api_slot_ex != -1) { SlotEx.Item = Staff.Current.Homeport.Equipments[rawdata.api_slot_ex]; SlotEx.Item.OnShip = this; } }