Giter Site home page Giter Site logo

jmegner / kt21calculator Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 3.0 2.13 MB

Specialized calculator for analyzying shooting and fighting in Kill Team 2021 edition ("KT21").

Home Page: https://jmegner.github.io/KT21Calculator/

License: The Unlicense

HTML 0.35% TypeScript 92.33% CSS 1.89% Rust 5.43%
github-actions github-pages jest kill-team react react-hooks statistics

kt21calculator's People

Contributors

jmegner avatar veddermatic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

kt21calculator's Issues

Cult Ambush / Rerolling specific values + Close Assault

Hi was wondering how difficult it would be to add an option for re-rolls of any results of a specific value (basically ceaseless+) - quite a few teams have this ability:

  • Wyrmblade: Cult Ambush
  • Breachers: Attack Order
  • Warp Coven: Slow and Purposeful

and probably a few more that I can't think of.

With Breachers being strong in the meta an option for Close Assault could be quite nice too (two successful hits upgrades a failed hit into a success) as it differs slightly from starfire/dakkadakkadakka

Such a great tool, have gotten so much use out of it and thank you for sharing!

kasrkin elite rule update

Kasrkin elite ability can now modify a 2nd die from a fail to normal success if another die is discarded:

Each time a friendly KASRKIN operative fights in combat or makes a shooting attack, in the Roll Attack Dice step of that combat or shooting attack, you can spend 1 or more of your Elite points to adjust one (and only one) of your dice. After adjusting your first dice, if you discard one of your attack dice, you can spend Elite points to adjust an additional dice, but only one of your remaining failed hits to a normal hit. For each point you spend, add 1 to the dice result and reduce the number of Elite points in your pool by 1. In each Strategy phase, add 2 elite points to your pool.

create mode/tab for two attacks

have mode/tab for two attacks; two attacker profiles and one defender profile; have a dropdown to choose between comparison and results of doing both attacks

single-fighter success tables for melee

Talks with Oust on Discord indicate there is interest in having tables of p(>=successes) and p(>=crits) for each fighter before the strike/parry stuff. Something like the table below that Oust made...

image

Will do further talks to see if those tables really do something that existing tables don't.

Add Omen debuff

https://wahapedia.ru/kill-team2/kill-teams/hand-of-the-archon/#Ability

Each time attack or defence dice are rolled for that operative ... If it is an enemy operative, your opponent must re-roll dice results of 6.

I think it wouldn't be too hard as long as I don't allow mixing with balanced/command style rerolls.

Omen debuff changes your individual die outcomes in a very consistent way regardless of ceaseless/relentless/NoReroll. To add in Omen, you just add in some "stage 0" probabilities to your latest-stage probabilities. Explanation below.

Imagine there are stages. Stage 0 comes from BS and Lethal only. For BS=3+, the fail/norm/crit (f/n/c) Stage 0 probs are...

  • pf0 = 2/6
  • pn0 = 3/6
  • pc0 = 1/6

Then Stage 1 handles ceaseless/relentless/NoReroll. Let's pretend ceaseless...

  • pf1 = 7/6*pf0 - 1/6
  • pn1 = 7/6*pn0
  • pc1 = 7/6*pc0

Then Stage2 handles Omen debuff by adding { pf0/6, pn0/6, pc0/6 - 1/6 } ...

  • pf2 = pf1 + 1/6*pf0
  • pn2 = pn1 + 1/6*pn0
  • pc2 = pc1 + 1/6*pc0 - 1/6

So, for BS=3+, Ceaseless, and Omen, we have final die outcome probabilities of...

  • pFail: 28%
  • pNorm: 67%
  • pCrit: 6%

Interestingly, I used to think of ceaseless as multiplying the probability of norms and crits by 7/6, but a more robust way that mixes well with other rerolls like Omen debuff is adding some Stage 0 probabilities: { pf0/6 - 1/6, pn0/6, pc0/6 }.

Transition to injured across melee rounds

transition from uninjured to injured (degraded WS) between rounds. Will require to split the W into MaxW and CurrentW and it'd be good to have an X selected for one of those to mean "don't apply injured".

Select operative profile to set stats

Have option for user to select a relevant operative profile (ex: Necron Immortal with Gauss Blaster) instead of individually selecting parameters. Maybe once the operative is selected, there are more options for relevant equipment, ploys, and other ability effects.

I think this is low priority because of high effort and low benefit. There are a lot of operatives, so it is difficult to make selecting an operative much faster than plugging in the stats. Also, I think that people mostly have the relevant profiles memorized or they are using ktcalc at the same time they are looking at wahapedia. I think one of the most common uses of ktcalc is to see how your favorite (memorized) team does against some other team, which mostly share the same Sv and W characteristics, and you perhaps vary whether they are in cover.

Additional Melee Abilities (Stealth Assault / Duellist)

