Skip to content

Commit

Permalink
Add conditional drop table items (#505)
Browse files Browse the repository at this point in the history
* Add variable predicates to drop table items closes #378

* Add drop item defaults and tests #378

* Add limited clue scroll dropping

* Add drop table chance command

* Add dark wizard drops

* Ignore patch codecov results

* Add more drop table tests

* Add clue scroll tests
  • Loading branch information
GregHib authored Mar 29, 2024
1 parent cb86ec0 commit a552ffb
Show file tree
Hide file tree
Showing 19 changed files with 771 additions and 93 deletions.
7 changes: 7 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ coverage:
if_not_found: success
if_ci_failed: success
flag_coverage_not_uploaded_behavior: pass
patch:
default:
threshold: 10%
informational: true
if_not_found: success
if_ci_failed: success
flag_coverage_not_uploaded_behavior: pass
comment:
layout: "condensed_header, files, diff, components"
hide_project_coverage: false
Expand Down
3 changes: 2 additions & 1 deletion data/definitions/items.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2877,10 +2877,11 @@ black_wizard_robe_top:
price: 193
limit: 100
weight: 0.907
aka: [ black_robe, black_robe_top, black_wizard_robe ]
slot: "Chest"
examine: "I can do magic better in this."
kept: "Wilderness"
black_robe_noted: 582
black_wizard_robe_top_noted: 582
bailing_bucket:
id: 583
weight: 1.0
Expand Down
4 changes: 4 additions & 0 deletions data/definitions/npcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1600,10 +1600,13 @@ dark_wizard_water:
max_hit_magic: 60
respawn_delay: 50
hunt_mode: cowardly
wander_radius: 4
race: human
examine: "He works evil magic."
dark_wizard_water_2:
<<: *dark_wizard_water
id: 8872
drop_table: dark_wizard_water
dark_wizard_earth:
&dark_wizard_earth
<<: *dark_wizard_water
Expand All @@ -1613,6 +1616,7 @@ dark_wizard_earth:
def: 14
mage: 22
hitpoints: 240
drop_table: dark_wizard_earth
examine: "A practicer of dark arts."
dark_wizard_earth_2:
<<: *dark_wizard_earth
Expand Down
12 changes: 12 additions & 0 deletions data/definitions/variables-custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -296,3 +296,15 @@ shooting_star_bonus_ore:
al_the_camel:
format: boolean
persist: true
easy_clue:
format: boolean
persist: true
medium_clue:
format: boolean
persist: true
hard_clue:
format: boolean
persist: true
elite_clue:
format: boolean
persist: true
213 changes: 212 additions & 1 deletion data/spawns/drops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,9 @@ cow_drop_table:
drops:
- id: clue_scroll_easy
chance: 1
variable: easy_clue
equals: false
default: false
chicken_drop_table:
type: all
drops:
Expand All @@ -484,6 +487,9 @@ chicken_drop_table:
drops:
- id: clue_scroll_easy
chance: 1
variable: easy_clue
equals: false
default: false
rat_drop_table:
type: all
drops:
Expand Down Expand Up @@ -642,9 +648,15 @@ king_black_dragon_drop_table:
drops:
- id: clue_scroll_elite
chance: 4
variable: elite_clue
equals: false
default: false
- type: all
drops:
- id: clue_scroll_hard
variable: hard_clue
equals: false
default: false
haakon_the_champion_drop_table:
type: all
drops:
Expand All @@ -668,6 +680,9 @@ haakon_the_champion_drop_table:
chance: 8
- id: clue_scroll_easy
chance: 2
variable: easy_clue
equals: false
default: false
- id: uncut_sapphire
chance: 2
- id: uncut_emerald
Expand All @@ -678,4 +693,200 @@ haakon_the_champion_drop_table:
chance: 2
- id: uncut_dragonstone
chance: 2
- id: loop_half_of_a_key
- id: loop_half_of_a_key
dark_wizard_water_drop_table:
type: all
drops:
- type: all
drops:
- id: bones
- roll: 128
drops:
- id: staff
chance: 8
- id: black_wizard_hat
chance: 6
members: false
- id: black_wizard_hat
chance: 4
members: true
- id: black_wizard_robe_top
chance: 3
- id: earth_rune
chance: 4
amount: 36
- id: air_rune
chance: 3
amount: 10
- id: water_rune
chance: 3
amount: 10
- id: earth_rune
chance: 3
amount: 10
- id: fire_rune
chance: 3
amount: 10
- id: air_rune
chance: 2
amount: 18
- id: water_rune
chance: 2
amount: 18
- id: earth_rune
chance: 2
amount: 18
- id: fire_rune
chance: 2
amount: 18
- id: nature_rune
chance: 7
amount: 4
- id: chaos_rune
chance: 6
amount: 5
- id: mind_rune
chance: 3
amount: 10
- id: body_rune
chance: 3
amount: 10
- id: mind_rune
chance: 2
amount: 18
- id: body_rune
chance: 2
amount: 18
- id: blood_rune
chance: 2
amount: 2
members: true
- id: cosmic_rune
amount: 2
- id: law_rune
amount: 3
- id: coins
chance: 17
- id: coins
chance: 16
amount: 2
- id: coins
chance: 7
amount: 4
- id: coins
chance: 3
amount: 29
- id: coins
amount: 30
- id: water_talisman
- id: fire_talisman
- id: nothing
chance: 16
amount: 0
- roll: 50
drops:
- id: clue_scroll_easy
variable: easy_clue
equals: false
default: false
dark_wizard_earth_drop_table:
type: all
drops:
- type: all
drops:
- id: bones
- roll: 128
drops:
- id: staff
chance: 4
- id: black_wizard_hat
chance: 6
members: false
- id: black_wizard_hat
chance: 4
members: true
- id: black_wizard_robe_top
chance: 3
- id: earth_rune
chance: 4
amount: 36
- id: air_rune
chance: 3
amount: 10
- id: water_rune
chance: 3
amount: 10
- id: earth_rune
chance: 3
amount: 10
- id: fire_rune
chance: 3
amount: 10
- id: air_rune
chance: 2
amount: 18
- id: water_rune
chance: 2
amount: 18
- id: earth_rune
chance: 2
amount: 18
- id: fire_rune
chance: 2
amount: 18
- id: nature_rune
chance: 7
amount: 4
- id: chaos_rune
chance: 6
amount: 5
- id: mind_rune
chance: 3
amount: 10
- id: body_rune
chance: 3
amount: 10
- id: mind_rune
chance: 2
amount: 18
- id: body_rune
chance: 2
amount: 18
- id: blood_rune
chance: 2
amount: 2
members: true
- id: cosmic_rune
amount: 2
- id: law_rune
amount: 3
- id: coins
chance: 17
- id: coins
chance: 16
amount: 2
- id: coins
chance: 7
amount: 4
- id: coins
chance: 3
amount: 29
- id: coins
amount: 30
- id: water_talisman
- id: fire_talisman
- id: nothing
chance: 16
amount: 0
- roll: 35
drops:
- id: clue_scroll_easy
variable: easy_clue
equals: false
default: false
human_drop_table:
type: all
drops:
- type: all
drops:
- id: bones
Loading

0 comments on commit a552ffb

Please sign in to comment.