Phobos
Phobos copied to clipboard
Minor crit enhancement
1 - Crit chance and extra damage can now be determined differently when target health is below certain percentage
Crit.Chancedetermines chance for a critical hit to occur. By default this is checked once when the Warhead is detonated and every target that is susceptible to critical hits will be affected. IfCrit.ApplyChancePerTargetis set, then whether or not the chance roll is successful is determined individually for each target. Can be set to a single value for all conditions, or a list of values which would work when target health is below certain percentage. Value from position matching the position fromCrit.AffectBelowPercentis used if found, or 0.0 if not found.Crit.ExtraDamagedetermines the damage dealt by the critical hit. IfCrit.Warheadis set, the damage is used to detonate the specified Warhead on each affected target, otherwise the damage is directly dealt based on current Warhead'sVersessettings. Can be set to a single value for all conditions, or a list of values which would work when target health is below certain percentage. Value from position matching the position fromCrit.AffectBelowPercentis used if found, or 0 if not found.Crit.AffectBelowPercent, if set to a single value, determines minimum percentage of their maximumStrengththat targets must have left to be affected by a critical hit. If set to a list of values, it'll further determineCrit.ChanceandCrit.ExtraDamagewhen target health is below the certain percentage listed here.- Health percentage values in the list should be in descending order, or the health check could go wrong.
2 - Add AE multiplier for crit extra damage
Crit.ExtraDamage.MultiplierandCrit.ExtraDamage.Bonuscan be used to multiply the critical hit extra damage or grant a fixed bonus to it for the object the effect is attached to, respectively. They also respectCrit.AllowWarheadsandCrit.DisallowWarheads.
In rulesmd.ini:
[SOMEWARHEAD] ; Warhead
Crit.Chance= ; list of floating-point values (percentage or absolute) (0.0-1.0)
Crit.ExtraDamage= ; list of integers
Crit.AffectBelowPercent= ; list of floating-point values (percentage or absolute) (0.0-1.0)
[SOMEATTACHEFFECT] ; AttachEffectType
Crit.ExtraDamage.Multiplier=1.0 ; floating point value
Crit.ExtraDamage.Bonus=0 ; integer
NOTE:
- If using crit logic in the original way (single value for
Crit.Chance,Crit.ExtraDamageandCrit.AffectBelowPercent), it'll work exactly the same.
Example 1:
- when target health is between 100%-75% it'll have a 10% chance to deal crit with 10 extra damage.
- when target health is between 75%-50% it'll have a 20% chance to deal crit with 10 extra damage.
- when target health is between 50%-25% it'll have a 20% chance to deal crit with 20 extra damage.
- when target health is between 25%-0% it'll have a 50% chance to deal crit with 50 extra damage.
[SOMEWARHEAD]
Crit.Chance=10%,20%,20%,50%
Crit.ExtraDamage=10,10,20,50
Crit.AffectBelowPercent=100%,75%,50%,25%
Example 2:
use this new logic to simply increase damage based on the target's remaining health.
since Crit.Chance is set to a single value, it means that it'll be 100% for any health percentage.
[SOMEWARHEAD]
Crit.Chance=1.0
Crit.ExtraDamage=10,20,30,40,50,60,70,80,90,100
Crit.AffectBelowPercent=100%,90%,80%,70%,60%,50%,40%,30%,20%,10%
Summary by CodeRabbit
- Updates
- Updated a submodule or dependency that may include new features and bug fixes, potentially enhancing project functionality.
Walkthrough
The main change in this update involves a shift in the subproject commit hash, indicating an update to a dependency or submodule. This transition brings potential new features, bug fixes, or adjustments from the external repository. While the specifics of these updates are not detailed, they may influence the project's functionality, suggesting readiness for enhancements or improvements within the application.
Changes
| Files | Change Summary |
|---|---|
| .../submodule-path | Updated submodule commit hash from 95aa94ee... to 6b7712dca.... No changes to public entity declarations. |
Poem
🐰 In the garden of code where we leap and play,
A new commit hops in, brightening the day!
Features await like fresh blooms in Spring,
With fixes and tweaks that joyful updates bring.
So let’s dance with delight, as we code and explore,
For every new change opens up a new door! 🌼
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
🪧 Tips
Chat
There are 3 ways to chat with CodeRabbit:
‼️ IMPORTANT Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai generate unit testing code for this file.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.@coderabbitai read src/utils.ts and generate unit testing code.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.@coderabbitai help me debug CodeRabbit configuration file.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (Invoked using PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
Nightly build for this pull request:
- compiled-dll-026176771243dbf6249633a25acea8f2180cae0c.zip These artifacts will expire in 90 days and will not be available for download after that time.
This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.
To make it clearer that this change allow a list of number as input, I've added the following 3 tags. If both these tags and the original ones are set, they'll override the old ones.
In rulesmd.ini:
[SOMEWARHEAD] ; Warhead
Crit.Chances= ; list of floating-point values (percentage or absolute) (0.0-1.0), overrides Crit.Chance
Crit.ExtraDamages= ; list of integers, overrides Crit.ExtraDamage
Crit.AffectBelowPercents= ; list of floating-point values (percentage or absolute) (0.0-1.0), overrides Crit.AffectBelowPercent
this implementation is way too complex but has little actual usage. It'll be more beneficial to do it in the warhead level, i.e. detonate different warheads based on the target's strength. As for the fire multiplier for extra damage, maybe adding a Crit.ExtraDamage.ApplyFirepowerMult tag would be sufficient instead of altering the AE system