public override bool CheckTeach(SkillName skill, Mobile from) { return (skill == SkillName.Forensics) || (skill == SkillName.Healing) || (skill == SkillName.SpiritSpeak) || (skill == SkillName.Swords); }
// This class implements a singleton pattern; meaning that no matter how many times the // Instance attribute is used, there will only ever be one of these created in the entire system. // Copy this template and give it a new name. Assign all of the data members of the EvoSpec // base class in the constructor. Your subclass must not be abstract. // Never call new on this class, use the Instance attribute to get the instance instead. RaelisDragonSpec() { m_Tamable = true; m_MinTamingToHatch = 99.9; //originaly was 99.9 m_PercentFemaleChance = 0.00; // Made small to limit access to eggs. originaly was 0.02 m_GuardianEggOrDeedChance = .01; m_AlwaysHappy = false; m_ProducesYoung = false; // originaly was true m_PregnancyTerm = 0.0; // originaly was 0.10 m_AbsoluteStatValues = false; m_MaxEvoResistance = 100; m_MaxTrainingStage = 7;// At what stage stop atack training dummy and leveling m_CanAttackPlayers = false; m_RandomHues = new int[] { 1157, 1175, 1172, 1170, 2703, 2473, 2643, 1156, 2704, 2734, 2669, 2621, 2859, 2716, 2791, 2927, 2974, 1161, 2717, 2652, 2821, 2818, 2730, 2670, 2678, 2630, 2641, 2644, 2592, 2543, 2526, 2338, 2339, 1793, 1980, 1983 }; m_Skills = new SkillName[7] { SkillName.Magery, SkillName.EvalInt, SkillName.Meditation, SkillName.MagicResist, SkillName.Tactics, SkillName.Wrestling, SkillName.Anatomy }; m_MinSkillValues = new int[7] { 50, 50, 50, 15, 19, 19, 19 }; m_MaxSkillValues = new int[7] { 120, 120, 110, 110, 100, 100, 100 }; m_Stages = new BaseEvoStage[] { new RaelisDragonStageOne(), new RaelisDragonStageTwo(), new RaelisDragonStageThree(), new RaelisDragonStageFour(), new RaelisDragonStageFive(), new RaelisDragonStageSix(), new RaelisDragonStageSeven() }; }
public SWrestlingContract() : base( 0x14F0 ) { Weight = 1.0; Hue = 401; Name = "An Wrestling Training Contract"; skill = SkillName.Wrestling; }
private bool CheckRepairDifficulty( Mobile mob, SkillName skill, int curHits, int maxHits ) { double difficulty = GetRepairDifficulty( curHits, maxHits ) * 0.1; if( m_Deed != null ) { double value = m_Deed.SkillLevel; double minSkill = difficulty - 25.0; double maxSkill = difficulty + 25; if( value < minSkill ) return false; // Too difficult else if( value >= maxSkill ) return true; // No challenge double chance = (value - minSkill) / (maxSkill - minSkill); return (chance >= Utility.RandomDouble()); } else { return mob.CheckSkill( skill, difficulty - 25.0, difficulty + 25.0 ); } }
public static void RegisterSkillTrigger(object o, SkillName s, Map map) { if (o == null || s == RegisteredSkill.Invalid) return; // go through the list and if the spawner is not on it yet, then add it bool found = false; ArrayList skilllist = RegisteredSkill.TriggerList(s, map); if (skilllist == null) return; foreach (RegisteredSkill rs in skilllist) { if (rs.target == o && rs.sid == s) { found = true; // dont register a skill if it is already on the list for this spawner break; } } // if it hasnt already been added to the list, then add it if (!found) { RegisteredSkill newrs = new RegisteredSkill(); newrs.target = o; newrs.sid = s; skilllist.Add(newrs); } }
public override bool OnSkillUse( Mobile from, SkillName skill ) { if ( from.AccessLevel == AccessLevel.Player ) from.SendMessage( "You may not use skills in jail." ); return ( from.AccessLevel > AccessLevel.Player ); }
/* * Bonus que a habilidade da na skill. */ public override double skillBonus(HabilidadeNode node, SkillName skillName) { if (SkillName.Tactics.Equals(skillName)) { return node.Nivel * 5; } return 0; }
public PowerScroll(SkillName skill, double value) : base(skill, value) { this.Hue = 0x481; if (this.Value == 105.0 || skill == Server.SkillName.Blacksmith || skill == Server.SkillName.Tailoring) this.LootType = LootType.Regular; }
public SpecialScroll( SkillName skill, double value ) : base( 0x14F0 ) { LootType = LootType.Cursed; Weight = 1.0; m_Skill = skill; m_Value = value; }
public void SkillDown(SkillName skill) { var actor = GetComponentInParent<Actor>(); if (actor == null) return; var sk = Skills.Single(s => s.Name == skill); sk.Return(actor); }
public MerchantTitleInfo( SkillName skill, double requirement, TextDefinition title, TextDefinition label, TextDefinition assigned ) { m_Skill = skill; m_Requirement = requirement; m_Title = title; m_Label = label; m_Assigned = assigned; }
private static string FormatSkill( BaseCreature c, SkillName name ) { Skill skill = c.Skills[name]; if ( skill.Base < 10.0 ) return "<div align=right>---</div>"; return String.Format( "<div align=right>{0:F1}</div>", skill.Value ); }
public static double ScaleBySkill( Mobile from, SkillName skill ) { if ( from == null ) return 0.0; double bonus = (from.Skills[skill].Value > 100.0) ? 0.5 : 0.0; return ((from.Skills[skill].Value * 0.2) + bonus); }
public TeachEntry( SkillName skill, BaseCreature m, Mobile from, bool enabled ) : base( 6000 + (int)skill ) { m_Skill = skill; m_Mobile = m; m_From = from; if ( !enabled ) Flags |= Network.CMEFlags.Disabled; }
public virtual double GetSkill( Mobile from, SkillName skillName ) { Skill skill = from.Skills[skillName]; if ( skill == null ) return 0.0; return skill.Value; }
public override void Deserialize(GenericReader reader) { base.Deserialize( reader ); int version = reader.ReadInt(); m_Skill1 = (SkillName)reader.ReadInt(); m_Skill2 = (SkillName)reader.ReadInt(); if (Parent is Mobile) OnAdded( Parent ); }
public override bool OnSkillUse( Mobile from, SkillName skill ) { // at OSI for logout from Lamp Room, account may be banned if ( skill == SkillName.Camping ) return false; return true; }
public XmlSkill(string name, string skill) { Name = name; try { m_Skill = (SkillName)Enum.Parse( typeof( SkillName ), skill, true ); } catch {} }
public static void DismountCheck( Mobile attacker, Mobile defender, int disbonus, SkillName skill, int featlevel ) { IKhaerosMobile featuser = attacker as IKhaerosMobile; IKhaerosMobile defplayer = defender as IKhaerosMobile; int dischance = disbonus + (int)(Math.Max( attacker.Skills[skill].Base - defender.Skills[SkillName.Riding].Base - defplayer.RideBonus, 10 * featlevel - defplayer.RideBonus )); if( dischance > Utility.RandomMinMax( 1, 100 ) ) Effect( defender, featlevel ); }
public SkillGainMod( PlayerMobile owner, string name, SkillName skill, double bonus, TimeSpan duration ) { m_Owner = owner; m_Name = name; m_Skill = skill; m_Bonus = bonus; m_Duration = duration; m_Added = DateTime.UtcNow; }
private Unclassed() { _ClassName = "Unclassed"; _RestrictedItems = new List<Type>(); _ClassSkills = new SkillName[] { }; _MaxSpellCircle = SpellCircle.Eighth; _RestrictedEnchantments = new IMagicalProperty[] { }; _StatAffinities = new Stat[] { }; _StatDifficulties = new Stat[] { }; }
public override bool CheckTeach( SkillName skill, Mobile from ) { if ( !base.CheckTeach( skill, from ) ) return false; return ( skill == SkillName.Anatomy ) || ( skill == SkillName.Healing ) || ( skill == SkillName.Forensics ) || ( skill == SkillName.SpiritSpeak ); }
public ScrollofAlacrity(SkillName skill) : base(0x14EF) { base.Hue = 0x4AB; base.Weight = 1.0; LootType = LootType.Cursed; m_Skill = skill; }
public void SkillUp(SkillName skill) { var total = Skills.Select((s, i) => i += s.CurrentPurchases).Single(); if (total >= TotalSkillCap) return; //max skill unlocks reached var actor = GetComponentInParent<Actor>(); if (actor == null) return; var sk = Skills.Single(s => s.Name == skill); sk.Purchase(actor); }
public override bool CheckTeach( SkillName skill, Mobile from ) { if ( !base.CheckTeach( skill, from ) ) return false; return ( skill == SkillName.Forensics ) || ( skill == SkillName.Healing ) || ( skill == SkillName.Linguistics ) || ( skill == SkillName.Swords ); }
public ScrollOfTranscendence( SkillName skill, double value ) : base(0x14F0) { Hue = 1168; Weight = 1.0; LootType = LootType.Cursed; m_Skill = skill; m_Value = value; }
public SkillGainMod( PlayerMobile owner, GenericReader reader ) { int version = reader.ReadEncodedInt(); m_Owner = owner; m_Name = reader.ReadString(); m_Skill = (SkillName)reader.ReadInt(); m_Bonus = reader.ReadDouble(); m_Duration = reader.ReadTimeSpan(); m_Added = reader.ReadDateTime(); }
public PowerScroll( SkillName skill, double value ) : base(0x14F0) { base.Hue = 0x481; base.Weight = 1.0; LootType = LootType.Cursed; m_Skill = skill; m_Value = value; }
public ScrollBinderDeed() : base(0x14F0) { m_BinderType = BinderType.None; m_Skill = SkillName.Alchemy; m_Value = 0; m_Needed = 0; m_Has = 0; LootType = LootType.Cursed; Hue = 1641; }
public override bool CheckTeach( SkillName skill, Mobile from ) { if ( !base.CheckTeach( skill, from ) ) return false; return ( skill == SkillName.EvalInt ) || ( skill == SkillName.MagicResist ) || ( skill == SkillName.Tactics ) || ( skill == SkillName.Macing ) || ( skill == SkillName.Wrestling ); }
public static string Skill2Str(SkillName sk) { return(Skill2Str((int)sk)); }
public override int GetHashCode() { return((!string.IsNullOrEmpty(SkillName) ? SkillName.GetHashCode() : 10) * (!string.IsNullOrEmpty(Invoker) ? Invoker.GetHashCode() : 11) * (!string.IsNullOrEmpty(SkillOwner) ? SkillOwner.GetHashCode() : 12)); }
public virtual void SetRestricted(SkillName skill, bool restrict) { SetRestricted((int)skill, restrict); }
public static void PurchaseUpgrade(PlayerMobile player, UOACZHumanUpgradeType upgradeType) { if (player == null) { return; } UOACZPersistance.CheckAndCreateUOACZAccountEntry(player); UOACZHumanUpgradeEntry upgradeEntry = GetUpgradeEntry(player.m_UOACZAccountEntry, upgradeType); if (upgradeEntry == null) { player.m_UOACZAccountEntry.HumanProfile.m_Upgrades.Add(new UOACZHumanUpgradeEntry(upgradeType, 1)); } else { upgradeEntry.m_TimesPurchased++; } player.m_UOACZAccountEntry.HumanProfile.UpgradesSpent++; if (player.m_UOACZAccountEntry.HumanProfile.UpgradesSpent > player.m_UOACZAccountEntry.MostHumanUpgradesSpentInASession) { player.m_UOACZAccountEntry.MostHumanUpgradesSpentInASession = player.m_UOACZAccountEntry.HumanProfile.UpgradesSpent; } UOACZHumanUpgradeDetail upgradeDetail = GetUpgradeDetail(upgradeType); player.m_UOACZAccountEntry.HumanProfile.HungerPoints += upgradeDetail.m_HungerPoints; player.m_UOACZAccountEntry.HumanProfile.MaxHungerPoints += upgradeDetail.m_MaxHungerPoints; player.m_UOACZAccountEntry.HumanProfile.ThirstPoints += upgradeDetail.m_ThirstPoints; player.m_UOACZAccountEntry.HumanProfile.MaxThirstPoints += upgradeDetail.m_MaxThirstPoints; player.m_UOACZAccountEntry.HumanProfile.HumanityPoints += upgradeDetail.m_HumanityPoints; player.m_UOACZAccountEntry.HumanProfile.MaxHumanityPoints += upgradeDetail.m_MaxHumanityPoints; player.m_UOACZAccountEntry.HumanProfile.HonorPoints += upgradeDetail.m_HonorPoints; player.m_UOACZAccountEntry.HumanProfile.MaxHonorPoints += upgradeDetail.m_MaxHonorPoints; int currentHits = player.Hits; int currentStam = player.Stam; int currentMana = player.Mana; player.m_UOACZAccountEntry.HumanProfile.m_Stats[StatType.Str] += upgradeDetail.m_Stats[StatType.Str]; player.m_UOACZAccountEntry.HumanProfile.m_Stats[StatType.Dex] += upgradeDetail.m_Stats[StatType.Dex]; player.m_UOACZAccountEntry.HumanProfile.m_Stats[StatType.Int] += upgradeDetail.m_Stats[StatType.Int]; for (int a = 0; a < player.m_UOACZAccountEntry.HumanProfile.m_Skills.Count; a++) { player.m_UOACZAccountEntry.HumanProfile.m_Skills[(SkillName)a] += upgradeDetail.m_Skills[(SkillName)a]; SkillName skillname = (SkillName)a; List <SkillName> m_Skills = new List <SkillName>(); m_Skills.Add(SkillName.Alchemy); m_Skills.Add(SkillName.Blacksmith); m_Skills.Add(SkillName.Carpentry); m_Skills.Add(SkillName.Cooking); m_Skills.Add(SkillName.Tailoring); m_Skills.Add(SkillName.Tinkering); if (m_Skills.Contains(skillname) && player.m_UOACZAccountEntry.HumanProfile.m_Skills[(SkillName)a] >= 100) { if (player.m_UOACZAccountEntry.HumanProfile.m_GMCraftingSkills.Contains(skillname)) { player.m_UOACZAccountEntry.HumanProfile.m_GMCraftingSkills.Add(skillname); } } } for (int a = 0; a < upgradeDetail.m_Abilities.Count; a++) { UOACZHumanAbilityType abilityType = upgradeDetail.m_Abilities[a]; UOACZHumanAbilityEntry playerAbilityEntry = UOACZHumanAbilities.GetAbilityEntry(player.m_UOACZAccountEntry, abilityType); UOACZHumanAbilityDetail abilityDetail = UOACZHumanAbilities.GetAbilityDetail(abilityType); if (playerAbilityEntry == null) { player.m_UOACZAccountEntry.HumanProfile.m_Abilities.Add(new UOACZHumanAbilityEntry(abilityType, 1, abilityDetail.CooldownMinutes, DateTime.UtcNow)); } else { playerAbilityEntry.m_TimesAcquired++; if (playerAbilityEntry.m_CooldownMinutes != abilityDetail.CooldownMinimumMinutes) { playerAbilityEntry.m_CooldownMinutes -= abilityDetail.CooldownMinutesDecreasePerTimesAcquired; } } } UOACZHumanUpgrades.ShuffleAvailableUpgrades(player.m_UOACZAccountEntry); UOACZSystem.ApplyActiveProfile(player); player.Hits = currentHits; player.Stam = currentStam; player.Mana = currentMana; }
public void EndHeal() { StopHeal(); int healerNumber = -1, patientNumber = -1; bool playSound = true; bool checkSkills = false; SkillName primarySkill = GetPrimarySkill(m_Patient); SkillName secondarySkill = GetSecondarySkill(m_Patient); BaseCreature petPatient = m_Patient as BaseCreature; if (!m_Healer.Alive) { healerNumber = 500962; // You were unable to finish your work before you died. patientNumber = -1; playSound = false; } else if (!m_Healer.InRange(m_Patient, Core.AOS ? 2 : 1)) { healerNumber = 500963; // You did not stay close enough to heal your target. patientNumber = -1; playSound = false; } else if (!m_Patient.Alive || (petPatient != null && petPatient.IsDeadPet)) { double healing = m_Healer.Skills[primarySkill].Value; double anatomy = m_Healer.Skills[secondarySkill].Value; double chance = ((healing - 68.0) / 50.0) - (m_Slips * 0.02); if (((checkSkills = (healing >= 80.0 && anatomy >= 80.0)) && chance > Utility.RandomDouble()) || (Core.SE && petPatient is Factions.FactionWarHorse && petPatient.ControlMaster == m_Healer)) //TODO: Dbl check doesn't check for faction of the horse here? { if (m_Patient.Map == null || !m_Patient.Map.CanFit(m_Patient.Location, 16, false, false)) { healerNumber = 501042; // Target can not be resurrected at that location. patientNumber = 502391; // Thou can not be resurrected there! } else if (m_Patient.Region != null && m_Patient.Region.IsPartOf("Khaldun")) { healerNumber = 1010395; // The veil of death in this area is too strong and resists thy efforts to restore life. patientNumber = -1; } else { healerNumber = 500965; // You are able to resurrect your patient. patientNumber = -1; m_Patient.PlaySound(0x214); m_Patient.FixedEffect(0x376A, 10, 16); if (petPatient != null && petPatient.IsDeadPet) { Mobile master = petPatient.ControlMaster; if (master != null && master.InRange(petPatient, 3)) { healerNumber = 503255; // You are able to resurrect the creature. master.CloseGump(typeof(PetResurrectGump)); master.SendGump(new PetResurrectGump(m_Healer, petPatient)); } else { bool found = false; List <Mobile> friends = petPatient.Friends; for (int i = 0; friends != null && i < friends.Count; ++i) { Mobile friend = friends[i]; if (friend.InRange(petPatient, 3)) { healerNumber = 503255; // You are able to resurrect the creature. friend.CloseGump(typeof(PetResurrectGump)); friend.SendGump(new PetResurrectGump(m_Healer, petPatient)); found = true; break; } } if (!found) { healerNumber = 1049670; // The pet's owner must be nearby to attempt resurrection. } } } else { m_Patient.CloseGump(typeof(ResurrectGump)); m_Patient.SendGump(new ResurrectGump(m_Patient, m_Healer)); } } } else { if (petPatient != null && petPatient.IsDeadPet) { healerNumber = 503256; // You fail to resurrect the creature. } else { healerNumber = 500966; // You are unable to resurrect your patient. } patientNumber = -1; } } else if (m_Patient.Poisoned) { m_Healer.SendLocalizedMessage(500969); // You finish applying the BodyCasts. double healing = m_Healer.Skills[primarySkill].Value; double anatomy = m_Healer.Skills[secondarySkill].Value; double chance = ((healing - 30.0) / 50.0) - (m_Patient.Poison.Level * 0.1) - (m_Slips * 0.02); if ((checkSkills = (healing >= 60.0 && anatomy >= 60.0)) && chance > Utility.RandomDouble()) { if (m_Patient.CurePoison(m_Healer)) { healerNumber = (m_Healer == m_Patient) ? -1 : 1010058; // You have cured the target of all poisons. patientNumber = 1010059; // You have been cured of all poisons. } else { healerNumber = -1; patientNumber = -1; } } else { healerNumber = 1010060; // You have failed to cure your target! patientNumber = -1; } } else if (BleedAttack.IsBleeding(m_Patient)) { healerNumber = -1; patientNumber = 1060167; // The bleeding wounds have healed, you are no longer bleeding! BleedAttack.EndBleed(m_Patient, true); } else if (MortalStrike.IsWounded(m_Patient)) { healerNumber = (m_Healer == m_Patient ? 1005000 : 1010398); patientNumber = -1; playSound = false; } else if (m_Patient.Hits == m_Patient.HitsMax) { healerNumber = 500967; // You heal what little damage your patient had. patientNumber = -1; } else { checkSkills = true; patientNumber = -1; double healing = m_Healer.Skills[primarySkill].Value; double anatomy = m_Healer.Skills[secondarySkill].Value; double chance = ((healing + 10.0) / 100.0) - (m_Slips * 0.02); if (chance > Utility.RandomDouble()) { healerNumber = 500969; // You finish applying the BodyCasts. double min, max; if (Core.AOS) { min = (anatomy / 2.0) + (healing / 2.0) + 2.0; max = (anatomy / 1.5) + (healing / 1.5) + 1.0; } else { min = (anatomy / 3.0) + (healing / 2.0) + 3.0; max = (anatomy / 2.0) + (healing / 2.0) + 10.0; } double toHeal = min + (Utility.RandomDouble() * (max - min)); if (m_Patient.Body.IsMonster || m_Patient.Body.IsAnimal) { toHeal += m_Patient.HitsMax / 500; } if (Core.AOS) { toHeal -= toHeal * m_Slips * 0.35; // TODO: Verify algorithm } else { toHeal -= m_Slips * 4; } if (toHeal < 1) { toHeal = 1; healerNumber = 500968; // You apply the BodyCasts, but they barely help. } m_Patient.Heal((int)toHeal, false); } else { healerNumber = 500968; // You apply the BodyCasts, but they barely help. playSound = false; } } if (healerNumber != -1) { m_Healer.SendLocalizedMessage(healerNumber); } if (patientNumber != -1) { m_Patient.SendLocalizedMessage(patientNumber); } if (playSound) { m_Patient.PlaySound(0x57); } if (checkSkills) { m_Healer.CheckSkill(secondarySkill, 0.0, 120.0); m_Healer.CheckSkill(primarySkill, 0.0, 120.0); } }
public Skill this[SkillName name] { get { return(this[(int)name]); } }
private static void AddSkillItems(SkillName skill, Mobile m) { bool elf = (m.Race == Race.Elf); bool human = (m.Race == Race.Human); bool gargoyle = (m.Race == Race.Gargoyle); switch (skill) { case SkillName.Alchemy: { PackItem(new Bottle(4)); PackItem(new MortarPestle()); int hue = Utility.RandomPinkHue(); if (elf) { if (m.Female) { EquipItem(new FemaleElvenRobe(hue)); } else { EquipItem(new MaleElvenRobe(hue)); } } else { EquipItem(new Robe(Utility.RandomPinkHue())); } break; } case SkillName.Anatomy: { PackItem(new Bandage(3)); int hue = Utility.RandomYellowHue(); if (elf) { if (m.Female) { EquipItem(new FemaleElvenRobe(hue)); } else { EquipItem(new MaleElvenRobe(hue)); } } else { EquipItem(new Robe(hue)); } break; } case SkillName.AnimalLore: { int hue = Utility.RandomBlueHue(); if (elf) { EquipItem(new WildStaff()); if (m.Female) { EquipItem(new FemaleElvenRobe(hue)); } else { EquipItem(new MaleElvenRobe(hue)); } } else { EquipItem(new ShepherdsCrook()); EquipItem(new Robe(hue)); } break; } case SkillName.Archery: { PackItem(new Arrow(25)); if (elf) { EquipItem(new ElvenCompositeLongbow()); } else if (human) { EquipItem(new Bow()); } break; } case SkillName.ArmsLore: { if (elf) { switch (Utility.Random(3)) { case 0: EquipItem(new Leafblade()); break; case 1: EquipItem(new RuneBlade()); break; case 2: EquipItem(new DiamondMace()); break; } } else if (human) { switch (Utility.Random(3)) { case 0: EquipItem(new Kryss()); break; case 1: EquipItem(new Katana()); break; case 2: EquipItem(new Club()); break; } } else if (gargoyle) { switch (Utility.Random(3)) { case 0: EquipItem(new BloodBlade()); break; case 1: EquipItem(new GlassSword()); break; case 2: EquipItem(new DiscMace()); break; } } break; } case SkillName.Begging: { if (elf) { EquipItem(new WildStaff()); } else if (human) { EquipItem(new GnarledStaff()); } else if (gargoyle) { EquipItem(new SerpentStoneStaff()); } break; } case SkillName.Blacksmith: { PackItem(new Tongs()); PackItem(new Pickaxe()); PackItem(new Pickaxe()); PackItem(new IronIngot(50)); if (human || elf) { EquipItem(new HalfApron(Utility.RandomYellowHue())); } break; } case SkillName.Bushido: { if (human || elf) { EquipItem(new Hakama()); EquipItem(new Kasa()); } EquipItem(new BookOfBushido()); break; } case SkillName.Fletching: { PackItem(new Board(14)); PackItem(new Feather(5)); PackItem(new Shaft(5)); break; } case SkillName.Camping: { PackItem(new Bedroll()); PackItem(new Kindling(5)); break; } case SkillName.Carpentry: { PackItem(new Board(10)); PackItem(new Saw()); if (human || elf) { EquipItem(new HalfApron(Utility.RandomYellowHue())); } break; } case SkillName.Cartography: { PackItem(new BlankMap()); PackItem(new BlankMap()); PackItem(new BlankMap()); PackItem(new BlankMap()); PackItem(new Sextant()); break; } case SkillName.Cooking: { PackItem(new Kindling(2)); PackItem(new RawLambLeg()); PackItem(new RawChickenLeg()); PackItem(new RawFishSteak()); PackItem(new SackFlour()); PackItem(new Pitcher(BeverageType.Water)); break; } case SkillName.Chivalry: { if (Core.ML) { PackItem(new BookOfChivalry((ulong)0x3FF)); } break; } case SkillName.DetectHidden: { if (human || elf) { EquipItem(new Cloak(0x455)); } break; } case SkillName.Discordance: { PackInstrument(); break; } case SkillName.Fencing: { if (elf) { EquipItem(new Leafblade()); } else if (human) { EquipItem(new Kryss()); } else if (gargoyle) { EquipItem(new BloodBlade()); } break; } case SkillName.Fishing: { EquipItem(new FishingPole()); int hue = Utility.RandomYellowHue(); if (elf) { Item i = new Circlet(); i.Hue = hue; EquipItem(i); } else if (human) { EquipItem(new FloppyHat(hue)); } break; } case SkillName.Healing: { PackItem(new Bandage(50)); PackItem(new Scissors()); break; } case SkillName.Herding: { if (elf) { EquipItem(new WildStaff()); } else { EquipItem(new ShepherdsCrook()); } break; } case SkillName.Hiding: { if (human || elf) { EquipItem(new Cloak(0x455)); } break; } case SkillName.Inscribe: { PackItem(new BlankScroll(2)); PackItem(new BlueBook()); break; } case SkillName.ItemID: { if (elf) { EquipItem(new WildStaff()); } else if (human) { EquipItem(new GnarledStaff()); } else if (gargoyle) { EquipItem(new SerpentStoneStaff()); } break; } case SkillName.Lockpicking: { PackItem(new Lockpick(20)); break; } case SkillName.Lumberjacking: { if (human || elf) { EquipItem(new Hatchet()); } else if (gargoyle) { EquipItem(new DualShortAxes()); } break; } case SkillName.Macing: { if (elf) { EquipItem(new DiamondMace()); } else if (human) { EquipItem(new Club()); } else if (gargoyle) { EquipItem(new DiscMace()); } break; } case SkillName.Magery: { BagOfReagents regs = new BagOfReagents(50); if (!Core.AOS) { foreach (Item item in regs.Items) { item.LootType = LootType.Newbied; } } PackItem(regs); regs.LootType = LootType.Regular; PackScroll(0); PackScroll(1); PackScroll(2); Spellbook book = new Spellbook((ulong)0x382A8C38); book.LootType = LootType.Blessed; EquipItem(book); if (elf) { EquipItem(new Circlet()); if (m.Female) { EquipItem(new FemaleElvenRobe(Utility.RandomBlueHue())); } else { EquipItem(new MaleElvenRobe(Utility.RandomBlueHue())); } } else { if (human) { EquipItem(new WizardsHat()); } EquipItem(new Robe(Utility.RandomBlueHue())); } break; } case SkillName.Mining: { PackItem(new Pickaxe()); break; } case SkillName.Musicianship: { PackInstrument(); break; } case SkillName.Necromancy: { if (Core.ML) { Container regs = new BagOfNecroReagents(50); PackItem(regs); regs.LootType = LootType.Regular; } // RunUO fix Spellbook book = new NecromancerSpellbook((ulong)0x8981); // animate dead, evil omen, pain spike, summon familiar, wraith form book.LootType = LootType.Blessed; PackItem(book); break; } case SkillName.Ninjitsu: { if (human || elf) { EquipItem(new Hakama(0x2C3)); //Only ninjas get the hued one. EquipItem(new Kasa()); } EquipItem(new BookOfNinjitsu()); break; } case SkillName.Parry: { if (human || elf) { EquipItem(new WoodenShield()); } else if (gargoyle) { EquipItem(new GargishWoodenShield()); } break; } case SkillName.Peacemaking: { PackInstrument(); break; } case SkillName.Poisoning: { PackItem(new LesserPoisonPotion()); PackItem(new LesserPoisonPotion()); break; } case SkillName.Provocation: { PackInstrument(); break; } case SkillName.Snooping: { PackItem(new Lockpick(20)); break; } case SkillName.SpiritSpeak: { if (human || elf) { EquipItem(new Cloak(0x455)); } break; } case SkillName.Stealing: { PackItem(new Lockpick(20)); break; } case SkillName.Swords: { if (elf) { EquipItem(new RuneBlade()); } else if (human) { EquipItem(new Katana()); } else if (gargoyle) { EquipItem(new GlassSword()); } break; } case SkillName.Tactics: { if (elf) { EquipItem(new RuneBlade()); } else if (human) { EquipItem(new Katana()); } else if (gargoyle) { EquipItem(new GlassSword()); } break; } case SkillName.Tailoring: { PackItem(new BoltOfCloth()); PackItem(new SewingKit()); break; } case SkillName.Tinkering: { PackItem(new TinkerTools()); PackItem(new IronIngot(50)); PackItem(new Axle()); PackItem(new AxleGears()); PackItem(new Springs()); PackItem(new ClockFrame()); break; } case SkillName.Tracking: { if (human || elf) { if (m_Mobile != null) { Item shoes = m_Mobile.FindItemOnLayer(Layer.Shoes); if (shoes != null) { shoes.Delete(); } } int hue = Utility.RandomYellowHue(); if (elf) { EquipItem(new ElvenBoots(hue)); } else { EquipItem(new Boots(hue)); } EquipItem(new SkinningKnife()); } else if (gargoyle) { PackItem(new SkinningKnife()); } break; } case SkillName.Veterinary: { PackItem(new Bandage(5)); PackItem(new Scissors()); break; } case SkillName.Wrestling: { if (elf) { EquipItem(new LeafGloves()); } else if (human) { EquipItem(new LeatherGloves()); } else if (gargoyle) { // Why not give them arm armor? EquipItem(new GargishLeatherArms()); } break; } case SkillName.Throwing: { if (gargoyle) { EquipItem(new Boomerang()); } break; } case SkillName.Mysticism: { PackItem(new MysticBook((ulong)0xAB)); break; } } }
//[Constructable( AccessLevel.Owner )] public ScrollofTranscendence(SkillName skill, double value) : base(skill, value) { ItemID = 0x14EF; Hue = 0x490; }
public static ScrollofTranscendence CreateRandom(int min, int max) { SkillName skill = (SkillName)Utility.Random(SkillInfo.Table.Length); return(new ScrollofTranscendence(skill, Utility.RandomMinMax(min, max) * 0.1)); }
public static bool UseSkill(Mobile from, SkillName name) { return(UseSkill(from, (int)name)); }
public static bool SetActiveMastery(Mobile mobile, SkillName name) { return(mobile.Skills[name].SetCurrent()); }
public static string GetName(SkillName name, double value, bool cursed) { var n = value > 6 ? (int)value / 5 : (int)value; return(SkillSpecificNames[name][n, cursed ? 1 : 0]); }
private const double DispelChance = 0.75; // 75% chance to dispel at gm magery public virtual double ScaleBySkill(double v, SkillName skill) { return(v * m_Mobile.Skills[skill].Value / 100); }
public override int GetHashCode() { return(Reason.GetHashCode() * (!string.IsNullOrEmpty(PlayerId) ? PlayerId.GetHashCode() : 10) * (!string.IsNullOrEmpty(TargetId) ? TargetId.GetHashCode() : 11) * (!string.IsNullOrEmpty(SkillName) ? SkillName.GetHashCode() : 12) * (!string.IsNullOrEmpty(EventName) ? EventName.GetHashCode() : 13)); }
protected override void OnTarget(Mobile from, object targeted) { int number = -1; Item origItem = targeted as Item; SkillName skill = m_CraftSystem.MainSkill; double value = from.Skills[skill].Value; var alterInfo = GetAlterableAttribute(targeted, false); if (alterInfo == null) { alterInfo = GetAlterableAttribute(targeted, true); } if (origItem == null || !origItem.IsChildOf(from.Backpack)) { // The item must be in your backpack for you to alter it. number = 1094729; } else if (origItem is BlankScroll) { if (m_Contract == null) { if (value >= 100.0) { Item contract = null; if (skill == SkillName.Blacksmith) { contract = new AlterContract(ContractType.Blacksmith, from); } else if (skill == SkillName.Carpentry) { contract = new AlterContract(ContractType.Carpenter, from); } else if (skill == SkillName.Tailoring) { contract = new AlterContract(ContractType.Tailor, from); } else if (skill == SkillName.Tinkering) { contract = new AlterContract(ContractType.Tinker, from); } if (contract != null) { from.AddToBackpack(contract); number = 1044154; // You create the item. // Consume a blank scroll origItem.Consume(); } } else { // You must be at least grandmaster level to create an alter service contract. number = 1111869; } } else { // You may not alter that item. number = 1094728; } } else if (alterInfo == null) { // You may not alter that item. number = 1094728; } else if (!IsAlterable(origItem)) { // You may not alter that item. number = 1094728; } else if (alterInfo.CraftSystem != m_CraftSystem.GetType()) { if (m_Tool != null) { // You may not alter that item. number = 1094728; } else { // You cannot alter that item with this type of alter contract. number = 1094793; } } else if (!Imbuing.Soulforge.CheckProximity(from, 2)) { // You must be near a soulforge to alter an item. number = 1111867; } else if (!Imbuing.Soulforge.CheckQueen(from)) { // You must rise to the rank of noble in the eyes of the Gargoyle Queen before her majesty will allow you to use this soulforge. number = 1113736; } else if (origItem is BaseWeapon && ((BaseWeapon)origItem).Enchanted) { // You cannot alter an item that is currently enchanted. number = 1111849; } else if (m_Contract == null && value < 100.0) { // You must be at least grandmaster level to alter an item. number = 1111870; } else { Item alteredItem = Activator.CreateInstance(alterInfo.AlteredType) as Item; alteredItem.Hue = origItem.Hue; alteredItem.Insured = origItem.Insured; alteredItem.PayedInsurance = origItem.PayedInsurance; alteredItem.Label1 = origItem.Label1; alteredItem.Label2 = origItem.Label2; alteredItem.Label3 = origItem.Label3; alteredItem.LootType = origItem.LootType; if (origItem.LabelNumber != origItem.DefaultLabelNumber) { alteredItem.LabelNumber = origItem.LabelNumber; } AlterFrom(origItem, alteredItem); alteredItem.Hue = origItem.PrivateHue; from.PlaceInBackpack(alteredItem); alteredItem.Location = origItem.Location; origItem.Delete(); if (m_Contract != null) { m_Contract.Delete(); } // You have altered the item. number = 1094727; } if (m_Tool != null) { from.SendGump(new CraftGump(from, m_CraftSystem, m_Tool, number)); } else { from.SendLocalizedMessage(number); } }
public virtual bool IsRestricted(SkillName skill) { return(IsRestricted((int)skill)); }
public override void OnResponse(NetState state, RelayInfo info) { Mobile from = state.Mobile; if (from == null || m_TrackingSkillScroll.Deleted) { return; } if (m_TrackingSkillScroll.Expires && DateTime.UtcNow >= m_TrackingSkillScroll.ExpireDate) { m_TrackingSkillScroll.SendLocalizedMessageTo(from, 1042544); // This item is out of charges. } else if (!m_TrackingSkillScroll.IsChildOf(from.Backpack)) { from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. } else if (info.ButtonID == 1) { SkillName skillname = (m_TrackingSkillScroll.GetAllowedSkills())[info.ButtonID - 1]; m_Skill = m_Target.Skills[skillname]; if (m_Skill == null) { return; } double count = m_Target.Skills.Total / 10; double cap = m_Target.SkillsCap / 10; double decreaseamount; int bonus = m_TrackingSkillScroll.SkillBonus; List <Skill> decreased = m_TrackingSkillScroll.GetDecreasableSkills(from, m_Target, count, cap, out decreaseamount); if (decreased.Count > 0 && decreaseamount <= 0) { from.SendMessage("You have exceeded the skill cap and do not have a skill set to be decreased."); } else if (m_TrackingSkillScroll.NewbieBall && m_Skill.Base > 0) { from.SendMessage("You may only choose skills which are at zero."); } else if ((m_Skill.Base + bonus) > m_Skill.Cap) { from.SendMessage("Your skill is too high to raise it further."); } else if (m_Skill.Lock != SkillLock.Up) { from.SendMessage("You must set the skill to be increased in order to raise it further."); } else { if ((cap - count + decreaseamount) >= bonus) { m_TrackingSkillScroll.DecreaseSkills(from, m_Target, decreased, count, cap, decreaseamount); m_TrackingSkillScroll.IncreaseSkill(from, m_Target, m_Skill); if (!m_TrackingSkillScroll.Rechargable) { m_TrackingSkillScroll.Delete(); } } else { from.SendMessage("You have exceeded the skill cap and do not have enough skill set to be decreased."); } } } }
public static bool IsGuildSkill(Mobile from, SkillName skillName) { PlayerMobile pm = (PlayerMobile)from; if (pm.NpcGuild == NpcGuild.MagesGuild) { if (skillName == SkillName.EvalInt) { return(true); } else if (skillName == SkillName.Magery) { return(true); } else if (skillName == SkillName.Meditation) { return(true); } } else if (pm.NpcGuild == NpcGuild.WarriorsGuild) { if (skillName == SkillName.Fencing) { return(true); } else if (skillName == SkillName.Macing) { return(true); } else if (skillName == SkillName.Parry) { return(true); } else if (skillName == SkillName.Swords) { return(true); } else if (skillName == SkillName.Tactics) { return(true); } } else if (pm.NpcGuild == NpcGuild.ThievesGuild) { if (skillName == SkillName.Hiding) { return(true); } else if (skillName == SkillName.Lockpicking) { return(true); } else if (skillName == SkillName.Snooping) { return(true); } else if (skillName == SkillName.Stealing) { return(true); } else if (skillName == SkillName.Stealth) { return(true); } } else if (pm.NpcGuild == NpcGuild.RangersGuild) { if (skillName == SkillName.Camping) { return(true); } else if (skillName == SkillName.Tracking) { return(true); } } else if (pm.NpcGuild == NpcGuild.HealersGuild) { if (skillName == SkillName.Anatomy) { return(true); } else if (skillName == SkillName.Healing) { return(true); } else if (skillName == SkillName.Veterinary) { return(true); } } else if (pm.NpcGuild == NpcGuild.MinersGuild) { if (skillName == SkillName.Mining) { return(true); } } else if (pm.NpcGuild == NpcGuild.MerchantsGuild) { if (skillName == SkillName.ItemID) { return(true); } else if (skillName == SkillName.ArmsLore) { return(true); } else if (skillName == SkillName.TasteID) { return(true); } } else if (pm.NpcGuild == NpcGuild.TinkersGuild) { if (skillName == SkillName.Tinkering) { return(true); } } else if (pm.NpcGuild == NpcGuild.TailorsGuild) { if (skillName == SkillName.Tailoring) { return(true); } } else if (pm.NpcGuild == NpcGuild.FishermensGuild) { if (skillName == SkillName.Fishing) { return(true); } } else if (pm.NpcGuild == NpcGuild.BardsGuild) { if (skillName == SkillName.Discordance) { return(true); } else if (skillName == SkillName.Musicianship) { return(true); } else if (skillName == SkillName.Peacemaking) { return(true); } else if (skillName == SkillName.Provocation) { return(true); } } else if (pm.NpcGuild == NpcGuild.BlacksmithsGuild) { if (skillName == SkillName.Blacksmith) { return(true); } else if (skillName == SkillName.ArmsLore) { return(true); } } else if (pm.NpcGuild == NpcGuild.NecromancersGuild) { if (skillName == SkillName.Forensics) { return(true); } else if (skillName == SkillName.Necromancy) { return(true); } else if (skillName == SkillName.SpiritSpeak) { return(true); } } else if (pm.NpcGuild == NpcGuild.AlchemistsGuild) { if (skillName == SkillName.Alchemy) { return(true); } else if (skillName == SkillName.Cooking) { return(true); } else if (skillName == SkillName.TasteID) { return(true); } } else if (pm.NpcGuild == NpcGuild.DruidsGuild) { if (skillName == SkillName.AnimalLore) { return(true); } else if (skillName == SkillName.AnimalTaming) { return(true); } else if (skillName == SkillName.Herding) { return(true); } else if (skillName == SkillName.Veterinary) { return(true); } else if (skillName == SkillName.Cooking) { return(true); } } else if (pm.NpcGuild == NpcGuild.ArchersGuild) { if (skillName == SkillName.Archery) { return(true); } else if (skillName == SkillName.Fletching) { return(true); } else if (skillName == SkillName.Tactics) { return(true); } } else if (pm.NpcGuild == NpcGuild.CarpentersGuild) { if (skillName == SkillName.Carpentry) { return(true); } else if (skillName == SkillName.Lumberjacking) { return(true); } } else if (pm.NpcGuild == NpcGuild.CartographersGuild) { if (skillName == SkillName.Cartography) { return(true); } } else if (pm.NpcGuild == NpcGuild.LibrariansGuild) { if (skillName == SkillName.ItemID) { return(true); } else if (skillName == SkillName.Inscribe) { return(true); } } else if (pm.NpcGuild == NpcGuild.CulinariansGuild) { if (skillName == SkillName.Cooking) { return(true); } else if (skillName == SkillName.TasteID) { return(true); } } else if (pm.NpcGuild == NpcGuild.AssassinsGuild) { if (skillName == SkillName.Fencing) { return(true); } else if (skillName == SkillName.Hiding) { return(true); } else if (skillName == SkillName.Poisoning) { return(true); } else if (skillName == SkillName.Stealth) { return(true); } } return(false); }
public ScrollofAlacrity(SkillName skill) : base(skill, 0.0) { ItemID = 0x14EF; Hue = 0x4AB; }
public override void OnResponse(Server.Network.NetState sender, RelayInfo info) { int bp; //button pushed switch (info.ButtonID) { case 1: bp = 0; break; case 2: bp = 1; break; case 3: bp = 2; break; case 4: bp = 3; break; case 5: bp = 4; break; case 6: bp = 5; break; case 7: bp = 6; break; case 8: bp = 7; break; case 9: bp = 8; break; case 10: bp = 9; break; case 11: bp = 10; break; case 12: bp = 11; break; case 13: bp = 12; break; case 14: bp = 13; break; case 15: bp = 14; break; case 16: bp = 15; break; case 17: bp = 16; break; case 18: bp = 17; break; case 19: bp = 18; break; case 20: bp = 19; break; case 21: bp = 20; break; case 22: bp = 21; break; case 23: bp = 22; break; case 24: bp = 23; break; case 25: bp = 24; break; case 26: bp = 25; break; case 27: bp = 26; break; case 28: bp = 27; break; case 29: bp = 28; break; case 30: bp = 29; break; case 31: bp = 30; break; case 32: bp = 31; break; case 33: bp = 32; break; case 34: bp = 33; break; case 35: bp = 34; break; case 36: bp = 35; break; case 37: bp = 36; break; case 38: bp = 37; break; case 39: bp = 38; break; case 40: bp = 39; break; case 41: bp = 40; break; case 42: bp = 41; break; case 43: bp = 42; break; case 44: bp = 43; break; case 45: bp = 44; break; case 46: bp = 45; break; case 47: bp = 46; break; case 48: bp = 47; break; case 49: bp = 48; break; case 50: bp = 49; break; default: return; } ScrollofTranscendence scroll = m_Book.Entries[bp] as ScrollofTranscendence; SkillName sklnm = scroll.Skill; double sklval = scroll.Value; ScrollofTranscendence newScroll = new ScrollofTranscendence(sklnm, sklval); m_From.AddToBackpack(newScroll); m_Book.Entries.RemoveAt(bp); m_Book.InvalidateProperties(); }
public static Item CreateBulkOrder(Mobile m, BODType type, bool fromContextMenu) { PlayerMobile pm = m as PlayerMobile; if (pm == null) { return(null); } if (pm.AccessLevel > AccessLevel.Player || fromContextMenu || 0.2 > Utility.RandomDouble()) { SkillName sk = GetSkillForBOD(type); double theirSkill = pm.Skills[sk].Base; bool doLarge = theirSkill >= 70.1 && ((theirSkill - 40.0) / 300.0) > Utility.RandomDouble(); switch (type) { case BODType.Smith: if (doLarge) { return(new LargeSmithBOD()); } else { return(SmallSmithBOD.CreateRandomFor(pm)); } case BODType.Tailor: if (doLarge) { return(new LargeTailorBOD()); } else { return(SmallTailorBOD.CreateRandomFor(pm)); } case BODType.Alchemy: if (doLarge) { return(new LargeAlchemyBOD()); } else { return(SmallAlchemyBOD.CreateRandomFor(pm)); } case BODType.Inscription: if (doLarge) { return(new LargeInscriptionBOD()); } else { return(SmallInscriptionBOD.CreateRandomFor(pm)); } case BODType.Tinkering: if (doLarge) { return(new LargeTinkerBOD()); } else { return(SmallTinkerBOD.CreateRandomFor(pm)); } case BODType.Cooking: if (doLarge) { return(new LargeCookingBOD()); } else { return(SmallCookingBOD.CreateRandomFor(pm)); } case BODType.Fletching: if (doLarge) { return(new LargeFletchingBOD()); } else { return(SmallFletchingBOD.CreateRandomFor(pm)); } case BODType.Carpentry: if (doLarge) { return(new LargeCarpentryBOD()); } else { return(SmallCarpentryBOD.CreateRandomFor(pm)); } } } return(null); }
public Invader(SkillName specialty, InvasionType type) : base(GetAI(specialty), FightMode.Closest, 10, 1, .2, .1) { _Specialty = specialty; _InvasionType = type; if (_Specialty == SkillName.Bushido && Utility.RandomBool()) { _Sampire = true; } if (Female = Utility.RandomBool()) { //Body = 0x191; Name = NameList.RandomName("female"); } else { //Body = 0x190; Name = NameList.RandomName("male"); } SetBody(); string title; if (_Sampire) { title = "the sampire"; } else if (specialty == SkillName.Magery) { title = "the wizard"; } else { title = string.Format("the {0}", Skills[specialty].Info.Title); if (Female && title.EndsWith("man")) { title = title.Substring(0, title.Length - 3) + "woman"; } } Title = title; SetStr(120, 170); SetDex(SpellCaster ? 75 : 150); SetInt(SpellCaster ? 1800 : 500); SetHits(800, 1250); if (AI == AIType.AI_Melee) { SetDamage(15, 28); } else if (!SpellCaster) { SetDamage(12, 22); } else { SetDamage(8, 18); } Fame = 8000; Karma = -8000; SetResists(); SetSkills(); EquipSpecialty(); _NextSpecial = DateTime.UtcNow; if (_Sampire) { Timer.DelayCall(TimeSpan.FromSeconds(1), () => { VampiricEmbraceSpell spell = new VampiricEmbraceSpell(this, null); spell.Cast(); }); } SetAreaEffect(AreaEffect.AuraOfEnergy); }
private bool CheckWeaken(Mobile mob, SkillName skill, int curHits, int maxHits) { return(this.GetWeakenChance(mob, skill, curHits, maxHits) > Utility.Random(100)); }
public KinHealerStatlossSkillMod(SkillName skill, PlayerMobile p) : base(skill, true, p.Skills[skill].Base * KinSystemSettings.StatLossPercentageSkills * -1 * KinSystemSettings.KinHealerModifier, DateTime.Now.AddMinutes(KinSystemSettings.StatLossDurationMinutes)) { }
private int GetWeakenChance(Mobile mob, SkillName skill, int curHits, int maxHits) { // 40% - (1% per hp lost) - (1% per 10 craft skill) return((40 + (maxHits - curHits)) - (int)(((this.m_Deed != null) ? this.m_Deed.SkillLevel : mob.Skills[skill].Value) / 10)); }
public void AddSkill(SkillName skillToMake, double minSkill, double maxSkill) { CraftSkill craftSkill = new CraftSkill(skillToMake, minSkill, maxSkill); m_arCraftSkill.Add(craftSkill); }
public static bool CheckSkill(Mobile from, Skill skill, object amObj, double chance) { SkillName skillName = skill.SkillName; if (from.Skills.Cap == 0) { return(false); } double gainer = 2.0; if (from is PlayerMobile) { if (IsGuildSkill(from, skillName) == true) // WIZARD WANTS GUILD MEMBERS TO GAIN QUICKER { switch (Utility.RandomMinMax(0, 5)) { case 0: gainer = 1.5; break; case 1: gainer = 1.4; break; case 2: gainer = 1.3; break; case 3: gainer = 1.2; break; case 4: gainer = 1.1; break; case 5: gainer = 1.0; break; } } } bool success = (chance >= Utility.RandomDouble()); double gc = (double)(from.Skills.Cap - from.Skills.Total) / from.Skills.Cap; gc += (skill.Cap - skill.Base) / skill.Cap; gc /= gainer; gc += (1.0 - chance) * (success ? 0.5 : (Core.AOS ? 0.0 : 0.2)); gc /= gainer; gc *= skill.Info.GainFactor; if (gc < 0.01) { gc = 0.01; } if (from is BaseCreature && ((BaseCreature)from).Controlled) { gc *= 2; } if (from.Alive && ((gc >= Utility.RandomDouble() && AllowGain(from, skill, amObj)) || skill.Base < 10.0)) { // CAN ONLY GAIN FISHING SKILL ON A BOAT AFTER REACHING 50 if (Worlds.IsOnBoat(from) == false && skill.SkillName == SkillName.Fishing && from.Skills[SkillName.Fishing].Base >= 50) { from.SendMessage("You will only get better at fishing if you do it from a boat."); } else { Gain(from, skill); } } return(success); }
public static double GetBODSkill(Mobile m, SkillName skill) { return(Math.Max(m.Skills[skill].Base, m.GetRacialSkillBonus(skill))); }
public static bool HasMastery(Mobile mobile, SkillName name) { Skill sk = mobile.Skills[name]; return(sk.IsMastery && sk.VolumeLearned != 0); }
public SkillTarget(SkillName skill) : base(-1, false, TargetFlags.None) { m_Set = false; m_Skill = skill; }