Git Product home page Git Product logo

Comments (2)

Dapoulp avatar Dapoulp commented on August 14, 2024

Ok, I managed to make it work with right Ability modifier and Two-Weaon Fighting Style. No need for custom tag as there is already a function to check if the character got a specific passive.
So, in "Spell_Target_Zerd.txt", just replace the "SpellSuccess" content of "Target_OffhandAttack" with:
IF(WieldingFinesseWeapon(context.Source) and not(HasPassive('FightingStyle_TwoWeaponFighting',context.Source))):DealDamage(max(1,OffhandMeleeWeapon)-max(0,max(StrengthModifier,DexterityModifier)), OffhandMeleeWeaponDamageType);IF(WieldingFinesseWeapon(context.Source) and HasPassive('FightingStyle_TwoWeaponFighting',context.Source)):DealDamage(max(1,OffhandMeleeWeapon), OffhandMeleeWeaponDamageType);IF(not WieldingFinesseWeapon(context.Source) and not(HasPassive('FightingStyle_TwoWeaponFighting',context.Source))):DealDamage(max(1,OffhandMeleeWeapon)-max(0,StrengthModifier), OffhandMeleeWeaponDamageType);IF(not WieldingFinesseWeapon(context.Source) and HasPassive('FightingStyle_TwoWeaponFighting',context.Source)):DealDamage(max(1,OffhandMeleeWeapon), OffhandMeleeWeaponDamageType);ExecuteWeaponFunctors(OffHand)

from raw.

FelipeRenault avatar FelipeRenault commented on August 14, 2024

Thanks for the suggestions! Feel free to open a PR next time. Here's the end result
data "SpellSuccess" "IF(HasPassive('FightingStyle_TwoWeaponFighting',context.Source)):DealDamage(max(1,OffhandMeleeWeapon),OffhandMeleeWeaponDamageType);IF(not HasPassive('FightingStyle_TwoWeaponFighting',context.Source) and WieldingWeapon('Finesse', true, false, context.Source)):DealDamage(max(1,OffhandMeleeWeapon)-max(0,max(StrengthModifier,DexterityModifier)),OffhandMeleeWeaponDamageType);IF(not HasPassive('FightingStyle_TwoWeaponFighting',context.Source) and not WieldingWeapon('Finesse', true, false, context.Source)):DealDamage(max(1,OffhandMeleeWeapon)-max(0,StrengthModifier), OffhandMeleeWeaponDamageType);ExecuteWeaponFunctors(OffHand);"
I had to include context.Source to the HasPassive checks, since it defaults to context.Target. Only one condition is needed if the target has the Two Weapon Fighting Style, since I don't need to subtract the modifier anyways (using the bug at our favor here). Also, I changed WieldingFinesseWeapon for a more specific check using WieldingWeapon('Finesse', true, false, context.Source). This checks if the offhand weapon is Finesse, not considering the main hand at all (the second parameter is false for mainhand and true for offhand)

from raw.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.