359 SpeechHogNumber:= byte(c) - 48; |
359 SpeechHogNumber:= byte(c) - 48; |
360 end; |
360 end; |
361 // default to current hedgehog (if own) or first hedgehog |
361 // default to current hedgehog (if own) or first hedgehog |
362 if SpeechHogNumber = 0 then |
362 if SpeechHogNumber = 0 then |
363 begin |
363 begin |
364 if not CurrentTeam^.ExtDriven then |
364 if (not CurrentTeam^.ExtDriven) and (CurrentTeam^.Hedgehogs[0].BotLevel = 0) then |
365 SpeechHogNumber:= CurrentTeam^.CurrHedgehog + 1 |
365 SpeechHogNumber:= CurrentTeam^.CurrHedgehog + 1 |
366 else |
366 else |
367 SpeechHogNumber:= 1; |
367 SpeechHogNumber:= 1; |
368 end; |
368 end; |
369 end; |
369 end; |
475 exit; |
475 exit; |
476 |
476 |
477 // Speech bubble, but on next attack |
477 // Speech bubble, but on next attack |
478 if (copy(s, 2, 4) = 'hsa ') then |
478 if (copy(s, 2, 4) = 'hsa ') then |
479 begin |
479 begin |
480 if CurrentTeam^.ExtDriven then |
480 if (CurrentTeam^.ExtDriven or (CurrentTeam^.Hedgehogs[0].BotLevel <> 0)) then |
481 ParseCommand('/say ' + copy(s, 6, Length(s)-5), true) |
481 ParseCommand('/say ' + copy(s, 6, Length(s)-5), true) |
482 else |
482 else |
483 SendHogSpeech(#4 + copy(s, 6, Length(s)-5)); |
483 SendHogSpeech(#4 + copy(s, 6, Length(s)-5)); |
484 exit |
484 exit |
485 end; |
485 end; |
486 |
486 |
487 // Thinking bubble, but on next attack |
487 // Thinking bubble, but on next attack |
488 if (copy(s, 2, 4) = 'hta ') then |
488 if (copy(s, 2, 4) = 'hta ') then |
489 begin |
489 begin |
490 if CurrentTeam^.ExtDriven then |
490 if (CurrentTeam^.ExtDriven or (CurrentTeam^.Hedgehogs[0].BotLevel <> 0)) then |
491 ParseCommand('/say ' + copy(s, 6, Length(s)-5), true) |
491 ParseCommand('/say ' + copy(s, 6, Length(s)-5), true) |
492 else |
492 else |
493 SendHogSpeech(#5 + copy(s, 6, Length(s)-5)); |
493 SendHogSpeech(#5 + copy(s, 6, Length(s)-5)); |
494 exit |
494 exit |
495 end; |
495 end; |
496 |
496 |
497 // Yelling bubble, but on next attack |
497 // Yelling bubble, but on next attack |
498 if (copy(s, 2, 4) = 'hya ') then |
498 if (copy(s, 2, 4) = 'hya ') then |
499 begin |
499 begin |
500 if CurrentTeam^.ExtDriven then |
500 if (CurrentTeam^.ExtDriven or (CurrentTeam^.Hedgehogs[0].BotLevel <> 0)) then |
501 ParseCommand('/say ' + copy(s, 6, Length(s)-5), true) |
501 ParseCommand('/say ' + copy(s, 6, Length(s)-5), true) |
502 else |
502 else |
503 SendHogSpeech(#6 + copy(s, 6, Length(s)-5)); |
503 SendHogSpeech(#6 + copy(s, 6, Length(s)-5)); |
504 exit |
504 exit |
505 end; |
505 end; |