Skip to content

Commit

Permalink
Add burst shot count + TODOs for burst
Browse files Browse the repository at this point in the history
  • Loading branch information
Janiczek committed Oct 17, 2024
1 parent 7c08cd9 commit 89a9377
Show file tree
Hide file tree
Showing 2 changed files with 281 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/Data/Fight/Generator.elm
Original file line number Diff line number Diff line change
Expand Up @@ -1138,6 +1138,14 @@ attack_ who ongoing attackStyle baseApCost =
, attackStyle = attackStyle
}

-- TODO burst: only one global critical hit roll; if it's critical, all the non-missing bullets are critical
-- TODO burst: targets the torso
-- TODO burst: each bullet has its own chance to hit
-- TODO burst: use up ammo for each bullet
-- TODO burst: if we have fewer bullets than the burst, only do that many rounds in the calculation
-- TODO burst: only a certain percentage of bullets hits the main target. How to consolidate this with the 1v1 combat and cone of spread that we don't need?
-- TODO burst: Chance to Hit == chance to hit at least once. Meaning each bullet has _lower_ chance to hit
-- TODO burst: maybe... chanceToHitOne = 1 - (1 - chanceToHitAtLeastOnce)^(1/N)
continueAttack : Maybe ( Item.Id, ItemKind.Kind ) -> Generator { ranCommandSuccessfully : Bool, nextOngoing : OngoingFight }
continueAttack usedAmmo_ =
let
Expand Down
275 changes: 273 additions & 2 deletions src/Data/Item/Kind.elm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module Data.Item.Kind exposing
, armorClass, armorDamageResistance, armorDamageThreshold
, isWeapon, isLongRangeWeapon, isWeaponArmorPenetrating, isAccurateWeapon
, range, weaponStrengthRequirement
, weaponDamageType, weaponDamage
, weaponDamageType, weaponDamage, shotsPerBurst
, usableAmmoForWeapon, isUsableAmmoForWeapon
)

Expand Down Expand Up @@ -46,7 +46,7 @@ module Data.Item.Kind exposing
@docs isWeapon, isLongRangeWeapon, isWeaponArmorPenetrating, isAccurateWeapon
@docs range, weaponStrengthRequirement
@docs weaponDamageType, weaponDamage
@docs weaponDamageType, weaponDamage, shotsPerBurst
@docs usableAmmoForWeapon, isUsableAmmoForWeapon
TODO weight : Kind -> Int
Expand Down Expand Up @@ -9905,3 +9905,274 @@ weaponDamage kind =

HnApNeedlerCartridge ->
mk 0 0


shotsPerBurst : Kind -> Int
shotsPerBurst kind =
case kind of
PowerFist ->
0

MegaPowerFist ->
0

SuperSledge ->
0

GaussPistol ->
0

Smg10mm ->
10

HkP90c ->
12

AssaultRifle ->
8

ExpandedAssaultRifle ->
8

HuntingRifle ->
0

ScopedHuntingRifle ->
0

RedRyderLEBBGun ->
0

SniperRifle ->
0

GaussRifle ->
0

PancorJackhammer ->
5

SawedOffShotgun ->
0

Minigun ->
40

Bozar ->
15

RocketLauncher ->
0

LaserPistol ->
0

GatlingLaser ->
10

LaserRifle ->
0

LaserRifleExtCap ->
0

PlasmaRifle ->
0

TurboPlasmaRifle ->
0

PulseRifle ->
0

FragGrenade ->
0

CattleProd ->
0

SuperCattleProd ->
0

Mauser9mm ->
0

Pistol14mm ->
0

CombatShotgun ->
3

HkCaws ->
5

Shotgun ->
0

Flare ->
0

Pistol223 ->
0

Knife ->
0

Wakizashi ->
0

LittleJesus ->
0

Ripper ->
0

NeedlerPistol ->
0

MagnetoLaserPistol ->
0

PulsePistol ->
0

Beer ->
0

Fruit ->
0

HealingPowder ->
0

Stimpak ->
0

SuperStimpak ->
0

BigBookOfScience ->
0

DeansElectronics ->
0

FirstAidBook ->
0

GunsAndBullets ->
0

ScoutHandbook ->
0

Robes ->
0

LeatherJacket ->
0

LeatherArmor ->
0

MetalArmor ->
0

TeslaArmor ->
0

CombatArmor ->
0

CombatArmorMk2 ->
0

PowerArmor ->
0

BBAmmo ->
0

SmallEnergyCell ->
0

Fmj223 ->
0

ShotgunShell ->
0

Jhp10mm ->
0

Jhp5mm ->
0

MicrofusionCell ->
0

Ec2mm ->
0

Tool ->
0

LockPicks ->
0

ElectronicLockpick ->
0

AbnormalBrain ->
0

ChimpanzeeBrain ->
0

HumanBrain ->
0

CyberneticBrain ->
0

GECK ->
0

SkynetAim ->
0

MotionSensor ->
0

K9 ->
0

MeatJerky ->
0

Ap5mm ->
0

Mm9 ->
0

Ball9mm ->
0

Ap10mm ->
0

Ap14mm ->
0

ExplosiveRocket ->
0

RocketAp ->
0

HnNeedlerCartridge ->
0

HnApNeedlerCartridge ->
0

0 comments on commit 89a9377

Please sign in to comment.