diff options
author | Bardur Arantsson <bardur@scientician.net> | 2016-03-27 15:46:59 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2016-03-27 15:47:19 +0200 |
commit | d1f01115fe9df36800191f1aa55d3ee45eb8cd02 (patch) | |
tree | 0b20d28a133b0da564f06c0d028005080e63c8b2 /src/init1.cc | |
parent | 4fbb684dead05e8579046b997888abc6bb76af25 (diff) |
Move "drops artifact N at %chance" to edit r_info
Diffstat (limited to 'src/init1.cc')
-rw-r--r-- | src/init1.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/init1.cc b/src/init1.cc index 75a75d3a..10698d2d 100644 --- a/src/init1.cc +++ b/src/init1.cc @@ -5769,6 +5769,25 @@ errr init_r_info_txt(FILE *fp) continue; } + /* Process 'A' for standard artifact drop (one line only) */ + if (buf[0] == 'A') + { + int artifact_idx; + int artifact_chance; + + /* Scan for values */ + if (2 != sscanf(buf + 2, "%d:%d", + &artifact_idx, + &artifact_chance)) return (1); + + /* Save the values */ + r_ptr->artifact_idx = artifact_idx; + r_ptr->artifact_chance = artifact_chance; + + /* Next... */ + continue; + } + /* Process 'W' for "More Info" (one line only) */ if (buf[0] == 'W') { |