Repository navigation
Commit 82f38fe
committed
The #steal command now auto-selects the only possible adjacent target.
Quality of life, matching #order: stealing always required picking the
victim with the position cursor, even when only one monster stood next
to the hero. #steal now targets that monster directly and only falls
back to the cursor prompt when there are zero or several candidates.
* uhitm.c: add find_steal_target(), modeled on sounds.c's
find_commandable_pet(). It scans the eight adjacent squares for
spottable monsters and returns the candidate only when exactly one
exists. Pets and Izchak never qualify, so they cannot shadow a real
victim into the prompt path; long worm segments are deduped by
monster pointer. Candidacy is judged only on player-observable state
(no minvent check, which would leak whether a monster carries
anything before a turn is spent). dosteal() tries the helper first
and keeps the existing getpos() flow as the fallback.1 parent a13647f commit 82f38fe
2 files changed
Lines changed: 55 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5550 | 5550 | | |
5551 | 5551 | | |
5552 | 5552 | | |
| 5553 | + | |
5553 | 5554 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
3076 | 3077 | | |
3077 | 3078 | | |
3078 | 3079 | | |
| 3080 | + | |
| 3081 | + | |
| 3082 | + | |
| 3083 | + | |
| 3084 | + | |
| 3085 | + | |
| 3086 | + | |
| 3087 | + | |
| 3088 | + | |
| 3089 | + | |
| 3090 | + | |
| 3091 | + | |
| 3092 | + | |
| 3093 | + | |
| 3094 | + | |
| 3095 | + | |
| 3096 | + | |
| 3097 | + | |
| 3098 | + | |
| 3099 | + | |
| 3100 | + | |
| 3101 | + | |
| 3102 | + | |
| 3103 | + | |
| 3104 | + | |
| 3105 | + | |
| 3106 | + | |
| 3107 | + | |
| 3108 | + | |
| 3109 | + | |
| 3110 | + | |
| 3111 | + | |
| 3112 | + | |
3079 | 3113 | | |
3080 | 3114 | | |
3081 | 3115 | | |
| |||
3108 | 3142 | | |
3109 | 3143 | | |
3110 | 3144 | | |
3111 | | - | |
3112 | | - | |
3113 | | - | |
3114 | | - | |
3115 | | - | |
| 3145 | + | |
| 3146 | + | |
| 3147 | + | |
| 3148 | + | |
| 3149 | + | |
| 3150 | + | |
| 3151 | + | |
| 3152 | + | |
3116 | 3153 | | |
3117 | | - | |
3118 | | - | |
| 3154 | + | |
| 3155 | + | |
3119 | 3156 | | |
3120 | | - | |
3121 | | - | |
3122 | | - | |
3123 | | - | |
3124 | | - | |
| 3157 | + | |
| 3158 | + | |
| 3159 | + | |
| 3160 | + | |
| 3161 | + | |
3125 | 3162 | | |
3126 | | - | |
3127 | | - | |
3128 | | - | |
3129 | | - | |
| 3163 | + | |
| 3164 | + | |
| 3165 | + | |
| 3166 | + | |
| 3167 | + | |
3130 | 3168 | | |
3131 | 3169 | | |
3132 | 3170 | | |
| |||
0 commit comments