Would abilities that allow the charging operative to strike twice in a row be possible to implement in the melee calculator?
Void-dancers - Murderous Entrance (Can immediately resolve another attack dice following the resolution of a successful crit)
Phobos - Stealth Assault (Can immediately resolve another attack dice following the resolution of a successful hit)

Duellist (Parry before the combat begins) is also a common ability that appears on quite a few melee specialists and can significantly change how fights go - would that also be possible to implement?
Elucidian Starstriders - Assassin
Wyrmblade - Locus
Voidscarred - Kurnathi

There are also the damage reduction abilities that trigger off specific hits:
Kommandos - Just a Scratch
Elucidian Starstriders - Undaunted Explorers (halve the damage of one attack die to a minimum of 2)
Warp Coven - Arcane Robes (one crit attack is reduced to normal damage)

JAS is probably the most important one currently

Kroot Cut-skin's "Vicious Duellist"

https://wahapedia.ru/kill-team2/kill-teams/farstalker-kinband/#Kroot-Cut-skin

Kroot Cut-skin's "Vicious Duellist":

Vicious Duellist: Each time this operative fights in combat, in the Roll Attack Dice step of that combat, for each attack dice your opponent discards, the enemy operative in that combat suffers 1 mortal wound.

This would be for KT Fight tab. The "Roll Attack Dice" step is just before "Resolve Successful Hits", so this would happen before any strike/parry happens.

For this, I would have to ...

  • Add ViciousDuellist Ability and record it in Model.abilities. UI-wise, I could simply add it to Ability.ts's mutuallyExclusiveFightAbilities and edit the relevant Note.
  • Add fails field to FinalDiceProb and add fails arg to its constructor, then supply a fails value in calcFinalDiceProb.
  • Add fails field to FighterState, etc.
  • In resolveFight, before handleDuelist, that is where I would do something like if(guy.profile.has(Ability.ViciousDuellist)){ guy.applyDmg(otherGuy.fails); } for both guys.

support multiple attacks from different weapons

It would be helpful to be able to calculate the average damage and kill% against a single operative getting shot by two different weapon profiles. For example, a Warpcoven Sorcerer (under the benefit of Exalted Astartes) fires their Warpflame Pistol and Doombolt, both at the same target. What is the likelihood of that target dying from the combination of those two shots?

mass analysis tab for shooting

It'd be nice to input some constants and some things that vary, and ktcalc outputs a table with one row per combination. The row would have avg dmg, then p(>=dmg) for dmg=1..20.

  • Could use UI elements where instead of a dropdown where you select one option, you get checkboxes where you can select any number of options.
  • Or, could go text-based route where input is something like "A=4 BS=3,4 N=3 C=4 Lethal=4..6 Rending=1 Sv=*" with unstated things going to defaults, like Def=3.
  • Or both. People use the UI elements to explore and can see the text equivalent, then it is easy to copy and remember that text for later.

Some nice additional features:

  • Option to generate a csv file. Maybe xlsx too.

Feel no pain (FNP) for melee/fighting

It's pretty frequent that 5+ or 6+ FNP rules are provided to operatives, and would add to their approximate wound count.
One thing to note is that there's a complexity to account for given that FNP rolls in some ways stack so a unit that's dealing less damage per hit would be less likely to kill a unit with a 5+ FNP than anther unit that's dealing more damage per hit, even if the total damage produced for retained dice across both scenarios is equal. The reason for this is because FNP rolls are performed at the end of each hit, not at the end of combat itself.

Arcane Robes and nerfed Durable: reduce first crit hit dmg

Lifted from part of #7

To implement...

Durable chapter tactic from https://wahapedia.ru/kill-team2/kill-teams/intercession-squad/#Chapter-Tactics

Durable: Each time this operative fights in combat or a shooting attack is made against it, in the Resolve Successful Hits step of that combat or shooting attack, one critical hit inflicts one less damage on this operative (to a minimum of 3).

Arcane Robes equipment from https://wahapedia.ru/kill-team2/kill-teams/warpcoven/#Equipment

Arcane Robes: Once per battle, when Critical Damage would be inflicted upon this operative, you can use this ability. If you do so, that attack dice inflicts Normal Damage instead.

I think for shooting, these are fairly easy. For melee, it messes up some of the heuristics (strike if that will kill enemy, etc).

Note: Arcane Robes is "once per battle", so I would want to handle that when doing multi-round calcs, and it'd be good to correct that multi round bug for Just A Scratch as well.

Hearthkyn Grudge Tokens

At the moment your calculator cannot correctly simulate these as these turn hits into crits, but you must roll those hits. Autocrit just retains a crit without rolling. Since you can stack grudge tokens and turn multiple hits into crits, autoretaining more than 1 crit skews the data to be stronger than it actually is.

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.