// public int speed = 0; public Creature(World world, int location_x, int location_y, float hp, ArmorType armor, WeaponType weapon, float atk, float def, int area, int movement, int range = 1) : base(world, location_x, location_y, hp, area, movement) { Armor = armor; Weapon = weapon; Range = range; // Units = unit; // Here speed is treated as priority for attacking. The party has higher speed attacks first. // Here we calcuate speed bonus for Armors. if (Armor == ArmorType.Cloth) Speed += 10; else if (Armor == ArmorType.Leather) Speed += 8; else if (Armor == ArmorType.Wooden) Speed += 6; else if (Armor == ArmorType.Mail) Speed += 4; else if (Armor == ArmorType.Plate) Speed += 3; // Here we calcuate speed bonus for Weapons. if (Weapon == WeaponType.Light) Speed += 6; else if (Weapon == WeaponType.Piercing) Speed += 4; else if (Weapon == WeaponType.Heavy) Speed += 2; else if (Weapon == WeaponType.Energy) Speed += 3; Def = def + (int)Armor; Atk = atk; }
private void OnEquipArmor(ArmorType armorType) { ReturnSoldierArmor(); GameState.SelectedBase.Stores.Remove(armorType.Metadata().Item); soldier.Armor = armorType; EndModal(); }
public static void EditArmor(ArmorType armor) { for(int i=0; i<armorTypes.Count; i++){ if(armorTypes[i]==armor){ armorTypes[i]=armor; } } }
public Monster(string name, int age, string description, WeaponType weapon, ArmorType armor) { MonsterName = name; Age = age; Description = description; Weapon = weapon; Armor = armor; }
public Armor(Material material, int plus, ArmorType armorType) { this.material = material; this.plus = plus; this.armorType = armorType; baseItemType = BaseItemType.Armor; completeArmor(armorType); }
/// <summary> /// Encrypts the specified source file symmetrically. /// </summary> /// <param name="sourceFileName">Name of the source file.</param> /// <param name="destinationFileName">Name of the destination file.</param> /// <param name="destinationArmorType">Type of the destination armor.</param> /// <param name="passphrase">The passphrase.</param> public static void Encrypt( string sourceFileName, string destinationFileName, ArmorType destinationArmorType, string passphrase) { throw new NotImplementedException(); }
/// <summary> /// Encrypts the specified source file with public key encryption. /// </summary> /// <param name="sourceFileName">Name of the source file.</param> /// <param name="destinationFileName">Name of the destination file.</param> /// <param name="destinationArmorType">Type of the destination armor.</param> /// <param name="recipients">The recipients.</param> /// <param name="publicKeyRingFileName">Name of the public key ring file.</param> /// <remarks> /// <paramref name="recipients"/> is a list of strings that can contain e-mail addresses or hexadecimal key identifiers (e.g., "0xDEADBEEF") /// </remarks> public static void Encrypt( string sourceFileName, string destinationFileName, ArmorType destinationArmorType, IEnumerable<string> recipients, string publicKeyRingFileName) { throw new NotImplementedException(); }
public static void DeleteArmor(ArmorType armor) { for(int i=0; i<armorTypes.Count; i++){ if(armorTypes[i]==armor){ armorTypes.RemoveAt(i); armorNumber-=1; Debug.Log("armor deleted"); } } }
private void setArmorType (ArmorType type) { this.type = type; setDescription(type.getDescription()); switch (type) { case ArmorType.LEATHER: setSprite(leather); break; case ArmorType.IRON: setSprite(iron); break; case ArmorType.STEEL: setSprite(steel); break; default: Debug.Log("Unknown Armor Type"); break; } }
/// <summary> /// Clearsign the specified source file. /// </summary> /// <param name="sourceFileName">Name of the source file.</param> /// <param name="destinationFileName">Name of the destination file.</param> /// <param name="destinationArmorType">Type of the destination armor.</param> /// <param name="privateKeyRingFileName">Name of the private key ring file.</param> /// <param name="privateKeyIdentifier">The private key identifier.</param> /// <param name="privateKeyPassphrase">The private key passphrase.</param> public static void Sign( string sourceFileName, string destinationFileName, ArmorType destinationArmorType, string privateKeyRingFileName, string privateKeyIdentifier, string privateKeyPassphrase ) { throw new NotImplementedException(); }
public Dictionary<int, KeyValuePair<AttributeCode, float>> ForgingAttributes; // 锻造附加属性 #endregion Fields #region Constructors /// <summary> /// 类型:方法 /// 名称:Armor /// 作者:taixihuase /// 作用:通过数据库中获得的数据构造防具装备实例 /// 编写日期:2015/8/16 /// </summary> /// <param name="fixedId"></param> /// <param name="allocatedId"></param> /// <param name="name"></param> /// <param name="occupation"></param> /// <param name="limit"></param> /// <param name="upgrade"></param> /// <param name="cur"></param> /// <param name="dur"></param> /// <param name="type"></param> public Armor(int fixedId, int allocatedId, string name, OccupationCode occupation, int limit, bool upgrade, int cur, int dur, ArmorType type) : base(fixedId, allocatedId, name, occupation, limit, upgrade, cur, dur, EquipmentType.Armor) { Type = type; DefensePoints = new[] {0, 0}; ForgingAttributes = new Dictionary<int, KeyValuePair<AttributeCode, float>> { {-1, new KeyValuePair<AttributeCode, float>(AttributeCode.Null, 0)} }; }
public Monster(Monster m) { name = m.name; id = m.id; position = m.position; up = m.up; fixedPath = m.fixedPath; waypointId = m.waypointId; movement = m.movement; armor = m.armor; weapon = m.weapon; behavior = m.behavior; }
public void initEquipableItem(Sprite sprite, string itemTitle, string itemDescription, double cost, double weight, int rarity, float attackMultiplier, float defenseMultiplier, float magicMultiplier, float resistanceMultiplier, float healthMultiplier, float manaMultiplier, float attack, float defense, float magic, float resistance, float health, float mana, EquipmentType equipmentType, WeaponType weaponType, ArmorType armorType) { base.init(sprite, itemTitle, itemDescription, cost, weight, rarity, attackMultiplier, defenseMultiplier, magicMultiplier, resistanceMultiplier, healthMultiplier, manaMultiplier, attack, defense, magic, resistance, health, mana); this.equipmentType = equipmentType; this.weaponType = weaponType; this.armorType = armorType; }
public void init (ArmorType armorType, int armor) { base.init(); this.armor = armor; setArmorType(armorType); antiPoison = buffSprites.Find("AntiPoison"); extraHealth = buffSprites.Find("ExtraHealth"); regeneration = buffSprites.Find("Regeneration"); antiPoison.gameObject.SetActive(false); extraHealth.gameObject.SetActive(false); regeneration.gameObject.SetActive(false); }
public Armor(Character pUser, ArmorType eArmorType) : base(pUser, ItemType.Armor) { m_eArmorType = eArmorType; switch(m_eArmorType) { case ArmorType.Light: m_iDef = 2; break; case ArmorType.Medium: m_iDef = 4; break; case ArmorType.Heavy: m_iDef = 6; break; } }
public void Trigger(Entity intruder) { SmartEntity smartEntity = (SmartEntity)intruder; TroopType type = smartEntity.TroopComp.TroopType.Type; ArmorType armorType = smartEntity.TroopComp.TroopType.ArmorType; if (smartEntity.TeamComp.TeamType != TeamType.Attacker) { return; } int i = 0; int count = this.triggerConditions.Count; while (i < count) { TrapCondition trapCondition = this.triggerConditions[i]; if (trapCondition is IntruderTypeTrapCondition && ((IntruderTypeTrapCondition)trapCondition).IntruderType != type) { return; } if (trapCondition is ArmorNotTrapCondition && ((ArmorNotTrapCondition)trapCondition).IntruderArmorTypes.Contains(armorType)) { return; } i++; } int boardX = 0; int boardZ = 0; string text = this.comp.Type.TargetType.ToLower(); if (text == "self") { boardX = this.transform.X; boardZ = this.transform.Z; } else if (text == "intruder") { boardX = smartEntity.TransformComp.X; boardZ = smartEntity.TransformComp.Z; } this.health.Health = 0; this.controller.ExecuteTrap(this.comp, boardX, boardZ); }
public void GetDmgModifier_WhenOver5Rounds(WeaponType weaponType, ArmorType armorType, double dmg) { var unitModFactory = Substitute.For <UnitModFactory>(); var fixture = FixtureHelper.Create(); fixture.Register(() => unitModFactory); var battleFormulas = fixture.Create <BattleFormulas>(); unitModFactory.GetModifier(0, 0).ReturnsForAnyArgs(1); var attacker = Substitute.For <ICombatObject>(); var defender = Substitute.For <ICombatObject>(); attacker.Stats.Base.Weapon.Returns(WeaponType.Sword); defender.Stats.Base.Armor.Returns(ArmorType.Building1); battleFormulas.GetDmgModifier(attacker, defender, 5).Should().Be(1); }
public InventoryItem(InventoryItem item) { itemName = item.itemName; itemID = item.itemID; slotname = item.slotname; itemDescription = item.itemDescription; itemIcon = item.itemIcon; itemObject = item.itemObject; isUnique = item.isUnique; isIndestructible = item.isIndestructible; isQuestItem = item.isQuestItem; isStackable = item.isStackable; destroyOnUse = item.destroyOnUse; encumbranceValue = item.encumbranceValue; itemType = item.itemType; armorType = item.armorType; HPRecovery = item.HPRecovery; }
public static String ToString(ArmorType attribute) { switch (attribute) { case ArmorType.Shield: return("盾"); case ArmorType.Helmet: return("兜"); case ArmorType.Hat: return("帽子"); case ArmorType.LightClothes: return("軽装"); case ArmorType.HeavyClothes: return("重装"); case ArmorType.Accessory: return("アクセサリー"); default: return(""); } }
public string GetItemName(float type, float id) { switch (type) { case (int)TypeOfItem.Type.Weapon: return((WeaponType.GetWeaponName(id) + "_" + (id + 1).ToString()).ToUpper()); case (int)TypeOfItem.Type.Ring: return((RingType.GetRingName(id) + "_" + (id + 1).ToString()).ToUpper()); case (int)TypeOfItem.Type.Amulet: return((AmuletType.GetAmuletName(id) + "_" + (id + 1).ToString()).ToUpper()); case (int)TypeOfItem.Type.Armor: return((ArmorType.GetArmorName(id) + "_" + (id + 1).ToString()).ToUpper()); default: return((OtherType.GetOtherName(id) + "_" + (id + 1).ToString()).ToUpper()); } }
private void TryAddBuffStack(SmartEntity target, BuffTypeVO buffType, ArmorType armorType, BuffVisualPriority visualPriority, SmartEntity originator) { if (target == null || buffType == null || !buffType.WillAffect(armorType)) { return; } BuffComponent buffComponent = target.BuffComp; if (buffComponent == null) { buffComponent = new BuffComponent(); target.Add(buffComponent); } else if (buffComponent.IsBuffPrevented(buffType)) { return; } buffComponent.AddBuffStack(buffType, armorType, visualPriority, originator); buffComponent.RemoveBuffsCanceledBy(buffType); }
public static ArmorData createArmorData() { ArmorType type = ArmorType.STEEL; switch (UnityEngine.Random.Range(0, Enum.GetNames(typeof(ArmorType)).Length)) { case 0: type = ArmorType.STEEL; break; case 1: type = ArmorType.HARDENED_STEEL; break; case 2: type = ArmorType.TITANIUM; break; case 3: type = ArmorType.ASTRON; break; case 4: type = ArmorType.ADAMANT; break; default: Debug.Log("Unmapped value for armor"); break; } return(createArmorData(type)); }
public SkinnedMeshRenderer GetArmorPart(ArmorType type) { switch (type) { case ArmorType.chest: return(character.chestArmor); case ArmorType.hands: return(character.braces); case ArmorType.helmet: return(character.hamlet); case ArmorType.legs: return(character.legsArmor); default: return(null); } }
public float GetDamage(ArmorType armor) { float damage = 0; switch (armor) { case ArmorType.Light: damage = Damage * LightArmorDamageRate; break; case ArmorType.Medium: damage = Damage * MediumArmorDamageRate; break; case ArmorType.Heavy: damage = Damage * HeavyArmorDamageRate; break; default: break; } return damage; }
public SkinnedMeshRenderer GetBodyPart(ArmorType type) { switch (type) { case ArmorType.chest: return(character.body); case ArmorType.hands: return(character.hands); case ArmorType.helmet: return(character.head); case ArmorType.legs: return(character.legs); default: return(null); } }
public static async Task <Keypair> LoadAsync(string path) { // TODO: async file reading byte[] contents = File.ReadAllBytes(path); await Task.FromResult(0); Type armorProviderType = ArmorRecognizer.RecognizeArmor(contents); var armorProvider = (IArmorProvider)Activator.CreateInstance(armorProviderType); ArmorType armorType = armorProvider.GetArmorType(contents); if (armorType != ArmorType.PublicKey && armorType != ArmorType.PrivateKey) { throw new InvalidOperationException( "Armor není správného typu (neobsahuje ani veřejný, ani soukromý klíč)"); } byte[] rawData = armorProvider.FromArmor(contents).rawData; var keyPair = LZ4MessagePackSerializer.Deserialize <Keypair>(rawData); return(keyPair); }
void Awake() { playerModel = GetComponent <m_Player>(); startingHealth = playerModel.MaxHealth; armor = playerModel.armorType; armorValue = playerModel.armorValue; //tempDMGTimer = Time.realtimeSinceStartup; anim = GetComponent <Animator> (); playerAudio = GetComponent <AudioSource> (); playerMovement = GetComponent <PlayerMovement> (); playerShooting = GetComponentInChildren <PlayerShooting> (); currentHealth = startingHealth; UILog = GameObject.FindGameObjectWithTag("Canvas").GetComponentInChildren <Text>(true); attackListener = new UnityAction(UnitAttacked); damageListener = new UnityAction(UnitDamage); //Fetch data from Game System Game.current.LoadPlayerData(); }
public GenericArmorWithBulge(Guid uniqueID, ArmorType armorRating, SimpleDescriptor abbreviatedName, DescriptorWithArg <bool> fullName, BulgeAwareItemDescription description, DescriptorWithArg <bool> aboutText, BulgeAwareStateChange onBulgeChange, double defenseRating, int price, byte seductiveModifier = 0, byte wizardModifier = 0, bool allowsUnderGarments = true) : base(armorRating) { this.id = uniqueID; this.defense = defenseRating; this.abbr = abbreviatedName ?? throw new ArgumentNullException(nameof(abbreviatedName)); this.full = fullName ?? throw new ArgumentNullException(nameof(fullName)); this.desc = description ?? throw new ArgumentNullException(nameof(description)); this.about = aboutText ?? throw new ArgumentNullException(nameof(aboutText)); this.worksWithUnderclothes = allowsUnderGarments; value = price; sluttySeduction = seductiveModifier; wizardsEndurance = wizardModifier; bulgeStateChangeText = onBulgeChange ?? throw new ArgumentNullException(nameof(onBulgeChange)); }
public void WearDown(ArmorType type) { switch (type) { case ArmorType.Body: if (BodyID != -1) { Pocket.Add(BodyID); ChangeCharacteristicsWithItem(BodyID, 1); } BodyID = -1; break; case ArmorType.Hands: if (HandsID != -1) { Pocket.Add(HandsID); ChangeCharacteristicsWithItem(HandsID, 1); } HandsID = -1; break; case ArmorType.Head: if (HeadID != -1) { Pocket.Add(HeadID); ChangeCharacteristicsWithItem(HeadID, 1); } HeadID = -1; break; case ArmorType.Legs: if (LegsID != -1) { Pocket.Add(LegsID); ChangeCharacteristicsWithItem(LegsID, 1); } LegsID = -1; break; } }
private string GenerateName(ItemMaterial material, string typeName, ArmorType type) { var materialPrefix = NameGenerationHelper.GetMaterialPrefix(material); var armorTypeName = GetArmorTypeName(type); var builder = new List <string>(); if (!string.IsNullOrEmpty(materialPrefix)) { builder.Add(materialPrefix); } if (!string.IsNullOrEmpty(typeName)) { builder.Add(typeName); } builder.Add(armorTypeName); return(string.Join(" ", builder)); }
public void ExecuteStep(CharacterSheet character) { var validArmors = new ArmorType[] { ArmorType.None, ArmorType.Light, ArmorType.Medium, ArmorType.Heavy }; var armors = this.armorShop.GetInventory <IArmor>().Where(armor => validArmors.Any(x => x == armor.ArmorType) && character.Defense.IsProficient(armor) && character.Inventory.CoinPurse.CanAfford(armor) ); if (armors.HasChoices()) { var armor = armors.ChooseOne(); ShortLog.DebugFormat("Purchasing {0}", armor.Name); character.Inventory.Purchase(armor); } }
public RPGArmor(ArmorClass a, int ArmorDefense, int MaxDexBonus, int MaxDurability, int Value, string Name) { // set all armor similarities this.BaseSpeed = 0; this.Actions = null; this.Color1 = Color.Gray; this.Color2 = Color.Black; this.m_class = a; this.m_type = GetArmorTypeFromClass(a); this.Name = Name; this.Slot = GetSlotFromArmorClassEnum(a); // set specifics this.m_Defense = ArmorDefense; this.m_MaxDex = MaxDexBonus; this.m_DurabilityMax = MaxDurability; this.ItemValue = Value; ResetDurability(); UpdateDescription(); }
public void EquipItem(Item item) { if (item is Weapon) { var query = this.Inventory .Where(n => n is Weapon && (n as Weapon).IsEquiped) .Select(n => n); if (!query.Any()) { (item as Weapon).IsEquiped = true; Print.PrintMessageWithAudio(string.Format("{0} has been equiped.", item.Id)); ApplyItemEffects(item); } else { Print.PrintMessageWithAudio("You can not equip two items of the same type."); } } else if (item is Armor) { ArmorType currentArmorType = (item as Armor).ArmorType; var query = this.Inventory .Where(n => n is Armor && (n as Armor).IsEquiped && currentArmorType == (n as Armor).ArmorType) .Select(n => n); if (!query.Any()) { (item as Armor).IsEquiped = true; Print.PrintMessageWithAudio(string.Format("{0} has been equiped.", item.Id)); ApplyItemEffects(item); } else { Print.PrintMessageWithAudio("You can not equip two items of the same type."); } } else { Print.PrintMessageWithAudio("This item can not be equiped"); } }
public ActionResult Edit(int id, [Bind("Name,BaseGPValue,ACBonus,ArmorCheckPenalty,Weight,ArmorCoreTypeID,ID")] ArmorType armorType) { if (id != armorType.ID) { return(NotFound()); } if (ModelState.IsValid) { if (DAL.UpdateArmorType(armorType, id) > 0) { //success } else { //error } return(RedirectToAction(nameof(Index))); } ViewData["ArmorCoreTypeID"] = new SelectList(DAL.GetArmorCoreTypes(), "ID", "Name", armorType.ArmorCoreTypeID); return(View(armorType)); }
void Awake() { anim = GetComponent <Animator> (); enemyAudio = GetComponent <AudioSource> (); hitParticles = GetComponentInChildren <ParticleSystem> (); capsuleCollider = GetComponent <CapsuleCollider> (); enemyModel = GetComponent <m_Enemy>(); startingHealth = enemyModel.startingHealth; sinkSpeed = enemyModel.sinkSpeed; scoreValue = enemyModel.scoreValue; evasionPercentage = enemyModel.evasionPercentage; armorType = enemyModel.armorType; armorValue = enemyModel.armorValue; currentHealth = startingHealth; healthSlider.value = currentHealth; enemyName = GetComponent <StateController>().enemyName; UILog = GameObject.FindGameObjectWithTag("Canvas").GetComponentInChildren <Text>(true); attackListener = new UnityAction(EnemyAttacked); damageListener = new UnityAction(EnemyDamage); }
public Armor GetArmor(ArmorType armorType) { switch (armorType) { case ArmorType.Head: return(Head); case ArmorType.Torso: return(Torso); case ArmorType.Arm: return(Arm); case ArmorType.Waist: return(Waist); case ArmorType.Leg: return(Leg); } return(null); }
internal ItemDefinition(EquipmentCategory category, uint typeId, byte level, string name, string internalName, float maxDurability, Rarity rarity, string socketTypes, Element element, ArmorType armorType, Buff?prefix, Buff?suffix, Buff[] itemBuffs, Buff[] playerBuffs, bool hasVariants) { Category = category; TypeId = typeId; Level = level; Name = name; InternalName = internalName; MaxDurability = maxDurability; Rarity = rarity; SocketTypes = socketTypes; ArmorType = armorType; Element = element; PlayerBuffs = playerBuffs; HasVariants = hasVariants; ItemBuffs = itemBuffs.Length == 0 && prefix is null && suffix is null ? ItemDefinitionBuffMemory.Empty : new ItemDefinitionBuffMemory(itemBuffs, prefix, suffix); // merchant search is case sensitive to avoid affixing the Merchant's hat. IsMerchant = InternalName.Contains("merchant"); AffixableName = IsMerchant || internalName.IndexOf("common", StringComparison.OrdinalIgnoreCase) != -1; }
static public int DiceVS(DamageType dt, ArmorType at) { switch (dt) { case DamageType.slashing: if (at == ArmorType.chain) { return(1); } if (at == ArmorType.light) { return(3); } return(2); case DamageType.piercing: if (at == ArmorType.plate) { return(1); } if (at == ArmorType.chain) { return(3); } return(2); case DamageType.crushing: if (at == ArmorType.light) { return(1); } if (at == ArmorType.plate) { return(3); } return(2); } return(2); // default to 2 d6. }
public virtual float CalculateResistance(int damage, ArmorType armorType) { float finalValue = 0; switch (armorType) { case ArmorType.Light: finalValue = damage * 1f; return(finalValue); case ArmorType.Medium: finalValue = damage * 0.85f; return(finalValue); case ArmorType.Heavy: finalValue = damage * 0.5f; return(finalValue); default: break; } return(finalValue); }
/// <summary> /// 设置激活的骨骼 UI 组 /// </summary> public void SetActiveGroup(ArmorType group) { if (group != _activeGroup) { if (_activeGroup != ArmorType.None) { for (int i = groupFirst[(int)_activeGroup]; i <= groupLast[(int)_activeGroup]; i++) { _boneUIs[i].enabled = false; } } _activeGroup = group; if (_activeGroup != ArmorType.None) { for (int i = groupFirst[(int)_activeGroup]; i <= groupLast[(int)_activeGroup]; i++) { _boneUIs[i].enabled = true; } } } }
public Armor(string n, string ty, string at, int bd) : base(n, ty) { baseDefense = bd; symbol = 'A'; switch (at) { case "Helmet": armorType = ArmorType.helmet; break; case "Cuirass": armorType = ArmorType.cuirass; break; case "Gauntlets": armorType = ArmorType.gauntlets; break; case "Boots": armorType = ArmorType.boots; break; } }
//EquipedConsumable////////////////////////////////// //EquipedArmor/////////////////////////////////////// public void EquipArmor(GameObject item, ArmorType armorType) //MUST UNEQUIP BEFORE EQUIPPING IF NOT NULL { ItemMaster tempMaster = item.GetComponent <ItemMaster>(); int itemSubArray = (int)tempMaster.ReturnItemType(); Armor armorScript = item.GetComponent <Armor>(); UnEquipArmor(armorType); EquippedArmor[(int)armorType] = item; InventoryStorage[itemSubArray][tempMaster.ReturnItemName()].Remove(item); playerStats.AddAttributeEffect(AttributesEnum.armor, STARTUP_DECLARATIONS.ArmorTypeEnumReverse[(int)armorType], true, armorScript.returnArmor()); //second entry is name e.g. "Head" playerStats.AddAttributeEffect(AttributesEnum.plating, STARTUP_DECLARATIONS.ArmorTypeEnumReverse[(int)armorType], true, armorScript.returnPlating()); //second entry is name e.g. "Head" playerStats.AddAttributeEffect(AttributesEnum.stamina_regen, STARTUP_DECLARATIONS.ArmorTypeEnumReverse[(int)armorType], false, armorScript.returnEEnergyRegenModifier()); // UMA Component playerAvatar.SetSlot(armorScript.GetWardrobePiece().Item1); if (armorScript.GetWardrobePiece().Item2) { playerAvatar.SetSlot(armorScript.GetWardrobePiece().Item2); } playerAvatar.BuildCharacter(); }
public Buff AddBuffStack(BuffTypeVO buffType, ArmorType armorType, BuffVisualPriority visualPriority, SmartEntity originator) { int num = this.FindBuff(buffType.BuffID); Buff buff; if (num < 0) { buff = new Buff(buffType, armorType, visualPriority); buff.AddStack(); this.Buffs.Add(buff); if (this.sleepState == BuffSleepState.Sleeping) { this.sleepState = BuffSleepState.Awake; } if (!buff.BuffData.ContainsKey("originator")) { buff.BuffData.Add("originator", originator); } else { buff.BuffData["originator"] = originator; } this.SendBuffEvent(EventId.AddedBuff, buff); } else { buff = this.Buffs[num]; if (buffType.Lvl > buff.BuffType.Lvl) { buff.UpgradeBuff(buffType); } buff.BuffData["originator"] = originator; buff.AddStack(); } this.OnBuffStackAdded(); return(buff); }
public override void TakeWeaponsAndArmors(WeaponType weapon, ArmorType armor) { if (weapon != WeaponType.Nothing) { Console.WriteLine("You can't put a weapon on the head!"); } switch (armor) { case ArmorType.HoodOfDefiance: { _armorPoints = _armorPoints + 30; } break; case ArmorType.IronHelmet: { _armorPoints = _armorPoints + 40; } break; default: throw new Exception(); } }
public override void TakeWeaponsAndArmors(WeaponType weapon, ArmorType armor) { if (weapon != WeaponType.Nothing) { Console.WriteLine("You can't put a weapon on the leg!"); } switch (armor) { case ArmorType.ArmoredBoots: { _armorPoints = _armorPoints + 25; } break; case ArmorType.IronKneePads: { _armorPoints = _armorPoints + 35; } break; default: throw new Exception(); } }
public ArmorType ArmorType(int type) { ArmorType aType = new ArmorType(); switch (type) { case 1: aType = Main_Program.ArmorType.leather; return(aType); case 2: aType = Main_Program.ArmorType.mail; return(aType); case 3: aType = Main_Program.ArmorType.plate; return(aType); //validate default: aType = Main_Program.ArmorType.leather; return(aType); } }
public float GetDamage(ArmorType armor) { throw new NotImplementedException(); }
public bool SetArmor(ArmorType Armor, short itemID, int Damage, int Count) { int slot = 103; switch (Armor) { case ArmorType.Helm: slot = 103; break; case ArmorType.Torso: slot = 102; break; case ArmorType.Legs: slot = 101; break; case ArmorType.Boots: slot = 100; break; } return SetInventory(slot, itemID, Damage, Count); }
public Armor getArmorInSlot(ArmorType type) { var armor = (from data in equippedArmor where data.armorType == type select data).FirstOrDefault(); return armor; }
public void RemoveArmorInSlot(ArmorType type) { var armor = (from data in equippedArmor where data.armorType == type select data).FirstOrDefault(); if (armor != null) { RemoveArmor(armor); } }
public bool GetArmor(ArmorType Armor, out short itemID, out short Damage, out byte Count, out string failreason) { int slot = 103; itemID = 0; Damage = 0; Count = 0; switch (Armor) { case ArmorType.Helm: slot = 103; break; case ArmorType.Torso: slot = 102; break; case ArmorType.Legs: slot = 101; break; case ArmorType.Boots: slot = 100; break; } return GetInventory(slot, out itemID, out Damage, out Count, out failreason); }
/// <summary> /// Encrypts and signs the specified source file. /// </summary> /// <param name="sourceFileName">Name of the source file.</param> /// <param name="destinationFileName">Name of the destination file.</param> /// <param name="destinationArmorType">Type of the destination armor.</param> /// <param name="publicKeyRingFileName">Name of the public key ring file.</param> /// <param name="recipients">The recipients.</param> /// <param name="privateKeyRingFileName">Name of the private key ring file.</param> /// <param name="privateKeyIdentifier">The private key identifier.</param> /// <param name="privateKeyPassphrase">The private key passphrase.</param> /// <remarks> /// <paramref name="recipients"/> is a list of strings that can contain e-mail addresses or hexadecimal key identifiers (e.g., "0xDEADBEEF") /// </remarks> public static void EncryptAndSign( string sourceFileName, string destinationFileName, ArmorType destinationArmorType, string publicKeyRingFileName, IEnumerable<string> recipients, string privateKeyRingFileName, string privateKeyIdentifier, string privateKeyPassphrase) { throw new NotImplementedException(); }
public void setArmorType(ArmorType i) { armorType = i; }
private void completeArmor(ArmorType a) { switch(a) { case ArmorType.None: itemName = "Empty"; itemDescription = "Empty"; weight = 0; value = 0; armorClass = 0; maxDex = 20; armorCatergory = ArmorCatergory.None; break; case ArmorType.ArmoredKilt: itemName = "Armored Kilt"; itemDescription = ""; weight = 10; value = 2000; armorClass = 1; maxDex = 6; armorCatergory = ArmorCatergory.Light; break; case ArmorType.Padded: itemName = "Padded Armor"; itemDescription = ""; weight = 10; value = 500; armorClass = 1; maxDex = 8; spellFailure = 5; armorCatergory = ArmorCatergory.Light; break; case ArmorType.QuiltedCloth: itemName = "Quilted Cloth"; itemDescription = ""; weight = 15; value = 10000; armorClass = 1; maxDex = 8; spellFailure = 10; armorCatergory = ArmorCatergory.Light; break; case ArmorType.Leather: itemName = "Leather Armor"; itemDescription = ""; weight = 15; value = 1000; armorClass = 2; maxDex = 6; spellFailure = 10; armorCatergory = ArmorCatergory.Light; break; case ArmorType.RosewoodArmor: itemName = "Rosewood Armor"; itemDescription = ""; weight = 15; value = 5000; armorClass = 2; maxDex = 6; spellFailure = 10; armorCatergory = ArmorCatergory.Light; break; case ArmorType.HideShirt: itemName = "Hide Shirt"; itemDescription = ""; weight = 18; value = 2000; armorClass = 3; maxDex = 4; checkPenalty = -1; spellFailure = 15; armorCatergory = ArmorCatergory.Light; break; case ArmorType.LeafArmor: itemName = "Leaf Armor"; itemDescription = ""; weight = 20; value = 50000; armorClass = 3; maxDex = 5; spellFailure = 15; armorCatergory = ArmorCatergory.Light; break; case ArmorType.ParadeArmor: itemName = "Parade Armor"; itemDescription = ""; weight = 20; value = 2500; armorClass = 3; maxDex = 5; checkPenalty = -1; spellFailure = 15; armorCatergory = ArmorCatergory.Light; break; case ArmorType.StuddedLeather: itemName = "Studded Leather Armor"; itemDescription = ""; weight = 20; value = 2500; armorClass = 3; maxDex = 5; checkPenalty = -1; spellFailure = 15; armorCatergory = ArmorCatergory.Light; break; case ArmorType.Wooden: itemName = "Wooden Armor"; itemDescription = ""; weight = 25; value = 2000; armorClass = 3; maxDex = 3; checkPenalty = -1; spellFailure = 15; armorCatergory = ArmorCatergory.Light; break; case ArmorType.ChainShirt: itemName = "Chain Shirt"; itemDescription = ""; weight = 25; value = 10000; armorClass = 4; maxDex = 4; checkPenalty = -2; spellFailure = 20; armorCatergory = ArmorCatergory.Light; break; case ArmorType.ArmoredCoat: itemName = "Armored Coat"; itemDescription = ""; weight = 20; value = 5000; armorClass = 4; maxDex = 3; checkPenalty = -2; spellFailure = 20; armorCatergory = ArmorCatergory.Medium; break; case ArmorType.Hide: itemName = "Hide Armor"; itemDescription = ""; weight = 25; value = 1500; armorClass = 4; maxDex = 4; checkPenalty = -3; spellFailure = 20; armorCatergory = ArmorCatergory.Medium; break; case ArmorType.ScaleMail: itemName = "Scale Mail"; itemDescription = ""; weight = 30; value = 5000; armorClass = 5; maxDex = 3; checkPenalty = -4; spellFailure = 25; armorCatergory = ArmorCatergory.Medium; break; case ArmorType.Chainmail: itemName = "Chainmail"; itemDescription = ""; weight = 40; value = 15000; armorClass = 6; maxDex = 2; checkPenalty = -5; spellFailure = 30; armorCatergory = ArmorCatergory.Medium; break; case ArmorType.Breastplate: itemName = "Breastplate"; itemDescription = ""; weight = 30; value = 20000; armorClass = 6; maxDex = 3; checkPenalty = -4; spellFailure = 25; armorCatergory = ArmorCatergory.Medium; break; case ArmorType.AgileBreastplate: itemName = "Breastplate (agile)"; itemDescription = ""; weight = 25; value = 40000; armorClass = 6; maxDex = 3; checkPenalty = -4; spellFailure = 25; armorCatergory = ArmorCatergory.Medium; break; case ArmorType.SplintMail: itemName = "Splint Mail"; itemDescription = ""; weight = 45; value = 20000; armorClass = 7; checkPenalty = -7; spellFailure = 40; armorCatergory = ArmorCatergory.Heavy; break; case ArmorType.BandedMail: itemName = "Banded Mail"; itemDescription = ""; weight = 35; value = 25000; armorClass = 7; maxDex = 1; checkPenalty = -6; spellFailure = 35; armorCatergory = ArmorCatergory.Heavy; break; case ArmorType.FieldPlate: itemName = "Field Plate"; itemDescription = ""; weight = 50; value = 120000; armorClass = 7; maxDex = 1; checkPenalty = -5; spellFailure = 35; armorCatergory = ArmorCatergory.Heavy; break; case ArmorType.HalfPlate: itemName = "Half Plate"; itemDescription = ""; weight = 50; value = 60000; armorClass = 8; checkPenalty = -7; spellFailure = 40; armorCatergory = ArmorCatergory.Heavy; break; case ArmorType.AgileHalfPlate: itemName = "Half Plate (agile)"; itemDescription = ""; weight = 55; value = 85000; armorClass = 8; checkPenalty = -7; spellFailure = 40; armorCatergory = ArmorCatergory.Heavy; break; case ArmorType.FullPlate: itemName = "Full Plate"; itemDescription = ""; weight = 50; value = 150000; armorClass = 9; maxDex = 1; checkPenalty = -6; spellFailure = 35; armorCatergory = ArmorCatergory.Heavy; break; case ArmorType.HellknightPlate: itemName = "Hellknight Plate"; itemDescription = ""; weight = 50; value = 200000; armorClass = 9; maxDex = 1; checkPenalty = -5; spellFailure = 35; armorCatergory = ArmorCatergory.Heavy; break; case ArmorType.Stoneplate: itemName = "Stoneplate"; itemDescription = ""; weight = 75; value = 180000; armorClass = 9; maxDex = 1; checkPenalty = -6; spellFailure = 35; armorCatergory = ArmorCatergory.Heavy; break; case ArmorType.Buckler: itemName = "Buckler"; itemDescription = ""; weight = 5; value = 500; armorClass = 1; maxDex = 100; checkPenalty = -1; spellFailure = 5; armorCatergory = ArmorCatergory.Shield; break; case ArmorType.Klar: itemName = "Klar"; itemDescription = ""; weight = 6; value = 1200; armorClass = 1; maxDex = 100; checkPenalty = -1; spellFailure = 5; armorCatergory = ArmorCatergory.Shield; break; case ArmorType.LeatherMadu: itemName = "Leather Madu"; itemDescription = ""; weight = 5; value = 3000; armorClass = 1; maxDex = 100; checkPenalty = -2; spellFailure = 5; armorCatergory = ArmorCatergory.Shield; break; case ArmorType.SteelMadu: itemName = "Steel Madu"; itemDescription = ""; weight = 6; value = 4000; armorClass = 1; maxDex = 100; checkPenalty = -2; spellFailure = 5; armorCatergory = ArmorCatergory.Shield; break; case ArmorType.LightWoodenShield: itemName = "Light Wooden Shield"; itemDescription = ""; weight = 5; value = 300; armorClass = 1; maxDex = 100; checkPenalty = -1; spellFailure = 5; armorCatergory = ArmorCatergory.Shield; break; case ArmorType.QuickdrawLightWoodenShield: itemName = "Light Wooden Shield (quickdraw)"; itemDescription = ""; weight = 6; value = 5300; armorClass = 1; maxDex = 100; checkPenalty = -2; spellFailure = 5; armorCatergory = ArmorCatergory.Shield; break; case ArmorType.LightSteelShield: itemName = "Light Steel Shield"; itemDescription = ""; weight = 6; value = 900; armorClass = 1; maxDex = 100; checkPenalty = -1; spellFailure = 5; armorCatergory = ArmorCatergory.Shield; break; case ArmorType.QuickdrawLightSteelShield: itemName = "Light Steel Shield (quickdraw)"; itemDescription = ""; weight = 7; value = 5900; armorClass = 1; maxDex = 100; checkPenalty = -2; spellFailure = 5; armorCatergory = ArmorCatergory.Shield; break; case ArmorType.HeavyWoodenShield: itemName = "Heavy Wooden Shield"; itemDescription = ""; weight = 10; value = 700; armorClass = 2; maxDex = 100; checkPenalty = -2; spellFailure = 15; armorCatergory = ArmorCatergory.Shield; break; case ArmorType.HeavySteelShield: itemName = "Heavy Steel Shield"; itemDescription = ""; weight = 15; value = 2000; armorClass = 2; maxDex = 100; checkPenalty = -2; spellFailure = 15; armorCatergory = ArmorCatergory.Shield; break; case ArmorType.TowerShield: itemName = "Tower Shield"; itemDescription = ""; weight = 45; value = 3000; armorClass = 4; maxDex = 100; checkPenalty = -10; spellFailure = 50; armorCatergory = ArmorCatergory.Shield; break; case ArmorType.ArmorSpikes: itemName = "Armor Spikes"; itemDescription = ""; weight = 10; value = 5000; maxDex = 100; armorCatergory = ArmorCatergory.Extra; break; case ArmorType.LockedGauntlet: itemName = "Locked Gauntlet"; itemDescription = ""; weight = 5; value = 800; maxDex = 100; armorCatergory = ArmorCatergory.Extra; break; case ArmorType.BreakawayShieldBoss: itemName = "Breakaway Shield Boss"; itemDescription = ""; weight = 10; value = 12000; maxDex = 100; armorCatergory = ArmorCatergory.Extra; break; case ArmorType.HookedShieldBoss: itemName = "Hooked Shield Boss"; itemDescription = ""; weight = 10; value = 8000; maxDex = 100; armorCatergory = ArmorCatergory.Extra; break; case ArmorType.IlluminatingShieldBoss: itemName = "Illuminating Shield Boss"; itemDescription = ""; weight = 10; value = 3500; maxDex = 100; armorCatergory = ArmorCatergory.Extra; break; case ArmorType.MasterworkShieldBoss: itemName = "Masterwork Shield Boss"; itemDescription = ""; weight = 0; value = 5000; maxDex = 100; armorCatergory = ArmorCatergory.Extra; break; case ArmorType.ReinforcingShieldBoss: itemName = "Reinforcing Shield Boss"; itemDescription = ""; weight = 10; value = 3000; maxDex = 100; armorCatergory = ArmorCatergory.Extra; break; case ArmorType.ShieldSpikes: itemName = "Shield Spikes"; itemDescription = ""; weight = 5; value = 1000; maxDex = 100; armorCatergory = ArmorCatergory.Extra; break; case ArmorType.ThrowingShield: itemName = "Throwing Shield"; itemDescription = ""; weight = 0; value = 5000; maxDex = 100; armorCatergory = ArmorCatergory.Extra; break; default: itemName = "warning, invalid"; itemDescription = ""; weight = 0; value = 0; maxDex = 100; armorCatergory = ArmorCatergory.Extra; break; } }
public static bool IsArmorPiece(short id, ArmorType type) { switch (type) { case ArmorType.Head: switch (id) { case 86: case 298: case 302: case 306: case 310: case 314: return true; } break; case ArmorType.Chest: switch (id) { case 299: case 303: case 307: case 311: case 315: return true; } break; case ArmorType.Legs: switch (id) { case 300: case 304: case 308: case 312: case 316: return true; } break; case ArmorType.Shoes: switch (id) { case 301: case 305: case 309: case 313: case 317: return true; } break; } return false; }
// Create a piece of armour public Armor(string itemName, ArmorType itemType, Sprite itemIcon, int defence, int cost) : base(itemName, itemType.ToString(), itemIcon, 0, defence, 0, 0, cost) { // Leave empty }
public abstract bool GetArmor(ArmorType slot, out short itemID, out short Damage, out byte Count, out string failreason);
public abstract bool SetArmor(ArmorType slot, short itemID, int Damage, int Count);
public ItemType(ArmorType armorType, EquipSlot itemSlot) : this(BaseType.Armor, (int)armorType) { if (itemSlot <= EquipSlot.Feet) this.itemSlot = itemSlot; else throw new ArgumentException("Item slot given is not armor!"); }
/// <summary> /// constructeur /// </summary> /// <param name="armorType">type de l'armur</param> /// <param name="p"></param> public Armor(ArmorType armorType, int p) { this._armorType = armorType; this.p = p; }