use weighted random for ninja threats (#20469)

* change threats to be weighted random and a little cleanup

* ninja rule stores weighted random id for threats

* move threats out of the rule and into weighted random

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2023-09-25 04:16:09 +01:00
committed by GitHub
parent 2616cb69e8
commit 91a157d7ed
6 changed files with 44 additions and 23 deletions

View File

@@ -14,8 +14,4 @@
- TerrorObjective
- NinjaSurviveObjective
- type: NinjaRule
threats:
- announcement: terror-dragon
rule: Dragon
- announcement: terror-revenant
rule: RevenantSpawn
threats: NinjaThreats

View File

@@ -0,0 +1,16 @@
# threats called in by ninja hacking comms console
- type: weightedRandom
id: NinjaThreats
weights:
Dragon: 1
Revenant: 1
- type: threat
id: Dragon
announcement: terror-dragon
rule: Dragon
- type: threat
id: Revenant
announcement: terror-revenant
rule: RevenantSpawn