| 5 | | * Copyright (c) 2007 Angband Contributors |
|---|
| 6 | | * |
|---|
| 7 | | * This work is free software; you can redistribute it and/or modify it |
|---|
| 8 | | * under the terms of either: |
|---|
| 9 | | * |
|---|
| 10 | | * a) the GNU General Public License as published by the Free Software |
|---|
| 11 | | * Foundation, version 2, or |
|---|
| 12 | | * |
|---|
| 13 | | * b) the "Angband licence": |
|---|
| 14 | | * This software may be copied and distributed for educational, research, |
|---|
| 15 | | * and not for profit purposes provided that this copyright and statement |
|---|
| 16 | | * are included in all such copies. Other copyrights may also apply. |
|---|
| | 5 | * Copyright (c) 2008 Andrew Sidwell |
|---|
| | 6 | * |
|---|
| | 7 | * Redistribution and use in source and binary forms, with or without |
|---|
| | 8 | * modification, are permitted provided that the following conditions are met: |
|---|
| | 9 | * |
|---|
| | 10 | * * Redistributions of source code must retain the above copyright notice, |
|---|
| | 11 | * this list of conditions and the following disclaimer. |
|---|
| | 12 | * |
|---|
| | 13 | * * Redistributions in binary form must reproduce the above copyright notice, |
|---|
| | 14 | * this list of conditions and the following disclaimer in the documentation |
|---|
| | 15 | * and/or other materials provided with the distribution. |
|---|
| | 67 | |
|---|
| | 68 | printf("\n"); |
|---|
| | 69 | } |
|---|
| | 70 | |
|---|
| | 71 | void results_print_csv_pair(const char *field1, const char *field2) |
|---|
| | 72 | { |
|---|
| | 73 | size_t i; |
|---|
| | 74 | for (i = 0; i < no_results; i++) |
|---|
| | 75 | { |
|---|
| | 76 | if (strcmp(results[i].key, field1) == 0) |
|---|
| | 77 | { |
|---|
| | 78 | printf("%s,", results[i].value); |
|---|
| | 79 | break; |
|---|
| | 80 | } |
|---|
| | 81 | } |
|---|
| | 82 | |
|---|
| | 83 | for (i = 0; i < no_results; i++) |
|---|
| | 84 | { |
|---|
| | 85 | if (strcmp(results[i].key, field2) == 0) |
|---|
| | 86 | { |
|---|
| | 87 | printf("%s,", results[i].value); |
|---|
| | 88 | break; |
|---|
| | 89 | } |
|---|
| | 90 | } |
|---|
| 139 | | if (f1 & RF1_DROP_60) prob += 0.6; |
|---|
| 140 | | if (f1 & RF1_DROP_90) prob += 0.9; |
|---|
| 141 | | if (f1 & RF1_DROP_1D2) prob += 1.5; |
|---|
| 142 | | if (f1 & RF1_DROP_2D2) prob += 3.0; |
|---|
| 143 | | if (f1 & RF1_DROP_3D2) prob += 4.5; |
|---|
| 144 | | if (f1 & RF1_DROP_4D2) prob += 6.0; |
|---|
| | 162 | if (f1 & RF1_DROP_60) prob += 0.6/* 0.4*/; |
|---|
| | 163 | if (f1 & RF1_DROP_90) prob += 0.9/* 0.6*/; |
|---|
| | 164 | if (f1 & RF1_DROP_1D2) prob += 1.5/* 1.0*/; |
|---|
| | 165 | if (f1 & RF1_DROP_2D2) prob += 3.0/* 2.0*/; |
|---|
| | 166 | if (f1 & RF1_DROP_3D2) prob += 4.5/* 3.0*/; |
|---|
| | 167 | if (f1 & RF1_DROP_4D2) prob += 6.0/* 4.0*/; |
|---|