… | |
… | |
2166 | * that party_number -1 is no party, so attacks can still happen. |
2166 | * that party_number -1 is no party, so attacks can still happen. |
2167 | */ |
2167 | */ |
2168 | else if ((mon->stats.hp >= 0) && QUERY_FLAG (mon, FLAG_ALIVE) && |
2168 | else if ((mon->stats.hp >= 0) && QUERY_FLAG (mon, FLAG_ALIVE) && |
2169 | ((mon->type != PLAYER || op->contr->party == NULL || op->contr->party != mon->contr->party))) |
2169 | ((mon->type != PLAYER || op->contr->party == NULL || op->contr->party != mon->contr->party))) |
2170 | { |
2170 | { |
2171 | |
|
|
2172 | /* If the player hasn't hit something this tick, and does |
2171 | /* If the player hasn't hit something this tick, and does |
2173 | * so, give them speed boost based on weapon speed. Doing |
2172 | * so, give them speed boost based on weapon speed. Doing |
2174 | * it here is better than process_players2, which basically |
2173 | * it here is better than process_players2, which basically |
2175 | * incurred a 1 tick offset. |
2174 | * incurred a 1 tick offset. |
2176 | */ |
2175 | */ |
2177 | if (!op->contr->has_hit) |
2176 | if (!op->contr->has_hit) |
2178 | { |
2177 | { |
2179 | op->speed_left += op->speed / op->contr->weapon_sp; |
2178 | op->speed_left += op->contr->weapon_sp - op->speed; |
2180 | |
2179 | |
2181 | op->contr->has_hit = 1; /* The last action was to hit, so use weapon_sp */ |
2180 | op->contr->has_hit = 1; /* The last action was to hit, so use weapon_sp */ |
2182 | } |
2181 | } |
2183 | |
2182 | |
2184 | skill_attack (mon, op, 0, 0, 0); |
2183 | skill_attack (mon, op, 0, 0, 0); |