Skip to content

Commit

Permalink
Merge pull request #25 from Tawmy/feature/hand-land-attributes
Browse files Browse the repository at this point in the history
Add disciple of hand/land attributes to CharacterAttributes
  • Loading branch information
Koenari authored Oct 19, 2024
2 parents 7044326 + c146bcc commit 5186484
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 2 deletions.
35 changes: 33 additions & 2 deletions NetStone/Model/Parseables/Character/CharacterAttributes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,19 @@ public CharacterAttributes(HtmlNode rootNode, CharacterAttributesDefinition defi
/// <summary>
/// This characters' Attack Magic Potency value.
/// </summary>
public int AttackMagicPotency => int.Parse(Parse(this.definition.AttackMagicPotency));
/// <remarks>This value is only set for disciples of war/magic.</remarks>
public int? AttackMagicPotency => MpGpCpParameterName == "MP" ? int.Parse(Parse(this.definition.AttackMagicPotency)) : null;

/// <summary>
/// This characters' Healing Magic Potency value.
/// </summary>
public int HealingMagicPotency => int.Parse(Parse(this.definition.HealingMagicPotency));
/// <remarks>This value is only set for disciples of war/magic.</remarks>
public int? HealingMagicPotency => MpGpCpParameterName == "MP" ? int.Parse(Parse(this.definition.HealingMagicPotency)) : null;

/// <summary>
/// This characters' Spell Speed value.
/// </summary>
/// <remarks>This value is only set for disciples of war/magic.</remarks>
public int? SpellSpeed => int.TryParse(Parse(this.definition.SpellSpeed), out var result) ? result : null;

/// <summary>
Expand All @@ -105,6 +108,30 @@ public CharacterAttributes(HtmlNode rootNode, CharacterAttributesDefinition defi
/// </summary>
public int? Piety => int.TryParse(Parse(this.definition.Piety), out var result) ? result : null;

/// <summary>
/// This characters' Craftmanship value.
/// </summary>
/// <remarks>This value is only set for disciples of the hand.</remarks>
public int? Craftmanship => MpGpCpParameterName == "CP" ? AttackMagicPotencyValue : null;

/// <summary>
/// This characters' Control value.
/// </summary>
/// <remarks>This value is only set for disciples of the hand.</remarks>
public int? Control => MpGpCpParameterName == "CP" ? HealingMagicPotencyValue : null;

/// <summary>
/// This characters' Gathering value.
/// </summary>
/// <remarks>This value is only set for disciples of the land.</remarks>
public int? Gathering => MpGpCpParameterName == "GP" ? AttackMagicPotencyValue : null;

/// <summary>
/// This characters' Perception value.
/// </summary>
/// <remarks>This value is only set for disciples of the land.</remarks>
public int? Perception => MpGpCpParameterName == "GP" ? HealingMagicPotencyValue : null;

/// <summary>
/// This characters' HP value.
/// </summary>
Expand All @@ -119,4 +146,8 @@ public CharacterAttributes(HtmlNode rootNode, CharacterAttributesDefinition defi
/// Value indicating which of MP, GP, or CP is indicated by <see cref="MpGpCp"/>.
/// </summary>
public string MpGpCpParameterName => Parse(this.definition.MpGpCpParameterName);

private int AttackMagicPotencyValue => int.Parse(Parse(this.definition.AttackMagicPotency));

private int HealingMagicPotencyValue => int.Parse(Parse(this.definition.HealingMagicPotency));
}
27 changes: 27 additions & 0 deletions NetStone/NetStone.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5186484

Please sign in to comment.