Elin:Code Analysis/Combat: Difference between revisions

From Ylvapedia
Jump to navigation Jump to search
No edit summary
Line 12: Line 12:
|(92)
|(92)
|Penetration
|Penetration
|
|-
|(108)
|Throwing
|
|
|-
|-
Line 72: Line 76:
If weilding Martial Art Weapon:
If weilding Martial Art Weapon:


Damage Bonus is your empty hand Damage Bonus + '''weapon's''' '''Damage Bonus'''
Damage Bonus is your empty hand Damage Bonus + '''Weapon's''' '''Damage Bonus'''


Dice Number is your empty hand Dice Number + '''weapon's''' '''Dice Number'''
Dice Number is your empty hand Dice Number + '''Weapon's''' '''Dice Number'''


Dice Face is your empty hand Dice Face / 2 + '''weapon's Dice Face'''
Dice Face is your empty hand Dice Face / 2 + '''Weapon's Dice Face'''


Dice Number is your empty hand Dice Number + '''weapon's''' '''Dice Number'''
Dice Number is your empty hand Dice Number + '''Weapon's''' '''Dice Number'''


To Hit Bonus is your empty hand To Hit Bonus + '''weapon's''' '''To Hit Bonus'''
To Hit Bonus is your empty hand To Hit Bonus + '''Weapon's''' '''To Hit Bonus'''


Penetration is your empty hand Penetration  + '''weapon's''' '''Penetration'''
Penetration is your empty hand Penetration  + '''Weapon's''' '''Penetration'''


==Throwing==
==Throwing==
<syntaxhighlight lang="c#" line="1">
if (this.isThrow)
{
    bool flag = this.weapon.HasTag(CTAG.throwWeapon) || this.weapon.HasTag(CTAG.throwWeaponEnemy);
    int num2 = (int)Mathf.Clamp(Mathf.Sqrt((float)(this.weapon.SelfWeight + this.weapon.ChildrenWeight)) * 3f + 25f + (float)(flag ? 75 : 0), 10f, 400f + Mathf.Sqrt((float)this.CC.STR) * 50f);
    int num3 = Mathf.Clamp(this.weapon.material.hardness, flag ? 40 : 20, 200);
    this.weaponSkill = this.CC.elements.GetOrCreateElement(108);
    this.attackType = AttackType.Blunt;
    this.dBonus = (this.CC.IsPCParty ? 3 : 7);
    this.dNum = 2;
    this.dDim = ((this.CC.IsPCParty ? 0 : this.CC.LV) + this.CC.STR + this.CC.Evalue(108)) * num2 * num3 / 10000 / 2;
    this.dMulti = 1f;
    this.toHitBase = EClass.curve(this.CC.DEX / 4 + this.CC.STR / 2 + this.weaponSkill.Value, 50, 25, 75) + (this.CC.IsPC ? 75 : 250);
    this.toHitFix = this.CC.HIT + this.weapon.HIT;
    this.penetration = 25;
}
</syntaxhighlight>The player throw the item from hand returning or not using the Throwing skill.
Attack Type is always '''Blunt'''
Weight Value is '''√Throwing Item Weight * 3 + if''' '''is Throwing Weapon: 75''' else '''0''', with floor of '''10''' to ceiling of '''400''' + '''√(Strength * 50)'''
Material Value is '''Material Hardness''', with floor of '''if''' '''is Throwing Weapon: 40''' else '''0''' to ceiling of '''200'''
Dice Number is always '''2'''
Dice Face is ('''if isn't Player Character: Character Level''' + '''Strength''' + '''Throwing''' ) * '''Weight Value''' * '''Material Value / 10000 / 2'''
Accuracy is ('''Dexterity''' / 4 + '''Strength''' / 2 + '''Throwing''') with a minimum value of '''25+50''' and a maximum of '''75+50 +''' ('''if is Player Character: 75''' else '''250''' )
To Hit bonus is '''Character To Hit Bonus''' + '''Weapon's''' '''To Hit Bonus'''
Damage bonus is '''if is Player Character: 3''' else 7
Damage Multiplier is always '''1'''
Penetration is always '''25'''
[[Category:EN]]
[[Category:EN]]
[[Category:Elin Spoiler]]
[[Category:Elin Spoiler]]

Revision as of 03:07, 17 November 2024

Evalue List

Value# Element Notes
(92) Penetration
(108) Throwing
(132) Tactics
(1400) Feat: Weapon Mastery 1, 2

Martial Arts

