private float flacHP;//HP自動回復用端数 public Player(Dungeon _dungeon) : base(_dungeon) { if (StaticData.PlayerParams == null) { StaticData.PlayerParams = new PlayerParams(); Name = "プレイヤー"; Level = 1; HP = DEFAULT_HP; MaxHP = DEFAULT_HP; Speed = 8; Satiety = 100; MaxSatiety = 100; Params.Str = 8; Params.Vit = 0; Params.Dex = 0; Params.Agi = 0; Equips.Add(ItemCategory.Weapon, null); Equips.Add(ItemCategory.Armor, null); Equips.Add(ItemCategory.Arrow, null); Equips.Add(ItemCategory.Ring, null); flacHP = 0; IsAction = false; } }
private static void ReadEquips() { ushort Count = Reader.ReadUInt16(); for (ushort i = 0; i < Count; i++) { EquipData eq = new EquipData(); eq.ID = Reader.ReadInt32(); eq.isCash = Reader.ReadBoolean(); eq.Type = ReadString(); eq.RequiredLevel = Reader.ReadByte(); eq.Scrolls = (byte)Reader.ReadUInt16(); eq.RequiredDexterity = Reader.ReadUInt16(); eq.RequiredIntellect = Reader.ReadUInt16(); eq.RequiredLuck = Reader.ReadUInt16(); eq.RequiredStrength = Reader.ReadUInt16(); eq.RequiredJob = Reader.ReadUInt16(); eq.Price = Reader.ReadInt32(); eq.Strength = Reader.ReadInt16(); eq.Dexterity = Reader.ReadInt16(); eq.Intellect = Reader.ReadInt16(); eq.Luck = Reader.ReadInt16(); eq.MagicDefense = Reader.ReadByte(); eq.WeaponDefense = Reader.ReadByte(); eq.WeaponAttack = Reader.ReadByte(); eq.MagicAttack = Reader.ReadByte(); eq.Speed = Reader.ReadByte(); eq.Jump = Reader.ReadByte(); eq.Accuracy = Reader.ReadByte(); eq.Avoidance = Reader.ReadByte(); eq.HP = Reader.ReadInt16(); eq.MP = Reader.ReadInt16(); Equips.Add(eq.ID, eq); } }
public void LoadEqupippet() { foreach (var eqp in this.Inventory.EquippedItems.Where(eq => eq.Slot < 0)) { byte realslot = (byte)(eqp.Slot * -1); if (Equips.ContainsKey(realslot)) { Log.WriteLine(LogLevel.Warn, "{0} has duplicate equip in slot {1}", eqp.EquipID, realslot); Equips.Remove(realslot); } Equips.Add(realslot, (ushort)eqp.EquipID); } }
public void AddEquipment(Equip equip) { if (equip != null) { _ninja.Budget -= equip.Price; _gearvalue += equip.Price; _ninjaStrength += equip.Strength; _ninjaAgillity += equip.Agillity; _ninjaIntelligence += equip.Intelligence; Equips.Add(equip); BudgetMessage = "Hidden"; } }
public new void AddEquips() { EquipmentsFactory factory = new EquipmentsFactory(); foreach (var v in spawns) { Equips.Add(factory.SpawnProduct(v.equipType, v.value)); } baseE.AddEquips(); foreach (var v in baseE.spawns) { Equips.AddRange(baseE.Equips); } return; }
public void AddItem(LockerItem lockerItem, BaseItem baseItem) { Items.Add(lockerItem); if (baseItem is EquipItem ei) { Equips.Add(ei); } else if (baseItem is BundleItem bi) { Bundles.Add(bi); } else if (baseItem is PetItem pi) { Pets.Add(pi); } }
public void ParseFormBinary(BinaryReader reader) { HeroID = reader.ReadInt32(); Level = reader.ReadInt32(); Exprices = reader.ReadInt32(); int Equips_Len = reader.ReadInt32(); while (Equips_Len-- > 0) { WearEquip Equips_Temp = new WearEquip(); Equips_Temp = new WearEquip(); Equips_Temp.ParseFormBinary(reader); Equips.Add(Equips_Temp); } int Magics_Len = reader.ReadInt32(); while (Magics_Len-- > 0) { HeroMagic Magics_Temp = new HeroMagic(); Magics_Temp = new HeroMagic(); Magics_Temp.ParseFormBinary(reader); Magics.Add(Magics_Temp); } }
public void AddEquip(string equip) { Equips.Add(equip); }