else if (this.IsMartial || this.IsMartialWeapon)
{
    this.weaponSkill = this.CC.elements.GetOrCreateElement(100);
    this.attackType = (this.CC.race.meleeStyle.IsEmpty() ? ((EClass.rnd(2) == 0) ? AttackType.Kick : AttackType.Punch) : this.CC.race.meleeStyle.ToEnum(true));
    this.dBonus = this.CC.DMG + this.CC.encLV + (int)Mathf.Sqrt((float)(this.CC.STR / 5 + this.weaponSkill.Value / 4));
    this.dNum = 2 + Mathf.Min(this.weaponSkill.Value / 10, 4);
    this.dDim = 5 + (int)Mathf.Sqrt((float)(this.weaponSkill.Value / 3));
    this.dMulti = 0.6f + (float)(this.CC.STR / 2 + this.weaponSkill.Value / 2 + this.CC.Evalue(132) / 2) / 50f;
    this.dMulti += 0.05f * (float)this.CC.Evalue(1400);
    this.toHitBase = EClass.curve(this.CC.DEX / 3 + this.CC.STR / 3 + this.weaponSkill.Value, 50, 25, 75) + 50;
    this.toHitFix = this.CC.HIT;
    if (this.attackStyle == AttackStyle.Shield)
    {
        this.toHitBase = this.toHitBase * 75 / 100;
    }
    this.penetration = Mathf.Clamp(this.weaponSkill.Value / 10 + 5, 5, 20) + this.CC.Evalue(92);
    if (this.IsMartialWeapon)
    {
        this.dBonus += this.weapon.DMG;
        this.dNum += this.weapon.source.offense[0];
        this.dDim = Mathf.Max(this.dDim / 2 + this.weapon.c_diceDim, 1);
        this.toHitFix += this.weapon.HIT;
        this.penetration += this.weapon.Penetration;
        if (!this.weapon.source.attackType.IsEmpty())
        {
            this.attackType = this.weapon.source.attackType.ToEnum(true);
        }
    }
}

The player kicks or punches using the Martial Arts skill. The player will kick or punch based on melee style or character specifications.

Damage is determined by Martial Arts, Strength, Dexterity, Enchantment Value

Damage dice is 2+(Martial Arts / 10), to a maximum of d6.

The damage value of the dice is 5+√(Martial Arts / 3).

Damage multiplier is 0.6 + ((Strength / 2 + Martial Arts / 2 + Evalue(132) / 2) / 50.0).

If the player has the Weapon Mastery feat, additional damage is provided at a rate of 0.05x(Weapon Mastery Rank). (Effectively, +0.05 or +0.10)

Accuracy is ((Strength /3 + Dexterity /3 + Martial Arts)+50)), with a minimum value of 25+50 and a maximum of 75+50. If the player is wielding a Shield, there is a -25% downward adjustment.

Penetration is calculated at (Martial Arts/10)+5, with a minimum of 5% and a maximum of 20%+Evalue(92).

If weilding Martial Art Weapon:

Damage Bonus is your empty hand Damage Bonus + Weapon's Damage Bonus

Dice Number is your empty hand Dice Number + Weapon's Dice Number

Dice Face is your empty hand Dice Face / 2 + Weapon's Dice Face

Dice Number is your empty hand Dice Number + Weapon's Dice Number

To Hit Bonus is your empty hand To Hit Bonus + Weapon's To Hit Bonus

Penetration is your empty hand Penetration + Weapon's Penetration

Throwing

if (this.isThrow)
{
    bool flag = this.weapon.HasTag(CTAG.throwWeapon) || this.weapon.HasTag(CTAG.throwWeaponEnemy);
    int num2 = (int)Mathf.Clamp(Mathf.Sqrt((float)(this.weapon.SelfWeight + this.weapon.ChildrenWeight)) * 3f + 25f + (float)(flag ? 75 : 0), 10f, 400f + Mathf.Sqrt((float)this.CC.STR) * 50f);
    int num3 = Mathf.Clamp(this.weapon.material.hardness, flag ? 40 : 20, 200);
    this.weaponSkill = this.CC.elements.GetOrCreateElement(108);
    this.attackType = AttackType.Blunt;
    this.dBonus = (this.CC.IsPCParty ? 3 : 7);
    this.dNum = 2;
    this.dDim = ((this.CC.IsPCParty ? 0 : this.CC.LV) + this.CC.STR + this.CC.Evalue(108)) * num2 * num3 / 10000 / 2;
    this.dMulti = 1f;
    this.toHitBase = EClass.curve(this.CC.DEX / 4 + this.CC.STR / 2 + this.weaponSkill.Value, 50, 25, 75) + (this.CC.IsPC ? 75 : 250);
    this.toHitFix = this.CC.HIT + this.weapon.HIT;
    this.penetration = 25;
}

The player throw the item from hand returning or not using the Throwing skill.

Attack Type is always Blunt

Weight Value is √Throwing Item Weight * 3 + if is Throwing Weapon: 75 else 0, with floor of 10 to ceiling of 400 + √(Strength * 50)

Material Value is Material Hardness, with floor of if is Throwing Weapon: 40 else 0 to ceiling of 200

Dice Number is always 2

Dice Face is (if isn't Player Character: Character Level + Strength + Throwing ) * Weight Value * Material Value / 10000 / 2

Accuracy is (Dexterity / 4 + Strength / 2 + Throwing) with a minimum value of 25+50 and a maximum of 75+50 + (if is Player Character: 75 else 250 )

To Hit bonus is Character To Hit Bonus + Weapon's To Hit Bonus

Damage bonus is if is Player Character: 3 else 7

Damage Multiplier is always 1

Penetration is always 25